Question K40Pro VAB problem - Xiaomi Mi 11i / 11X Pro / Redmi K40 Pro+

Will VAB structure lead to the scarcity of third party ROMs? At present, only one twrp I use can be swiped into MIUI official Rom. I must use the author's tool to temporarily start the image and directly swipe into Rom. no operation can be changed in twrp!! Just copy a file in the storage may lead to failure to boot! Because twrp has no boot partition for partition, it is obviously not friendly to the users

Does this device currently have a GSI system? If so, how should we brush in? Or do you have to wait until Android 12 is stable?

Um what is VAB?

Keno_I said:
Um what is VAB?
Click to expand...
Click to collapse
At the same time, it has ab partition equipment. At present, manufacturers use dynamic partition, one plus eight and one plus nine. K40pro is v-ab partition

Well yeah vab was perceived to be difficult to achieve custom modifications since nougat

And the difficulty is showing already. Mi 11x is having a rain of custom roms, here it is a desert

Related

[CLOSED][PARTITION][TREBLE] Project Treble for Samsung Galaxy S8 [dreamltexx][15.02.2019]

- T R E B L E Y -
Android Partition Treblerizer
A tool able to seamlessly create / remove the vendor partition from within TWRP​
INTRODUCTION
The creation of a tool able to create and remove the supplier partition from TWRP, so a computer was not required. So I created this flaming TWRP ZIP which can create and remove the vendor partition from the userdata system or partitions without a computer and without deleting the files in the mother partition in the recommended configuration.
Trebley, finally, also expands on our much loved Galaxy S8, bringing with it Project Treble on the much loved device.
The tool will try to resize the mother partition without deleting it, either during the creation and removal of the supplier partition. However, this can only be done when the mother partition is ext4, only when the supplier partition is at the end of the mother partition and when the mother partition is not encrypted. The recommended configuration is the one that is obtained by selecting the first option in each option: subdividing 512 MB from the end of the system partition. A reboot is required after applying the patch to the partition table because the kernel needs to reload it before doing anything else.
REQUIREMENTS
Due to the use of a key detection binary, it is compatible only with ARM and ARM64 devices running TWRP. So far I have tested it in the Samsung Galaxy S8 but It should work in any compatible device. I made it this way so other legacy devices could transition to Treble ROMs + GSI, and Android Pie. Please let me know about other devices using this tool!!!!!
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED AND IF YOU FOLLOW MY STEPS BELOW, YOU WILL LOSE YOUR WARRANTY, KNOX WILL DISPLAY 0x1! I'M NOT RESPONSIBLE FOR ANY DAMAGED DEVICE!.
!!! Whatever you do, it is at your own risk !!!
Either for creating or removing a vendor partition, follow these steps:
1. Download the TWRP ZIP tool to your External SD card.
2. Boot to TWRP recovery, under Install, flash the ZIP file as any other ROM or MOD file to execute the tool.
3. Reboot to recovery again to ensure the changes are applied properly.
4. In some cases you will need to format the mother partition after adding or removing the vendor partition next to it.
CREATE A VENDOR PARTITION:
So far these are the available options:
Mother partition selection: system / userdata
Split position: Splitting from the end / start of the mother partition.
Vendor partition size: 512 / 915 MB
REMOVE THE VENDOR PARTITION:
Should a Vendor module already exists, Trebley offers to remove it, returning to a Non-Treble partition table. It will return the space to the mother partition, system or userdata. So, older non Treble ROMs could be flashed after the mandatory reboot.
DOWNLOAD
Trebley_APT_v1.0_ARM_20190215-signed.zip
SOURCES
All rights reserved to the project: Party and its creator(@Oki).
CAUTION
Currently, we recommend the use of Trebley, exclusively to developers, as until now there has been no development of material related to the project treble, this project lays the foundations creating the partition vendor, for the support treble.
CREDITS
@someone755 for the keycheck binary
@Zackptg5 for the V4A install script that inspired my version.
@Oki for the base script.
XDA:DevDB Information
[PARTITION][TREBLE] Project Treble for Samsung Galaxy S8 [dreamltexx][15.02.2019], Tool/Utility for the Samsung Galaxy S8
Contributors
DarioRetr
Source Code: https://forum.xda-developers.com/axon-7/development/tool-party-v0-1-vendor-partition-t3831517
Version Information
Status: Alpha
Current Stable Version: V1.0
Stable Release Date: 2019-02-26
Current Beta Version: V0.5
Beta Release Date: 2019-02-15
Created 2019-02-17
Last Updated 2019-02-17
thx the tools makes me now easyer to create and remove my treble partition since i used for the moment all time parted with console on pc. for the one that thinks that is treble. without right vendor partition is useless. i have a partition that boots gsi but with a nice glitched display
geiti94 said:
thx the tools makes me now easyer to create and remove my treble partition since i used for the moment all time parted with console on pc. for the one that thinks that is treble. without right vendor partition is useless. i have a partition that boots gsi but with a nice glitched display
Click to expand...
Click to collapse
It is certainly not Trebley's fault, as it was specified in red, that Trebley is currently recommended for use only to developers, as Trebley, lays the foundations for Project Treble by creating the Vendor partition, after which it will be up to the developers Compile from source the vendor. IMG, the TWRP custom, and the kernel, to allow the startup of Project Treble.
In addition, in layman's terms, Trebley currently creates the vendor partition, after which it will be you dev compile the sources by adjusting them to the treble standards, to allow you to use project treble on the Samsung S8.
Members are reminded that making changes to device partitions is inherently dangerous. With that in mind, exercise caution and if in doubt, DON'T.
LenAsh said:
Members are reminded that making changes to device partitions is inherently dangerous. With that in mind, exercise caution and if in doubt, DON'T.
Click to expand...
Click to collapse
Dear @LenAsh, Trebley, precisely ensures through the scripts, a greater security, as it is all automated and calculated to the milimeter, and above all reduces the risk. Clearly, currently Trebley for S8, it is in its initial state, where it introduces the vendor partition, now it's up to you have developer, compile and propagate the material needed to start project treble in our Samsung S8 device
Any hope on this zip working on s8 phones? Or porting for others?
Rehvix said:
Any hope on this zip working on s8 phones? Or porting for others?
Click to expand...
Click to collapse
This zip is made for the Samsung Galaxy S8, but also works on other devices, because the script is multi platform and arm, currently, but we recommend the use of the zip file to developers, because currently Trebley creates only the vendor partition, but Without the vendor file, and a modified TWRP for treble support, you still can't use the project treble. We need to wait for some dev, compile from source, the appropriate kernel for project treble, and a vendor appropriate to the project treble along with a custom TWRP, allowing the Samsung S8 to use the vendor partition created by Trebley, and finally use Project Treble.
so can we get aosp room sir..??
onMyConquest said:
so can we get aosp room sir..??
Click to expand...
Click to collapse
In order to run a GSI, you have to wait for the scene, wait for some Dev, compile the kernel and the vendor, and place a custom twrp, to allow the project treble to go. In practice Trebley, prepares the partition making it compatible with Project Treble. Now you have to have developer share software, clearly depends on scene to scene, to give you an example on the Samsung Galaxy S6 Edge, with the same method, now they can use the GSI, with project treble.
Plz someon try this. Im afraid to brick
https://www.xda-developers.com/flash-generic-system-image-project-treble-device/
Can somebody take this down or at least force the guy to rename it ? this is clearly a script that'll only make an empty partition, this is NOT treble as stated in the thread also by reading the messages it's clear the OP doesn't know what he's talking about
If I understand, in the case of Galaxy S8, it splits the /system partition to create a /vendor partition and copy the contents from /system/vendor to the new /vendor partition, right?
However, dont the binaries and/or drivers need to be adapted for project Treble? I mean how does the (lets say) new aosp rom know what drivers use for each feature?
Josevega said:
Can somebody take this down or at least force the guy to rename it ? this is clearly a script that'll only make an empty partition, this is NOT treble as stated in the thread also by reading the messages it's clear the OP doesn't know what he's talking about
Click to expand...
Click to collapse
My dear, create the partition to make it compatible with the Project Treble, now instead of talking about things, why do not you go to work, adapting the kernel and the vendor, and send the vendor.img, and the boot.img and twrp .img, to be able to use project treble?
Also before saying, that Trebley, does not know what he is talking about, he learns to read English, why it is written clearly is round, that this script is recommended to use you have developer to ensure project treble also on S8.
If then you want to talk bad, because evidently put project treble on S8, it requires too much work as you have to move the device tree blob and so on, and for question of laziness you want to deny the possibility of having treble to users.
So we know that the developers of the scene samsung S8, does not paste them to adapt the kernel to project treble.
bamsbamx said:
If I understand, in the case of Galaxy S8, it splits the /system partition to create a /vendor partition and copy the contents from /system/vendor to the new /vendor partition, right?
However, dont the binaries and/or drivers need to be adapted for project Treble? I mean how does the (lets say) new aosp rom know what drivers use for each feature?
Click to expand...
Click to collapse
Then, Trebley, takes part of partition either from system or userdata, and then creates a new partition named vendor, and makes the device compatible with project treble, then it needs a developer, move device tree blobs, and systems the configuration , because it is not enough to move the vendor into vendor, you have to compile the kernel so that you take the drivers from the vendor, you have to do some work first at the software level.
You need someone who has Ubuntu, take the device sources from GitHub, and run the device tree, and compile the vendor.img and boot.img which includes the kernel, and then edit the twrp to make it compatible with Treble, after that you can use treble on the device.
Trebley, did not want to compile the vendor for the Samsung S8 users, for one reason, because Trebley's developers are external to the Samsung S8 scene, and compile a kernel or vendor for an S8, as you might compile for an S7 Edge or an S6, it could cause users of the S8, slowdowns, battery that you download easily, GSI where the camera does not work.
So we prefer to be your developer of the scene, to compile the vendor and boot, to ensure reliability even with the project treble. Because we do not want s8 users to consider project treble as an unstable project.
In addition, this project has also expanded on Note 8, we will see who will be faster to adapt kernels and vendors.
Update 18/02/2019
A developer of the S7 Edge scene, he decided to contribute to the project, starting to work on the sources of the device.
https://github.com/KiubeDev
Hello ,Can you make this for s7 edge?
DarioRetr said:
In addition, this project has also expanded on Note 8, we will see who will be faster to adapt kernels and vendors.
Update 18/02/2019
A developer of the S7 Edge scene, he decided to contribute to the project, starting to work on the sources of the device.
https://github.com/KiubeDev
Click to expand...
Click to collapse
In this github account all the repositories are forked from ivan meler, he is galaxy s7/edge developer i can see a universal exynos 8895 repo but there is no device specific code for dream2ltexx and only a highly experienced developer can make this then there will be no need for treble support.
Why are u not using the preload partition???? Would be much easier as its only used for apps to be installed in stock Rom for a carrier or Region...
Can I install this, and then https://forum.xda-developers.com/pr...vice-development/lineage-phh-treble-t3767690?
Will that brick?
qasim799 said:
In this github account all the repositories are forked from ivan meler, he is galaxy s7/edge developer i can see a universal exynos 8895 repo but there is no device specific code for dream2ltexx and only a highly experienced developer can make this then there will be no need for treble support.
Click to expand...
Click to collapse
Dear, that repository is another, he is just a dev, the repository where they are working and gitlab, and is only accessible to developers.

