[RECOVERY][DUALBOOT][Unified][A10][A11][OOS11]Orangefox-DualBoot-Unified-Reborn[21-03-2021]

Search This thread

invernomut0

Senior Member
Nov 30, 2019
76
57
Milan
Thank you! I forgot to force permissive selinux before mounting inactive partitions when I've refactored the code. I will add.

thanks again.

Attached the fixed version 2.8

- Fixed remount inactive partitions after reboot
- Fixed number of shared apps in shared section
- Fixed the launcher icon width
- Added button to report problems or request a new feature
- Bug fixes here and there :)
 

Attachments

  • DualBootCompanion-V2.8.apk
    9.6 MB · Views: 60
  • Like
Reactions: vitaly51370

vitaly51370

Senior Member
May 8, 2016
56
24
Ukraine

Attachments

  • Screenshot_20210307-172815.jpg
    Screenshot_20210307-172815.jpg
    685.5 KB · Views: 92
  • Screenshot_20210307-172825.jpg
    Screenshot_20210307-172825.jpg
    622.4 KB · Views: 94

vitaly51370

Senior Member
May 8, 2016
56
24
Ukraine
Do you have this file? /init.mount_datacommon.sh
Installed Orangefox-DualBoot-Guac-Unified-A11-V1.6

Code:
E:\Загрузки\One+7Pro-Stok>adb devices
List of devices attached
2c48f8bf        device

E:\Загрузки\One+7Pro-Stok>adb shell
OnePlus7Pro:/ $ ls -l
total 1672
dr-xr-xr-x 112 root   root            0 1971-04-13 13:19 acct
drwxr-xr-x  46 root   root          920 1971-04-13 13:19 apex
lrw-r--r--   1 root   root           11 2009-01-01 02:00 bin -> /system/bin
lrw-r--r--   1 root   root           50 2009-01-01 02:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
lrw-r--r--   1 root   root           11 2009-01-01 02:00 cache -> /data/cache
drwxr-xr-x   5 root   root            0 1970-01-01 03:00 config
lrw-r--r--   1 root   root           17 2009-01-01 02:00 d -> /sys/kernel/debug
drwxrwx--x  59 system system       4096 2021-03-07 23:04 data
drwx------   5 root   system        100 1971-04-13 13:19 data_mirror
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 debug_ramdisk
lrw-------   1 root   root           23 2009-01-01 02:00 default.prop -> system/etc/prop.default
drwxr-xr-x  28 root   root         6120 2021-03-07 23:04 dev
lrw-r--r--   1 root   root           11 2009-01-01 02:00 etc -> /system/etc
lrwxr-x---   1 root   shell          16 2009-01-01 02:00 init -> /system/bin/init
-rwxr-x---   1 root   shell        2941 2009-01-01 02:00 init.environ.rc
drwxr-xr-x   9 root   root          200 1971-04-13 13:19 linkerconfig
drwx------   2 root   root        16384 2009-01-01 02:00 lost+found
drwxr-xr-x  10 root   root         4096 1970-11-25 04:31 metadata
drwxr-xr-x  15 root   system        320 1971-04-13 13:19 mnt
drwxr-xr-x   5 root   root         4096 2009-01-01 02:00 odm
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 oem
-rw-r--r--   1 root   root      1644075 2009-01-01 02:00 op_plat_sepolicy.cil
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 postinstall
dr-xr-xr-x 975 root   root            0 1970-01-01 03:00 proc
lrw-r--r--   1 root   root           15 2009-01-01 02:00 product -> /system/product
drwxr-xr-x   3 root   root         4096 2009-01-01 02:00 res
lrw-r--r--   1 root   root           21 2009-01-01 02:00 sdcard -> /storage/self/primary
drwx--x---   4 shell  everybody      80 1971-04-13 13:19 storage
dr-xr-xr-x  16 root   root            0 1971-04-13 13:19 sys
drwxr-xr-x  16 root   root         4096 2009-01-01 02:00 system
lrw-r--r--   1 root   root           18 2009-01-01 02:00 system_ext -> /system/system_ext
drwxr-xr-x  15 root   shell        4096 2009-01-01 02:00 vendor
OnePlus7Pro:/ $
 

invernomut0

Senior Member
Nov 30, 2019
76
57
Milan
Installed Orangefox-DualBoot-Guac-Unified-A11-V1.6

Code:
E:\Загрузки\One+7Pro-Stok>adb devices
List of devices attached
2c48f8bf        device

