Migrate System as root Fixed version [Unofficial] - Xiaomi Redmi Note 7 Pro Guides, News, & Discussion

This is a modified unofficial version of Migrate to work on devices with system as root partition ,as I have the permission from the Author of the app i'm posting here . Since new devices which shipped with pie have system as root, migrate backup will fail to flash as it can't mount /system like earlier.
The backups created by this version will able to flash and restore without any issue. This will depend on the recovery, as twrp of these devices should mount system under /system_root , some recoveries mount system under / so it may not work on that devices.
Tested on Violet using Peter's wrapped key twrp.
download : drive.google.com/open?id=1HUvqwmAH-qKTd0YMAg-Vc_9e8jeAPZDg
1.Uninstall previous versions and Install the APK
2.Make Backups and restore as normal

Will this also work on Note 7 (Lavender) ?

@anoop1507 thanks for sharing.
Can i backup my data on galaxy s8 with this version of app and restore it on redmi note 8?

does it still need the helper after reboot ?

Related

SuperSu fails to root on encrypted device

Hello guys,
I am running the latest 2.2.0-X OOS, with latest TWRP recovery, and rooted with supersu. The problem arised when decided to encrypt my device. Supersu and root stopped to work. I tried to reflash supersu binaries on TWRP, the installation is successfull, but when i boot my device still no root.
So to my conclusion Supersu app & root doesn't seem to work on an encrypted device. Any ideas or suggestions or workaround?
Thanks
You should be able to do it :/
When you encrypt a device, the only partition encrypted is the "data" partition not the "system" partition (where the root is made).
pedrof1991 said:
You should be able to do it :/
When you encrypt a device, the only partition encrypted is the "data" partition not the "system" partition (where the root is made).
Click to expand...
Click to collapse
I figured out what the issue was: All you have to do is follow this guide:
http://forum.xda-developers.com/not...tSd7OU3zvjXIDCyXg&sig2=QqJIbUNvupVJnERW2w4K_w
* Note : This works on stock kernel, couldn't make root to work on encrypted device using boeffla kernel. don't know about blu_spark

I don't see my files with TWRP but it is OK with File manager.

