Encryption and flashing custom software. - Xiaomi Redmi 8 Questions & Answers

Hello!
I would like to start flashing custom software on my Redmi 8 4/64 but I'm pretty confused about the encryption thing, could someone please explain to me how does it effect flashing custom stuff onto the device or point me to an article detailing it?
Do i need to decrypt my phone to install custom roms/recovery? Does wiping everything (doing a clean install) erase encryption? Can a custom rom re-encrypt the device? Can I decrypt it afterwards? Should I/do I need to?
I keep reading about this second space, is this something i should worry about when wiping or can I wipe everything like on older android phones?
I'm on Global Android 9 MIUI11 11.0.7.0 EEA if that matters.

Related

[Q] Magisk data partition remain encrypted.

Hi, everyone
Is it possible after installing magisk and rooted,to keep the data partition remain encrypted without bootloop ?
I have yet to find a way, however there is a user claiming to have root with data & system encryption on the Oreo 8.1 ROM. I'm on 9.0 Global, and tried a million different ways. Encryption is different from 8.1 to 9.0 ROMs. I think the .eu multi-language ROM based on China disables the Data encryption (even though it reports Encrypted, the system is encrypted). There was a thread here that told about possibly enabling data encryption while keeping root on the .eu multi-roms, but i have not tried. I prefer the Global ROM.
If anyone can get root with the System partition AND the Data partition fully encrypted, please let us know!
Here in the forum there is a topic where one member helps another to get it done, and the encryption is done. I do not know if there's root in the middle of the tutorial.
on official global I think there is no way to run rooted and encrypted.
on xiaomi EU encryption is disabled by default, but you can enable it by editing fstab. qcom in /vendor/etc. I have already posted about how to do it, search xda
The newer versions break twrp encryption support I was running miui.eu with encryption up untill stable 10.0.0.2. in 10.0.0.3 their must have been some sequrity upgrade that changed the encryption because twrp would no longer decrypt the data partition
mikefallen said:
The newer versions break twrp encryption support I was running miui.eu with encryption up untill stable 10.0.0.2. in 10.0.0.3 their must have been some sequrity upgrade that changed the encryption because twrp would no longer decrypt the data partition
Click to expand...
Click to collapse
The new TWRP-3.2.3-0918-XIAOMI8-CN-wzsx150 does decrypt 9.0 without issues. I use it, but still no way to have encrypted data with ROOT that i know of on Global ROM.
Is there any way to root/magisk global rom 10.0.3 ?, no need encrypted data.
Agimax said:
The new TWRP-3.2.3-0918-XIAOMI8-CN-wzsx150 does decrypt 9.0 without issues. I use it, but still no way to have encrypted data with ROOT that i know of on Global ROM.
Click to expand...
Click to collapse
Oh sweet ill have to check that out i hate not having encryption'
And yes you can run global with no encryption and root just flash no dm-crypt and wipe userdata, lots of guides

Xiaomi Mi Mix 2 Pie Update released

