Can't install MIUI custom ROM on Mi A2 Lite - Xiaomi Mi A2 Lite Questions & Answers

I'm trying to instal MIUI 11 from this link: https://forum.xda-developers.com/mi-a2-lite/development/rom-daisy-miui-11-hybridos-stable-t4003651
However after flashing the ROM the recovery says there's no OS at all. If I reboot it bootloops.
The only way I can go back to recovery is by using adb commands and flashing a IMG. Then TWRP says it can't open destination log file.
What can I do? Thanks!

I'm not sure what you've done with your device and I'm not sure if you know how to read (because there are a LOT of guides throughout the forum), but here we go :
1 - Flash stock ROM (check the forum again on how to do it or Google it.). Do this before you're trying to flash any ROM, really.
2 - Unlock the bootloader and boot TWRP from your PC.
3 - On TWRP go to Wipe and choose Wipe Data, type 'yes' and confirm it to wipe data.
4 - Now you're gonna need to boot into TWRP again, because TWRP sometimes breaks after wiping data, simply go to Reboot section and choose 'Bootloader' in TWRP. This will get you to Fastboot mode, you will need to boot TWRP from your PC again.
5 - Once you get into TWRP, flash the ROM, flash the TWRP.zip if you want.
6 - Go into Reboot section in TWRP and check your boot slot and change it. (If A make it B, if B make it A) and reboot into system.
7 - If you want to install Magisk or any other mod through TWRP, :
7a - if you've installed TWRP.zip previously, reboot into recovery and install your mods/Magisk and then boot into system
7b - if you didn't install TWRP.zip, reboot to Bootloader/Fastboot and boot TWRP, then flash your mods/Magisk. Finaly boot into system.

marstonpear said:
I'm not sure what you've done with your device and I'm not sure if you know how to read (because there are a LOT of guides throughout the forum), but here we go :
1 - Flash stock ROM (check the forum again on how to do it or Google it.). Do this before you're trying to flash any ROM, really.
2 - Unlock the bootloader and boot TWRP from your PC.
3 - On TWRP go to Wipe and choose Wipe Data, type 'yes' and confirm it to wipe data.
4 - Now you're gonna need to boot into TWRP again, because TWRP sometimes breaks after wiping data, simply go to Reboot section and choose 'Bootloader' in TWRP. This will get you to Fastboot mode, you will need to boot TWRP from your PC again.
5 - Once you get into TWRP, flash the ROM, flash the TWRP.zip if you want.
6 - Go into Reboot section in TWRP and check your boot slot and change it. (If A make it B, if B make it A) and reboot into system.
7 - If you want to install Magisk or any other mod through TWRP, :
7a - if you've installed TWRP.zip previously, reboot into recovery and install your mods/Magisk and then boot into system
7b - if you didn't install TWRP.zip, reboot to Bootloader/Fastboot and boot TWRP, then flash your mods/Magisk. Finaly boot into system.
Click to expand...
Click to collapse
Step 1 is wrong, miui ports have base stock in built, no need to make a clean flash
Step 5 is wrong, miui ports have twrp in built, you don't need flash twrp zip
Step 6 is wrong, miui ports need to be installed in the current active slot, no needed change slot
If your device have unlock bootloader and enable usb debugging, only boot twrp.img, only boot no flash, like the OP did it (fastboot boot twrpname.img)
Wipe> format data> yes
Install> install miui.zip
Install> install magisk (optional)
Reboot>system

Related

Community Build without encryption

Is it possible to have Oxygen 3.5.3 without files getting encrypted? Cuz every time i try to install offical builds my phone is encrypting at the first boot.
1. Backup your data
2. Wipe userdata in fastboot
3. Install Community Build --DON'T REBOOT
4. Turn off your phone
5. Boot into fastboot
6. Unlock your bootloader if you haven't already.
7. Flash this TWRP http://forum.xda-developers.com/showpost.php?p=68691560&postcount=56
8. Flash Magisk http://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
9. Optional: Install phh's superuser (http://forum.xda-developers.com/apps/magisk/magisk-phh-s-superuser-android-pay-t3435921) or other Magisk mods from the Magisk manager

Instructions for keeping twrp and root after updating the UL USER rom:

