Encryption In POCO F1 - Xiaomi Poco F1 Questions & Answers

I recently installed the pixel experience rom on poco f1 . I had to flash the DFE zip, so now twrp is open and anyone can put a usb cable and copy all the data. So how can I encrypt my phone again and also keep the custom rom, so that data is not vulnerable. I have been flashing roms for some time, but I am new to the concept of encryption.
Thanks

First backup. Use TWRP and backup everything except System and Vendor, choose Sysytem Image & Vendor Image.
Dirty flash PE. Don't flash DFE after flashing PE. You'll now be encrypted.

Related

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).

*Urgent* Need clarifications regarding the flashing of TWRP recovery & custom ROMs

*Urgent* Need clarifications regarding the flashing of TWRP recovery & custom ROMs
I want to flash a custom ROM (Pixel Experience Plus) on my Poco/Pocophone F1.
It would be of great help if I get clarifications regarding the following:
1. After unlocking the bootloader, is it necessary to flash TWRP recovery using 'fastboot flash recovery' cmd command, to flash a custom ROM? Or can TWRP recovery just be booted by using the 'fastboot boot' cmd command & then flash the ROM? (This is because I'd prefer to flash a custom ROM without permanently flashing TWRP recovery, I want TWRP temporarily)
2. In case if it's necessary to flash TWRP using 'fastboot flash recovery' cmd command, then do I have to flash DFE (Disable Force Encryption). Can I skip flashing DFE? (Because I don't want to flash DFE & want TWRP temporarily)
3. I want a clean install of the custom ROM. So, can I wipe Dalvilk/ART cache, Data, System, Cache, Internal Storage, SDCard? i.e. everything except, USBOTG (Because, the custom ROM & firmware ZIP files are stored in it & I'll flash them from USB OTG device).
Would this type of wiping affect the TWRP recovery?
4. After wiping everything except USBOTG, can the custom ROM & firmware ZIP files be transferred into the phone's internal storage by connecting it to the PC, while in TWRP recovery?
5. Is it safe to flash the ZIP files from a USB OTG device?
6. As I already mentioned that I want TWRP temporarily (If it's possible). After flashing the firmware & custom ROM. If the recovery is still a stock Mi recovery. Would it affect the functioning of the custom ROM in any way?
If all of the above can be done, is this one of the proper way to flash/boot TWRP recovery & flash a custom ROM? If not, please guide me accordingly.
imegsp said:
I want to flash a custom ROM (Pixel Experience Plus) on my Poco/Pocophone F1.
It would be of great help if I get clarifications regarding the following:.
Click to expand...
Click to collapse
i'm no expert and i'm fairly new to flashing if you're kind enough to read it here's my 2cents.
1) I believe it is necessary to flash with that command & have TWRP as your custom recovery , it is packed with powerful tools. so i don't see a problem not wanting it permanently and it saves you the hassle of flashing it again when changing roms , fixes,etc..
2) Yes , you need to flash the DFE so you won't encounter any errors in TWRP later.
3) " Dalvilk/ART cache, Data, System, Cache " this should be okay , no need to flash everything. for best practices do a factory wipe in TWRP and in advanced mode wipe those 4. make sure to create a backup in-case something goes wrong.
4) I haven't tried this yet , but it seems not doable as you need permission in the phone for the default USB connection toggle if it's in data transfer mode , usb debuggin , charging etc. best is boot your phone then do the transfer in file manager.
5) Yes it is safe since OTG is another form of External Data devices such as SD Card , etc.
6) No it wouldn't affect the rom functionality since rom and recovery is two different thing.. but still , to avoide future mishaps stick with TWRP
you can check this helpful link by madsponge26 : https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
imegsp said:
I want to flash a custom ROM (Pixel Experience Plus) on my Poco/Pocophone F1.
It would be of great help if I get clarifications regarding the following:
1. After unlocking the bootloader, is it necessary to flash TWRP recovery using 'fastboot flash recovery' cmd command, to flash a custom ROM? Or can TWRP recovery just be booted by using the 'fastboot boot' cmd command & then flash the ROM? (This is because I'd prefer to flash a custom ROM without permanently flashing TWRP recovery, I want TWRP temporarily)
2. In case if it's necessary to flash TWRP using 'fastboot flash recovery' cmd command, then do I have to flash DFE (Disable Force Encryption). Can I skip flashing DFE? (Because I don't want to flash DFE & want TWRP temporarily)
3. I want a clean install of the custom ROM. So, can I wipe Dalvilk/ART cache, Data, System, Cache, Internal Storage, SDCard? i.e. everything except, USBOTG (Because, the custom ROM & firmware ZIP files are stored in it & I'll flash them from USB OTG device).
Would this type of wiping affect the TWRP recovery?
4. After wiping everything except USBOTG, can the custom ROM & firmware ZIP files be transferred into the phone's internal storage by connecting it to the PC, while in TWRP recovery?
5. Is it safe to flash the ZIP files from a USB OTG device?
6. As I already mentioned that I want TWRP temporarily (If it's possible). After flashing the firmware & custom ROM. If the recovery is still a stock Mi recovery. Would it affect the functioning of the custom ROM in any way?
If all of the above can be done, is this one of the proper way to flash/boot TWRP recovery & flash a custom ROM? If not, please guide me accordingly.
Click to expand...
Click to collapse
1. if you always want to depend on PC to trigger your Poco in to recovery then use command "fastboot boot recovery.img", otherwise lets say you are on the move and got pixel update! you can simply download it , and flash it in 15 mins on the go , so mainly its upto you . from security point of view, yes its not good to have twrp flashedi n your /recovery , anyone can boot and do harm! , so its a judgement call for you...
2. again upto you, DFE wont interfere/confilt with either rom or twrp
3. android device have various paritition wiping "/system" & "/data" (user setting and apps & appdata) is ENOUGH and called CLEAN FLASHING in various threads of custom roms. you don't have to wipe internal storage!!! you will lose you data... BUT YES if you get encryption error then you must click "FORMAT DATA" button on twrp in order to make storage usable/accessable to twrp. this FORMAT DATA will format your /data /system and /internalStorage partitions and you will delete all your data! then you can flash custom rom of your choice from scratch
4. you don't get access of TWRP FILEMANAGER via fastboot commands from pc, BUT you can do similar by enableing TWRP SIDELOAD option under settings, this adb sideload is a mode listening for new incoming file to flash! if you side load pixelrom.zip from fastboot command while your twrp has active sideload waiting, fastboot will start sending the file and twrp will wait and as soon as the transmit is completed! the file will automatically be flashed!. ,
however you can put files in usbotg drive or combo drive and using file manager in twrp move files from HERE to THERE!
5. I always do it!, but make sure the connection is not faulty!!! otherwise high chances of incomplete flashing and I lost my redmi3i due to impcomplete flashing of stable rom! (bricked)
6. no it wont affect! infact you can even keep the /recovery partition blank! ( fastboot erase recovery).
for MIUI FLASHING/ROOTING / Disabling force encryption etc , this post is king
https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
I am on HAVOC2.8 and this is how i did it
1. flashed TWRP 3.3.1 unofficial (download it from HERE ) ref Reference - as official twrp has TOUCH driver issues. this one worked with me very well
2. I wiped /data, /system then
3. flashed VENDOR.zip from HERE
4. FLASHED CUSTOM ROM (i use HAVOC2.8)
5. FLASHED DFE HERE - REFERENCE
6. FLASHED GOOGLE APPS ( GAPPS.ORG) ( ARM64>9.0MicroPackage)
7. Flash Optimus Drunk Kernel ( OPTIONAL- havoc uses shadow kernel , i feel OD kernel is better, battery and 4g connectivity)
8. FLASHING MAGISK19.3
9. when i was on havoc2.7, by using MIGRATE, it made flashable zip of my APPS+DATA, stored in internalStorage, and now I will FLASH that file., Mine size goes to 2gb you can get it from HERE
10. WIPE CACHE/DELVIK
11. REBOOT
fire reboot may go in to bootloop and then second reboot may take a while and finally you should see Pixel Setup asking google accounts and info etc
once after you finish setup! don't RESTORE APPS from PLAYSTORE, (download only license apk, in my case I have purchases many apps from playstore and saperate license info is always appear in intial setup! SELECT THOSE ONLY)
ONCE playstore is DONE downloading all your selected (fewer) apps, and MAGISK ROOT is working...... put device on AIRPLANE MODE
FROM DROP DOWN Notification panel, CLICK MIGRATE, and it will prompt you what do you wana restore from your previouce ROM to newly flashed HAVOC ..APPS+SETTINGS+PERMISSION+DATA etc - migrate restoration may take upto 30 mins,
once done, uninstall from system and reboot device!
REMEMBER I DONOT RECOMEND MIGRATE TRICK FOR WHATSAPP, it doesn't work properly and NOTIFICATION ISSUES with BLANK DP observed by me whenever I forcely re-instated whatsapp by migrate!

Procedure for flashing GSI roms (LineageOS)

Hey guys, I'm trying to install LineageOS GSI (arm64 A/B) on my Mi A3 and seem to be having some trouble getting the GSI to actually boot successfully.
I have already done my research both on XDA and elsewhere online, yet most threads focused on the device seem to be of little to no use and/or filled with spam replies that only serve to confuse people looking into this.
A quick note regarding the aforementioned threads:
I don't mean to sound disrespectful to the community, but honestly, bashing somebody over why they'd rather install anything but your own fav piece of software is completely ridiculous.
Without further ado, my case goes as follows:
I'm starting fresh with the latest stock firmware, after having unlocked my bootloader ofc (critical too), I've successfully installed TWRP, wiped, installed the system image and yet after rebooting I'm just greeted with good ol' Fastboot, at which point I either directly flash the stock firmware and try again or wipe my data and whatnot (through TWRP, if reinstalled) and still end up with Fastboot.
Therefore, I have to ask you guys:
Has anyone previously successfully installed any GSI rom on the Mi A3?
Did you flash the system img while on stock firmware or a previously flashed custom rom (ie Pixel Experience)?
Is there any need for any special patch similar to the ones used for MIUI based Xiaomi phones?
Did you face any other issues while trying to flash a GSI?
My intention is to eventually install microG using Nanodroid.
Thanks for asking. I was trying to flash Havoc, crDroid and MSM-Xtended Android 10 GSIs but I can't boot the phone.
I have flashed lots of GSIs in the past, but this is really intriguing me, I can't boot on Mi A3. Wiping or formatting data does not solve, neither Permissiver or Disable Dm-verity zips did the job... :crying:
I successfully bootet the LineageOS GSI yesterday. I was not coming from stock though. I think this process should work assuming you already bootet to TWRP:
1. flash the GSI image to system partition using TWRP
2. flash the TWRP installer to keep your recovery
3. (not sure if needed) flash no fde patch
4. optional: flash some other stuff like Magisk and gapps
5. wipe data and dalvik
I think it rebooted to recovery on my first try but worked after flashing everything again. I probably made some mistake on my first attempt but just make sure to try again before giving up.
Also there's this tutorial but it's not at all what I did to get it working:
https://forum.xda-developers.com/mi-a3/how-to/tutorial-flash-custom-rom-mi-a3-t3977169

After P.Experience Rom TWRP is gone and everything is encrypted

Hi. I installed Android 12 Pixel Experience rom and my TWRP gone after this. After installing the rom, TWRP replaced with Pixel Experience's own recovery mode. Currently, the ROM is installed and I can use it without any problems, but I cannot switch to a different ROM in any way. When I install TWRP with ADB, I cannot install the file named "DM Verity & ForceEncrypt disabler" because everything is encrypted. I do not use any passwords on the ROM (fingerprint, screen lock, etc.). I want to install new ROM so I need to make TWRP permanent and remove encryption on TWRP, because i can't see my files. As I said, the phone is can open and I can use it without problems. Looking forward to your help, thank you.
1) Backup everything
2) Install twrp and sideload the PE rom but don't boot into it
3) Flash the DFE (disable force encryption ) zip from twrp
4) Boot into the rom
Remember you won't get the ota updates if you disable the encryption and have to manually update the rom
easdasd617 said:
Hi. I installed Android 12 Pixel Experience rom and my TWRP gone after this. After installing the rom, TWRP replaced with Pixel Experience's own recovery mode. Currently, the ROM is installed and I can use it without any problems, but I cannot switch to a different ROM in any way. When I install TWRP with ADB, I cannot install the file named "DM Verity & ForceEncrypt disabler" because everything is encrypted. I do not use any passwords on the ROM (fingerprint, screen lock, etc.). I want to install new ROM so I need to make TWRP permanent and remove encryption on TWRP, because i can't see my files. As I said, the phone is can open and I can use it without problems. Looking forward to your help, thank you.
Click to expand...
Click to collapse
You need to read the instructions before you flash anything. PE A12 is encrypted by default and because TWRP can't handle the decryption of A12 ROMs, PE replacing the TWRP with PE Recovery, so to be able to get OTA updates. This is a workaround until TWRP fix the decryption issue.
To flash another ROM, take backup of the files you want from your Internal Storage, flash TWRP via ADB, wipe everything and format data. Then connect your device to PC and transfer the ROM and the files you want to flash into your Internal Storage and proceed with flashing.

