Hey guys! I was doing some forum surfing and I heard about this image called persist.img. I found out that it's specific to each device and you lose widevine if you flash a generic one. So I have 2 questions to ask you guys.
1. If I have a backup of my own persist.img, can I flash it and not lose widevine?
2. How do I actually back up the image?
Thanks on advance guys! ⊂((・▽・))⊃
1. not sure honestly, but I backup anyway to try if it does when time comes.
(Root is needed)
From computer:
adb shell dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
adb pull /tmp/persist.img persist.img
Or from phone from terminal emulator;
su
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Make a copy of this to somewhere else(drive/pc etc).
Not completely sure about restoring it, I think you can just flash it via fastboot.
Lossyx said:
1. not sure honestly, but I backup anyway to try if it does when time comes.
(Root is needed)
From computer:
adb shell dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
adb pull /tmp/persist.img persist.img
Or from phone from terminal emulator;
su
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Make a copy of this to somewhere else(drive/pc etc).
Not completely sure about restoring it, I think you can just flash it via fastboot.
Click to expand...
Click to collapse
That's great! Thanks for the help
Hey. How can we backup it without root?
Lossyx said:
1. not sure honestly, but I backup anyway to try if it does when time comes.
(Root is needed)
From computer:
adb shell dd if=/dev/block/bootdevice/by-name/persist of=/tmp/persist.img
adb pull /tmp/persist.img persist.img
Or from phone from terminal emulator;
su
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Make a copy of this to somewhere else(drive/pc etc).
Not completely sure about restoring it, I think you can just flash it via fastboot.
Click to expand...
Click to collapse
where can i find the persist.img file in the device ? i search using google files app and it wasnt there.
Kagetane Hiruko said:
where can i find the persist.img file in the device ? i search using google files app and it wasnt there.
Click to expand...
Click to collapse
There is a app from play store called partitions backup it shows all partitions including persist and let's u make a copy for back up
hammered58 said:
There is a app from play store called partitions backup it shows all partitions including persist and let's u make a copy for back up
Click to expand...
Click to collapse
Needs root though.
You could do an msmtool readback i think it's called using msmtool. to backup without root. you do need windows for it though.
Related
I bought a Moto G(XT1031) last week. I rooted it, and before removing any system apps, created a backup in TWRP of the system and boot partitions.
Now, I have the 8GB model(couldn't find a 16GB one cheap enough) and so I would like to create a .img of the system and boot partitions. I still have the TWRP backup, however I want to remove it from my phone as it's eating up almost a GB of precious space.
I've seen some assorted stuff on how to pull .img files from the phone, but I' m not sure which ones will work with mine. Any help would be appreciated!
You could use: adb pull /sdcard/TWRP c:/MotoG_Backup/TWRP
Now you can delete that folder from phone.
Then if you want to restore TWRP Backup: adb push c:/MotoG_Backup/TWRP /sdcard/TWRP/
Alternatively:
ADB Dumping Methods: *ROOT REQUIRED*
You need to grant the SuperSU permission popup that will appear on your phone.
System:
adb shell su -c "dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img"
adb pull /sdcard/system.img
lost101 said:
You could use: adb pull /sdcard/TWRP c:/MotoG_Backup/TWRP
Now you can delete that folder from phone.
Then if you want to restore TWRP Backup: adb push c:/MotoG_Backup/TWRP /sdcard/TWRP/
Alternatively:
ADB Dumping Methods: *ROOT REQUIRED*
You need to grant the SuperSU permission popup that will appear on your phone.
System:
adb shell su -c "dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/sdcard/system.img"
adb pull /sdcard/system.img
Click to expand...
Click to collapse
Why, thank you sir! I was unaware that you can push files to your device while in the recovery! That is why I wanted a system image file.
Thanks again!
Hello everybody,
I'm new user on this forum please forgive me for my english as I am Belgian.
I try to make a backup of my Huawei G6-L11 with Android SDK.
I am on Xbuntu 14.04 (I am not a specialist but I use it for some months). I have installed the packages android-tools-adb and android-tools-fastboot and also android sdk.
My phone is connected to the PC via usb and the debug mode is active.
I followed the next steps in a terminal
[email protected]:~$ adb devices
List of devices attached
68a0f6753968 device
[email protected]:~$ adb backup -apk -shared -all -f backup.ab
Now unlock your device and confirm the backup operation.
[email protected]:~$
Click to expand...
Click to collapse
The problem is that I unlock the phone but the backup does not begin. Why? What can I do to begin it?
I really need to do this operation as I can not make any upgrade, any changes on my phone as the memory is full
Thanks a lot for your help
Use ADB, need root
Sent from my HUAWEI G6-L11 using XDA-Developers mobile app
persona78 said:
Use ADB, need root
Sent from my HUAWEI G6-L11 using XDA-Developers mobile app
Click to expand...
Click to collapse
Hello,
Thanks for your reply
I have tried with root and it does not function
I followed the steps I saw here https://memo-linux.com/android-utiliser-adb-pour-faire-une-sauvegarde-complete-de-son-smartphone-ou-tablette-sur-pc-sous-gnulinux/
And I can do the first steps, the problem is that the phone is not locked as it should be and the backup does not begin
Other solution?
Thanks a lot
Hello,
I become completely crazy with my problem :silly: I can't do it
I tried a lot of manipulations in order to do the backup and I found something interesting. In a file I had to create in /etc/udev.rules.d/ with the name 51-android.rules, I saw that the product ID seems change every time it is connected/disconnected of the PC. It was 1054, 1037 and also 1051. I suppose it make some trouble... Is it possible to blok it, ?
HTML:
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1051", MODE=”0666"
Thanks a lot.
Hi!
With the phone ON, with root, plug USB, choose MTP, tuurn ON debug mode, it will pop up a window in phone requesting permissions to connect YOU MUST GIVE IT, need 2GB free in your sd card, use ADB and type this:
adb shell "su -c 'dd if=/dev/block/mmcblk0p4 of=/storage/sdcard1/rpm.img bs=4096; dd if=/dev/block/mmcblk0p5 of=/storage/sdcard1/tz.img bs=4096; dd if=/dev/block/mmcblk0p1 of=/storage/sdcard1/sbl1.img bs=4096; dd if=/dev/block/mmcblk0p11 of=/storage/sdcard1/modem.img bs=4096; dd if=/dev/block/mmcblk0p9 of=/storage/sdcard1/modemst1.img bs=4096; dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/modemst2.img bs=4096; dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/sdi.img bs=4096; dd if=/dev/block/mmcblk0p6 of=/storage/sdcard1/aboot.img bs=4096; dd if=/dev/block/mmcblk0p19 of=/storage/sdcard1/recovery.img bs=4096; dd if=/dev/block/mmcblk0p23 of=/storage/sdcard1/system.img bs=4096; dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/boot.img bs=4096; dd if=/dev/block/mmcblk0p24 of=/storage/sdcard1/userdata.img bs=4096; dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/cache.img bs=4096; dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/cust.img bs=4096; dd if=/dev/block/mmcblk0p12 of=/storage/sdcard1/fsg.img bs=4096'"
Now you have your ROM images in sd card. You will need a flash zip to flash it if you need it.
You can use this one, only need to paste the images inside.
RomBackup.zip
https://mega.nz/#!n5plABBT
Key:
!L5EVKRl6AnTyr24IrhwPacxU_DbO7t2moVVzw9gOOT4
Use TWRP to flash it: http://forum.xda-developers.com/ascend-g6/general/twrp-3-0-0-0-g6-lte-devices-t3378495
Hi Persona78,
Thanks a lot for your quick answer
As I understand what you explain in your answer, you proposed me to flash the ROM of the phone but that is not my aim. I only want to make a backup for after try to increase the internal memory. I do not want to root the phone so I found on Internet the ADB program.
I plug the phone which is ON, I plug it with the USB cable, choose MTP transfer protocol, turn it on debug mode and agree with the pop up on the phone. Everything is good until the time when a message should appear to UNLOCK the phone in order to backup. This message does not appear as the phone is already unlocked and as it get blocked, no message appears. Whatever, the backup does not begin!
Thanks a lot.
filipinne13 said:
Hi Persona78,
Thanks a lot for your quick answer
As I understand what you explain in your answer, you proposed me to flash the ROM of the phone but that is not my aim. I only want to make a backup for after try to increase the internal memory. I do not want to root the phone so I found on Internet the ADB program.
I plug the phone which is ON, I plug it with the USB cable, choose MTP transfer protocol, turn it on debug mode and agree with the pop up on the phone. Everything is good until the time when a message should appear to UNLOCK the phone in order to backup. This message does not appear as the phone is already unlocked and as it get blocked, no message appears. Whatever, the backup does not begin!
Thanks a lot.
Click to expand...
Click to collapse
Hmmm, all apps I know to do backup use root.
You can use CWM or TWRP to backup, but they don't backup cust, and I don't know if recover to images default size.
The only way I know is fashing default ROM.
---------- Post added at 09:54 AM ---------- Previous post was at 09:50 AM ----------
persona78 said:
Hmmm, all apps I know to do backup use root.
You can use CWM or TWRP to backup, but they don't backup cust, and I don't know if riecover to images default size.
The only way I know is fashing default ROM.
Click to expand...
Click to collapse
I have a L11 rom, modify by me, resided and if you create in sd card a primary ext4 partition it wil send the apps to sd card automatically.
Hello Persona78,
Hmmm, all apps I know to do backup use root.
You can use CWM or TWRP to backup, but they don't backup cust, and I don't know if recover to images default size.
The only way I know is fashing default ROM.
Click to expand...
Click to collapse
Finally, I made a manual backup by drag and drop and also with Mybackup which do not use root.
I have a L11 rom, modify by me, resided and if you create in sd card a primary ext4 partition it wil send the apps to sd card automatically.
Click to expand...
Click to collapse
I made a reset of the phone with the manufacturer's parameters but I would like to use one other rom as they do not have any update for this model but it seems to be complicated to do it. I do not know how to backup the manufacturer's rom as I met a problem after. I think I would not be possible for me to root, unlock, extend the sd card with Gparted (as I work under UBUNTU 14.04 LTS), and make the update with the new rom, as I am not so talented with computer science.
Thanks a lot.
I tried and finally I have used Gparted in order to split the sd card. I have now 4 partitions
- swap partition (29 mb),
- fat32 partition (6.35 Gb)
- ext4 partition (23.34Gb)
try one of my versions
You can try one of my versions.
Read first to know what you get if you flash it!
https://www.facebook.com/Huawei.Ascend.G6.L11.Kit.kat.B370/?ref=bookmarks
Hello guys, so now my mi4c is unlocked bootloader i want to backup first imei/nvram/efs partition before start to flashing twrp, since on my device before my imei gone after flashing twrp already restore from twrp backup/qpst tool/fastboot rom flash but still nothing work.
From now my local store refund the money since they cant fix it too and then i bought new one.
So, how i can backup those files directly from phone with root permission like terminal emulator or something?
Anyone can give me command for it..
Thanks. :fingers-crossed:
I'm searching over google and miui forum and find this thread on russian forum but its for minote pro does it same?
Correct me if i'm wrong please..
Take look link below
http://4pda.ru/forum/index.php?s=&showtopic=668750&view=findpost&p=45923244
http://4pda.ru/forum/index.php?s=&showtopic=657190&view=findpost&p=39377526
Might be usefull for everyone too before facing problem with imei.
bump
@ketut.kumajaya I need your advice please :crying:
Which is partition block number used on mi4c?
Degrinder said:
bump
@ketut.kumajaya I need your advice please :crying:
Which is partition block number used on mi4c?
Click to expand...
Click to collapse
https://github.com/kumajaya/android...-13.0-twrp/recovery/root/etc/twrp.fstab#L7-L8
You can use busybox's dd command:
Code:
busybox dd if=/dev/block/bootdevice/by-name/modemst1 of=/sdcard/modemst1.img bs=4096
busybox dd if=/dev/block/bootdevice/by-name/modemst2 of=/sdcard/modemst2.img bs=4096
Be careful with above commands.
ketut.kumajaya said:
https://github.com/kumajaya/android...-13.0-twrp/recovery/root/etc/twrp.fstab#L7-L8
You can use busybox's dd command:
Code:
busybox dd if=/dev/block/bootdevice/by-name/modemst1 of=/sdcard/modemst1.img bs=4096
busybox dd if=/dev/block/bootdevice/by-name/modemst2 of=/sdcard/modemst2.img bs=4096
Be careful with above commands.
Click to expand...
Click to collapse
I'm sorry but for me its new things for linux command so i dont know much about it :laugh:
And i'm affraid if my device got bricked too
Need to instal busybox first or i can do it instantly with terminal emulator?
Degrinder said:
I'm sorry but for me its new things for linux command so i dont know much about it :laugh:
And i'm affraid if my device got bricked too
Need to instal busybox first or i can do it instantly with terminal emulator?
Click to expand...
Click to collapse
Maybe yes, I'm not sure if 4c have a proper busybox binary preinstalled.
ketut.kumajaya said:
Maybe yes, I'm not sure if 4c have a proper busybox binary preinstalled.
Click to expand...
Click to collapse
So, which do you think is better using backup from this command or using 3rd apps like Partitions Backup & Restore(select raw .img files) ?
i thought that was crap that only happened with cheap mediatek based phones,
I've never made any backup of EFS on any phone...
#xiaomiMi4c
Hi.
I am pretty new to the world of Sony and I want to relock my bootloader so I can get stock firmware from my region so it looks legit (Reselling)
I have taken a TA backup but I don't know how to flash it again. Tried TWRP with no luck and I also read som other threads around here that didn't make sense to me.
I am on Windows 10 and have the single SIM Xperia XZ.
https://forum.xda-developers.com/showpost.php?p=69972315&postcount=20
First push TA.img to the folder he mentions.
Do not flash TWRP.
Boot it. fastboot boot TWRP.img
After restoring your TA-Partition flash a stock ROM. If you reboot your phone before flashing stock it will bootloop.
DHGE said:
https://forum.xda-developers.com/showpost.php?p=69972315&postcount=20
First push TA.img to the folder he mentions.
Do not flash TWRP.
Boot it. fastboot boot TWRP.img
After restoring your TA-Partition flash a stock ROM. If you reboot your phone before flashing stock it will bootloop.
Click to expand...
Click to collapse
Okay. But the part I was wondering about is:
- Pushed TAbackup.img (I renamed it) to /data/local/tmp and verified md5sum is same as original backup. (Data/local/tmp - Is this on the phone? How?)
KazuhiraDokky said:
Okay. But the part I was wondering about is:
- Pushed TAbackup.img (I renamed it) to /data/local/tmp and verified md5sum is same as original backup. (Data/local/tmp - Is this on the phone? How?)
Click to expand...
Click to collapse
Follow this instruction, i was restored my TA successfully. Boot into TWRP and enter adb command
https://forum.xda-developers.com/showpost.php?p=70903982&postcount=256
THANK YOU!
Haha christ I see it now. Never noticed before I can push commands when it is in TWRP. Thank you so much. Been wondering about this for quite some time.
Would this also work ?
Flash stock ROM using Emma -> Temporally boot TWRP (fastboot boot TWRP.img) -> dd TA Partition ->reboot.
_mow_ said:
Would this also work ?
Flash stock ROM using Emma -> Temporally boot TWRP (fastboot boot TWRP.img) -> dd TA Partition ->reboot.
Click to expand...
Click to collapse
Have not used emma personally...
But: yes, as I wrote above for Flashtool.
Thank you for your answer.
I was just wondering if there is any particular reason for first restoring TA and then flashing the Stock ROM.
flashing ROM first is safer
I just posted the link where I read about the first sucsessful restore.
It is less dangerous (no potential boot loop) to flash the ROM first and then restore the TA partition.
The only thing you have to remember that way is to enable adb (developer options) and only boot into recovery and not flash it.
Flashing Stock first with Emma worked for me. However on the first boot-up I was asked to enter my password (i didn't set a password) so I had to enter 30 random Passwords until the Phone resets itself. But now everything seems to work.
Thank you.
_mow_ said:
Flashing Stock first with Emma worked for me. However on the first boot-up I was asked to enter my password (i didn't set a password) so I had to enter 30 random Passwords until the Phone resets itself. But now everything seems to work.
Thank you.
Click to expand...
Click to collapse
For me, i flashed rom with flashtool, i checked wipe all (apps_log, userdata, ssd,....). On first boot-up it doesn't ask me for the password .
rain_effect said:
Follow this instruction, i was restored my TA successfully. Boot into TWRP and enter adb command
https://forum.xda-developers.com/showpost.php?p=70903982&postcount=256
Click to expand...
Click to collapse
I tried this but it's not working. I backed up the TA img and cant restore it. I am in twrp recovery mode and did the adb devices to check if it showed up and it does. It's when I put the command "adb push TAbackup.img /data/local/tmp/TAbackup.img" it gives me an error saying "adb: error: cannot stat 'TAbackup.img': No such file or directory". I installed the minimal and fastboot drivers under C drive. I moved the backup up TA img to this folder and running the adb commands from this folder. It keeps on failing regardless. Please can anyone help me with this?
You need to change tabackup.img with the Real file name of your ta Backup
Bitti09 said:
You need to change tabackup.img with the Real file name of your ta Backup
Click to expand...
Click to collapse
so I shouldn't rename it ? All the guides say to rename it. I don't remember the original name of my backup since I renamed it to TAbackup.img
breakwaterr said:
so I shouldn't rename it ? All the guides say to rename it. I don't remember the original name of my backup since I renamed it to TAbackup.img
Click to expand...
Click to collapse
then
adb push TAbackup.img /data/local/tmp/TAbackup.img
and
adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA
should work if you renamed the backup to TAbackup.img
Bitti09 said:
then
adb push TAbackup.img /data/local/tmp/TAbackup.img
and
adb shell dd if=/data/local/tmp/TAbackup.img of=/dev/block/bootdevice/by-name/TA
should work if you renamed the backup to TAbackup.img
Click to expand...
Click to collapse
I already renamed it to TAbackup.img and it doesn't work. it says no directory file error
breakwaterr said:
I already renamed it to TAbackup.img and it doesn't work. it says no directory file error
Click to expand...
Click to collapse
are you doing the commands in same folder as the TAbackup file is ?
If you use Windows its possible that windows is hiding the file extension so that you've possible renamed the file to TAbackup.img.img which is shown as TAbackup.img
Bitti09 said:
are you doing the commands in same folder as the TAbackup file is ?
If you use Windows its possible that windows is hiding the file extension so that you've possible renamed the file to TAbackup.img.img which is shown as TAbackup.img
Click to expand...
Click to collapse
OMG thank you so much man. renaming the file to only TAbackup worked. THANK YOU SO MUCH!!
I just unlocked the bootloader on my Oneplus8T. Before I make any further changes I understand that it would be wise to back up the persist partition and EFS. I am trying ADB shell commands for the first time and I am getting a Permission Denied error. Can anyone tell me what step I am missing? Here is the command I am trying to use and the result:
Code:
C:\Users\xxx>adb shell
OnePlus8T:/ $ dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
dd: /dev/block/bootdevice/by-name/persist: Permission denied
1|OnePlus8T:/ $
After Persist, I would do modemst1 and modemst2, then exit from the shell, then pull them to my PC.
BTW, I am using a Windows PC, not Linux or Mac for this.
You need a root shell. Install Magisk.
That makes sense. I need to write better instructions for myself. Yet another reason to Install Magisk. Thank you, sir.
FakeGemstone said:
That makes sense. I need to write better instruction.
Yet another reason to Install Magisk. Thank you, sir.
Click to expand...
Click to collapse
And if you don't want to install Magisk, then if you don't have TWRP installed use fastboot boot <twrp.img file> and then run the commands in Advanced>Terminal.
BillGoss said:
And if you don't want to install Magisk, then if you don't have TWRP installed use fastboot boot <twrp.img file> and then run the commands in Advanced>Terminal.
Click to expand...
Click to collapse
Great tip. I'll give that a try right now.
update: it just took a minute or two to type out the commands in the TWRP terminal and it worked perfectly. Thank you TWRP developers and thank you BillGoss.