[HOW-TO]Successfully Flash Any Custom ROMS without ERRORS! - Xiaomi Mi A1 Guides, News, & Discussion

Make sure your Bootloader is Unlocked
Reboot to Bootloader (Hold Power + Volume down) until you see Fastboot Image
Dowload latest TWRP by Mohancm https://www.androidfilehost.com/?fid=818070582850498337 copy to ADB folder
Goto your ADB folder (hold shift + right click) open with CMD / Powershell
Type Fastboot boot re (press tab for recovery shortcut)
Press enter don't close your window
In TWRP Allow Modification
Goto to Wipe > Advance wipe > check System/cache/data/internal and swipe to wipe
Don't reboot yet > goto reboot option and choose Bootloader
Goto CMD/Powershell just press Up arrow key and enter
Copy the ROM/GAPPS/MAGISK to you device
Flash ROM
Reboot to Bootloader
Goto CMD/Powershell just press Up arrow key and enter
Flash GAPPS/MAGISK
Reboot to System
Profit!

Great. Much appreciated :good:
In step 3 after flashing rom , what about reboot to recovery instead of reboot to bootloader and flash twrp again?
EDIT
------
Sorry. We r just booting TWRP. I did not noticed that :silly:

Rajeev said:
Great. Much appreciated :good:
In step 3 after flashing rom , what about reboot to recovery instead of reboot to bootloader and flash twrp again?
EDIT
------
Sorry. We r just booting TWRP. I did not noticed that :silly:
Click to expand...
Click to collapse
The TWRP 3.2.1.1 (fixed by DroidMester) can be installed permanently. No problems!

ydd0ras said:
The TWRP 3.2.1.1 (fixed by DroidMester) can be installed permanently. No problems!
Click to expand...
Click to collapse
But it can't flash custom roms. The only TWRP that can flash custom roms is from deadman.

t0per666 said:
But it can't flash custom roms. The only TWRP that can flash custom roms is from deadman.
Click to expand...
Click to collapse
Yeah, that's right. For flashing the ROM itself only the deadman. For other actions the usual TWRP can be flashed!

t0per666 said:
But it can't flash custom roms. The only TWRP that can flash custom roms is from deadman.
Click to expand...
Click to collapse
Is it necessary to delete Internal? While clean flashing Nougat image the Internal is already wiped right?

Rajeev said:
Is it necessary to delete Internal? While clean flashing Nougat image the Internal is already wiped right?
Click to expand...
Click to collapse
Yes but it also installs the OS as well. You want a clean slate completely, if possible, so best to wipe it again before flashing a custom ROM.

Rajeev said:
Is it necessary to delete Internal? While clean flashing Nougat image the Internal is already wiped right?
Click to expand...
Click to collapse
May be it has to do something with files written when you boot N 1st time. Like temp files.

Can't flash gapps error 64
Can't flash gapps error 64

Rajeev said:
Is it necessary to delete Internal? While clean flashing Nougat image the Internal is already wiped right?
Click to expand...
Click to collapse
Its for the encryption. So if you flash custom roms it doesnt show "data is encrypted" in your first boot. Thats what i've read.
You can always try flashing without wiping internal and see.

akshaygalaxystarmod said:
Can't flash gapps error 64
Click to expand...
Click to collapse
Did you follow instruction carefully?

t0per666 said:
Did you follow instruction carefully?
Click to expand...
Click to collapse
I did

akshaygalaxystarmod said:
I did
Click to expand...
Click to collapse
What twrp did you use? What version of gapps?

t0per666 said:
What twrp did you use? What version of gapps?
Click to expand...
Click to collapse
deadman twrp
arm 64 7.1 pico

Noobish question: Internal memory wiping is necessary? Data wiping will delete app+their data. Formatting internal only erase media like music n videos.

akshaygalaxystarmod said:
deadman twrp
arm 64 7.1 pico
Click to expand...
Click to collapse
Its either you didnt follow instructions correctly or the rom have a problem when you flashed it.
SwastikAcharya said:
Noobish question: Internal memory wiping is necessary? Data wiping will delete app+their data. Formatting internal only erase media like music n videos.
Click to expand...
Click to collapse
You can leave it if you want but im not recommending to not wipe internal.

Good day! Never failed to flash the rom in this way, the rollback to the nougat is made, the necessary recovery is loaded - an error 1. Tell me what might be the matter?

first, can i flash rom on both partion a and b ?
why after flash and rebooting to twrp again pation change to B?
why not flash magisk and gapps on same partion with first installation?