Finally. Open Beta, but running without Problems here! :good:
https://xiaomi.eu/community/threads/9-5-9.50450/
ARB
is possible install aosp Roms ?? no brik
miui pie?
adliradzif said:
miui pie?
Click to expand...
Click to collapse
Yes
Bluezzy said:
Yes
Click to expand...
Click to collapse
alright.I gonna test..thanks for the reply.
Just to let u know guys,Anti rollback system is enabled on pie ,so once u flash it,u cant downgrade to oreo 8.x
I got bootloop.I using custom ROM pie before and flash using twrp official
adliradzif said:
I got bootloop.I using custom ROM pie before and flash using twrp official
Click to expand...
Click to collapse
Its bootloop because your device is encrypted and cant boot,look in other threads there is a decrytption script and step by step how to flash this pie
I can't recommend a flash without Data formatting since it is a Major Android Update. If You want to face a bugfree and clean Device start from scratch by backing Up Your Internal Storage, flash Orange Fox and do a complete wipe followed by "format Data" and the flashing of the System. Every System has Problems with Updates, that will never Change but A/B Treble was a step in the right direction since its almost failsafe on Updates. We don't have A/B Support on the Mi Mix 2 so it will be the best to do clean Updates before You will loose Your Personal Data...
Flashing Scripts to avoid encryption is Just a dirty workaround btw. If You want a save and secure Device just do what i wrote before... Otherwise can everyone steal Your Device and get Access to EVERYTHING.
I've written a short tutorial how to use encrypted data on latest Mi MIX2 MIUI Android 9 Pie ROM
read here: https://forum.xda-developers.com/mi-mix-2/how-to/xiaomi-mi-mix2-encryption-android-9-pie-t3929322
Can I flash with miui recovery?
Which is Miui TWRP? Teamwin or Orangefox. I suggest the latter
Tapatalkkal Mi MIX 2
As soon as I install latest xiaomi eu pie and magisk 19.1 I get a message that find device storage corrupted your device is unsafe now. Everything except adding/removing fingerprints seems to work correctly. Then even if I clean data I still get this message. the only way to fix it is clean install latest Oreo (9.4.25). Then I can update to pie and it is ok until magisk. Anyone has experienced this behavior or can help?
cineq said:
As soon as I install latest xiaomi eu pie and magisk 19.1 I get a message that find device storage corrupted your device is unsafe now. Everything except adding/removing fingerprints seems to work correctly. Then even if I clean data I still get this message. the only way to fix it is clean install latest Oreo (9.4.25). Then I can update to pie and it is ok until magisk. Anyone has experienced this behavior or can help?
Click to expand...
Click to collapse
Same here, think/hope 18.1 will do the trick...
BR
Dirty flash with Xiaomi.eu Rom works great
Clean installed xiaomi.eu 9.5.9 Pie with magisk 19.1. It seems bluetooth paired devices are lost after each restart. Anyone experienced the same problem?
EDIT:
I've just pairted two bluetooth devices and changed their names. After two phone restarts both devices remain, so something helped.
So Im on global stable,only thing i need to do before flashing this pie is wiping internal strogae + data? I got so confused these days
Bluezzy said:
So Im on global stable,only thing i need to do before flashing this pie is wiping internal strogae + data? I got so confused these days
Click to expand...
Click to collapse
That's the failsafe way I'd always say: Better save Your Data BEFORE loosing them on a bricked or locked Device :silly:
Miustone said:
That's the failsafe way I'd always say: Better save Your Data BEFORE loosing them on a bricked or locked Device :silly:
Click to expand...
Click to collapse
So whats the right way to flash it since my phone is encrypted... flashing those scripts right?
Miustone said:
Same here, think/hope 18.1 will do the trick...
BR
Click to expand...
Click to collapse
Write an answer when/if you trie.

Enabling encryption on Pixel Experience ROM

Hi everyone! I'm very much a newbie when it comes to custom ROM's, so apologies if this is a a dumb question...
I just managed to install the latest Pixel Experience ROM on my K20 Pro, from the stock Chinese ROM. Before installing it, I had to flash DFE. So, from my understanding, it is now blocking me from re-enabling encryption. I need to have encryption enabled for work email access, so is it possible to enable it somehow? I'm not worried about losing any data on the phone, but I would certainly prefer to use Pixel Experience than to go back to MIUI.
Per another forum thread I found, one member suggested to "reflash your vendor/firmware." Is that accurate? If so, how do I do that, and what would be the result?
shleepy said:
Hi everyone! I'm very much a newbie when it comes to custom ROM's, so apologies if this is a a dumb question...
I just managed to install the latest Pixel Experience ROM on my K20 Pro, from the stock Chinese ROM. Before installing it, I had to flash DFE. So, from my understanding, it is now blocking me from re-enabling encryption. I need to have encryption enabled for work email access, so is it possible to enable it somehow? I'm not worried about losing any data on the phone, but I would certainly prefer to use Pixel Experience than to go back to MIUI.
Per another forum thread I found, one member suggested to "reflash your vendor/firmware." Is that accurate? If so, how do I do that, and what would be the result?
Click to expand...
Click to collapse
Why did you have to flash DFE? It's only used if you change roms frequently to avoid encryption.
I initially had trouble successfully installing the ROM. So, I started from scratch and followed some thorough instructions I found online, which included the DFE step. (I noticed that TWRP was previously showing an encryption error at the start of ROM installation; but I guess it could just be a "warning" more than an error. I suspect my problem before was probably more related to not having the latest MIUI update installed, or something like that.)
I don't plan on frequently swapping ROM's.
shleepy said:
I initially had trouble successfully installing the ROM. So, I started from scratch and followed some thorough instructions I found online, which included the DFE step. (I noticed that TWRP was previously showing an encryption error at the start of ROM installation; but I guess it could just be a "warning" more than an error. I suspect my problem before was probably more related to not having the latest MIUI update installed, or something like that.)
I don't plan on frequently swapping ROM's.
Click to expand...
Click to collapse
Your best bet is to go back to stock and start again. I believe installing an official fastboot ROM will restore encryption. Your previous issues were probably caused by not formatting data when flashing PE.
There is no requirement to disable encryption on this phone, ignore any guide that adds that as a step. You should only disable encryption if it's your personal preference to disable it.
Follow this guide.
Flash the latest Chinese 11.0.5 fastboot ROM. Make sure you don't lock the bootloader if using the Mi Flash Tool.
Boot into MIUI once to allow it to finalise the install, you don't need to do the initial phone setup once it boots into MIUI.
Boot into fastboot and install TWRP. I recommend the latest from mauronofrio which should be 3.1.1-32
Boot immediately into TWRP. I use the volume up button while powering up the phone.
Perform a factory reset in TWRP (using the swipe button), then format data (need to type 'yes' to confirm).
Reboot into TWRP using the TWRP boot menu, this ensures the newly formatted data partition is correctly mounted.
Copy over the PE ROM, then flash.
Boot into your new ROM, everything should be OK. Then boot back into TWRP to install Magisk if you want root.
shleepy said:
I initially had trouble successfully installing the ROM. So, I started from scratch and followed some thorough instructions I found online, which included the DFE step. (I noticed that TWRP was previously showing an encryption error at the start of ROM installation; but I guess it could just be a "warning" more than an error. I suspect my problem before was probably more related to not having the latest MIUI update installed, or something like that.)
I don't plan on frequently swapping ROM's.
Click to expand...
Click to collapse
Do yourself a favour and follow the instructions in the description of the rom, not some instructions you found online telling you to do some unnecessary stuff. Going to and from miui, format data, everything else just wipe cache, system and data to avoid issues, even then you can get away with dirty flashing aosp based roms 99% of the time imo.
As for the miui update, I have no idea how you came to that conclusion but just no, that's not how it works at all. Vendor firmware and the rom is all you need for pixel experience at the bare minimum.
You can try flashing the rom again, but don't flash the DFE.