Hi
I have a problem with my Mi5s plus.
I have updated my rom.
I can boot with my custom rom I just installed. It is ok. I can browse the directories with the file manager. I can use the stock browser, SMS...ok
But when I want to install GAPPS (That I downloaded before)(I know it's no longer called that) with TWRP, I no longer see the installation file, the ZIP. The directories are empty with TWRP but accessible and with files with the Android file manager.
So I can't install applications without open apps.
Of course, when I want, by example, to delete cache I have theses messages : unable to mount /data (invalid argument), error 8 etc.
Help me?
I hope to be able to recover the data so that when I reinstall my applications. I have the data.
Thank you again.
Djoul33 said:
Hi
I have a problem with my Mi5s plus.
I have updated my rom.
I can boot with my custom rom I just installed. It is ok. I can browse the directories with the file manager. I can use the stock browser, SMS...ok
But when I want to install GAPPS (That I downloaded before)(I know it's no longer called that) with TWRP, I no longer see the installation file, the ZIP. The directories are empty with TWRP but accessible and with files with the Android file manager.
So I can't install applications without open apps.
Of course, when I want, by example, to delete cache I have theses messages : unable to mount /data (invalid argument), error 8 etc.
Help me?
I hope to be able to recover the data so that when I reinstall my applications. I have the data.
Thank you again.
Click to expand...
Click to collapse
In TWRP, go to mount and see if data is mounted.
No, it is not mounted in TWRP (But, in Android, it is OK, il see my datas)
But, I can just check :
DSP
System
Cache
Cust
Persist
But I am not able to check
Data
USB OTG.
it is locked.
Djoul33 said:
No, it is not mounted in TWRP (But, in Android, it is OK, il see my datas)
But, I can just check :
DSP
System
Cache
Cust
Persist
But I am not able to check
Data
USB OTG.
it is locked.
Click to expand...
Click to collapse
I have flashed things that did not properly unmount a partition afterwards so I could not mount it in twrp. Try flashing something that mounts data, if not mounted, then unmounts data properly.
Maybe my TWRP is deprecated ?
I have flashed a ROM 8.x then, my TWRP is old : 3.0.2.x By XM maybe ?
2016...
Djoul33 said:
Maybe my TWRP is deprecated ?
I have flashed a ROM 8.x then, my TWRP is old : 3.0.2.x By XM maybe ?
Click to expand...
Click to collapse
Try that first.
Hi,
My TWRP was too old, deprecated. It is OK now.
Thanks.

[TWRP][GRUS]Unofficial Orange Fox recovery for Mi9 SE

Please be aware I am not the project developer. I am posting this build for feedback and debug purpose
OrangeFox is a modded recovery based on TWRP 3.3.x with a customizable UI.
More info at https://orangefox.tech/
This build is based on @redispade twrp 3.3.1 device tree and its code can be found on github:
The recovery is supporting Android Pie and Q builds (both AOSP and MIUI based ROMs).
Decryption is working.
How to install:
1. Download Orange Fox 0509 build:
2. Reboot to Recovery
3. (Optional) take a full backup (data+media) and export it outside your device.
4. Flash the OrangeFox file as a recovery image (install/install image/select file and swipe to flash to recovery partition).
5. Reboot to recovery from reboot menu in TWRP.
6. Profit
If you are using a MIUI-based ROM that support OTA, follow this guide on OrangeFox website to set up OTA on your device.
If you flash OrangeFox and then, for any reason, you cannot access to recovery partition anymore, reboot your device to fastboot, connect it to a PC and flash any TWRP recovery using fastboot.
Once you flashed TWRP, reboot to recovery using button combo Power+VolumeUp
Reserved
Which version redispade recovery?
The latest which support android 10?
fatjoez said:
Which version redispade recovery?
The latest which support android 10?
Click to expand...
Click to collapse
The one posted in the first post won't work, op will be edited soon.
Faust build is based on latest twrp 3.3.11 so I assume it should work on Android 10.
As usual, keep a full backup of your device handy before trying.
I installed faust93 23-10 build (downloaded from his web page). Tested wipe, install (Derpfest) and restore (full backup). All good and running. :good:
elpaablo said:
I installed faust93 23-10 build (downloaded from his web page). Tested wipe, install (Derpfest) and restore (full backup). All good and running. :good:
Click to expand...
Click to collapse
Did you had to reboot to recovery after flashing ROM before flashing other zips, if any?
Flounderist said:
Did you had to reboot to recovery after flashing ROM before flashing other zips, if any?
Click to expand...
Click to collapse
I always do that to avoid errors. The only issue I had was with data restore, but that's usual behavior, I always have to reboot to system before restore data.
elpaablo said:
I always do that to avoid errors. The only issue I had was with data restore, but that's usual behavior, I always have to reboot to system before restore data.
Click to expand...
Click to collapse
Did you performed a clean flash, is it?
I got this message on a log, but I'm not sure it is a bug because I didn't try to mount any partition yesterday.
I'm using the OF build posted in OP (not the faust93 one):
I: Data backup size is 8239MB, free: 15364MB.
I:Unable to mount '/storage'
I:Actual block device: '/data/media/0', current file system: 'ext4'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
Flounderist said:
Did you performed a clean flash, is it?
I got this message on a log, but I'm not sure it is a bug because I didn't try to mount any partition yesterday.
I'm using the OF build posted in OP (not the faust93 one):
I: Data backup size is 8239MB, free: 15364MB.
I:Unable to mount '/storage'
I:Actual block device: '/data/media/0', current file system: 'ext4'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
Click to expand...
Click to collapse
I installed OF from redispade twrp, rebooted to recovery, wiped system and data (I already had the right vendor, so nothing to do here) and installed Derpfest. Rebooted to system, to see if installation had succeded, then passed my backup to orange backup folder and made a full restore. I only had issues with restoring data, probably because I made a backup with pin protection, which is not the best choice. So I had to complete google initial setup and redefine a pin protection so that I could be able to restore data from recovery.
elpaablo said:
I only had issues with restoring data, probably because I made a backup with pin protection, which is not the best choice.
Click to expand...
Click to collapse
Yep, disabling any FP or pin is recommended when clean flashing.
MIUI OTA working? Now can't testing.
X_SaG_X said:
MIUI OTA working? Now can't testing.
Click to expand...
Click to collapse
I am running an AOSP ROM, so I can't tell you.
The same has been mentioned in the Mi9 SE (Devs) Telegram Group.
p.s. I found the time to test in depth the build posted in the first post and everything is working (themes, backup, decryption, ADB, MTP, OTG and so on).
New Build added
I added new build download link in OP.
I also added some additional information on how to get out of troubles, if any.
The 102619 build should fix Magiskboot and MIUI OTA should work.
Any MIUI user please test and report with logs.
OTA need testing
It has been reported by a MIUI 11 user that OTA is not working, but no logs were provided.
If someone is willing to help, please try OTA and grab some recovery logs if it fail.
I edited OP as well with a warning.
103019 has working MIUI OTA :good:
Updated OP with download link.
Please report any issue with logs, if any.
I found a bug. System partition is mounting in read-only mode and I can't change it to full access.
Kirhe said:
I found a bug. System partition is mounting in read-only mode and I can't change it to full access.
Click to expand...
Click to collapse
Are you able to flash any .zip file to system?
Are you using MIUI, AOSP based ROM or GSI?
Flash zip to system doesn't works. I'm using MIUI. Stock TWRP works well
Kirhe said:
Flash zip to system doesn't works. I'm using MIUI. Stock TWRP works well
Click to expand...
Click to collapse
Could you provide for recovery log after attempting a .zip flashing?
Flounderist said:
Could you provide for recovery log after attempting a .zip flashing?
Click to expand...
Click to collapse
Have you any idea how to fix a bug?

[GUIDE] Backup / Restore function in Poco X3 recoveries [OrangeFOX / TWRP]

Preliminary guide to BACKUP / RESTORE with
OrangeFox recovery by ManoloRey
LINK
or
TWRP recovery 3.5.X_10-x by brigudav
LINK
! ! ! USE ONLY LINKED VERSIONS OF RECOVERIES ! ! !
Consider this guide for (decrypted vendor (or encryption disabler) + decrypted storage used) as BETA, I don't recommend backup/restore procedures with OrangeFox recovery Beta or TWRP 3.5.0_10-x for actual backups of your data (TRY THIS ONLY AT YOUR OWN RISK) ONLY FOR TESTING / EDUCATIONAL PURPOSES !
Do not ask for help if your data have been lost because they can't be restored, or suddenly your backup - successfully restored several times before - now can't be! This is still buggy and sometimes for unknown reasons restore of your data can fail ! Restore process always worked 100 % for me, but results sometimes differ !
YOU HAVE BEEN WARNED!
​(decrypted vendor (or encryption disabler) + decrypted storage used)
Spoiler: Backup method A (not recommended):
- backup boot and data partition
Restore:
- wipe cache, dalvik, data
- flash ROM + GAPPS that you have installed when you created backup
- restore backup of boot and data partition
- remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !) but before reboot!
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Reboot
Comment(s):
- if you remove your password/PIN/pattern protection directly before backup you can end up after restore with system where you can't change your password/PIN/pattern anymore
- if you forget to remove your password/PIN/pattern protection AFTER RESTORE you can end up after boot with system demanding to enter your password/PIN/pattern which MAY or MAY NOT BE ACCEPTED even if it is CORRECT and maybe INACCESSIBLE because of that
- Google Pay will never be restored properly (or anything depending on actual password in time of backup), because of the removed password, you will need to set up it again after restore
Spoiler: Backup method B (recommended):
- backup super, boot, dtbo and data partition (metadata partition is optional)
Restore:
- wipe cache, dalvik, data (optional)
- restore super, boot, dtbo and data partition (metadata partition is optional)
Reboot
(everything will be restored to the state in time of the backup) ¹)
- if needed remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !)
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Comment(s):
¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data (or for something else that needs to be discovered yet), after that you'll loose the ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RRemix) or reset your password so you can enter the system (CrDroid), in RRemix everything works, except you can't change your password etc, in CrDroid you need to re-setup your password depending apps
- if you remove your password Google Pay will never be restored properly (or anything depending on actual password in time of backup), you will need to set up it again after restore
x x x​(encrypted vendor and storage used)
Spoiler: Backup method A (OFFICIAL for OrangeFox & UNOFFICIAL for TWRP)
Backup:
- backup boot and data partition
Restore:
If you are restoring a data backup of an encrypted device, there are precautions that you should take before starting the restore process (obviously, your backup must be on MicroSD or other external storage medium - NOT on the internal storage):
Format the data partition (NOTE: format - not just wipe)
Reboot OrangeFox / TWRP
Flash the original zip of the ROM whose backup you are trying to restore
Wipe cache and dalvik
Reboot to system to ensure that the newly-flashed ROM actually boots, and that it re-encrypts the device with its own encryption
Reboot to OrangeFox / TWRP
Tap on the Backup icon
Select the partition(s) that you wish to restore
Swipe to restore
If you do not follow all these steps, you can expect problems with restoring data
Reboot
Comment(s): TBA
Credits: OrangeFox devs as this guide (for encrypted vendor and storage used) is copied directly from OrangeFox wiki slightly modified by me by adding "/ TWRP" to the text
this guide will be updated if I discover new facts or post new, updated steps or how-to's​
reserved
jeryll said:
reserved
Click to expand...
Click to collapse
Thanks for your experiments and hard work in putting this together!
backup super, boot, dtbo and data partition (metadata partition is optional)
Click to expand...
Click to collapse
there is 2 checkboxes for super with the same size in OF. one says (Product, Vendor, System).
which one to select or both?
drahtwurst said:
there is 2 checkboxes for super with the same size in OF. one says (Product, Vendor, System).
which one to select or both?
Click to expand...
Click to collapse
Only one, backup of super from either is identical
Thanks for this flashlight on the darkness.
Let me ask you a help. How can I decrypt my device? Wanna do it just like my old MI8, where I didnt need to do format data ever when go to update a rom.
Ever I go do recovery (OFOX or TWRP) I got this in screenshot.
- download and flash decrypted (hacked) vendor from this thread or
- use encryption disabler zip, but that is a little tricky to use - you need to flash encryption disabler every time you update your MIUI base, or custom rom, if you forget that, on next boot your internal storage will be encrypted
- - to remove encryption from data partition after - you need to do initial format data (yes) - after that you can start to use wipe data if needed (some ROMs still need to use format data (yes) or they'll not boot - RR 8.6.6/8.6.7 for example)
jeryll said:
- use encryption disabler zip, but that is a little tricky to use - you need to flash encryption disabler every time you update your MIUI base, or custom rom, if you forget that, on next boot your internal storage will be encrypted
Click to expand...
Click to collapse
Yep, that fact just bit me today as I was away from the computer and had to reflash the latest Xiaomi.eu...
jeryll said:
- use encryption disabler zip
Click to expand...
Click to collapse
Are there further instructions for first install? I did google but failed to find anything reliable...
pnin said:
Are there further instructions for first install? I did google but failed to find anything reliable...
Click to expand...
Click to collapse
not that I know of, just flash it as last thing before you reboot (either recovery or to system), but you need to format data (yes) to remove encryption
As this [surya] 'encryption-disabler-v1' is basically a shell script (pasted to https://paste2.org/804aemGx, BTW), I took the risk to flash it without formatting 'Data' -- only I disabled any security beforehand, i.e., no pin, password or fingerprint.
It appears to have worked, cause I rebooted into system with no issues. But how to verify?
not sure what do you want to achieve by flashing of encryption disabler without actually disabling encryption by formatting your data partition...
so what do you want to verify?
if you start OFOX, on the initial screen you can see the state of your data partition (encrypted/decrypted)
Thanks for your patience. I was under the impression that if you disable security locks then you had no encryption and the script would just ensure it would remain so. By your reaction I'm assuming I was wrong...
Overall, I am just getting fed up with always having to format data and having to start from scratch.
I not longer have OFox, I'm currently running brigudav's TWRP "v3.5.0_10-5-surya".
pnin said:
Thanks for your patience. I was under the impression that if you disable security locks then you had no encryption and the script would just ensure it would remain so. By your reaction I'm assuming I was wrong...
Overall, I am just getting fed up with always having to format data and having to start from scratch.
I not longer have OFox, I'm currently running brigudav's TWRP "v3.5.0_10-5-surya".
Click to expand...
Click to collapse
As you said, that encryption_disabler.zip is a shell script, which makes the folder in /product/vendor_overlay/29/etc and copies fstab.qcom from vendor to it. Then edits every line using the shell command sed (aka stream editor) that includes the string fileencryption= with the string encryptable=.
The above described process is usually done on the first boot of a newly installed ROM as is with every vendor_overlay entry in product (minus the edited strings ofc). Editing it after the ROM reads vendor fstab.qcom and encrypts the data partition is useless. However, formatting data (deleting keystore essentially) and flashing that .zip should also do the trick. Might as well update your base MIUI and ROM while you're at it
Thanks for the detailed explanation, Slim K. Sadly there's no escaping formatting data, which I'll do next...
Slim K said:
Might as well update your base MIUI and ROM while you're at it
Click to expand...
Click to collapse
I had done so already, hence my reluctance to do it again.
jeryll said:
Preliminary guide to BACKUP / RESTORE with
OrangeFox recovery by ManoloRey
LINK
or
TWRP recovery 3.5.X_10-x by brigudav
LINK
! ! ! USE ONLY LINKED VERSIONS OF RECOVERIES ! ! !
Consider this guide for (decrypted vendor (or encryption disabler) + decrypted storage used) as BETA, I don't recommend backup/restore procedures with OrangeFox recovery Beta or TWRP 3.5.0_10-x for actual backups of your data (TRY THIS ONLY AT YOUR OWN RISK) ONLY FOR TESTING / EDUCATIONAL PURPOSES !
Do not ask for help if your data have been lost because they can't be restored, or suddenly your backup - successfully restored several times before - now can't be! This is still buggy and sometimes for unknown reasons restore of your data can fail ! Restore process always worked 100 % for me, but results sometimes differ !
YOU HAVE BEEN WARNED!
​(decrypted vendor (or encryption disabler) + decrypted storage used)
Spoiler: Backup method A (not recommended):
- backup boot and data partition
Restore:
- wipe cache, dalvik, data
- flash ROM + GAPPS that you have installed when you created backup
- restore backup of boot and data partition
- remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !) but before reboot!
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Reboot
Comment(s):
- if you remove your password/PIN/pattern protection directly before backup you can end up after restore with system where you can't change your password/PIN/pattern anymore
- if you forget to remove your password/PIN/pattern protection AFTER RESTORE you can end up after boot with system demanding to enter your password/PIN/pattern which MAY or MAY NOT BE ACCEPTED even if it is CORRECT and maybe INACCESSIBLE because of that
- Google Pay will never be restored properly (or anything depending on actual password in time of backup), because of the removed password, you will need to set up it again after restore
Spoiler: Backup method B (recommended):
- backup super, boot, dtbo and data partition (metadata partition is optional)
Restore:
- wipe cache, dalvik, data (optional)
- restore super, boot, dtbo and data partition (metadata partition is optional)
Reboot
(everything will be restored to the state in time of the backup) ¹)
- if needed remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !)
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Comment(s):
¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data (or for something else that needs to be discovered yet), after that you'll loose the ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RRemix) or reset your password so you can enter the system (CrDroid), in RRemix everything works, except you can't change your password etc, in CrDroid you need to re-setup your password depending apps
- if you remove your password Google Pay will never be restored properly (or anything depending on actual password in time of backup), you will need to set up it again after restore
x x x​(encrypted vendor and storage used)
Spoiler: Backup method A (OFFICIAL for OrangeFox & UNOFFICIAL for TWRP)
Backup:
- backup boot and data partition
Restore:
If you are restoring a data backup of an encrypted device, there are precautions that you should take before starting the restore process (obviously, your backup must be on MicroSD or other external storage medium - NOT on the internal storage):
Format the data partition (NOTE: format - not just wipe)
Reboot OrangeFox / TWRP
Flash the original zip of the ROM whose backup you are trying to restore
Wipe cache and dalvik
Reboot to system to ensure that the newly-flashed ROM actually boots, and that it re-encrypts the device with its own encryption
Reboot to OrangeFox / TWRP
Tap on the Backup icon
Select the partition(s) that you wish to restore
Swipe to restore
If you do not follow all these steps, you can expect problems with restoring data
Reboot
Comment(s): TBA
Credits: OrangeFox devs as this guide (for encrypted vendor and storage used) is copied directly from OrangeFox wiki slightly modified by me by adding "/ TWRP" to the text
this guide will be updated if I discover new facts or post new, updated steps or how-to's​
Click to expand...
Click to collapse
Hello
I tried to do a backup with this orfox version including 'super'. At the end it says:
Backing up Super...
Backup Failed, Cleaning Backup Folder
Do you have a idea what happened?
Edit: I guess it's because my phone is encrypted
XtraWater said:
Hello
I tried to do a backup with this orfox version including 'super'. At the end it says:
Backing up Super...
Backup Failed, Cleaning Backup Folder
Do you have a idea what happened?
Edit: I guess it's because my phone is encrypted
Click to expand...
Click to collapse
Make sure you have enough space on the destination. Have a look at the OF log.
I guess this is as good a place as any to ask: what is the advantage of decrypting data?
I don't think running encrypted slows things down (not like it used to in the past when devices weren't as powerful), and there is the huge benefit of having your data secure. Any lost/stolen phone will soon send up in the hands of someone (on either side of the law) who knows adb/fastboot, so just having a password isn't going to protect your data if it's not encrypted.
It's possible to do backups of encrypted data, just the same as unencrypted.
Formatting vs wiping: ends up doing the same - all the data is gone and has to be restored. So that's a non-issue.
So, why should one prefer to decrypt?
temporarium said:
I guess this is as good a place as any to ask: what is the advantage of decrypting data?
I don't think running encrypted slows things down (not like it used to in the past when devices weren't as powerful), and there is the huge benefit of having your data secure. Any lost/stolen phone will soon send up in the hands of someone (on either side of the law) who knows adb/fastboot, so just having a password isn't going to protect your data if it's not encrypted.
It's possible to do backups of encrypted data, just the same as unencrypted.
Formatting vs wiping: ends up doing the same - all the data is gone and has to be restored. So that's a non-issue.
So, why should one prefer to decrypt?
Click to expand...
Click to collapse
From my understanding the only benefit would be to update firmware without format data.
re backup super: There are about 70GB available on the SD card (destination of the backup). I tried to backup it again with the same result. Just looking at the log file but can't see what has failed. The line before Backup failed is:
I:Error writing destination fd(operation not permitted)
XtraWater said:
From my understanding the only benefit would be to update firmware without format data.
re backup super: There are about 70GB available on the SD card (destination of the backup). I tried to backup it again with the same result. Just looking at the log file but can't see what has failed. The line before Backup failed is:
I:Error writing destination fd(operation not permitted)
Click to expand...
Click to collapse
Your card is probably formatted as fat32 which won't allow such big files.

