can't encrypt after installing latest TWRP - Xiaomi Mi Max 3 Questions & Answers

Hello everyone,
i finally got the unlock code and moved from chinese to xiaomi.eu MIUI 10 rom . I installed lazyflasher, TWRP 3.2.3 and was good to go in a reasonable amount of time but i hit a wall. for work i need to encrypt my phone, it's non-negotiable and has to be done. but when i try to do it, the operation fails. as much as i read it's because newest versions of twrp reserve/lock/enumerate all the blocks of /data and there's not enough space to store encryption files in the /data. There are two ways out of this: either downgrade to an earlier version of TWRP ( 3.1.0 should work) or extend the /data partition. Now the problem is that i have already set up a lot on this phone so a complete wipe will be painful..
So my question is, can i get encrypted without wiping my phone? is there a way to downgrade TWRP or extend /data without formatting / wiping?

I also need an encrypted phone ...
Have you tried this?
https://forum.xda-developers.com/mi...very-twrp-3-2-3-1-nitrogen-t3866084?nocache=1
I still have to wait 255 hours to try this myself ....

ki01 said:
Hello everyone,
i finally got the unlock code and moved from chinese to xiaomi.eu MIUI 10 rom . I installed lazyflasher, TWRP 3.2.3 and was good to go in a reasonable amount of time but i hit a wall. for work i need to encrypt my phone, it's non-negotiable and has to be done. but when i try to do it, the operation fails. as much as i read it's because newest versions of twrp reserve/lock/enumerate all the blocks of /data and there's not enough space to store encryption files in the /data. There are two ways out of this: either downgrade to an earlier version of TWRP ( 3.1.0 should work) or extend the /data partition. Now the problem is that i have already set up a lot on this phone so a complete wipe will be painful..
So my question is, can i get encrypted without wiping my phone? is there a way to downgrade TWRP or extend /data without formatting / wiping?
Click to expand...
Click to collapse
use nijel8's twrp recovery for decryption
just flash recovery image in twrp

i flashed nijel's TWRP and now i can get through that window i was stuck on, but i get a toast with "find device closed unexpectedly" . i disabled find my phone and logged out of the xiaomi account i had on the phone, then rebooted and tried again. same thing. maby i should root and give full rights or something to the location app....

Related

Edit Oct 17, 2014 - Encrypt your device/phone with custom ROM

