Simple Guide to flashing successfully - Redmi K20 Pro / Xiaomi Mi 9T Pro Guides, News, & D

Here's a quick guide to some of the basics.
Which recovery.
----------------------------
Use the latest from here.
https://forum.xda-developers.com/k2...icial-twrp-xiaomi-redmi-t3944363/post79823568
Do not use Orange Fox unless you intend to stick with stock MIUI. Orange Fox has extra features, which are almost all aimed at MIUI, but it often causes issues flashing custom ROMs, so it's a long way from the best option if you want to use custom ROMs. Orange Fox, along with other TWRP derivatives, allow complete access to virtually all of the phone, so it is very easy to accidentally hard brick the phone if you don't fully understand what your doing.
Ignore anyone who tells you to use Orange Fox when using custom ROMs.
Do I need to permanently disable encryption
-------------------------------------------------------------------------
No.
There is not a single reason to permanently remove encryption, other than personal preference.
It is recommended to have encryption removed when flashing, but this is easily done by temporarily removing lock screen security before flashing and adding it back after.
Ignore anyone who tells you that you need to flash a DFE (disable force encrypt) script.
Should I wipe all my partitions when flashing
------------------------------------------------------------------------------
No.
When clean flashing you only need to do a factory reset in TWRP.
There is absolutely no need to wipe system or vendor partitions. Ordinarily, when flashing, there is no need to go into the advanced wipe menu. I've had this phone 15 months and have never used the advanced wipe menu and have never had any issues.
When you flash a custom ROM, it will automatically wipe system first, so you don't need to do this yourself.
When you flash a vendor file, it will automatically wipe vendor first, so you don't need to do this yourself.
Even though almost all (it may actually be all) ROM flashing instruction tell you to wipe system, it is not needed.
Ignore anyone who tells you to wipe anything more than data, cache and dalvik.
Do I need to update my vendor and firmware when flashing a new ROM
-----------------------------------------------------------------------------------------------
Probably not.
If you currently have MIUI installed and it's up to date, then you will have the latest firmware and vendor and won't need to flash them.
If you're moving from one custom ROM to another, then it depends on how up to date your current ROM is. If the vendor and firmware requirements of the new ROM match the requirements of your current ROM, then will have the current vendor and firmware already installed and so do not need to flash them again.
Only when the new ROM needs a later version of vendor and firmware than you have currently installed will you need to flash them. This isn't such a common occurrence, so you'll not need to flash vendor and firmware often.
How to install a custom ROM over MIUI and remain encrypted
-------------------------------------------------------------------------------------------------
Assuming you have already unlocked the bootloader.
1 Boot into fastboot
2 Flash TWRP (fastboot flash recovery <path to TWRP file>
3 Immediately boot to TWRP (fastboot oem reboot-recovery)
4 Select Wipe Menu and Factory Reset
5 Return to Wipe Menu and Format Data
6 Return to Main Menu, then select Boot Menu
7 Select Boot to Recovery (this reboots TWRP to ensure the data partition is properly mounted after formatting)
8 Copy ROM and extras over to phone and flash them.
9 Reboot and enjoy.
Do not add any extra steps, do not miss any steps out
How to dirty flash a custom ROM update when encrypted
---------------------------------------------------------------------------------------------
1 Remove lockscreen security (this removes encryption)
2 Boot to TWRP
3 Flash the ROM update (plus vendor and firmware if the requirements for these have changed in the updated ROM)
4 Select to wipe cache and dalvik when the update finishes.
5 Reboot the ROM
6 Restore lockscreen security
How to clean flash a new custom ROM over another custom ROM
--------------------------------------------------------------------------------------------------------
1 Remove lockscreen security
2 Boot to TWRP
3 Select Wipe Menu and Factory Reset
4 Flash the ROM plus the extras you want (this includes new vendor and firmware if the requirements are different to your current ROM)
5 Reboot the ROM
6 Add lockscreen security

Thank you
Thank you very much for this. I just bought the device last week . Since i am upgrading from a lenovo vibe k5 plus (which also had a decent amountt of development support) i have a few questions. With the vibe k5 plus, installing a custom rom was very simple. flash cutsom recovery-factory reset (i used to wipe the internal storage too)-flash custom rom-flash magisk and you're done. My question(s) are 1) What is this "Force encryption" that we have to disable/keep enabled. 2) what are vendors and firmwares. I'm currently on MIUI10 (Got a Nov 2019 unit), it's pretty decent for now.

AkashNP said:
Thank you very much for this. I just bought the device last week . Since i am upgrading from a lenovo vibe k5 plus (which also had a decent amountt of development support) i have a few questions. With the vibe k5 plus, installing a custom rom was very simple. flash cutsom recovery-factory reset (i used to wipe the internal storage too)-flash custom rom-flash magisk and you're done. My question(s) are 1) What is this "Force encryption" that we have to disable/keep enabled. 2) what are vendors and firmwares. I'm currently on MIUI10 (Got a Nov 2019 unit), it's pretty decent for now.
Click to expand...
Click to collapse
Since, I think, Android Marshmallow, Google have added forced encryption. Before this you had the security menu option to encrypt your phone storage, which required a separate password to be entered on every reboot. Now encryption is done as standard and uses your lockscreen security PIN/password as the key.
Initially your phone will be unencrypted, but as soon as you first set-up lockscreen security the phone will be automatically encrypted.
Many people see this as a good thing. Should you lose the phone, you data is secure and cannot be accessed without the lockscreen PIN/password. Other people don't care about this and so prefer to disable encryption, as it makes life a little easier when flashing custom ROMs.
Some people, incorrectly, believe that disabling encryption is necessary when flashing custom ROMs, or that disabling encryption is the only solution to problems seen when flashing. This is not true and disabling encryption should only be about a users personal choice to be unencrypted.
Think of vendor and firmware as the equivalent to device drivers for PC components. They are a collection of compiled code files, provided by component manufacturers and the phone manufacturer, to allow Android to communicate with the hardware components in a standard way. Occasionally these files might get updated, as part of a MIUI update, to fix a bug or to add extra functionality. When these files are updated, custom ROM devs will include them so that they get the bug fixes or extra functionality. When this happens they will update the minimum vendor and firmware version requirements for their custom ROM - the version will be the actual MIUI version in which the vendor and firmware files were updated.

Thanks that was a really good explanation. I have one last question, so right now I'm on MIUI10 I've got the MIUI12 update notification but I want to try MIUI11 first. I've got the ROM file from the xiaomifirmwareupdater website, how do I flash it?

AkashNP said:
Thanks that was a really good explanation. I have one last question, so right now I'm on MIUI10 I've got the MIUI12 update notification but I want to try MIUI11 first. I've got the ROM file from the xiaomifirmwareupdater website, how do I flash it?
Click to expand...
Click to collapse
Follow this guide, assuming you've downloaded the recovery ROM.
https://c.mi.com/oc/miuidownload/detail?guide=1
If you view this on a mobile, it might be a blank page. In this case, you need to change the mobile browser to desktop mode when viewing this page.

The most simplest and right guide on the xda forum, well done! Thank You

Noob here
Are decrypted devices faster? Also please suggest stable roms. Also has anyone used 81hz extensively? Does it damage screen? Does it drain more battery?

jaydeep0712 said:
Are decrypted devices faster? Also please suggest stable roms. Also has anyone used 81hz extensively? Does it damage screen? Does it drain more battery?
Click to expand...
Click to collapse
As far as I'm aware, there shouldn't be any noticeable difference in speed. The whole data partition is encrypted as a block, so, in use, accessing files is done on an already unencrypted partition. The individual files are not encrypted/decrypted on demand on an individual basis.
All of the popular ROMs will be stable enough for daily use. Which one to go for depends on what you prefer - more AOSP, more Pixel Phone, more heavily customisable, etc., etc.
I've never gone for the screen refresh rate mods, so can't comment on them.

Thanks for replying.
Robbo.5000 said:
All of the popular ROMs will be stable enough for daily use. Which one to go for depends on what you prefer - more AOSP, more Pixel Phone, more heavily customisable, etc., etc.
Click to expand...
Click to collapse
Which custom rom do you use? Does it have any bugs (Like under screen fingerprint not working)?

jaydeep0712 said:
Which custom rom do you use? Does it have any bugs (Like under screen fingerprint not working)?
Click to expand...
Click to collapse
I'm currently using LOS. It's mostly bug free. There seems to be a current issue with wired headphones - on calls it is using the phone mic instead of the headphone mic. For my use, I don't see any other issues, but there could be other things around functionality I don't use.
Fingerprint recognition is about as good as it gets on custom ROMs. Not quite as good as MIUI, but good enough.

Thank you so much for busting so many myths, I was dying for someone to speak up but couldn't muster the courage myself. Hats off, and I support everything you said 100%.

Robbo.5000 said:
With the latest Flipkart sale, there have been a number of new owners asking a lot of old questions.
Here's a quick guide to some of the basics.
Which recovery.
----------------------------
Use the latest from here.
https://forum.xda-developers.com/k2...icial-twrp-xiaomi-redmi-t3944363/post79823568
Do not use Orange Fox unless you intend to stick with stock MIUI. Orange Fox has extra features, which are almost all aimed at MIUI, but it often causes issues flashing custom ROMs, so it's a long way from the best option if you want to use custom ROMs.
Ignore anyone who tells you to use Orange Fox when using custom ROMs.
Do I need to permanently disable encryption
-------------------------------------------------------------------------
No.
There is not a single reason to permanently remove encryption, other than personal preference.
Ignore anyone who tells you that you need to flash a DFE (disable force encrypt) script.
Should I wipe all my partitions when flashing
------------------------------------------------------------------------------
No.
When clean flashing you only need to do a factory reset in TWRP.
There is absolutely no need to wipe system or vendor partitions. Ordinarily, when flashing, there is no need to go into the advanced wipe menu. I've had this phone 15 months and have never used the advanced wipe menu and have never had any issues.
When you flash a custom ROM, it will automatically wipe system first, so you don't need to do this yourself.
When you flash a vendor file, it will automatically wipe vendor first, so you don't need to do this yourself.
Even though almost all (it may actually be all) ROM flashing instruction tell you to wipe system, it is not needed.
Ignore anyone who tells you to wipe anything more than data, cache and dalvik.
How to install a custom ROM over MIUI and remain encrypted
-------------------------------------------------------------------------------------------------
Assuming you have already unlocked the bootloader.
1 Boot into fastboot
2 Flash TWRP (fastboot flash recovery <path to TWRP file>
3 Immediately boot to TWRP (fastboot oem reboot-recovery)
4 Select Wipe Menu and Factory Reset
5 Return to Wipe Menu and Format Data
6 Return to Main Menu, then select Boot Menu
7 Select Boot to Recovery (this reboots TWRP to ensure the data partition is properly mounted after formatting)
8 Copy ROM and extras over to phone and flash them.
9 Reboot and enjoy.
Do not add any extra steps, do not miss any steps out
How to dirty flash a custom ROM update when encrypted
---------------------------------------------------------------------------------------------
1 Remove lockscreen security (this removes encryption)
2 Boot to TWRP
3 Flash the ROM update (plus vendor and firmware if the requirements for these have changed in the updated ROM)
4 Select to wipe cache and dalvik when the update finishes.
5 Reboot the ROM
6 Restore lockscreen security
How to clean flash a new custom ROM over another custom ROM
--------------------------------------------------------------------------------------------------------
1 Remove lockscreen security
2 Boot to TWRP
3 Select Wipe Menu and Factory Reset
4 Flash the ROM plus the extras you want (this includes new vendor and firmware if the requirements are different to your current ROM)
5 Reboot the ROM
6 Add lockscreen security
Click to expand...
Click to collapse
Good Day!
I installed Pixel Experience over MIUI and its stuck on Loading with Google Logo in it, it has been 30mins aprox after i first booted the device, any suggestion?
Or should i continue waiting?
Thanks in advance

XXXLR8 said:
Good Day!
I installed Pixel Experience over MIUI and its stuck on Loading with Google Logo in it, it has been 30mins aprox after i first booted the device, any suggestion?
Or should i continue waiting?
Thanks in advance
Click to expand...
Click to collapse
The first boot will take a bit longer, but only a minute or 2 at most. Something has gone wrong. Make sure you follow the guide exactly.
The most common issue is not formatting the data partition. This is not the same as wiping the partition. When formatting TWRP will ask you to type 'yes' to continue. When flashing over MIUI this is necessary to fully remove encryption before flashing.
Another common problem is wiping partitions unnecessarily. There is no need to wipe anything. Just do the factory reset, this wipes what's needed and nothing more, then format data.

Robbo.5000 said:
The first boot will take a bit longer, but only a minute or 2 at most. Something has gone wrong. Make sure you follow the guide exactly.
The most common issue is not formatting the data partition. This is not the same as wiping the partition. When formatting TWRP will ask you to type 'yes' to continue. When flashing over MIUI this is necessary to fully remove encryption before flashing.
Another common problem is wiping partitions unnecessarily. There is no need to wipe anything. Just do the factory reset, this wipes what's needed and nothing more, then format data.
Click to expand...
Click to collapse
I did the TWRP format (which prompted me to type yes to continue) and wipe data partition,but didnt wipe the partition itself, rebooted, installed pixel experience, and still same, i even got into a boot loop, which i got out to, by forcing my way out by fastboot, and reinstalled MIUI,
Im currently at MIUI, currently stable.
So Im going to try again some other time about this, when i have another available device to use while i reinstall pixel experience in Mi9T Pro
But, your guide is helpful, it failed on me probably because of a mistake I made.
Thanks anyways!
Best Regards.

hi,
in your guide, you do not have added a step for flashing the vendor.
is this intended ?

FuriousFrodo said:
hi,
in your guide, you do not have added a step for flashing the vendor.
is this intended ?
Click to expand...
Click to collapse
Flashing over MIUI, I've made the assumption that you'll be on the latest version of MIUI and the original region, which should therefore already have an appropriate vendor and firmware for the new ROM.
If you've not kept MIUI up to date or have flashed a different region of MIUI, then you may need to flash the correct vendor and firmware file(s)

Robbo.5000 said:
Flashing over MIUI, I've made the assumption that you'll be on the latest version of MIUI and the original region, which should therefore already have an appropriate vendor and firmware for the new ROM.
If you've not kept MIUI up to date or have flashed a different region of MIUI, then you may need to flash the correct vendor and firmware file(s)
Click to expand...
Click to collapse
thanks for that. i followed as you said and i was able to flash Evolution X
however, while flashing i got a warning in TWRP E:Unable to decrypt FBE device. The ROM booted fine but I think I have made a mistake. Additionally the folder I had created to transfer the ROM is gone after the phone booted.
What could be the issue ? and how to resolve this ?
FYI, I'm using Mauroonofrio's TWRP

FuriousFrodo said:
thanks for that. i followed as you said and i was able to flash Evolution X
however, while flashing i got a warning in TWRP E:Unable to decrypt FBE device. The ROM booted fine but I think I have made a mistake. Additionally the folder I had created to transfer the ROM is gone after the phone booted.
What could be the issue ? and how to resolve this ?
FYI, I'm using Mauroonofrio's TWRP
Click to expand...
Click to collapse
I've had that error a few times. It's normally from when your first boot into TWRP. All output from TWRP gets written to the same output screen, so when it is shown you are not seeing output from just the last command but for the whole session. If you had looked in more detail, you would have probably realised that the error was from before you started flashing.
With the ROM files going missing, that is a known problem. Actually anything copied before flashing gets lost. The first time it happened to me I had copied all my backed up data at the same time as the ROMs and it all got wiped. I can't remember exactly the details now, it's just something I've got used to. But if I remember correctly, the data disappears when you first boot into the new ROM. After it happened the first time, I checked in TWRP the next time, after flashing, but before booting the new ROM and the files were still there. It was only after booting to the ROM that they disappeared. (My memory is a bit vague now as it was over a year ago, but I think it might actually happen when you set up lockscreen security and the phone is encrypted in the new ROM for the first time). Maybe someone else can confirm or give the correct explanation.

Robbo.5000 said:
I've had that error a few times. It's normally from when your first boot into TWRP. All output from TWRP gets written to the same output screen, so when it is shown you are not seeing output from just the last command but for the whole session. If you had looked in more detail, you would have probably realised that the error was from before you started flashing.
With the ROM files going missing, that is a known problem. Actually anything copied before flashing gets lost. The first time it happened to me I had copied all my backed up data at the same time as the ROMs and it all got wiped. I can't remember exactly the details now, it's just something I've got used to. But if I remember correctly, the data disappears when you first boot into the new ROM. After it happened the first time, I checked in TWRP the next time, after flashing, but before booting the new ROM and the files were still there. It was only after booting to the ROM that they disappeared. (My memory is a bit vague now as it was over a year ago, but I think it might actually happen when you set up lockscreen security and the phone is encrypted in the new ROM for the first time). Maybe someone else can confirm or give the correct explanation.
Click to expand...
Click to collapse
So what you are saying is its quite normal, is it?
fearing I may have to do the whole process again, I haven't set anything up.[emoji3]
Sent from my [device_name] using XDA-Developers Legacy app

FuriousFrodo said:
So what you are saying is its quite normal, is it?
fearing I may have to do the whole process again, I haven't set anything up.[emoji3]
Click to expand...
Click to collapse
Yes, both things are normal. You should be good to go with your new ROM. No need to reinstall it.

Related

From MIUI7 to Nitrogen OS, personal experience

Hi,
yesterday i went through the process of flashing custom rom and i just want to share my experience.
My daily driver was the latest MIUI7 because it was very stable and battery life was good (stock global stable, locked bootloader). But i decided to try custom rom mainly because i had strange performance issues every now and then.
1. Applied for official unlock - Unlock Page
2. I read many posts and i tought it might be best to upgrade to MIUI8 first. I updated with the official updater app.
3. Unlocking didnt work because you need a Developer Rom of MIUI installed to link the device to you Mi account and successfully unlock. I downloaded latest global dev rom and flashed with official updater app.
4. Unlocked successful with official Mi Unlock Tool.
5. Installing TWRP ZCX - worked and was easy
6. Backup System, Data, Firmware, Modem with TWRP (didnt need it so far)
7. Flash Nitrogen OS
8. Reboot to system - "to start android enter password" - surprised and shocked so i googled and found a hint to "format data" because storage might be encrypted.
9. In TWRP - Wipe i "formated data" so all files were deleted! be sure to backup everything!
10. Nitrogen OS booted (no need for Gapps - everything is built in)
11. Flash fingerprint fix - apparently i have the Goodix and need this fix for fingerprint to work
12. I was confused because there was no caller app (call worked but no UI) so i flashed new and again and tried Psy Firmware but i just had to set the caller app in settings.
13. All is working good so far :fingers-crossed:
Thanks for all the work done by this community. I greatly appreciate all the cool stuff! :highfive:
EDIT: I have FPC sensor not Goodix. The fix is for FPC! Thanks to @Denis:) for pointing that out.
You are wrong on some points ;p
Its so easy to flash roms on all snapdragon devices
Theres a need for gapps, it doesnt come preinstalled on roms, which is a good thing.
If you flashed fpc fix and it works now, it means you have FPC sensor, not goodix (which is good -like me), dev of NOS will make fpc default from now on.
For next time, you need to format data when you come from Miui MM, because it encrypts data by default.
Also I suggest formatting data,cache to F2FS, it actually makes it even faster a bit imo, but ita not a must.
Denis:) said:
For next time, you need to format data when you come from Miui MM, because it encrypts data by default.
Also I suggest formatting data,cache to F2FS, it actually makes it even faster a bit imo, but ita not a must.
Click to expand...
Click to collapse
I have installed LineageOS several times over MIUI but I didn't need to format data. Why does this happen in nitrogen os, any idea?
Denis:) said:
...
Click to expand...
Click to collapse
The level of difficulty may be different for different people
I flashed NitrogenOS and Gapps but then did a wipe and flashed only NiOS but in the end i had all the Google apps... Maybe this part didn't get wiped - Thanks for pointing that out.
Right, FPC sensor - my mistake
The encryption thing was confusing because there is not much info on that topic here - especially the guides. Thanks for confirming this is a thing.
This F2FS format thing is done in TWRP?
If you didnt wipe system aswell, gapps and ROM persisted.-dirty flash (update ROM)
If you want to update ROM + gapps, you must wipe System aswell with dalvik/art, cache
Then flash ROM+gapps , wipe cache and reboot
F2FS is done in twrp but you must have f2fs compatible twrp - I successfuly use rc1 latest by TheStrix, obviously if you choose to format data, cache you will lose data and you will have to clean flash ROM.
P.s By the way, when was your device made? Im just curious
funkymaster said:
The level of difficulty may be different for different people
I flashed NitrogenOS and Gapps but then did a wipe and flashed only NiOS but in the end i had all the Google apps... Maybe this part didn't get wiped - Thanks for pointing that out.
Right, FPC sensor - my mistake
The encryption thing was confusing because there is not much info on that topic here - especially the guides. Thanks for confirming this is a thing.
This F2FS format thing is done in TWRP?
Click to expand...
Click to collapse
If you want to experiment please try to format the partitions using f2fs and tell us your results.
I tried it but was unsuccessful since when I tried it there was no recovery that could support f2fs. Remember only dadii's TWRP works still I recommend you confirm it again.
Im using this one by thestrix and it works perfect;
https://www.androidfilehost.com/?fid=529152257862707658
currently i don't feel like tinkering with my phone any more. So i keep the F2FS in mind for some time in the future
Hm i don't know where to find the build date of my phone i bought it April 2016

