Question about A/B paritions, TWRP, flashing order and rebooting - OnePlus 6 Questions & Answers

I've read many threads about the A/B parition scheme and I'm not new to flashing so I do know how it works. But some things still confuse me:
1) Which is the correct flashing order for ROM/TWRP/Magisk/Open GApps/Kernel? Like this?
Clean: ROM & TWRP, reboot, Open GApps & Magisk & custom kernel, done?
Dirty: ROM & TWRP, reboot, Magisk & custom kernel, done?
So after a reboot Magisk and after that the custom kernel?
2) Why is it necessary to reboot after ROM & TWRP flash?
3) When is slot A and B switched? After every reboot or what triggers the switching mechanism?
4) AFAIK there is no firmware zip or something similar like with the OnePlus 5T am I correct? When I have OOS installed and want to switch to a custom ROM how should i format /data or internal storage or is this even necessary? Do they all use the same encryption? Do I need to flash the custom ROM twice or shall I wait for the first OTA update? Because that would mean I have to boot to TWRP, flash ROM & TWRP, reboot, flash Gapps, Magisk and custom ROM, reboot to the other slot and do the same?
5) Do I need to wipe internal storage when encrypted and switching ROMs or is it unaffected (so only wipe /data)?
6) Is there any way to know which partition is used when booting the ROM or only in TWRP?
Thanks in advance!

Macusercom said:
I've read many threads about the A/B parition scheme and I'm not new to flashing so I do know how it works. But some things still confuse me:
Click to expand...
Click to collapse
1. Follow instructions on the custom rom OP, but that order will usually work.
2. Rebooting makes sure you are on the active slot, which will change with a full OOS flash.
3. Only when flashing the full OOS package or installing an update through the update engine. Some roms might also switch the slot, though I am not familiar with which ones. Again, just be sure you follow the installation instructions for that rom.
4. Varies by rom. Normally not necessary to format unless rolling back to an earlier security patch.
6. There are apps like DevCheck that will show you which slot is active.

So if I’m on slot A and go to the recovery, flashing the ROM changes slot B and then triggers the switch so that rebooting to recovery results in me being at slot B. From there Gapps etc. if flashed on the same slot so tafter a reboot everything is done? Is that correct? Makes it more clear to me now.
Any issues or changes with keymaster aren’t an issue now? So switching between ROMs without wiping would be possible (although with some issues after boot) but it would boot? Or would you need to format /system, /data and internal storage?
Wiping internal storage never is recommended which makes me ask why? On the 5T a full wipe was required as different ROMs use different keymaster versions etc. Was kinda a bit annoying.

Related

Get rid of Stock ROM's encryption

Hey guys just want to know if there's a way to avoid samsung encrypting the internal storage. I know there's the no-verity-opt-encrypt but I read even if I flash that and proceed to root with magisk the internal storage will be encrypted anyways. I'd like to have it encryption free with magisk without having to go for a custom rom. Is that possible?
soarespt said:
Hey guys just want to know if there's a way to avoid samsung encrypting the internal storage. I know there's the no-verity-opt-encrypt but I read even if I flash that and proceed to root with magisk the internal storage will be encrypted anyways. I'd like to have it encryption free with magisk without having to go for a custom rom. Is that possible?
Click to expand...
Click to collapse
You cannot i'm afraid it's part of the stock image, the applicable files are weaved throughout the stock firmware, no one has been able to break Samsungs encryption on a stock image or turn it off.
Wiping internal storage is the only way to get rid of it, Hence the TWRP method of wiping internal storage then flashing a custom Rom.
Yeah last time I formated data, got magisk installed right away. But of course months later I want to install some module and get the can't mount data error. So that means i'd have to "format data" on twrp and get magisk and the module installed before the first boot, right?
soarespt said:
Yeah last time I formated data, got magisk installed right away. But of course months later I want to install some module and get the can't mount data error. So that means i'd have to "format data" on twrp and get magisk and the module installed before the first boot, right?
Click to expand...
Click to collapse
Possibly but if i remember correctly there's a modified version of TWRP which can handle the encrypted internal storage they way you want.
https://forum.xda-developers.com/showpost.php?p=77296102&postcount=1243
cooltt said:
Possibly but if i remember correctly there's a modified version of TWRP which can handle the encrypted internal storage they way you want.
https://forum.xda-developers.com/showpost.php?p=77296102&postcount=1243
Click to expand...
Click to collapse
Tried to install that one but yeah still can't mount data. Edit: Well not sure if it was the twrp change or so but now managed to be able to install the module but from magisk itself. Thanks!

