Related
So guys.
Here is my humble CWM recovery, tested on 7 inch. Nandroid backup seems to work and flashing also. External SD card is used for reading.
Mounting of card to USB is not working yet.
Colors are now really fixed, including refresh.
Select is also now fixed and short press is working.
I am not responsible if you make some bricks to build yourself a new house. Anyhow chances of bricking are quite low, worst case is that your recovery will not boot and that's it.
I suggest that you make backup of your recovery partition before you start with dd or whatever so that you can flash it back in case something is not ok.
To flash:
Code:
adb reboot bootloader
fastboot flash recovery recovery.img
fastboot reboot
and
Code:
adb reboot recovery
to get to recovery
In the archive is my /device folder if someone wants to play some more.
I got the CM9 ICS booting into Launcher!!!
One more in for future needs.
Great to have mate, thanks a lot for your work.
I'll tell these guys you have a working version for rhe 7",
http://forum.xda-developers.com/showthread.php?t=1473555
How can I backup? what do i have to type?
Thanks for your work!
You can make backup for example like this and if something fails you can flash it back directly in fastboot.
Code:
adb shell
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18
jakaka said:
You can make backup for example like this and if something fails you can flash it back directly in fastboot.
Code:
adb shell
su
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p18
Click to expand...
Click to collapse
That will actually write img's to the partitions.
Backup is done this way
Code:
dd if=/dev/block/mmcblk0p8 of=/sdcard/boot_backup.img
dd if=/dev/block/mmcblk0p18 of=/sdcard/recovery_backup.img
jakaka you have sources now on utkanos git. You can contact him if you need any help to make backup to internal sdcard work.
mobilx said:
That will actually write img's to the partitions.
Backup is done this way
Code:
dd if=/dev/block/mmcblk0p8 of=/sdcard/boot_backup.img
dd if=/dev/block/mmcblk0p18 of=/sdcard/recovery_backup.img
jakaka you have sources now on utkanos git. You can contact him if you need any help to make backup to internal sdcard work.
Click to expand...
Click to collapse
Sorry you are right with the backup, I wasn't looking.
mobilx said:
That will actually write img's to the partitions.
Backup is done this way
Code:
dd if=/dev/block/mmcblk0p8 of=/sdcard/boot_backup.img
dd if=/dev/block/mmcblk0p18 of=/sdcard/recovery_backup.img
jakaka you have sources now on utkanos git. You can contact him if you need any help to make backup to internal sdcard work.
Click to expand...
Click to collapse
Thanks!
Any progress on CM9?
Technically speaking You could probably contact MR Green from Cyanogen, He is in charge of the hp touchpad Which has the same qualcomm and adreno Chipset . Just an idea
Hi, I'm following your guide and the one in http://forum.xda-developers.com/showthread.php?t=1473555&page=1, but I seem to be stuck in the installation of CWM.
I succeded in rooting the Vodafone Smart Tab 10, as busybox tells so.
Then I issued this command:
C:\Users\...\android>fastboot flash recovery v10_cwmrecovery.img
sending 'recovery' (6214 KB)... OKAY
writing 'recovery'... OKAY
Rebooting the tablet in recovery mode always gets me to the Android System Recovery <3e>: wasn't I supposed to be shown the clockworkmod recovery system? If so, what am I doing wrong?
I also tried with Utkanos' v11a version, but with the same result...
Thanks to anyone who will help me
Bye
Marco
[SOLVED] I solved using the software downloaded from http://wwwen.zte.com.cn/endata/mobile/Italy/, as suggested here http://forum.xda-developers.com/showthread.php?t=1473555&page=59. Moreover, in that same thread (some days around the ones in page 59... ) I found a suggestion about removing some system files to avoid the loading of the stock kernel. I didn't do that, but in case anyone needs it, that could be another solution
This will Wipe every thing on the internal storage SO BACKUP your stuff on the SD card and maybe the onto computer too
This is for the Google edition of the Galaxy S4
Go To setting / about phone /
Tap "Build Number" 7 times
Go back to Main Settings Menu and under now shown "Developer Options" enable "USB debugging"
Download this
http://developer.android.com/sdk/index.html#download
extract to the C drive in the folder adb (you can move it anywhere just adjust the path)
run "SDK Manager.exe"
in the extras select "Google USB Drivers"
click "Install 1 package" and accept license / Install
now go into the device manager on you PC and change the "Samsung ADB driver" to the
"Android Composite ADB Interface" located in this folder
C:\adb\sdk\extras\google\usb_driver
you will have to force that driver to install by selecting it
let it finish installing the drivers
then
unplug and then plug in the USB on the phone
your phone will ask you about "Allow USB debugging?"
check the box "always allow from this computer"
click OK on your phone
If this doesn't work the some thing is wrong with the drivers and reinstall the drivers make sure you select "Android Composite ADB Interface" and not "Android ADB Interface"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot oem unlock <enter>
It will ask you to unlock you phone and this may void you warranty
Use the volume buttons to change to yes and the power button as enter
At this point everything gets wiped on your phone
The phone rebooted back into bootloader and it now said "bootloader=unlocked" and the bottom left of the screen
Reboot the phone and the unlock icon will appear on the 1st Google screen.
the phone will boot into android like it was new
I have not done any ODIN on my phone so i don't know how this affect it
I am trying to avoid ODIN and get the phone rooted and have a custom recovery on it.
I just did this on my phone and typed this up i think everything is accurate let me know if i need to adjust anything.
fyi the command "fastboot flash recovery recovery.img" don't work because the system is still secure boot enable.
Thanks and Questions
Thanks. Could you please tell where you found this info?
Also, I'm not that experienced and don't understand why this is necessary. Don't our GT-i9505G phones come with unlocked boot loader?
bsam55 said:
Thanks. Could you please tell where you found this info?
Also, I'm not that experienced and don't understand why this is necessary. Don't our GT-i9505G phones come with unlocked boot loader?
Click to expand...
Click to collapse
It still needs to perform fastboot oem unlock just like nexus device does
Sent using GT-i9505~
This is what i did on my galaxy nexus device (nexus 3) and my friend nexus one
I made this from my notes of the old devices
my experience is that i could mess up my phone and lock me out of it it, so i wanted to be sure i could fix it, that is why i did this
I did not try to use fastboot beforehand, so it could work.
but i have a feeling that the ODIN flash changed the bootloader (probably not)
but i have been screwed buy a odin flash messing with the bootloader on the vibrant( but for some reason there looked to be 3 bootloader on that device)
if some one want to try it
just put the ClockworkMod 6.0.3.3 recovery file the
C:\adb\sdk\platform-tools
adb reboot bootloader
fastboot boot recovery.img
this dose take 1 minute after the file is sent to reboot and load
I have tried TWRP but it don't load past the first screen.
This just boots into the file and doesn't change anything
access to the sd cards don't work
I am tempted to flash ClockworkMod but i would like to pull a copy of the recovery first.
BTW after paying $700 for a phone i want to be sure to be able to reinstall the OS, like on a PC.
warwolfx0 said:
This is what i did on my galaxy nexus device (nexus 3) and my friend nexus one
I made this from my notes of the old devices
my experience is that i could mess up my phone and lock me out of it it, so i wanted to be sure i could fix it, that is why i did this
I did not try to use fastboot beforehand, so it could work.
but i have a feeling that the ODIN flash changed the bootloader (probably not)
but i have been screwed buy a odin flash messing with the bootloader on the vibrant( but for some reason there looked to be 3 bootloader on that device)
if some one want to try it
just put the ClockworkMod 6.0.3.3 recovery file the
C:\adb\sdk\platform-tools
adb reboot bootloader
fastboot boot recovery.img
this dose take 1 minute after the file is sent to reboot and load
I have tried TWRP but it don't load past the first screen.
This just boots into the file and doesn't change anything
access to the sd cards don't work
I am tempted to flash ClockworkMod but i would like to pull a copy of the recovery first.
BTW after paying $700 for a phone i want to be sure to be able to reinstall the OS, like on a PC.
Click to expand...
Click to collapse
Maybe you can do a full dump for the community.
before you install custom recovery, I'd like to ask if you could do complete system dump of your device, including stock recovery (recovery.img), stock bootloader (boot.img) and system.img . It would be a big help to the community. You can do it simple after rooting with for example Motochopper exploit (described here http://whatswithtech.com/how-to-root-samsung-galaxy-s4/ )
Then something like this:
Code:
for gaining root access type: su
then:
copy BOOT -> dd if=/dev/block/mmcblk0p20 of=/sdcard/boot.img bs=4096
copy HIDDEN -> dd if=/dev/block/mmcblk0p27 of=/sdcard/hidden.img bs=4096
copy PARAM -> dd if=/dev/block/mmcblk0p19 of=/sdcard/param.bin bs=4096
copy RECOVERY -> dd if=/dev/block/mmcblk0p21 of=/sdcard/recovery.img bs=4096
copy SYSTEM -> dd if=/dev/block/mmcblk0p16 of=/sdcard/system.img bs=4096
Thanks a lot!
System Dump
Plus One on the system dump. There are a lot of knowledgeable people waiting to help as soon as they have this. I don't know enough to do it and did try CWM (which doesn't work, by the way.)
Hope you are able to help. Thanks
bmbm said:
before you install custom recovery, I'd like to ask if you could do complete system dump of your device, including stock recovery (recovery.img), stock bootloader (boot.img) and system.img . It would be a big help to the community. You can do it simple after rooting with for example Motochopper exploit (described here http://whatswithtech.com/how-to-root-samsung-galaxy-s4/ )
Then something like this:
Code:
for gaining root access type: su
then:
copy BOOT -> dd if=/dev/block/mmcblk0p20 of=/sdcard/boot.img bs=4096
copy HIDDEN -> dd if=/dev/block/mmcblk0p27 of=/sdcard/hidden.img bs=4096
copy PARAM -> dd if=/dev/block/mmcblk0p19 of=/sdcard/param.bin bs=4096
copy RECOVERY -> dd if=/dev/block/mmcblk0p21 of=/sdcard/recovery.img bs=4096
copy SYSTEM -> dd if=/dev/block/mmcblk0p16 of=/sdcard/system.img bs=4096
Thanks a lot!
Click to expand...
Click to collapse
cool thank i was looking for that info
Just i couldn't get su to work in adb
I have been able to get Supersu (also tried superuser) on the phone but it complains about the su binaries (busybox in superuser) not being installed i have tried to install it using the market app (which said i am rooted) but i get no popup on the system.
i might try a wipe to see if that fixed it. (i did flash root to the system so it should still be there after a wipe)
first root, then system dump
unless someone knows how to do a system dump without root? or temp root solution.
I will look into the motochopper later today
you don't need "su" to work in adb shell, if you run "adb root" and "adb remount" with a modified adbd binary (inside CWM for example) you will have root access.
pls try out this root zip I just made, maybe it will work
warwolfx0 said:
QUOTE]
DELETed
Click to expand...
Click to collapse
I have root
Thanks broodplank1337
download the root that "broodplank1337" made
and put it in "C:\adb\sdk\platform-tools" (this is my adb.exe folder)
Download ClockworkMod 6.0.3.3 NORMAL from below
http://forum.xda-developers.com/showthread.php?t=2359132&highlight=recovery
aka Miustone_CWM_flash-NORMAL.zip
extract the recovery.img to the folder "C:\adb\sdk\platform-tools"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot boot recovery.img (this takes 1min to load after the file is sent)
This will boot into ClockworkMod
goto "install zip"
goto "install zip from sideload"
in the cmd type
adb sideload root.zip
This sends to the phone and write to the phones Rom.
Now reboot and we have root without ODIN on a I9505G
BTW my file was missing busybox in the xbin i was playing around with "CWM-SuperSU.zip" as a base
It is kind of late so i may have missed some things in this write up.
Now off to the system dump.
I will repost this later as a new post to keep this clean.
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
warwolfx0 said:
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
Click to expand...
Click to collapse
can you please upload your system dump , thank you mate
warwolfx0 said:
Thanks broodplank1337
download the root that "broodplank1337" made
and put it in "C:\adb\sdk\platform-tools" (this is my adb.exe folder)
Download ClockworkMod 6.0.3.3 NORMAL from below
http://forum.xda-developers.com/showthread.php?t=2359132&highlight=recovery
aka Miustone_CWM_flash-NORMAL.zip
extract the recovery.img to the folder "C:\adb\sdk\platform-tools"
Now open up a command prompt (I did this as "run as administrator")
type "cd C:\adb\sdk\platform-tools" (or what ever the directory you extract your files)
enter this command
adb reboot bootloader <enter>
Once in bootloader,
In the command prompt type:
fastboot boot recovery.img (this takes 1min to load after the file is sent)
This will boot into ClockworkMod
goto "install zip"
goto "install zip from sideload"
in the cmd type
adb sideload root.zip
This sends to the phone and write to the phones Rom.
Now reboot and we have root without ODIN on a I9505G
BTW my file was missing busybox in the xbin i was playing around with "CWM-SuperSU.zip" as a base
It is kind of late so i may have missed some things in this write up.
Now off to the system dump.
I will repost this later as a new post to keep this clean.
Click to expand...
Click to collapse
I maybe wrong in this, but I have played with fastboot on my ex HTC device. the proper command to flash recovery is
Code:
fastboot flash recovery recovery.img
the proper command to flash kernel is
Code:
fastboot flash boot boot.img
with
Code:
fastboot boot recovery.img
, the recovery isn't permanent. it will be only be there for the current session. after rebooting, the stock recovery will overwrite the custom recovery. the same goes to kernel.
Sent from my GT-I9505 using Tapatalk 2
warwolfx0 said:
ok i had some issues with viewing the files on the phone
i moved them to the sdcard and then pulled them off the card on my pc using a "sd to usb"
dd if=/dev/block/mmcblk0p20 of=/storage/extSdCard/dump/boot.img bs=4096
dd if=/dev/block/mmcblk0p27 of=/storage/extSdCard/dump/hidden.img bs=4096
dd if=/dev/block/mmcblk0p19 of=/storage/extSdCard/dump/param.bin bs=4096
dd if=/dev/block/mmcblk0p21 of=/storage/extSdCard/dump/recovery.img bs=4096
dd if=/dev/block/mmcblk0p16 of=/storage/extSdCard/dump/system.img bs=4096
Is there any other mmcblk0p i should backup
and is there any issues with posting this info on this forum
so far this only has root
i did notice that clockworkmod did give me access to root but i couldn't find the sd card while fastbooting it.
I don't think that the whole bootloader is part of what i backup, I thought there was a sbl.bin that i need too.
Click to expand...
Click to collapse
NONE of this would pull anything of relation from the I9505G (except System - mmcblk0p16) as our partitions layout is completely different. And more so, it would softbrick your 9505 if you tried flashing.
Check out here - http://forum.xda-developers.com/showthread.php?t=2360346 - for a system dump from the i9505G. It has SYSTEM/BOOT/RECOVERY. Param and Hidden are both empty on our phones. This has already been used a couple times to cook roms for other S4 devices.
donovanbrock said:
NONE of this would pull anything of relation from the I9505G (except System - mmcblk0p16) as our partitions layout is completely different. And more so, it would softbrick your 9505 if you tried flashing.
Check out here - http://forum.xda-developers.com/showthread.php?t=2360346 - for a system dump from the i9505G. It has SYSTEM/BOOT/RECOVERY. Param and Hidden are both empty on our phones. This has already been used a couple times to cook roms for other S4 devices.
Click to expand...
Click to collapse
Since my backup might mess people up i am not going to post it.
but as a backup i will make a full backup of all the mmcblk0pxx file
dd if=/dev/block/mmcblk0pxx of=/storage/extSdCard/dump/mmcblk0pxx.img bs=4096
i think there is like 20 files
Those with a real I9505G google edition samsung, do u have an option in settings to always have the lightkeys light up when screen is on? The menu and the back key, that light up.
hmmm followed step bye step but phones boot loader is still locked
i do have Super User access tho
edit: fail on my part. everything worked smoothly! thanks man!
Hello. Please help me. Can I flash stock ROM GT-I9005 on my Google Edition phone GT-I9005G? Thank for answer
SnegovikRZN said:
Hello. Please help me. Can I flash stock ROM GT-I9005 on my Google Edition phone GT-I9005G? Thank for answer
Click to expand...
Click to collapse
no
How to flash without a pc (boot.img, recovery, hboot, radio, and more.
Disclamer: if your break your phone you did something wrong, it is your fault not mine.
Partition list
Download the file that you want to flash, rename it to what it is, ie recovery.img and put it on the root of your sdcard
Code:
su
dd if=/sdcard/"FILE_YOU_PUT_ON_SDCARD" of=/dev/block/"PARTITION_NUMBER"
Example
Code:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p43
Reboot and you are good to go!
You can also use 'cat'.
cat /sdcard/name_of_image.img > /dev/block/specific_image_partition_block
If anyone is rooted with the STOCK recovery (kitkat or lollipop -- doesn't matter) on the US version (LTE or wifi - doesn't matter), can you please pull a copy of your recovery image and make it available to me?
How to get it:
adb shell, su to root, and:
Code:
dd if=/dev/block/platform/sdhci-tegra.3/by-name/SOS of=/sdcard/recovery.img bs=4096
That will leave a "recovery.img" in the root of your internal storage.
(If someone has the one of the recovery packages from nvidia's website, it should also contain a recovery image.)
Thanks
Gary
garyd9 said:
If anyone is rooted with the STOCK recovery (kitkat or lollipop -- doesn't matter) on the US version (LTE or wifi - doesn't matter), can you please pull a copy of your recovery image and make it available to me?
How to get it:
adb shell, su to root, and:
Code:
dd if=/dev/block/platform/sdhci-tegra.3/by-name/SOS of=/sdcard/recovery.img bs=4096
That will leave a "recovery.img" in the root of your internal storage.
(If someone has the one of the recovery packages from nvidia's website, it should also contain a recovery image.)
Thanks
Gary
Click to expand...
Click to collapse
This is from the nVidia 1.2.1 OTA WIFI https://drive.google.com/file/d/0B2za6z4lr1pxSGZtR2IxeU9kSUE/view?usp=sharing
Code:
#include <disclaimer.h>
/*
* Your warranty is now.......(wait a minute)........still valid?
*
* I am not responsible for bricked devices.
* YOU are choosing to make these modifications, and if you point
* your finger at me for messing up your device, I will laugh at you.
*/
As we know that on flashing ROMs/kernels/other mods, we sometimes do some mistake or face some issues so it is always recommended to take backup.
But unfortunately, TWRP does not takes backup of all the partitions.
When you open/dev/block/bootdevice/by-name/ you can see the names of the partitions and there are a total of 48 partitions. Of course not every one of them is important to back up, but it's better to be safe than sorry.
This method has been tested on my Moto G4 Plus (XT1643) and all the parts are work on it (backup and restore both using zip file and batch file)
Here is the list to all those partitions along with their number/id (maybe that's what its called, please correct me if there's any mistake)
Code:
Number/ID Name
mmcblk0p1 modem
mmcblk0p2 fsc
mmcblk0p3 ssd
mmcblk0p4 sbl1
mmcblk0p5 sbl1bak
mmcblk0p6 rpm
mmcblk0p7 rpmbak
mmcblk0p8 tz
mmcblk0p9 tzbak
mmcblk0p10 hyp
mmcblk0p11 hypbak
mmcblk0p12 dsp
mmcblk0p13 modemst1
mmcblk0p14 modemst2
mmcblk0p15 DDR
mmcblk0p16 fsg
mmcblk0p17 sec
mmcblk0p18 aboot
mmcblk0p19 abootbak
mmcblk0p20 logs
mmcblk0p21 utags
mmcblk0p22 utagsBackup
mmcblk0p23 cid
mmcblk0p24 logo
mmcblk0p25 clogo
mmcblk0p26 metadata
mmcblk0p27 kpan
mmcblk0p28 boot
mmcblk0p29 recovery
mmcblk0p30 persist
mmcblk0p31 misc
mmcblk0p32 config
mmcblk0p33 limits
mmcblk0p34 mota
mmcblk0p35 devcfg
mmcblk0p36 dip
mmcblk0p37 syscfg
mmcblk0p38 cmnlib
mmcblk0p39 keymaster
mmcblk0p40 frp
mmcblk0p41 padC
mmcblk0p42 sp
mmcblk0p43 hw
mmcblk0p44 customize
mmcblk0p45 oem
mmcblk0p46 cache
mmcblk0p47 system
mmcblk0p48 userdata
modemst1 and modemst2 are your EFS (the IMEI which you see in settings). When we flash Stock ROM, we erase them with fastboot erase commands but they are regenerated with the help of persist, so never ever restore somebody else's persist on your device and always keep a backup of modemst1, modemst2 a.k.a EFS and persist.
@givitago has already made a backup script for all the partitions which can be found here: Complete Partition Backup Script, so huge thanx to him!
Q) So why create another thread?
A) Frankly speaking, this thread does the same work as the above-mentioned thread, but it also talks about restoring the backup.
Also, now you can back up the partitions with a TWRP flashable zip file and restore them too with a TWRP flashable zip too!
The backup and restore will be done using dd commands.
Those who are unaware of dd commands, it is generally used for converting files.
Here is the syntax for dd command (I have used colors so that it is easy to differentiate them):
Code:
[COLOR="Green"]su
dd[/COLOR] [COLOR="Blue"]if=/directoryName/fileName[SIZE="4"].[/SIZE]fileExtension[/COLOR] [COLOR="DeepSkyBlue"]of=/yourDirectoryName/yourFileName[SIZE="4"].[/SIZE]yourFileExtension[/COLOR]
directoryName is the generic name of the directory where the file (which we want to access) is present.
fileName is the generic name of the file which we want to access.
fileExtension is the generic file extension of the file which we want to access.
yourDirectoryName is the generic name of the directory where we will store the file.
yourFileName is the generic name of the file which we will store as backup.
yourFileExtension is the generic file extension of the file which we are taking a backup of.
And lastly, su because we will run these commands under root permissions.
This thread is divided into 2 parts, backup and restore.
We will be using .img extension for the backed up partitions.
Pre-requisites:
You must be on latest Stock ROM
You must be rooted (install Elemental-X kernel first and then flash Magisk otherwise you will have boot issues)
Terminal app or adb drivers in PC/Laptop
Official TWRP only (if you use adb in TWRP)
Note: The below commands are to be typed in a terminal app or adb shell.
Q) How to type in adb shell?
A) Open command prompt in the folder where you have adb and fastboot installed and type:
Code:
adb shell
Code:
su
This command it to get root access for the terminal/shell. Grant the root access and you will see that the $ symbol is replaced with# symbol which means that root access has been granted.
You can skip this command if you are using TWRP (although then you wouldn't be able to backup build.prop)
Note: The flashable zip files are attached as well as their link has been given. The rar files are the ones which contain the commands for backup/restore and also contains the batch file.
Its been a while since I have moved on to a newer device, and not remember quite a few things about the device. Here is something important to note:
echo92 said:
Just a thought, do you think it'd be worth stressing to users of the recovery script to ensure they do NOT include any of the bootloader partitions in their recovery folder? I've seen a couple of users hard brick their devices by attempting to flash older bootloader partitions accidentally ( luckily, now we've got a newer OPJ28.111-22 blankflash).
I think the partitions to avoid restoring are:
mmcblk0p4 sbl1
mmcblk0p5 sbl1bak
mmcblk0p6 rpm
mmcblk0p7 rpmbak
mmcblk0p8 tz
mmcblk0p9 tzbak
mmcblk0p10 hyp
mmcblk0p11 hypbak
mmcblk0p18 aboot
mmcblk0p19 abootbak
Possibly more if there are other critical partitions not accounted for.
Click to expand...
Click to collapse
This method won't backup/restore system, userdata and cache as they take up too much space and are reset on flashing Stock ROM again.
Part 1: Backup
Here are the list of commands which will be used to backup the partitions:
Code:
mkdir /sdcard/Athene_Partitions
dd if=/system/build.prop of=/sdcard/Athene_Partitions/build.prop
dd if=/dev/block/bootdevice/by-name/aboot of=/sdcard/Athene_Partitions/aboot.img
dd if=/dev/block/bootdevice/by-name/abootbak of=/sdcard/Athene_Partitions/abootbak.img
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/Athene_Partitions/boot.img
dd if=/dev/block/bootdevice/by-name/cid of=/sdcard/Athene_Partitions/cid.img
dd if=/dev/block/bootdevice/by-name/clogo of=/sdcard/Athene_Partitions/clogo.img
dd if=/dev/block/bootdevice/by-name/cmnlib of=/sdcard/Athene_Partitions/cmnlib.img
dd if=/dev/block/bootdevice/by-name/config of=/sdcard/Athene_Partitions/config.img
dd if=/dev/block/bootdevice/by-name/customize of=/sdcard/Athene_Partitions/customize.img
dd if=/dev/block/bootdevice/by-name/DDR of=/sdcard/Athene_Partitions/DDR.img
dd if=/dev/block/bootdevice/by-name/devcfg of=/sdcard/Athene_Partitions/devcfg.img
dd if=/dev/block/bootdevice/by-name/dip of=/sdcard/Athene_Partitions/dip.img
dd if=/dev/block/bootdevice/by-name/dsp of=/sdcard/Athene_Partitions/dsp.img
dd if=/dev/block/bootdevice/by-name/frp of=/sdcard/Athene_Partitions/frp.img
dd if=/dev/block/bootdevice/by-name/fsc of=/sdcard/Athene_Partitions/fsc.img
dd if=/dev/block/bootdevice/by-name/fsg of=/sdcard/Athene_Partitions/fsg.img
dd if=/dev/block/bootdevice/by-name/hw of=/sdcard/Athene_Partitions/hw.img
dd if=/dev/block/bootdevice/by-name/hyp of=/sdcard/Athene_Partitions/hyp.img
dd if=/dev/block/bootdevice/by-name/hypbak of=/sdcard/Athene_Partitions/hypbak.img
dd if=/dev/block/bootdevice/by-name/keymaster of=/sdcard/Athene_Partitions/keymaster.img
dd if=/dev/block/bootdevice/by-name/kpan of=/sdcard/Athene_Partitions/kpan.img
dd if=/dev/block/bootdevice/by-name/limits of=/sdcard/Athene_Partitions/limits.img
dd if=/dev/block/bootdevice/by-name/logo of=/sdcard/Athene_Partitions/logo.img
dd if=/dev/block/bootdevice/by-name/logs of=/sdcard/Athene_Partitions/logs.img
dd if=/dev/block/bootdevice/by-name/metadata of=/sdcard/Athene_Partitions/metadata.img
dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/Athene_Partitions/misc.img
dd if=/dev/block/bootdevice/by-name/modem of=/sdcard/Athene_Partitions/modem.img
dd if=/dev/block/bootdevice/by-name/modemst1 of=/sdcard/Athene_Partitions/modemst1.img
dd if=/dev/block/bootdevice/by-name/modemst2 of=/sdcard/Athene_Partitions/modemst2.img
dd if=/dev/block/bootdevice/by-name/mota of=/sdcard/Athene_Partitions/mota.img
dd if=/dev/block/bootdevice/by-name/oem of=/sdcard/Athene_Partitions/oem.img
dd if=/dev/block/bootdevice/by-name/padC of=/sdcard/Athene_Partitions/padC.img
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/Athene_Partitions/persist.img
dd if=/dev/block/bootdevice/by-name/recovery of=/sdcard/Athene_Partitions/recovery.img
dd if=/dev/block/bootdevice/by-name/rpm of=/sdcard/Athene_Partitions/rpm.img
dd if=/dev/block/bootdevice/by-name/rpmbak of=/sdcard/Athene_Partitions/rpmbak.img
dd if=/dev/block/bootdevice/by-name/sbl1 of=/sdcard/Athene_Partitions/sbl1.img
dd if=/dev/block/bootdevice/by-name/sbl1bak of=/sdcard/Athene_Partitions/sbl1bak.img
dd if=/dev/block/bootdevice/by-name/sec of=/sdcard/Athene_Partitions/sec.img
dd if=/dev/block/bootdevice/by-name/sp of=/sdcard/Athene_Partitions/sp.img
dd if=/dev/block/bootdevice/by-name/ssd of=/sdcard/Athene_Partitions/ssd.img
dd if=/dev/block/bootdevice/by-name/syscfg of=/sdcard/Athene_Partitions/syscfg.img
dd if=/dev/block/bootdevice/by-name/tz of=/sdcard/Athene_Partitions/tz.img
dd if=/dev/block/bootdevice/by-name/tzbak of=/sdcard/Athene_Partitions/tzbak.img
dd if=/dev/block/bootdevice/by-name/utags of=/sdcard/Athene_Partitions/utags.img
dd if=/dev/block/bootdevice/by-name/utags-Backup of=/sdcard/Athene_Partitions/utags-Backup.img
The first command mkdir is used to create a folder named "Athene_Partitions" in your /sdcard directory, where all the partitions will be saved.
There is also a command to back up build.prop
Note: /sdcard is the same as the Internal storage directory. Do not confuse it with micro Sdcard as it has its directory named as /external_sd
I have not included backup of system, userdata, and cache partitions (system and userdata have huge sizes)
All these commands will create a backup of all the partitions except system, userdata and cache.
You can simply copy and paste them on the terminal and it will execute all of the commands simultaneously one after the other.
I am attaching a .bat file and a .txt file which will basically do the same thing as typing or copy-pasting the above commands.
Note: Backup-Partitions.bat and Backup-Partitions.txt should be saved together in adb and fastboot folder, otherwise the .bat file won't work.
I have created a TWRP flashable zip file which will do the same task as above. Make sure you flash it in Official TWRP only (Unofficial TWRP will also work, but I was facing some problem while restoring the partitions which were backed up using Unofficial TWRP, so just a warning).
Downloads:
Link: https://www.androidfilehost.com/?fid=11410963190603873123
md5: 16b9b34c82ca0cd8674428145961abff
Part 2: Restore
Note: Make sure that you place only the partitions which you want to restore in Athene_Partitions(if its not there, create it and put all the partitions which you want to restore in that folder) folder in /sdcard directory. Its fine if you still run all the commands while restoring partitions, as it will just ignore the files which it didn't find.
If you are using TWRP to restore the partitions, make sure it Official TWRP only (Unofficial TWRP won't work because for some partitions it might reboot in between (It happened with me and I do not know which partitions are causing this (one of them is hw)) so just a warning)
Here are the commands
Code:
dd if=/sdcard/Athene_Partitions/build.prop of=/system/build.prop
dd if=/sdcard/Athene_Partitions/aboot.img of=/dev/block/bootdevice/by-name/aboot
dd if=/sdcard/Athene_Partitions/abootbak.img of=/dev/block/bootdevice/by-name/abootbak
dd if=/sdcard/Athene_Partitions/boot.img of=/dev/block/bootdevice/by-name/boot
dd if=/sdcard/Athene_Partitions/cid.img of=/dev/block/bootdevice/by-name/cid
dd if=/sdcard/Athene_Partitions/clogo.img of=/dev/block/bootdevice/by-name/clogo
dd if=/sdcard/Athene_Partitions/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib
dd if=/sdcard/Athene_Partitions/config.img of=/dev/block/bootdevice/by-name/config
dd if=/sdcard/Athene_Partitions/customize.img of=/dev/block/bootdevice/by-name/customize
dd if=/sdcard/Athene_Partitions/DDR.img of=/dev/block/bootdevice/by-name/DDR
dd if=/sdcard/Athene_Partitions/devcfg.img of=/dev/block/bootdevice/by-name/devcfg
dd if=/sdcard/Athene_Partitions/dip.img of=/dev/block/bootdevice/by-name/dip
dd if=/sdcard/Athene_Partitions/dsp.img of=/dev/block/bootdevice/by-name/dsp
dd if=/sdcard/Athene_Partitions/frp.img of=/dev/block/bootdevice/by-name/frp
dd if=/sdcard/Athene_Partitions/fsc.img of=/dev/block/bootdevice/by-name/fsc
dd if=/sdcard/Athene_Partitions/fsg.img of=/dev/block/bootdevice/by-name/fsg
dd if=/sdcard/Athene_Partitions/hw.img of=/dev/block/bootdevice/by-name/hw
dd if=/sdcard/Athene_Partitions/hyp.img of=/dev/block/bootdevice/by-name/hyp
dd if=/sdcard/Athene_Partitions/hypbak.img of=/dev/block/bootdevice/by-name/hypbak
dd if=/sdcard/Athene_Partitions/keymaster.img of=/dev/block/bootdevice/by-name/keymaster
dd if=/sdcard/Athene_Partitions/kpan.img of=/dev/block/bootdevice/by-name/kpan
dd if=/sdcard/Athene_Partitions/limits.img of=/dev/block/bootdevice/by-name/limits
dd if=/sdcard/Athene_Partitions/logo.img of=/dev/block/bootdevice/by-name/logo
dd if=/sdcard/Athene_Partitions/logs.img of=/dev/block/bootdevice/by-name/logs
dd if=/sdcard/Athene_Partitions/metadata.img of=/dev/block/bootdevice/by-name/metadata
dd if=/sdcard/Athene_Partitions/misc.img of=/dev/block/bootdevice/by-name/misc
dd if=/sdcard/Athene_Partitions/modem.img of=/dev/block/bootdevice/by-name/modem
dd if=/sdcard/Athene_Partitions/modemst1.img of=/dev/block/bootdevice/by-name/modemst1
dd if=/sdcard/Athene_Partitions/modemst2.img of=/dev/block/bootdevice/by-name/modemst2
dd if=/sdcard/Athene_Partitions/mota.img of=/dev/block/bootdevice/by-name/mota
dd if=/sdcard/Athene_Partitions/oem.img of=/dev/block/bootdevice/by-name/oem
dd if=/sdcard/Athene_Partitions/padC.img of=/dev/block/bootdevice/by-name/padC
dd if=/sdcard/Athene_Partitions/persist.img of=/dev/block/bootdevice/by-name/persist
dd if=/sdcard/Athene_Partitions/recovery.img of=/dev/block/bootdevice/by-name/recovery
dd if=/sdcard/Athene_Partitions/rpm.img of=/dev/block/bootdevice/by-name/rpm
dd if=/sdcard/Athene_Partitions/rpmbak.img of=/dev/block/bootdevice/by-name/rpmbak
dd if=/sdcard/Athene_Partitions/sbl1.img of=/dev/block/bootdevice/by-name/sbl1
dd if=/sdcard/Athene_Partitions/sbl1bak.img of=/dev/block/bootdevice/by-name/sbl1bak
dd if=/sdcard/Athene_Partitions/sec.img of=/dev/block/bootdevice/by-name/sec
dd if=/sdcard/Athene_Partitions/sp.img of=/dev/block/bootdevice/by-name/sp
dd if=/sdcard/Athene_Partitions/ssd.img of=/dev/block/bootdevice/by-name/ssd
dd if=/sdcard/Athene_Partitions/syscfg.img of=/dev/block/bootdevice/by-name/syscfg
dd if=/sdcard/Athene_Partitions/tz.img of=/dev/block/bootdevice/by-name/tz
dd if=/sdcard/Athene_Partitions/tzbak.img of=/dev/block/bootdevice/by-name/tzbak
dd if=/sdcard/Athene_Partitions/utags.img of=/dev/block/bootdevice/by-name/utags
dd if=/sdcard/Athene_Partitions/utagsBackup.img of=/dev/block/bootdevice/by-name/utagsBackup
Like earlier in Step 1, I have not included system, userdata and cache.
You can simply copy and paste them on the terminal and it will execute all of the commands simultaneously one after the other.
I am attaching a .bat file and a .txt file which will basically do the same thing as typing or copy-pasting the above commands.
Note: Restore-Partitions.bat and Restore-Partitions.txt should be saved together in adb and fastboot folder, otherwise the .bat file won't work.
I have created a TWRP flashable zip file which will do the same task as above. Make sure you flash it in Official TWRP only (Unofficial TWRP won't work because for some partitions it might reboot in between (It happened with me and I do not know which partitions are causing this (one of them is hw)) so just a warning).
Just like earlier, just place the partitions you want to restore in Athene_Paritions folder and the zip file will ignore the partitions which aren't present.
Downloads:
Link: https://www.androidfilehost.com/?fid=11410963190603873124
md5: cfd44f834b72342816c308e915791135
Also do note that some people who weren't able to flash hw.img after getting their device changed from Moto G4 Plus to Moto G4, the restoring part wouldn't work for you unless you skip restoring hw.img, but trying won't hurt.
reserved.
Heeth21 said:
reserved.
Click to expand...
Click to collapse
how can i restore system, userdata and cache if i had a 16 gb model? i haven`t enough free space to backup these big parts. :c
commands through termanal app works well, but i want to backup all 48 parts of the stock ROM.
change all "sdcard" to "way_to_my_sd_card" through Msoft Word (faster) and run the script in terminal app, but it crashes and reboot in the process.
vlrgamaley said:
how can i restore system, userdata and cache if i had a 16 gb model? i haven`t enough free space to backup these big parts. :c
commands through termanal app works well, but i want to backup all 48 parts of the stock ROM.
Click to expand...
Click to collapse
I too have 16 GB model. Its just not practically possible to take backup of all these partitions on internal storage.
System, user data and cache will be changed(first erased and then recreated) if you clean flash a Custom ROM.
And on flashing Stock ROM, you will always have them so there isn't much to worry about their backup.
However if you still insist on taking their backup, there are two ways,
0. Reboot to recovery
1. Take their backup in external sd card.
The commands will be:
Code:
su
dd if=/dev/block/bootdevice/by-name/cache of=/external_sd/cache.img
dd if=/dev/block/bootdevice/by-name/system of=/external_sd/system.img
dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/userdata.img
These commands will save them in your external sd card.
2. Take their backup in PC/Laptop and then convert them
The commands will be:
Code:
adb pull /dev/block/bootdevice/by-name/cache
adb pull /dev/block/bootdevice/by-name/system
adb pull /dev/block/bootdevice/by-name/userdata
These commands will save their copy in your adb folder (so make sure you have enough space in that drive)
These files will have no extension so while restoring them take care of file extensions, so if we want to save them as .img files, we will have to convert them.
Now there are two ways to convert them:
a. Using Command Prompt/Command Line:
In Windows as well as in Linux, their file checksum remains the same, so no worries!
Also, I have restored the converted file (which was converted in Windows) and they work just fine!
Make sure you are running the command prompt/command line from the same directory where your cache, userdata and system files are stored.
Code:
In windows:
ren cache cache.img
ren userdata userdata.img
ren system system.img
In Linux:
mv cache cache.img
mv userdata userdata.img
mv system system.img
b. Directly changing their extension by renaming them:
Just rename the files manually.
Code:
cache->cache.img
system->system.img
userdata->userdata.img
This will change their file extensions.
In Windows as well as in Linux, the checksum remains the same by this method.
Also, I have restored the converted file (which was converted in Windows) and they work just fine!
Though I would still recommend converting them via command prompt/command line!
Edit: If you are using adb pull, it will take time as userdata and system are big partitions, also not to ignore the quality of USB cable, so be patient, it will take a while!
Edit2: @vlrgamaley was your friend able to recover their IMEI, I saw you earlier post in other thread.
Edit2: @vlrgamaley was your friend able to recover their IMEI, I saw you earlier post in other thread.
Click to expand...
Click to collapse
he wrote on phone "persist" twrp backup from Lenovo forum (in ext4 format), and after that phone works. gsm, 3g and calls also works, but 4g isn`t work and imei = 0 is staying. but calls works, and that`s not bad in that situation.
i try to backup userdata on sd and it crashes and boot again and again :c strange.
vlrgamaley said:
he wrote on phone "persist" twrp backup from Lenovo forum (in ext4 format), and after that phone works. gsm, 3g and calls also works, but 4g isn`t work and imei = 0 is staying. but calls works, and that`s not bad in that situation.
i try to backup userdata on sd and it crashes and boot again and again :c strange.
Click to expand...
Click to collapse
He messed up his device for good now. He will never able to recover IMEI now, unless by editing persist.
Backup by rebooting in TWRP.
Heeth21 said:
He messed up his device for good now. He will never able to recover IMEI now, unless by editing persist.
Click to expand...
Click to collapse
i don`t know why he hurry up with that, but he did it and now no way to return)
Heeth21 said:
Backup by rebooting in TWRP.
Click to expand...
Click to collapse
backup userdata in TWRP? ok.
vlrgamaley said:
backup userdata in TWRP? ok.
Click to expand...
Click to collapse
Well, you could do that infact, as TWRP can backup data, system and cache.
If you want to take their backup in .img format, reboot your device in TWRP as TWRP has adb enabled by default and then follow post #6 (https://forum.xda-developers.com/showpost.php?p=78354296&postcount=6)
Heeth21 said:
Well, you could do that infact, as TWRP can backup data, system and cache.
If you want to take their backup in .img format, reboot your device in TWRP as TWRP has adb enabled by default and then follow post #6 (https://forum.xda-developers.com/showpost.php?p=78354296&postcount=6)
Click to expand...
Click to collapse
ooooooooo, hard for me lol) "adb not found" but adb is on (from cmd on windows), and now phone in recovery. what i did wrong? i so stupid, sry)
vlrgamaley said:
ooooooooo, hard for me lol) "adb not found" but adb is on (from cmd on windows), and now phone in recovery? what i did wrong? i so stupid, sry)
Click to expand...
Click to collapse
Make sure you open command prompt from inside the adb folder or direct the command prompt to adb directory.
Open the folder where adb is present, press shift button + mouse right click and then you will see some options like refresh, view, sort by, etc. Select "Open command prompt window here" or "Open powershell window here" or similar to that.
If you open command prompt, then just continue, and if you open powershell, then just type "cmd" and hit enter and then backup.
To check if your device is recognized by pc in adb mode, type "adb devices" and you will see the serial number for your device.
If you have any more questions, do ask, don't do anything stupid as dd commands are very powerful and a mistake could by costly!
Heeth21 said:
Well, you could do that infact, as TWRP can backup data, system and cache.
If you want to take their backup in .img format, reboot your device in TWRP as TWRP has adb enabled by default and then follow post #6 (https://forum.xda-developers.com/showpost.php?p=78354296&postcount=6)
Click to expand...
Click to collapse
very strange error.
vlrgamaley said:
very strange error.
Click to expand...
Click to collapse
Could you explain??
Heeth21 said:
Could you explain??
Click to expand...
Click to collapse
you can see it on attach picture. that command isn`t work and i haven`t backup file of "cache" in adb folder...
vlrgamaley said:
you can see it on attach picture. that command isn`t work and i haven`t backup file of "cache" in adb folder...
Click to expand...
Click to collapse
Sorry, I missed the screenshot. What version of TWRP are you using?? Please use official TWRP, as mentioned in OP. I am using official TWRP and it works fine for me.
Here is the link to Official TWRP: https://dl.twrp.me/athene/
Download the latest version (3.2.1.0) and save the twrp in your adb folder, reboot to bootloader mode and then flash it. Command:
Code:
fastboot flash recovery twrp-3.2.1-0-athene.img
.
Then reboot into recovery from fastboot itself by using volume keys and selecting recovery option
Here is a screenshot when I use adb pull:
Heeth21 said:
Sorry, I missed the screenshot. What version of TWRP are you using?? Please use official TWRP, as mentioned in OP. I am using official TWRP and it works fine for me.
Here is the link to Official TWRP: https://dl.twrp.me/athene/
Download the latest version (3.2.1.0) and save the twrp in your adb folder, reboot to bootloader mode and then flash it. Command:
.
Then reboot into recovery from fastboot itself by using volume keys and selecting recovery option
Here is a screenshot when I use adb pull:
Click to expand...
Click to collapse
i have official twrp 3.2.1 right now and boot into recovery from fastboot through volume keys)
but command in prompt isn't work) wtf?)
vlrgamaley said:
i have official twrp 3.2.1 right now and boot into recovery from fastboot through volume keys)
but command in prompt isn't work) wtf?)
Click to expand...
Click to collapse
Did you wipe cache?? Try the commands for system and userdata and check if they work.
And please attach a screenshot
Heeth21 said:
Did you wipe cache?? Try the commands for system and userdata and check if they work.
And please attach a screenshot
Click to expand...
Click to collapse
ok, now is night in Siberia, and i go to sleep. tomorrow (+12 hrs) i try and write here about results)
vlrgamaley said:
ok, now is night in Siberia, and i go to sleep. tomorrow (+12 hrs) i try and write here about results)
Click to expand...
Click to collapse
If you are okay with a twrp backup, then just backup data, system and cache from twrp and store them.