1. Download resources:
a. Download the rom UL USER, leave it there and do nothing to it yet.
b. Download the twrp.zip file https://mega.nz/#!l8BXgaDL!Y1AH5TM9jKI5r6LtEKFN_4Po105glHNR602yVDipfF8 (if you still have twrp installed beforehand)
c. Magisk 20.0 https://github.com/topjohnwu/Magisk/releases/download/v20.0/Magisk-v20.0.zip
2. Proceed:
Do not update the UL USER rom from the device's interface (SYSTEM UI), power off, boot into TWRP. Select install zip in the following order:
a. Rom UL USER
b. Twrp.zip
c. Magisk v20.0 (or exit the main menu, select Advanced, install root also)
Done, exit the main menu select advanced wipe, wipe cache, dalvik.
Reboot the device.
Done.
By chicken
This did not completely work for me going from .35 to .64. All the steps completed successfully but when I rebooted the phone, Magisk was not installed so I didn't have root. I was able to then boot to TWRP and successfully install Magisk, but I don't know why it didn't work the first time. Anyone else try this? Did it work as intended for you?
One other thing I noticed - TWRP no longer has an option to wipe the cache under wipe > advanced, only for Dalvik/ART cache. Why?
Wish I would have tried this before i updated and lost root, i flashed a root boot.img with fastboot now im bricked and don't know what to do.
EDIT: got twrp did a factory reset and im in now.
dungnghien said:
1. Download resources:
a. Download the rom UL USER, leave it there and do nothing to it yet.
b. Download the twrp.zip file https://mega.nz/#!l8BXgaDL!Y1AH5TM9jKI5r6LtEKFN_4Po105glHNR602yVDipfF8 (if you still have twrp installed beforehand)
c. Magisk 20.0 https://github.com/topjohnwu/Magisk/releases/download/v20.0/Magisk-v20.0.zip
2. Proceed:
Do not update the UL USER rom from the device's interface (SYSTEM UI), power off, boot into TWRP. Select install zip in the following order:
a. Rom UL USER
b. Twrp.zip
c. Magisk v20.0 (or exit the main menu, select Advanced, install root also)
Done, exit the main menu select advanced wipe, wipe cache, dalvik.
Reboot the device.
Done.
By chicken
Click to expand...
Click to collapse
In my experience after install back twrp reboot back to recovery (twrp) before flashing magisk .
Does this work when updating to A10?

TWRP Permanent Installation and ROM guide From Stock