Install OS with full wipe over magisk and modified boot

If I want to run the August os with full wipe, is there any reason to unroot or re-install stock boot before running the .bat? I want a complete return to stock and new set-up. Before Pixel/Pie, this was never an issue but wanted to be sure
Nope, when flashing the stock factory image with the "flash-all.bat" it automatically wipes everything (even the internal storage), and then it flashes the all stock system.
No need to do it manually since it does that itself.
Tenn3r is spot on.
Just to reinforce what he said however, you will loose ALL data on the "SD card" if you run the full install. Make sure you copy anything you want to keep to another device prior to wiping. I'm use to running phones with a physical SD card and you could wipe the main memory/drive without effecting the SD card. But since the Pixels don't have a physical SD card, that space is on the main memory/drive and it does get wiped.
Thank you both. I'm aware of what a full wipe does but the warnings are always applicable. This dual slot thing on Pie is new for me (owned most Nexus devices from GNex on) as is Magisk.
I've been having issues that I want to make sure do not relate to "stuff" I have done or installed. Safe Mode hasn't provided me with any clues so waited for this Aug update to wipe.

Issue with Havoc ROM installation

Guys, having a lot of trouble getting the Havoc ROM on my device. I am new to this slot A/B thing so please bear with me. I am coming from OOS 9.5.13 with unofficial twrp 3.3.1-70. Active slot is B. I rebooted to recovery, it asked me for my password, entered password, wipe data, flash rom, flash twrp installer, and when I reboot recovery I can't access my sd storage!! I see a 0 folder with random folders inside. So I figured TWRP is unable to decrypt the other slot. I start from scratch, i.e, format data and let it boot, strangely OOS boots with again like a fresh install To prevent encryption again, I don't go throught the setup, reboot to bootloader, then select recovery, inside twrp again (note: wasn't asked for password this time; I assumed because I didn't go through the OOS initial setup (no PIN etc) the storage in currently decrypted), connect to PC for transferring ROM back onto the phone again, disconnect from PC, wipe data, flash rom, flash installer, revoot recovery, reboots to slot A, and AGAIN no access to the SD card contents (folder 0 with random folders inside again). So my questions are:
1) Can someone please explain to me what's going on...?
2) Is there a way to permanently disable encryption on the device? (no-verity, etc)
3) Can I read something to get up to speed with this two slot thing and how things are supposed to work with OnePlus devices (was a long time Samsung user)
I am terribly frustrated with this; I have gone through this process a ridiculous number of times. I have fastboot flashed stock OOS several times. Even did the MSMTool to get back to as-stock-as-possible (somehow frying my SIM in the process, which I also suspect has something to do with Magisk modules). I am absolutely loosing my marbles over this.. Someone please help me!!
My device is retail Indian unlocked OP7P.
Why are you so hellbent on disabling encryption?
Format data, install rom over adb sideload, boot the rom, profit?

So many years on forum, still many times i manage to brick/bootloop my phone.. Help!

