best non-root backup before unlocking bootloader? - Xiaomi Redmi Note 5 / 5 Plus Questions & Answers

Hi,
I can finally unlock the bootloader - which AFAIK wipes user data. Now, since I've used the phone heavily over the waiting period, there's a lot to backup and reintegrate later on.
What's the quickest way to do so?
MTP-copy all of Internal Storage to PC -> unlock -> copy back?
(I am experienced with unlocking, rooting, flashing Roms and recoveries, but haven't had a non-rooted phone for about 8 years, so I am a bit out of the loop on non-root backup procedures)
TIA!

Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacy​Helium should be sufficient for apps.

For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.

omnomnomkimiiee said:
Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacy​Helium should be sufficient for apps.
Click to expand...
Click to collapse
Thanks.
Any advantage of using adb vs. just mounting the device via mtp? Last I've used adb for file transfer it was slower than even mtp...
jes0411 said:
For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
Click to expand...
Click to collapse
do you mean "to be able to root"? because otherwise I don't follow...
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.
Click to expand...
Click to collapse
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?

santoo said:
do you mean "to be able to root"? because otherwise I don't follow...
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?
Click to expand...
Click to collapse
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.

jes0411 said:
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.
Click to expand...
Click to collapse
Thanks for the explanations!
I plan on just unlocking bootloader, enabling cam2 and installing a current gcam today - I'll wait with flashing until miui10 stable is released in the next week or so, so I can do a "fair" comparison between Lineage and Miui (and possibly some others)

jes0411 said:
For me unlocking didn't wipe data.
Click to expand...
Click to collapse
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.

santoo said:
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.
Click to expand...
Click to collapse
I only shared my experience.
My data was wiped when I installed developer rom to bind account but when I unlocked bootloader after 360h data remained intact. When I flashed twrp phone didn't boot but I solved it flashing magisk.

jes0411 said:
I only shared my experience.
Click to expand...
Click to collapse
Yes, and I thank you for it.
I was not accusing you of anything - things may well have changed with different versions of MIUI or different versions of the unlock tool, or between chinese/global versions. Just a warning for others that, at least with the versions I posted, having a backup is reaaaaally nice :good:

Related

Root with unlocked bootloader on miui 10

Guys I need root but don't want to lose data and internal storage so my question is this
With unlocked bootloader if I flash twrp after wiping just cache and dalvik and then immediately flash magisk or maybe reboot to recovery and flash magisk, will my data remain as it is and will I get root.
I understood I will lose twrp on first boot.
sanjay0501 said:
Guys I need root but don't want to lose data and internal storage so my question is this
With unlocked bootloader if I flash twrp after wiping just cache and dalvik and then immediately flash magisk or maybe reboot to recovery and flash magisk, will my data remain as it is and will I get root.
I understood I will lose twrp on first boot.
Click to expand...
Click to collapse
No data will not be deleted but you will need to flash lazy flasher after that in order to boot properly. But i would suggest wait for a stable twrp recovery or official twrp ?
CluelessO.o said:
No data will not be deleted but you will need to flash lazy flasher after that in order to boot properly. But i would suggest wait for a stable twrp recovery or official twrp
Click to expand...
Click to collapse
Thanks. Don't want to risk data being erased so will wait
sanjay0501 said:
Thanks. Don't want to risk data being erased so will wait
Click to expand...
Click to collapse
Magisk or twrp doesn't delete your data ? since you have already unlocked your bootloader .
CluelessO.o said:
Magisk or twrp doesn't delete your data since you have already unlocked your bootloader .
Click to expand...
Click to collapse
Agreed, but to the best of my knowledge we have to flash FDE and then format everything fir twrp to stick. Not sure about root though, that's why asking. Prepared to lose twrp if I can retain root without losing data.
First install twrp and format everything.. then reboot
It wl encrypt data automatically. Again flash twrp and then format then install force encryption zip and then install magisk. BOOM!
You get ua recovery n root too.

Finally Encrypted MI 8!

I have been struggling to encrypt MI 8 as without encryption, I feel like I am walking naked
After lots of trial and error, finally got it working. Here are the steps:
Prerequisites: Flash TWRP (TWRP-3.2.3-1110-XIAOMI8-EN-wzsx150) by @gulp79 - https://goo.gl/scMQwd
1. Copy the following files to the phone:
a. Vendor/firmware from @infrag - https://drive.google.com/open?id=1BJKthOJrWaWevaxus7rYkJNc95icIOsD
b. Copy Havoc (Dipper Update 25-11-2018) by @ZeNiXxX + Gapps to the phone.
c. Titanium Backup all the user apps and copy the backup to your PC. You will have to format data and you will lose everything on the phone.
2. Reboot to TWRP.
3. Flash vendor/firmware + Havoc + Gapps.
4. Wipe - Format Data (where you have to type "yes"). This will wipe everything from your /data partition, including /sdcard.
5. Reboot to System.
6. Setup the phone and add fingerprint/PIN (important).
7. Restore the user apps from Titanium Backup by copying the backup from the PC.
8. If you need Magisk, copy it to /sdcard and reboot to TWRP and flash it. When you boot to TWRP, you will be prompted to enter PIN to decrypt data.
Voila!
Phone is encrypted and you can sleep happy.
PS: Big thanks to @ZeNiXxX (for an awesome and feature rich Havoc ROM), @gulp79 (for converting the latest TWRP to English), @infrag (for providing the flashable vendor/firmware), @milouk (default kernel in Havoc), and OpenGAPPS team.
What exactly does it do?
By.TRabZonLu™ said:
What exactly does it do?
Click to expand...
Click to collapse
It encrypts your phone. If you ever lose a phone, no one can access your data.
Without encryption, if you give me a phone which has a PIN or Pattern setup with/without fingerprint, I can easily remove the PIN/Pattern in TWRP and boot your phone and look at all the data.
Without encryption, it's analogous to walking naked.
You should specify that it is for AOSP & LOS in title, MIUI Stock Global & China has built in System & Data encryption already. ( .EU multi ROM has only system encryption)
RainGater said:
I have been struggling to encrypt MI 8 as without encryption, I feel like I am walking naked
Snip
Click to expand...
Click to collapse
My phone is on global stable. Do I use the same steps if I want to keep my phone encrypted? Thanks a lot!
What if you want to have encryption using MIUI ROM ?
pmatthew said:
What if you want to have encryption using MIUI ROM ?
Click to expand...
Click to collapse
This thread is outdated, encryption works well now.
nfsmw_gr said:
This thread is outdated, encryption works well now.
Click to expand...
Click to collapse
I would not say that; yesterday I turned on the Phone encryption on xiaomi.eu stable rom (MIUI 10.2), and after that the phone booted only to Recovery. I had to format data, reinstall the ROM, and modify fstab.qcom, to have encryption...
pmatthew said:
I would not say that; yesterday I turned on the Phone encryption on xiaomi.eu stable rom (MIUI 10.2), and after that the phone booted only to Recovery. I had to format data, reinstall the ROM, and modify fstab.qcom, to have encryption...
Click to expand...
Click to collapse
I still can't find a way for GLOBAL ROM (latest PIE) to have DATA & SYSTEM encryption while keeping ROOT. Boot loops to recovery every time.... If anyone has this or can achieve this, please share. The closest i've been is I can get root, and have DM Verity with Optional encryption just fine -but as soon as i choose to encrypt the phone from the menu, it errors trying, then continuously boot loops.
pmatthew said:
I would not say that; yesterday I turned on the Phone encryption on xiaomi.eu stable rom (MIUI 10.2), and after that the phone booted only to Recovery. I had to format data, reinstall the ROM, and modify fstab.qcom, to have encryption...
Click to expand...
Click to collapse
Agimax said:
I still can't find a way for GLOBAL ROM (latest PIE) to have DATA & SYSTEM encryption while keeping ROOT. Boot loops to recovery every time.... If anyone has this or can achieve this, please share. The closest i've been is I can get root, and have DM Verity with Optional encryption just fine -but as soon as i choose to encrypt the phone from the menu, it errors trying, then continuously boot loops.
Click to expand...
Click to collapse
Umm, I flashed latest global myself a couple of days ago through fastboot.
I admit I didn't root the clean booted global rom, but mi-globe and xiaomi.eu variants got rooted just fine for me with Magisk V18.0.
nfsmw_gr said:
Umm, I flashed latest global myself a couple of days ago through fastboot.
I admit I didn't root the clean booted global rom, but mi-globe and xiaomi.eu variants got rooted just fine for me with Magisk V18.0.
Click to expand...
Click to collapse
Of course, Root without encryption is fine. Try running ROOT with DATA & SYSTEM encryption. That is the issue i am finding. Xiaomi.eu doesn't come with encryption out of the box for DATA. GLOBAL ROM defaults to encryption for SYSTEM & DATA on first boot. If it's not encrypted or flashing the DM-Verity/FEC remover first, running Magisk root is fine. As i stated, GLOBAL ROM with ROOT and FULL system & data encryption is where the issue lies.
Agimax said:
Of course, Root without encryption is fine. Try running ROOT with DATA & SYSTEM encryption. That is the issue i am finding. Xiaomi.eu doesn't come with encryption out of the box for DATA. GLOBAL ROM defaults to encryption for SYSTEM & DATA on first boot. If it's not encrypted or flashing the DM-Verity/FEC remover first, running Magisk root is fine. As i stated, GLOBAL ROM with ROOT and FULL system & data encryption is where the issue lies.
Click to expand...
Click to collapse
No I mean I was encrypted as well.
I'd try again just to be sure about what I said but I've finalized my LOS setup right now haha.
I'm almost 100% certain I was encrypted because I never formated data from twrp, just flashed stock, twrp, xiaomi.eu, magisk.
This shouldn't remove the encryption, and besides without the remover zip the rom enforces encryption, and I didn't flash the remover zip.
nfsmw_gr said:
No I mean I was encrypted as well.
I'd try again just to be sure about what I said but I've finalized my LOS setup right now haha.
I'm almost 100% certain I was encrypted because I never formated data from twrp, just flashed stock, twrp, xiaomi.eu, magisk.
This shouldn't remove the encryption, and besides without the remover zip the rom enforces encryption, and I didn't flash the remover zip.
Click to expand...
Click to collapse
- you said you flashed twrp, xiaomi.eu and magisk. Xiaomi.eu isn't encrypted by default without editing the values manually......Soo.... No you didn't have encryption and root in that scenario.
Agimax said:
- you said you flashed twrp, xiaomi.eu and magisk. Xiaomi.eu isn't encrypted by default without editing the values manually......Soo.... No you didn't have encryption and root in that scenario.
Click to expand...
Click to collapse
If I didn't format data after flashing xiaomi.eu the encryption has no reason to be gone.
If it had gone then the internal storage on my device would be blank. But all the files were there.
So yeah the encryption remained.
In any case believe what you will, I'm not gonna flash everything again just to prove my point.
If I need to go back to miui for any reason I'll do it and post back, otherwise give it a go yourself.
nfsmw_gr said:
If I didn't format data after flashing xiaomi.eu the encryption has no reason to be gone.
If it had gone then the internal storage on my device would be blank. But all the files were there.
So yeah the encryption remained.
In any case believe what you will, I'm not gonna flash everything again just to prove my point.
If I need to go back to miui for any reason I'll do it and post back, otherwise give it a go yourself.
Click to expand...
Click to collapse
I've tried xiaomi.eu in the past. The latest build i tried is dec 22, 2018, but the phone never encrypted. Contrary to LOS it always encrypted when i flashed it.
So, if your phone encrypted, then you need to decrypt it by entering the pattern/security when booting to recovery right?
To make sure if my phone encrypted, i boot to twrp and security pattern will appear. If its not encrypted, there will be no security pattern in twrp boot. I double checked it with connecting the phone with usb cable, An encrypted phone will always displaying random text/folder file, while not encrypted phone always display the real file.
So, i formatted data and flash xiaomi.eu (magisk etc) to see if it encrypted, its not. And i wipe everything again, i flashed LOS (etc), but it still not encrypted. So, i formatted data, and flash LOS (etc) right away, and the the phone was encrypt.
I think the fault was xiaomi.eu dec 22 build???
So, my final conclusion atm xiaomi.eu encryption is still fail.
Sent from my Mi 8 using Tapatalk
Yes MIUI ROM encryption is still fail
Just to confirm post above.
This eu rom encrypt only if you trip Fstab or you flash before an official Miui rom and encrypt it. then you can flash custom miui rom or miuirum and encrytion stay.
I don't explain why but I tested it on my old MI5.
Totally an unnecessary effort, but useful for those FBI agents. It's also hard to remove the encryption tho, I flashed a thousand times to remove the encryption and I won't mess with it again, but still an useful thread for FBI agents.
Finally figured out how to Root MIUI Global Stock AND keep DATA/Storage encryption
https://forum.xda-developers.com/showpost.php?p=78988313&postcount=4
Does this have something in relation with the bootloop when I try to flash any ROM that's different than MIUI? I'm very curious because my Mi 8 started to have bootloop problems when the Android Pie came out. Only one version of TWRP works for me, PixelExperience gives me bootloop when I flash it, xiaomi.eu works only following very specific steps (and this is the only one I've succesfully installed).

TWRP and Xiaomi Anti-rollback

There is an excellent explanation of Xiaomi's antirollback features elsewhere on the site. The thread contains a general overview of the steps required to install TWRP to flash a custom ROM. In brief (i) boot into TWRP installed on local machine with adb (ii) use TRWP to install TWRP itself and/or the ROM (iii) flash away....
My experience has been that TWRP run from the local machine cannot decrypt and access the file system to read/write/execute files. This is despite using the correct PIN, no PIN, factory reset. Note that TWRP cannot access /data so cannot selectively format it.
Any suggestions for a n00b???
droid_tsar said:
There is an excellent explanation of Xiaomi's antirollback features elsewhere on the site. The thread contains a general overview of the steps required to install TWRP to flash a custom ROM. In brief (i) boot into TWRP installed on local machine with adb (ii) use TRWP to install TWRP itself and/or the ROM (iii) flash away....
My experience has been that TWRP run from the local machine cannot decrypt and access the file system to read/write/execute files. This is despite using the correct PIN, no PIN, factory reset. Note that TWRP cannot access /data so cannot selectively format it.
Any suggestions for a n00b???
Click to expand...
Click to collapse
You cannot decrypt it because of:
a: you have to flash twrp with working decryption
b: boot to a custom recovery, WIPE DATA ONLY NOT FACTORY RESET (in advance) then flash Disable_Force_Encryption.zip (This will prevent the system to encrypt data from first boot)
Of course, everything you need is on XDA, just find it.
Xiaomi's AntiRollback feature prevents you from rollbacking from e.g MIUI 10 to MIUI 9 due to the vendor and firmware issues.
More details here https://www.xda-developers.com/xiaomi-anti-rollback-protection-brick-phone/amp/
Thanks Darklouis - solved the problem by not rebooting to the system before flashing the ROM...just reboot into bootloader mode without allowing the encryption to proceed, move ROM into storage and flash from TWRP. Worked well
Darklouis said:
You cannot decrypt it because of:
a: you have to flash twrp with working decryption
b: boot to a custom recovery, WIPE DATA ONLY NOT FACTORY RESET (in advance) then flash Disable_Force_Encryption.zip (This will prevent the system to encrypt data from first boot)
Of course, everything you need is on XDA, just find it.
Xiaomi's AntiRollback feature prevents you from rollbacking from e.g MIUI 10 to MIUI 9 due to the vendor and firmware issues.
More details here https://www.xda-developers.com/xiaomi-anti-rollback-protection-brick-phone/amp/
Click to expand...
Click to collapse
droid_tsar said:
Thanks Darklouis - solved the problem by not rebooting to the system before flashing the ROM...just reboot into bootloader mode without allowing the encryption to proceed, move ROM into storage and flash from TWRP. Worked well
Click to expand...
Click to collapse
Glad to help

Problem install custom rom via TWRP

My device is Mi 10 5G (umi). I have unlocked bootloader and install rom Xiaomi.eu 20.3.28.
Today, I go into TWRP, do wipe Art cache/Davilk, Data, System, Cache then format data.
Then I reboot to install another room. But now it got stuck there.
Sometimes it says System_root file is read only and cannot mounted. When I could manage to mount system, I could not install any rom. It fail after system partition unpacking. It says that /system can not mounted and keep bootloader to stuck with TWRP. I do not know how to deal with it.
Please help me!
moonsalini said:
My device is Mi 10 5G (umi). I have unlocked bootloader and install rom Xiaomi.eu 20.3.28.
Today, I go into TWRP, do wipe Art cache/Davilk, Data, System, Cache then format data.
Then I reboot to install another room. But now it got stuck there.
Sometimes it says System_root file is read only and cannot mounted. When I could manage to mount system, I could not install any rom. It fail after system partition unpacking. It says that /system can not mounted and keep bootloader to stuck with TWRP. I do not know how to deal with it.
Please help me!
Click to expand...
Click to collapse
reflash recovery in fastboot, reboot recovery, format data only, reboot recovery again copy the rom and install it
stefano alegnini said:
reflash recovery in fastboot, reboot recovery, format data only, reboot recovery again copy the rom and install it
Click to expand...
Click to collapse
I have just figure out that my problem come from installing mi-globe 20.4.30 rom. I will try your method to see if it could help, though I have reflashed recovery and do format/wipe for so many times without hope.
moonsalini said:
I have just figure out that my problem come from installing mi-globe 20.4.30 rom. I will try your method to see if it could help, though I have reflashed recovery and do format/wipe for so many times without hope.
Click to expand...
Click to collapse
I came from MI Globe without success ( system read only) in recovery.
You must renew the internal partition structure.
Install with Mi Flash the enterire Europe fastboot rom EEA
https://c.mi.com/oc/miuidownload/detail?guide=2
stefano alegnini said:
reflash recovery in fastboot, reboot recovery, format data only, reboot recovery again copy the rom and install it
Click to expand...
Click to collapse
Dear bro, it worked like a charm. Thank you so much for your help.
stefano alegnini said:
I came from MI Globe without success ( system read only) in recovery.
You must renew the internal partition structure.
Install with Mi Flash the enterire Europe fastboot rom EEA
https://c.mi.com/oc/miuidownload/detail?guide=2
Click to expand...
Click to collapse
I mean Mi-Globe rom, not global rom. You could find them here. Their rom is based on Xiaomi.eu rom.
moonsalini said:
I mean Mi-Globe rom, not global rom. You could find them here. Their rom is based on Xiaomi.eu rom.
Click to expand...
Click to collapse
Yes I know Mi globe, but this rom corrupted my recovery many times, now I'm on Xiaomi Eu stable without problems
stefano alegnini said:
Yes I know Mi globe, but this rom corrupted my recovery many times, now I'm on Xiaomi Eu stable without problems
Click to expand...
Click to collapse
Yes, that is exactly the problem. Now I am using Xiaomi.ei rom too. Thank you very much!

[Help] Confused how to proceed with custom ROM installation

Hello
I am using MIUI global 11.0.8 stock rom. Recently just unlocked the bootloader and trying to figure out how to flash LineageOS in it.
Tried to followed this guide https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
But it seems like it is pretty old and not updated. Should i follow this thread or there is something updated? Also feels like i'm missing various things like disabling encryption(!), needs to be on old stock rom for proper installation, customized TWRP recovery and specific Xiaomi programs to do it properly. Could someone identify the missing info/issues i'm having trouble with? TIA.
61zone said:
Hello
I am using MIUI global 11.0.8 stock rom. Recently just unlocked the bootloader and trying to figure out how to flash LineageOS in it.
Tried to followed this guide https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
But it seems like it is pretty old and not updated. Should i follow this thread or there is something updated? Also feels like i'm missing various things like disabling encryption(!), needs to be on old stock rom for proper installation, customized TWRP recovery and specific Xiaomi programs to do it properly. Could someone identify the missing info/issues i'm having trouble with? TIA.
Click to expand...
Click to collapse
FIRST OF ALL BACKUP YOUR DATA. Go to fastboot mode and flash latest twrp recovery. Boot to recovery and wipe cache, system and data. Since this is the first time you are installing a custom rom you should format data in twrp. After formatting data reboot to twrp then transfer latest Lineage OS flashable zip in you phone's storage and flash it. Then flash gapps if you want. Then magisk if you want root and DFE if you don't want encryption. That's it. Now reboot to system.
And remember google is your friend.
callmebutcher101 said:
FIRST OF ALL BACKUP YOUR DATA. Go to fastboot mode and flash latest twrp recovery. Boot to recovery and wipe cache, system and data. Since this is the first time you are installing a custom rom you should format data in twrp. After formatting data reboot to twrp then transfer latest Lineage OS flashable zip in you phone's storage and flash it. Then flash gapps if you want. Then magisk if you want root and DFE if you don't want encryption. That's it. Now reboot to system.
And remember google is your friend.
Click to expand...
Click to collapse
Actually there is too much information to handle at once that's why i got confused lol. Thanks for the infos :good:
I'll try to do according to your info.

Categories

Resources