[GUIDE] The correct way to flash custom ROMs - Android General

Since a lot of people have had trouble flashing Custom ROMs, I decided to create a guide that should work on every device (whether A/B partition or not) except on Samsung devices. For bypassing Decryption Issues, adb sideload the .zip files.
GUIDE
I am assuming you have unlocked your Bootloader, flashed TWRP and have some knowledge on ADB.
[This is known as a clean install or clean flash]
Turn off Lockscreen Security
Reboot to Recovery
Factory Reset
Format Data
Copy the .zip files from your PC to your phone / Plug in your USB OTG
Flash the ROM and then the Recovery Installer (No Magisk/SuperSU after)
Reboot to Recovery
Flash GApps and Magisk/SuperSU
Reboot to System
[This is known as a dirty flash]
To update the custom ROM or fix a error (Bootloop after successful first boot, No Service, etc.)
I am assuming you used my guide to flash the custom ROM
These are basically the same steps but without wiping or formatting data
Turn off Lockscreen Security
Reboot to Recovery
Flash the ROM (has to be the same ROM, updated is recommended, older versions may cause issues) and then the Recovery Installer (No Magisk/SuperSU after)
Reboot to Recovery
Flash GApps and Magisk/SuperSU
Reboot to System
LINKS:
Official GApps Website - GApps Github
Official TWRP Website - TWRP Github
Magisk Forum - Magisk Thread - Magisk Github
Official SuperSU Website - SuperSU Forum - SuperSU Thread - SuperSU Github
I recommend the Nano variant of GApps since I have had no error with it.
Enjoy!

