yashsingh1/xdaforums huggingface dataset:
[OnePlus 7 & 7 Pro Cross Device Development] :
```

Disk /dev/block/sda: 61409280 sectors, 234.3 GiB

Logical sector size: 4096 bytes

Disk identifier (GUID): 527510EF-9E76-B6B8-B82D-6CD8B740E019

Partition table holds up to 32 entries

First usable sector is 6, last usable sector is 61409274

Partitions will be aligned on 2-sector boundaries

Total free space is 0 sectors (0 bytes)

Number Start (sector) End (sector) Size Code Name

1 6 7 8.0 KiB FFFF ssd

2 8 8199 32.0 MiB FFFF persist

3 8200 8455 1024.0 KiB FFFF misc

4 8456 8711 1024.0 KiB FFFF param

5 8712 8839 512.0 KiB FFFF keystore

6 8840 8967 512.0 KiB FFFF frp

7 8968 74503 256.0 MiB FFFF op2

8 74504 77063 10.0 MiB FFFF oem_dycnvbk

9 77064 79623 10.0 MiB FFFF oem_stanvbk

10 79624 79879 1024.0 KiB FFFF mdm_oem_dycnvbk

11 79880 80135 1024.0 KiB FFFF mdm_oem_stanvbk

12 80136 80263 512.0 KiB FFFF config

13 80264 969095 3.4 GiB FFFF system_a

14 969096 1857927 3.4 GiB FFFF system_b

15 1857928 1883527 100.0 MiB FFFF odm_a

16 1883528 1909127 100.0 MiB FFFF odm_b

17 1909128 1913223 16.0 MiB FFFF metadata

18 1913224 1945991 128.0 MiB FFFF rawdump

19 1945992 61409274 226.8 GiB FFFF userdata

```

This is the output, will this work?
[OnePlus 7 & 7 Pro Cross Device Development] Zackptg5:
Which device is that? That looks identical to my op7pro so it'll work fine
[OnePlus 7 & 7 Pro Cross Device Development] AndroidRooterKev:
Not sure if I'm doing something wrong, but I'm following the instructions and it seems that I can boot into the custom ROM, but I'm having issues trying to boot into the OOS in the other slot.

What I've done:

> Formatted data to start fresh

> Installed your modified 3.3.1-79 TWRP (a/b/c layout to have the CommonData partition)

> Installed OOS 10.3.1 zip (which I believe goes to both slots)

> Then installed custom ROM + opengapps and confirmed I can boot into the custom ROM system successfully.

> However, when I switch to the other slot, it still has my original 3.3.1-76 TWRP and I can't seem to boot into OOS.

OP7Pro is my device.
[OnePlus 7 & 7 Pro Cross Device Development] mjb337:
For instance my current slot on my (OP7P) is set to (B) - in order to flash another rom to the inactive slot (A) should I format inactive slot (A) before flashing??? If so will formatting slot (A) also format slot (B) ?????
[OnePlus 7 & 7 Pro Cross Device Development] AndroidRooterKev:
Changed a few things:

> Formatted data.

> Flashed the 3.3.1-79 TWRP from mauronofrio's TWRP thread (this successfully made sure that I have 3.3.1-79 TWRP in both slots now).

> Ran the dualboot TWRP and selected a/b/c layout & disabled force encryption.

> Flashed custom ROM + opengapps.

I can successfully run the custom ROM when booting into slot B. However, I'm still having an issue getting into OOS when booting into slot A... just seems to boot forever.

UPDATE:

Tried changing the kernel to permissive using the mod in the OP, but OOS is still not booting up. Will continue trying...
[OnePlus 7 & 7 Pro Cross Device Development] Kris Chen:
Why don't you upgrade your original TWRP into 3.3.1.79 ? This mod is base on TWRP 3.3.1.79
[OnePlus 7 & 7 Pro Cross Device Development] mjb337:
May I ask which recovery to flash after rom??? Do I flash the regular (twrp 3.3.1-79) or the dual boot (twrp 3.3.1-79) ??? Reason I ask is because reflashing through (adb sideload) only takes me through the same procedure???
[OnePlus 7 & 7 Pro Cross Device Development] Zackptg5:
Always this one. Just choose keep layout at the beginning
[OnePlus 7 & 7 Pro Cross Device Development] Zackptg5:
Just updated the OP with current issues which is currently the one involving lockscreen settings messing with the other slot somehow. I haven't had the chance to look into this yet but I have a workaround in the OP under it for now
[OnePlus 7 & 7 Pro Cross Device Development] AndroidRooterKev:
Cool thanks
[OnePlus 7 & 7 Pro Cross Device Development] vitaly51370:
TWRP uses the bootctl-utility to manage boot slots. Take the utility from the downloaded zip-archive and put in /system/bin, set permissions 755