gazzly said:
first, can i flash rom on both partion a and b ?
why after flash and rebooting to twrp again pation change to B?
why not flash magisk and gapps on same partion with first installation?
Click to expand...
Click to collapse
-Do not flash it on both slots.
-The reason it switches between A and B, is because the rom gets installed on the second partition and not the partition you are on when you flash it (i think).
-And you can't flash magisk or gapps because, like what i've said before, the rom gets flashed on the other slot.
Im not 100% sure that's how it works, so don't quote me.

I've flashed viperos having no issues. I had flashed nougat firmware before that. Now in order to flash another rom, do I have to flash stock nougat firmware again or is it ok that I just clean wipe and flash new rom?

Related

how to install roms?

im fairly new to the rooting scene ive rooted a couple devices before but roms are a new thing to me..
how do i go about installing a rom, such as the unofficial lineage os rom that was made for the honor 6x (in these forums)?
im in the process of unlocking my bootloader and doing a basic root. how can i also acquire a stock firmware and stock rom incase something goes bad and i can restore my device?
thank youuu
*PS is a BLN-L24 model
Follow the instructions carefully mentioned in specified rom page...that should be sufficient but u should be extra careful as this is a kirrin device
Tips...
Remove fingerprints and key on stock rom
Just wipe data, system, cache... don't touch vendoe, product etc when you r going to flash LOS or AOSP
If your going los by hassan - go to advanced wipe in twrp - select data - repair or change file system - ext4 - format
If you are going to elite rom - just format data in f2fs
Rest is very clear in instructions
P.S. - ALWAYS TAKE COMPLETE BACKUP IN TWRP OR ELSE YOU WILL BE F****ED UP
i got it rooted,
now question is, i was looking to do the LOS one by hassan.. do i need to flash in a different twrp recovery other than the one i used in the guide thats posted on here, and if so how can i do so without messing something up? then, i assume hes asking to flash in a new kernel? how?
xSpartacusx said:
i got it rooted,
now question is, i was looking to do the LOS one by hassan.. do i need to flash in a different twrp recovery other than the one i used in the guide thats posted on here, and if so how can i do so without messing something up? then, i assume hes asking to flash in a new kernel? how?
Click to expand...
Click to collapse
No need to flash kernel ...It's inbuilt
Yes..u need to flash 3.1.1-1 twrp by hassan ..link provided in that rom page.
Its very easy to flash and more advanced twrp
U could google 'how to flash twrp with twrp' just needs 2 steps
can i just do
fastboot flash recovery twrp-3.1.1-0-berlin.img
but with the other file name for the correct twrp recovery?
ok another question the direction on his post for LOS say to wipe data, the two caches and system and then flash the rom... wouldnt i lose the twrp recovery when i wipe those 4 things?
xSpartacusx said:
can i just do
fastboot flash recovery twrp-3.1.1-0-berlin.img
but with the other file name for the correct twrp recovery?
Click to expand...
Click to collapse
Yes, it can be any name
Fastboot flash recovery recovery_name.img
---------- Post added at 04:56 PM ---------- Previous post was at 04:54 PM ----------
xSpartacusx said:
ok another question the direction on his post for LOS say to wipe data, the two caches and system and then flash the rom... wouldnt i lose the twrp recovery when i wipe those 4 things?
Click to expand...
Click to collapse
No it wont. There is no way to wipe TWRP from TWRP (dont clear internal and external storage)
Just follow the instructions carefully.
ALso refer this guide for backup in case you messed up (method given for backup)
ok so problem. i followed his instructions to a T, and its stuck at the boot animation i also made sure to change the data partition type to ext4
xSpartacusx said:
ok so problem. i followed his instructions to a T, and its stuck at the boot animation i also made sure to change the data partition type to ext4
Click to expand...
Click to collapse
Which ROM?
the lineage os one by hassan
xSpartacusx said:
the lineage os one by hassan
Click to expand...
Click to collapse
Did you remove encryption by formatting data with typing yes.
Which all partition you wiped before installation.
i tried that, but i wiped dalvik cache data and system, as the instructions said to
xSpartacusx said:
i tried that, but i wiped dalvik cache data and system, as the instructions said to
Click to expand...
Click to collapse
Remove boot as well
it doesnt give me the option to wipe the boot partition
xSpartacusx said:
it doesnt give me the option to wipe the boot partition
Click to expand...
Click to collapse
Which recovery are you using? Regular twrp or the one by Hassan?
twrp by hassan

[GUIDE] Install Oreo Custom ROMs via TWRP

