Question [SOLVED] How to backup persist partition on Pixel 7 Pro - Google Pixel 7 Pro

Hello,
Do you know what's the command to backup persist partition on the Pixel 7 Pro? (already rooted)
Thanks

Found this, worked for me.
su -c dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/Download/persist.img

under this thread
[Magisk] Magisk Zygote64_32: Enabling 32-bit Support For Apps
The 32-bit apps are back! https://streamable.com/hb1dqp Synopsis The Pixel 7 line is Google's first "64-bit only" phones, along with being the highest profile release of a 64-bit only device so far. The device uses the Tensor G2 (GS201), which is...
forum.xda-developers.com
There's a script that helps you save the persist partition

bartito said:
Hello,
Do you know what's the command to backup persist partition on the Pixel 7 Pro? (already rooted)
Thanks
Click to expand...
Click to collapse
Download this app from the play store Partitions Backup https://play.google.com/store/apps/details?id=ma.wanam.partitions

Fishawy said:
Found this, worked for me.
su -c dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/Download/persist.img
Click to expand...
Click to collapse
elong7681 said:
Download this app from the play store Partitions Backup https://play.google.com/store/apps/details?id=ma.wanam.partitions
Click to expand...
Click to collapse
Appreciate but I prefer to run the command

yurishouse said:
under this thread
[Magisk] Magisk Zygote64_32: Enabling 32-bit Support For Apps
The 32-bit apps are back! https://streamable.com/hb1dqp Synopsis The Pixel 7 line is Google's first "64-bit only" phones, along with being the highest profile release of a 64-bit only device so far. The device uses the Tensor G2 (GS201), which is...
forum.xda-developers.com
There's a script that helps you save the persist partition
Click to expand...
Click to collapse
Appreciate but I prefer to run the command

bartito said:
Appreciate but I prefer to run the command
Click to expand...
Click to collapse
Not meant to be rude but...
Code:
dd if=/dev/block/by-name/persist of=/sdcard/persist.img
Or the one the earlier guy already gave you.
Seems to be the easiest thing you can do either on phone or via adb root shell.
dd is a native command. So if This is not what you're looking for then I have no idea what else does.

yurishouse said:
Not meant to be rude but...
Code:
dd if=/dev/block/by-name/persist of=/sdcard/persist.img
Or the one the earlier guy already gave you.
Seems to be the easiest thing you can do either on phone or via adb root shell.
dd is a native command. So if This is not what you're looking for then I have no idea what else does.
Click to expand...
Click to collapse
Yes, the "dd" command was exactly the one I'm finding for.
Appreciate all answers but I do not need anymore due the correct answer was found.

Related

backup imei/efs/nvram file before installing twrp

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

persist.img backup and restore

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.

Help Pulling EFI Firmware

Hello,
I am trying to figure out how to either inject a custom bootloader like Clover onto my Nvidia Shield, or to Modify the existing EFI bootloader itself or with a modification to a Recovery program such as TWRP in order to be able to use a custom bootloader to select "Boot From Usb"
I figure I oughta make a backup, but I do not know how to backup my bootloader either....
I think I understand how to look at the shield's partitions now to find the one with the bootloader, I'm just nervous to proceed...
I have been researching for a week and have learned amazing tidbits of knowledge on the sublayers of the shield, and a lot of its partitions...
I was able to install a custom OS, modified GAPPS, and root on my shield, I am just hung up on this final part....
If anyone would care to share even a bread crumb where to start, I Would Be Ever So Grateful
Download Clover EFI Bootloader - MajorGeeks
Clover EFI Bootloader can boot OS X, Windows, and Linux on Mac or PC with UEFI or BIOS firmware.
www.majorgeeks.com
Root Nvidia Shield TV Pro 2019 Version
THIS IS OUTDATED https://forum.xda-developers.com/t/bootmod-root-your-shield-in-1-minute-2015-2017-2019.4524873/ REPLACES THIS IF YOU WANT ANDROID OR USE THIS GUIDE...
forum.xda-developers.com
I forgot to ask, IS THERE A PULL COMMAND FROM FASTBOOT, TO COPY PARTITIONS? MY GOOGLE FU IS SUPER BUT MAN I AM HAVING A HARD TIME FINDING EXACTLY WHAT I'M LOOKING FOR :-(
jenneh said:
I forgot to ask, IS THERE A PULL COMMAND FROM FASTBOOT, TO COPY PARTITIONS? MY GOOGLE FU IS SUPER BUT MAN I AM HAVING A HARD TIME FINDING EXACTLY WHAT I'M LOOKING FOR :-(
Click to expand...
Click to collapse
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example - for Windows PC only:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]
jwoegerbauer said:
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]
Click to expand...
Click to collapse
Thank You! That is thinking outside the box haha I kept trying to do it through fastboot knowing there is very limited amount of commands, not realizing that Would Never Work. I appreciate Your Time! I will try adb now!!! It's so funny, it seems like such a simple answer but sometimes we see so many paths, it's hard to know which one to take...
jwoegerbauer said:
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example - for Windows PC only:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]
Click to expand...
Click to collapse
Hello! May I pry your mind for a moment?
I ran this command on my shield "fastboot erase system" except instead of running it directly in the command line on windows,
I made a batch file for it, and when I ran the batch, it succeeded but it did something strange, it printed this message inside the batch
"
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 fastboot erase system\par
fastboot erase boot\par
\par
}
"
It completely deleted the two commands i had in there and pasted that instead... do you know what that is by any chance or Why it did that? o.o It is fascinating!
I can not understand what you are doing: For me it is complete confusion.
jwoegerbauer said:
I can not understand what you are doing: For me it is complete confusion.
Click to expand...
Click to collapse
No worries, thank you for your time, Seriously. That ADB suggestion was Exactly what I Needed... Have a beautiful day!