Install the “Terminal Shortcut Pro” application to create a reboot shortcut in another ROM:

NEW>Local Android/Linux shell>Edit>Save>long tap "New shortcut">Launcher shortcut

All these actions also do in another ROM.

comment: digits in the Command indicate the name of the slot: 0 is A, 1 is B
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Cool. Thanks for that. I just tried that but nothing is happening when executing it then.

Not sure what I missed here now.
[OnePlus 7 & 7 Pro Cross Device Development] vitaly51370:
Did you write the command correctly? Note that there must be a reverse apostrophe:
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Yes I did. Hmmm strange.

EDIT: Now it works. I just removed and re-did the shortcut and command. Thanks a lot this is really useful. :)
[OnePlus 7 & 7 Pro Cross Device Development] oscarmaldonado:
It works really well. Thanks for sharing bud and stay safe.
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
rom switcher module

Hi all

Thanks to [MENTION=7460017]vitaly51370[/MENTION] we now can switch ROM without the need to reboot to TWRP first.

I made a simple GUI with Tasker App Factory and bundled this with the bootctl utility in a Magisk module.

This simplifies the setting up process of the shortcut after installing a new ROM and you wont switch rom by an accidental click on the shortcut, since its a app now.

Because I made the app with Tasker App Factory, there is no source, but I have added the Tasker project from which you can built the app yourself with app factory.
[OnePlus 7 & 7 Pro Cross Device Development] rejectedjs:
I guess I just can't have any luck with this mod unfortunately. I went a/b/c, forced encryption on B but not A. I installed MIUI 12 on A just fine, but when I tried to boot Paranoid Android on B, it was stuck on the boot logo. I wiped and installed Resurrection Remix to B, it didn't even get to the boot logo. I installed OOS on B, and it's stuck on the boot logo. I don't even know what I could have possibly done wrong, but I don't want to give up. Any help?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Have you done a Format Data on slot B which is not booting now?
[OnePlus 7 & 7 Pro Cross Device Development] rejectedjs:
I actually figured out the issue shortly after (I think). Apparently the MIUI 12 rom (currently, developer says will change in an upcoming update) patches both A and B slots, which can brick dualbooting. That makes sense, but I guess it only makes sense to me assuming that you would install MIUI AFTER another rom? I mean, if I install MIUI to A, it then presumably does A and B, but then I install another ROM to B, then shouldn't MIUI have nothing to do with B at that point?

It's probably a really ignorant question considering I don't know how ROMs install themselves anyway lol.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Ahh OK. So you mean the MIUI Port or? I guess that has an own flasher and can not be flashed via TWRP.
[OnePlus 7 & 7 Pro Cross Device Development] muphetz:
I used miui rom with oos 10 stable all work good,,commondata,mount work good too,,,just disable encryption both slot
[OnePlus 7 & 7 Pro Cross Device Development] slothdabski:
[MENTION=6037748]Zackptg5[/MENTION]

One of my ROMs won't mount common storage unless I am permissive.

Should the dual boot twrp be patching sepolicy so this isn't an issue?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Hi. Is it even the case if you re-flash the Dualboot-TRWP from the data partition of that ROM where it is not mounting common Storage?
[OnePlus 7 & 7 Pro Cross Device Development] slothdabski:
Yes, I have tried multiple times as I have noticed that is sometimes necessary
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
OK good. Just wanted to mention that.

That has always helped for me when I had issues with Common data not mounted in a ROM.

Which ROM is it which will not mount Common Data?
[OnePlus 7 & 7 Pro Cross Device Development] slothdabski:
PixelDust CAF. Personal builds, attempting to do bring up for our device.
[OnePlus 7 & 7 Pro Cross Device Development] slothdabski:
I found the selinux denial, should be an easy fix now :)

