[Android Software Development] david42069:
Dualboot for any samsung​

View attachment 6125860

/*
* Your warranty is now void.
*The risk of hardbricking is minimum, as so far no device hard-bricked yet and it is safe to use
*I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, lost data or files, or you are fired because the alarm app failed. Please
* do some research or ask on telegram if you have any concerns about this dualboot stuff
*before flashing it! YOU choose to make these changes, and if
*you point fingers at me for messing up your device, I will not help, but you can reflash full stock to fix anything
*/

Only devices released in 2015-2019 and before (2014 devices are not tested, but may work)

In the future devices from 2020 and after will be supported

WARNINGS:

-READ THE WHOLE THREAD CAREFULLY, I WILL NOT HELP YOU IF YOU FLASH 256GB VARIANT ON 256GB PHONE (just flash stock and install again the right variant this time lol)

-This zip wipes all of your data, make sure you back it up

-The GB in the filenames represent the userdata_b (userdata on slot B) size, NOT the storage of your devices, please flash carefully

-Reboot every time you switch slots

Known issues:

-setting a lockscreen type on both systems breaks keystore, making one of the systems unusuable, even if you enter the correct pin it will state wrong pin

-mounting error on system and vendor on old devices, to fix change their filesystem to ext4 in twrp wipe menu

if you think your device is not suported or have any problems with the zip file join the Telegram Group Dualboot for samsung

INSTRUCTIONS:

-Flash the zip file according to how big you want userdata_b to be, the size is in the name of the file, userdata_a will take all the remaining storage

-Format data, not wipe, on both A/B slots (in twrp menu: wipe-->format data-->type yes)

-Flash any custom rom you want no matter the slot, by zip files or image files

-Switch slots using the other zip file attached in this post (the zip can be flashed in twrp or in an app with root privileges, an app like EX kernel manager or any app with zip flash support)

Keep in mind that this zip splits your current userdata into 6 partitions:

-system_b (7.5 or 6.5GB)depends on userdata size)

-product_b (1.5GB or 1GB)

-vendor_b (2GB or 1.5GB)

-boot_b (70MB, to support systems that have included kernel)

-userdata_b (storage is in the filename)

-userdata (remaining storage)

The sizes depend on userdata size, 64 and 32 GB will offer smaller partitions, since it is assumed they will be used on devices with smaller storage

The zip creates Vendor and Product only if they are present on the current partition list (so a s7 will miss both product and vendor on slot B, but a s9 will only be missing product)

Spoiler content hidden.

CREDITS:

-- @ExtremeXT for teaching me how to write shell scripts and how to make a flashable zip

-- @abhinavjha for testing, flashing, and formating his device over 4 times

-- @Zerviath also for testing and flashing and formatting

Channellog(installer):

-V1 : supported 2019 devices only

-V2 : supported 2018 and 2019 devices

-V2.1 : supported twrp with poor busybox tools

-V3 : supported all devices from 2019 and before

-V3.1 : anti hard brick in case of flashing on a corrupted partition table