Need full dump of storage. - Galaxy S I9000 General

Hello.
I have several troubles with my phone (adb not working, phone don't remeber usb connection mode after reboot, etc). And I cannot fix them with simple flashing. I want to try to fix them by writing data from fully working phone.
For this I need all partitions from I9001 except /system, /data, /boot, /recovery, /cache., /sdcard
Does anyone can share /dev/block/mmcblk0p1 - /dev/block/mmcblk0p27 except mmcblk0p8, mmcblk0p13, mmcblk0p15, mmcblk0p16, mmcblk0p17?
You could make parition images with
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/1
dd if=/dev/block/mmcblk0p2 of=/sdcard/2
...
dd if=/dev/block/mmcblk0p27 of=/sdcard/27
I know it risky but I really need it.

this should do the tick
Code:
adb shell
su
mount -o remount rw /system
dd if=/dev/block/mmcblk0p12 of=/sdcard/persist.img bs=4096
dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img bs=4096
dd if=/dev/block/mmcblk0p18 of=/sdcard/preload.img.ext4 bs=4096
dd if=/dev/block/mmcblk0p27 of=/sdcard/efs.img.ext4 bs=4096
o btw now I see that you need the working files, you could extract them from the odin one package and push em directly to your phone

broodplank1337 said:
o btw now I see that you need the working files, you could extract them from the odin one package and push em directly to your phone
Click to expand...
Click to collapse
But there is only
Code:
adsp.mbn
amss.mbn
boot.img
cache.img.ext4
recovery.img
system.img.ext4
I tried to flash other versions and this don't help.

Shtsh said:
But there is only
Code:
adsp.mbn
amss.mbn
boot.img
cache.img.ext4
recovery.img
system.img.ext4
I tried to flash other versions and this don't help.
Click to expand...
Click to collapse
Then i recommend you to boot in recovery (CWM) and format all partitions, then put phone in download mode and flash xxkps/xxkpu

broodplank1337 said:
Then i recommend you to boot in recovery (CWM) and format all partitions, then put phone in download mode and flash xxkps/xxkpu
Click to expand...
Click to collapse
I'm tried this Didn't help.

Those ODIN stock roms usually have modem binaries. I don't know if it is a good idea to dd different boot loaders to your phone. I would not do it in any case. Your phone is not that old. Reflash stock and claim warranty if it behaves badly.

Related

Backup recovery partition?

Hi Everyone,
Can someone please confirm that this is the correct partition for recovery: /dev/block/mmcblk0p21 ?
I just plan on dumping the recovery using:
Code:
dd if=/dev/block/mmcblk0p21 of=/sdcard/recovery.img bs=4096
Thanks.

[GUIDE][HOW-TO] Create custom Odin-flashable packages

Create custom Odin-flashable packages
Hello guys, today I show you how to create custom Odin-flashable packages.
The basic guide that I always used for any Samsung Android device comes from here.
First of all, this is an explanation of basic partitions which we can use to make a Odin package, what they are and filenames:​
System: is the partition where the ROM is installed, stock filename is system.img.md5
[*]Cache: is the partition where temporary data is stored, like ART/dalvik cache of system apps, in stock (Samsung) ROM contains CSC too. Stock filename is cache.img.md5
[*]Data: is the partition where user's data, apps and Android settings are stored, stock filename is userdata.img.md5
[*]Hidden: is the /preload partition where the stock ROM has some other system apps, unneeded/useless on custom ROMs. Stock filename is hidden.img.md5
[*]Kernel: is the partition that, as name says, contains kernel. Stock filename is kernel.bin.md5
[*]Modem: is the partition that contains baseband firmware. Stock filename is modem.bin.md5
[*]ModemFS: is the partition that contains baseband firmware data. Stock filename is modemfs.img.md5
[*]IPL: another baseband's partition. Stock filename is ipl.bin.md5
Instead of *.md5 extension, you can use *.img as well!! For example, system.img, cache.img...
Note for Kernel: sometimes Odin has problems while flashing this device if you use boot.img instead of kernel.bin!!
I tried the same on my S4 and boot.img doesn't cause any issue, since in the firmware its kernel is called boot.img instead of kernel.bin.md5 as Galaxy S Advance!
Basic commands to make a Odin package on a Linux distro or on Windows through Cygwin are these:
Code:
tar -H ustar -c "INSERT .IMG OR .MD5 FILE/S HERE" > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
We want to make a flashable kernel:
Code:
tar -H ustar -c kernel.bin.md5 > kernel.tar
md5sum -t kernel.tar >> kernel.tar
mv kernel.tar kernel.tar.md5
We want to make a flashable modem (baseband FW) package:
Code:
tar -H ustar -c modem.bin.md5 modemfs.img (where available, also ipl.bin.md5) > modem.tar
md5sum -t modem.tar >> modem.tar
mv modem.tar modem.tar.md5
You can make any kind of package. Kernel, system... There's no limit!​
Dump your current ROM
If you want to backup your current ROM in a Odin package to share or to be restored later.
You can backup with or without user data, apps and Android settings, let's see how!
Things needed:
Brain
Fingers
Rooted device
Terminal Emulator app
USB cable or MicroSD adapter
Dump ROM without personal data/apps/settings:
Do this in Terminal Emulator
Code:
su (to enable superuser)
dd if=/dev/block/mmcblk0p3 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/system.img bs=4096
dd if=/dev/block/mmcblk0p15 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/kernel.bin bs=4096
# This backups into MicroSD card, if you want to backup to internal storage, change [COLOR="Red"]sdcard1[/COLOR] with [COLOR="Red"]sdcard0[/COLOR]
# If you are dumping a stock or stock-based ROM (that uses /preload), add also:
dd if=/dev/block/mmcblk0p9 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/hidden.img bs=4096
Dump ROM with personal data/apps/settings:
Do this in Terminal Emulator
Code:
su (to enable superuser)
dd if=/dev/block/mmcblk0p3 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/system.img bs=4096
dd if=/dev/block/mmcblk0p4 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/cache.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/userdata.img bs=4096
dd if=/dev/block/mmcblk0p15 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/kernel.bin bs=4096
# This backups into MicroSD card, if you want to backup to internal storage, change [COLOR="Red"]sdcard1[/COLOR] with [COLOR="Red"]sdcard0[/COLOR]
# If you are dumping a stock or stock-based ROM (that uses /preload), add also:
dd if=/dev/block/mmcblk0p9 of=/storage/[COLOR="Red"]sdcard1[/COLOR]/hidden.img bs=4096
Now transfer dumped files on PC.
Create Odin ROM package without personal data/apps/settings:
Code:
tar -H ustar -c system.img [COLOR="Red"]*hidden.img*[/COLOR] kernel.bin > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
*Only on stock/stock-based ROM
Create Odin ROM package with personal data/apps/settings:
Code:
tar -H ustar -c system.img cache.img userdata.img [COLOR="Red"]*hidden.img*[/COLOR] kernel.bin > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
​
That's all guys!!
If you have any question or trouble, feel free to ask
First....... Thank you so much i was just searching for something like that.
You made my day bro
I think that the sdcard1 should change to extSdCard? , that's the correct path for stock based ROM only i guess
LATEST EDIT: I tried to make a Harshjelly odin package, everything is fine until i start to flash it, it says NAND write failed @AntaresOne, any idea why?
[email protected] said:
I think that the sdcard1 should change to extSdCard? , that's the correct path for stock based ROM only i guess
LATEST EDIT: I tried to make a Harshjelly odin package, everything is fine until i start to flash it, it says NAND write failed @AntaresOne, any idea why?
Click to expand...
Click to collapse
Have you used kernel.bin.md5 as kernel?
AntaresOne said:
Have you used kernel.bin.md5 as kernel?
Click to expand...
Click to collapse
No, I just pull the kernel from the device which is the stock kernel, so in this case meaning that I should get cocore kernel which is already in .md5 extension?
[email protected] said:
No, I just pull the kernel from the device which is the stock kernel, so in this case meaning that I should get cocore kernel which is already in .md5 extension?
Click to expand...
Click to collapse
Yeah, CoCore is ok. I suggest to try some times with single components, in this way you can take confidence with the system

[Q&A] [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery

Q&A for [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
Booting with insecure boot image has broken all my sensors in my Nexus 4 / Android 5
I have been using a boot insecure image made for Nexus 4 / Android 4.2 downloaded from here :
http://forum.xda-developers.com/nexus-4/development/boot-img-obsolete-please-lock-t1990170
to boot my phone to have root access through adb by doing:
$ fastboot boot bootinsecure.img
But after upgrading to Android 5 the process of booting with this image was ruining all my sensors and my wifi.
My wifi was fixed by deleting the content in /data/misc/wifi but leaving wpa_supplicant.conf to keep my saved wifis.
But I cannot fix the sensors. I tried this fix for Nexus 5 but it didn't work:
http://forum.xda-developers.com/google-nexus-5/general/sensors-fix-nexus-5-t2704915
If I delete the user data the problem is solved but I don't want to remove all my data.
There is something in that boot image that brakes my sensors by changing something in the userdata partition
For testing purposes, I deleted the user data. Booted again and the problem was fixed. I saved a image of the userdata partition by doing as root:
$ adb pull /dev/block/mmcblk0 mmcblk0.img
and mounting the userdata partition in my linux as root to keep al the original permissions
# sudo mount -o loop,offset=1627389952,defaults,ro,noload mmcblk0.img mnt/userdata
I booted from my boot insecure image and reboot normally and all the sensors where ruined as expected
So I created another image and I mounted the userdata in another folder
and then I compared all the files that where changed using rsync after and before the boot with the insecure image.
I found a few extra files in the "after" image so I deleted them but the problem was not fixed.
I think that maybe the problem is related to folder/files permissions, attributes or extended attributes (like SElinux) that were changed and cannot be detected when comparing using rsync
Any ideas what might have been and what to do to fix it?
SOLVED:
Solution:
Apparently the problem was not in the userdata partition was in the persist partition. I solved by cloning a working persist partition from another Nexus 4.
I realized that something was wrong in the probably extended attributes in the file /persist/sensors/sns.reg since a
$ adb logcat
was giving this error:
W/sensors.qcom( 282): type=1400 audit(0.0:5): avc: denied { getattr } for path="/persist/sensors/sns.reg" dev="mmcblk0p20" ino=15 scontext=u:r:sensors:s0 tcontext=ubject_r:unlabeled:s0 tclass=file
So I fixed in this way:
First I downloaded a modified busybox dd from:
http://d-h.st/cFA
Don't use the default one it will ruin your partition:
I downloaded recovery-clockwork-touch-6.0.4.7-mako.img from:
http://download2.clockworkmod.com/recoveries/recovery-clockwork-6.0.4.7-mako.img
1) Then I booted from a recovery image like ClockWorkMod. With the phone in the bootloader:
$ fastboot boot recovery-clockwork-touch-6.0.4.7-mako.img
2) Created a ramdisk in the phone
$ adb shell mkdir /dev/ramdisk
$ adb shell mount -o size=1536M -t tmpfs tmpfs /dev/ramdisk
3) Copied dd to the phone
$ adb push dd /
$ adb shell chmod 755 /dd
4) Extract persist from the working phone
$ adb shell /dd if=/dev/block/mmcblk0 of=/dev/ramdisk/persist.img bs=4096 skip=34816 count=4096
5) Pull file to our PC
$ adb pull /dev/ramdisk/persist.img
6) Reboot working phone
$ adb reboot-bootloader
With our not working Nexus 4
Repeat steps 1 to 3
7) Push your persist image to the phone
$ adb push persist.img /dev/ramdisk/
8) Overwrite image
$ adb shell /dd if=/dev/ramdisk/persist.img of=/dev/block/mmcblk0 bs=4096 seek=34816 conv=notrunc
9) Wipe cache and dalvik cache
10) Reboot
Should be fixed if that was the problem

