Hi,
After searching and reading through the forum about extracting the modem from the phone and package it for Odin, there is no specific command for SGII that I can find.
So, please help me confirm if these are the correct steps. I want to backup my modem before flashing a new one through Odin.
--------------------------
adb shell
su
# dd if=/dev/block/mmcblk0p8 of=/sdcard/modem.bin bs=4096
Copy modem.bin to linux
$ tar -H ustar -cvf my_modem.tar modem.bin
$ md5sum -t my_modem.tar >> my_modem.tar
$ mv my_modem.tar my_modem.tar.md5
----------------------------
now, I can use the my_modem.tar.md5 file as a backup if I want to go back to the original modem, right?
Thanks.
The main objective is to send a splited file to an android and join it back up with a .sh script, the file is splited to 5MB parts but its total size is unknown (trying to make an universal script), I've splited the file and transferred the file parts and the script to a dir inside the android device and ran the .sh with adb shell sh script.sh. every thing is is ok but the dd command which wont accept a variable
Code:
file="$(ls /data/local/tmp/ | grep -i --include="*.tul" tul)"
echo file is "$file"
name="${file%.*}"
echo short name is "$name"
tmp="${file: -3}";
num=${tmp//[!0-9]/}
echo number of files is "$num"
N="${name}.part1"
i=1
while [ $i -le $num ]; do
dd if="/data/local/tmp/$"${name}.part""$i"" of="/data/local/tmp/cust" bs=1024 count=5120 seek="$((($i-1)*5120))"
let i=i+1
done
echo DONE
exit
the output normally is that the end of the name cuts the beginning and I get dd if No such file or directory meaning
Code:
/data/local/new_file.part1
becomes something like
Code:
.part1local/new_file
while in command lind adb shell it works OK
adb shell
Code:
adb shell
>dd if="/data/local/tmp/$"${name}.part1"" of=/data/local/tmp/cust bs=1024 count=5120
$file is an index file that has the parts name and total number of them generated by the split code (in java) Important to say that Im a total noob and it took me few hours to get to this so any help is appreciated
edit:
Code:
dd if=/data/local/tmp/"$name".part"$i" of=/data/local/tmp/cust bs=1024 count=5120 seek="$((($i-1)*5120))"
working in command line (adb shell) but when running the .sh file I get
Code:
.part2: No such file or directory
Bump, can any one help ?
Hello,
I am looking for a mmcblk0p3 file located in the phones to redo the update.
to check the score of the phone:
Code:
adb shell cat proc/partitions
here is the code to extract the file in the SD card:
Code:
adb shell su -c dd if=/dev/block/mmcblk0p3 of=/sdcard/ids.img bs=4096
I tried but the problem my phone not recognize sd card as there is always block the startup logo.
here is the second code to extract the file on pc:
Code:
adb -d shell su -c busybox dd if=/dev/block/mmcblk0p3 > C:\Users\%username%\Desktop\ids.img
when I install a ROM by accident I mmcblk0p3 erase the file is replaced with the boot file.
I try again to do the update but I have a problem because it marks me "failure reading device information. Check the condition of the phone"
I'm looking to remake mmcblk0p3 updating the phone.
there is there anyone who could share that file (1024 kb) => traceability?
Thank you for your reply.
I'm looking for a way to transfer files with the correct permissions over adb. I can create a tarball and push it to my phone on the fly but for some reason I can't extract it without creating a temporary file. What I mean is that
Code:
tar -c file | adb exec-in 'cat > /file.tar' && adb shell 'tar -xf /file.tar -C dir'
works but
Code:
tar -c file | adb exec-in 'tar -xf - -C dir'
doesn't. Actually, it does but not all files are transferred over. Am I missing out on something?
@Ciren__
adb exec-out and/or adb exec-in
writes/reads to/from only files
I've used this:
Bash:
tar czplf - --acls --selinux --xattrs --numeric-owner -C /mnt/tmp/ data/com.android.messaging | adb exec-in tar -f - -x -p -z -v -C /data
... to restore an app from a whole partition image backup (mounted with `kpartx` and `mount -t ext4 -o ro,noload`).
I'm not sure if all those flags are actually needed, but that was my first guess at something which I thought would work.
Hi , i'm new in XDA , first i want to say, excuse me if i am posting in a wrong place, i can't find the right place for make a new thread.
I have a samsung S6792L fame lite, is stuck in samsung logo i make flash of stock rom via odin , stock rom (home.tar)1 file and flash stock rom of 4 files (Boot, Pda, phone , csc); then i flash a custom recovery (TWRP 2.8.6.0 for S6790) i mount efs partition but when i try open efs folder , the phone shut down and vibrate for 3- 4 seconds. also cannot do backup of efs folder because happen the same thing (shut down)
then i flash cwm recovery but in that recovery i can't make a backup of efs folder.
i can't find the PIT file for this model , and i don't know what can i do for solve this. please help.
thanks for your time.
(excuse me for my bad english)
Backup / Restore EFS Partition
@Kevin95ME
FYI: EFS partition is an encrypted one.
Assumed the path to EFS is /dev/block/mmcblk0p3. Note: This may not be correct path. It's on you to find the correct path.
You can backup EFS to internal storage running command
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/sdcard/efs.img bs=4096
or you can backup EFS to external storage running command
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096
in a Terminal Window what creates file efs.img
To restore the EFS partition you run either command
Code:
dd if=/storage/sdcard/efs.img of=/dev/block/mmcblk0p3 bs=4096
or command
Code:
dd if=/storage/extSdCard/efs.img of=/dev/block/mmcblk0p3 bs=4096
in a Terminal Window what depends where you saved it.
jwoegerbauer said:
@Kevin95ME
FYI: EFS partition is an encrypted one.
Assumed the path to EFS is /dev/block/mmcblk0p3. Note: This may not be correct path. It's on you to find the correct path.
You can backup EFS to internal storage running command
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/sdcard/efs.img bs=4096
or you can backup EFS to external storage running command
Code:
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096
in a Terminal Window what creates file efs.img
To restore the EFS partition you run either command
Code:
dd if=/storage/sdcard/efs.img of=/dev/block/mmcblk0p3 bs=4096
or command
Code:
dd if=/storage/extSdCard/efs.img of=/dev/block/mmcblk0p3 bs=4096
in a Terminal Window what depends where you saved it.
Click to expand...
Click to collapse
Hi thanks for answer,
excuse me for the newbie question, but, do i run terminal window on the TWRP recovery or adb shell?
Kevin95ME said:
Hi thanks for answer,
excuse me for the newbie question, but, do i run terminal window on the TWRP recovery or adb shell?
Click to expand...
Click to collapse
Terminal Emulator is an Android app you can get off Google Play Store.
jwoegerbauer said:
Terminal Emulator is an Android app you can get off Google Play Store.
Click to expand...
Click to collapse
ok lets me try. later i tell you the result. thanks
jwoegerbauer said:
Terminal Emulator is an Android app you can get off Google Play Store.
Click to expand...
Click to collapse
my friend thanks for you support i solve the problem doing this things in this order
first
i follow your step doing backup of my efs folder , but i modify the command
dd if=/dev/block/mmcblk0p3 of=/storage/extSdCard/efs.img bs=4096 ( your command)
dd if=/dev/block/mmcblk0p3 of=/sdcard1/efs.img bs=4096 (then i wrote this) ( with your command the terminal told me " no exist such file or directory")
(sdcard1 is ExtSdCard in S6792L)
then i save that efs file in my pc
second
i use the information on this post https://forum.xda-developers.com/showthread.php?t=2204960
this line of command
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
third
i restore efs folder following your step, but modifying the command
dd if=/sdcard1/efs.img of=/dev/block/mmcblk0p3 bs=4096
the device is now on and pass the boot logo, right now i am deactivating the factory mode because show a yellow box showing ROM information.
i will use this information for deactivate that https://forum.xda-developers.com/galaxy-s3/general/how-to-fix-efailed-to-mount-efs-invalid-t2858056
Remove factory mode:
There are different methods that we can use to remove factory mode
In my case
1. Installed custom ROM to get root access
2. Instaled kTool
3. Copy the backup of my efs into sdcard (you can use .img or tar file)
4. Open kTool and restore the efs
5. Reboot the phone
* This method is the easiest and safest method because when you are getting the efs mount error there is a chance of loosing your IMEI and some other files, in that situation the following methods will not work.
OR
1. Root your phone (Either root manually or install a custom ROM)
2. Install ES File Explorer
3. Open ES File Explorer and turn on Root Explorer
4. Navigate to /efs folder
5. Open factorymode as txt in ES Note Editor
6. Change it from OFF to ON and save
7. Reboot your phone
OR
1. Root your phone (Either root manually or install a custom ROM)
2. Install Terminal Emulator
3. Run the following commands
Code:
su
rm /efs/FactoryApp/keystr
rm /efs/FactoryApp/factorymode
echo -n ON >> /efs/FactoryApp/keystr
echo -n ON >> /efs/FactoryApp/factorymode
chown 1000.1000 /efs/FactoryApp/keystr
chown 1000.1000 /efs/FactoryApp/factorymode
chmod 0744 /efs/FactoryApp/keystr
chmod 0744 /efs/FactoryApp/factorymode
thnaks so much for your support.
excuse formy bad english ,i do my best for improve it.
by the way i do all in the Terminal Command of the TWRP recovery.