I want to flash my device with the best custom ROM . So any suggestions..

I have note 3 Kate variant with 2 GB RAM and unlocked bootloader . And I want to try the custom roms and to know how to flash it and if there anything happened and I want to go back to MIUI stable rom without locking the bootloader again and these kind of stuff ??? I am all ears . For the suggestion and the info .
So, if you unlocked your bootloader using OFFICIAL METHOD (got approval for unlocking and downloaded MI Unlock Tool), next thing you have to do is replacing your stock recovery with a TWRP, because on stock recovery, you are unable to flash any custom ROM.
Follow this if you are on the newest MIUI available and no more updates in the Updater app:
Download this one: https://www.androidfilehost.com/?fid=24727332921017084
After that, unpack the zip file on your computer. Next, power off your phone, and switch it on in FASTBOOT MODE (like you did while using Mi Unlock tool), and connect phone into your computer.
Start the flash.bat script. Follow the instructions it displays. After that, your phone will be rebooted into RECOVERY mode. If recovery start in Chinese language, you can switch it to English, this is described in this thread: https://forum.xda-developers.com/redmi-note-3/how-to/zcx-twrp-install-twrp-flash-supersu-t3462448
After you will get a working custom recovery, with language that you understand, THE FIRST THING YOU HAVE TO DO IS BACKUP EVERYTHING YOU HAVE BEFORE PLAYING WITH ANYTHING. This recovery is able to make a backup. So, ckick on Backup option, and select EVERYTHING to backup. If you have an external SD card, switch the location from internal memory into the external SD card. Then swipe to begin backup process and wait until it finish.
After that, you have to decide whitch custom ROM to flash.
If you want to get high stability, and no extra features, you should choose this:
https://forum.xda-developers.com/redmi-note-3/development/rom-t3612905
If you want a lot of extra features, but less stability, choose this:
https://forum.xda-developers.com/redmi-note-3/development/rom-resurrectionremix-5-8-0-t3507433
If you want a good stability and some extra features, choose one of this:
https://forum.xda-developers.com/redmi-note-3/development/rom-pure-nexus-substratum-fi-wifi-t3577060
https://forum.xda-developers.com/redmi-note-3/development/rom-nitrogen-os-11-01-2017-t3536211
https://forum.xda-developers.com/redmi-note-3/development/rom-viperos-t3613688
https://forum.xda-developers.com/redmi-note-3/development/rom-aospextended-rom-v1-2-t3506955
All these ROMS are based on the newest released android, 7 Nougat. You can also try another ROMS in the SNAPDRAGON development section,
How to flash a ROM:
Download the zip file contains a rom, and place it in the SD card in to your phone or the internal memory.
Run your phone in the recovery mode. To do it switch it off, and turn it on by pressing Volume UP + Power. Check if you see your backup in the Restore section. If yes you will be able to restore it if something will go wrong.
Reset your phone into factory settings by selecting Wipe Data and swipe. After that go into the Install Zip section, and choose your zip contains the ROM. Swipe to flash it. After flash complete, use wipe Cache/ Dalvik cache option, and select "Reboot System". Your phone should boot up and load your custom ROM intead of MIUI. You will notice that there is no Google Play and another Google Services. It is not bundled with ROM due to Google licensing policy. If you want to have it, Google "Open Gapps", download it, and flash the zip in recovery mode like before, but don't wipe anything this time. After flashing done, boot up your ROM again and you will have a Google Play and another things from Google.
kuba3351 said:
......
Click to expand...
Click to collapse
That's one heck of a reply. Appreciate your answer.
more info plz
kuba3351 said:
So, .
Click to expand...
Click to collapse
my phone sd card is not have a free storage to make a backup for the system and data so can i just backup the rom only or something like that and what will happen if i did not make a backup
i mean can i flash an official rom miui using twrb to fix anything like bootloob or that kind of issue > sorry for my bad english and my little info
Yes, you can select Internal Storage as a destination of backup, but, you are beginner and if you use a "wipe internal storage" in your recovery, all your backups will be gone. I did it one time, wiped internal storage in the recovery, and after that, I needed to restore my corrupted EFS partition from the backup. My backup was wiped and I had to use someone's backup posted on this forum, and set my IMEI number again. Now, my phone is working correctly but I lost my wifi card MAC address and Bloetooth MAC address. So, if you want to store your backup in the internal storage, also copy it into the other place to still have it if you wipe internal storage.
If you want to return to MIUI you can do it by flashing official MIUI from recovery but it can also be done by restore system, boot and data from your backup. If you want clean MIUI in factory state, then wipe data and restore only system and boot.
kuba3351 said:
Y............
Click to expand...
Click to collapse
some of them are for kenzo devices so is that ok to flash them on kate device > i know i asked a lot but it is my only device so i must be careful
Kenzo and Kate are almost similar devices, difference is that kenzo not supporting LTE 800 mHz frequency, because it is not used in China. It is used in Europe, so Xiaomi created an Europe variant called Kate that support this frequency. So, you can flash kenzo ROM on Kate device. When you flash a ROM, the updater-script is launched and it checks that all the things are ok, and it also checks if you are flashing on the right device, it will terminate flash process if it will detects that you flashing on wrong device. If you will have problems with LTE 800 mHz, you have to find a zip that contains Kate modem and flash it, and everything will be ok.
moody your questions has been answered a 100 times. proper installation order is also described for many people before you asked. just read through those threads and youre good to go. when youre unlocked and have twrp running, do a full wipe without wiping internal storage and micro sd, then flash kenzo or kate firmware depends on which phone you have, then rom, gapps and restart. first boot might take about 10 minutes. just let it do it work...
im running resurrection rom since december and i only had to do a clean flash once when universal fingerprint support was included inside the rom. everyday you get notifications about updates ... i update just once in 2 weeks or so. dunno what should be unstable in RR as someone mentioned before ... for me this rom is rock stable. camera, phone etc everyhing works for me. im using it with the latest radon kernel
I would go with RR, it is pretty stable nowadays. If you want to play "safe" go with LOS.
h0LLe said:
Click to expand...
Click to collapse
i am with you but any way thanx for the info u know i am still beginner so i should ask and i flashed RR and yes it is ok with me