Question How to stay decrypted with A12/A12L

Hi,
As everyone knows, up till now there's no recovery yet able to decrypt the A12 encryption.
Since this device is an A/B with dynamics, somehow I always failed to flash DFE after successfully flash A12 rom + format + flash rec to ramdisk + reboot to rec + flash gapps + flash dfe
Flashing gapps after reboot to rec is always successful, yet not the zip to disable encryption (any kind of disable force encrypt zip from here https://forum.xda-developers.com/t/...-10-pro-miui-vendor-oss-vendor-sweet.4276559/)
Flashing DFE right after flashing rom won't work (I expected it), or any combination of it (didn't flash gapps, sideload dfe). Always fails in mounting /vendor
I've tried looking for similar topic, the closest one was Poco F3 thread (https://forum.xda-developers.com/t/...e-for-poco-f3-alioth-decryption-data.4317277/). Maybe someone has managed to pull one off for Redmi Note 10?
It's quite lengthy process (mounting, extracting super partition, repacking super, etc.) and the latest zip file seems tailored just for Poco F3 device.
I recalled the DFE/or any disable force encryption is about patching the fstab.qcom to include flag to disable the encryption.
I know with dynamics part now is hard to edit anything inside the super part (if it's not impossible), but gapps is able to mount it (though it's only /system)
Why does it fail in mounting /vendor?
I just like to try keeping twrp/orangefox with decrypted storage. Is anyone able to stay decrypted with A12/A12L without similar method for Poco F3?

Categories

Resources