Question Ways to return the device to stock?

I am a bit of a scaredy cat, and I don’t want to pollute the GSI thread with this question.
OnePlus is not offering fast boot flash images for their Nord 2. And the only way to get a custom rom is by flashing a custom vbmeta image and a system image for GSI.
The question now arises, how could one come back from a GSI into stock? I would assume I would need to do ADB push/pull and copy the whole system NAND to a file, then restore that if needed.
Would that be true? Or are there better / faster / safer ways to turn the phone to stock?
I have not yet received my unit, but i want to start tinkering with it as soon as I get my hands on it. So I want to know if there are any ways to undo any and all modifications i would do to the system.
Cheers
Can't twrp backup as system.img
ajaz35 said:
Can't twrp backup as system.img
Click to expand...
Click to collapse
I am unsure if this is being worded as a factual statement, or as a question.
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
ajaz35 said:
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
Click to expand...
Click to collapse
It should apply, but there's the issue of backups needing to be bit-perfect to ensure not to upset dm-verity
I have however found a bunch of commands that i will be testing in about 6 days, once i receive the terminal. I will be placing them for future reference, and for any poor souls who may need this:
Code:
adb backup --twrp -f /directory/to/save/dump.db
Not exactly my cup of tea, but this should combine bit-perfect system and vendor images with space-saving regular file copies of other lesser i mportant partitions, and ignoring the /data/media partition. Should be good enough.
Code:
adb root
adb shell 'dd if=/dev/block/mmcblk0 2>/dev/null' > mmcblk0.img
These two commands should, on an ideal world, with debugging enabled on the target device, and from within TWRP, create a bit-perfect copy of the entire nand and leave them on the CWD. however, the path may differ from what i've found, different chipset and all. However, that's nothing that a good old
Code:
lsblk -l
won't solve. The tricky bit will be actually pulling the file back. Since redirects can seemigly be used to copy the image file to the CWD, redirects may be able to be used to write to disk remotely. This one requires more research.
Alternatively, i will need to buy an OTG cable, get a large enough flash drive, and mount it for the purposes and DD'ing the file out and into the device. If all else fails, with 8GB of RAM it should be able to store 1/16 of the total NAND flash onto ram and slowly stitch the nand in chunks. Not shore how well would that go, too many points of failure. But keeping this for my own musings.
Another possible answer would be to boot into TWRP, running
Code:
lsblk -l
to see all the mount points, and using
Code:
adb push / adb pull
on each of them. Research indicates one can't copy the whole NAND this way, but individual partitions. Should suffice as long as the subsequent coopies are bit-perfect. Assuming one can push the generated image back, this may be the most satisfactory answer.
I will attempt to perform these tasks when i receive the phone and see if it can successfuly restore it's own backup.
ajaz35 said:
I am telling that TWRP Backs up system as System.img in most Phones.
Same should apply to Nord 2.
Click to expand...
Click to collapse
Additionally, one should note that i intend on fully backing up the NAND of the device. Just the system partition is insufficient. as there may be updates on the way that may make restoring the system partition from an OTA image impossible. Therefore, a full NAND copy is needed. altnernatively, if a low-level copy cannot be achieved, individual bit-perfect copies of individual partitions will need to suffice, and hoping no GSI or custom rom maniulates any of the protected partitions.
Do you flash the system.img from my backup?
Oneplus Nord 2 Oxygen 11.3 DN2103 EEA ROM
Flash at your own risk. I am not responsible for any damage or data loss to the device during this process! Downloads: The Fastboot restoration file can be downloaded in here: DN2103_11_A.07 DN2103_11_A.10 *deleted DN2103_11_A.11 *deleted...
forum.xda-developers.com
sakarya1980 said:
Do you flash the system.img from my backup?
Oneplus Nord 2 Oxygen 11.3 DN2103 EEA ROM
Flash at your own risk. I am not responsible for any damage or data loss to the device during this process! Downloads: The Fastboot restoration file can be downloaded in here: DN2103_11_A.07 DN2103_11_A.10 *deleted DN2103_11_A.11 *deleted...
forum.xda-developers.com
Click to expand...
Click to collapse
As I stated previously. I have yet to receive my terminal. So I haven’t flashed anything yet.
however, disabling dm-verity, installing your system image, see it it fails, and if it fails, backing up, will be a great way to test if my backups are effective.
I want to toy around with your image and PHH’s once I get the terminal. So I’m just trying to preemptively have backups in place for when I inevitably flash something without paying attention and bricking the device.
that reminds me, were you the one who needed a full system dump a few weeks ago on another thread? I can upload my image once I get it working
Edit: just checked it was phhusson who needed the dump. Sorry about the mix up
ZanaGB said:
As I stated previously. I have yet to receive my terminal. So I haven’t flashed anything yet.
however, disabling dm-verity, installing your system image, see it it fails, and if it fails, backing up, will be a great way to test if my backups are effective.
I want to toy around with your image and PHH’s once I get the terminal. So I’m just trying to preemptively have backups in place for when I inevitably flash something without paying attention and bricking the device.
that reminds me, were you the one who needed a full system dump a few weeks ago on another thread? I can upload my image once I get it working
Edit: just checked it was phhusson who needed the dump. Sorry about the mix up
Click to expand...
Click to collapse
I tested rhe gsi Versions, but not good i flash my system.img, dtbo, persist and vbmeta and go back to stock
Just got notified that the phone arrived. So this evening i will get it up and running then worry about backing up later.
Hi. How return the device to stock and lock bootloader? Is there manual?​
shnailcheg said:
Hi. How return the device to stock and lock bootloader? Is there manual?​
Click to expand...
Click to collapse
Assuming you didn't install any custom ROM, all you have to do is boot onto fastboot and type fastboot OEM lock or fastboot flashing lock. Forgot which exactly.
I have root installed
shnailcheg said:
I have root installed
Click to expand...
Click to collapse
restore your full NAND backup and godspeed
have you tried this method on nord 2?
shnailcheg said:
have you tried this method on nord 2?
Click to expand...
Click to collapse
I made a nand copy but never backed it up.I ended up not needing root for anything and I won't install any ROMs until there's any good ways to have a failsafe for backups. So to all effects I have a backup I haven't tested. I am not gonna risk losing my IMEI or having a zombified phone due to missing blocks on the backup.
To be specific. I have ways to get data OUT of the phone. But I don't have a reliable way to get the data IN and ensure nothing critical is missing or overwritten in the process. And I am too afraid to lose my phone just testing if backups ACTUALLY work.
K
ZanaGB said:
I am a bit of a scaredy cat, and I don’t want to pollute the GSI thread with this question.
OnePlus is not offering fast boot flash images for their Nord 2. And the only way to get a custom rom is by flashing a custom vbmeta image and a system image for GSI.
The question now arises, how could one come back from a GSI into stock? I would assume I would need to do ADB push/pull and copy the whole system NAND to a file, then restore that if needed.
Would that be true? Or are there better / faster / safer ways to turn the phone to stock?
I have not yet received my unit, but i want to start tinkering with it as soon as I get my hands on it. So I want to know if there are any ways to undo any and all modifications i would do to the system.
Cheers
Click to expand...
Click to collapse
Keep nandroid backup evry time you want to go back just restore that nandroid backup using twrp if you gets data restoration error just deselect data emmc win file in backup and restore.
Remember on android 12 gsi twrp data encryption issue so u can't able to access internal storage to restore the backup so first go back to android 11 gsi, now transfer that backup to twrp folder and then boot back to twrp and restore
I personally done this when I stuck on android 12gsi
pankspoo said:
K
Keep nandroid backup evry time you want to go back just restore that nandroid backup using twrp if you gets data restoration error just deselect data emmc win file in backup and restore.
Remember on android 12 gsi twrp data encryption issue so u can't able to access internal storage to restore the backup so first go back to android 11 gsi, now transfer that backup to twrp folder and then boot back to twrp and restore
I personally done this when I stuck on android 12gsi
Click to expand...
Click to collapse
One thing i have been reading from the TWRP Nandroid backups, is that people who install the GSI and then restore, lose their IMEI data and other baked-in addresses.
Is that the case? I would imagine that since TWRP backups aren't bit-for-bit it could cause problems. Have you tested for that?
EDIT: additionally, i guess i absolutely need an OTG adatper to properly restore the backup, since the mere ac of restoring the backup would destroy the backup in the process, wouldn't it?
ZanaGB said:
One thing i have been reading from the TWRP Nandroid backups, is that people who install the GSI and then restore, lose their IMEI data and other baked-in addresses.
Is that the case? I would imagine that since TWRP backups aren't bit-for-bit it could cause problems. Have you tested for that?
EDIT: additionally, i guess i absolutely need an OTG adatper to properly restore the backup, since the mere ac of restoring the backup would destroy the backup in the process, wouldn't it?
Click to expand...
Click to collapse
No if u r on android 12 gsi u need OTG there twrp will not work.
No issue in Restoration on android 11gsi
pankspoo said:
No if u r on android 12 gsi u need OTG there twrp will not work.
No issue in Restoration on android 11gsi
Click to expand...
Click to collapse
So. The way i understand it.
1: Full backup from the stock ROM ( Android 11 Based ) using TWRP
2: Install a GSI, for example, Android 12 GSI
3: In need of going back, first install the Android 11 GSI
4: Once with the 11 GSI installed, recover the TWRP Backup
Would that be correct?

Categories

Resources