Unlock bootloader, should be easy
fastboot boot twrp.img
(If you just want TWRP flash TWRP-installer, might need to erase Data and/or Internal Storage)
Change to Slot B
Wipe System, Dalvik, (Don't know if it needs to be on every ROM change) Data and Internal Storage
Change to Slot A
Flash copy-partitions-AB.zip (Seems like it's needed every re-flash, or at least every ROM change)
Flash ROM, TWRP-installer
Change to Slot B
Go to bootloader
fastboot erase userdata
Go to recovery
Change to Slot A and boot
Flash Magisk and Gapps
Boot phone
Yes you'll need to flash TWRP installer alongside other ZIPs when changing ROMs, as each come with its own recovery for some reason.
If your OEM unlocking option is greyed out just wait a few days and it'll be available. Disregard, I haven't been successful in installing a ROM after that first time, go to CrDroid's for the best shot at it. If mods can delete this post please do.

Are these steps correct to flash custom rom in 2020?

-use miunlock to unlock bootloader
-put phone on fastboot mode
-type 'fastboot flash antirbpass dummy.img'
-type 'fastboot flash recovery twrp-3.3.1-0-whyred.img'
-type 'fastboot reboot'
-reboot to recovery using phone
-copy gapps & custom rom to phone
-wipe system, data, dalvik, cache
-flash rom
-flash gapps
-reboot
I am currently on MIUI Global 9.5.19.0 with locked bootloader.
Is this method correct? I dont know which guide is outdated right now and which is not. Sorry if this is asked too many times.
Yes this is correct but i want to make some changes in your guide
1. Use orange fox recovery as it is better than twrp and it won't give u any error which u may encounter using twrp.
2. U can use fastboot boot *recovery* to push recovery file and flash its zip after entering recovery (it doesn't need any kind of dummy file flash)
3. Wiping vendor is also there
Thank you
oh ok so basically these are the edited steps to follow now:
-use miunlock to unlock bootloader
-put phone on fastboot mode
-boot twrp using 'fastboot boot XYZ.img'
-flash orange fox zip from twrp
-reboot to orange fox recovery from twrp
-wipe system, data, dalvik, cache, vendor
-flash latest firmware
-flash custom rom
-flash gapps
-flash magisk
-reboot
correct?
thanks a lot btw!
? correct and u can use 9.4.25 firmware as it is best (atleast for me)
Should I follow the same procedure if my phone is on 11.0.3.0?
scarednewbie said:
Should I follow the same procedure if my phone is on 11.0.3.0?
Click to expand...
Click to collapse
Now most of the customs support the new pie firmware.
1. Unlock bootloader.
2. Reboot to bootloader
3. Boot to orangefox recovery using
fastboot boot recoveryname.img
4. Copy the orangefoxrecovery.img(extract the orangefox zip) to device storage using the booted orangefox in step 3.
5. Flash orangefox permanently from the copied img file using the booted recovery.
4. If you are planning to use miui don't reboot without flashing magisk. It may reset the recovery to default miui recovery.
6. Enjoy flashing custom roms after wiping(not formating) system, data, cache, vendor etc. No need to format data if you need file ssystem encryption. Formating data from recovery will remove encryption.
niyas90 said:
Now most of the customs support the new pie firmware.
1. Unlock bootloader.
2. Reboot to bootloader
3. Boot to orangefox recovery using
fastboot boot recoveryname.img
4. Copy the orangefoxrecovery.img(extract the orangefox zip) to device storage using the booted orangefox in step 3.
5. Flash orangefox permanently from the copied img file using the booted recovery.
4. If you are planning to use miui don't reboot without flashing magisk. It may reset the recovery to default miui recovery.
6. Enjoy flashing custom roms after wiping(not formating) system, data, cache, vendor etc. No need to format data if you need file ssystem encryption. Formating data from recovery will remove encryption.
Click to expand...
Click to collapse
Orange fox recovery has aggressive stock recovery deactivation so magisk is not necessary

Question [HELP] What did I wrong? Flashing TWRP + ROM + GApps + Magisk

I would be very thankfull, if you could help me with my problem.
After unlocking my bootloader successfully, I re-enabled USB Debugging in MIUI and booted into fastboot mode.
From there I booted the latest "twrp-3.7.0_12-0-munch.img"
1. Which is the correct way to install TWRP permanently (or after an TWRP update)?
https://twrp.me/xiaomi/xiaomipocof4.html
"Flash Current TWRP" or "Install Recovery Ramdisk"?
[Edit] Flash Current TWRP
To remove encryption it is necesarry to "Format Data" before? or after? ROM flash. When I do that, all TWRP settings are gone (language, vibration off, 24h clock). Are these settings not stored permanent?
[Edit] after flashing rom.zip
2. When I want to flash ROM + GApps, do I need to reboot the recovery for switching partitions?
I flashed "Spark-13.1-Official-munch-20221025.zip" and "NikGapps-core-arm64-13-20220908-signed.zip". I can boot SparkOS, but there are no Gapps installed. The flashing process was skipped.
Thank's for your help!
11insomnium said:
I would be very thankfull, if you could help me with my problem.
After unlocking my bootloader successfully, I re-enabled USB Debugging in MIUI and booted into fastboot mode.
From there I booted the latest "twrp-3.7.0_12-0-munch.img"
1. Which is the correct way to install TWRP permanently (or after an TWRP update)?
POCO F4 / Redmi k40s
Disclaimer:Team Win strives to provide a quality product. However, it is your decision to install our software on your device. Team Win takes no ...
twrp.me
"Flash Current TWRP" or "Install Recovery Ramdisk"?
To remove encryption it is necesarry to "Format Data" before? or after? ROM flash. When I do that, all TWRP settings are gone (language, vibration off, 24h clock). Are these settings not stored permanent?
2. When I want to flash ROM + GApps, do I need to reboot the recovery for switching partitions?
I flashed "Spark-13.1-Official-munch-20221025.zip" and "NikGapps-core-arm64-13-20220908-signed.zip". I can boot SparkOS, but there are no Gapps installed. The flashing process was skipped - you can see that in the photos added.
3. In TWRP "Backup" there is no system partition (>photo). I'm not sure, if I accidentally wiped it. And in "Mount" the system isn't checked. Is that normal?
I can boot to fastboot, recovery and system. Please tell me right steps to flash/wipe/format without errors.
I added some TWRP logs.
Thank's for your help!
Click to expand...
Click to collapse
1. after fastbooting TWRP use Flash Current TWRP. No format data.
2. SparkOS needs global firmware to be flashed first, then reboot to recovery, then flash ROM, then format data.
There is a version with Gapps already included, working fine.
@UniNick
1. Flash Current TWRP is the prefered Installation Method from official site. Do I need to reflash TWRP after each ROM flash to survive? When formating data after ROM flash, the TWRP setting are also deleted (no more TWRP folder in internal storage).
2. My Poco F4 was shipped with MIUI Global 13.0.3.0 (SLMEUXM). So I downloaded and flashed Europe V13.0.7.0.SLMEUXM from https://xiaomifirmwareupdater.com/firmware/munch/
Baseband version is now higher.
I know there is a Gapps Version of SparkOS, but I don't know which Google apps are included and I just need a minimum of the package. Therefore I asked how to flash Gapps after ROM.zip, that both are on the same A/B partition.
I already had to reset/flash the "V13.0.5.0.SLMMIXM_20220815.0000.00_12.0_global" with MI Flash tool, because I had no access to Internal Storage with my PC to copy files on Poco F4.
11insomnium said:
@UniNick
1. Flash Current TWRP is the prefered Installation Method from official site. Do I need to reflash TWRP after each ROM flash to survive? When formating data after ROM flash, the TWRP setting are also deleted (no more TWRP folder in internal storage).
2. My Poco F4 was shipped with MIUI Global 13.0.3.0 (SLMEUXM). So I downloaded and flashed Europe V13.0.7.0.SLMEUXM from https://xiaomifirmwareupdater.com/firmware/munch/
Baseband version is now higher.
I know there is a Gapps Version of SparkOS, but I don't know which Google apps are included and I just need a minimum of the package. Therefore I asked how to flash Gapps after ROM.zip, that both are on the same A/B partition.
I already had to reset/flash the "V13.0.5.0.SLMMIXM_20220815.0000.00_12.0_global" with MI Flash tool, because I had no access to Internal Storage with my PC to copy files on Poco F4.
Click to expand...
Click to collapse
1. yes because most ROMs now bring their own recovery
2. Spark includes like a basic Gapps package
UniNick said:
1. yes because most ROMs now bring their own recovery
2. Spark includes like a basic Gapps package
Click to expand...
Click to collapse
I will try it again tomorrow. Thanks!
After a lot of research I still have some questions. Many users have trouble understanding it when the installation instructions do not list all the steps.
I have read these flashing instruction on the XDA NikGApps page:
Flashing Instructions for A/B devices (Clean Flash is recommended)
Flash Rom in Slot A, Flash twrp, reboot to recovery
Flash Rom in Slot B, Flash twrp, reboot to recovery
Flash NikGapps
Flash Debloater (Optional)
Reboot
So I thought, that this would be the steps:
### First Install / Clean Flash ###
- fastboot boot TWRP image
- in TWRP select "Flash Current TWRP" under "Advanced"
- flash firmware
- reboot recovery (is this reboot necessary before flashing ROM ??)
- wipe > factory reset (recommended or not ??)
- flash ROM (current Slot A > flashing to inactive slot B)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
- go to "Reboot" and change slot
- flash ROM (current Slot B > flashing to inactive slot A)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
???
(optional for GApps)
- flash GApps
Error: Could not mount /system
- format data
- flash twrp.img (again necessary ??) + (check the box "Flash to both slots" ??)
- boot to system + install Magisk.apk
- in Magisk: patch boot.img
- reboot recovery
- flash magisk_patched.img in boot partition + (check the box "Flash to both slots" ??)
- reboot to system
11insomnium said:
After a lot of research I still have some questions. Many users have trouble understanding it when the installation instructions do not list all the steps.
I have read these flashing instruction on the XDA NikGApps page:
Flashing Instructions for A/B devices (Clean Flash is recommended)
Flash Rom in Slot A, Flash twrp, reboot to recovery
Flash Rom in Slot B, Flash twrp, reboot to recovery
Flash NikGapps
Flash Debloater (Optional)
Reboot
So I thought, that this would be the steps:
### First Install / Clean Flash ###
- fastboot boot TWRP image
- in TWRP select "Flash Current TWRP" under "Advanced"
- flash firmware
- reboot recovery (is this reboot necessary before flashing ROM ??)
- wipe > factory reset (recommended or not ??)
- flash ROM (current Slot A > flashing to inactive slot B)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
- go to "Reboot" and change slot
- flash ROM (current Slot B > flashing to inactive slot A)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
???
(optional for GApps)
- flash GApps
Error: Could not mount /system
- format data
- flash twrp.img (again necessary ??) + (check the box "Flash to both slots" ??)
- boot to system + install Magisk.apk
- in Magisk: patch boot.img
- reboot recovery
- flash magisk_patched.img in boot partition + (check the box "Flash to both slots" ??)
- reboot to system
Click to expand...
Click to collapse
Little bit complex.
Try this guide:
Reboot to recovery (twrp or ofox), I prefer boot recovery by fastboot, command is `fastboot boot rec.img` (You can download from orangefox official website)
Flash firmware (Optional)
Flash rom
Flash gapps (if flashed vanilla build)
Format data
Reboot to system
psklf said:
Little bit complex.
Try this guide:
Reboot to recovery (twrp or ofox), I prefer boot recovery by fastboot, command is `fastboot boot rec.img` (You can download from orangefox official website)
Flash firmware (Optional)
Flash rom
Flash gapps (if flashed vanilla build)
Format data
Reboot to system
Click to expand...
Click to collapse
I'm not sure if GApps will be installed in the same slot if I flash it directly after the ROM.zip.
I have to reflash TWRP/OrangeFox before formating data and booting to system or it will be lost when I boot back to recovery.
When updating the ROM, the recovery is flashing it to inactive slot. Do I need to click through the (google) setup again, or is this data stored in another partition? When do I need to reflash GApps?
flash ROM.zip
wipe cache + dalvik
reflash recovery
reflash magisk_patched
reboot system
11insomnium said:
I'm not sure if GApps will be installed in the same slot if I flash it directly after the ROM.zip.
I have to reflash TWRP/OrangeFox before formating data and booting to system or it will be lost when I boot back to recovery.
When updating the ROM, the recovery is flashing to inactive slot. Do I need to do the (google) setup again, or is this data stored in another partition? When do I need to reflash GApps?
flash ROM.zip
wipe cache + dalvik
reflash recovery
reflash magisk_patched
reboot system
Click to expand...
Click to collapse
About GApps maybe this is the right way ...
flash ROM
flash recovery itself( w/ orangefox there is a checkbox)
reboot to recovery
flash gapps
Please bear with me, as this is my first A/B device and I'm quite confused about the flashing procedure.
I successfully unlocked bootloader and flashed TWRP.
I tried to install A13 SparkOS vanilla + Basic NikGapps. Like @11insomnium said in the 1st post, ROM was installed fine, but Gapps package was not. I tried what @psklf says, no good... Each time I try to flash the Gapps package I get a message that /system size is 0KB, and of course the setup process is skipped due to lack of space...
On a side note, when flashing the ROM, step 1/2 completes fine, but on step 2/2 I get some errors about failing to access /system, /system_product, /vendor etc... However, as I said, ROM boots fine afterwards...
Am I missing something? Or is flashing the integrated Gapps ROM version the way to go?
@11insomnium did you manage to sort this out?
@hammerheadache I'm still using the GApps version 20221113, but recently I updated my device to latest OFox recovery (R11.1_2_A12) and A13 firmware (V14.0.2.0.TLMEUXM). The result was that my fingerprints were deleted and I could't save new ones, so I reflashed the old version (V13.0.7.0.SLMEUXM).
I think you missed the reboot to recovery. This should work for you:
- flash ROM
- flash recovery
- reboot to recovery
- flash NikGapps
- reboot to system
Edit: Maybe this will also help you:
https://wiki.orangefox.tech/en/guides/flashing
I haven't completely understood it yet either
hammerheadache said:
Please bear with me, as this is my first A/B device and I'm quite confused about the flashing procedure.
I successfully unlocked bootloader and flashed TWRP.
I tried to install A13 SparkOS vanilla + Basic NikGapps. Like @11insomnium said in the 1st post, ROM was installed fine, but Gapps package was not. I tried what @psklf says, no good... Each time I try to flash the Gapps package I get a message that /system size is 0KB, and of course the setup process is skipped due to lack of space...
On a side note, when flashing the ROM, step 1/2 completes fine, but on step 2/2 I get some errors about failing to access /system, /system_product, /vendor etc... However, as I said, ROM boots fine afterwards...
Am I missing something? Or is flashing the integrated Gapps ROM version the way to go?
@11insomnium did you manage to sort this out?
Click to expand...
Click to collapse
I have read in EROFS ROMs like Spark or PE it's problematic to flash GApps or microG as the system is read-only. Also applies to some Magisk modules as well.
amn1987 said:
I have read in EROFS ROMs like Spark or PE it's problematic to flash GApps or microG as the system is read-only. Also applies to some Magisk modules as well.
Click to expand...
Click to collapse
Thanks for the info. That explains why there are ROM versions with GApps included.

Categories

Resources