I searched everywhere but I couldn't find nowhere how to backup efs or persist partition, I just read the thread for twrp flashable stock oreo for moto g5 cedric and it says it is useful to backup them to save the phone in case of IMEI or VoLTE or 4G problems after the zip install but TWRP doesn't seems to backup them and online I didn't found guides.
EDIT:
To help people with the same problem I'll write here.
Thanks to TheFixItMan I've found the most easy solution which is to flash the TWRP 3.2.3-2 arm64 that has backup option for EFS and Persist, I'll quote here the answer with the link.
Use terminal commands to back up the partition - dd copy partition name to location
Or
Try this unofficial twrp and look at backup options
https://drive.google.com/open?id=1ML...yBHyg81cHdW1cB
Click to expand...
Click to collapse
Use terminal commands to back up the partition - dd copy partition name to location
Or
Try this unofficial twrp and look at backup options
https://drive.google.com/open?id=1MLlljM7BzMj9Da57LeyBHyg81cHdW1cB
TheFixItMan said:
Use terminal commands to back up the partition - dd copy partition name to location
Or
Try this unofficial twrp and look at backup options
https://drive.google.com/open?id=1MLlljM7BzMj9Da57LeyBHyg81cHdW1cB
Click to expand...
Click to collapse
So the command I should use is:
Code:
dd copy persist to <location dir>
?
Should I use this on twrp Advanced > Terminal?
Are unofficial twrp safe?
OnionMaster03 said:
So the command I should use is:
Code:
dd copy persist to <location dir>
?
Should I use this on twrp Advanced > Terminal?
Are unofficial twrp safe?
Click to expand...
Click to collapse
The command should look something like this - not tried it and don't own this device
Code:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Yes enter it in twrp terminal - once done it will output persist.img to sdcard
To copy back just reverse the if and of parts of the command
Unofficial twrps are perfectly safe - all official builds that aren't build by twrp start off as unofficial and are just submitted to their repo to become official
You can always flash what ever recovery you want after
The one I gave I think has the backup option for persist - if not just try the terminal command
OP, did you try the command? I'd like to backup mine as well
same question here! any updates?
EDIT: Managed to do it myself. I ended up pulling up the image through adb.
For all of you who are still wondering all I did is start adb and type the following:
adb pull /persist C:\platform-tools/persist.img
Click to expand...
Click to collapse
Substitute C:\platform-tools with your local folder.
You can also use the code provided in the thread, but If you wanna retrieve the file, you should copy it to /external_sd instead of microsd (also you can do it from the adb shell instead of the twrp terminal, which is more convenient).
persist backup and restore - 9008 mode
maybe this tool is useful too...
works in 9008 mode and has some firehose-loaders inside
moto g5 has qualcomm 8937 chipset, so should work...
https://mega.nz/#!dIcE0ApR!DEZIBxdxCqVEVRZRKevRr_Z_EXMF1I1PCJb-k7wvyGc
BR
1rdc said:
OP, did you try the command? I'd like to backup mine as well
Click to expand...
Click to collapse
I haven't tried this yet, I'm going to do in the next hours
Related
I have seen several of threads asking about how to recover data from a phone that has a broken display.
Backing up a phone with broken display
Prerequisites
Rooted phone with broken display/digitizer/etc. Display is nonfunctional for whatever reason.
ADB for your platform. Downloads for Windows, Mac, and Linux can be found at my dev-host.
Drivers installed (Windows), rules file set up (Linux + Mac). Drivers for windows can be found here. Rules file for Linux can be found here.
Recovery file attached to this post. (twrp.img)
External sdcard with at least 2 GB free space inserted in your broken phone.
openrecoveryscript.txt file attached to this post.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Backing up your broken device
Extract the ADB zip somewhere convenient.
Move the twrp.img recovery file into the ADB extracted directory.
Move the openrecoveryscript.txt file into the ADB directory.
Open a command prompt / terminal window in the ADB directory.
Windows: Windows Key + R => Type in "cmd" then click "RUN".
Linux: Open a terminal window by selecting it from your applications.
ALL:
Code:
cd /path/to/ADB/directory
Pull the battery from your phone, place it back in and boot into recovery (VolUp + Home + Power).
Connect your phone to your computer
Make sure that the following command returns "XXXXXX recovery" before proceeding to the next step.
Code:
./adb devices
Expected output:
Code:
List of devices attached
XXXXXXX recovery
Now to install TWRP recovery to your device. Type the following commands ( after each line). Linux users: Make sure you prepend each command with "./", as in "./adb ...". ALL Make sure you type the commands in CAREFULLY.
Code:
adb push twrp.img /tmp/twrp.img
adb shell dd if=/tmp/twrp.img of=/dev/block/mmcblk0p18
Wait until the last command above returns an output similar to below before proceeding to the next step:
Code:
12916+0 records in
12916+0 records out
6612992 bytes (6.3MB) copied, 1.094278 seconds, 5.8MB/s
Now pull your phones battery and reboot into recovery once again.
Run the following command to make sure your phone has booted into recovery completely.
Code:
adb devices
Expected output
Code:
List of devices attached
XXXXXXX recovery
Type the following to set up a script that will backup your phone to your external sdcard.
Code:
adb push openrecoveryscript.txt /cache/recovery/openrecoveryscript
Reboot your phone once more. This time, TWRP will begin backing up your ROM.
Wait for the backup to finish. You will know it is finished when you feel your phone reboot once more.
Optionally, you can check the state of your backup by running the following command and reading the last couple lines of it's output.
Code:
adb shell cat /tmp/recovery.log
Click to expand...
Click to collapse
Click to expand...
Click to collapse
That's it! Your entire system (/system, /data, /cache, and boot) will be backed up to your external sdcard. Just pop the sdcard in your replacement phone and you're good to go.
Enjoy and donate to the TWRP devs! This would not be possible if TWRP did not use the OpenRecoveryScript scripting engine!
Or you can use skip's unified toolkit.
I literally just used it. Moving the backup to my new device right now.
loserskater said:
Or you can use skip's unified toolkit.
I literally just used it. Moving the backup to my new device right now.
Click to expand...
Click to collapse
Whatever floats your boat :good:
Sorry, had to
Sent from my SGH-I747 using Tapatalk 2
Actually, this process might directly meet my needs.
You mentioned that the recovery image and script were attached to the initial post, though I must be missing something in that I don't see where they might be. Perhaps you could offer a pointer, please?
- ooofest
Ah sorry, you can find the files here
http://forum.xda-developers.com/showthread.php?t=2353828
Don't use the twrp.img from there though...go to the twrp website and download the latest .img file for your phone (d2att)
Sent from my S3 on Sense 5 (you jelly?)
CNexus said:
Ah sorry, you can find the files here
http://forum.xda-developers.com/showthread.php?t=2353828
Don't use the twrp.img from there though...go to the twrp website and download the latest .img file for your phone (d2att)
Click to expand...
Click to collapse
Thanks - I downloaded the appropriate files, but wonder if this can be used on a stock phone.
That is, I was able to push twrp.img to /tmp/twrp.img, but cannot write in the next step:
Code:
adb shell dd if=/tmp/twrp.img of=/dev/block/mmcblk0p18
/dev/block/mmcblk0p18: cannot open for write: Permission denied
This is a stock AT&T phone, in recovery mode, never been rooted.
- ooofest
You need to be rooted for this to work.
CNexus said:
You need to be rooted for this to work.
Click to expand...
Click to collapse
Ya know . . . I need to read things more carefully. Was so excited to see something that might possibly help. Sorry about that.
It's been awhile since I looked into rooting the Galaxy S III and will look around, but don't recall that this can be rooted from recovery, unfortunately. And, it seems that USB Debugging is not turned on when it boots to the lockscreen.
Hm.
- ooofest
I'm currently working on setting up a number of 2013 N7 LTEs (in the several hundred range, with possibly more to follow) with a specific set of apps. I'd really like to reduce the actual human interaction involved to a minimum (USB debugging activation at the start if possible) so I've been looking at fastboot flashing. Is it at all possible to clone the /userdata partition on a Nexus 7 to a .img file?
I've tried using dd and cat from the adb shell, and those all fail as they tend to copy the masses of empty space into the clone. I've also tried generating zips of the applications & their data using ZIPme, but that means having to manually enter the recovery (which, if there is no alternative, I am willing to do). ZIPme seems to have an issue with KitKat though, so I do wonder if anyone knows of any alternatives?
Older versions of CWM used to be img based.
The imgs it generated were essentially flashable via fastboot as they're the same filesystem as the original partition that was nandroided.
It's a lot of work (if you're not already set up to compile recoveries), but you could try reenabling the no longer used img nandroid code in CWM
-----------------------------------
Will the users have any kind of store access? (play/amazon/whatever)
If you hand out the same /data images and also go though first setup for the users, they could all end up with the same android ID.
Settings.Secure | Android Developers: #ANDROID_ID
The docs state that it's generated per user, so if you force them to all do initial setup themselves this isnt an issue.
If you dont care that they all have the same ID then you can ignore it.
Interesting. Do you know when/at what version they moved from away from the flashable img files? I'm going to go digging but if you can give me a hint it would be very much appreciated
The end user is going to be sent straight into a kiosk app to prevent them from hacking about with the device, so luckily I won't need to worry about the Play issue!
It was around the jump from CWM 5.0 -> 6.0, they added .dup and removed .img.
I cant tell you if it's worth your time to actually build your own rec with it reenabled, just pointing out the fact CWM used to do it in the past.
Adb has a backup and restore option, try looking into that maybe
http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351
Hi
I'm too interested in backup up the nexus partitions in fastboot flashable .img(s) to clone multiple Nexus for museum application(around 40 tablets)
I successfully grab system.img, boot.img, recovery.img from a "master" pre-configured rooted Nexus with:
Code:
adb shell dd if=... > c:\backup\....img
But dumping the userdata partition give me a 13gb file (with unfortunately the unused space) that doesn't seem to work when flashing...
The cloned tablet don't keep user setting/apps :\
Here how I do it:
MASTER:
- Fastboot oem unlock
- Setup tablet(root, install CWM, install apps, change setting, setup WIFI, change home app)
- Reboot in recovery for adb:
Code:
adb shell dd if=/dev/block/platform/msm_sdcc.1/by-name/system > c:\backup\system.img
adb shell dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery > c:\backup\recovery.img
adb shell dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata > c:\backup\userdata.img
adb shell dd if=/dev/block/platform/msm_sdcc.1/by-name/boot > c:\backup\boot.img
CLONED:
Code:
fastboot oem unlock
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot format cache
fastboot oem lock
But like I said, it doesn't work, still get the initial setup( language selection/setup tablet) and lost wifi setting and apps...
Found this old article that used the now removed ability of CWM to backup in .img
http://aigarius.com/blog/2012/09/23/cloning-or-pre-configuring-a-batch-of-android-phones/
Any thoughts, suggestions will be greatly appreciated, thanks.
I had an Lg G3 D855 32Gb with V10a.
I applied root with purpledrake and I installed TWRP recovery.
By a mistake I made an OTA update that cause bootloop.
After wipe cache and use this command:
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/fota
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc
my LG G3 restarts with V10a firmware, but with different WiFi Mac Address.
1) I try to restore my backup made with TWRP;
2) I restore only modem (from backup I made with this command with adb shell:
adb shell
su
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/sdcard/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/sdcard/modemst2.img)
using adb shell;
3) I try to restore that two img using terminal command shell in TWRP;
4) I try to restore my LG G3 to stock using LG PC Suite restore
but WiFI Mac Address remain different from the original one!
Can you help me to restore original Mac Address?
Thanks!
Enter download mode and flash stock firmware?
Isn't it the same with LGSuite "restore after bad update"???
If not, where can I find the correct firmware for my phone?
Can you explain me?
[Guide] LG G3 Stock Firmware (Go Back to Stock)
aparty said:
I had an Lg G3 D855 32Gb with V10a.
....
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/misc
...
Thanks!
Click to expand...
Click to collapse
You destroyed your misc partition, which held your wifi and bt mac's + region info. Which guide did you follow? Who's stupid enough to offer people to wipe phone-unique partition?..
No, it is not recoverable unless you have a backup (or access to LG's service tools).
You can ask someone to send their misc to you, then edit region/imei/mac's information via hex editor.
YaDr said:
You destroyed your misc partition, which held your wifi and bt mac's + region info. Which guide did you follow? Who's stupid enough to offer people to wipe phone-unique partition?..
No, it is not recoverable unless you have a backup (or access to LG's service tools).
You can ask someone to send their misc to you, then edit region/imei/mac's information via hex editor.
Click to expand...
Click to collapse
I made a complete backup with TWRP when I installed it.
Can I use that backup to recover that info, now?
If so, can you explain me how?
Thanks!
aparty said:
I made a complete backup with TWRP when I installed it.
Can I use that backup to recover that info, now?
If so, can you explain me how?
Thanks!
Click to expand...
Click to collapse
No, you can't. TWRP backup doesn't contain misc patition.
YaDr said:
No, you can't. TWRP backup doesn't contain misc patition.
Click to expand...
Click to collapse
No way to solve?
Can you explain me better how to edit a different partition?
Imei didn't change. Only Wifi Mac Address.
YaDr said:
No, you can't. TWRP backup doesn't contain misc patition.
Click to expand...
Click to collapse
can you share your misc partition? I really want to fix my generic mac address (00:90:4c:c5:12:38) but I have no idea which area to edit since i cant find the address in hex editor.
right now I only have temporary fix by changing my mac address from /data/misc/wifi but it wouldn't stick after reboot. If its too much, maybe just point me where to edit the partition? thanks!
if i add some files or remove or add or everything it's just like it's read only, tried with 3 different root capable file manager and nothing, why?
double
has
Code:
fastboot flashing unlock_critical
something to do with that?
Root cannot modify vendor partition, you will need to either manually modify and create a vendor.img or push the modification thru recovery (twrp)..
Twrp or DD command is your best options.
loonycgb2 said:
Root cannot modify vendor partition, you will need to either manually modify and create a vendor.img or push the modification thru recovery (twrp)..
Twrp or DD command is your best options.
Click to expand...
Click to collapse
twrp doesn't work for lgg7 because encryption, already tried, how to use dd?
Hello fellas
i just unlocked my poco f3 and i have a habit with xiaomi devices to take backup of my EFS and persist partitions
i already done with persist partition but i cannot do for efs using this command >>
dd if=/dev/block/mmcblk0p10 of=/sdcard/modemst1.bin bs=512
dd if=/dev/block/mmcblk0p11 of=/sdcard/modemst2.bin bs=512
always end no such a directory
advice needed
thanks in advance
I haven't heard anyone talk of backing up the EFS partition. Are you sure it still exists?
Robert314 said:
I haven't heard anyone talk of backing up the EFS partition. Are you sure it still exists?
Click to expand...
Click to collapse
AS I Know EFS partition is important because it has the imei so good to back it up
i thought it can be back it up via termux but i cannot so i did via twrp and save the img in my PC in case something went wrong
be safe better than regretting
Antidote03 said:
AS I Know EFS partition is important because it has the imei so good to back it up
i thought it can be back it up via termux but i cannot so i did via twrp and save the img in my PC in case something went wrong
be safe better than regretting
Click to expand...
Click to collapse
Cheers dude, backing up EFS is something i always do too, you just reminded me on my poco!!
Antidote03 said:
Hello fellas
i just unlocked my poco f3 and i have a habit with xiaomi devices to take backup of my EFS and persist partitions
i already done with persist partition but i cannot do for efs using this command >>
dd if=/dev/block/mmcblk0p10 of=/sdcard/modemst1.bin bs=512
dd if=/dev/block/mmcblk0p11 of=/sdcard/modemst2.bin bs=512
always end no such a directory
advice needed
thanks in advance
Click to expand...
Click to collapse
Antidote03 said:
AS I Know EFS partition is important because it has the imei so good to back it up
i thought it can be back it up via termux but i cannot so i did via twrp and save the img in my PC in case something went wrong
be safe better than regretting
Click to expand...
Click to collapse
Hi,
I'm also used to backup EFS and persist partitions, via terminal emulator. I got my F3 and am waiting to unlock BL. But I don't know much about these A/B partitions...
You said you already backed up your persist partition, but may I ask how exactly ?
=> after grant su rights : dd if=/dev/block/[what-name ??]/persist of=/sdcard/persist.img
So could you please tell me what I dont know about this device ([what-name?]) ?
And about the EFS backup, what's the command prompt ? Usually, I did so :
=> dd if=/dev/block/[sdf1 ??] of=/sdcard/modemst1.bin bs=512
dd if=/dev/block/[sdf2 ??] of=/sdcard/modemst2.bin bs=512
But it seems it doesn't work... So you say you did it trough recovery, how please, only backup EFS partition ? Are the actual TWRP working to restore it, not sure someone already tried ??
Thanks very much !
néonaloj said:
Hi,
I'm also used to backup EFS and persist partitions, via terminal emulator. I got my F3 and am waiting to unlock BL. But I don't know much about these A/B partitions...
You said you already backed up your persist partition, but may I ask how exactly ?
=> after grant su rights : dd if=/dev/block/[what-name ??]/persist of=/sdcard/persist.img
So could you please tell me what I dont know about this device ([what-name?]) ?
And about the EFS backup, what's the command prompt ? Usually, I did so :
=> dd if=/dev/block/[sdf1 ??] of=/sdcard/modemst1.bin bs=512
dd if=/dev/block/[sdf2 ??] of=/sdcard/modemst2.bin bs=512
But it seems it doesn't work... So you say you did it trough recovery, how please, only backup EFS partition ? Are the actual TWRP working to restore it, not sure someone already tried ??
Thanks very much !
Click to expand...
Click to collapse
i used these
Backup E.F.S. and modem partitions for Android devices
How to backup, restore E.F.S. and modem? **This guide should work for any android device that manufactured in recent years.** E.F.S. is a crucial partition for Android devices as well as persist partition, which it stores all the important data for I.M.E.I. and I.M.S.I. numbers, W.I.F.I. and...
telegra.ph
https://www . youtube . com/watch?v=NQSAeZO7DaE&ab_channel=munchy
https://www . youtube . com/watch?v=rfAry7YpuCc&ab_channel=munchy
Do not forget remove the space in youtube links
Don't think youtube video's are banned from XDA, here's the links...
First one
And here for the second video from above (post 6)
Hi
Thanks to both of you @Antidote03 and @reg66 !!
I do know this guy's videos, wich are often great indeed.
But.. I like to know what I'm doing, so downloading his script is not my goal.. What I'd like to know is what are the exact command lines to get these backups on my side, using fastboot commands.
As I mentioned I do have what I think is some parts of the commands, but it lacks some info. To show them again :
- persist backup :
"dd if=/dev/block/[what-name ??]/persist of=/sdcard/persist.img"
but what should I replace as [what-name?] ??
- EFS backup :
"dd if=/dev/block/[sdf1 ??] of=/sdcard/modemst1.bin bs=512"
"dd if=/dev/block/[sdf2 ??] of=/sdcard/modemst2.bin bs=512"
In this case, the video shows more to be written that the part I'm wondering what I'd need for this device... (between .../block/..??../[sdf1-2 ??]/...)
Many thanks to all who could help me out !!