ADB command to backup persist & EFS? Permission Denied.

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.

Recovery Disappears

I bought a phone (ZTE 2050) that has next to nothing as far as development goes. I have tried to install TWRP recovery but it had never actually worked. I have tried using various tools that port recovery to MTK devices. None of them have worked. I have been able to achieve root through Magisk. However, when I do, I no longer have the stock recovery either. There are several other problems that happen as well, but nothing I cannot work around. What could I be doing that is causing me to lose recovery? The chipset is MTK6771 and it is an ARM-V8 64 bit and it is running Android 9. Literally the only things I'm able to find online regarding this phone is the sites that I believe only copy and paste from other phones whether the root method actually works out not. Almost everything tells me to use MTK Tool but that definitely doesn't work. I have issues with Smart Phone Flash Tool working as well despite all drivers being installed correctly. The only way I have been able to achieve root is through unlocking the Bootloader and flashing. And even though I follow the instructions on commands, I still lose the stock recovery. Any help would be greatly appreciated.
Reflash phone's stock ROM.
xXx yYy said:
Reflash phone's stock ROM.
Click to expand...
Click to collapse
I have flashed the stock system at least 50 times by now. I have tried flashing everything in different orders as well. When I have root, it always removes the recovery. When I open my file manager, I use Solid Explorer, it tells me there is no root file system. I have tried other root file managers as well. They all tell me the same thing.
Android is rooted if su cmdlet is present in Android's filesystem
I've got a $100 Chinese MTK phone and the one redeeming feature is that once the bootloader is unlocked, you can fastboot over USB (bootstrap).
I used SP flash tool to backup the ROM and WwR_MTK to extract the partitions allowing me to make my own custom recovery to boot with fastboot. Briefly, I found a twrp recovery online for another MTK phone and just played around with zImage & initrd.
Shell commands, dmesg, cat /proc/partitions & blkid on the phone come in handy to track down in partition layout. No need to flash anything so don't get issues with /system/bin/install-recovery.sh
xXx yYy said:
Android is rooted if su cmdlet is present in Android's filesystem
Click to expand...
Click to collapse
I got it to hang on to the stock recovery. However, the bootloader remains unlocked. If I lock it again in fastboot, it will not allow me to boot the phone. When I try to flash vbmeta, it tells me there is no such file on the system.
xdabookam said:
I've got a $100 Chinese MTK phone and the one redeeming feature is that once the bootloader is unlocked, you can fastboot over USB (bootstrap).
I used SP flash tool to backup the ROM and WwR_MTK to extract the partitions allowing me to make my own custom recovery to boot with fastboot. Briefly, I found a twrp recovery online for another MTK phone and just played around with zImage & initrd.
Shell commands, dmesg, cat /proc/partitions & blkid on the phone come in handy to track down in partition layout. No need to flash anything so don't get issues with /system/bin/install-recovery.sh
Click to expand...
Click to collapse
I'll give that a shot. I just tried to open my root file system and it told me that BusyBox isn't installed. I thought I had read that BusyBox wasn't necessary with Magisk. Last time I tried to install a BusyBox, it screwed the whole system up. Is there one you would suggest? I've seriously messed with this phone 1000x's now and it's made me giggle shy to do anything to it at the moment.
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
finnroth69 said:
the whole system up. Is there one you would suggest? I've seriously messed with this phone 1000x's now and it's made me giggle shy to do anything to it at the moment.
Click to expand...
Click to collapse
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
Ok, yeah I just checked it and it says toybox.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I just installed the BusyBox and my whole system froze and started acting up.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I rebooted and it started acting ok once again. When I tried to open my file manager to access to root file system, this is still the message I got even though I have not uninstalled the BusyBox.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I just opened the BusyBox app and it says it isn't installed even though I have not uninstalled it either.
cm
xXx yYy said:
Android is rooted if su cmdlet is present in Android's filesystem
Click to expand...
Click to collapse
"cmdlet" not found. Yet Magisk is installed and I am able to access root.
If you can successfully apply su ( read: Switch User cmdlet ) then it got installed by whatever method.
finnroth69 said:
I just opened the BusyBox app and it says it isn't installed even though I have not uninstalled it either.
Click to expand...
Click to collapse
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
xXx yYy said:
If you can successfully apply su ( read: Switch User cmdlet ) then it got installed by whatever method.
Click to expand...
Click to collapse
Ok, I understand that. What I don't understand is why I am now being told that vbmeta cannot be found and installed and my bootloader must remain unlocked. Or why I cannot install recovery without losing recovery.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I can't copy it it. It won't allow me into the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I can't copy it it. It won't allow me into the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I just installed another BusyBox and the system is running fine afterwards, but this is the message I get when trying to open the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I pulled up the currently installed binary installed through shell.

Categories

Resources