[PARTITION][TREBLE] Project Treble for Samsung Galaxy Note 8 [SM-N950F][15.02.2019]

- T R E B L E Y -
Android Partition Treblerizer
A tool able to seamlessly create / remove the vendor partition from within TWRP​
INTRODUCTION
The creation of a tool able to create and remove the supplier partition from TWRP, so a computer was not required. So I created this flaming TWRP ZIP which can create and remove the vendor partition from the userdata system or partitions without a computer and without deleting the files in the mother partition in the recommended configuration.
Trebley, finally, also expands on our much loved Galaxy Note 8, bringing with it Project Treble on the much loved device.
The tool will try to resize the mother partition without deleting it, either during the creation and removal of the supplier partition. However, this can only be done when the mother partition is ext4, only when the supplier partition is at the end of the mother partition and when the mother partition is not encrypted. The recommended configuration is the one that is obtained by selecting the first option in each option: subdividing 512 MB from the end of the system partition. A reboot is required after applying the patch to the partition table because the kernel needs to reload it before doing anything else.
REQUIREMENTS
Due to the use of a key detection binary, it is compatible only with ARM and ARM64 devices running TWRP. So far I have tested it in the Samsung Galaxy Note 8 but It should work in any compatible device. I made it this way so other legacy devices could transition to Treble ROMs + GSI, and Android Pie. Please let me know about other devices using this tool!!!!!
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED AND IF YOU FOLLOW MY STEPS BELOW, YOU WILL LOSE YOUR WARRANTY, KNOX WILL DISPLAY 0x1! I'M NOT RESPONSIBLE FOR ANY DAMAGED DEVICE!.
!!! Whatever you do, it is at your own risk !!!
Either for creating or removing a vendor partition, follow these steps:
1. Download the TWRP ZIP tool to your External SD card.
2. Boot to TWRP recovery, under Install, flash the ZIP file as any other ROM or MOD file to execute the tool.
3. Reboot to recovery again to ensure the changes are applied properly.
4. In some cases you will need to format the mother partition after adding or removing the vendor partition next to it.
CREATE A VENDOR PARTITION:
So far these are the available options:
Mother partition selection: system / userdata
Split position: Splitting from the end / start of the mother partition.
Vendor partition size: 512 / 915 MB
REMOVE THE VENDOR PARTITION:
Should a Vendor module already exists, Trebley offers to remove it, returning to a Non-Treble partition table. It will return the space to the mother partition, system or userdata. So, older non Treble ROMs could be flashed after the mandatory reboot.
DOWNLOAD
Trebley_APT_v1.0_ARM_20190215-signed.zip
SOURCES
All rights reserved to the project: Party and its creator(@Oki).
CAUTION
Currently, we recommend the use of Trebley, exclusively to developers, as until now there has been no development of material related to the project treble, this project lays the foundations creating the partition vendor, for the support treble.
CREDITS
@someone755 for the keycheck binary
@Zackptg5 for the V4A install script that inspired my version.
@Oki for the base script.
XDA:DevDB Information
[PARTITION][TREBLE] Project Treble for Samsung Galaxy Note 8 [SM-N950F][15.02.2019], Tool/Utility for the Samsung Galaxy Note 8 (2017 Phone)
Contributors
DarioRetr
Source Code: https://forum.xda-developers.com/axon-7/development/tool-party-v0-1-vendor-partition-t3831517
Version Information
Status: Alpha
Current Stable Version: V1.0
Stable Release Date: 2019-02-26
Current Beta Version: V0.5
Beta Release Date: 2019-02-15
Created 2019-02-17
Last Updated 2019-02-17
oh my lord - it is happening. treble for the Note8 - just think of the possibilities :victory:
thank you unbelievably much:highfive:
WOAH dude! Finally its happening
edit: tried this and any combination i try i get a Error 2 error!
Any ideas? Or should i try this with a full wipe and try and flash it?
joluke said:
WOAH dude! Finally its happening
edit: tried this and any combination i try i get a Error 2 error!
Any ideas? Or should i try this with a full wipe and try and flash it?
Click to expand...
Click to collapse
Dont flash this yet. There's no rom compatible with this. Note that this is just a script to create partition.
v0ne said:
Dont flash this yet. There's no rom compatible with this. Note that this is just a script to create partition.
Click to expand...
Click to collapse
Ups
I'll keep it for the future then ^^
Guys, this script is currently recommended for use only you have developer, make the device compatible for Project Treble, but you need some developer of the scene, compatibilizzai kernel source for project treble, and give you the vendor.img and boot.img including a custom twrp, to be able to use a GSI and then project treble.
Furthermore, the operation of the script on all versions of Note 8 is not guaranteed.
Oh my god, here it is, but I hope that it doesnt end in the first build like everything else for note 8
Thanks devs but please dont quit now
This is insanely good work. This is so cool :laugh:
Deleted
I flashed this and got an error in TWRP.
Most likely because /dev/block/bootdevice doesn't exist on Note8, but this script is searching for that.
Shadow7107 said:
I flashed this and got an error in TWRP.
Most likely because /dev/block/bootdevice doesn't exist on Note8, but this script is searching for that.
Click to expand...
Click to collapse
What model do you have of Samsung Galaxy Note 8?
For advice and support, I suggest you join the Trebley - Making the future group!
https://t.me/joinchat/I5PCthNlYmrJ4YQY8xxXSg