07-24 09:15:20.222 3518 3518 W mount : type=1400 audit(0.0:374): avc: denied { mounton } for path="/datacommon" dev="sda13" ino=146018 scontext=u:r:shell:s0 tcontext=u:object_r:media_rw_data_file:s0 tclass=dir permissive=0
[OnePlus 7 & 7 Pro Cross Device Development] Ae3NerdGod:
Ok, so when you install a rom from slot _A it automatically switches the next boot to slot _B

If you use the failsafe, it will reverse that BEFORE flashing the dualboot. Meaning it will set the next boot BACK to slot A, and avoid having to use fastboot switching back to _A all together

So assuming slot A s recovery is still functional, which it should be, you'll be able to reboot back into it.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Thank you.
[OnePlus 7 & 7 Pro Cross Device Development] ele95:
hi guys , i have a b c layout (A is PA and B is OOS beta ) and i want to know is it possible to have spotify data for both rom , now i need to donwload the data for both roms
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
I have been trying to link app data to the data common partition, but failed. I believe that's because I don't know what I'm doing, not because it's not possible.

I would also appreciate any help on how to do this.
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
Hi all. I will try dual boot tomorrow. Can someone confirm whether these steps are correct?

Factory reset from twrp.

Boot "dual boot twrp."

Flash OOS on a slot, flash dual boot twrp, reboot recovery.

Format data

Flash custom rom on b slot, flash dual boot twrp, reboot recovery.

Format data

Install gapps on b slot

Reboot system.

Thanks for your's replies
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
You have to boot to normal TWRP before flashing the dualboot TWRP the first time.

And keep in mind that when flashing ROMs these will flash to the opposite slot.

So flashing a ROM from slot a will flash the ROM to slot b.

You should leave one slot unencrypted (or both if you want) and dont set a PIN/password on one of the slots.
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
I'm new to the dual boot thing, I just installed the dual boot zip. I have Stock OOS in slot B, but I want to install RR Rom in Slot A. Do a switch to Slot A first before installing or just stay on B and it will automatically switch to A ?
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Not boot dual boot TWRP, but flash dual boot TWRP.

Don't worry about factory reset, everything will be erased in the repartitioning/formatting in the next steps. Although it won't hurt to do it anyway ;)
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
You stay on slot B and when flashing the ROM it will flash to slot A.
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
Thanks. If i want to change one of rom, should i format data again?

i mean i am using oos and LineageOS but i want to use oos and RR. Should i format data?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Yes when you change ROM you need to Format Data again.
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
so all data of 2 roms will be wiped again?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Only of the ROM/slot where you installed a new ROM. The other slot/ROM will stay as it was.
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Yes but only the data slot of that ROM, the data of the other slot and common data will stay untouched.
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
Ok thanks. But now my question is this,

If I wipe data in order to install new Rom, assuming that I made a backup of my existing Rom, can I go back to slot B and restore ? Or how would I go back to my existing Rom if I had already wipe the data ? It's kinda confusing in some way but I just wanna make sure it's possible to have both ROMs without wiping data on one of them Everytime I Wanna switch. Thx again in advance.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
If you have wiped data on one ROM/slot in order to install another ROM on that you can not just go back to the old one you had on that slot before so you have to flash it again after doing a wipe/format data on that slot.

FYI And here you can download the Dualboot TWRP which is updated with the new TWRP 3.4.0.0 !

Also here you can download the modified Dualboot-TWRP made by [MENTION=5839251]Ae3NerdGod[/MENTION] which I have updated with the new TWRP 3.4.0.0 as well.

Take a look at the updated readme by [MENTION=5839251]Ae3NerdGod[/MENTION] here to see how it works with the adjusted dualboot with these settings.

So with that you can adjust the dualboot-TWRP zip file at your needs so that you dont need to go through all the options of the dualboot again when flashing it after for example and update of the ROM etc since after all those actions you need to reflash the dualboot zip again!

And if you want to switch your ROMS without the need to reboot to TWRP and switch slots you can find some