Disclaimer: I am not responsible for any damage or liability arising out of these steps. I did not invent anything, I just tried something. Only move forward at your risk
If you don't agree ... stop reading and move on...
Background: Our phone has access to so much personal information that its scary if it fell into wrong hands. The only way to fix this is to encrypt phone. I did lot of research and here is a working solution that works for me - try at your risk.
Download Links:
a) Tested with ROM Stock 4.4.4 NH7 Galaxy S4 M919/Jfltetmo by @ShinySide
b) Tested with ROM |ROM|★KANGAKAT★|►KTU84P◄|4.4.4|Xposed|►8◄|6.26.14 by @iB4STiD
c) stock recovery AT&T S4 works with M919
d) Philz/CWM custom recovery
Encrypting with custom rom
1) Assume you are on custom recovery. - Backup everything first. Create a nandroid backup
2) Do a full wipe and install one of the two roms linked above (I have tested with few other roms ... none worked). Start the phone and set it up the way you want. Install all apps etc.
3) ODIN Stock recovery. See #c under download above. Its AT&T stock recovery but works for me. You need to know how to ODIN - find out. Doing this wrong will permanently damage your phone
4) Start your phone and turn on encryption. You will need to set lock type = password and will need to connect to charger and have 80% charge.
- Phone will do blank and stay blank for 20-30 minutes. Do not do anything. Encryption is happening behind the scenes.
- You might have to do this twice or thrice if it did not encrypt first time. For me the phone went blank first time and after 25 minutes it restarted but device was not encrypted. I redid the same steps and worked second time.
- If you interrupt the encryption process (battery pull or power up) you will see error message (encryption failed, reset device)
5) If all goes well you now have a password protected encrypted phone with custom rom!!! Check in Settings -> Security
6) You may install custom recovery ... but I don't see the point because you will need stock recovery to decrypt
To install another ROM
1) Reboot into stock recovery, then wipe data and cache (this removes encryption).
2) install your recovery of choice and install ROM using recovery. Philz/CWM
Credit goes to @Tronicus and his reply Flash a Rom on an Encrypted Android
Tronicus said:
How to Flash a rom on an encrypted Android phone (specifically this one, the I9505 SGH-I337).
The Problem: Once encrypted, you can't decrypt it easily. When encrypting the phone android will tell you you can only decrypt it using a factory reset. Naturally you assume it's talking about the "Factory Data Reset" option found in Settings --> Backup and Reset. But noooo, Android is lying through its ****ing teeth. Then you'll assume you have to wipe everything from your custom recovery mod (CWM, TWRP, or one of those). Wrong again! You'll get beautiful "can't mount /data" messages and more bull****. I read about a workaround that required installing the new rom using ADB, but I had ingeniously disabled USB debugging prior to wiping everything, so I only got so far with that option (plus it's tediously long if you haven't installed all the necessary software already and don't feel like bricking your phone because you made a typo in the command line). So, apparently the only other way to really format that partition free of its encryption is to use a stock recovery. So:
Short Version for Godlike users who know automatically how to do all this **** without any help (mimicking how most help posts are finely detailed on this site): Flash stock recovery, wipe everything, flash your custom recovery and install your new rom.
Long version for us mortals who don't know everything and haven't already downloaded already every single bit of software on earth:
Backup all the stuff you want to save. This process will truly wipe EVERYTHING. You can do it manually, or you can use an app like Titanium Backup Pro to help you (find it on Google Play Store). Here's a nice guide which recommends what to restore and what not to restore: http://forum.xda-developers.com/showthread.php?t=1480343
Flash the stock recovery using Odin. You can download a stock recovery from here: http://forum.xda-developers.com/showpost.php?p=49687791&postcount=3 It's the link called "I337MK2stockrecovery.tar.md5" In case you don't know how to flash it with Odin, this short guide will help: http://forum.xda-developers.com/showthread.php?t=1506697
In step 6 replace "recovery.tar.md5" with the stock recovery you downloaded.
Wipe everything from the Stock recovery console. This little ****er will **** up the encryption all those sissies couldn't touch. You're welcome. You boot into recovery mode from a turned off phone by pressing simultaneously the volume up key + the home key + the power key until you see blue text appearing in the top left corner of your screen.
Reinstall your custom recovery. In my case I had installed the rom BEFORE flashing in the stock recovery (apparently it works, you just can't boot because of the encryption), so I was able to boot into the new rom before I returned to my custom recovery. Weird. Anyways, I recommend CWM. You can pick it up from this link: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/jflte
For some weird reason they call the I337 version the "jflte" version. It's bonkers. Click there, and download the latest version that ends with .tar.md5. This version is upgradable via Odin, which we already used. Use the same instructions used as when you upgraded the stock recovery rom.
Boot into your recovery mod and flash your rom like you usually do.
A word about TWRP: it cost me many hours of work and I don't recommend it. Its website is outdated, and recommends using GooManager (which is no longer mantained) and doesn't work anymore for this. GooManager suggests using a new, different app, which doesn't have the option of installing TWRP. Then I tried using their TWRP Manager app from play store and the image file wouldn't download. Then I tried manually selecting the image file in TWRP manager that I downloaded from their site for use via the ADB method, and it bricked my phone... twice (using two different methods the app sugested). I tried so much because in theory TWRP has the ability to decrypt android's 4.4 encryption, but after looking at their github site I noticed it was filled with people's reports (including people with the S4) on how it wouldn't work decrypting squat. So I gave up, and installed CWM in 30 seconds.
Click to expand...
Click to collapse
Disclaimer: I am not responsible for any damage or liability arising out of these steps. I did not invent anything, I just tried something. Only move forward at your risk
cnewsgrp said:
One of the things I needed was the ability to encrypt my phone (device only not external SD) for security purpose. Our phones today gives access to lot of information that I would rather not fall in wrong hands. I did lot of research and here is a working solution.
Credit goes to @Tronicus and his reply Flash a Rom on an Encrypted Android
The quote looks long however it is really very simple. To install another ROM
- Install and reboot into stock recovery, then wipe data and cache (this removes encryption).
- Then install your recovery of choice and install ROM using recovery. Philz/CWM
This has been tested working on |ROM|★KANGAKAT★|►KTU84P◄|4.4.4|Xposed|►8◄|6.26.14 by @iB4STiD
This did NOT work on a Touchwiz ROM by same developer
I have not tested any other ROM
Click to expand...
Click to collapse
I don't know if it matters too much or not, but the stock recovery you linked to is for the AT&T S4. A good rule of thumb is to never use Odin to flash anything not specifically for your particular device... In this case the M919.
Sent from my SGH-M919 using XDA Premium 4 mobile app
lordcheeto03 said:
I don't know if it matters too much or not, but the stock recovery you linked to is for the AT&T S4. A good rule of thumb is to never use Odin to flash anything not specifically for your particular device... In this case the M919.
Sent from my SGH-M919 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I have tested stock recovery on M919 .. it works
Honestly im surprised its not talked about more since there is a big push for personal privacy when it comes to data. Encryption really is a pain in the ass to work with on android. Figuring out how to switch or update custom roms while encrypted will drive you insane. The easiest way is to just odin back to stock and start over, but that requires a computer anytime you need to flash anything.
I recently was trying out one of the 4.4.4 GPE roms and turned on encryption. It worked great until i started missing touchwiz and wanted to go back to HyperDrive TW. So the journey began...
First of all, i backed up everything to external storage since i knew everything on the internal storage would have to be wiped. I loaded the phone into recovery mode (using TWRP) and tried wiping, but all i got was a bunch of "Failed to mount" errors. Fine. Got the same error when trying to factory reset or wiping /system, /data, /cache, and anything else. Tried formatting to different file systems and then formatting back to the original but no luck. Fixing permissions didnt help. I just kept trying everything available multiple times.
Eventually it started wiping everything except the /data mount. Well... At least i could install new custom roms. Im not sure exactly what did it because i was just throwing everything at it. Anyways I got it to install, and booted into it. Nope.
Now it was saying I needed the password to decrypt the internal storage. It would detect wrong passwords fine, but as soon as i put the correct password in, it would allow me in, show the green android encryption picture, then blank screen. I thought it was just decrypting and setting up my rom but after a few hours my screen was still black and nothing was happening. Pulled battery and went back to TWRP.
I started wiping everything again and again and tried doing everything i could to wipe everything on the internal storage. Again, not sure what did it, but eventually got it all cleaned up and got a new rom installed and could boot into it.
The whole process probably took about 6-7 hours...
I dont even want to enable encryption on the new rom...
p-hil said:
Honestly im surprised its not talked about more since there is a big push for personal privacy when it comes to data. Encryption really is a pain in the ass to work with on android. Figuring out how to switch or update custom roms while encrypted will drive you insane. The easiest way is to just odin back to stock and start over, but that requires a computer anytime you need to flash anything.
I recently was trying out one of the 4.4.4 GPE roms and turned on encryption. It worked great until i started missing touchwiz and wanted to go back to HyperDrive TW. So the journey began...
First of all, i backed up everything to external storage since i knew everything on the internal storage would have to be wiped. I loaded the phone into recovery mode (using TWRP) and tried wiping, but all i got was a bunch of "Failed to mount" errors. Fine. Got the same error when trying to factory reset or wiping /system, /data, /cache, and anything else. Tried formatting to different file systems and then formatting back to the original but no luck. Fixing permissions didnt help. I just kept trying everything available multiple times.
Eventually it started wiping everything except the /data mount. Well... At least i could install new custom roms. Im not sure exactly what did it because i was just throwing everything at it. Anyways I got it to install, and booted into it. Nope.
Now it was saying I needed the password to decrypt the internal storage. It would detect wrong passwords fine, but as soon as i put the correct password in, it would allow me in, show the green android encryption picture, then blank screen. I thought it was just decrypting and setting up my rom but after a few hours my screen was still black and nothing was happening. Pulled battery and went back to TWRP.
I started wiping everything again and again and tried doing everything i could to wipe everything on the internal storage. Again, not sure what did it, but eventually got it all cleaned up and got a new rom installed and could boot into it.
The whole process probably took about 6-7 hours...
I dont even want to enable encryption on the new rom...
Click to expand...
Click to collapse
Yeah Encryption does not seem to work on TWZ roms. I tried on G Eye without luck.
I have updated op. Please check
Encryption will slow down your phone quite a bit. More battery usage + more CPU usage + slower phone = not worth it unless you've got some very private stuff you don't want being shared. Otherwise, 3rd party apps that lock a lot of files, can encrypt certain files, and hide others will do the trick perfectly well.'
Not trying to bash fully encrypting your phone, but I've tried it before and although I am very pro privacy, I had to eventually take it off due to all the extra hassle it created.
Don't know about slowing down. I am not seeing it. I feel differently about security.

Does Encryption NEVER work in ROMS

So I kind of like the fact encryption is turned on automatically by Nextbit (and I did figure out how to get out of my encryption loop)
And I have tried to encrypt the disk with
-Pacman ROM
-Reserrection ROM
-Paranoid Android
and all of them bootloop and never actuall boot up once you press "encrypt".... so is it impossible to encrypt once you have an unlocked bootloader and recovery installed? I get its detrimental to the whole process of flashing incessantly but still
Grrrrrrr
Can sum1 confirm
tlxxxsracer said:
If you unlock the bootloader,that alone won't cause encryption issues. You have to flash a specific boot.img or zip that will disable encryption.
Don't unencrypt and should be fine.
Not sure why you'd want to encrypt if your BL is unlocked. Encryption only hurts performance
Click to expand...
Click to collapse
thanks for the reply
I wanted to encrypt my current ROM to just get the extra protection from theft or lost device.
I really like the current ROM im using and dont need to flash anymore currentlty, so i would be fine locking it down with encryption
But i cant get ANY of the ROMS to encrypt like they normally do say compared to the G3
So there is a solution to this. Basically, when you encrypt the file system on one rom, even when you wipe the data certain things are still tied to the old file system. That's why when you go to encrypt the encryption fails, because the remnant stuff from the other rom is in the way. The solution is to completely reformat the data partition (using TWRP, select format data, or change the data file system to F2FS and then back to ext4.). This will clear the conflicts causing encryption to bootloop. However, this process will need to be repeated every single time you switch roms (updating a rom is fine).
I believe Cyanogenmod supports encryption, though I have never tried it.
yanowman said:
So I kind of like the fact encryption is turned on automatically by Nextbit (and I did figure out how to get out of my encryption loop)
And I have tried to encrypt the disk with
-Pacman ROM
-Reserrection ROM
-Paranoid Android
and all of them bootloop and never actuall boot up once you press "encrypt".... so is it impossible to encrypt once you have an unlocked bootloader and recovery installed? I get its detrimental to the whole process of flashing incessantly but still
Click to expand...
Click to collapse
If you flashed the custom boot image, you CANNOT re encrypt your phone. Won't work.

Latest available TWRP not supporting Nougat encryption

Hi everybody,
After the cm13 on my Zenfone 2 (ZE551ML / Z200A) crashed down with no recent backups, I decided to upgrade to Lineage OS 14 now that I had to reinstall the ROM anyways. And now I'm stuck:
My device is encrypted (as it always has been). Since the first boot of Lineage OS the encryption method seems to have changed to an Android Nougat - specific encryption method. That means:
My installed TWRP 3.0.2 is now unable to decrypt the phone (known issue, as I found out).
The TWRP version 3.1 that would be able to decrypt it, is however not available for my Zenfone 2.
Even without a screen password, PIN or pattern set, TWRP still promts for a decryption password.
Without the TWRP working, I believe I cannot make any changes to the system, e.g. downgrading back to cm13, without wiping the entire internal storage.
The only thing that does seem to work is ADB sideload, but even so, Google Play Services installed from a side-loaded GAPPS e.g. doesn't work.
Now, how can I restore a state on that phone model where I have a working TWRP recovery that can modify the system partition?
Is there maybe an unofficial TWRP 3.1 for the Zenfone 2 or an alternative recovery that does handle the Nougat encryption?
Or is it somehow possible to downgrade back to cm13 without decrypting yet without losing all data on the internal storage?
I'm scared of trying to compile TWRP 3.1 from the source code myself as I have no experience "building" whatsoever.
Thanks for your help!!
Have you tried 3.0.3 available in the LinOS thread?
Sent from my ASUS_Z00A using Tapatalk
Yes, as available on theflamingskull.com. Either version cannot decrypt the phone (even when re-installed).
This one works for my encrypted phone (encrypted with CM14.1):
https://www.androidfilehost.com/?fid=457095661767154983
Even with encrypted f2fs (changed to f2fs with this one).
Z200A is Z00A Essentially, right?
If yes: https://infinitus-rom.com/devices/asus/asus-z00a
You can download TWRP 3.1.0 there
I use this one too, it works flawlessly
Thank you!! Those worked! For some reason I always flashed version 3.0.3-M3 without noticing the M3 at the end. Starting with version 3.0.3-M4 as you linked, I was able to get back into recovery decrypting my phone! :good:

Issue on reinstalling any kind of OS - brick?

Hello,
It all began that i just wanted to restart my Oneplus3 unlocked with lineage 15.
But then back in Lineage15 i wasnt able to use my pin anymore + it restarted after few seconds...
Afterwards i ended up in a lineage bootloop.
Ok, then i thought then i do a fresh flash with new lineage 16.
I tried to flash but it said i need to install new modem firmware for Lineage16.
I downdloaded the new 9.0.5 modem + firmware and flashed it from here : https://forum.xda-developers.com/oneplus-3/how-to/op3-flashable-firmware-modem-zips-t3816066
Then i tried to flash LOS16 again but it failed due to some errors on unable to mount some partitions (cache , system, etc).
So i thought i need to wipe or reformat them, as some people suggested to switch from ext4 to fat and back to reinit the partition.
I did this for at least system and internal storage. ( i learned that it was a dumb idea )
Afterwards i was not able to push anything anymore through MTP in TWRP, but i was still able to sideload or push images via adb.
Afterwards i tried to flash LOS16 or LOS15 via TWRP again but it always ends up to a "unable to mount /system (invalid argument" error at some point of the installation.
I thought: Okey maybe i go back to stock as i messed up the internal file system somehow, and go back to LOS afterwards.
So i flashed the stock recovery for nougat which i got from here: https://www.****************/2017/0...th-latest-oxygen-os-firmware-complete-unroot/
Then i tried to flash various stock Oxygen roms with the stock recovery, by using wipe + system reset + adb sideload:
4.02, 4.51, 5.08, 9.0.5
4.02 and 9.0.5 didnt run until the end.
Flashing 5.08 works but ends up in a black screen when starting it.
Flashing 4.51 works but when i start it i run into a bootloop ( 2 Dots circuling forever )
I also tried to use the 4.51 version to flash LOS again but it did not work out
I just tried again to flash 4.51 but it also didnt work out anymore. :\
So, what do you think i could do to get a working OS on my system again?
Did i do something on the installation of LOS or Oxygen ?
Can i use a backup from a friends Oneplus3_T to get a working system partition / full OS again?
Should i unbrick the phone by using one of various guides to go back to fully stock? I am kind of afraid of this, as some people describe some final brick in the threads which may be caused by modem firmware problems (Sahara issue). https://forums.oneplus.com/threads/guide-oneplus-3-3t-unbrick.531047/ or https://forums.oneplus.com/threads/guide-mega-unbrick-guide-for-a-hard-bricked-oneplus-3.452634/
Thank you so much, i kind of getting mad about it
@julledd
Backup from 3T seems like a bad idea.
You may have a hardware issue.
Your best bet is to use one of the tools available in the various unbrick guides. If one doesn't work, try another.
Best of luck!
Hi thx for your help!
i tried different unbrick tools (9.0.5 / 3.1.2 / 4.0.5) and after several attempts i get it flashed to the phone. But in the end it still ends up in a bootloop, either at the android logo or the circuling dots. Via Sideload i am also not able to flash a new OS. It always breaks somewhen >50%.
In very rare cases i am then able to go to the OS, but when i go to "About Phone" to unlock it for TWRP, it freezes before showing anything. I guess there is internally something broken which forbids it to show the internal state of the phone. Every boot is different, and i cannot see any system in this failure of my phone.
Do you have any more hint?
I am already at a point where i want to exchange the main PCB.. Is this possible for the Oneplus3? Can i also exchange it with a Oneplus3T PCB?

OnePlus 7t root and TWRP recovery

So it's been awhile since I've had a phone I cared to get into installing root and custom stuff but I just bought a 7t and am trying to get it all working. I have the bootloader unlocked and the latest version of TWRP flashed but every time I'm in TWRP it shows up as 0mb and can't mount the storage. I tried "fastboot format userdata" in adb and it worked for one boot cycle but once I rebooted TWRP after that I was back to the 0mb and can't mount storage (I also still cannot format storage from TWRP before anyone tells me to try that) so what gives? What am missing?
You're missing the search functionality of the forum.
TWRP does not currently support reading data partition when encrypted by OOS. It does work, however, for custom ROMs, as long as you don't use a PIN, but a pattern. It also does not support formatting data partition, regardless of the ROM you're using.
morphvale said:
You're missing the search functionality of the forum.
TWRP does not currently support reading data partition when encrypted by OOS. It does work, however, for custom ROMs, as long as you don't use a PIN, but a pattern. It also does not support formatting data partition, regardless of the ROM you're using.
Click to expand...
Click to collapse
Well that's disappointing. So it sounds like there's really not too much point to it then. So I'm assuming there's a guide on how to install root and magisk via fastboot commands?
Again, you're missing the search functionality.
You can see it on the home page of the 7T, under ONEPLUS 7T GUIDES, NEWS, & DISCUSSION, third topic right now..
morphvale said:
Again, you're missing the search functionality.
You can see it on the home page of the 7T, under ONEPLUS 7T GUIDES, NEWS, & DISCUSSION, third topic right now..
Click to expand...
Click to collapse
Still leaving trouble using the search function to find what I want but I'll figure it out. So is it worth installing a custom rom on this phone or should I just try and root the phone on the stock OS? I'm very new to this phone and everything that goes along with it.
Justin541 said:
Still leaving trouble using the search function to find what I want but I'll figure it out. So is it worth installing a custom rom on this phone or should I just try and root the phone on the stock OS? I'm very new to this phone and everything that goes along with it.
Click to expand...
Click to collapse
@Justin541 - If you need any help just PM me. Ill get you going.. As long as your bootloader is unlocked, the rooting process is easy. All you have to do is:
- Install magisk manager (here)
- Download a patched boot.img from here(try to find the boot.img that matches the build your on, all though it probably doesnt matter)
- Boot into bootloader (adb reboot bootloader) and BOOT(dont flash) the patched boot.img (fastboot boot patched_boot.img)
- When phone is booted, open up magisk manager and do a direct install. Booting the patched boot.img is what you gives you a temporary root to be able to install magisk.

Categories

Resources