I need some explanation to make things clear..
1) First and most important. If you want to make a clean install, what you have to wipe? Should you format data also, and why? Format data affects system? Can you format data and still boot into rom? When you format/wipe all, is there something left in the phone? If no, then why still i can see in mount settings, that the folders still have Mb/Gb inside them? What are they? I guess you can';t delete everything from the phone? For example now i am stuck on custom animation bootloop. So there is still data left.
2) Format data make your encrypted or decrypted? Or just removes all encryption and if a) you install a rom you go automatically encrypted, b) you install a rom and flash no_verity you go decrypted?
3) If i go decrypted, the only way to go encypted is to install stock OS and why?
4) When is necessary to have the stock rom flashed in order to flash custom rom afterwards? If you want to install a different android version from the one that you have? Any other reason? Is it necessary to install the whole stock image, or just enough to install firmware + radio?
5) If you wipe/format all, the phone has some firmware,radio,vendor etc stored inside or it's empty 100%?
6) Is it 100% safe to install a TWRP through TWRP?
And now let's say the problem i had. But i think i know where was the problem.. I had installed android pie + xXx no_limits on my oneplus5 and i was decrypted. Some months later i decided to try something else, so i installed an AOSP android 10 version. I just wipe/format system,data,dalvik,cache then flashed rom, gapps, magisk. But i had some bugs on this version, lags and huge battery drain. Also whenever i was booting into TWRP it moved me on Mount --> Decrypt screen.. And i don't know why?
Now that i try to figure i know that the problem was i install a custom android 10 rom, without first installing the android 10 stock rom? In order to get the proper firmware etc? Or what? The instructions for installing the rom are the following, which i followed them 100% :
NOTE:
WE ARE ENCRYPTED (FILE BASED FORCED ENCRYPTION). So if you are unencrypted format data partition or use any no_verity solution you want. We don't support it.
1. Download the ROM and GApps and transfer them to your device.
2. Boot to recovery (TWRP recommended). Bluspark twrp recovery recommended.
3. Wipe the System, Cache, and Data (you might need to format the data partition in some cases!).
4. Flash firmware. Actual one is 9.0.11. Download.
5. Flash the ROM Zipfile.
6. Reboot to TWRP recovery.
7. Flash the GApps (optional, needed for e.g. Google Playstore to work) and Magisk (optional too if you want a root solution).
8. Reboot and set up your device.
Click to expand...
Click to collapse
The ROM should contain everything you need to enjoy Android Q. You don't need to install any Add-ons, simply download the latest ROM and GApps, then follow the flashing instructions and go!
If you want the device to run the ROM "rooted", you can flash a root solution of your choice after the ROM Zipfile.
It is STRONGLY recommended to fully wipe your device before flashing and please avoid restoring system apps and system data with Titanium Backup (or with any backup/restore app) as this can cause stability issues that are very hard to debug, restoring regular apps is fine though.
Click to expand...
Click to collapse
The only system app i restored was the Vanced youtube, but i don't this is the source of my problems.
Thanks in advance!
Guys i think i cleared some things on my mind..
When you install a rom you go encrypted. So you have to FORMAT data RIGHT AFTER installing the rom and then flashing no_verity? Am i right? When you format data do you lose Magisk also?
lazostat said:
I need some explanation to make things clear..
1) First and most important. If you want to make a clean install, what you have to wipe? Should you format data also, and why? Format data affects system? Can you format data and still boot into rom? When you format/wipe all, is there something left in the phone? If no, then why still i can see in mount settings, that the folders still have Mb/Gb inside them? What are they? I guess you can';t delete everything from the phone? For example now i am stuck on custom animation bootloop. So there is still data left.
2) Format data make your encrypted or decrypted? Or just removes all encryption and if a) you install a rom you go automatically encrypted, b) you install a rom and flash no_verity you go decrypted?
3) If i go decrypted, the only way to go encypted is to install stock OS and why?
4) When is necessary to have the stock rom flashed in order to flash custom rom afterwards? If you want to install a different android version from the one that you have? Any other reason? Is it necessary to install the whole stock image, or just enough to install firmware + radio?
5) If you wipe/format all, the phone has some firmware,radio,vendor etc stored inside or it's empty 100%?
6) Is it 100% safe to install a TWRP through TWRP?
And now let's say the problem i had. But i think i know where was the problem.. I had installed android pie + xXx no_limits on my oneplus5 and i was decrypted. Some months later i decided to try something else, so i installed an AOSP android 10 version. I just wipe/format system,data,dalvik,cache then flashed rom, gapps, magisk. But i had some bugs on this version, lags and huge battery drain. Also whenever i was booting into TWRP it moved me on Mount --> Decrypt screen.. And i don't know why?
Now that i try to figure i know that the problem was i install a custom android 10 rom, without first installing the android 10 stock rom? In order to get the proper firmware etc? Or what? The instructions for installing the rom are the following, which i followed them 100% :
The only system app i restored was the Vanced youtube, but i don't this is the source of my problems. Formatting data does not effect system in most cases.
Thanks in advance!
Click to expand...
Click to collapse
1) a clean install involves wiping system, data, cache and dalvik cache. All of these partitions must be wiped in order to remove data things that might conflict with the new software that you intend to flash. Yes, you can wipe data and still boot into your ROM. Yes, there are things still on the phone even after wiping the device, but, the things left behind are in partitions that are separate from what you can actually wipe, these other, separate partitions contain all the other stuff that is essential for your device to be able to function. These parts have nothing to do with the ROM that you are using and have nothing to do with what you have installed in your data partition. TWRP does not wipe /data/media partition(internal storage), /data/media is where your personal user data is stored, such as, photos, videos, downloaded files, data from apps such as games, etc. Basically, /data/media contains things that you have stored that are not apps. Your internal storage will still have all the files and folders that were there before you did the wipe. If you want to wipe internal storage, you have to specifically select your internal storage when you use TWRP to wipe the device, it will not wipe internal storage by default. If you still have a custom animation even after wiping the device, it is probably because the boot animation is in your system partition, that can only be removed by selecting the /system partition when using TWRP to wipe the device.
2) Formatting data "should" remove encryption. No, flashing a new ROM after removing encryption will not encrypt the device again unless you specifically choose to encrypt the device in its settings. Flashing no verity only eliminates issues involved with rooting a device and getting root to actually work without corrupting the device.
3)I'm not sure but I think you can encrypt a device without using stock.
4) It depends on which device you have, what your current firmware version is and what you are trying to flash. Some devices require a certain firmware to be installed before flashing certain custom ROMs but it is a case by case scenario. There is no specific answer to this, there is only the question of whether your specific device requires this or a question of whether the custom ROM that you are trying to flash requires this. This is best answered by reading the thread where the ROM is posted, if your device requires installing a certain stock firmware before flashing the custom ROM, it will tell you that somewhere in the thread for that ROM. Whether you need to install the entire firmware or just parts of the firmware also depends on which device you are using in some cases, you might only need the modem or only the bootloader or maybe both, or maybe none, or maybe the complete firmware.
5) As I stated above, there are partitions on the device that do not get wiped when using TWRP to wipe the device. If it wiped EVERYTHING, the device would no longer function at all, it wouldn't be able to power on, it wouldn't be able to boot into any of its modes and you wouldn't be able to flash anything at all on the device, not even it's original stock firmware. There are software elements that MUST remain on the device in order for it to continue to function.
6) It is perfectly safe to use your existing version of TWRP to flash another TWRP version, assuming the new TWRP is also built for your specific model number.
If you have installed a custom ROM and you are having issues, you need to go to the thread where you got the ROM and post your issues/questions there. The users there will know more about your device and what you actually need to do and the developer may also need to fix things in their ROM to solve the issues that you are experiencing.
Sent from my SM-S767VL using Tapatalk