[Fixed] Encryption isn't working anymore

I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:
gordonthegopher said:
Formatting /data in TWRP uses up all the blocks, but encryption from Lineage needs 16kb of free space at the end of the partition to store the headers.
Click to expand...
Click to collapse
Fix
You have at least two solutions to fix this issue:
Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
Download and flash TWRP 3.1.0.0.
Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting
If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
Install your preferred ROM and encrypt it.
I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...
Original post
Hi guys,
I'm kind of stuck right now because I cannot encrypt my phone anymore and I don't know why. I got my phone last year and installed LOS 14.1 right away. For security reasons I also encrypted it - without any issues whatsoever. When LOS 15.1 came out, I upgraded my phone, with encryption still working. A couple of days back for some reason I decided to do a factory reset. Obviously, the device wasn't encrypted anymore after the reset. I then installed the new nightly of LOS (20180807) and tried to encrypt my phone once again. When I select "Encrypt phone", I need to enter my PIN, the phone restarts and reboots without encryption being started.
What I've done so far:
I've flashed two different TWRP versions: 3.2.3.0 and a customized one (https://forum.xda-developers.com/re...other-development/rom-lineageos-15-0-t3690465).
I've clean installed different LOS versions (unofficial LOS 14.1 and LOS 15.1 starting from the 20180710 release)
I've clean installed Omnirom (current release and a release from 20180107).
I've even flashed MIUI 9 and reinstalled LOS thereafter because some guy in the above mentioned LOS thread wrote, that this did the trick for him.
I've disabled WI-FI and mobile data before trying to encrypt my phone, because I found a blog article stating that this might help.
Nothing helped. The phone just reboots and stays unencrypted.
Do you guys have any additional hints or ideas how I can manage to encrypt my phone once again? Could another TWRP version do the trick? Is TWRP even involved in any kind when it comes to encryption of the OS? Do you think another ROM could be helpful?
Click to expand...
Click to collapse
Try orangewolf recovery ....
Sent from my Redmi Note 4 using Tapatalk
I'm also having trouble with this. Many days ago, someone told they had successfully encrypted their phone. I tried to replicate what he did, got miui.eu and flashed LOS afterwards.
After tons of restarting, reflashing, all kind of stuff, the encryption still doesn't work. Pfff.
shakil002 said:
Try orangewolf recovery ....
Click to expand...
Click to collapse
Thanks for the advice. But I'm afraid it didn't help
CanBostanci said:
I'm also having trouble with this. Many days ago, someone told they had successfully encrypted their phone. I tried to replicate what he did, got miui.eu and flashed LOS afterwards.
After tons of restarting, reflashing, all kind of stuff, the encryption still doesn't work. Pfff.
Click to expand...
Click to collapse
That's the most ****ed up part. For some people it does work, for some not.
There surely must be some ridiculous small detail we're not getting. Like disabling WI-FI while Bluetooth is enabled.
Things I've also tried:
installed a new kernel: ElectraBlue (https://forum.xda-developers.com/re...rnel-electrablue-kernel-redmi-note-4-t3655651)
flashed an old LOS 14.1 with kernel 3.18.31 which I found here
used different screen lock types (PIN, password, pattern, swipe)
charged my battery up to 100%
reformatted my data partition with f2f
Of course, my device is still unencrypted...
Has anyone any idea why encryption might fail? I mean, it did work in the past with LOS 14.1. So why does it even fail with an old release of LOS 14.1? I don't do knowingly anything different to all the times I've successfully encrypted my phone in the past.
Does the factory reset still leave some files untouched?
parkbank said:
Things I've also tried:
installed a new kernel: ElectraBlue (https://forum.xda-developers.com/re...rnel-electrablue-kernel-redmi-note-4-t3655651)
flashed an old LOS 14.1 with kernel 3.18.31 which I found here
used different screen lock types (PIN, password, pattern, swipe)
charged my battery up to 100%
reformatted my data partition with f2f
Of course, my device is still unencrypted...
Has anyone any idea why encryption might fail? I mean, it did work in the past with LOS 14.1. So why does it even fail with an old release of LOS 14.1? I don't do knowingly anything different to all the times I've successfully encrypted my phone in the past.
Does the factory reset still leave some files untouched?
Click to expand...
Click to collapse
Mmm, maybe it's about the firmware? I was almost going to try lineageos 14.1...
CanBostanci said:
Mmm, maybe it's about the firmware? I was almost going to try lineageos 14.1...
Click to expand...
Click to collapse
Huh... I didn't even think about the firmware. That would explain why the one user who flashed MIUI before installing LOS could actually encrypt his phone. I'll definitely give it a try.
parkbank said:
Huh... I didn't even think about the firmware. That would explain why the one user who flashed MIUI before installing LOS could actually encrypt his phone. I'll definitely give it a try.
Click to expand...
Click to collapse
I'm looking forward to hear the results. I'm about to become insane because of this encryption issue.
I've flashed both the dev and stable firmware found in this thread. No success
By flashing I mean factory reset, flashing the firmware and then installing LOS. I noticed, that flashing a new firmware while a ROM is still installed leads to some random ****ups.
After a couple of days of flashing, factory resetting, re-flashing, reading and a lot of cursing I finally found a working solution. I've added the fix to my initial post. Hopefully this helps
I was looking for solutions for quite a while and nothing else worked but did this and my device is encrypted again.
Thank you!
parkbank said:
I finally managed to find a working fix for this issue after having found this post. The origin of the problem is TWRP:
Fix
You have at least two solutions to fix this issue:
Resize your /data partition to free up the needed space. Here and here are guides how to do it. I haven't give it a try, so I can't confirm it's working, but several other guys reported this fix working.
If you're not comfortable to resize your partition, you can use an old version of TWRP. Beginning with version 3.2.0.0 TWRP seems to use up all blocks for /data. So you need a version prior to this one. I've used TWRP 3.1.0.0, but 3.1.1.0 should also work. Step by step:
Download and flash TWRP 3.1.0.0.
Boot into recovery and do a factory reset: Main menu -> Wipe -> Format Data (confirm with "yes"). I also wiped Cache and System (Main menu -> Wipe -> Advanced Wipe).
If you're going to flash a Nougat based ROM you can stop reading and start flashing and encrypting
If you're going to flash an Oreo based ROM you now need to update your TWRP version as anything prior to 3.2.0.0 doesn't support flashing Android 8.1. The official TWPR version sucks because you won't be able to decrypt your phone when booting in recovery. I've used the TWRP provided in this post.
Install your preferred ROM and encrypt it.
I haven't tested it, but dirty flashing a ROM (without a factory reset) might also work. But this usually leads to some random ****ups.
Also the TWRP alternative "Orange Fox" was mentioned as a solution in this thread. I actually can't remember if I've used Orange Fox to factory reset my phone or if I've flashed it only after having performed a factory reset using TWRP. For me Orange Fox didn't work (= encryption didn't work). But you might give it a try...
Original post
Click to expand...
Click to collapse
You have save my day "my MIDO" hehehehe
After the 1st PIE Rom the encryption was broken.
Your Step by Step save this and now Syberia 9 was able to encrypt with success :good:
Thank you one more time for sharing.
Thx!
---------- Post added at 07:22 PM ---------- Previous post was at 07:20 PM ----------
Orangefox worked
is there any plan to fix twrp itself?? thx
Thank you. It worked for me to get Havoc OS 9.0 with hardware encryption on my Redmi Note 3 SE.
I bypassed unlocking the bootloader by doing this. Then I installed TWRP 3.1.0.0 from the recovery, did the reset and everything as instructed here, updated it to 3.3.1.0, rebooted, then flashed the Pie ROM and latest gapps without any further wiping.
I use the first link, I've modified the partition size -> did the trick wihtout formating nor loosing datas
Great, thank-You.
Hi, I want to ask, what is this encryption features you been using? can u tell me?

How to dirty flash a custom rom?

Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
BenParz said:
Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
Click to expand...
Click to collapse
Just flash the rom, and wipe cache thats it. But be sure ur using the same rom not another one
BenParz said:
Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
Click to expand...
Click to collapse
wipe system,davik and cache. then dirty flash. remember not to wipe "system" if you flash OTA .zip
Okay, I have Additional questions :
1. Do I have to disable magisk modules or outright uninstall it before flashing?
2. Do I have to mount system and vendor in twrp again?
3. Do I need to install magisk again after dirty flashing?
4. Do I have to flash DFE again?
BenParz said:
Okay, I have Additional questions :
1. Do I have to disable magisk modules or outright uninstall it before flashing?
2. Do I have to mount system and vendor in twrp again?
3. Do I need to install magisk again after dirty flashing?
4. Do I have to flash DFE again?
Click to expand...
Click to collapse
1. Not necessary (unless you are using a module which may cause bootloop)
2. I never did.
3. Most of the times when dirty flashing the same ROM, twrp flashes Magisk (and GApps) automatically (atleast in my case). If it doesn't flash automatically, then you can flash it manually in order to make it certain.
4. Like I always said, flashing DFE is not necessary if you use the TWRP that supports decryption without actually decrypting your device permanently. Infact, I never suggest anyone to use a decrypted device if using it for financial purpose.
Rowdyy Ronnie said:
1. Not necessary (unless you are using a module which may cause bootloop)
2. I never did.
3. Most of the times when dirty flashing the same ROM, twrp flashes Magisk (and GApps) automatically (atleast in my case). If it doesn't flash automatically, then you can flash it manually in order to make it certain.
4. Like I always said, flashing DFE is not necessary if you use the TWRP that supports decryption without actually decrypting your device permanently. Infact, I never suggest anyone to use a decrypted device if using it for financial purpose.
Click to expand...
Click to collapse
Omg, thanks for answering my questions mate, much appreciated!
Depends, but if you are switching from a different ROM then dirty flash will most likely brick your device or cause a lot of errors and it should never be done. But if it is from the same ROM, like going from older PE to new one, then all you do is flash the newer one with the older version already installed. But it is recommended you clean flash because from my experience, dirty flash always caused errors like lag and crashing. Just use Migrate(available on Play store) and use it to backup apps. A lot of these custom ROMs are still early and in BETA so it is recommended you clean flash.
As for DFE, it is optional. Only problem is you will have to use TWRP with SD card support or one that has a working decryption so that you can flash files through the recovery . You can use apps like flashify to flash if you dont want to your device decrypted. If you got any questions you can ask me.
itscooltime said:
Depends, but if you are switching from a different ROM then dirty flash will most likely brick your device or cause a lot of errors and it should never be done. But if it is from the same ROM, like going from older PE to new one, then all you do is flash the newer one with the older version already installed. But it is recommended you clean flash because from my experience, dirty flash always caused errors like lag and crashing. Just use Migrate(available on Play store) and use it to backup apps. A lot of these custom ROMs are still early and in BETA so it is recommended you clean flash.
As for DFE, it is optional. Only problem is you will have to use TWRP with SD card support or one that has a working decryption so that you can flash files through the recovery . You can use apps like flashify to flash if you dont want to your device decrypted. If you got any questions you can ask me.
Click to expand...
Click to collapse
Actually I've got one.
I want to dirty flash a ROM (just an updated version of the same one) but I dont know how i can place a file into my phone's internal storage through TWRP without formatting de data (full wipe). My phone is not recognized by my PC on TWRP mode unless I make a full wipe.
Can you guys assist?
I have a question I'm using a custom rom with gapps, but the custom rom update that is available does not have gapps if I flash the non-gapp version on my gapp version will it cause problems?
gersomfcomiano said:
Actually I've got one.
I want to dirty flash a ROM (just an updated version of the same one) but I dont know how i can place a file into my phone's internal storage through TWRP without formatting de data (full wipe). My phone is not recognized by my PC on TWRP mode unless I make a full wipe.
Can you guys assist?
Click to expand...
Click to collapse
G3's typically have sd card storage available. athat's where I put all my roms, gapp's, other stuff which I have no trouble flashing from TWRP. Beyond that you must seek one more learned than I.
Nfury00701 said:
wipe system,davik and cache. then dirty flash. remember not to wipe "system" if you flash OTA .zip
Click to expand...
Click to collapse
in this case all data & apps will be lost ?
gajanan57 said:
in this case all data & apps will be lost ?
Click to expand...
Click to collapse
You're right. That user is wrong. Do NOT wipe system if you are dirty flashing. Otherwise you are just doing a normal flashing, not updating your rom.
fede01_8 said:
You're right. That user is wrong. Do NOT wipe system if you are dirty flashing. Otherwise you are just doing a normal flashing, not updating your rom.
Click to expand...
Click to collapse
I'd say no.
Android System partition is mounted as readonly after boot and won't be modified anymore then (unless you modify system files with adb/TWRP and mounted system partition).
Your during Android usage installed apps are stored in Data partition.
However you have to reflash gapps and magisk in case you installed them with TWRP/adb.

Pocophone F1 no os after sideloading going wrong

Hey all, so it appears that I screwed my phone, I am not sure how.
I was running LineageOS, and wanted to update to Android 10 one, so I followed the steps, and I think I screwed the sideloading part, so... long story short now when rebooting from OrangeFox RecoveryProject it says no OS detected, and when it boots it says encryption unsuccessful, I tried wiping and installing DisableForceEncryption_Treble_v17.2 and restarting, and the same thing happens.
I tried to flash through recovery both, and did not work:
https://xiaomifirmwareupdater.com/firmware/beryllium/
https://xiaomifirmwareupdater.com/archive/vendor/beryllium/
And when trying to flash through miFlash it doesn't work:
I go to fastboot in poco, hit refresh in miflash, it shows a device in the list, but the phone goes dark with 'something key to shutdown` written in the top left corner and if I hit the flash button nothing happens.
Can anyone assist with that please?
kishikaisei said:
Hey all, so it appears that I screwed my phone, I am not sure how.
I was running LineageOS, and wanted to update to Android 10 one, so I followed the steps, and I think I screwed the sideloading part, so... long story short now when rebooting from OrangeFox RecoveryProject it says no OS detected, and when it boots it says encryption unsuccessful, I tried wiping and installing DisableForceEncryption_Treble_v17.2 and restarting, and the same thing happens.
I tried to flash through recovery both, and did not work:
https://xiaomifirmwareupdater.com/firmware/beryllium/
https://xiaomifirmwareupdater.com/archive/vendor/beryllium/
And when trying to flash through miFlash it doesn't work:
I go to fastboot in poco, hit refresh in miflash, it shows a device in the list, but the phone goes dark with 'something key to shutdown` written in the top left corner and if I hit the flash button nothing happens.
Can anyone assist with that please?
Click to expand...
Click to collapse
This happened to me when I accidentally deleted the OS when flashing the latest MIUI 11 build (using TWRP). THIS IS HOW I FIXED IT.
Find a full firmware of whatever you wanted to flash, either Lineage or MIUI 11. Then flash via your recovery (you said you have orangefox). Use an external sd card, external USB or HDD since you technically wouldn't have access to your internal data. After flashing, same process as most updates, clear cache and dalkiv. Then flash a newer DFE (if you still want to decrypt, there is a page here in xda with it. Or go to miui forums Happybuddhist, the mod there, made a new one prebuilt with Magisk). Then reboot into recovery to make sure you keep your custom recovery. Once booted to recov. Boot to system. Should fix the issue.
You could check my guide here on how to unbrick your pocophone:
https://forum.xda-developers.com/poco-f1/how-to/unbrick-flashing-stable-rom-pocophone-t3901152
mecoromeo said:
This happened to me when I accidentally deleted the OS when flashing the latest MIUI 11 build (using TWRP). THIS IS HOW I FIXED IT.
Find a full firmware of whatever you wanted to flash, either Lineage or MIUI 11. Then flash via your recovery (you said you have orangefox). Use an external sd card, external USB or HDD since you technically wouldn't have access to your internal data. After flashing, same process as most updates, clear cache and dalkiv. Then flash a newer DFE (if you still want to decrypt, there is a page here in xda with it. Or go to miui forums Happybuddhist, the mod there, made a new one prebuilt with Magisk). Then reboot into recovery to make sure you keep your custom recovery. Once booted to recov. Boot to system. Should fix the issue.
Click to expand...
Click to collapse
I tried that, now I am a step forward I think, I flashed the stock firmware I found, and installed the latest stock ROM, rebooted (doesn't say no os anymore), but the only thing I see is a DELETE ALL DATA button and at the bottom 'Encryption was interrupted and can't be completed. As a result, the data on your phone is no longer accessible.
To resume using your phone, you need to perform a factory reset. When you set up your phone after the reset, you'll have an opportunity to restore any data that was backed up to your Google account.'
Darklouis said:
You could check my guide here on how to unbrick your pocophone:
https://forum.xda-developers.com/poco-f1/how-to/unbrick-flashing-stable-rom-pocophone-t3901152
Click to expand...
Click to collapse
I have an issue with the MiFlash part, it seems that it doesn't work as I mentioned...
Aight all, formatting data partition to ext4 worked, now it is booting
kishikaisei said:
Aight all, formatting data partition to ext4 worked, now it is booting
Click to expand...
Click to collapse
Works now?
mecoromeo said:
Works now?
Click to expand...
Click to collapse
So I had an OS-less phone that don't get recognised in MiFlash, and I had orangeFox recovery.
The steps to fix were:
- Flash a full stock Firmware
- Flash the stock ROM
- Flash DFE
- Format data to ext4
- Reboot and it works
So thanks all for your help

Categories

Resources