useful guides/Tools for that made by [MENTION=7460017]vitaly51370[/MENTION] and [MENTION=5993745]JudgeDread11[/MENTION] on this page.
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
Thank you mate, I already installed the new TWRP dual boot zip. 3.4.0. I did the installation yesterday but didn't modify the partitions. I left it untouched, does that have to be modify in order to have dual boot or it doesn't matter?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Yes you need to repartition to A/B/C Layout with the dualboot TWRP in order to install ROMS on both slots A and B for dualboot.
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
Got it thanks brother. ?
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
Okay then, that's good as it should be. Thanks guys
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
I'm able to switch between Roms with ease, but I can't login in one of them. What can I do in this case.? I'm entering my password right but it does not seem to recognize it. Is there a walk around using a terminal code ?
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Seems you did set up a password/PIN on both ROMS ??

That will not work as mentioned in the OPs restrictions readme.

If you have one slot unencrypted you need to delete the password/pattern files.

If you have it encrypted you have to format data on that slot and reinstall the ROM.
[OnePlus 7 & 7 Pro Cross Device Development] Danhack000:
Im running MIUI 12 and set up is a bit different. . I saw a few posts back how someone had the same issue I was having. I just did it and got fixed ?
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Read the read me on GitHub, looked in the op.

I believe it says something like important or must read or something in that general meaning.
[OnePlus 7 & 7 Pro Cross Device Development] Intsantnoob:
I have some quick questions if someone could help me out.

1. Is this flashable via magisk? i have gone through the docs just being sure.

2. if i flash this on twrp-3.4 would everything keep on working as it is now (on RR atm)

3. If i take a migrate backup i would have to flash it on both the slots or could i do something with the common, if not it'll just take double space ig.

4. Could everything work fine without using the a/b/c partition . And i could change the partition at any moment in time?

Sorry if some of these are already answered or dumb. I am relatively new to this stuff tho i am clear with the basic also have bricked myself sometimes , don't want to go there again.

Thanks :)
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Hi!

1. The flashable TWRP-Dualboot is via TWRP. So you need to be already booted into TWRP when flashing the dualboot.

2. If you chose to repartition when running the Dualboot-TWRP your Data/ROM will be formatted means you will lose all data!

3. The Migrate Backup will restore to the active slot so if you need that on both ROMS you have to flash the Migrate Backup on both A and B.

4. Every time you want to change the partition Layout from A/B/C to Stock or from Stock to A/B/C that will format all Data!

Take a look here there you can find this Dualboot TWRP with the Updated TWRP 3.4.0.0 otherwise if you take the one from the OP it will be on 3.3.1-79 !
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Except for question 3 all that information is in the op and looked GitHub read me.

Those are a very minimum to read it you don't want to mess things up.
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
Thanks for info.

Just to be double sure these are the steps I have to follow :

1. boot into twrp

2.flash the TWRP.zip you provided

3. format data(the one where type yes)

4. reboot to twrp with twrp.img

5. flash rom 'a' , twrp.zip , reboot

6. flash magisk, backup , reboot to twrp

7. flash rom 'b' , twrp.zip , reboot to twrp

8. flash magisk, backup

9. reboot system

correct if I'm wrong.

Also readme on GitHub had some steps on how to get password on both slots, I didn't get it could you please break it down for me.

Thanks a ton .
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Yes after the ROM flashing you flash the dualboot twrp again not the normal TWRP.

Reg. the password you should only set a password on one of the ROMs not in both.
[OnePlus 7 & 7 Pro Cross Device Development] Intsantnoob:
Any workaround if you know any. Any kind of encryption to keep the device not unlocked always on either of the slots.

Greatly appreciated :)
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
I just have one slot unencrypted and without i PIN/password.

The other slot I have encrypted with PIN/password.
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
One last thing how flashing with stock layout differs from a/b/c. As in OP there are instructions for "If not on stock layout"
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
When you are on Stock layout the flashing is as usual.

When you have A/B/C Layout you have to keep in mind that ROMs always flashes to the opposite slot.

So if you want to flash a ROM in Slot A you have to flash it from slot B and then flash the dualboot-TWRP afterwards using the same options as on the first flash. Then reboot to the other slot and flash the rest you want like Gapps etc.

When flashing the dualboot TWRP for the first time and you want to repartition you need to flash it from /tmp directory.

So copy it there the first time and flash.

