How to setup official MIUI without breeaking OTA updates or fingerprint sensor - Xiaomi Redmi Note 6 Pro Guides, News, & Discussion

Due to the use of encryption by the official MIUI ROM we cannot use a custom recovery. Only the MIUI stock recovery knows the encryption password so only it can install OTA updates. If you are also having issues related to the fingerprint scanner data disappearing after each reboot, they will be fix by this.
So the actual solution... This might not be obvious to everyone but due the encryption password being unknown we actually need to keep the stock recovery. That's it. Just install the stock recovery. Now you might ask how you flash things like Magisk since the stock recovery doesn't support that kind of thing. It's simple too, just you a ciustom recovery. You don't actually need to have a recovery flashed to use it, you can just boot a image via fastboot(1). This is a bit annoying but still way less annoying than not being able to install updated or the fingerprint data resetting every reboot.
(1) Boot to custom recovery without replacing the stock recovery
Code:
fastboot boot custom-recovery.img

hmmm, I am not really sure what you wanted to explain, however, not only the miui stock recovery knows to handle encryption, as the ATG's twrp with certain version does it fine, as well.

They do but only the stock one knows the password used to encrypt MIUI.

PBRP handles OTA updates without issue. Have had two updates since installing it and haven't had any problems.

Related

[Q] safely remove encryption

After receiving my beloved 1+2, I rooted it, installed TWRP and flashed Xposed. Then I encrypted the phone. After wanting to update the rom, I realized TWRP doesn't yet support encryption. I reflashed the stock recovery, which I found here. This didn't help either, no encryption supported.
How can you safely remove the encryption? Does anyone have a functioning setup with stock recovery an encrypted device? Or is it possible to flash new firmware throught fastboot leaving it encrypted?
I made my Htc M7 useless trying to remove it's encryption, so i'm really careful one the 1+2...
Does really nobody know how to reverse this prominent feature in android???
A simple factory reset from the settings menu completely removed the encryption

OP2 cannot upgrade from Oxygen OS 2.2.1/Cannot flash TWRP versions newer than 3.0.2-0