How do I image and distribute (to same model) LineageOS Android 9 installations?

I have a couple of Xiaomi Pocophones F1. I have set up one of them with the most recent LineageOS (rooted the device, edited a lot of system settings, installed and configured some apps) and would like to distribute the OS as an image to other devices of the same model. Is there a way?
I tried NANDroid from the TWRP recovery with PIN (secure startup) disabled before creating the backup as well as on the target device. Unfortunately, the result ist not bootable. I restored Boot, System, and Data partition.
Am I doing something wrong? Are there other ways (aside from professional MDM)?
EDIT: Sorry for the double-posting in the Pocophone sub-forum. I figured that it is not really a Pocophone-limited question.
The only way you will pull that off is compiling the rom yourself with the changes you want.
Never flash a nandroid from another device as they copy devixe spicific files.
I see. I was afraid that was the case and it makes sense.
Out of curiosity: could you come up with some example of those files from the top of your head?
pegnose said:
I see. I was afraid that was the case and it makes sense.
Out of curiosity: could you come up with some example of those files from the top of your head?
Click to expand...
Click to collapse
The main one is the efs fields hich contains the imei as well as another fields used to identify the device from other.
Ah, of course. Thank you again!
PS: You look a little like Batman.

Difference between GSI and "normal" ROMs?

Hi guys, could any of you explain to me what is the difference between GSI based and "normal" build ROMs?
I thought most custom ROMs are based on AOSP/GSI, but right now many Android 10 ROMs for one of my devices (Lenovo P2/kuntao) are popping up and most of them are getting a lot of hate for apparently being based on GSI and are not "proper" ROMs. People are not giving any specific criticism, just generally whining, like those ROMs are useless or something.
The only difference I see is for some reason the GSI ROMs need F2FS format instead of EXT4 that is standard for other ROMs for the device.
Thanks.
To my knowledge, GSIs when properly implemented for a device are as good as a Device Specific ROM or what you call a "normal" ROM.
Usually GSIs are made for a wide-audience of devices. So the usual reason is that when a bug only available in a specific device is found. It usually isn't fixed by GSI devs.
However, Device Specific GSIs are actually made for the device it's running on. So small bugs will be fixed.
Usually though problems come from a bad vendor implementation. So if your device has a bad vendor implementation. I guess that would be a cost for concern. You can create your own but you'd have to wait for developers to create it.
They may be mad about limited Magisk Support. Since Magisk currently does not support GSI ROMs. But other than that, I don't see why GSIs get so much hate.
In a Treble world, don't all ROMs technically include a GSI? Because anything living in /system and distributed by a system.img file can actually be run as a GSI on any device that is Treble compatible.
However, right now it's probably like you say, vendors (and enthusiast ROM makers) may not completely adhere to the rules set by Android/AOSP, such as putting the correct things in the system, product, vendor and odm partitions. They include nasty hacks to solve some idiosyncratic bugs for their specific device. Nothing wrong with some nasty hacks, but they should put them in the right place (in product or odm partitions). As such, in theory there should be no need for separate system images any more.
In such a world, I suspect that indeed in the near future we will only load the GSI of our choice for all devices. We will rely only on whole ROM packages when drivers (vendor partition and optionally odm) need to be updated. This is needed for example for increasing the necessary HAL version for future Android releases, possibly shipped with an updated product partition, if the device requires some specific apps or functionality. So instead of full ROMs we can then just have "device support packages" for phones that aren't already fully fit for GSIs, or need updates for future GSI architectures.
In that case we can even have OTA updates for only the GSI, published by the specific OS maker (e.g. AOSP, LineageOS, /e/, GrapheneOS, CalyxOS and many more). Specific ROM developers then need only make sure that their device support package is up to snuff. When releasing a new OS update or version, the same OTA update can then be immmediately pushed to any device that runs it. Wouldn't that be great?

Simple Beginners Guide to Raphael(in) Custom ROMs