Afterwards when reflashing the dualbootTWRP after a ROM FLASH you flash that from the data partition of that ROM.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
I actually am not on Stock layout now but I dont think there is any difference with TWRP 3.4 when on Stock layout.
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
I tried following those steps and after reboot to system I ended up in twrp with message("Unable to decrypt FBE device ,you may need to format data"), could you please tell the steps to have OOS on one slot and Resurrection remix on the other.

I tried not to run into any errors . I would be very thankful mate.

Sorry for bothering you a lot.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Had you set a password/PIN on that slot/ROM which will not decrypt now?

So that ROM you had encrypted correct?

---------- Post added at 09:35 AM ---------- Previous post was at 09:23 AM ----------

Also is the other slot booting/working?

So if you change the Boot slot to the other one?

I guess thete you have not set a PIN/password.
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
Update: After format data it booted correctly on slot A(RR) without Magisk , so installed Magisk,backup. without any pin/password.

I also installed rom switcher in magisk and when I tried to switch to B where OOS was there , it got stuck in the animation screen.
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Try to format data on the slot where OOS is on. Have you installed Magisk on that as well? I have in mind that you need to install Magisk on OOS when using it with Dualbooot.
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
After formatting the slot I got into ops set it up (with password , other slot was without password). Now when I tried to switch slots, it got into boot loop again but with RR this time. Not sure why this is happening.

*Encryption enabled on both

*STock layout

*verity disabled on both
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
Ok. If you try to Format the slot where RR is now. Does that fix the bootloop issue?
[OnePlus 7 & 7 Pro Cross Device Development] Intsantnoob:
Nope
[OnePlus 7 & 7 Pro Cross Device Development] Tejaswgupta:
Nope, now did the whole process again , flash oos on both slots and so on with encryption disabled on both slots .

Can only boot into one rom , as soon as I try to boot into the other one it bootloops.

Can't get what's going wrong :confused:
[OnePlus 7 & 7 Pro Cross Device Development] Wishmasterflo:
So the slot with RR is working but the one with OOS is just Looping when trying to boot?

Normaly a format data on that slot will help but not in this case as it seems.

Hmmm.....not sure if there is something special with OOS or so. I actually have never tried the Dualboot with OOS only with a couple of custom ROMS.

I am running it now with EvolutionX on one Slot and POSP ROM on the other.

And you did install Magisk on the ROM with OOS when flashing the Dualboot TWRP? I had in mind that flashing Magisk there is neccessary when flashing OOS with Dualboot.
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Always format (not just wipe) data when switching ROMs.

And oos requires Magisk with dual boot (mentioned in the op, never tried without Magisk myself)

I can't think of anything else. Never had issues myself with oos and custom ROM.

I had both slots unencrypted and without password. Try that, see how it goes. And then try to set password once everything is running. See if that makes a difference.
[OnePlus 7 & 7 Pro Cross Device Development] JudgeDread11:
Ok, stock partition does not allow dual booting.

You need to at least format data to a/b

I would really suggest to read the op and the GitHub read me again.

When you have done that, read it again.

When you have done that, read it again and take notes of the steps you need to take.

You asked many questions for which the answers were in these documents. [MENTION=9574498]Wishmasterflo[/MENTION] was very patient answering everything for you.

But you still don't understand the basic concept.

Maybe first read up on the basic partitioning of Android in a/b devices. Before you try dual boot.
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
did anyone try paranoid android to dual boot?

i tried but it is not booting. can anyone confirm it?
[OnePlus 7 & 7 Pro Cross Device Development] emam damon:
Does any body have problem with new open beta 17 as a base?I did everything but op 7pro didn't boot.
[OnePlus 7 & 7 Pro Cross Device Development] ele95:
hi guys , i got stuck on patching fstabs : /vendor/etc/fstab.qcom , maybe this happend after i flash last beta 17 as a base , never happend to me before , any idea

---------- Post added at 07:40 PM ---------- Previous post was at 07:39 PM ----------

i have pa with oos and its working fine
[OnePlus 7 & 7 Pro Cross Device Development] WesTD:
Did you flash oos to slot x(pa slot) before flash pa?

I was using miui and OneOS before flashing pa. Maybe that's why pa didn't boot on me