E:\Загрузки\One+7Pro-Stok>adb shell
OnePlus7Pro:/ $ ls -l
total 1672
dr-xr-xr-x 112 root   root            0 1971-04-13 13:19 acct
drwxr-xr-x  46 root   root          920 1971-04-13 13:19 apex
lrw-r--r--   1 root   root           11 2009-01-01 02:00 bin -> /system/bin
lrw-r--r--   1 root   root           50 2009-01-01 02:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
lrw-r--r--   1 root   root           11 2009-01-01 02:00 cache -> /data/cache
drwxr-xr-x   5 root   root            0 1970-01-01 03:00 config
lrw-r--r--   1 root   root           17 2009-01-01 02:00 d -> /sys/kernel/debug
drwxrwx--x  59 system system       4096 2021-03-07 23:04 data
drwx------   5 root   system        100 1971-04-13 13:19 data_mirror
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 debug_ramdisk
lrw-------   1 root   root           23 2009-01-01 02:00 default.prop -> system/etc/prop.default
drwxr-xr-x  28 root   root         6120 2021-03-07 23:04 dev
lrw-r--r--   1 root   root           11 2009-01-01 02:00 etc -> /system/etc
lrwxr-x---   1 root   shell          16 2009-01-01 02:00 init -> /system/bin/init
-rwxr-x---   1 root   shell        2941 2009-01-01 02:00 init.environ.rc
drwxr-xr-x   9 root   root          200 1971-04-13 13:19 linkerconfig
drwx------   2 root   root        16384 2009-01-01 02:00 lost+found
drwxr-xr-x  10 root   root         4096 1970-11-25 04:31 metadata
drwxr-xr-x  15 root   system        320 1971-04-13 13:19 mnt
drwxr-xr-x   5 root   root         4096 2009-01-01 02:00 odm
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 oem
-rw-r--r--   1 root   root      1644075 2009-01-01 02:00 op_plat_sepolicy.cil
drwxr-xr-x   2 root   root         4096 2009-01-01 02:00 postinstall
dr-xr-xr-x 975 root   root            0 1970-01-01 03:00 proc
lrw-r--r--   1 root   root           15 2009-01-01 02:00 product -> /system/product
drwxr-xr-x   3 root   root         4096 2009-01-01 02:00 res
lrw-r--r--   1 root   root           21 2009-01-01 02:00 sdcard -> /storage/self/primary
drwx--x---   4 shell  everybody      80 1971-04-13 13:19 storage
dr-xr-xr-x  16 root   root            0 1971-04-13 13:19 sys
drwxr-xr-x  16 root   root         4096 2009-01-01 02:00 system
lrw-r--r--   1 root   root           18 2009-01-01 02:00 system_ext -> /system/system_ext
drwxr-xr-x  15 root   shell        4096 2009-01-01 02:00 vendor
OnePlus7Pro:/ $

Are you in A/B layout? You don't have the CommonData partition, right?
 
Aug 20, 2016
29
6
22
CHICO
OnePlus 6
OnePlus 7
Hey guys 11b4 is stable, just keep the brightness below 100%. If you want to setup passwords and security just build one OS and backitup than install it to the other side via twro/OJfox. It Will keep the same security till it tripps. Thiers a folder on root you can access in OJttwrp called Ffiles that will delete passwords and has other zips in it to help take a look. Also If you can help out than donate 1mill to the guy who took over this recovery lol. Pieces salah and flash away
 

HippoMan

Senior Member
May 5, 2009
2,093
859
Hippoland
Please forgive me if I am overlooking something obvious.

I want to try the latest DualBoot recovery on my OnePlus 7 Pro (GM-1917). I have read the detailed instructions in the OP, and I understand them. However, I couldn't find the download link for this DualBoot recovery anywhere in the OP nor in the following posts.

Is there an official download site for this recovery module? I noticed that there is a github site, but the message there states that the project is deprecated.