Unable to install/update apps to internal storage

Hi all,
In my quest to breathe more life into my OP6, I've decided to install TWRP and Magisk. Once doing so, it seems that I cannot install apps or update some already preloaded apps - I get an error message saying that the app can't be downloaded and I need to install to a SD card or external USB storage.
The exact error reads: App requires external storage. (insert app name) can't be downloaded. Insert an SD card or USB storage with sufficient storage, and try again.
I tried to Google a solution but didn't really find anything. I've already tried to do a wipe with TWRP and reflashed the recovery and Magisk but am still getting the same error. Maybe I'm doing something wrong or missing a setting.
Any help would be appreciated. I'd like to stick to OOS but am not opposed to another ROM.
Currently on OOS 10.3.4, TWRP 3.4.0, and Magisk 20.4. Thanks.
Same here.
semdoc said:
Same here.
Click to expand...
Click to collapse
Finally got it to fix itself after several system and dalvik wipes. Hope that works for you too. Also had to re-flash Magisk after every wipe.
Well... Here is the solution:
Download stock ROM ( 10.3.2 or higher). Download latest TWRP.zip from @mauronofrio - Link HERE
Then.
1. Boot to TWRP recovery
2. Format data.. (say yes when it's asked)
3. reboot to recovery
4. Move Stock ROM and downloaded TWRP to your internal sdcard.
5. Flash Stock ROM.zip + TWRP.zip -> reboot to recovery -> Flash Stock ROM.
6. Boot to Stock recovery
7. erase everything in your internal SD card. (Trivial part)
8. Boot to System and set your device.
Voila.
After this... You can flash TWRP and Magisk as it's recommended in several guides for enchilada....
That worked for me.
Cheerz
xeks said:
Hi all,
In my quest to breathe more life into my OP6, I've decided to install TWRP and Magisk. Once doing so, it seems that I cannot install apps or update some already preloaded apps - I get an error message saying that the app can't be downloaded and I need to install to a SD card or external USB storage.
The exact error reads: App requires external storage. (insert app name) can't be downloaded. Insert an SD card or USB storage with sufficient storage, and try again.
I tried to Google a solution but didn't really find anything. I've already tried to do a wipe with TWRP and reflashed the recovery and Magisk but am still getting the same error. Maybe I'm doing something wrong or missing a setting.
Any help would be appreciated. I'd like to stick to OOS but am not opposed to another ROM.
Currently on OOS 10.3.4, TWRP 3.4.0, and Magisk 20.4. Thanks.
Click to expand...
Click to collapse
same problem in my one plus 5 and i did these simple steps and the problem was fixed
1 open settings
2 about phone
3 tap 5/6 times until you are a developer message pop up
4 go back from about phone and go to system
5 you see developer option then open it
6 scroll down until you see (force allow apps on external) and turn on
hope these steps fixed your problem too...

Categories

Resources