[Disabler-ONLY]
`This is basically the same guide just if you want to flash Zackptg5's "Universal DM-Verity, ForceEncrypt, Disk Quota Disablers" or any other disabler which requires different steps.
[This is known as a clean install or clean flash]
Turn off Lockscreen Security
Reboot to Recovery
Format Data
Copy the .zip files from your PC to your phone / Plug in your USB OTG
Flash the ROM and then the Recovery Installer (No Magisk after)
Reboot to Recovery
Flash the Disabler, Magisk and then GApps
Reboot to System
Profit
Dirty Flash? You can't. Usually when using a Disabler you have to clean install your custom ROM.
To update use the method in the first post but for step number 5 Flash the Disabler, Magisk and then GApps

This is a bit much to do. Just use twinnfamous' twrp and you can flash a custom easily. Plus, I flash havoc over crdroid, then back and forth again. So you can flash over. Just have to wipe data and cache after ROM flash and twrp flash then reboot to recovery.
Basically:
Fastboot boot twrp (twinnfamous' 0.7)
Be on 9.0.7 firmware as most custom ROMs use this base right now I think..
Anyway, then flash twrp (twinnfamous' 0.7 installer zip)
Reboot to recovery
Now flash custom ROM
Flash twrp zip
Reboot to recovery
(You'll now be on the opposite slot as before, which means you are on the slot which your new custom ROM was installed)
Wipe > custom > data and cache wipe
Install opengapps nano and magisk 18.0
Reboot system
You'll boot right into the ROM setup screen with no decryption issues along the way as long as you do exactly as I said.
Have fun flashing!

dpryor88 said:
This is a bit much to do. Just use twinnfamous' twrp and you can flash a custom easily. Plus, I flash havoc over crdroid, then back and forth again. So you can flash over. Just have to wipe data and cache after ROM flash and twrp flash then reboot to recovery.
Basically:
Fastboot boot twrp (twinnfamous' 0.7)
Be on 9.0.7 firmware as most custom ROMs use this base right now I think..
Anyway, then flash twrp (twinnfamous' 0.7 installer zip)
Reboot to recovery
Now flash custom ROM
Flash twrp zip
Reboot to recovery
(You'll now be on the opposite slot as before, which means you are on the slot which your new custom ROM was installed)
Wipe > custom > data and cache wipe
Install opengapps nano and magisk 18.0
Reboot system
You'll boot right into the ROM setup screen with no decryption issues along the way as long as you do exactly as I said.
Have fun flashing!
Click to expand...
Click to collapse
You wasted that post just for this? I assure you that my tutorial guarantees success when using a official or unofficial version of TWRP or custom ROM, I also used the method you posted about but it did not work. Also what do you mean by "9.0.7"?
The GApps version you use doesn't have to be Nano and Magisk doesn't have to be v18.0. I'm sure you just copy-pasted this, my method should always succeed. The TWRP doesn't have to be from @twinnfamous , it can be from any developer. This is not a OnePlus 6T only guide.

This flashing process is difficult in my view. Why are you making the simple custom rom flashing process so difficult for the noobs.

_Masked_ said:
You wasted that post just for this? I assure you that my tutorial guarantees success when using a official or unofficial version of TWRP or custom ROM, I also used the method you posted about but it did not work. Also what do you mean by "9.0.7"?
The GApps version you use doesn't have to be Nano and Magisk doesn't have to be v18.0. I'm sure you just copy-pasted this, my method should always succeed. The TWRP doesn't have to be from @twinnfamous , it can be from any developer. This is not a OnePlus 6T only guide.
Click to expand...
Click to collapse
Why are you angry? Haha.
And you linked this from the op6t forums so I'm commenting on that phone. And that's how it's done on that phone. And it does matter which twrp you use for THAT phone because one doesn't decrypt correctly.
Copy and paste? No... And nano is always best if you read xda basically anywhere. Not that I said you HAVE to use nano anyway.. it was just in my steps. And that works for me with any/every ROM. So don't be so opposed to other suggestions. Your method is really weird and involves way too much use of a computer/fastboot. Kind of defeats the purpose of using twrp, don't you think?

Ashwinrg said:
This flashing process is difficult in my view. Why are you making the simple custom rom flashing process so difficult for the noobs.
Click to expand...
Click to collapse
What is making it difficult is encryption/decryption not working right in twrp yet (just a guess). I was having a hell of a time getting anywhere myself and kept getting my storage all jumbled from encryption until I found this thread which put it together for me with the adb sideload part, that bypasses encryption or at least lets you flash what you want when the folder names get all wonky.
Thanks OP for laying it out so clearly for me, I am an old dinosaur that was hesitating on messing with this a/b nonsense until I got my 6T and got the itch again. My trusty dusty nexus 6 is so much easier but it's also been around and has one system and a solid twrp for it.
Cheers! :good:

raiderep said:
What is making it difficult is encryption/decryption not working right in twrp yet (just a guess). I was having a hell of a time getting anywhere myself and kept getting my storage all jumbled from encryption until I found this thread which put it together for me with the adb sideload part, that bypasses encryption or at least lets you flash what you want when the folder names get all wonky.
Thanks OP for laying it out so clearly for me, I am an old dinosaur that was hesitating on messing with this a/b nonsense until I got my 6T and got the itch again. My trusty dusty nexus 6 is so much easier but it's also been around and has one system and a solid twrp for it.
Cheers! :good:
Click to expand...
Click to collapse
Sorry for the late reply, but yes this is for bypassing TWRP Decryption issues.

_Masked_ said:
Since a lot of people have had trouble flashing Custom ROMs, I decided to create a guide that should work on every device (whether A/B partition or not) except on Samsung devices.
GUIDE
I am assuming you have unlocked your Bootloader, flashed TWRP and have some knowledge on ADB.
[This is known as a clean install or clean flash]
Turn off Lockscreen Security
Reboot to Recovery
Format Data (Wipe)
Flash ROM and then the Recovery Installer (No Magisk after)
Reboot to Recovery
Go to Advanced, ADB Sideload then sideload GApps, the Recovery Installer and Magisk
Reboot to System
Profit
I recommend the Nano variant of GApps since I have had no error with it.
Enjoy
Click to expand...
Click to collapse
this step means need do with pc not by twrp

ayed78 said:
this step means need do with pc not by twrp
Click to expand...
Click to collapse
This is to bypass Decryption issues.

Ashwinrg said:
This flashing process is difficult in my view. Why are you making the simple custom rom flashing process so difficult for the noobs.
Click to expand...
Click to collapse
I mean I could make a tool for flashing a custom ROM but I'm sure that there's a tool for that already.

bump. (ignore)

_Masked_ said:
Turn off Lockscreen Security
Reboot to Recovery
Factory Reset
Format Data
Copy the .zip files from your PC to your phone / Plug in your USB OTG
Flash the ROM and then the Recovery Installer (No Magisk/SuperSU after)
Reboot to Recovery
Flash GApps and Magisk/SuperSU
Reboot to System
Click to expand...
Click to collapse
So when are we required to wipe system in addition to just a factory reset? And when do we need to format data?

Krullendhaar said:
So when are we required to wipe system in addition to just a factory reset? And when do we need to format data?
Click to expand...
Click to collapse
Just follow the steps, in order.

Hi.
What if I want to flash a custom kernel on a clean Rom flash? When should I do it? Together with Magisk and Gapps?

What do you mean by "Recovery Installer"? That's the only thing I don't understand.
Thank you for this guide.

Santi3598 said:
What do you mean by "Recovery Installer"? That's the only thing I don't understand.
Thank you for this guide.
Click to expand...
Click to collapse
Same here, I do not understand why I should flash a recovery img when twrp does seem to stay installed after flashing everything. Maybe the custom rom I use does include twrp ?

Custom rom means bugs, possible privacy leak and overall less polished. Developer that are working on them are fantastic but they are most of the time nowhere near as what offer the stock one.
What you need is to check adb, doesn't need root but you can still remove apps (even system one) and do more tweaks.
If needed, check how to patch boot image with magisk, it works on all phone and get you root.
With that, you're free to debloat your device.

Hey just one little question: is it ok to dirty flash with encrypted data folder ?

Santi3598 said:
What do you mean by "Recovery Installer"? That's the only thing I don't understand.
Click to expand...
Click to collapse
Me neither, is it safe to assume that the step can be left out if TWRP is already there and I use it to flash the ROM?
Santi3598 said:
Thank you for this guide.
Click to expand...
Click to collapse
+1

Related

[UMIDIGI F1] Project Treble?

EDIT: This is specifically for the Umidigi F1.
This is not my work, but I discovered this post in one of the hacking forums. I don't know how accurate it is yet (and given the publish date, I may be a fool), but I figured it was worth sharing.
https://forum.xda-developers.com/android/development/psa-project-treble-t3917284?nocache=1
LOL! Sorry man thats my thread I honestly didn't even realize yesterday was april fools! It's for real 100% legit .
That looks SO cool! Unfortunately I'm still struggling with TWRP as it simply cannot read anything (to be able to do step #9 on the OP). When I solve this, I'll post here as maybe it'll be good to update the steps
Well, in the end I was able to boot some SOs, but only after patching a different force encryption disable zip file (from here: https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389) but anyway, no custom ROM worked properly - I faced a huge amount of lag, crashes and sudden loss of input recognition. So, in the end I went back to stock Pie + Magisk to try solving the RAM issue this way. Thanks all!
Leo_Freitas said:
Well, in the end I was able to boot some SOs, but only after patching a different force encryption disable zip file (from here: https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389) but anyway, no custom ROM worked properly - I faced a huge amount of lag, crashes and sudden loss of input recognition. So, in the end I went back to stock Pie + Magisk to try solving the RAM issue this way. Thanks all!
Click to expand...
Click to collapse
Please tell me which ROMs did you try and what problems did you face ?
I tried the 3 mentioned in the OP:
Resurrection Remix
Descendant
Bliss ROM
But had no luck with them. Bliss seemed to be the best among them (at least I was able to boot from that haha) but after a reboot I got stuck on bootloop again (looks like the system could not see the OS anymore).
Leo_Freitas said:
I tried the 3 mentioned in the OP:
Resurrection Remix
Descendant
Bliss ROM
But had no luck with them. Bliss seemed to be the best among them (at least I was able to boot from that haha) but after a reboot I got stuck on bootloop again (looks like the system could not see the OS anymore).
Click to expand...
Click to collapse
That's a shame about the bootloop thank you for your post this helps me a lot.
Leo_Freitas said:
I tried the 3 mentioned in the OP:
Resurrection Remix
Descendant
Bliss ROM
But had no luck with them. Bliss seemed to be the best among them (at least I was able to boot from that haha) but after a reboot I got stuck on bootloop again (looks like the system could not see the OS anymore).
Click to expand...
Click to collapse
Maybe a A/B partition problem? Could maybe flash rom on both partition slots.
Leo_Freitas said:
I tried the 3 mentioned in the OP:
Resurrection Remix
Descendant
Bliss ROM
But had no luck with them. Bliss seemed to be the best among them (at least I was able to boot from that haha) but after a reboot I got stuck on bootloop again (looks like the system could not see the OS anymore).
Click to expand...
Click to collapse
A few questions:
1. How did you flash them? Did you use the SP Flash Tool?
2. After installing them, did you run the DM-Verity tool to disable encryption?
riceboyler said:
A few questions:
1. How did you flash them? Did you use the SP Flash Tool?
2. After installing them, did you run the DM-Verity tool to disable encryption?
Click to expand...
Click to collapse
hello
i bought Umidigi F1 Play for more than 1 months
and i test a lot of treble project (Havoc OS,Ressurection Remix,Blissrom,Lineage OS,Omnirom) all android 9 and it did boot up
so this my method to boot up
first :
-Unlock your Bootloader
-Download TWRP Recovery​- Download Any Rom You Want to try And copy it to internal memory as .img file
-Download Magisk
-Flash TWRP Using SP Flash Tool and go to Recovery
-Make a Backup For your System if something go Wrong
-Wipe Data, Cache, System, Dalvik Cache
-go to install, press Install Image , Select your Rom File , select System Image As the partition to Flash Image
-Swipe and Wait
-Back to install and Flash Magisk
- Reboot and Enjoy
for People using gapps there is a problem with twrp is doesnt support a/b so opengapps doesnt detect if the phone is a normal or a/b device but i manage to fix a temporary opengapps to work on our device waiting for the twrp developer to fix this bug
this is the working gapps https://drive.google.com/open?id=1-Dguq8rs4k4W7eZKA2KnJxB5fKXCw2Y-
Shadow Of Leaf said:
hello
i bought Umidigi F1 Play for more than 1 months
and i test a lot of treble project (Havoc OS,Ressurection Remix,Blissrom,Lineage OS,Omnirom) all android 9 and it did boot up
so this my method to boot up
first :
-Unlock your Bootloader
-Download TWRP Recovery​- Download Any Rom You Want to try And copy it to internal memory as .img file
-Download Magisk
-Flash TWRP Using SP Flash Tool and go to Recovery
-Make a Backup For your System if something go Wrong
-Wipe Data, Cache, System, Dalvik Cache
-go to install, press Install Image , Select your Rom File , select System Image As the partition to Flash Image
-Swipe and Wait
-Back to install and Flash Magisk
- Reboot and Enjoy
for People using gapps there is a problem with twrp is doesnt support a/b so opengapps doesnt detect if the phone is a normal or a/b device but i manage to fix a temporary opengapps to work on our device waiting for the twrp developer to fix this bug
this is the working gapps https://drive.google.com/open?id=1-Dguq8rs4k4W7eZKA2KnJxB5fKXCw2Y-
Click to expand...
Click to collapse
Boot and recovery only options i get in twrp

Sd card not used

Hello,
I am running PixysOS rom on my Honor 6X (BLN-AL20) since some months and I am actually satisfied of the stability and usability of the Rom.
Actually I can't convince the device to use the installed as card to store pictures, videos etc.
The SD card is recognised and listed under memory but the system is not using it.
Is there any workaround to fix this problem?
Thanks,
Andrea.
Sent from my BLN-AL20 using Tapatalk
Anybody out there?
Sent from my BLN-AL20 using Tapatalk
Sephiroth79 said:
Anybody out there?
Sent from my BLN-AL20 using Tapatalk
Click to expand...
Click to collapse
for me my internal storage is not detected. only sd card is main storage. seems like its a bug and never gonna fixed. there is no perfect android 9 os out there. so better go to emui 8 and use cyclox kernel.
Sephiroth79 said:
Hello,
I am running PixysOS rom on my Honor 6X (BLN-AL20) since some months and I am actually satisfied of the stability and usability of the Rom.
Actually I can't convince the device to use the installed as card to store pictures, videos etc.
The SD card is recognised and listed under memory but the system is not using it.
Is there any workaround to fix this problem?
Thanks,
Andrea.
Click to expand...
Click to collapse
By what I read in the thread of DotOS, that's a bug that should had be fixed in latest builds... Are you using latest version or not?
Anyway every Pie ROM/GSI I tried seems to read microSD, eject it and re-read once again immediately after booting to OS, on every single boot. Then, there are systems that keep reading the microSD (as AEX, Descendant...) and allows modifications, reading files, basically everything you should be able to do with a microSD, and systems that just keep it ejected (like DotOS did on old builds). Saw other users reporting that on the thread. Look for "microSD" in DotOS thread to read latest comments about, there you could find a solution. By how things sound at the moment, my only advice is to move on another system.
Thanks for your reply. Could you suggest me a proper and stable rom?
Sephiroth79 said:
Thanks for your reply. Could you suggest me a proper and stable rom?
Click to expand...
Click to collapse
Nothing hard to do man. We use to thank others with the appropriate button, for next times.
Anyway since that we're not talking 'bout different devices but we share the same phone, i feel to strongly recommend ya the Descendant GSI project by Dil3mm4.. It's a fork of Phh AOSP project but with sone very good extras. I never used a system smooth like this one, really impressive. It has a decent amount of customizations options (not at levels like RROS in example, but too much is too much IMHO), great battery management, fluid transitions and great compatibility with Huawei devices (it's a GSI, but the dev has a P8 Lite at the moment, so he knows how to make things working on Huawei).
Give it a shot, you can always go back to stock with HuRUpdater in just 5 minutes. And in case you'd like to try more, remember to take a look into Treble section here on XDA. Every arm64 a-only GSI is good to be flashed on our device, but before flashing just look if other users owning a Huawei device have already tried it or not. I say this simply because many GSIs are actually not working thanks to our vendor compatibility, so make things without hurry and nothing can go wrong
Used appropriate "thanks button" this time...eheh
Any tutorial on how to install the Descendant GSI rom starting from PixysOs with Askuccio's TWRP?
Sephiroth79 said:
Used appropriate "thanks button" this time...eheh
Any tutorial on how to install the Descendant GSI rom starting from PixysOs with Askuccio's TWRP?
Click to expand...
Click to collapse
Well there isn't a dedicated tutorial for every ROM/GSI you're starting from, overall because a clean flash is strongly recommended (especially when you switch from a ROM to a GSI) - you can dirty flash Descendant updates or other GSIs based on phhusson trees without problems, but in this case you've already modified your device kernel and other stuff with a custom ROM, so it's better to start from scratch in way to avoid useless wastes of time running to repairs with hurry.
The faster and safest way to do this is:
1) restore stock OS with HuRUpdater and let it boot (i saw that you already own Askuccio's TWRP, i always had to use Elemental TWRP from KingOfMezi in way to use HuRU without errors, but apart this Askuccio's TWRP works for flashing everything you'd need);
2) following steps listed in Descendant OP, flash the system image through fastboot or through TWRP, then reboot to TWRP once again and wipe ONLY /cache and /dalvikART partitions;
3) factory reset through stock recovery and let the system boot (yeah, you'll have to reflash stock recovery once again before reflashing TWRP - again.
4) flash all the rest you'd like to flash (GApps, Magisk, ecc.)
By default, /data partition remains encrypted after performing factory reset with stock recovery, and so with TWRP you won't be able to perform full backups, but you can also choose to run with /data decrypted. The method isn't supported by the developer, but works like a charm (personally tested about 3 versions of the GSI ago, worked). You just have to flash "disable dm verity" script during the process, but you can know more by reading about it here.
Happy flashing
RedSkull23 said:
Well there isn't a dedicated tutorial for every ROM/GSI you're starting from, overall because a clean flash is strongly recommended (especially when you switch from a ROM to a GSI) - you can dirty flash Descendant updates or other GSIs based on phhusson trees without problems, but in this case you've already modified your device kernel and other stuff with a custom ROM, so it's better to start from scratch in way to avoid useless wastes of time running to repairs with hurry.
The faster and safest way to do this is:
1) restore stock OS with HuRUpdater and let it boot (i saw that you already own Askuccio's TWRP, i always had to use Elemental TWRP from KingOfMezi in way to use HuRU without errors, but apart this Askuccio's TWRP works for flashing everything you'd need);
2) following steps listed in Descendant OP, flash the system image through fastboot or through TWRP, then reboot to TWRP once again and wipe ONLY /cache and /dalvikART partitions;
3) factory reset through stock recovery and let the system boot (yeah, you'll have to reflash stock recovery once again before reflashing TWRP - again.
4) flash all the rest you'd like to flash (GApps, Magisk, ecc.)
By default, /data partition remains encrypted after performing factory reset with stock recovery, and so with TWRP you won't be able to perform full backups, but you can also choose to run with /data decrypted. The method isn't supported by the developer, but works like a charm (personally tested about 3 versions of the GSI ago, worked). You just have to flash "disable dm verity" script during the process, but you can know more by reading about it here.
Happy flashing
Click to expand...
Click to collapse
Point 1: I have to download stock fw using Huawei firmware finder and I have to use Askuccio's TWRP to flash HuRupdater on the device. Do I have to choose a custom recovery or I have to let HuRupdater flash stock recovery too?
Point 2: you are saying I have to wipe cache/dalviw partitions using TWRP so I have to flash TWRP after flashing and booting stock fw?
Sephiroth79 said:
Point 1: I have to download stock fw using Huawei firmware finder and I have to use Askuccio's TWRP to flash HuRupdater on the device. Do I have to choose a custom recovery or I have to let HuRupdater flash stock recovery too?
Point 2: you are saying I have to wipe cache/dalviw partitions using TWRP so I have to flash TWRP after flashing and booting stock fw?
Click to expand...
Click to collapse
To me flashing HuRU with Askuccio TWRP never worked, as said above, so i'd suggest you to look for ElementalTWRP in way to have a custom recovery that can flash HuRU with no problems. Secondarily, in way to avoid confusion, just start from stock and do a fastboot flash of Descendant, reboot to OS and let it boot. Once set, flash TWRP and flash GApps, then wipe just /cache and /dalvik and reboot one last time. Then you can do anything you want.
RedSkull23 said:
To me flashing HuRU with Askuccio TWRP never worked, as said above, so i'd suggest you to look for ElementalTWRP in way to have a custom recovery that can flash HuRU with no problems. Secondarily, in way to avoid confusion, just start from stock and do a fastboot flash of Descendant, reboot to OS and let it boot. Once set, flash TWRP and flash GApps, then wipe just /cache and /dalvik and reboot one last time. Then you can do anything you want.
Click to expand...
Click to collapse
Ok, I'll put elemental TWRP recovery in the same directory in order to let HuRU flash it together with the stock firmware.
Edit: can't find elemental twrp download link
Sephiroth79 said:
Ok, I'll put elemental TWRP recovery in the same directory in order to let HuRU flash it together with the stock firmware.
Edit: can't find elemental twrp download link
Click to expand...
Click to collapse
Good, i usually do that later just in case the system prompts to factory reset before booting, but it's up to you. Here's the link anyway https://mega.nz/#!a81EDZAR!2-9yPFh3reghkGcfSl3nRIJhHGkP8fqDsgUG66ewjkk
Using fw finder I downloaded the fw named: BLN-AL30C00B541 (8.0.0.541) FULLOTA-MF 2018.12.27
Clicking on download give me some choices:
- update.zip (1.74 GB)
- BLN-Al20_all_cn/update_full_BLN-AL20_all_cn.zip (643 MB)
Already downloaded both of them and can't find any of the files required from HurUpdater to run. Do I have to use an extractor?
EditOne: used Huawei Update Extractor gives an error on the update.app extracted from the update.zip archive and works on the same file extracted from BLN-Al20_all_cn/update_full_BLN-AL20_all_cn.zip
Edit2: just realized I don't need to extract anything but still can't find update_data_public and update_all_hw files
That is because it's Chinese build and as you just noticed some update packages are assembled in a slightly different manner, so some package misses one if not two useful zips. Would you mind to switch to India variant? Nothing changes in performance nor in features, plus if you'd only use the firmware as a base to get to other ROMs/GSIs, it really doesn't matter (but i can offer better assistance since that i'm more experienced with India variant other than China). FYI in this thread https://forum.xda-developers.com/honor-6x/how-to/french-language-t3938592/ i've already guided an user to obtain India variant, but it's really simple:
in TEAM MT site (google for "team mt online firmware database", the first result you get is what you need), look for build "BLN-L22HNC675CUSTC675D1B510" - you'll obtain 4 results. Download the package dated 2018.07.19, it is the better one. From here you just have to follow instructions in HwOTA thread, renaming the three packages as suggested in OP and choosing to debrand during the process to BLN-L22 region/variant (don't remember if it happens anyway since that the firmware is India variant but it's a thing that doesn't give hassles).

TWRP problem / update

My OnePlus 7 Pro is rooted at 9.5.8 trying to update to 9.5.9
When i try to install OTA it removes TWRP as it would but i can't boot into the system again without booting into TWRP and switching back to slot A. And when i boot to the system settings say that update failed.
I've tried different update methods like
Install update (dont reboot) - Magisk install inactive slot
Download update zip with oxygen updater app - boot into recovery twrp - flash update zip
I rooted my phone a few days ago and for some reason it won't update and i'm stuck on 9.5.8
Slot b is also not readable. SDCARD shows 0mb
What I do is:
Download and install the update
Don't reboot
Then back out and go to magisk downloads
Search for twrp retention and install
Don't reboot
Then back out to magisk main screen and select the first install option
Then select install and then the 4th option ota install slot
Now reboot
Yayodroid said:
What I do is:
Download and install the update
Don't reboot
Then back out and go to magisk downloads
Search for twrp retention and install
Don't reboot
Then back out to magisk main screen and select the first install option
Then select install and then the 4th option ota install slot
Now reboot
Click to expand...
Click to collapse
Tried this too.
When I install oxygen update zip through TWRP and I reboot it goes over to slot b where I can't boot to the system and when I go back to slot a and boot to system update failed
First i disable all magisk modules then I download the full 2gb update, go into twrp, flash the update, flash twrp.zip then flash magisk.zip. Reboot and then re-enable the modules.
if you have Magisk module OOSNativeCallRecorder, you need to remove that module. If still issues then remove all modules.
Guide how to remove magisk modules via TWRP
equlizer said:
First i disable all magisk modules then I download the full 2gb update, go into twrp, flash the update, flash twrp.zip then flash magisk.zip. Reboot and then re-enable the modules.
Click to expand...
Click to collapse
This doesnt work. After flashing it reboots to slot b and update failed
Bradl79 said:
if you have Magisk module OOSNativeCallRecorder, you need to remove that module. If still issues then remove all modules.
Guide how to remove magisk modules via TWRP
Click to expand...
Click to collapse
Okay, this is weird
I chose to remove magisk, twrp and go back to stock with locked oem. Installed the new update perfectly fine. Then I regretted it. So I rooted my device again and set it up only to look under device info where it says that I now have 9.5.8. So basically my phone downgraded itself after rerooting and unlocking bootloader.
I'm now stuck in 9.5.8
PikachuLover said:
Okay, this is weird
I chose to remove magisk, twrp and go back to stock with locked oem. Installed the new update perfectly fine. Then I regretted it. So I rooted my device again and set it up only to look under device info where it says that I now have 9.5.8. So basically my phone downgraded itself after rerooting and unlocking bootloader.
I'm now stuck in 9.5.8
Click to expand...
Click to collapse
Probably switched back to old slot.
Bradl79 said:
Probably switched back to old slot.
Click to expand...
Click to collapse
So I should just try and flash the update, twrp and magisk in this order on the slot I am using now?
Having same problem. No work around?
The best way to update? Personally, I recommend taking full manual control of the update process. Use TWRP to update your ROM (that includes stock OOS) when you want to, and when you need to fix stuff.
- Flash ROM
If you are on slot A and flash a ROM, it goes to slot B.
- Flash TWRP installer zip
Keeps TWRP on both slots, patches boot.img
- Reboot to TWRP, not system
- Flash ROM again
This installs the ROM to the other slot, so now both slots are updated
- Flash TWRP installer zip again
Keeps TWRP on both slots, patches boot.img
- Flash Magisk
Patches the TWRP-patched ROM, allowing it to boot.
- Wipe dalvik
You can wipe data and dalvik instead for a clean flash
- Now reboot to system
Consider flashing BOTH slots (A and B) whenever you update OOS, for two reasons.
First, you don't have to keep track of which slot has which version of OOS should you flash a custom ROM or kernel with a specific version of OOS required as a base.
The second reason is more compelling: the way the data partition changes encryption every update has nearly obviated the reason for A/B slots, in that if newly updated B changes data encryption upon boot and then something happens, you cannot revert to A because A can't read the new data encryption. So the solution is to update both A and B at the same time so both slots use the same encryption and can both access the data partition.
Or like me, run the device decrypted (i. e. without forced encryption).
Good luck!
reaper000 said:
.
Or like me, run the device decrypted (i. e. without forced encryption).
Good luck!
Click to expand...
Click to collapse
I was actually going to do this permanently for better performance, I did test it out for a while and definitely noticed things faster, boot is quicker, battery lasted longer also.
I just hate all the work required to keep decrypt between updates.
I wish Google allowed us to choose whether we want encryption or not.
This maybe a silly question and the form trolls may come out. However ??, decrypting, will we have to do it to both slots? A and B? Or will twrp take care of decrypting both slots. Coming from a one plus 5 we didn't have to deal with this whole slot a and b. Boy what a headache.
virtyx said:
I was actually going to do this permanently for better performance, I did test it out for a while and definitely noticed things faster, boot is quicker, battery lasted longer also.
I just hate all the work required to keep decrypt between updates.
I wish Google allowed us to choose whether we want encryption or not.
Click to expand...
Click to collapse
I'm thing about decrypting, if you don't mind, can you let me know what you mean by all that work?
On the 5t, after decrypting, I just had to make sure to flash no verity script in twrp and that was all.
harpin14789 said:
I'm thing about decrypting, if you don't mind, can you let me know what you mean by all that work?
On the 5t, after decrypting, I just had to make sure to flash no verity script in twrp and that was all.
Click to expand...
Click to collapse
He likely means backing up and starting fresh. I hated that process on my oneplus 5 but after works it was great. This whole slot A and B, is a pesky little bugga.
Yayodroid said:
What I do is:
Download and install the update
Don't reboot
Then back out and go to magisk downloads
Search for twrp retention and install
Don't reboot
Then back out to magisk main screen and select the first install option
Then select install and then the 4th option ota install slot
Now reboot
Click to expand...
Click to collapse
This is what I did as well. Worked beautifully.
harpin14789 said:
I'm thing about decrypting, if you don't mind, can you let me know what you mean by all that work?
On the 5t, after decrypting, I just had to make sure to flash no verity script in twrp and that was all.
Click to expand...
Click to collapse
I manually decrypted
I don't know if the zip works on the 7 Pro
I'd update via twrp
Flash twrp
Flash magisk (after echo KEEPVERITY=FALSE > /data/.magisk)
ADB pull both fstab files in vendor/etc to my pc
And change fileencryption to encryptable and move back
I always kept the fstab files on my internal storage so I didn't need a PC but I always did just incase.
What happens if you have and F2FS formatted /data and
A custom kernel?
Thanks in advance
reaper000 said:
The best way to update? Personally, I recommend taking full manual control of the update process. Use TWRP to update your ROM (that includes stock OOS) when you want to, and when you need to fix stuff.
- Flash ROM
If you are on slot A and flash a ROM, it goes to slot B.
- Flash TWRP installer zip
Keeps TWRP on both slots, patches boot.img
- Reboot to TWRP, not system
- Flash ROM again
This installs the ROM to the other slot, so now both slots are updated
- Flash TWRP installer zip again
Keeps TWRP on both slots, patches boot.img
- Flash Magisk
Patches the TWRP-patched ROM, allowing it to boot.
- Wipe dalvik
You can wipe data and dalvik instead for a clean flash
- Now reboot to system
Consider flashing BOTH slots (A and B) whenever you update OOS, for two reasons.
First, you don't have to keep track of which slot has which version of OOS should you flash a custom ROM or kernel with a specific version of OOS required as a base.
The second reason is more compelling: the way the data partition changes encryption every update has nearly obviated the reason for A/B slots, in that if newly updated B changes data encryption upon boot and then something happens, you cannot revert to A because A can't read the new data encryption. So the solution is to update both A and B at the same time so both slots use the same encryption and can both access the data partition.
Or like me, run the device decrypted (i. e. without forced encryption).
Good luck!
Click to expand...
Click to collapse

A/B slot questions

I tend to mess things up when flashing new ROMs on my Oneplus6. And I usually end up using the MSMdownloadtool to 'fix my phone' again.
* Does MSMdownloadtool install OOS on both slots?
* What do you advise to do before installing a custom (v10) rom?
* I tried doing a fastboot OOS install by mauronofrio, it didnt work. I got into bootloops after running/finishing the flash all bat file. So I used MSMdownloadtool again. I wondered if the fastboot OOS installer guide by mauronofrio installs OOS on both slots??
* Does the fastboot OOS installer do the same thing as MSMdownloadtool?
* In a lot of guides for clean install custom rom I read as first step: wipe system/data. But then I wonder why do you have to install the correct OOS version first, THEN wipe it, and then install custom ROM. Does an OOS installation leave some hidden (essential) files/partitions behind or something?
* Do you guys switch slots in twrp / or do you reboot to switch slots / or do you use the fastboot --set-active a/b command?
* Why does gapps only have to be installed on 1 slot and not on both?
* Why don't custom ROMS install themselves on both slots straight away, like when you flash the twrp installer zip.. ?
Im currently running carbonROMv8 ROM, its running fine so Im not looking to change yet. But im sure im gonna have to use msmdowndtool again when I wanna try out some other ROM in the future. I dont really feel like im having any control off the flashing process. It either works or it doesnt and when it doesnt I cant explain why..
dumbl3 said:
I tend to mess things up when flashing new ROMs on my Oneplus6. And I usually end up using the MSMdownloadtool to 'fix my phone' again.
* Does MSMdownloadtool install OOS on both slots?
* What do you advise to do before installing a custom (v10) rom?
* I tried doing a fastboot OOS install by mauronofrio, it didnt work. I got into bootloops after running/finishing the flash all bat file. So I used MSMdownloadtool again. I wondered if the fastboot OOS installer guide by mauronofrio installs OOS on both slots??
* Does the fastboot OOS installer do the same thing as MSMdownloadtool?
* In a lot of guides for clean install custom rom I read as first step: wipe system/data. But then I wonder why do you have to install the correct OOS version first, THEN wipe it, and then install custom ROM. Does an OOS installation leave some hidden (essential) files/partitions behind or something?
* Do you guys switch slots in twrp / or do you reboot to switch slots / or do you use the fastboot --set-active a/b command?
* Why does gapps only have to be installed on 1 slot and not on both?
* Why don't custom ROMS install themselves on both slots straight away, like when you flash the twrp installer zip.. ?
Im currently running carbonROMv8 ROM, its running fine so Im not looking to change yet. But im sure im gonna have to use msmdowndtool again when I wanna try out some other ROM in the future. I dont really feel like im having any control off the flashing process. It either works or it doesnt and when it doesnt I cant explain why..
Click to expand...
Click to collapse
Yoo.. So Many Questions. Will try to explain in easiest way..
1. Yes. It Does Flash OOS in Both Slot via Qualcomm Download Mode which is mainly for Manufactures to restore Device..
2. Let me clear that Most people's who face issue in booting custom ROM have their data encrypted by previous or stock ROM.
Here is Link Thread to know how to decrypt your device..
https://forum.xda-developers.com/oneplus-6/how-to/tutorial-decrypt-flash-rom-pie-oreo-roms-t3838643
My own Instructions to Flash Custom ROM (Strictly for Decrypted Device):-
Boot Into Recovery
Wipe Cache, Data & System
Flash Latest Stable/Beta OOS10 & Recovery
Reboot Into Recovery(Ignore No OS Installed Warning)
Flash Latest Stable/Beta OOS10 & Recovery again
Reboot Into Recovery
Now flash Custom ROM + Recovery(If Not Included)
Reboot Into Recovery
Flash Gapps(If not included in ROM), Magisk & No-Verity zip(to keep Device dencrypted)
Reboot & Done
For Installing Update on Same Custom ROM :-
Download the Update
Reboot Into Recovery
Flash Update ZIP & Recovery
Reboot Into Recovery
Flash Gapps(If not included in ROM), Magisk & No-Verity zip(to keep Device dencrypted)
Reboot & Done
3. Fastboot Don't always work if You try to Upgrade/Downgrade Android Version as it won't flash Critical Partitions.. Meanwhile MSMDownload tool Use Download mode which is more powerful.
4. Nope. Both are Different AS both use different mode to flash ROM.
5. Clean install required while flashing new custom ROM because Not All ROM uses Same Base. Some uses Stable OOS or some uses Beta OOS... Now, your answer is in these two build Types...
In my Opinion, Custom ROM have nothing to do with your System partition but it most like to related to Vendor Partition... Both Stable & Beta OOS Have little difference in Vendor partition data..
When any dev Build Any ROM, he uses any one of those Build as base for which he tweak/fix bugs.. That's why always Use Dev specified OOS build for avoid Bootloop/bugs..
6. I prefer last option as it's more reliable..
7. It's like when you clean install any ROM.. When you install Any ZIP, It get installed in an Inactive Slot which make those ZIP data Allowed to use in Active slot..
But when you update ROM for 1st time, You install Gapps as well.. So i don't think you need to Install Gapps on 2nd Update as it already installed in both slots.
1st time when Clean installed & 2nd time when Updated 1st time...
8. It's Because how A/B Partition works... Any zip you flash get installed in inactive slot & this applies to both Stock OOS & Custom ROM...
That's why we have to flash OOS twice before flashing any custom ROM.. Which confirms you will have same Vendor partition regardless to your current slot so when you flash custom ROM it will get booted anyways even after an update..
Hope that's helpful.. Any question or help, you can DM or reply here..
Thanks for your reply. It clears a few things up I think. I got a few follow up questions.
I don't really feel comfortable walking around with a decrypted phone. I have already been pick-pocketed once and also lost two smartphones. I would say the chances are likely that also my OP6 is gonna get lost at some point. Having it decrypted would leave it very vulnerable for people trying to access my files.
* So lets say I decrypt my phone. Is it possible then to encrypt the phone again after I have flashed a new ROM (for example LineageOS 17.1)?
dumbl3 said:
Thanks for your reply. It clears a few things up I think. I got a few follow up questions.
I don't really feel comfortable walking around with a decrypted phone. I have already been pick-pocketed once and also lost two smartphones. I would say the chances are likely that also my OP6 is gonna get lost at some point. Having it decrypted would leave it very vulnerable for people trying to access my files.
* So lets say I decrypt my phone. Is it possible then to encrypt the phone again after I have flashed a new ROM (for example LineageOS 17.1)?
Click to expand...
Click to collapse
Well, In my Opinion Every Device is Vulnerable to Hackers.. Doesn't matter if it's bootloader is Locked or Unlocked...
Your device is more Vulnerable at the time you unlocked bootloader because after that you can execute advanced commands with fastboot.....
If your device have pin/pattern, Thief gone reset your device anyway to reset pass.. Eventually your data get wiped as well....
Well, you can encrypt your data but you might face issue while migrating to other ROM if you face any bug + decrypting your encrypted device again is time taking process if you have alot of data..
I mean there is difference between someone being able to reset/delete my data than someone being able to read my data. As far as I know a thief cannot just read my data after he has stolen my device which is encrypted with unlocked bootloader. Sure, he can connect it to his computer and fastboot delete my sh!t but I don't care I got backups of my most important data anyway, as long as he/she cannot just read my device data its fine by me. But how would I encrypt my device again after I installed, lets say, LineageOS 17.1?
dumbl3 said:
I mean there is difference between someone being able to reset/delete my data than someone being able to read my data. As far as I know a thief cannot just read my data after he has stolen my device which is encrypted with unlocked bootloader. Sure, he can connect it to his computer and fastboot delete my sh!t but I don't care I got backups of my most important data anyway, as long as he/she cannot just read my device data its fine by me. But how would I encrypt my device again after I installed, lets say, LineageOS 17.1?
Click to expand...
Click to collapse
you can.. But do it only if you gone use it for long term....
Not fine to waste your whole day transfer your date from mobile to PC then PC to mobile..

how to know if it's a bootloop?

hello i was upgrading from stock 9.0.7 to 9.0.9, my bootloader is unlocked and twrp is a permanent one, the phone is also rooted. i wiped system then flashed the 9.0.9 then flashed the 4.0.4 twrp, rebooted into twrp, flashed latest magisk, rebooted into twrp and then pressed reboot into system. the phone is encrypted. the booting animation has been on for 20-30 minutes at this point. is it a bootloop? why what did i do wrong? thanks
@seth wellington
Try formatting data them reboot system. That should get you booted up.
Never wipe system or vendor on these devices and always when flashing a rom flash TWRP installer zip or you won't have twrp because of where recovery is located which is same place as boot.img and it has to be installed when flashing a rom or update to a rom or it won't be present.
How I flash OOS on my once T-Mobile now converted international/global OnePlus 6t.
Boot TWRP
Flash OOS global 10.3.6
Flash TWRP installer
Flash finalize
Format data
Reboot system
How I install a rom on my converted OnePlus 6t. This installation process varies depending on whether or not whatever rom I'm installing comes with gapps and or TWRP and of course you don't want to install global OOS on another model device. Since I converted my T-Mobile OnePlus 6t using guide and msm tool I now use global or international OnePlus 6t roms, firmware... Example Pixel Experience rom installation:
Boot TWRP
Flash OOS 10.3.6 global from repo xda thread
Flash Pixel Experience rom
Flash TWRP installer zip
Flash finalize zip
Format data
Reboot system.
Start to set up device then at some point enable developer options and usb debugging and doable any lock screen and boot twrp and flash magisk for root and reboot system. That is how I install a rom that has gapps but not twrp included in rom zip. Finalize can he found with a quick search on xda. It copies firmware to other slot on your AB partition device so that you don't have to. Saves 5-6 minutes and works great.
Edit
What you could have done is just flash your updated OOS , flash TWRP installer zip, reboot recovery, flash magisk, reboot system. That's what I would have done updating OOS ..
Hope this helps.
Sent from my OnePlus6T using XDA Labs
flash713 said:
@seth wellington
Try formatting data them reboot system. That should get you booted up.
Never wipe system or vendor on these devices and always when flashing a rom flash TWRP installer zip or you won't have twrp because of where recovery is located which is same place as boot.img and it has to be installed when flashing a rom or update to a rom or it won't be present.
How I flash OOS on my once T-Mobile now converted international/global OnePlus 6t.
Boot TWRP
Flash OOS global 10.3.6
Flash TWRP installer
Flash finalize
Format data
Reboot system
How I install a rom on my converted OnePlus 6t. This installation process varies depending on whether or not whatever rom I'm installing comes with gapps and or TWRP and of course you don't want to install global OOS on another model device. Since I converted my T-Mobile OnePlus 6t using guide and msm tool I now use global or international OnePlus 6t roms, firmware... Example Pixel Experience rom installation:
Boot TWRP
Flash OOS 10.3.6 global from repo xda thread
Flash Pixel Experience rom
Flash TWRP installer zip
Flash finalize zip
Format data
Reboot system.
Start to set up device then at some point enable developer options and usb debugging and doable any lock screen and boot twrp and flash magisk for root and reboot system. That is how I install a rom that has gapps but not twrp included in rom zip. Finalize can he found with a quick search on xda. It copies firmware to other slot on your AB partition device so that you don't have to. Saves 5-6 minutes and works great.
Edit
What you could have done is just flash your updated OOS , flash TWRP installer zip, reboot recovery, flash magisk, reboot system. That's what I would have done updating OOS ..
Hope this helps.
Sent from my OnePlus6T using XDA Labs
Click to expand...
Click to collapse
Thank you very much for your reply. Unfortunately I couldn't wait for that long and I had to do something right then. After some attempts I also lost my twrp and was left without a functioning recovery, so I had to look for help and some people helped me go through unbricking through the msm tool.
The thing is i just really want to always flash clean so that the phone doesn't lag and works properly, I had no idea you shouldn't wipe system... The guide that I followed said that when updating oxygen manually you have to wipe system so I thought nothing would go wrong. I still don't know what caused a bootloop since that guide was a verified one. Thanks a lot for your help. So if I'm reading it correctly, you have to do the wipes after you've installed the system, not before?
seth wellington said:
Thank you very much for your reply. Unfortunately I couldn't wait for that long and I had to do something right then. After some attempts I also lost my twrp and was left without a functioning recovery, so I had to look for help and some people helped me go through unbricking through the msm tool.
The thing is i just really want to always flash clean so that the phone doesn't lag and works properly, I had no idea you shouldn't wipe system... The guide that I followed said that when updating oxygen manually you have to wipe system so I thought nothing would go wrong. I still don't know what caused a bootloop since that guide was a verified one. Thanks a lot for your help. So if I'm reading it correctly, you have to do the wipes after you've installed the system, not before?
Click to expand...
Click to collapse
Quit a few pretty well known developers here on xda (AOSiP op is one and there are more) say not to wipe system or vendor in their first posts of their custom rom threads. The way I describe how I install works 100% always and is the cleanest possible installation. Formatting data when installing a new rom at the end of install process does all the wiping needed to make sure nothing is left from the past and everything is clean. I used to wipe various partitions but on other devices. The install directions I use are originally from the PiXeN rom developers op. I've been flashing roms since the Nexus S days. Not saying that means anything other than I'm kinda old now. ? But that install process has never failed me once and I've flashed I'm sure hundreds of times on this device.. When I update i just flashing the updated rom over current and don't wipe anything then flashing twrp installer zip, reboot recovery flash magisk reboot system or if gapps are needed when I reboot recovery flash gapps..Unless it's a major OS update that's always worked for me.
Possibly not formatting data caused boot loop.. I know when going from OOS to AOSP rom format data is mandatory or it won't boot system.. I never flash magisk during initial flash. I always boot system first then at some point boot twrp and flash magisk. Try that next round and see if it turns out better. The whole AB partition deal made me feel like I was really old and retarded.
If I was updating OOS I would boot recovery, flash OOS, flash twrp installer zip reboot recovery, flash magisk, reboot system. Check out the finalize script xda thread. There are two here. The original person who made finalize has a thread and another user has another finalize thread. I believe in guides section of OnePlus 6t. With Android there are always more than a few ways to achieve something you know ... But what I post here is what I've been doing and I've flashed 400-500 times at least on this device.
Sent from my OnePlus6T using XDA Labs
@flash713
I totally trust you and respect anything you say and recommend me to do. Thanks a lot for all the instructions and clarification. I've been into android far less time than you — only since oneplus one. I'm extremely bad with tech but even with that phone j somehow managed to get bootloops or half-bricks ten times less than with the oneplus 6. And back then in 2015 I was way more enthusiastic: flashing twice a month loads and loads of roms. Of course it wasn't my personal achievement, I was still simply following detailed and carefully written instructions on forums on how to flash a particular rom in a particular way, but hey, at least I somehow managed it.
Now in this case I'm assuming it's the a/b partitions they've introduced that have completely changed the process and ways of flashing to the point that I stick to the guides and still get bootloops lol. That unbricking process was a huge stress for me, I don't think I'm going to touch anything in my phone for a while now. And I'm on the latest 10.3.6 oxygen so it's alright. Thank you for your help buddy
seth wellington said:
@flash713
I totally trust you and respect anything you say and recommend me to do. Thanks a lot for all the instructions and clarification. I've been into android far less time than you — only since oneplus one. I'm extremely bad with tech but even with that phone j somehow managed to get bootloops or half-bricks ten times less than with the oneplus 6. And back then in 2015 I was way more enthusiastic: flashing twice a month loads and loads of roms. Of course it wasn't my personal achievement, I was still simply following detailed and carefully written instructions on forums on how to flash a particular rom in a particular way, but hey, at least I somehow managed it.
Now in this case I'm assuming it's the a/b partitions they've introduced that have completely changed the process and ways of flashing to the point that I stick to the guides and still get bootloops lol. That unbricking process was a huge stress for me, I don't think I'm going to touch anything in my phone for a while now. And I'm on the latest 10.3.6 oxygen so it's alright. Thank you for your help buddy
Click to expand...
Click to collapse
Np. My real first name is Seth. Haha. Cool name btw. I just installed OOS 10.3.7 on my 6t. I was notified of the update yesterday via oxygen updater app from play store. Good handy app to have. I would have never known 10.3.7 was out or at least not so soon if it wasn't for that app. I believe it auto notified me too. I don't remember setting it up. Android has changed soooo much you know.. I love my OnePlus 6t though. Definitely one of my most favorite devices I've ever used. What's new today is gone at some point and replaced with "better.." lol. Not always better imo anyway. Glad I could help. Feel free to message me any time. Good day to you.

Categories

Resources