Need help in flashing cutom roms

I got my device yesterday and today i have been trying to flash legion os 2.11 but i always keep getting error 7 even tried by installing global rom through mi flash tool but still got error 7 from twrp and oxfox both.
Can someone just guide me clearly on flashing roms on this k20 pro.
Currently i using global miui 11 11.0.4.0 rom but want to try other custom roms as well..
Ezio553 said:
I got my device yesterday and today i have been trying to flash legion os 2.11 but i always keep getting error 7 even tried by installing global rom through mi flash tool but still got error 7 from twrp and oxfox both.
Can someone just guide me clearly on flashing roms on this k20 pro.
Currently i using global miui 11 11.0.4.0 rom but want to try other custom roms as well..
Click to expand...
Click to collapse
Try the latest TWRP from here.
https://forum.xda-developers.com/k2...icial-twrp-xiaomi-redmi-t3944363/post79823568
If you still get the same problem, report back in this thread.
Robbo.5000 said:
Try the latest TWRP from here.
https://forum.xda-developers.com/k2...icial-twrp-xiaomi-redmi-t3944363/post79823568
If you still get the same problem, report back in this thread.
Click to expand...
Click to collapse
yeah finally the twrp 3.4 unofficial worked fine from global miui 11 rom i wiped everything and flashed indian vendor-firmware file and then flashed rom with fcrypt zip file nd worked fine...
Thanks for suggesting this file i was using youtube videos as guide and everyone was using oxfox or older twrp..
Ezio553 said:
yeah finally the twrp 3.4 unofficial worked fine from global miui 11 rom i wiped everything and flashed indian vendor-firmware file and then flashed rom with fcrypt zip file nd worked fine...
Thanks for suggesting this file i was using youtube videos as guide and everyone was using oxfox or older twrp..
Click to expand...
Click to collapse
I've got a bit more time to reply now.
OFox is really designed to be used with MIUI. The majority of it's extra features are specific to running MIUI. I would only recommend it if you decide to stick with MIUI in the long run.
The TWRP I pointed to is from the dev who maintains the official TWRP for our device. The unofficial version you've installed is identical to the official version, but with the TWRP app removed. If you intend to stick with custom ROMs, I recommend you stick with TWRP from mauronofrio.
If you prefer to have your phone encrypted, then there was no need to flash fcrypt/DFE. There are a small number of users that continue to insist that we need to disable encryption, but it is not needed.
Having the phone unencrypted does make life a little easier when flashing, but if you prefer the security and want to know about living with an encrypted phone, reply back and I'll give you more details.
Robbo.5000 said:
I've got a bit more time to reply now.
OFox is really designed to be used with MIUI. The majority of it's extra features are specific to running MIUI. I would only recommend it if you decide to stick with MIUI in the long run.
The TWRP I pointed to is from the dev who maintains the official TWRP for our device. The unofficial version you've installed is identical to the official version, but with the TWRP app removed. If you intend to stick with custom ROMs, I recommend you stick with TWRP from mauronofrio.
If you prefer to have your phone encrypted, then there was no need to flash fcrypt/DFE. There are a small number of users that continue to insist that we need to disable encryption, but it is not needed.
Having the phone unencrypted does make life a little easier when flashing, but if you prefer the security and want to know about living with an encrypted phone, reply back and I'll give you more details.
Click to expand...
Click to collapse
I tried Legion Os which is Aosp based and it installed fine but then i tried Masik X 16 which again said this isn't for your device so had to make changes in updater script then it flashed fine.
Also i would like to know about decryption of storage and would it cause any issues in flashing roms again nd again..
Ezio553 said:
I tried Legion Os which is Aosp based and it installed fine but then i tried Masik X 16 which again said this isn't for your device so had to make changes in updater script then it flashed fine.
Also i would like to know about decryption of storage and would it cause any issues in flashing roms again nd again..
Click to expand...
Click to collapse
If you want to be permanently decrypted, then you will not have any problems flashing ROMs. However, whenever you need to update the vendor and firmware, you will also need to flash the DFE script again.
If you want to be encrypted, then the best thing to do, every time you flash, is to temporarily remove encryption by removing all lockscreen security just before flashing, then once you've finished, restore encryption by adding back lockscreen security. However, if you restore MIUI, then choose to go to another custom ROM, you will need to format the data partition when flashing over MIUI, even if you've removed lockscreen security first.
Robbo.5000 said:
If you want to be permanently decrypted, then you will not have any problems flashing ROMs. However, whenever you need to update the vendor and firmware, you will also need to flash the DFE script again.
If you want to be encrypted, then the best thing to do, every time you flash, is to temporarily remove encryption by removing all lockscreen security just before flashing, then once you've finished, restore encryption by adding back lockscreen security. However, if you restore MIUI, then choose to go to another custom ROM, you will need to format the data partition when flashing over MIUI, even if you've removed lockscreen security first.
Click to expand...
Click to collapse
Ok that means going from miui to aosp & vice versa - format data needed.
So this should similarly apply to all Miui based roms like xiaomi.eu or masik x or it is just for stock miui.
Ezio553 said:
Ok that means going from miui to aosp & vice versa - format data needed.
So this should similarly apply to all Miui based roms like xiaomi.eu or masik x or it is just for stock miui.
Click to expand...
Click to collapse
As far as I know, you only need to format data when flashing over official MIUI. I don't know the details, but it is my understanding that encryption on MIUI does not follow standard practice, which is why it it's necessary to format data when flashing over MIUI. I don't believe this issue exists with MIUI based custom ROMs, or when reverting back to MIUI.
Though, there may be occasions, when flashing from one AOSP ROM to another, and the phone is encrypted, when you may get a bootloop. In this case booting to TWRP and formatting data, will fix the problem. This is why I earlier recommended temporarily removing lockscreen security, if you choose to have an encrypted phone, even though this is a rare occurrence.
Robbo.5000 said:
As far as I know, you only need to format data when flashing over official MIUI. I don't know the details, but it is my understanding that encryption on MIUI does not follow standard practice, which is why it it's necessary to format data when flashing over MIUI. I don't believe this issue exists with MIUI based custom ROMs, or when reverting back to MIUI.
Though, there may be occasions, when flashing from one AOSP ROM to another, and the phone is encrypted, when you may get a bootloop. In this case booting to TWRP and formatting data, will fix the problem. This is why I earlier recommended temporarily removing lockscreen security, if you choose to have an encrypted phone, even though this is a rare occurrence.
Click to expand...
Click to collapse
Thanks for the info.
I tried custom miui rom and well flashing dfe worked fine so i think its just for official miui.