[MOD] Increase your SYSTEM partition to 2.5GB , Boot to 30MB , Recovery to 30MB for Y

Finally your and MY wait is over Hear @I Putu Tirta Agung S & @Annabathina are introducing that HOW TO INCREASE YUREKA / PLUS PARTITIONS ........
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I & @I Putu Tirta Agung S are not responsible for anything that may happen to your phone as a result of following this guide / installing custom roms and/or kernels. you do so at your own risk and take the responsibility upon yourself. ​​
NOTE : Please read hole thread before starting........
Preface
This guide has been tested to work on Lollipop and Marshmallow. By following this guide, you will resize your boot, system, cache, and recovery partition to the new partition size as can be seen below:
This guide is quite safe as it doesn't change the emmc GUID and its unique partitions GUID, which is hard coded into our Yureka's non-HLOS (High Level Operating System).
The Guides
Backing up important partitions ( Very very important )
Go to TWRP (please use the newest, or at minimal Abhishek's 3.0.1-0), and when you are in it run "adb shell" from your computer using " ADB+&+Fastboot of yureka " by " Hold shift key and right click on mouse and select Open command window here " then type below lines ONE BY ONE (remember to do it line by line)
Code:
[SIZE="4"]dd if=/dev/block/mmcblk0 of=/sdcard/gpt.bin bs=512 count=34
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/modem
adb shell dd if=/dev/block/mmcblk0p2 of=/sdcard/sbl1
adb shell dd if=/dev/block/mmcblk0p3 of=/sdcard/sbl1bak
adb shell dd if=/dev/block/mmcblk0p4 of=/sdcard/aboot
adb shell dd if=/dev/block/mmcblk0p5 of=/sdcard/abootbak
adb shell dd if=/dev/block/mmcblk0p6 of=/sdcard/rpm
adb shell dd if=/dev/block/mmcblk0p7 of=/sdcard/rpmbak
adb shell dd if=/dev/block/mmcblk0p8 of=/sdcard/tz
adb shell dd if=/dev/block/mmcblk0p9 of=/sdcard/tzbak
adb shell dd if=/dev/block/mmcblk0p10 of=/sdcard/hyp
adb shell dd if=/dev/block/mmcblk0p11 of=/sdcard/hypbak
adb shell dd if=/dev/block/mmcblk0p12 of=/sdcard/pad
adb shell dd if=/dev/block/mmcblk0p13 of=/sdcard/modemst1
adb shell dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst2
adb shell dd if=/dev/block/mmcblk0p15 of=/sdcard/misc
adb shell dd if=/dev/block/mmcblk0p16 of=/sdcard/fsc
adb shell dd if=/dev/block/mmcblk0p17 of=/sdcard/ssd
adb shell dd if=/dev/block/mmcblk0p18 of=/sdcard/DDR
adb shell dd if=/dev/block/mmcblk0p19 of=/sdcard/fsg
adb shell dd if=/dev/block/mmcblk0p20 of=/sdcard/sec
adb shell dd if=/dev/block/mmcblk0p22 of=/sdcard/params
adb shell dd if=/dev/block/mmcblk0p23 of=/sdcard/panic
adb shell dd if=/dev/block/mmcblk0p24 of=/sdcard/autobak
adb shell dd if=/dev/block/mmcblk0p26 of=/sdcard/persist[/SIZE]
Copy all files from internal storage (sdcard) to your computer, keep them safe as they are very important if something bad happens.
Doing the magic
Download and extract "gpt.zip" attached in this post, and copy the "gpt.bin" file to the root of your internal storage (internal sdcard).
1. Go back to TWRP and run "adb shell" again from your computer, then type:
2. Go back to TWRP and run "adb shell" again from your computer, then type:
dd if=/sdcard/gpt.bin of=/dev/block/mmcblk0 bs=512 count=34
Click to expand...
Click to collapse
3. After all done, reboot to your bootloader and flash your recovery (TWRP) by typing:
fastboot -i 0x1ebf erase recovery
fastboot -i 0x1ebf flash recovery TheNameofYourRecovery.img
Click to expand...
Click to collapse
4. After that, type below commands (remember to do it line by line):
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf erase boot
fastboot -i 0x1ebf format cache
fastboot -i 0x1ebf format userdata
fastboot -i 0x1ebf format system
fastboot -i 0x1ebf reboot-bootloader
fastboot -i 0x1ebf boot recovery
Click to expand...
Click to collapse
5. After booting to TWRP, wipe everything again (system, data, cache, dalvik, internal storage)
6. Reboot the phone to TWRP again.
7. Copy your original "params", "panic", "autobak", and "persist" files you backed up earlier to the root of your internal storage (internal sdcard) and run "adb shell" again from your computer, then type:
adb shell dd if=/sdcard/params of=/dev/block/mmcblk0p22
adb shell dd if=/sdcard/panic of=/dev/block/mmcblk0p23
adb shell dd if=/sdcard/autobak of=/dev/block/mmcblk0p24
adb shell dd if=/sdcard/persist of=/dev/block/mmcblk0p26
Click to expand...
Click to collapse
This step is very important, so don't miss it or you will hard bricked your god damn phone.
8. After all done, reboot to your bootloader and type again below codes (remember to do it line by line):
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf erase boot
fastboot -i 0x1ebf format cache
fastboot -i 0x1ebf format userdata
fastboot -i 0x1ebf format system
fastboot -i 0x1ebf reboot-bootloader
fastboot -i 0x1ebf boot recovery
Click to expand...
Click to collapse
After booting to TWRP, wipe everything again (system, data, cache, dalvik, internal storage)
9. Reboot the phone to TWRP again.
Troubleshooting
Wallah, now you have 2.5 GB of system partition, 150 MB (it will be usefull if you use f2fs file system) cache partition, 30 MB of recovery partition, 30 MB of boot partition, and around 11.77 GB of data partition.
Oh btw, if you flash "userdata.img" from COS or CM roms, you will get something similar to this:
target reported max download size of 268435456 bytes
erasing 'userdata'...
OKAY [ 8.440s]
sending 'userdata' (137434 KB)...
OKAY [ 5.164s]
writing 'userdata'...
FAILED (remote: image size too large)
finished. total time: 13.634s
Click to expand...
Click to collapse
Why? Because now your data partition is approximately 1.5 GB smaller. So just relax, if you got that kind of warning.
Furthermore, because a lot of devs use that ****in ".dat" files ****ty thing ("system.new.dat", "system.patch.dat" and "system.transfer.list"), if you flash their roms (such as CM, AICP, Exodus, bla bla bla), you will see that your partition will go back to its original value. But not to worry, it is not the real value of what is really use. It is because of the nature on how sparse ext4 image is compiled, they need to set the partition size before compiling, and of course they use the old one, not the one we have changed.
So to overcome this problem, you need to do it the hard way, explained in the second post below. However, if you don't want the hazzle then just flash AOSParadox or YuOS (the TWRP version, not the fastboot one) or Mokee or any rom that doen't have "system.new.dat", "system.patch.dat" and "system.transfer.list" in its zip file, as they will read the new partition size just fine.
ADB+&+Fastboot : link
Partition changer : link
Back up code PNG : link
Device Driver installation links
ADB for pc : link
YU usb drivers : link
PdaNet drivers : link
@I Putu Tirta Agung S MY friend for every thing ( NOTE : YOUR the best HACKER that I ever met )
@Annabathina
If you want the hard way in changing ROMs with ****in ".dat" files ****ty thing ("system.new.dat", "system.patch.dat" and "system.transfer.list") to read the new partition size, then you need Ubuntu with the latest kernel (that has the latest patch on "Transparent Compression", see this post), and follow these steps (thanks to xpirt for his guide):
Step 1 - Decompressing = DAT (sparse data) -> EXT4 (raw image)
We're now using sdat2img binary, the usage is very simple (make sure you have python 3.x installed):
Code:
./sdat2img.py <transfer_list> <system_new_file> <system_ext4>- <transfer_list> = input, system.transfer.list from rom zip
<system_new_file> = input, system.new.dat from rom zip
<system_ext4> = output ext4 raw image file
and a quick example of usage:
Code:
./sdat2img.py system.transfer.list system.new.dat system.img
by running this command you will get as output the file my_new_system.img which is the raw ext4 image.
Step 2 - Decompress EXT4 (raw image) -> OUTPUT folder -> Compress EXT4 (raw image)
Now we need to mount or ext4 raw image into an output folder so we can see apks/jars etc. To do this we need to type this command:
Code:
sudo mount -t ext4 -o loop system.img output/
As you can see there is a new folder called output which we can edit/modify/delete your files (not able to? see here)
Now we need to compress it back to a raw ext4 image, to do this we need the make_ext4fs binary. Make sure you have the file_contexts file (taken from the Rom zip) inside the make_ext4fs path. Then type this (got issues? see here).
Code:
/make_ext4fs -T 0 -S file_contexts -l 2684354560 -a system system_new.img output/
The value of 2684354560 in above code is the new size of system partition in Bytes. Upon doing the above processes, you will get the new raw ext4 image called 'system_new.img' ready for the next step.
Step 3 - Converting = EXT4 (raw image) -> DAT (sparse data)
Now we need the rimg2sdat binary, the usage is very simple:
Code:
./rimg2sdat <system_img>
<system_img> = name of input ext4 raw image file
and a quick example of usage:
Code:
./rimg2sdat my_new_system.img
As you can see the output is composed by system.transfer.list, (system.patch.dat) & system.new.dat, ready to be replaced inside your Rom zip.
Just to make it really simple
1. Fire up your beloved ubuntu, make sure you have python 3.x installed.
2. Download "sdat2img.py", "make_ext4fs", and "rimg2sdat" binaries, and put it inside a folder (use a file manager for god sake). We can name the folder "****inGreat".
3. Now make an empty folder inside "****inGreat" folder, and name it "output".
4. Extract "system.new.dat", "system.patch.dat", "system.transfer.list", and "file_contexts" from your beloved rom's zip file, and put it inside "****inGreat" folder.
5. Now open "****inGreat" folder with root privilege, then open terminal (we call it cmd in windows) from there.
6. type below code on the terminal (one line at a time):
Code:
./sdat2img.py system.transfer.list system.new.dat system.img (press enter)
sudo mount -t ext4 -o loop system.img output/ (press enter)
/make_ext4fs -T 0 -S file_contexts -l 2684354560 -a system system_new.img output/ (press enter)
./rimg2sdat my_new_system.img (press enter)
7. Now copy the new "system.new.dat", "system.patch.dat", "system.transfer.list", and "file_contexts" inside "****inGreat" folder back to your beloved rom's zip file.
8. Flash the rom via TWRP
9. And you are good to go.
10. Ain't that simple!!!!!!!!!!!!!
sdat2img.py
- github.com
make_ext4fs
- mega.co.nz
rimg2sdat
- mega.co.nz
@I Putu Tirta Agung S MY friend for every thing ( NOTE : YOUR the best HACKER that I ever met )
@Annabathina
Guys I have tested it for 5 times before posting
Thank to @I Putu Tirta Agung S for everything ​​
reserved
reserved for future post

Complete Backup using PC (before rooting)/Restore after (nougat)

No fancy stuff for now, this guide will be to the point.
We are going to use TWRP that mounts only data and cache and dd command to backup all partitions to external_sd
Things needed:
Unlocked honor 7x with twrpimgmount installed : Go here
A 16gb memory card
Instructions:
1. Reboot your phone to recovery and connect it to PC
2. Open cmd in pc and navigate to adb and fastboot dir (you did this when you flashed twrp using fastboot)
3. run following commands one at a time (wait till it back ups)
Code:
adb shell
dd if=/dev/block/mmcblk0p28 of=/external_sd/boot.img
dd if=/dev/block/mmcblk0p41 of=/external_sd/bootfail_info
dd if=/dev/block/mmcblk0p36 of=/external_sd/cache.img
dd if=/dev/block/mmcblk0p45 of=/external_sd/cust.img
dd if=/dev/block/mmcblk0p34 of=/external_sd/dfx
dd if=/dev/block/mmcblk0p30 of=/external_sd/dts
dd if=/dev/block/mmcblk0p5 of=/external_sd/fastboot
dd if=/dev/block/mmcblk0p4 of=/external_sd/frp
dd if=/dev/block/mmcblk0p27 of=/external_sd/fw_hifi
dd if=/dev/block/mmcblk0p3 of=/external_sd/fw_lpm3
dd if=/dev/block/mmcblk0p37 of=/external_sd/hisitest0
dd if=/dev/block/mmcblk0p38 of=/external_sd/hisitest1
dd if=/dev/block/mmcblk0p39 of=/external_sd/hisitest2
dd if=/dev/block/mmcblk0p20 of=/external_sd/misc
dd if=/dev/block/mmcblk0p31 of=/external_sd/modem_fw
dd if=/dev/block/mmcblk0p18 of=/external_sd/modem_om
dd if=/dev/block/mmcblk0p17 of=/external_sd/modem_secure
dd if=/dev/block/mmcblk0p10 of=/external_sd/modemnvm_backup
dd if=/dev/block/mmcblk0p6 of=/external_sd/modemnvm_factory
dd if=/dev/block/mmcblk0p11 of=/external_sd/modemnvm_img
dd if=/dev/block/mmcblk0p12 of=/external_sd/modemnvm_system
dd if=/dev/block/mmcblk0p21 of=/external_sd/modemnvm_update
dd if=/dev/block/mmcblk0p7 of=/external_sd/nvme
dd if=/dev/block/mmcblk0p8 of=/external_sd/oeminfo
dd if=/dev/block/mmcblk0p40 of=/external_sd/patch
dd if=/dev/block/mmcblk0p16 of=/external_sd/persist
dd if=/dev/block/mmcblk0p48 of=/external_sd/product
dd if=/dev/block/mmcblk0p29 of=/external_sd/recovery.img
dd if=/dev/block/mmcblk0p22 of=/external_sd/recovery2.img
dd if=/dev/block/mmcblk0p23 of=/external_sd/reserved2
dd if=/dev/block/mmcblk0p9 of=/external_sd/reserved3
dd if=/dev/block/mmcblk0p14 of=/external_sd/reserved4
dd if=/dev/block/mmcblk0p15 of=/external_sd/reserved5
dd if=/dev/block/mmcblk0p32 of=/external_sd/reserved7
dd if=/dev/block/mmcblk0p33 of=/external_sd/reserved8
dd if=/dev/block/mmcblk0p43 of=/external_sd/reserved9
dd if=/dev/block/mmcblk0p42 of=/external_sd/rrecord
dd if=/dev/block/mmcblk0p13 of=/external_sd/secure_storage
dd if=/dev/block/mmcblk0p26 of=/external_sd/sensorhub
dd if=/dev/block/mmcblk0p19 of=/external_sd/splash2.img
dd if=/dev/block/mmcblk0p44 of=/external_sd/system.img
dd if=/dev/block/mmcblk0p24 of=/external_sd/teeos
dd if=/dev/block/mmcblk0p25 of=/external_sd/trustfirmware
dd if=/dev/block/mmcblk0p49 of=/external_sd/userdata.img
dd if=/dev/block/mmcblk0p35 of=/external_sd/vbmeta
dd if=/dev/block/mmcblk0p47 of=/external_sd/vendor.img
dd if=/dev/block/mmcblk0p46 of=/external_sd/version
dd if=/dev/block/mmcblk0p1 of=/external_sd/vrl
dd if=/dev/block/mmcblk0p2 of=/external_sd/vrl_backup
How to restore? (consider we have to restore system)
1. Reboot to twprimgmount
2. Copy your backed up image to external_sd
3. Run following command
Code:
adb shell
dd if=/external_sd/system.img of=/dev/block/mmcblk0p44
Join Telegram group if you are willing to test latest stuff.
Note: You can also use the TWRP backup function to get a stock backup. Restore it using twrp to get back to stock
DO NOT UNNECESSARILY RESTORE ALL PARTITIONS, IT MAY BRICK YOUR 7X.
A script @skippotter to make all this easy (not tested by me)
Follow next:
1. Flash magisk 14.0 (I use this) or Super su
2. Use different region firmware without rebranding
Sudeep Duhoon said:
No fancy stuff for now, this guide will be to the point.
We are going to use TWRP and dd command to backup all partitions to external_sd
Things needed:
Unlocked honor 7x with twrp installed : Go here
A 16gb memory card
Instructions:
1. Reboot your phone to recovery and connect it to PC
2. Mount system read only when twrp asks you
3. Open cmd in pc and navigate to adb and fastboot dir (you did this when you flashed twrp using fastboot)
4. run following commands one at a time (wait till it back ups)
How to restore? (consider we have to restore system)
1. Reboot to twrp
2. Copy your backed up image to external_sd
3. Run following command
Follow next:
1. Flash magisk 14.0 (I use this) or Super su
2. Manually Update Your 7x (coming soon)
Click to expand...
Click to collapse
Thank u soo much
reserved, just in case (yeah i got late, still)
Sudeep Duhoon said:
reserved, just in case (yeah i got late, still)
Click to expand...
Click to collapse
I have a question because I think I may be missing something. I understand this is a complete backup to PC. But, if I have flashed twrp to recovery and recovery2, will this method still backup those original .imgs?
Milly7 said:
I have a question because I think I may be missing something. I understand this is a complete backup to PC. But, if I have flashed twrp to recovery and recovery2, will this method still backup those original .imgs?
Click to expand...
Click to collapse
No it won't, it'll backup twrp recovery instead
But you can get stock recoveries from here
https://forum.xda-developers.com/devdb/project/?id=23956#downloads
Just a note for anyone trying this, make sure your external_sd is formatted exFAT not FAT32 or any file over 4gb, (system.img and userdata.img for me) will fail.
Here is a batch file that will work on windows to run all the commands sequentially
Can anyone Backup Vendor,Version,Product and Cust.img for L21C432 and upload please?
Or have anyone a Full Stock Twrp Backup for L21C432?
@Sudeep Duhoon What's the total expected size of userdata.img while backing up?? I'm using a 16gb sd card and it's showing I/O error at first line but copying around 9gb successfully.
is unlocking bootloader necessary for this? can't we just boot twrp by "fastboot boot twrp.img" and make backup with cmd?
Mohan0004 said:
is unlocking bootloader necessary for this? can't we just boot twrp by "fastboot boot twrp.img" and make backup with cmd?
Click to expand...
Click to collapse
anyone? please
Sudeep Duhoon said:
No fancy stuff for now, this guide will be to the point.
We are going to use TWRP and dd command to backup all partitions to external_sd
Things needed:
Unlocked honor 7x with twrp installed : Go here
A 16gb memory card
Instructions:
1. Reboot your phone to recovery and connect it to PC
2. Mount system read only when twrp asks you
3. Open cmd in pc and navigate to adb and fastboot dir (you did this when you flashed twrp using fastboot)
4. run following commands one at a time (wait till it back ups)
Code:
adb shell
dd if=/dev/block/mmcblk0p28 of=/external_sd/boot.img
dd if=/dev/block/mmcblk0p41 of=/external_sd/bootfail_info
dd if=/dev/block/mmcblk0p36 of=/external_sd/cache.img
dd if=/dev/block/mmcblk0p45 of=/external_sd/cust.img
dd if=/dev/block/mmcblk0p34 of=/external_sd/dfx
dd if=/dev/block/mmcblk0p30 of=/external_sd/dts
dd if=/dev/block/mmcblk0p5 of=/external_sd/fastboot
dd if=/dev/block/mmcblk0p4 of=/external_sd/frp
dd if=/dev/block/mmcblk0p27 of=/external_sd/fw_hifi
dd if=/dev/block/mmcblk0p3 of=/external_sd/fw_lpm3
dd if=/dev/block/mmcblk0p37 of=/external_sd/hisitest0
dd if=/dev/block/mmcblk0p38 of=/external_sd/hisitest1
dd if=/dev/block/mmcblk0p39 of=/external_sd/hisitest2
dd if=/dev/block/mmcblk0p20 of=/external_sd/misc
dd if=/dev/block/mmcblk0p31 of=/external_sd/modem_fw
dd if=/dev/block/mmcblk0p18 of=/external_sd/modem_om
dd if=/dev/block/mmcblk0p17 of=/external_sd/modem_secure
dd if=/dev/block/mmcblk0p10 of=/external_sd/modemnvm_backup
dd if=/dev/block/mmcblk0p6 of=/external_sd/modemnvm_factory
dd if=/dev/block/mmcblk0p11 of=/external_sd/modemnvm_img
dd if=/dev/block/mmcblk0p12 of=/external_sd/modemnvm_system
dd if=/dev/block/mmcblk0p21 of=/external_sd/modemnvm_update
dd if=/dev/block/mmcblk0p7 of=/external_sd/nvme
dd if=/dev/block/mmcblk0p8 of=/external_sd/oeminfo
dd if=/dev/block/mmcblk0p40 of=/external_sd/patch
dd if=/dev/block/mmcblk0p16 of=/external_sd/persist
dd if=/dev/block/mmcblk0p48 of=/external_sd/product
dd if=/dev/block/mmcblk0p29 of=/external_sd/recovery.img
dd if=/dev/block/mmcblk0p22 of=/external_sd/recovery2.img
dd if=/dev/block/mmcblk0p23 of=/external_sd/reserved2
dd if=/dev/block/mmcblk0p9 of=/external_sd/reserved3
dd if=/dev/block/mmcblk0p14 of=/external_sd/reserved4
dd if=/dev/block/mmcblk0p15 of=/external_sd/reserved5
dd if=/dev/block/mmcblk0p32 of=/external_sd/reserved7
dd if=/dev/block/mmcblk0p33 of=/external_sd/reserved8
dd if=/dev/block/mmcblk0p43 of=/external_sd/reserved9
dd if=/dev/block/mmcblk0p42 of=/external_sd/rrecord
dd if=/dev/block/mmcblk0p13 of=/external_sd/secure_storage
dd if=/dev/block/mmcblk0p26 of=/external_sd/sensorhub
dd if=/dev/block/mmcblk0p19 of=/external_sd/splash2.img
dd if=/dev/block/mmcblk0p44 of=/external_sd/system.img
dd if=/dev/block/mmcblk0p24 of=/external_sd/teeos
dd if=/dev/block/mmcblk0p25 of=/external_sd/trustfirmware
dd if=/dev/block/mmcblk0p49 of=/external_sd/userdata.img
dd if=/dev/block/mmcblk0p35 of=/external_sd/vbmeta
dd if=/dev/block/mmcblk0p47 of=/external_sd/vendor.img
dd if=/dev/block/mmcblk0p46 of=/external_sd/version
dd if=/dev/block/mmcblk0p1 of=/external_sd/vrl
dd if=/dev/block/mmcblk0p2 of=/external_sd/vrl_backup
How to restore? (consider we have to restore system)
1. Reboot to twrp
2. Copy your backed up image to external_sd
3. Run following command
Code:
adb shell
dd if=/external_sd/system.img of=/dev/block/mmcblk0p44
Join Telegram group if you are willing to test latest stuff.
Follow next:
1. Flash magisk 14.0 (I use this) or Super su
2. Manually Update Your 7x
Click to expand...
Click to collapse
Hello
Is some one can send me only boot.img of honor 7x please?
My phone can't boot after some tests. I do all backups found here before root, and do some tests and now it is not booting. It freez at unlock bootloader screen (black with orange texts)
when i restore my backed boot.img to /dev/block/mmcblk0p28, it is not working too
twrp is working
thanks
Mohan0004 said:
anyone? please
Click to expand...
Click to collapse
yes it will work if you can boot TWRP
But this would still require an unlocked bootloader
someone in another huawei forum have said that booting TWRP was not working (maybe disabled in fastboot)
instead of sdcard can we make backup directly to pc (in adb folder), what will be command for those?
Someone have backup for L24 they can upload?
skippotter said:
Here is a batch file that will work on windows to run all the commands sequentially
Click to expand...
Click to collapse
I did it a bit smaller and more generic in case Huawei is going to add another 200 partitions ... but in general it is your approach.
#!/bin/sh
srcdir=/dev/block/platform/hi_mci.0/by-name
if [ $# -eq 0 ]; then
tgtdir=/wherever/you/want/to/store​else
tgtdir="$1"​fi
echo ${tgtdir}
ls -l ${srcdir} > "${tgtdir}/partitions.list"
if [ $? -ne 0 ]; then
echo "unable to read /dev folder ... probably you are not root?"
exit 1​fi
for a in `ls ${srcdir} | grep -v userdata`; do
b=`ls -l ${srcdir}/${a} | cut -f 2 -d '>' | cut -f 2 -d ' '`
echo $a points to $b
if [ "$(ls ${b} | wc -l)" == "1" ]; then
dd if="$b" of="${tgtdir}/${a}" bs=2048​ else
echo "$b for $a not found!"​ fi​done
tar -cvf ${tgtdir}/userdata.tar /data
ls ${tgtdir}
tlxxxsracer said:
Someone have backup for L24 they can upload?
Click to expand...
Click to collapse
I would like to know the same thing. I did the backup, but it turns out my system and usersata were 0 bytes. Could really use a L24 backup of those partitions if someone has it available please.
kindly help me please
Can someone post the link to complete backup of the phone , my phone is dead
I need the original system partition so that I can restore the original recovery and update for volte.
Thanks!
If I wish export storage to pendrive with OGT adapter, not need abd shell?
Can you help me about commands 'd use? 'll be possible from terminal emulator with root?
Thanks before!!!!

Categories

Resources