**** Disclaimer: I'm not responsible if you destroy your device. Learn at your own risk!!! ****
Alright, So I am a bit Moderately skilled to Custom Development. I do not know a lot of in-depth either.
However, I do know enough to help other new beginners out.
As I continue to learn more info and details, I will update this post frequently.
Completed guide, I'm saving and typing as not to lose progress. Last Updated- 01/03/2021
Please do note, CROSS-VERIFY if the info here is correct before following it.
What is a Custom ROM?
Simply put, it is a new Operating System [OS].
People find their stock (the one you got with your phone) to be boring, or they dislike it or want more customization and optimization, lesser bloatware (useless unwanted system apps).
Thus some Developers made their own ROM (aka OS). Then others made it compatible with our phone. Sometimes this works perfectly, most of the time it doesn't. Thus Asking people how the ROM is, is always good to ask.
STABLE means almost no errors, UNSTABLE means a few/lots of errors.
OFFICIAL means the Developer in charge will keep updating it and has been granted the task officially. EOL means End Of Life, aka Developer, won't work on it anymore.
FOD means finger on display icon, FP means fingerprint sensor, SOT means screen on time or how long your battery will last.BB means Battery backup, or how long the battery will last.
Click to expand...
Click to collapse
How To Get a Custom ROM?
So, to flash (insert) a new Custom ROM, we first need to unlock the Bootloader. The Bootloader is what allows us to wipe (remove/erase) our data, and current OS and flash a different one.
Then we flash a Recovery. (A software that makes flashing and wiping and other stuff easy)
Then flash the ROM, Then (if needed) vendor+firmware, gapps, magisk.
So in k20 pro/Mi 9t pro, there are 5 vendors. Indians use Indian Vendor, Chinese users use Chinese Vendor, similarly for EEA, Russian, and Global.
In this Vendor zip file, nowadays, the firmware is included in them, so it isn't required to flash it separately.
If you are coming from miui 11 and want to flash custom ROM you don't need to flash the vendor.
If you are coming from miui 10 to custom ROM Android 10, you need to flash the miui 11 vendor along with the ROM.
Click to expand...
Click to collapse
How To Unlock Bootloader?
So, you should first update your software to the latest miui OS [current: MIUI 11].
Go to Settings > About Phone > tap on MIUI Version 7 times -> you unlock developer settings
Go to Settings > Additional Settings > Developer Options > enable (switch on) USB Debugging > OEM Unlocking > click on MI Unlock status > link account and device.
To link the account, you must first have a Xiaomi MI account. You can make this in settings, or head to https://account.xiaomi.com
Wait 7-15 days
Once 7-15 days have passed,
USING WINDOWS PC
BACKUP ALL FILES, CONTACTS, WHATSAPP, ANY APP settings (if any), AND SYNC/LINK accounts to cloud => YOU WILL LOSE EVERYTHING NOW
Now download the Mi Unlock tool onto your PC https://xiaomitools.com/mi-unlock-tool-en/
IN A SEPERATE FOLDER
Then download Platform Tools from attachments below.
Then download TWRP (team win recovery project) from https://dl.twrp.me/raphael/
Then download Orange Fox Recovery (OFRP) from https://files.orangefox.tech/OrangeFox-Stable/raphael/ and download the latest file. [Currently: OrangeFox-R-10.1_3-Stable-raphael.zip]
Then download Disable force encrypt zip file from attachments below
Then download adb drivers from https://www.xda-developers.com/what-is-adb/ version 1.4.3 onto your PC and run the application. (Follow from How do I install ADB?) (Or you can skip that and just get the file from attachments below and extract it to C drive as a separate folder directly)
Then download the ROM (links are given below)
Then download gapps (optional). from https://opengapps.org/ and select ARMx64 and PICO then the download button.
Then download Magisk (optional). from https://github.com/topjohnwu/Magisk/releases download the Latest Magisk-vXX.xx.zip file there.[Currently: Magisk-v20.4.zip]
Download the latest vendor file from the below links. (make sure it's the proper file for your device's variant.)
Vendor and firmware are both combined and included in the same zip file.
Global, EEA (Europe), China, Russia Q Vendor: https://xiaomifirmwareupdater.com/archive/vendor/raphael/
Indian Q Vendor: https://xiaomifirmwareupdater.com/archive/vendor/raphaelin/
Check my third comment to learn how to recognize which device variant is yours, and what vendor to download and flash.
NOW! GET READY!
Now, connect your device.
Use your cable included in the box (the charging wire) and connect it to your phone and PC.
Go to 'adb' folder in your C-drive, (on that address bar thing where it shows) This PC >OS(C> adb click on it and type cmd . This will open a Command prompt to that folder.
Type adb devices and on your phone tap on the authorize button that pops up when unlocked. Now type adb devices again.
you will get
Code:
List of devices attached
365278234e device
Now, Switch off your phone.
Open the MI Unlock Tool on your PC, run the file that is an application. Read through everything, click on unlock, confirm.
Wait till the phone fully reboots itself. DON'T TOUCH IT NOW!
Congrats, the phone is now unlocked, and you have stock MIUI 11.
Now skip everything in the setup (we wanna add a custom ROM now remember, why stop here?)
again do the adb devices. You should get the same results.
Now, on your PC
Extract the Platform Tools zip file so you get its folder.
Move the TWRP.img file into the folder.
Open that folder. on that address bar, type cmd to get a new command prompt window.
There type dir *img to confirm the file is found properly.
Now switch off your phone again.
press and hold the power button + volume down button.
you will soon enter fastboot mode.
Now, on the new command prompt where you typed dir *img
type fastboot devices and you will get an output like
Code:
342524356 fastboot
Then type fastboot flash recovery twrp(press the TAB key to autofill)
Now it's done! you have TWRP, but it isn't permanent.
Now, TWRP usage.
Now press and hold power key + volume up to enter TWRP.
Once in TWRP, unlock it.
Go to MOUNT and check if MTP is enabled..... click on "enable MTP" button.
Now copy the ofox.zip (orange fox recovery zip file) to your phone from your PC via your PC.
Now go to INSTALL tap the ofox.zip file, then flash it!
YAY now, orangefox is your Permanent Recovery.
Now go to MENU > Manage Partitions > select only data > format data
Now go to MENU > Reboot > Recovery
Now, to Flash your first Custom Rom.
Now from your PC copy the ROM zip file, Disable decrypt zip file, gapps ( if specified, optional), magisk ( if you want to root, optional)
Now go to MENU > Reboot > Recovery
Now go to FILES > tap on the ROM zip > add to queue > tap disable decrypt zip file > add to queue > (add gapps , magisk if needed) > flash
Now wait for a while (approx 10mins) till ROM boots up and complete the setup process.
Congrats you have your new ROM.
Now just let google download all your apps
Before you change settings like dark mode or use custom launchers etc...
Reboot once for the heck of it. Then Customize the way you like.
**** Backup Your Persist and save it on your PC always. ****
You can backup persist by having root then downloading a terminal app from Playstore. then typing these two commands
Code:
su
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
Click to expand...
Click to collapse
How To Change My ROM? I wanna Try them all!
Now is the easy part, since all the setup is done!
First remove all passwords, fingerprints, and so forth.
For AOSP ROMs: (MIUI below)
AOSP ROMs will not break your L1
First Download the AOSP ROM you want, given below are some examples. (MIUI below)
Each of these might have instructions, usually saying...
Go to your Recovery, (press and hold Power + Volume Up buttons).
Then go to WIPE > select Dalvik, Cache, System, Data > then wipe them all.
Then go to [Files in OFX] [Install in TWRP] and
Only If you are coming from miui and flashing AOSP, go to orangefox settings > manage partitions > data > format > type yes (you lose everything in internal storage) then
Select the Vendor (if it's needed) (not required if moving between any android 10 ROMs) (Just make sure it's the right Vendor for your device/region) (If the previous AOSP rom uses OSS vendor, then you need to wipe vendor as well and flash the stock before proceeding) and flash it.
Select the ROM (Then > add to queue, else if you only needed ROM, just flash. and set-up! yay!)
DFE (not required if you want to be encrypted, which is not recommended.) (A must if you formatted data via orangefox settings and did that typing 'yes' thing)
Gapps (if it isn't already included in the ROM, ask first).
and Magisk (optional if you want root).
For MIUI ROMs: (AOSP above)
First Download the MIUI based ROM you want ( stock, EU, MortalOS, etc), given below are some examples.
Each of these might have instructions, usually saying...
Go to your Recovery, (press and hold Power + Volume Up buttons).
Select the Vendor (if it's needed) (not required if it's currently the proper Vendor, cause EU ROMs to use a custom vendor that works on all devices) (Just make sure it's the right Vendor for your device/region) and flash it.
Then go to WIPE > select Dalvik, Cache, System, Data, Vendor > then wipe them all. (make sure you are on your device's vendor region before wiping it.)
Then go to [Files in OFX] [Install in TWRP] and
Only If you are coming from AOSP and flashing MIUI, go to orangefox settings > manage partitions > data > format > type yes (you lose everything in internal storage) then
Select the ROM (Then > add to queue, else if you only needed ROM, just flash. and set-up! yay!)
DFE (A must if you formatted data via orangefox settings and did that typing 'yes' thing)
Magisk (optional if you want root).
Some Android ROMs
With ROMs being built, changed, and modified on a daily/weekly basis. Some changing to Mi9 fod or LOS fod or using Stock or OSS vendors. Sometimes maintainers shifting or 2 devs building the same rom. The below list is not being maintained anymore. We currently have 50 ROMs. YAY Raphael!
Update: I'm removing most of the ROMs listed here and only adding my personal favorite ROMs
AOSP ROMs
DerpfestOS (two variants, I like em both) - by @Raaj52 -> https://forum.xda-developers.com/k20-pro/development/rom-derpfest-t4132757
SuperiorOS by @HSgod -> https://forum.xda-developers.com/k20-pro/development/rom-superioros-t4130867
MortalOS (miui12) by @Raaj52 -> https://forum.xda-developers.com/k20-pro/development/rom-havoc-os-3-3-t4063081
LineageOS, Pixel Experience, PE+, PE+ Fan Edition, ParanoidOS, MookeOS, TitaniumOS, MSM Xtended, OxygenOS, OmniOS, TreskMod, AOSIP, ColtOS, ArrowOS, BootleggersOS, ExtendedUI (exui), CRdroidOS, RevengeOS, IonOS, AICP, BlissOS, CorvusOS, DerpfestOS, HavocOS, NitrogenOS, HentaiOS, Corvus, TitianiumOS, CygnusOS, CesiumOS, Project 404, DescendantOS, SyberiaOS, EvolutionX, AOSPA, POSP, LegionOS, AncientOS, RebellionOS, SuperiorOS, ShapeshiftOS, WrathOS, ZenX, AIM OS, ConquerOS, PixelDustOS, CygnusOS, StagOS, Ressurection Remix OS, Quartz, PixysOS, PePlusUI, MalluOS, StatixOS, GrapheneOS, ShapeshiftOS, MortalOS, SuperiorOS, AwakenOS, DotOS, Lemon Branch, FluidOS, LiquidOS + more!
MIUI ROMs
EU ROMs, MortalOS, RevolutionOS, Miroom, MMX, Masik + 5 other ROMs
Kernels
Perf (miui kernel), F1xy, Immensity, Englezos, Marisa, R4v3n, Void, NotKernel, Smurf, Candy, Supermad, Antarctica, Evira
MY SUPPORT
I got help from multiple telegram guys for this.
Shoutout to @ishtiak02, @ComicoX, @logosA, Bruce Wayne, SSS, @Noobmaster69 @Lacentix @Raaj52 @nevoness @joshuah1971 and a lot of others teaching me about ROMs and answering my numerous questions.
I am using the Indian variant K20 pro (aka Raphaelin)
You can always ask in the Our Telegram Group, or me, or in the comments. (not allowed to link telegram group I think)
~FINISH
~Do Comment and Thank, it'll bump this guide to be noticed more, so others can find this guide and get help as well
Reverting Back to PIE, moving from Android 10+ to Android 9 -Just don't- (RIN users)
Right, so Anti-Rollback protection is not implemented for k20 pro or mi 9tp. YOU CAN REVERT IF YOU WANT TO.
This is confirmed by users who have reverted, and by Xiaomi.eu website. Which I trust regarding this.
We've done experiments regarding this and have concluded this applies to raphaelin users (Indian variant devices) only. Unsure why, and how it is not affecting the mi9tp variant. (no confirmation with RCN)
However,
When moving from an Android 10 vendor to an Android 9 vendor, your SENSORS will break!
You can fix this simply by flashing your persist img (Hope you took that backup).
You can also fix your sensors by flashing someone else's persist img. BUT YOU WILL LOSE L1 FOREVER.
You can get L1 back by replacing the motherboard which can be done via your warranty at a service center, or by playing a hefty sum of money. nearly half the cost of the phone. NO OTHER WAY. Also, they open your phone, so it isn't SPLASHPROOF as much anymore.
You can also fix sensors by simply updating back to android 10 via the OTA method, which is found in your settings remember. (Unsure if this will retain your L1 though)
BOTTOM LINE, IF YOU ARE ON ANDROID 10, don't go to ANDROID 9 back.
Stuck at Fastboot Fix
Best Recovery
So regarding Recoveries. Choose the one you like the most.
I prefer the latest OrangeFox recovery cause it looks better, has a better UI, better settings, more functionality, and so forth. https://files.orangefox.tech/OrangeFox-Stable/raphael/
You can also choose TWRP if you like. Completely your choice. You can get that from here https://forum.xda-developers.com/k20-pro/development/recovery-unofficial-twrp-xiaomi-redmi-t3944363 and choose the most recent one, and follow the instructions given there.
If you are just comfortable with TWRP. Always use Mauronofrio's, which is recognized as OFFICIAL.
To flash either recovery, just download the zip file, and simply flash it directly in your recovery like you do for a rom (no need to wipe anything) and it will auto-reboot into your desired recovery.
All credits to those who made the recoveries and those people who helped them.
Stuck in Stock Recovery when Rebooting Fix
Full credits to @ SivSomRao (telegram handle, since no XDA)
So, when I screwed my phone trying recoveries, I got stuck in FastBoot. no matter what I did, even Power + Vol Up got me to fastboot, and I had just wiped my OS, so I had nothing to boot into.
This happens when you wipe your SYSTEM and/or VENDOR partitions and choose reboot recovery, or flash an incompatible recovery.
After a lot of stressful minutes, I was scared half out of my mind. A guy named Shivsom helped me.
Basically what he made me do was
Download his file vbmeta_dv_shivsom.img that is given below in attachments.
Then copy the twrp.img file and vbmeta_dv_shivsom.img file to my adb Folder in my WindowsOS C drive.
Now, on your PC. Copy your TWRP.img file, or your OrangeFox.img (I prefer the TWRP.img file by Mauronofrio.)
Open the Command prompt in that folder
You can do this by clicking on the address bar of File Explorer and typing > cmd > then Enter
There type dir *img to confirm the file is found properly.
Now switch off your phone again.
Press and hold the power button + volume down button.
you will soon enter fastboot mode.
Now, on the new command prompt where you typed dir *img
type fastboot devices and you will get an output like
Code:
3e2f2d356 fastboot
Type the instructions
Code:
fastboot flash vbmeta vbmeta_dv_shivsom.img
Then type, (Since my twrp image file was re-named to twrp.img, if you haven't done so, do it)
Code:
fastboot flash recovery twrp.img
Then press and hold Power and Volume Up till you feel the haptic feedback see the TWRP recovery
Now, TWRP usage.
Now press and hold the power key + volume up to enter TWRP.
Once in TWRP, unlock it.
Go to MOUNT and check if MTP is enabled..... click on the "enable MTP" button.
Now copy the ofox.zip (orange fox recovery zip file) to your phone from your PC via your PC.
Now go to INSTALL tap the ofox.zip file, then flash it!
YAY now, orangefox is your Permanent Recovery.
Now go to MENU > Manage Partitions > select only data > format data > type 'yes' (This will delete everything in your Internal Storage so Caution)
Then quickly flash the latest miui vendor,
Now go to MENU > Reboot > Recovery
I was OverJoyed when this worked.
Now you can flash your Favourite ROM (normal clean flash, tutorial is given above), and then boot the ROM.
This was a nasty disaster. Glad I got through it.
Right, so I tried LR-twrp (it's in Chinese, but I can change the language to English). PitchBlack and PitchBlack-old Both broke my phone to get stuck in fastboot mode no matter what I did.
HENCE I conclude that for all Xiaomi devices, OrangeFox [OFX] is the best recovery. TWRP is suited for Samsung.
ERROR 7 fix and how to modify UpdaterScript
WHAT IS ERROR 7? :
Error 7 is an error that says the ROM you are flashing is not meant for your device.
It does so by comparing the phone's codenames.....
k20p and mi9tp have two codenames, one is RAPHAEL and the other is RAPHAELIN (the Indian variant)
Flashing the Raphael/raphaelin ROM on either device won't cause any problems at all.
feel free to flash it.
Latest orangefox 10.8 works with Raphael (global and Chinese variant) and orangefox 10.6 works with Rapahelin (Indian variant).
Alternatively, It could also be caused because you are required to flash the latest vendor, which you may have not.
So please read the one-line error message that appears above the ERROR 7 red message for more details
SOLUTION to ERROR 7:
I'd recommend flashing the orangefox 10.6 recovery as it's a lot simpler.
However if this doesn't work you can try updating script.
Right, so instead of using a different recovery, you choose to update the updater-script.
Copy the zip folder of the ROM to your PC
You can use 7zip software on your Windows PC. Download this software if you don't have it.
Double click the zip (don't extract it!!!) to open the zip.
Navigate to meta_info> com > Google > Android > you'll find update_script
Find the updater-script. Right-click on it, and choose the "EDIT" option. And edit the word Raphael to raphaelin (if you have the Indian variant of the phone)
Save and exit.
Click to expand...
Click to collapse
Creating Backups
Creating backups is always the safest thing to do, and you can do so via your recovery (OrangeFox or TWRP)
First, make sure you have everything working, nothing is broken in the ROM.
Second, go to your recovery and tap on Backup. Then Click on Create Backup, rename the file if you want to.
Third, Select all the partitions, cause why not, and let it finish creating the Backup.
Finally copy the backup file created to your PC in a safe location, and later when and 'if' you mess up, you can copy the backup file back and restore it.
You can restore by first wiping everything and formatting. (For safety) Then using the same recovery you used to create the backup, Flash the backup file. DO NO FLASH SOMEONE ELSE'S BACKUP FILES!!!!!! ONLY YOURS!!!!!!
How to Decrypt Your Phone.
So encryption is the safest thing for devices, It uses a secret code/key that only your phone knows to read data and information. However, when in Recovery, we Custom ROM enthusiasts like to have our data DECRYPTED. Now, This is because we can access our files from the recovery, flash ROMs only when decrypted, and transfer files. (If we have MTP enabled in recovery)
Somehow you've found yourself encrypted, which means all the files in your recovery are showing random letters + alphabets. and you cant transfer files to your phone via recovery anymore!
To solve this, or decrypt yourself. You will have to format your data partition (this will delete everything in your internal storage, so I hope you have a backup of your photos, vids, gifs, contacts, and so forth)
Just a bit of quick advice, If you can boot into your OS, go there, and transfer all your internal storage to your PC or laptop before formatting to avoid losing your stuff.
If you can't boot into your ROM, then you'll have to lose all your data in internal storage. No known method is known YET to help without losing the files.
Now the SOLUTION: Go to Orangefox settings > manage partitions > select data > tap on format > type 'YES' > swipe to confirm > you lose all your internal storage data contents, and you are now successfully decrypted.
OR if you are using TWRP. Go to WIPE > (right side button) FORMAT DATA > type 'YES' > you lose all your internal storage data contents, and you are now successfully decrypted.
You can now transfer files to your phone properly.
To stay decrypted and not get encrypted again, flash the DFE (Disable_Dm-Verity_ForceEncrypt_02.02.2020.zip) from attachments below (or from the file attachment called disable_force_encrypt.zip above in the first post/comment) and then boot into your ROM, or if you are flashing a new custom ROM, follow the tutorial above(first post/comment)
If you want to stay encrypted. (I advise against this) Just don't flash the DFE file.
The newer latest updated dfe file I have attached in this comment is from https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389 and all credits for the file go to him. The dfe file in the first comment/post is different and also works.
How to Recognize Which Device You Have And What Vendor Should You Use?
Global, EEA, China, Indian, Russian variant?
All credits for this list go to @joshuah1971 aka Superuser1958 on telegram.
Box Packaging
k20 pro-China: purple+black box with Chinese writing.
k20 pro-India: angled photo of the phone on top+ white box (NO NFC capability. hardware, not software), identifier: raphaelin.
mi 9t pro-Global: black box+ picture of the device on top, English text on side sticker. (model: M1903F11G)
mi 9t pro-RU: same as global but with Russian text+ orange sticker on the phone.
mi 9t pro-EEA: white box.
Software Differences
miui Global: version number will include "QFKMIXM", google dialer, and messages.
miui EEA: version number will include "QFKEUXM", google dialer, and messages.
miui China: version number will include "QFKCNXM", miui dialer, and messages.
miui India: version number will include "QFKINXM", miui dialer, and messages.
miui Russia: version number will include "QFKRUXM", miui dialer, and messages.
So check which device variant it is, and use the appropriate Vendor when flashing. (Go to ROM's Settings-> About phone-> MIUI Version [code in the brackets])
Vendor Links
So regarding Vendors. Choose the one your device needs.
Namely, The Indian Variant is called Raphaelin. So get your vendor from https://xiaomifirmwareupdater.com/vendor/raphaelin/
The Global, Europe, China, and Russian Vendors are gotten from https://xiaomifirmwareupdater.com/vendor/raphael/
What is OSS Vendor? How to switch to the F2FS file system on OSS ROMs only?
What is OSS Vendor?
So our device has 5 variants.
Xiaomi firmware website has all 5 official (firmware+vendor) zip files.
"Always flash your variants vendor."
"Xiaomi never showed us what's in them. Aka closed source"
But this is so confusing for some people. Idky.
Therefore, some devs decided to make a universal vendor that will work on all variants. Since they are making it. They can optimize it and also always know what's in it.
This universal vendor is called an OSS vendor. (Open Source Software) (It's not yet perfect though)
Some custom ROMs don't include vendor (cause OSS isn't perfect yet)
Some custom ROMs include OSS vendor (so we can observe how good it is in daily use)
It's always good to know if the rom is using OSS or if we have to flash the official.
Currently. Since OSS isn't perfect yet. If the rom doesn't include vendor (or it's a custom miui) do not flash/use OSS with it.
How to switch to F2FS File system?
• Go to the rightmost tab on orange fox recovery > manage partitions > data > change FS > tap on f2fs > change FS
• Now reboot recovery
• Now reboot recovery again
• You are now f2fs.
~FINISH
~Do Comment and Thank, it'll bump this guide to be noticed more, so others can find this guide and get help as well
Info about Persist and why it is IMPORTANT to make a Backup
To make a Backup: Go to orangefox/TWRP recovery and select the Backup option and choose the persist.img option and back that up. Make a copy on your PC for added protection.
Persist.img is "persist" which contains data that shouldn't be changed after the device shipped, for example, calibration data of chips(wifi, bt, camera, etc.), certificates, and other security-related files. Persist is having keys to decrypt several pieces of stuff, it is device-specific and you shouldn't flash persist of others, very very bad idea.
How you are losing L1? By flashing someone else persist.img file, and if you have done that you already lost it. You cannot recover it. You can still restore your own old persist back up, and if you are lucky you will get L1 back. Never play with the persist partition it has important information specific to your device.
In case you've just lost it, and you've realized it immediately (cause sensors, pop-up, L1 are broken), & haven't done anything to modify yet. Then you can try to restore the context. Try doing this in a terminal emulator like termux (case-sensitive) Termux is an app on play store (requires root):
Code:
su
restorecon -F -R /mnt/vendor/persist/
There is also this really nice guide by William Feng that explains the same but a bit better here:
Backup and restore persist on K20 Pro and 9T Pro
Pop-up Camera Stuck Open Fix
Does not work on MIUI based ROMs. The App must be used on AOSP ROMs
Due to some reason you did, your phone's pop-up camera is stuck open. Too scared to push it down, or it isn't going down.
Download the apk k20pro_motor.apk from attachments below > Install it > when you open it, the dialog box will inform you to set the current state of the camera. Then click on the button to get the pop-up camera down.
Enjoy. Complete Credits to @acervenky from https://forum.xda-developers.com/k20-pro/themes/app-xiaomi-motor-control-k20-pro-t3984181
Xiaomi.eu and other Custom MIUI ROMs
Right, so Xiaomi.eu is a forum like XDA where devs make miui like ROMs without the Mi ads and tracking and are more optimized.
The website is: https://xiaomi.eu/community/threads/miui-11-0-stable-release.52628/
Under there, you go to MIUI 11 ROMs > stable ROMs > download the proper ROM zip file.
The direct download link is https://sourceforge.net/projects/xi...files/xiaomi.eu/MIUI-STABLE-RELEASES/MIUIv11/ or you can use: https://androidfilehost.com/?w=files&flid=300229
Now download xiaomi.eu_multi_HMK20ProMI9TPro_V11.0.5.0.QFKCNXM_v11-10.zip CAUTION, the word PRO has to be there. we have k20p not k20.
This works for only Raphael users, not Indian raphaelin users. (For raphaelin users use Orangefox 10.6 it will work then.)
The difference between Stable and beta is that in beta, newer features, security is implemented and tested, this has bugs, once those features are stable, it becomes a STABLE rom, then the next batch of features are added to the beta. Get STABLE though, it's better, the beta has weekly 2GB updates.
Now flashing is easy, Follow the rules in the first post/comment on how to flash a miui ROM.
Equally, you may also choose to use MortalOS which is a debloated MIUI ROM which can be found here -> https://forum.xda-developers.com/k20-pro/development/memeui-12-rc5-09-05-2020-t4097469
Issues Related to L1, restoring, and china-based miui roms
Thanks to @Raaj52 for conducting experiments to confirm and collect this information.
You must have a global/Indian variant phone which currently has widevine working properly to have a chance at restoring it later. China phones can't get L1 (or at least, I haven't learned a way to do so yet.)
What is Widevine L1 and L3?:
Right, so L1 or widevine L1 is a DRM security made by google after they noticed people use root, etc to steal copyrighted videos and movies in full HD and post them somewhere else for free. (Netflix and Amazon prime video app being affected.)
Losing this, means you get L3, and widevine L3 does not allow you to stream Full HD videos anymore, but you can stream SD low-quality videos. Which is never ideal.[
Now, EU latest stable, MortalOS uses modified china vendor with k20p L1 patch
So how do I save my L1 then? L1 Retention?:
Fortunately @Raaj52 found out that if you take a full Ofox or TWRP backup or everything from EU rom, (making a save on the PC, just in case) before moving to those aforementioned China-based ROMs is good.
When you try flashing miui EU latest stable after losing it by flashing a MIUI custom ROM based on China vendors, your phone gets L1, it shows you have L1 too, however, the apps on your phone DO NOT recognize it, technically the phone recognizes the widevine L1 as broken, and somehow considers it L3.
Here is where the Backup you made comes in handy, Clean flashing the backup completely and perfectly restores your L1. He also states that moving from China-based ROMs to AOSP ROMs like EvoX via clean flash (wiping vendor as well and flashing the proper vendor before flashing the AOSP ROM in the recovery) will also restore L1 (remember to format data partition when moving from miui to AOSP)
Now, It should be noted that cross-flashing vendors is very DANGEROUS, as this may break your Fingerprint Sensor, DTBO and proximity sensors. Therefore you must always flash the proper vendor for your phone (global, Indian, china) don't try flashing a vendor that isn't for your device. Unless if it's a custom MIUI rom as custom MIUI Roms come included with a Vendor. (wipe vendor before flashing custom miui ROM, after flash, don't touch the vendor)
Global vendor and Indian vendor are partially similar, and we have reason to believe that EU stable uses a modified vendor that works for both Raphael and Rapahelin. This is why EU ROMs works on both devices (MI 9t-pro and K20-pro)
Some Things to be Cautious about and to note:
Quoting our messages on telegram here:
The basic is, EU rom comes with vendor file so no need to flash a separate vendor for them. Flashing any vendor over the EU might break something because we don't know really which vendor they are using, assuming stables are global and betas are china.
On the other hand, AOSP comes without any vendor file, so it becomes mandatory to flash a vendor based on your device default vendor.
We flash vendors only when we flash AOSP's. In miui custom ROMs vendor is included.
Exception: If something is broken, clean wipe, flash your vendor, and then (advance wipe everything, including vendor) clean flash miui custom/AOSP.
Practically speaking, if you are moving from your stable own rom to Evox or any AOSP, no need to flash vendor since it is already having the default files but this is double confirm that the vendor is correct and it will not harm anyone. (AOSP to AOSP, not required to wipe vendor, but you can if you want to, I recommend wiping it and flashing your vendor again)
These are separate partitions and it will not override but to be on the safer side most rom devs prefer vendor and then rom.
If you flash an AOSP rom and want to move to a custom/stock miui rom make sure that you are own correct vendor. (Prior to wiping it in advance wipe) If not sure flash your vendor once again, then clean wipe and flash miui based rom.
Click to expand...
Click to collapse
How Get Back To My Stock ROM and/or Lock Bootloader?
To get back to your stock ROM, you have two methods, namely recovery zip ROM flash or fastboot ROM flash.
Get your stock rom from https://xiaomifirmwareupdater.com/archive/miui/raphael/
or if you need the Indian variant, Get your stock rom from https://xiaomifirmwareupdater.com/archive/miui/raphaelin/
Now, AND THIS IS SUPER IMPORTANT. Make sure you double-check and download the proper device's Region, codename, android version, and THE TYPE!!! (there are two types: recovery and fastboot types, choose the one you need)
Now for the recovery method, flash the recovery type .zip file the same way you flash any miui custom ROM. Check guide in first post/comment for method.
Now for the fastboot method, go to your mi-flash tool and enter fastboot on your device, and flash the rom there. (Now, I personally never did this method, so I can't guide the exact steps for this method, sorry)
LOCKING BOOTLOADER: You must first be using the proper stock vendor, stock rom via fastboot, and not have magisk or any MODs running on your phone. If you violate these, you WILL Hard brick your device. It is because of this I VERY STRONGLY advise against locking your bootloader for any reason whatsoever. JUST DON'T!!!
However, you can you the mi-flash tool (safest) or the debloater tool to lock your bootloader if you definitely must do it.
• Download MiFlash tool from MiFlashTool Website . The latest is the top left, marked with a NEW tag.
extract the file, and run the program "XiaoMiFlash.exe"
• Download the stock fastboot miui rom from Fastboot Website and extract the file (if its a .tgz or .tar extract again) you'll end up with a folder with one folder and 11 files (images, flash_all.bat.......misc.txt)
• Now in whatever rom you are on, go to developer settings, enable "OEM Unlocking" and "USB Debugging"
• Now boot into fastboot mode
• Connect your device to your PC
• Now in MiFlash tool, at the bottom, choose Clean all (and dont LOCK IT, I repeat do not choose to lock)
• Then on the top click on the "select" button and navigate to the folder with the 11 files & 1 folder and choose that folder.
• Click on the "Refresh" button and check if your device is shown (indicated by random numbers/letters)
• Now (recheck if its only CLEAN ALL only, and NOT lock or anything else)
• Now flash
• Wait 420s approx, or more, or less.
• It'll finish with an error and the message will say
• "error: Not catch checkpoint (\$fastboot -s . ' lock),flash is not done"
• This is cause it did not lock your bootloader. THIS IS GOOD.
• Now wait 5-10mins while miui 12.5 loads up/boots, it takes a while.
• Now, close MiFlash program, its done, no more needed.
• Now that's done, use miui 12.5 if you want, or go to recovery
• You'll see you have stock recovery now
• So go to fastboot mode, (phone connected to PC)
and flash the ofox recovery.img to get ofox recovery. via the cmd command like usual.
• Then go to recovery ofox.
• Go to wipe > format > type yes > format data to decrypt
• Reboot to recovery
• Now copy your ofox zip file to phone,
• Now flash that file to make OFOX permanent
• Now reboot to recovery again.
Click to expand...
Click to collapse
Latest MIUI-CN builds and miui custom ROMs soft bricking your device? (Mostly Raphaelin users)
Right, so this is a Xiaomi thing, which happens to many Xiaomi-based devices. It was later observed by a member on telegram that this usually happens to devices without NFC. In our case of Raphael - This would be Indian devices or Raphaelin devices.
I personally haven't experienced this, so I can't give a personal experienced-based guide on fixing this. However, another user on telegram @rockyanexpert solved his problem and shared this guide given below with me.
[
System has been destroyed. What I did:
1. Panicked a little
2. Started my lappy
3. MiUnlock Tool was pre-installed v3.xx
4. It took almost 10 minutes to show the login prompt. The connected device in fastboot. It failed to recognize the device. Started MiFlash. It did recognize the device.
5. Downloaded the latest MiUnlock. It too failed to recognize the device.
6. Downloaded XiaoMiTool v2
7. It detected the device fastboot serial correctly
8. Manually selected model Raphael.
9. Started with My device is bricked
10. It detected a locked bootloader. Opened its own version of Unlock Tool. Logged in to binded Mi Account. (My Mi Account n the binded one is the same)
11. Unlocked.
12. Tool went on ahead with waiting for the device to boot in fastboot mode.
13. I removed the device n forced boot in recovery mode. Ofox showed "Updating" n booted in orange ofox screen.
14. Rebooted system
15. Newly flashed Eu 21.2.3 started initial setup.
No data lost.
Click to expand...
Click to collapse
By these same people, they made a guide here: System destroyed issues
~FINISH
~Do Comment and Thank, it'll bump this guide to be noticed more, so others can find this guide and get help as well
nice work @Sandeeep Kiran, keep it up.
Just got my 12/512 yesterday but my wait time is 15days (it said 360hours).:fingers-crossed:
Hi, probably today i wil try to flash xiaomi.eu rom but i have some doubt, why you are saying that wipe system is required for flash a custom rom? i have read in several thread that this wipe is not rquired
salva93 said:
Hi, probably today i wil try to flash xiaomi.eu rom but i have some doubt, why you are saying that wipe system is required for flash a custom rom? i have read in several thread that this wipe is not rquired
Click to expand...
Click to collapse
Right, so I actually had the same doubt for a while. Noone in the group seemed to properly answer this.
Some said you should, some said you shouldn't.
So I talked to the devs of note 2 (my old phone, most members now have xiaomi phones)
They all said system is required to be wiped.
However before they answered. I can already listened to our group members and figured, I will not wipe system and flash my ROM as it is.
When I did this. I noticed the recovery throwing an error from magisk. That magisk modules aren't linked to anything, and this will/may cause problems.
After reading that message I realised. System wipes everything. And if you are dirty flashing/ clean flash with no mods. System is not required to be wiped.
However most people use magisk modules. Root changes, 75hz mods and so forth. This is when system is required to be wiped.
Now. As a general rule. It is good to wipe system. No harm is being done in wiping it. Hence I reccomend it.
Although, if anyone does have a particular reason that system shouldn't be wiped. I'd love to hear the explanation of it. But this is what I know of after research. I'm still no expert in everything.
Sandeeep Kiran said:
Right, so I actually had the same doubt for a while. Noone in the group seemed to properly answer this.
Some said you should, some said you shouldn't.
So I talked to the devs of note 2 (my old phone, most members now have xiaomi phones)
They all said system is required to be wiped.
However before they answered. I can already listened to our group members and figured, I will not wipe system and flash my ROM as it is.
When I did this. I noticed the recovery throwing an error from magisk. That magisk modules aren't linked to anything, and this will/may cause problems.
After reading that message I realised. System wipes everything. And if you are dirty flashing/ clean flash with no mods. System is not required to be wiped.
However most people use magisk modules. Root changes, 75hz mods and so forth. This is when system is required to be wiped.
Now. As a general rule. It is good to wipe system. No harm is being done in wiping it. Hence I reccomend it.
Although, if anyone does have a particular reason that system shouldn't be wiped. I'd love to hear the explanation of it. But this is what I know of after research. I'm still no expert in everything.
Click to expand...
Click to collapse
Many thanks for your answer, so for now i will not risk and i will follow instructions on xioami.eu website, i'm in clean situation so i should not have any issue
bump
Good guide. Have a bump.
But till this day (Jan 6, 2020), no custom roms are stable or bugfree enough for the exception of xiaomi.eu
Default MIUIrom just works. But I hope in the near future we get to see bugfree roms and I will certainly try it! I have always used PE on my previous phones.
Cheers!!!!
bumpity bump
Nice infomation dude
whatsapp dark
root user used
Swift Installer - Themes & color engine
just share my opinion
Good guide, thx.
Guys, one question, i have to mount System/Vendor and other to wipe, or can i simple wipe without mount?
bigatim said:
Good guide, thx.
Guys, one question, i have to mount System/Vendor and other to wipe, or can i simple wipe without mount?
Click to expand...
Click to collapse
Nah, Mount is to send/transfer files.
Since you arent doing that, you dont have to mount system or vendor, but mount your internal storage though.
and for the L1 flash, mount vendor for that only, soon a magisk mod will be available for it.
So when do we need to flash disable force encryption?
If I am correct, you can simply format data and get rid of your encryption. In this case you do not need to flash disable force encryption. Also, can't you just decrypt before starting the flashing process?
I've tried RevOS and I came back to mmx.
And widevine L1 is not break. Everything gone fine.
Krullendhaar said:
So when do we need to flash disable force encryption?
If I am correct, you can simply format data and get rid of your encryption. In this case, you do not need to flash disable force encryption. Also, can't you just decrypt before starting the flashing process?
Click to expand...
Click to collapse
DFE is to remove encryption.
when you format data partition, you remove the dfe. You do this when moving from AOSP to miui or vice versa.
you can't decrypt before flashing cause there isn't a system or any data to decrypt. After you add a ROM or data, you can decrypt that.
yes, the format will get rid of your encryption. (but you also lose all your data) so flashing dfe helps retain your data. If you're scared someone will go to your recovery and steal data, add an orangefox password in its settings. Alternatively, you also have the dm-verity settings in orangefox settings you can enable. But redundant as its all included together in the dfe file I've attached.
Sandeeep Kiran said:
L3 Fix, Getting L1 after getting L3 for Global and Indian Users.
@Raaj52 Found a solution to fix L3 and get L1 again.
This fix however only works on Global and Indian vendors. (i.e mi 9t pro and k20p Indian variant)
No such solution has been found for china phones, using china vendor, DO NOT CROSS FLASH VENDORS!! it will cause a bootloop.
This patch was made for the latest EU beta, miroom. We hope it also works for future versions, and previous versions, but we are unsure. You can experiment and inform us though in the comments below.
Always have a proper fully working backup of everything rom. As caution. It's always good to take precautions.
Pop-up Camera Stuck Open Fix
Does not work on MIUI based ROMs. The App must be used on AOSP ROMs
Due to some reason you did, your phone's pop-up camera is stuck open. Too scared to push it down, or it isn't going down.
Download the apk k20pro_motor.apk from attachments below > Install it > when you open it, the dialog box will inform you to set the current state of the camera. Then click on the button to get the pop-up camera down.
Enjoy. Complete Credits to @acervenky from https://forum.xda-developers.com/k20-pro/themes/app-xiaomi-motor-control-k20-pro-t3984181
~FINISH
~Do Comment and Thank, it'll bump this guide to be noticed more, so others can find this guide and get help as well
Click to expand...
Click to collapse
hi, I followed the instructions. Netflix black screen problem still continues.What should I do ?
masik x 9.4 - black screen problem - security patch January
mi room 20.1.16 it works fine - security patch is still 2019.12.01
please masik x 9.4 fixed black screen problem.
thank you.
uurturk said:
hi, I followed the instructions. Netflix black screen problem still continues.What should I do ?
masik x 9.4 - black screen problem - security patch January
mi room 20.1.16 it works fine - security patch is still 2019.12.01
please masik x 9.4 fixed black screen problem.
thank you.
Click to expand...
Click to collapse
The patch was intended to work on security patch Jan 20th and above, which maisk is not yet updated too.
(however, @ QasimXAli in the official telegram group did manage to make it work. you can tag and ask him there.)
Currently, the person who made the mod is still working to converting it to a perfect magisk module so it's easier to flash. Also, he is waiting for the next stable update to check whether the magisk module patch will continue to work.
We just gotta wait a bit longer.
ghaf85 said:
Nice infomation dude
whatsapp dark
root user used
Swift Installer - Themes & color engine
just share my opinion
Click to expand...
Click to collapse
Thanks.
Under add-ons, I added how to get WhatsApp dark (currently in WhatsApp official beta, which will roll out to stable in three months.)
For root, everyone just uses magisk latest stable.
and Solid Explorer or Mi-explorer
I like swift, liv and flux too. but those are straight-forward. I can add them to "add-ons" if you like.

Categories

Resources