Cant Unroot my redmi note 9

Please answer my all questions properly .
how to unroot redmi note 9 but there are some conditions will it still work though -:
I have an unlocked bootloader
I have an custom recovery unofficial twrp dimenzino recovery like something it's name
__________
I went to an local shop they were saying if your phone got bricked it's your responsibility and were charging me ₹800 .. Is it true about bricking issue ?
___________
When I was doing it from magisk app it was giving insufficient partition size error . Can i have a reason for that and can it be unrooted in this condition?
____________
And now please tell the things in order to do like
First i have to remove custom recovery and tell the way ? Or it will be removed by flashing boot.img .
I have installed miui 13 so going to 12.5 will downgrade Android version ? I have listened that downgrading Android can brick pls confirm or i will stay to miui 13 only
Then how to lock bootloader after unrooting
And i know about data backup but it will reset my device ?
Where will I get original boot.img for my device provide link if possible Redmi note 9 (Merlin) Indian Varient.
What software will be used in pc and how to operate tutorial if possible .
Please reply all the questions..
Am regretting why I rooted without having zero knowledge please help me
Unfortunately, downgrading from MIUI 13 (A12) to MIUI 12 (A10/11) is/may not (be) possible because of the security patches and MIUI's anti-rollback feature. I could only downgrade my MIUI 12 back to 11 as it was still Android 10. You can unroot your device by flashing the MIUI using the Mi Flash. Just remember to choose a lock option and not Wipe Internal storage as you may lose the IMEI numbers and the whole NVRAM. I can't verify if it will work for you. It worked on my Redmi Note 9 Global (EEA). Also, I'm not sure about the MIUI and Android vendor downgrading as I've seen many people hard bricking their devices by forcing and bypassing the MIUI Recovery "Can't downgrade this MIUI version" error. Maybe I'm wrong in something. Feel free to criticize and fix my mistakes. Unlocking a bootloader and flashing a custom ROM is considered to be "irreversible and permanent" as the user's goal may be to get rid of the MIUI and full control of the phone/OS.
Mineplayerminer said:
Unfortunately, downgrading from MIUI 13 (A12) to MIUI 12 (A10/11) is/may not (be) possible because of the security patches and MIUI's anti-rollback feature. I could only downgrade my MIUI 12 back to 11 as it was still Android 10. You can unroot your device by flashing the MIUI using the Mi Flash. Just remember to choose a lock option and not Wipe Internal storage as you may lose the IMEI numbers and the whole NVRAM. I can't verify if it will work for you. It worked on my Redmi Note 9 Global (EEA). Also, I'm not sure about the MIUI and Android vendor downgrading as I've seen many people hard bricking their devices by forcing and bypassing the MIUI Recovery "Can't downgrade this MIUI version" error. Maybe I'm wrong in something. Feel free to criticize and fix my mistakes. Unlocking a bootloader and flashing a custom ROM is considered to be "irreversible and permanent" as the user's goal may be to get rid of the MIUI and full control of the phone/OS.
Click to expand...
Click to collapse
Thanks for the response but can i have talk with you personally am having zero knowledge about it ok I want to remain to A13 global miui in Indian Varient and where will I find boot.img and flashing process via mi flash tool and what Is lock option how to enable it and not wipe my data. Pls tell. Am not sure what am I saying but custom recovery which i have and the boot.img will remove that custom recovery and Unroot my device and i need firmware file which is like 30mb and flash the folder containing files ?
gaurav_t said:
Thanks for the response but can i have talk with you personally am having zero knowledge about it ok I want to remain to A13 global miui in Indian Varient and where will I find boot.img and flashing process via mi flash tool and what Is lock option how to enable it and not wipe my data. Pls tell. Am not sure what am I saying but custom recovery which i have and the boot.img will remove that custom recovery and Unroot my device and i need firmware file which is like 30mb and flash the folder containing files ?
Click to expand...
Click to collapse
Lock option locks the bootloader, like it came out of box. You can find the boot.img file in the ROM's package or in the MIUI's folder called Images. Lock option needs to wipe the device as it's enabling back the security layers to the memory to prevent injecting bad codes into the device. Unlocking disables it on the other side, that's why a full wipe is necessary.
Mineplayerminer said:
Lock option locks the bootloader, like it came out of box. You can find the boot.img file in the ROM's package or in the MIUI's folder called Images. Lock option needs to wipe the device as it's enabling back the security layers to the memory to prevent injecting bad codes into the device. Unlocking disables it on the other side, that's why a full wipe is necessary.
Click to expand...
Click to collapse
Just saw there are three options clear user data and clean and lock and one more can't remember which should i

Categories

Resources