Good day to everyone! I wish to provide proper steps on how to install the latest Oreo custom ROMs via TWRP in order to lessen the clutter in the custom ROM threads.
You'll need the following:
Latest TWRP Official (Fastboot TWRP)
Latest TWRP Installer (PERMANENT TWRP)
Considering you already installed TWRP via fastboot, we'll make it so that it will be permanently installed and you will not need to flash TWRP via bootloader again.
Download ROM + GApps (or no gapps if Pixel Experience)
Reboot to latest Official TWRP
Do necessary wipes (FORMAT data if having storage number issue; if not, wipe system/data/cache) then transfer ROM + gapps + magisk to internal/external storage
Flash ROM (don't reboot)
Flash latest TWRP Installer (for Permanent TWRP)
Reboot recovery (no need to transfer slots anymore as TWRP does it automatically)
Flash Gapps + Magisk
Reboot to system
To DIRTY FLASH or update the same ROM with an updated version
Reboot to recovery
Flash ROM
Flash TWRP Installer
Reboot recovery
Flash Gapps + Magisk
Reboot to system
For installing custom kernels
Download custom kernel
Reboot recovery
Flash custom kernel
Reboot to system
All of these has been tried and tested by me already.
Hey , where to flash rom??
As you have written gapps + magisk , gapps + magisk twice
sikoo1996 said:
Hey , where to flash rom?
As you have written gapps + magisk , gapps + magisk twice
Click to expand...
Click to collapse
I don't know what you mean. Read it again but slowly.
thnx man.
please add instructions to flash twrp permanent or share link.
vkbhanwariya said:
thnx man.
please add instructions to flash twrp permanent or share link.
Click to expand...
Click to collapse
+1
vkbhanwariya said:
thnx man.
please add instructions to flash twrp permanent or share link.
Click to expand...
Click to collapse
dceamit46 said:
+1
Click to expand...
Click to collapse
Guys, TWRP Installer IS the Permanent TWRP. That's why you need to flash it every time after flashing custom ROMs.
joeyhuab said:
Guys, TWRP Installer IS the Permanent TWRP. That's why you need to flash it every time after flashing custom ROMs.
Click to expand...
Click to collapse
thanks mate now ROM flashing seems very easy
vkbhanwariya said:
thanks mate now ROM flashing seems very easy
Click to expand...
Click to collapse
You're welcome! Good luck in switching ROMs!
Sent from my Xiaomi Mi A1 using XDA Labs
joeyhuab said:
You're welcome! Good luck in switching ROMs!
Click to expand...
Click to collapse
I really want to thank you for putting this up. Its immensely helpful and once again you are best at what you do.
gunmanrishi said:
I really want to thank you for putting this up. Its immensely helpful and once again you are best at what you do.
Click to expand...
Click to collapse
You're more than welcome and I'm always more than glad to help out the community. :highfive:
Sent from my Xiaomi Mi A1 using XDA Labs
With custom ROMs we have to install Twrp installer every time along with ROM zip, bit awkward.
Is it just me but every time I flash twrp after flashing rom, I got error 20 when flashing gapps. Here's my steps:
- flash rom
- switch partition
- flash twrp
- reboot recovery (or bootloader then flashboot recovery)
- flash gapps -> error 20
Without flashing twrp permanent, I can flash gapps, no error.
madhpharma said:
With custom ROMs we have to install Twrp installer every time along with ROM zip, bit awkward.
Click to expand...
Click to collapse
Yep. That's because the ROM being flashed overwrites the recovery since there's no recovery partition.
kopitalk said:
Is it just me but every time I flash twrp after flashing rom, I got error 20 when flashing gapps. Here's my steps:
- flash rom
- switch partition
- flash twrp
- reboot recovery (or bootloader then flashboot recovery)
- flash gapps -> error 20
Without flashing twrp permanent, I can flash gapps, no error.
Click to expand...
Click to collapse
Did you flash the TWRP.img or TWRP Installer.zip in TWRP?
Sent from my Xiaomi Mi A1 using XDA Labs
joeyhuab said:
Yep. That's because the ROM being flashed overwrites the recovery since there's no recovery partition.
Did you flash the TWRP.img or TWRP Installer.zip in TWRP?
Click to expand...
Click to collapse
Twrp installer, to be exact Twrp-recoveryInstaller-3.2.1-2-oreo.zip
joeyhuab said:
Guys, TWRP Installer IS the Permanent TWRP. That's why you need to flash it every time after flashing custom ROMs.
Click to expand...
Click to collapse
If we need to flash it every time after flash rom so how it's called permanent TWRP I don't understand. That because our device don't have recovery partition? If that so where this TWRP installed ( in which partition)?
cherryb8844 said:
If we need to flash it every time after flash rom so how it's called permanent TWRP I don't understand. That because our device don't have recovery partition? If that so where this TWRP installed ( in which partition)?
Click to expand...
Click to collapse
It's called permanent twrp because it won't get replaced by built in recovery whenever you reboot to recovery from system. TWRP gets installed within a part of the system partition.
Sent from my Xiaomi Mi A1 using XDA Labs
kopitalk said:
Is it just me but every time I flash twrp after flashing rom, I got error 20 when flashing gapps. Here's my steps:
- flash rom
- switch partition
- flash twrp
- reboot recovery (or bootloader then flashboot recovery)
- flash gapps -> error 20
Without flashing twrp permanent, I can flash gapps, no error.
Click to expand...
Click to collapse
Error 20 if I'm not wrong, means you are using the wrong gapps package.
Are you using the right one?
varben said:
Error 20 if I'm not wrong, means you are using the wrong gapps package.
Are you using the right one?
Click to expand...
Click to collapse
Yes, I certainly use the right one (8.1), that's why I was baffled when twrp says that my device is 7.1.2 every time I tried to flash the 8.1 gapps. Anyway, flashing rom then straightaway followed by gapps and magisk was fine. I can flash twrp installer later on. But I just don't understand why.
kopitalk said:
Yes, I certainly use the right one (8.1), that's why I was baffled when twrp says that my device is 7.1.2 every time I tried to flash the 8.1 gapps. Anyway, flashing rom then straightaway followed by gapps and magisk was fine. I can flash twrp installer later on. But I just don't understand why.
Click to expand...
Click to collapse
Well that's weird. Works for me by flashing Gapps and Magisk after rebooting to recovery since it switches slots when you do that. Did you possibly come from a Nougat ROM which is why that's the error showing up?
Sent from my Xiaomi Mi A1 using XDA Labs
joeyhuab said:
Well that's weird. Works for me by flashing Gapps and Magisk after rebooting to recovery since it switches slots when you do that. Did you possibly come from a Nougat ROM which is why that's the error showing up?
Click to expand...
Click to collapse
I was thinking of that too but no, I was on Oreo Jan built the first time I rooted the phone and flash LOS15.1. Do you think I should at least flash Oreo stock once? Maybe my bootloader is still Nougat

Please give me a working twrp for J7 nxt/core (J701F/DS).

All the twrp available for J7 nxt/core has a bug I think?
TWRP > REBOOT > SYSTEM (Infinite boot-loop)
I tried lzzy12's final twrp and it does the same.
THANKS IN ADVANCE
Recovery twrp 3.2.1
romtester0.1 said:
All the twrp available for J7 nxt/core has a bug I think?
TWRP > REBOOT > SYSTEM (Infinite boot-loop)
I tried lzzy12's final twrp and it does the same.
THANKS IN ADVANCE
Click to expand...
Click to collapse
RECOVERY TWRP 3.2.1
qasimsansi3 said:
RECOVERY TWRP 3.2.1
Click to expand...
Click to collapse
I tried the twrp you provided. Still the same issue. Every time I go to reboot option and go to system it automatically starts to boot-loop.
romtester0.1 said:
I tried the twrp you provided. Still the same issue. Every time I go to reboot option and go to system it automatically starts to boot-loop.
Click to expand...
Click to collapse
did you even format data after flashing through odin?
Jbgamer04 said:
did you even format data after flashing through odin?
Click to expand...
Click to collapse
You mean wipe? Yes I wiped the data and cache.
romtester0.1 said:
You mean wipe? Yes I wiped the data and cache.
Click to expand...
Click to collapse
i mean format data in advanced wipe menu
Jbgamer04 said:
i mean format data in advanced wipe menu
Click to expand...
Click to collapse
Welp, the problem with the current twrp is getting worse. Now I can't even advance wipe data because it says /data not mounted something like that.
G
Sent from my Samsung SM-J710F using XDA Labs
install stock rom and then make hard reset .
romtester0.1 said:
Welp, the problem with the current twrp is getting worse. Now I can't even advance wipe data because it says /data not mounted something like that.
Click to expand...
Click to collapse
you need to install stock firmware and stock recovery (without CSC) problem is with PIT ( partition table ) .
qasimsansi3 said:
you need to install stock firmware and stock recovery (without CSC) problem is with PIT ( partition table ) .
Click to expand...
Click to collapse
Thanks I'll try that.
romtester0.1 said:
Thanks I'll try that.
Click to expand...
Click to collapse
Dude just boot to twrp -> Wipe -> format Phone -> type yes -> DONE! Now reboot twrp again and flash magisk. Ano it should boot fine. It's because of Samsung's DM-Verity and force encrypt.
PS: Formatting phone will delete all ur data on the phone including files on internal storage like pictures, downloads, etc. So keep a backup.

Oneplus 6 brick downgrading from beta to stable by twrp

Hello,
I was on open beta 6 and I downgraded using the .zip for that by flashing with twrp. Then i flashed twrp again and reboot.
Afther that, the phone doesn't start. It's is starting withe animation of balls circling. All the storage has been deleted. I tried to copy again the rom by adb in the storage on folder sdcard but it doesn't work.
Any idea?
Thanks
install fastboot ROM
1 boot to twrp recovery https://forum.xda-developers.com/devdb/project/dl/?id=30485
2 Wipe System Partition
3 Wipe Dalvic Cache
4 Flash the zip (OxygenOs 9.0.2)
5 boot system
if you want
6 reboot to twrp and flash magisk 17.3 for root, good luck
akuma48465 said:
1 boot to twrp recovery https://forum.xda-developers.com/devdb/project/dl/?id=30485
2 Wipe System Partition
3 Wipe Dalvic Cache
4 Flash the zip (OxygenOs 9.0.2)
5 boot system
if you want
6 reboot to twrp and flash magisk 17.3 for root, good luck
Click to expand...
Click to collapse
Ok, finally i get to copy the files with adb on the phone.
I try to flash OxygenOs 9.0.2 but it crashed. I will try wit OxygenOs 5.1.11.
Thanks for help.
predator178 said:
Ok, finally i get to copy the files with adb on the phone.
I try to flash OxygenOs 9.0.2 but it crashed. I will try wit OxygenOs 5.1.11.
Thanks for help.
Click to expand...
Click to collapse
all you had to do was flash magisk and everything would have been fine.
MrSteelX said:
all you had to do was flash magisk and everything would have been fine.
Click to expand...
Click to collapse
But flash magisk before flashing the 9.0.2?
predator178 said:
But flash magisk before flashing the 9.0.2?
Click to expand...
Click to collapse
has to be done after rom and or twrp flash. if not, bootloop is what will happen.
MrSteelX said:
has to be done after rom and or twrp flash. if not, bootloop is what will happen.
Click to expand...
Click to collapse
Yes I know, but if you dont flash magisk doesn't matter, only you won't have root permisions. My problem is that I can't install the rom.
predator178 said:
Yes I know, but if you dont flash magisk doesn't matter, only you won't have root permisions. My problem is that I can't install the rom.
Click to expand...
Click to collapse
Now I will try to flash by fastboot the rom 9.0.2 of this post
PHP:
https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665
I'm getting crazy this afternoon.
format data, problem fixed. when downgrading, if rom has older security data. formating is required for proper booting.
predator178 said:
Now I will try to flash by fastboot the rom 9.0.2 of this post
PHP:
https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665
I'm getting crazy this afternoon.
Click to expand...
Click to collapse
Well, finally i flash by fastboot the room 5.1.11 fron this post. Solved.
Thanks all

Bootloop after GSI ROM flash

Hi
After installing GSI ROM on my phone, bootloop happens. How do I resolve this issue?
Thanks in advance.
Device: Reeder P13 Blue Max It's not a very well known device.
First I flash the GSI ROM and then the Vendor.
up
Umut Nas said:
First I flash the GSI ROM and then the Vendor.
Click to expand...
Click to collapse
Sorry I have no idea what that rom or device is but does "Vendor" mean the apps and plugins installed after you flashed the rom?
What were the full steps you took? Did you factory reset before you flashed the rom? if not do that and try again. Its a needed step as deleting everything will easily put the device in unecrypted state.
leathan said:
Sorry I have no idea what that rom or device is but does "Vendor" mean the apps and plugins installed after you flashed the rom?
Click to expand...
Click to collapse
I don't know exactly what it is.
leathan said:
What were the full steps you took? Did you factory reset before you flashed the rom? if not do that and try again. Its a needed step as deleting everything will easily put the device in unecrypted state.
Click to expand...
Click to collapse
I went into fastboot and did erase user data. Then I tried to install HavocOS.
Umut Nas said:
I don't know exactly what it is.
I went into fastboot and did erase user data. Then I tried to install HavocOS.
Click to expand...
Click to collapse
Recovery mode (not fastboot)-> Factory reset
Install rom (before rebooting)
install apps/plugins (before rebooting)
leathan said:
Recovery mode (not fastboot)-> Factory reset
Install rom (before rebooting)
install apps/plugins (before rebooting)
Click to expand...
Click to collapse
Thanks, I will try.

Categories

Resources