Thank you for any help you can offier.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    c92d6000-1452-11eb-9df5-5dea92eada9a

    Orangefox-DualBoot-Guac-Unified - Android 10/11 version

    THANKS TO:

    - Zackptg5 - The father of this mod
    - DrakePL (Orangefox Recovery)
    - Ae3NerdGod, Neel P, Whismasterflo
    - Muphetz, Varun Soma, Pranav - for testing

    #include <std_disclaimer.h>
    /*
    *
    * We are not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    *
    */

    Modified recovery and installer script for all OP7/Pro/5G variants that re-purposes userdata for true dual booting. You can still use this as a regular stock twrp zip - one stop shop for magisk, verity, and/or forced encryption modifications

    Disclaimer
    • I am not responsible for anything bad that happens to your device. Only experienced users should be using this mod
    • This is no walk in the park mod. Although I have extensively tested it, there is always the possibility of a brick with anything that involves repartitioning. Make sure you have a backup and know how to reparititon your phone back to stock (there's a guide at the end of this readme with the basics)

    • YOU'VE BEEN WARNED - Use at your own risk

    Limitations

    If you set a password, regardless of encryption status, it'll corrupt the other slot if it's also password protected.
    Note that some roms set one automatically Either don't use a password on one slot, or leave one slot (I'll use 'a' in this example) unencrypted and:
    • Setup rom, password, and everything on slot a
    • Boot back into twrp, choose common data as storage, and backup userdata (if not using a/b/c layout, backup TWRP folder to your computer)
    • Setup rom, password, and everything on the other slot (b)
    • Boot back into twrp, switch back to slot a (reboot back into twrp), and restore the twrp backup

    If you messed this up and are unencrypted - delete these files in /data/system if present: locksettings.db gatekeeper.password.key password.key gatekeeper.pattern.key pattern.key gatekeeper.gesture.key gesture.key

    If you messed this up and are encrypted - you lost the data on that slot:
    • Unmount metadata in twrp gui
    • Format metadata with this command:
      Code:
      mke2fs -t ext4 -b 4096 /dev/block/sda$metadata_partnum
      where metadata_partnum is the partition number of the current metadata partition (you can find this with sgdisk /dev/block/sda --print). DO NOT FORGET THE PARTITION NUMBER. If you do, you'll format all of sda which results in a brick
    • Reboot into twrp and format data in gui
    Storage settings only supports 128 and 256gb userdata partitions
    • Just a cosmetic issue as it'll say that system is taking up the difference


    Some other features/notes

    • Can choose between stock layout, a/b userdata, or a/b/c userdata where 'c' is a common data partition that'll show up in both roms - it's quite handy
    • Option to choose between ext4 and f2fs
    • Disables verity - fstabs are modified for dual boot and so this is a must unless you choose stock layout in which case it's optional
    • Option to disable forced encryption
    • Option to install magisk
    • Quickmode for faster rom testing
    • Failsafe to keep from changing slots automatically when used in conjunction with rom install


    Common Data

    • If you choose a/b/c layout - you'll have a/b userdata, but you'll also get a 3rd userdata partition I call 'Common Data'
    • The name 'Common Data' gives away its purpose - to store files that you'll access on both slots/roms. So stuff like zips, pictures, music, TWRP backups, etc.
    • In TWRP, this shows up as another storage option for backup/restore and on your pc as well - your phone will have 'Common Storage' and 'Internal Storage'
    • In order to be accessible when booted, some parts of the system are modified so that the it'll be accessible WITHOUT root by the following mechanisms:
    • The common data partition is mounted to /sdcard/CommonData
    • .nomedia file is placed in CommonData so files in it won't be picked up twice if you decide to mount over internal storage as outlined below
    • Furthermore, if your use case is like mine where my music files are in common data, you can make 'mounts.txt' file in /datacommon containing a list of every FOLDER to mount directly over top of sdcard. So for example:
    • /datacommon/Music -> /sdcard/Music
    • This of course mounts over anything there (overwrites it for as long as it's mounted) so make sure that you don't have the same folder in both datacommon and regular data
    • Note that there are 3 exceptions to this folder mounting rule:
    • All - if this is the FIRST line, ALL folders in datacommon will be mounted
    • Android
    • lost+found
    • The reasoning should be obvious - lost+found isn't something you should need to mess with and Android is for regular data partition only - that's OS specific and should be on separate slots
    • Note that you should have 1 folder listed on every line, for example:
    PHP:
    Music
    Pictures
    ViPER4AndroidFX

    Flashing Instructions (if Android 11, see second post)

    • You MUST be booted into TWRP already when flashing this zip (you can grab a bootable twrp image from here)
    • Since this modifies data - the zip CANNOT be on sdcard or data at all UNLESS you do not want to repartition/format
    • If you flash from data, the zip will copy itself to /tmp and instruct you to flash it from there OR you can just install twrp/magisk/disver-fec
    • You could do the above or copy it to a place like /dev or /tmp and flash it from there
    • Alternatively, you can adb sideload it
    • Read through ALL the prompts - there's lots of options :)


    How to Flash Roms

    • Nothing changes here except ONLY FLASH IN TWRP
    • Roms always flash to the opposite slot. Keep that in mind and you'll be fine
    • So don't take an OTA while booted - boot into twrp, switch slots, reboot into twrp, flash rom
    • Normal flash procedure:
    • Boot into twrp
    • reboot into twrp selecting slot you do NOT want rom installed to
    • Flash rom
    • Flash this zip
    • Reboot into twrp
    • When using failsafe mode,
    • TWRP will boot into the slot you were in BEFORE you flashed the rom.
    • TWRP will almost certainly show the incorrect "current slot" at the reboot menu.
    • The slot selection buttons still work. If youve kept track in youre head, and the zip didnt fail; pick the correct slot now
    • or reboot to recovery, then switch into the slot which contains the new rom youve just installed
    • Flash everything else


    Quickmode usage NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!

    Change the zip name to enable quickmode options (Case Sensitive!)
    • keeps current layout

    • add the words fast or quick in the zip file to enable quickmode with the following default options:

    • ForceEncryption disabled for both slot
    s​
    • Magisk installed to both slots

    add any of the following options to the name of the zipfile to custimize quickmode to your liking, capitilizing the letter of the slot youd like to enable that option for:

    • fec.ab will ENABLE force encrytion for the capitalized slot letter
    • su.ab or magisk.ab will ENABLE the installation of magisk for the capitalized slot letter
    • Example: if the file is named Orangefox-DualBoot-fast-fec.AB-su.aB.zip then:
    • ForceEncryption will be ENABLED on both slot _a and slot _b
    • Magisk will be installed on slot _b, but NOT installed on slot _a

    • ADVANCED USERS ONLY NOT RESPONSIBLE FOR BUGS, BRICKS OR MISTAKES! USE AT OWN RISK!

    • confirm.y will skip the final confirmation before any work is done, and run the options chosen or defaults if none specified

    • the word warp this can be used instead of fast or quick and confirm.y if you'd also like to use quickmode without confirmation


    Failsafe usage / explaination
    I've had a few instances where a rom doesnt agree with whats going on, and the dualboot zip gets stuck on a slot and never finishes. This results in forcing the phone off, and leaves the phone in a non bootable state, with an unprepared slot. Not to mention a stock, or worse, no recovery at all. Bootloop city.
    Enter the failsafe option: just add ` nofail ` or ` failsafe ` (case sensitive) to the zip name like above, and the zip will revert the slot change caused by the rom install and keep you able to boot back into the current slot's TWRP so you can sort out the slot youre working on. Pair this with a usb drive or commondata, and youre (relatively) safe to flash on the go, or from your bed with the computer off.

    Notes
    • After applying the failsafe, the reboot screen in TWRP will ALMOST CERTANLY show the incorrect slot until you either manually select a slot or reboot recovery.
    • This adds a step or two to the flashing process, make sure you've read that.
    [/QUOTE]

    Help! I Can't Boot!
    • Usually this is because you switched roms without formatting data first. This should be flashing 101 but we all forget sometimes. Plus this slot stuff can get confusing
    • If it only happens with a/b/c and not any other layout, there's a good chance it's selinux related. Try setting selinux to permissive at kernel level with this mod (source here).

    How to Manually Repartition Back to Stock

    • In the event any step in the repartioning fails, the entire installer aborts. The good news is that this prevents a potential brick. The bad is that you need to manually revert back
    • Boot into twrp. If sgdisk is not present in sbin, grab it from this zip (in tools) and adb push it to /sbin and chmod +x it
    • sgdisk /dev/block/sda --print Note that /dev/block/sda is the block that userdata and metadata are stored on - no other block is touched by this mod. This will show up the current partition scheme. Stock looks something like this (on OP7 Pro):
    PHP:
    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
    You may have different size userdata - mine is 256gb - depending on your device but that doesn't matter. You just need to see where they're located
    Take note of the number (I'll call userdata_num for the sake of this tutorial) and start sector (userdata_start) for the first partition AFTER rawdump, and the end sector (userdata_end) of the last parititon on sda

    • sgdisk /dev/block/sda --change-name=17:metadata - renames metadata partition back to non-ab stock
    • sgdisk /dev/block/sda --delete=19 - this deletes the entire partition - use this command for each user/metadata partition after rawdump (ones generated by this zip)
    • sgdisk /dev/block/sda --new=$userdata_num:$userdata_start:$userdata_end --change-name=$userdata_num:userdata - this creates the new userdata partition
    • Final step is to format the new userdata partition: mke2fs -t ext4 -b 4096 /dev/block/sda$userdata_num $userdata_size - where userdata_size can be calculated with this shell command: sgdisk /dev/block/sda --print | grep "^ *$userdata_num" | awk '{print $3-$2+1}'
    • MAKE SURE YOU VERIFY ALL VARIABLES HERE ARE SET PROPERLY - if you mess this up, you could format all of sda resulting in a brick
    • Run sgdisk /dev/block/sda --print again to make sure everything is correct and then reboot back into twrp


    Changelog
    21/03/2021 - V1.8
    • Updated companion app to 2.8.7
    05/03/2021 - V1.6
    • Updated init.mount_datacommon.sh to support the application sharing
    • Updated the dual boot companion app V2.6 BETA
      • Added mounting inactive system to sdcard/DualBoot/
      • Added mounting inactive SDcard to sdcard/DualBoot/
      • EXPERIMENTAL - Added application sharing between ROMs (Only A/B/C Layout)
      • Localizations update
    • Minor bugfix here and there.
    13/02/2021- V1.5
    • Updated the dual boot companion app V1.7.2
    • Updated Orangefox recovery to latest git
    06/02/2021- V1.3
    • Updated the dual boot companion app
    • Fixed the Orangefox full screen bug on OP7 pro
    05/02/2021- V1.1
    • Added the dual boot companion app
    • Fixed the OOS11 flashing bug
    20/01/2021- V1.0
    • It works with OxygenOS 11 ( WARNING: --- Stay unencrypted! --)
    • Magisk 21.4 updated
    • New version of Orangefox recovery (R11) - 20-01-2021 update
    • Know bug: Flashing from OOS11 slot can overwrite the same slot.
    19/11/2020 - A11-0.4
    • Fixed root install for Android 11
    • Minor improvement
    21/10/2020 - A11-0.4
    • Root not installed if Android 11 - Please do it manually.
    • CommonData mount fix in Android 11
    • Minor improvement
    Android 11: please install Magisk 20422 and MagiskManager 297

    16/10/2020 - A11-0.2
    • Changed to OrangeFox Recovery
    • Added check to get the right initrc (Android 11 compliant)

    16/10/2020 - A11-0.1
    • Initial release

    Download


    GitHub

    Telegram support chat: https://t.me/OrangeFoxDualBootRebornOnePlus7

    XDA:DevDB Information
    Orangefox-DualBoot-Unified, Tool/Utility for the OnePlus 7

    Contributors
    invernomut0

    if you like my work, send me a beer :)

    paypal-donate-button-high-quality-png-1_orig.png
    3
    DUALBOOT COMPANION APP


    FLASH PROCEDURE - Android 11
    Related to Orangefox-DualBoot-Guac-Unified-A11.zip

    WARNING: OOS11 --- Stay unencrypted! ---

    Example (starting point)
    Slot A A10 Rom
    Slot B A10 Rom

    1 - Flash from slot A A11/OOS11 rom
    2 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
    3 - Reboot to recovery (Now you are in slot B automatically)
    4 - Format data
    5 - Flash Orangefox-DualBoot-Guac-Unified-A11.zip
    7 - Reboot to system

    Install magisk manager attached

    Ending point
    Slot A A10 rom
    Slot B A11/OOS11 rom

    Now you should have a working A10 rom on slot A and a working A11/OOS11 rom on slot B.
    Please report any problems.
    3
    New version

    06/02/2021- V1.3
    • Updated the dual boot companion app
    • Fixed the Orangefox full screen bug on OP7 pro
    3
    First tentative...with error :)

    Finally got it works :) Next release will be with new app version and Orangefox updated to the latest git.

    photo_2021-02-11_16-32-54.jpg
    3
    Is it possible to get this recovery as an image file which can be used with 'fastboot boot recovery.img'?

    The reason I am asking is because the official magisk doesn't work if a recovery is installed and I prefer to use the official magisk then a version of which the source is unknown and which does not get updated.
    Also the provided magisk isn't stable on my rom while the official one is.
    I now have oos with recovery on slot A with dualboot recovery and magisk and elemental x (a11) on slot B without dualboot recovery and official magisk.
    I can boot to slot A if I need recovery, but if i need it on slot be is need to flash it first again (which deletes my original magisk installation) and after that flash back the magisk patched boot image and setup all my modules from scratch again (i'll try if i can backup and restore the data/adb folder).
    And I will always need a10 on 1 slot for this to work.

    Hi,
    You can directly update magisk from official magisk manager app, to the last version.
    I planned to update all magisk version now, because it is stable and works on android 11.
    I don't have the recovery img now (it's on my other computer), but I'll provide you soon.

    best
    s.