So.... Pokemon Go has a lot to answer for......
I have run into a really strange problem when trying to install an OTA on my *unrooted* Oneplus 2. I have been trying to fix this for days but I have completely run out of ideas.
I originally had a working stock Oxygen 3 (Marshmallow) rom with TWRP recovery on my device (not sure of the version). The device was rooted and apart from not being able to install OTAs, I was fairly happy with the setup. Then along came the Pokemon GO update that banned rooted devices. Ok, "big deal" I thought. I was quite content playing Ingress instead (a far better game by the way that doesn't rely on a "pay to win" structure). I really wasn't too worried but then I found out about "systemless root" and "Magisk". I thought that if I installed this correctly I could still play a bit of Pokemon GO when I wanted to and could toggle a root button in Magisk Manager to install OTAs when they became available.
This is where the problems started.
I followed a guide on how to unroot and install Magisk and "Phh's Superuser". The problem was that the Phh Superuser was being denied permissions for Magisk Manager, there were no pop up notifications prompting me to give it access, just toast notifications. I couldn't for the life of me figure out how to give it permission so the "enable root" slider button kept sliding back, not allowing root. This is when I used SuperSU ver 2.76 (Magisk version) and it seemed to work fine. I now had a stock Marshmallow rom with TWRP and Magisk Manager all working exactly how they should be. I could toggle root and play Pokemon GO, then return to a rooted state when I needed to.
"Awesome, mission accomplished." I thought. Now I just need to toggle root off, download the latest OTA and install it through Flashfire.
First I made a complete nandroid backup (as I've done with other devices many times before) through TWRP. I even copied the backup folder to my PC in case something went wrong.
Well, this is when the nightmare started.
The first mistake I made was to use Flashfire when it clearly stated that Oneplus devices were currently untested. Not sure if it was a big issue or not, but it was a mistake none the less. The second mistake I made was to not stop the stock recovery being replaced when prompted before the reboot. I assumed (and it even states in the app) that the custom recovery should be reverted back to the stock recovery when attempting to apply OTA updates.
So I went ahead and rebooted, waiting for the OTA to install. I'm fairly sure from memory that it went into the stock recovery, flashed the OTA and restarted.
This is when the phone soft bricked.
"Oh well, that is why I made the backup." I thought.
I reflashed TWRP in fastboot mode and attempted to restore my backup. No dice, the phone was still soft bricked.
(And by "soft bricked" and "boot looping" I mean the Oneplus logo was in the middle of the screen, "Powered by Android" was at the bottom and the two blue LEDs for the buttons either side of the fingerprint scanner/home button remained on. This for me was the tell tale sign of the soft brick because these two light go off after a few seconds after rebooting usually.
So from here I have tried EVERYTHING. All I really want now is a working stock (rooted) Marshmallow rom with TWRP. I have downloaded many different full rom zips and attempted to flash them through TWRP with no success, I have returned to stock recovery and tried flashing signed roms with no success, I've even tried flashing the official CM13 rom for Oneplus 2 (with the correct GAPPs and kernel) through TWRP with no luck.
But here is where it gets interesting......
There are a few things that are really weird...
1. I have always been able to get into Fastboot mode and ADB and Fastboot commands "work".
* Operations succeed but don't stick (for example trying to flash TWRP versions 3.0.2-1 and 3.0.2-2 through Fastboot mode result in no recovery being there at all.
2. I can flash TWRP recovery though Fastboot mode but ONLY VERSIONS 3.0.2-0 and lower. I can also successfully flash the stock recovery.
3. I can flash OxygenOS 2.2.1 but NOT ANY VERSION RELEASED AFTER THAT. Doing so results in the soft brick "bootloop" I mentioned earlier.
4. Attempting to flash the official CM13 rom for Oneplus 2 doesn't work either. Originally I got the error 7 message, but after editing "Updater-script" in the rom and re-zipping, the process seemed to work fine in TWRP but the reboot gave me... you guessed it... a softbrick.
I have flashed custom roms on a few different devices before so I'm not a COMPLETE newbie when it comes to this stuff, but I am by no means a developer or even anything close to one. I have bricked this phone in the past (long story, involved getting it without an invite and it being shipped to me with spyware on it) but I used a guide very similar to this and it worked a treat.
www(dot)androidbrick(dot)com/unbrick-oneplus-one-two-3-qualcomm-hs-usb-qdloader-9008
So, thinking that this process would format all partitions and start me from scatch I tried it. It worked fine but I was still unable to upgrade from Oxygen OS 2.2.1 or install TWRP versions 3.0.2-1 or 3.0.2-2.
I have tried all sorts of things. I have wiped, flashed and wiped again. Factory resets, dirty flashes, clean flashes.... everything. All sorts of different sources for the TWRP images and Oxygen roms... nothing seems to work.
It's just so weird considering it's not a hard brick... just a soft brick.
So I really need my phone so I am sitting on this current build because it is the only one that works.
Here are some details of the current build I am using. (using CPU-Z app)
Model: Oneplus 2 (ONE A2001)
Android version: 5.1.1
Oxygen OS version: 2.2.1
Bootloader: Unknown
Build ID: ONE A2001_14_160226
Java VM: ART 2.1.0
OpenGL ES: 3.1
Kernel Architecture: aarch64
Kernel version: 3.10.49-perf+ (56)
Root access: Yes
Super user app: SuperSU Free v2.46 (Chainfire)
OEM unlocking: Enabled
USB debugging: Enabled
And these are some of the ZIPs and IMGs that refuse to be flashed to my device.
TWRP-3.0.2-1-oneplus2
TWRP-3.0.2-2-oneplus2
Grarak's TWRP recovery IMG for Oneplus2 (modified to install CM13) according to this guide:
missingtricks(dot)net/oneplus-2-official-cyanogenmod-13
cm-13.0-20160924-NIGHTLY-oneplus2
OnePlus2Oxygen_14_OTA_019_all_1606041303_bd42fc5cc5cc4ab2
And also my TWRP backup named 2016-09-16--09-44-09
I am really at a loss as to what to do next. ANY help ANYONE could give me would be greatly appreciated. I have been all over the net looking for ways around this bt have had no luck.
As I've said, I'm not a huge tech head, but I'm not a newbie either. The only thing I can think of is that somehow one of the partitions (maybe boot? ) may have been corrupted somehow when messing around with systemless root. But I don't know how considering it's "systemless". If anyone knows how to check for corrupted partitions on the Oneplus 2 please let me know and I'll try it. Maybe formatting these partitions might help (????), but I don't want to permanently brick my phone.
But I don't know how I've got this particular build working if one of the partitions has been corrupted. And the corrupted partition thing is just a guess.....
Please, anyone, someone point me in the right direction. Again, any and all feddback is welcomed and would be very much appreciated.
This is all Pikachu's fault.
Kamakiriash said:
A very long post...
Click to expand...
Click to collapse
The normal way too update from OOS 2 to OOS 3 is:
Flash the OOS 3 signed flashable zip via TWRP to update the bootloader and firmware
Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option
Reboot recovery via TWRP so that you now have a recovery that's compatible with the new bootloader
Wipe data, cache & dalvik-cache (but not internal storage)
Flash the OOS 3 signed flashable zip again to update the system
Flash one of the modified SuperSU zips if you want root
Reboot system
All the files you need are in post #1 of this thread.
Thank you so much Spannaa!
I was clearly missing a vital step here and let it be a lesson to anyone else in this situation....
As Spannaa said......
1. Flash the OOS 3 signed flashable zip via TWRP to update the bootloader and firmware
2. Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option
3. Reboot recovery via TWRP SO THAT YOU NOW HAVE A RECOVERY THAT'S COMPATIBLE WITH THE NEW BOOTLOADER!
4. Wipe data, cache & dalvik-cache (but not internal storage)
5. Flash the OOS 3 signed flashable zip AGAIN to update the system.
Again, thankyou Spanna for your quick and accurate response.
The order in which you flash zips and imgs is very important it seems.
You really saved me.
I restored the TWRP backup and I am back to where I started.
Is it now possible to apply OTAs when I toggle the root off in Magisk manager and install using the stock recovery? What do you think would be the best way to do this?
And would it be worth moving to the official build of CM13 for Oneplus 2?
Thanks again, Spannaa. :victory:
Kamakiriash said:
Thank you so much Spannaa!
I was clearly missing a vital step here and let it be a lesson to anyone else in this situation....
As Spannaa said......
1. Flash the OOS 3 signed flashable zip via TWRP to update the bootloader and firmware
2. Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option
3. Reboot recovery via TWRP SO THAT YOU NOW HAVE A RECOVERY THAT'S COMPATIBLE WITH THE NEW BOOTLOADER!
4. Wipe data, cache & dalvik-cache (but not internal storage)
5. Flash the OOS 3 signed flashable zip AGAIN to update the system.
Again, thankyou Spanna for your quick and accurate response.
The order in which you flash zips and imgs is very important it seems.
You really saved me.
I restored the TWRP backup and I am back to where I started.
Is it now possible to apply OTAs when I toggle the root off in Magisk manager and install using the stock recovery? What do you think would be the best way to do this?
And would it be worth moving to the official build of CM13 for Oneplus 2?
Thanks again, Spannaa. :victory:
Click to expand...
Click to collapse
Glad you're sorted.
Not sure about Magisk as I've never used it.
CM13 is OK but whether it's worth you moving to it is your choice. Personally, I prefer TipsyOS!
Hi,
I face the exact issue with same Oxygen OS and TWRP versions mentioned, I have tried the above steps but there are some problems:
1. Flash the OOS 3 signed flashable zip via TWRP to update the bootloader and firmware
Click to expand...
Click to collapse
when I checked the option (Zip signature verification) in TWRP, the installation failed with error "Zip signature verification failed! Error installing zip file '/sdcard/oneplus.zip'", but it's successfully installed when I unchecked (Zip signature verification) option.
2. Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option
3. Reboot recovery via TWRP SO THAT YOU NOW HAVE A RECOVERY THAT'S COMPATIBLE WITH THE NEW BOOTLOADER!
Click to expand...
Click to collapse
second problem is that after installing the TWRP 3.0.2-2 (or above), then reboot recovery, I can't access the recovery again and the phone stuck on bootloop.
any idea ?
Aood said:
Hi,
I face the exact issue with same Oxygen OS and TWRP versions mentioned, I have tried the above steps but there are some problems:
when I checked the option (Zip signature verification) in TWRP, the installation failed with error "Zip signature verification failed! Error installing zip file '/sdcard/oneplus.zip'", but it's successfully installed when I unchecked (Zip signature verification) option.
second problem is that after installing the TWRP 3.0.2-2 (or above), then reboot recovery, I can't access the recovery again and the phone stuck on bootloop.
any idea ?
Click to expand...
Click to collapse
I don't have a OP2 anymore but that post was seven months ago and the instructions worked for numerous users.
Don't enable zip signature verification in TWRP - it's unnecessary.
Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option and then reboot recovery directly from TWRP.
thanx for replay Spannaa,
Flash TWRP 3.0.2-2 via your current TWRP's recovery image flashing option and then reboot recovery directly from TWRP.
Click to expand...
Click to collapse
I have already did that, but same issue once I reboot "directly from TWRP" , the TWRP doesn't show up and bootloop start again.
Aood said:
thanx for replay Spannaa,
I have already did that, but same issue once I reboot "directly from TWRP" , the TWRP doesn't show up and bootloop start again.
Click to expand...
Click to collapse
Last chance and then I'll leave this for someone that has the OP2.
Are you rebooting recovery "directly from TWRP" or rebooting system?
Is your bootloader still unlocked?
Last chance and then I'll leave this for someone that has the OP2.
Are you rebooting recovery "directly from TWRP" or rebooting system?
Is your bootloader still unlocked?
Click to expand...
Click to collapse
Yes, rebooting recovery "directly from TWRP"
and bootloader loader is unlocked,..
anyway it's not important to fix the phone, it's almost one year since last time I use it, yesterday I saw it in the drawer and try to figure out the issue..,

Moto G4 Plus Bricked After Magisk

I've spent the past few days trying to install the new Nougat update on my phone, and I finally managed to do it. I heard Magisk works for Nougat so I decided to use it as my root so i could back up my partitions and whatnot for the next update. I download the Magisk installer using the app, use fastboot to boot into TWRP, and flash the installer. All seemingly goes well, but when I reboot, nothing happens. I can access bootloader, I can access the stock recovery that's still loaded, but it will not start up, and any attempt to start it while the phone is plugged in leaves it in a black screen with the LED next to the fingerprint sensor consistently flashing. I'm no expert, but this doesn't seem good. Is it bricked? Is there an easy fix? So far I've tried using the recovery to wipe the cache and used TWRP to do a full factory reset, neither of which did anything. My Moto G4 Plus is an XT1644, and my model number was mpj24.139-64, which I'd assume means it is now npj24.139-64, but I have no way to check.
I feel like my best bet here is for someone else to extract their system, logo, boot, and all those partitions and I can just flash those in, but I honestly have no idea. This is my only phone by the way, so help would be muchly appreciated.
You need a custom Kernel first thing after re-flashing the stock, recommend ElementalX. Only after that you can root (I prefer the latest beta SuperSU, in systemless mode).
The stock Nougat is locked up pretty good.
Solved
No worries, managed to safely flash the stock rom I had for the previous version and re-update. Seems to work fine now.

Does OTA flash the recovery and re-enable DM-Verity?

I'm about to provision my One Plus 5 for use I will be running it with TWRP a unencrypted data partition (makes restores easier) and root via Magisk day one.
I'm curious if I'm running it in this configuration when an OTA comes down the pipe will it do any of the following?
re apply fastboot oem lock?
flash the recovery to stock recovery?
remove magisk?
re-enable dm-verity?
Curious if the process after an OTA apply is to re-flash TWRP potentially re-apply magisk? Does applying ota mess with your data partition if you already decrypted it?
Also was thinking about leaving the data partition decrypted so I can push things to it via ADB or manipulate it when it's in a non-functional state can anyone here comment on if that's still possible while encrypted? And if so what dis-advantages of leaving it encrypted I hear one is you have to remove the lock screen password before you create a backup since the keys are not backed up and you might be locked out after a restore.
With some more research I've answered my own question I'll put them here in case anyone wants to refer to them in the future.
TWRP users will lose TWRP after a flash of the OTA.
Root will be lost regardless if you flash using TWRP or stock.
Data is not touched during flash so it should stay as is.
DM-verity requirement is unknown.
For rooted users it's better to do a full flash with TWRP OTA through TWRP will cause a problem.
Actually, you won't get the small incremental OTA, you will download the complete 1.5 - 2gb rom... This happens when you have root whether you have got TWRP or stock recovery.
Root will always be lost, yes but if you flash with TWRP you can flash magisk oe SuperSU immediately afterwards to gain root again. Not having TWRP you will need to either boot TWRP or install it to install root again.
DM-Verity, I have never had any problems with this after flashing and then rooting...
I dirty flash the 4.5.10 and i had to reflash the ROM + no_verity_op5.zip. My first and only issue was a sort of bootlop to the recovery.
So wait. If I flash the OTA, then flash Magisk, I will have root and lose TWRP, right?
Then could I use some app like Flashify or the TWRP app to install the recovery?
I don't own a PC right now and want to know if it's possible.

Stock ROM+custom kernel+magisk

Perhaps, someone knows what problem can be caused by the connective, mentioned in the thread name and how to fix it...
So, what I have experienced myself: I flashed a modified kernel, magisk from twrp and used the phone happily..
After some time I got a system message about that my phone was ready for security patch updating. I deleted update files from Ota-packages folder, but after an occasional reboot I found that the phone had already been updated, I had no root, twrp and the custom kernel anymore.
Does anyone know the reason of such behaviour? What exactly cause it? How to reflash the custom kernel correctly? How to avoid subsequent system updates, which can rebuild the ROM with the stock kerner instead of the custom one?
Does it matter when to obtain root via magisk providing I use a custom kernel?

Categories

Resources