Hello
I am using MIUI global 11.0.8 stock rom. Recently just unlocked the bootloader and trying to figure out how to flash LineageOS in it.
Tried to followed this guide https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
But it seems like it is pretty old and not updated. Should i follow this thread or there is something updated? Also feels like i'm missing various things like disabling encryption(!), needs to be on old stock rom for proper installation, customized TWRP recovery and specific Xiaomi programs to do it properly. Could someone identify the missing info/issues i'm having trouble with? TIA.
61zone said:
Hello
I am using MIUI global 11.0.8 stock rom. Recently just unlocked the bootloader and trying to figure out how to flash LineageOS in it.
Tried to followed this guide https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405
But it seems like it is pretty old and not updated. Should i follow this thread or there is something updated? Also feels like i'm missing various things like disabling encryption(!), needs to be on old stock rom for proper installation, customized TWRP recovery and specific Xiaomi programs to do it properly. Could someone identify the missing info/issues i'm having trouble with? TIA.
Click to expand...
Click to collapse
FIRST OF ALL BACKUP YOUR DATA. Go to fastboot mode and flash latest twrp recovery. Boot to recovery and wipe cache, system and data. Since this is the first time you are installing a custom rom you should format data in twrp. After formatting data reboot to twrp then transfer latest Lineage OS flashable zip in you phone's storage and flash it. Then flash gapps if you want. Then magisk if you want root and DFE if you don't want encryption. That's it. Now reboot to system.
And remember google is your friend.
callmebutcher101 said:
FIRST OF ALL BACKUP YOUR DATA. Go to fastboot mode and flash latest twrp recovery. Boot to recovery and wipe cache, system and data. Since this is the first time you are installing a custom rom you should format data in twrp. After formatting data reboot to twrp then transfer latest Lineage OS flashable zip in you phone's storage and flash it. Then flash gapps if you want. Then magisk if you want root and DFE if you don't want encryption. That's it. Now reboot to system.
And remember google is your friend.
Click to expand...
Click to collapse
Actually there is too much information to handle at once that's why i got confused lol. Thanks for the infos :good:
I'll try to do according to your info.
Related
Hi,
I can finally unlock the bootloader - which AFAIK wipes user data. Now, since I've used the phone heavily over the waiting period, there's a lot to backup and reintegrate later on.
What's the quickest way to do so?
MTP-copy all of Internal Storage to PC -> unlock -> copy back?
(I am experienced with unlocking, rooting, flashing Roms and recoveries, but haven't had a non-rooted phone for about 8 years, so I am a bit out of the loop on non-root backup procedures)
TIA!
Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacyHelium should be sufficient for apps.
For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.
omnomnomkimiiee said:
Using adb pull, you could probably get your internal storage.
Iirc the canonical dirs are:
/storage/emulated/0
/storage/emulated/legacyHelium should be sufficient for apps.
Click to expand...
Click to collapse
Thanks.
Any advantage of using adb vs. just mounting the device via mtp? Last I've used adb for file transfer it was slower than even mtp...
jes0411 said:
For me unlocking didn't wipe data.
Only wipe was when I installed developer rom to be able to unlock.
Click to expand...
Click to collapse
do you mean "to be able to root"? because otherwise I don't follow...
So the process should be unlock, flash twrp and then flash magisk to maintain twrp and avoid the bootloop. Then you can backup with root and clean flash if you want.
Twrp can't decrypt data but it's not needed to flash magisk. Anyway you can flash orangefox (latest version, beta 6) from twrp and it can decrypt data to access it from recovery.
Click to expand...
Click to collapse
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?
santoo said:
do you mean "to be able to root"? because otherwise I don't follow...
Thanks. This is gonna sound very noob, but since I'm new to MIUI - is data already encrypted in stock MIUI? Otherwise I'll need orangefox only for switching between future custom ROMs, right?
Click to expand...
Click to collapse
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.
jes0411 said:
I mean to unlock because I can't bind my mi account in stable and had to install developer rom to bind account.
Yes data is already encrypted on stock rom. If you need to access data partition in recovery you need orangefox. But it's not needed to flash magisk.
To use custom roms you don't need orangefox because you can format data from twrp and then flash the rom. I started using orangefox since I tried miui 10 oreo beta because I was unable to avoid encryption on that rom.
Click to expand...
Click to collapse
Thanks for the explanations!
I plan on just unlocking bootloader, enabling cam2 and installing a current gcam today - I'll wait with flashing until miui10 stable is released in the next week or so, so I can do a "fair" comparison between Lineage and Miui (and possibly some others)
jes0411 said:
For me unlocking didn't wipe data.
Click to expand...
Click to collapse
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.
santoo said:
A quick heads-up, just in case anyone stumbles upon this thread:
As of MIUI 9.5.17 global stable, using official MIUI unlock 3.3.525.23, unlocking the bootloader DOES WIPE user data & factory-resets the phone (to be more precise - it wipes the complete internal storage).
SD is, as expected, left alone.
Click to expand...
Click to collapse
I only shared my experience.
My data was wiped when I installed developer rom to bind account but when I unlocked bootloader after 360h data remained intact. When I flashed twrp phone didn't boot but I solved it flashing magisk.
jes0411 said:
I only shared my experience.
Click to expand...
Click to collapse
Yes, and I thank you for it.
I was not accusing you of anything - things may well have changed with different versions of MIUI or different versions of the unlock tool, or between chinese/global versions. Just a warning for others that, at least with the versions I posted, having a backup is reaaaaally nice :good:
Hey guys, I'm trying to install LineageOS GSI (arm64 A/B) on my Mi A3 and seem to be having some trouble getting the GSI to actually boot successfully.
I have already done my research both on XDA and elsewhere online, yet most threads focused on the device seem to be of little to no use and/or filled with spam replies that only serve to confuse people looking into this.
A quick note regarding the aforementioned threads:
I don't mean to sound disrespectful to the community, but honestly, bashing somebody over why they'd rather install anything but your own fav piece of software is completely ridiculous.
Without further ado, my case goes as follows:
I'm starting fresh with the latest stock firmware, after having unlocked my bootloader ofc (critical too), I've successfully installed TWRP, wiped, installed the system image and yet after rebooting I'm just greeted with good ol' Fastboot, at which point I either directly flash the stock firmware and try again or wipe my data and whatnot (through TWRP, if reinstalled) and still end up with Fastboot.
Therefore, I have to ask you guys:
Has anyone previously successfully installed any GSI rom on the Mi A3?
Did you flash the system img while on stock firmware or a previously flashed custom rom (ie Pixel Experience)?
Is there any need for any special patch similar to the ones used for MIUI based Xiaomi phones?
Did you face any other issues while trying to flash a GSI?
My intention is to eventually install microG using Nanodroid.
Thanks for asking. I was trying to flash Havoc, crDroid and MSM-Xtended Android 10 GSIs but I can't boot the phone.
I have flashed lots of GSIs in the past, but this is really intriguing me, I can't boot on Mi A3. Wiping or formatting data does not solve, neither Permissiver or Disable Dm-verity zips did the job... :crying:
I successfully bootet the LineageOS GSI yesterday. I was not coming from stock though. I think this process should work assuming you already bootet to TWRP:
1. flash the GSI image to system partition using TWRP
2. flash the TWRP installer to keep your recovery
3. (not sure if needed) flash no fde patch
4. optional: flash some other stuff like Magisk and gapps
5. wipe data and dalvik
I think it rebooted to recovery on my first try but worked after flashing everything again. I probably made some mistake on my first attempt but just make sure to try again before giving up.
Also there's this tutorial but it's not at all what I did to get it working:
https://forum.xda-developers.com/mi-a3/how-to/tutorial-flash-custom-rom-mi-a3-t3977169
Followed the instructions on several websites such as this one here at XDA:
https://www.xda-developers.com/how-to-install-twrp/
All goes well until I get to this line:
fastboot flash recovery recovery.img (latest TWRP image, renamed)
The command prompt window just sits there and says "(waiting for any device)"...
Most websites and forum threads seem to indicate that this is a problem with the drivers. Can anyone confirm?
FWIW, I did a total reflash of the latest stock ROM from this thread:
https://forum.xda-developers.com/ga...icial-stock-fw-update-odin-thread-xx-t3825204
so I currently have only the "stock" recovery.
I'd rather not root it quite yet. Help please?
P.S. The phone shows up in Device Manager and for "adb devices"; the phone's bootloader has been unlocked... can't see what I'm missing... I'm using a Windows 10 computer... I removed any screen locking mechanisms (PIN, fingerprint, etc.)...
Follow this instructions https://forum.xda-developers.com/galaxy-note-9/development/recovery-twrp-galaxy-note9-exynos-t4097441
Most samsung device use odin to install twrp
ACC18 said:
Follow this instructions https://forum.xda-developers.com/galaxy-note-9/development/recovery-twrp-galaxy-note9-exynos-t4097441
Most samsung device use odin to install twrp
Click to expand...
Click to collapse
Thanks. I'm trying it with 3.4.0-0
Do I flash this file while I'm still in TWRP? Or do I reboot the phone and go back *into* TWRP to flash it?
>After booting in TWRP download and flash no-verity-opt-encrypt-6.1 zip to disable data partition encryption
Edit: I tried flashing no-verity-opt while still in TWRP. Got the dreaded:
"Verification failed.
Unable to restart your device. The integrity verification has failed. You need to reset your device to factory default settings. This will erase all your data."
I *really* tried to follow the instructions exactly, and think I did.
Was it because I tried to flash 3.4.0-0...?
I am currently re-flashing the stock firmware again.
Dougmeister said:
Thanks. I'm trying it with 3.4.0-0
Do I flash this file while I'm still in TWRP? Or do I reboot the phone and go back *into* TWRP to flash it?
>After booting in TWRP download and flash no-verity-opt-encrypt-6.1 zip to disable data partition encryption
Edit: I tried flashing no-verity-opt while still in TWRP. Got the dreaded:
"Verification failed.
Unable to restart your device. The integrity verification has failed. You need to reset your device to factory default settings. This will erase all your data."
I *really* tried to follow the instructions exactly, and think I did.
Was it because I tried to flash 3.4.0-0...?
I am currently re-flashing the stock firmware again.
Click to expand...
Click to collapse
You need to format data after install twrp. This is avoiding internal data encrypted.
After twrp installed, do format data from twrp. Of course all of ur data on internal erased. And then take custom rom. I suggest devbase rom, this have "no verity encrypt" when u install this rom. Devbase is stock firmware for easy upgrade for rooted phone. And this is easy to install for beginner
Sorry for bad English
ACC18 said:
You need to format data after install twrp. This is avoiding internal data encrypted.
After twrp installed, do format data from twrp. Of course all of ur data on internal erased. And then take custom rom. I suggest devbase rom, this have "no verity encrypt" when u install this rom. Devbase is stock firmware for easy upgrade for rooted phone. And this is easy to install for beginner
Sorry for bad English
Click to expand...
Click to collapse
No worries. Thank you for your help.
I use Odin to install the Devbase ROM, right? Or can I use TWRP?
Edit: apparently it works just fine to install it with TWRP.
Thank you so much. This time TWRP works just fine for me and the new ROM is great.
Hi. I installed Android 12 Pixel Experience rom and my TWRP gone after this. After installing the rom, TWRP replaced with Pixel Experience's own recovery mode. Currently, the ROM is installed and I can use it without any problems, but I cannot switch to a different ROM in any way. When I install TWRP with ADB, I cannot install the file named "DM Verity & ForceEncrypt disabler" because everything is encrypted. I do not use any passwords on the ROM (fingerprint, screen lock, etc.). I want to install new ROM so I need to make TWRP permanent and remove encryption on TWRP, because i can't see my files. As I said, the phone is can open and I can use it without problems. Looking forward to your help, thank you.
1) Backup everything
2) Install twrp and sideload the PE rom but don't boot into it
3) Flash the DFE (disable force encryption ) zip from twrp
4) Boot into the rom
Remember you won't get the ota updates if you disable the encryption and have to manually update the rom
easdasd617 said:
Hi. I installed Android 12 Pixel Experience rom and my TWRP gone after this. After installing the rom, TWRP replaced with Pixel Experience's own recovery mode. Currently, the ROM is installed and I can use it without any problems, but I cannot switch to a different ROM in any way. When I install TWRP with ADB, I cannot install the file named "DM Verity & ForceEncrypt disabler" because everything is encrypted. I do not use any passwords on the ROM (fingerprint, screen lock, etc.). I want to install new ROM so I need to make TWRP permanent and remove encryption on TWRP, because i can't see my files. As I said, the phone is can open and I can use it without problems. Looking forward to your help, thank you.
Click to expand...
Click to collapse
You need to read the instructions before you flash anything. PE A12 is encrypted by default and because TWRP can't handle the decryption of A12 ROMs, PE replacing the TWRP with PE Recovery, so to be able to get OTA updates. This is a workaround until TWRP fix the decryption issue.
To flash another ROM, take backup of the files you want from your Internal Storage, flash TWRP via ADB, wipe everything and format data. Then connect your device to PC and transfer the ROM and the files you want to flash into your Internal Storage and proceed with flashing.
I was running stock MIUI with root and TWRP recovery. After flashing the Pixel Experience Android 11 ROM, I didn't flash TWRP again. I tried many attempts (I haven't mentioned everything here to keep the post shorter) to install TWRP again, and I managed to do it successfully once. However, now when I boot into TWRP and select the A partition, it can't decrypt with my password and reboots the system, always opening the bootloader. When selecting the B partition, if I format the data and flash Magisk, it opens up the system (it opens the bootloader without flashing Magisk). But after booting into the system, if I boot TWRP again and reboot into the system without doing anything, my settings app and Bluetooth stop working. Then I have to boot into TWRP again, format the data, and flash Magisk again to boot the system normally. I can't install any Magisk modules either. However, the root is working.
Do you have any suggestions on what I can do?"
AhmedRadowan25 said:
Do you have any suggestions on what I can do?
Click to expand...
Click to collapse
flash stock miui according to your region with mi flash (don't lock the bootloader!)
this generally solves any problem and you can go back to custom roms after booting into miui.
Anyway , i recommend you to use the recovery provided with the rom itself as twrp can give issues sometimes.
AhmedRadowan25 said:
I was running stock MIUI with root and TWRP recovery. After flashing the Pixel Experience Android 11 ROM, I didn't flash TWRP again. I tried many attempts (I haven't mentioned everything here to keep the post shorter) to install TWRP again, and I managed to do it successfully once. However, now when I boot into TWRP and select the A partition, it can't decrypt with my password and reboots the system, always opening the bootloader. When selecting the B partition, if I format the data and flash Magisk, it opens up the system (it opens the bootloader without flashing Magisk). But after booting into the system, if I boot TWRP again and reboot into the system without doing anything, my settings app and Bluetooth stop working. Then I have to boot into TWRP again, format the data, and flash Magisk again to boot the system normally. I can't install any Magisk modules either. However, the root is working.
Do you have any suggestions on what I can do?"
Click to expand...
Click to collapse
Here's a complete explanation what I have done:
Initially, I was running stock MIUI with root access and TWRP recovery. However, I decided to switch to the Pixel Experience ROM. I downloaded the Pixel Experience Android 11 version and flashed it directly from TWRP since I didn't have access to a PC at that time. I only flashed the ROM file and didn't install the Pixel Experience recovery image, assuming that my TWRP would remain intact. But when I rebooted into recovery after the ROM installation, it booted into the Pixel Experience recovery instead. I couldn't find an option to flash the recovery image, only an option to apply an update through ADB sideload.
Fortunately, I managed to use a friend's computer and installed all the necessary ADB and Fastboot drivers. The computer could detect my phone in ADB sideload mode, but when I tried to boot into the bootloader, the PC couldn't detect my phone. Despite multiple attempts of booting into the Pixel Experience recovery and enabling ADB sideload, the PC couldn't recognize the fastboot mode. Strangely, every time I booted into the bootloader, my phone automatically powered off after displaying the Redmi logo. Holding the power button didn't help as it consistently powered off after showing the logo, without accessing the bootloader or recovery mode. I was afraid my phone had become completely unresponsive.
After numerous attempts, my phone unexpectedly booted into the bootloader again. This time, I connected my phone to another device using BugJagger, which successfully detected my phone. I used the command "fastboot flash recovery twrp.img" followed by "fastboot boot twrp.img" to open TWRP. However, I couldn't decrypt it using my password. I then flashed TWRP again and tried to boot into the system, but it always reverted back to the bootloader. I went back into recovery, selected partitions A to B, and flashed Magisk ZIP, DM variety ZIP, and LazyFlasher ZIP (without fully understanding their purpose).
Finally, my phone successfully booted into the system. However, upon rebooting into TWRP and then rebooting the system without any changes, my settings app and bluetooth stoped working. To resolve this, I had to boot into TWRP once again, format the data, and flash Magisk to restore normal operation.
alonsoj636MW said:
flash stock miui according to your region with mi flash (don't lock the bootloader!)
this generally solves any problem and you can go back to custom roms after booting into miui.
Anyway , i recommend you to use the recovery provided with the rom itself as twrp can give issues sometimes.
Click to expand...
Click to collapse
yes i am also thinking that it is the only solution.But I have tampered almost everything of my phone.Will flash stock miui rom can solve all problem?I have writen everything what i have done details in reply.you can read it if you want.
AhmedRadowan25 said:
yes i am also thinking that it is the only solution.But I have tampered almost everything of my phone.Will flash stock miui rom can solve all problem?I have writen everything what i have done details in reply.you can read it if you want.
Click to expand...
Click to collapse
yes i think you messed up with your phone for real. there was a lot of things that was incorrect.
don't mess with the slots and don't flash things you don't know about... you can ask here if you have doubts...
follow my advice and reflash stock miui with miflash to start from 0
and don't do all those things again... once you are done with miui... just tell what do you want to do and we'll guide you properly
alonsoj636MW said:
yes i think you messed up with your phone for real. there was a lot of things that was incorrect.
don't mess with the slots and don't flash things you don't know about... you can ask here if you have doubts...
follow my advice and reflash stock miui with miflash to start from 0
and don't do all those things again... once you are done with miui... just tell what do you want to do and we'll guide you properly
Click to expand...
Click to collapse
alonsoj636MW said:
yes i think you messed up with your phone for real. there was a lot of things that was incorrect.
don't mess with the slots and don't flash things you don't know about... you can ask here if you have doubts...
follow my advice and reflash stock miui with to start from 0
and don't do all those things again... once you are done with miui... just tell what do you want to do and we'll guide you properly
Click to expand...
Click to collapse
Thank you very much.Flashing miui will solve all probem?what do you think?
AhmedRadowan25 said:
what do you think?
Click to expand...
Click to collapse
it should
at least when i mess up with my phone flashing stock fixes all problems
Hi mate! Did you resoved the problem? What about the rom? All good?
gabsvm1 said:
Hi mate! Did you resoved the problem? What about the rom? All good?
Click to expand...
Click to collapse
No.I am running pixel experience 11 rom with these problems.No problem will appear untill i boot into recovery.Sorry i can't check and tell you that if 13 rom's recovery can flash 11 rom.
AhmedRadowan25 said:
No.I am running pixel experience 11 rom with these problems.No problem will appear untill i boot into recovery.Sorry i can't check and tell you that if 13 rom's recovery can flash 11 rom.
Click to expand...
Click to collapse
No problem mate, besides that everything is working good? You have tried a13 roms before?
gabsvm1 said:
No problem mate, besides that everything is working good? You have tried a13 roms before?
Click to expand...
Click to collapse
No
Who told you to flash DM Verity and Lazy Flasher
We don't need these things in our device
Don't mess up with Active Slot
If you try to change your Active slot into Inactive slot, once you Reboot to system, you will go straight to fastboot
You need Android Bootloader Interface to detect your phone in bootloader and ADB Composite to detect your phone in ADB, such as : Google USB Driver r13
Why you don't ask before doing anything, we have global community chat in telegram, for sure, we will help you in possible way
I assume you need back to stock rom to fix this issue
hit me on tele t.me/super_img