How To Guide DSU Sideloader for gaining temporary/permanent root, testing GSI's or installing GSI's Semi-permanently, pulling boot image, AND making your backups

Search This thread

PsYk0n4uT

Senior Member
Hello, I just wanted to post this as an answer to many questions regarding not being able to use DSU to install a GSI for testing or gaining root.
The DSU install in developer options is NOT what we are using for installing GSI's temporarily for pulling boot images. And wont work for that.
You can use DSU sideloader to install GSI's tempoarily or use the sticky feature to make it semi-permanent. but if you plan on using the GSI long term make sure to set your userdata to a reasonable size because your gonna want to install apps and download things. take note that if you dont use the sticky feature, once you reboot the phone it goes back to your regular stock OS or whatever you were running on before and you lose everything in the GSI that you havent saved to external media/sdcard/cloud. If you use the sticky feature you can reboot the phone and retain the GSI installation.

*This is NOT mine and i take absolutely NO credit for it and am just providing it here to make it easy to find for other N20 users and newcomers looking to pull their boot images to patch with magisk and root OR for testing GSI's.
If you want a permanent GSI install you will need to flash. BUT that being said, i have used the sticky feature to stay in a GSI for a few weeks. Definitely gonna want to set that user data pretty high if you wanna stay in one long term. This isnt the best way to install a GSI if you plan on staying in it permanently but it would work if you want to keep your stock installed in case of system failure for some reason.... Best to pull a FULL system backup while in a rooted GSI and save it to your PC or in the cloud.........PLEASE make that your #1 priority once you get root because NOBODY can help you restore your EFS partitions should you screw those up. They contain your IMEI and device-specific info that you cant get ANYWHERE else and NEVER will be able to either.
My suggestion is to install a prerooted GSI, then use Partitions Backup & restore app found here https://www.apkmirror.com/apk/wanam/partitions-backup/ or on playstore and change options to save the backups as RAW (.img) then open the folder their saved to /storage/emulated/0/Partitions Backups/ and use zarchiver or any other compression tool to compress them all into a single archive to save some space and make them easier to manage and/or upload....... (you may want to change screen timeout/'turn off display after' in android settings to 30 mins to keep the screen from turning off while you do your backup because it takes a while (your stock full backup will be about12gb after all the .img's are compressed)...

Now heres where you can find DSU sideloader and also a copy/paste from the github page:

DSU Sideloader​


A simple app made to help users easily install GSIs via DSU's Android feature.


preview


Requirements​


  • Android 10 or higher
  • Unlocked Bootloader
  • Device with Dynamic Partitions
  • A GSI you want to use!

Community GSIs: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list


Google GSIs: https://developer.android.com/topic/generic-system-image/releases


*Remember to use GSIs compatible with your architeture, vndk implementation..


You don't need root to use this app, however, running on non-rooted devices, requires adb (you will be prompted to run a shell script to invoke DSU installation activity)


Rooted devices via Magisk, should be running Magisk v24 or higher, older versions may break DSU feature.


We highly recommend using this app with Stock ROM, Custom ROMs aren't supported.


How to use?​


  1. Install app
  2. When opening for the first time, you need to give read/write permission to a folder, create a new folder and allow access
    *this folder will be used to store temporary files, like extracted GSIs from compressed files)
  3. Select a GSI to install
    *accepted formats are: gz, xz and img
  4. You can customize installation as you want
    *like changing userdata size for dynamic system
    *changing gsi file size is not recommended (let app do it automatically)
  5. Tap on "Install GSI via DSU"
  6. Wait until finishes! (it may take a some time)
  7. Once it finishes, next step may vary:
    • On rooted devices, DSU screen will appear, prompting you to confirm installation, after that, check your notifications, DSU should start installing GSI
    • On non-rooted devices, you will be prompted to run a command in adb, once you run, DSU screen will appear asking you to confirm installation, after that, DSU should start installing GSI
  8. Once dynamic system is ready, you can boot it through notifications

Other information​


  • DSU feature may be broken in some ROMs.
  • gsid does not let you install GSIs via DSU when you have less than 40% of free storage.
  • gsid checks if selected GSI size is multiple of 512 (preventing corrupted system images).
  • If you have disabled/debloated system apps, make sure "Dynamic System Updates" app is not disabled.
  • To use "ADB mode" on rooted device, deny root permission.

About DSU​


DSU (Dynamic System Updates), is a feature introduced on Android 10, that let developers boot GSIs without touching current system partition, this is done by creating new partitions to hold a GSI and a separated userdata, to boot on them when desired.


Unfortunelly, DSU depends on Dynamic Partitions (your device need to support, otherwise, won't work), and most GSIs requires unlocked bootloader to get them booting properly (since only OEM-Signed GSIs are allowed to boot on locked bootloader).


GSIs can be installed via DSU without root access, using ADB, running some commands, you can read more about installation process here: https://developer.android.com/topic/dsu


Once installation finishes, Android creates a persistent notification allowing you to boot into "Dynamic System" (GSI installed via DSU), and you can boot into installed GSI, without touching your system partition, or breaking the "real userdata" partition.


After booting Dynamic System, you can try and test whatever you want, when you need to switch back to device's original system image, everything you need to do, is just, a simple reboot!


When doing a long test, that may requires lots of reboots, this can be a pain, however, is possible to enable "sticky mode", that enforces dynamic system, instead of device's original system image, once tests are done, you can disable sticky mode and return to original system image.


That is basically a quickly explanation about DSU, a amazing feature, like a "dual-boot" solution, limited, however, very safe (since no read-only partition will be modified, and if GSI does not boot, just a simple reboot will return you to the original device's system image).


You can read more about DSU here: https://source.android.com/devices/tech/ota/dynamic-system-updates


How to enable Sticky Mode?​


Reboot to Dynamic System, and:


  • use this command on adb: adb shell gsi_tool enable
  • or from local adb shell: gsi_tool enable
  • or from local rooted shell (eg. Termux on rooted GSI): su -c 'gsi_tool enable'

When sticky mode is enabled, device will always boot into dynamic system, instead of device's original system image.


To disable, use the same command, instead of enable , use disable


****Special Thanks To VegaBobo for this awesome app to make this a simple process And to AndyYan for the suggestion!!***

DSU Sideloader GitHub main:

DSU Sideloader Github Releases(downloads) [**Most will want to use the app-release.apk NOT app-debug.apk**]:

Partitions Backup & Restore:
or on playstore at https://play.google.com/store/apps/details?id=ma.wanam.partitions


Please consider donating to the developers who work hard and spend their valuable time to provide these awesome apps/mods that bring joy to your life!


****Special Thanks To VegaBobo for this awesome app to make this a simple process And to AndyYan for the suggestion and time spent on mods/ROMs!!***
Also shout out to Wanam for this awesome backup tool thats STILL relevant and working as great as ever.

11/11/2022: received response from developer about the issues with DSU sideloader failing
 

Attachments

  • Screenshot_2022-11-11-06-04-58-14_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
    Screenshot_2022-11-11-06-04-58-14_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
    481.3 KB · Views: 26
Last edited:

PsYk0n4uT

Senior Member
Also remember that if you do a full backup from inside a sideloaded GSI and you ever have to restore that full backup(all partitions) including userdata.......... you will upon flashing all of it back return to the exact same state, booting into that GSI(or returning to your stock system after rebooting if that happens to be the case)
 

PsYk0n4uT

Senior Member
I already unlock bootloader
But still show install failed
fastboot flashing unlock after flashing the token?
also make sure your using the reboot button from notifications instead of your regular reboot through power menu. if your unrooted you will HAVE to do the adb commands as directed in the app..
also you may want to try different versions, vdklite or whatever of your chosen gsi. make sure its 64bit as well, binder64 may or may not work on this device
 

Tin2233

Member
Jul 30, 2022
9
1
fastboot flashing unlock after flashing the token?
also make sure your using the reboot button from notifications instead of your regular reboot through power menu. if your unrooted you will HAVE to do the adb commands as directed in the app..
also you may want to try different versions, vdklite or whatever of your chosen gsi. make sure its 64bit as well, binder64 may or may not work on this device
I unlock bootloader before flashing the token
I use ADB to flash the token
and I execute as required
Only show notifications "installation failed "
Maybe it's because I'm using a Samsung device(support dynamic partition)
And I flash pixel experience gsi normal version(android 12 and 13 both fail)
Sorry my English is bad...
 
Last edited:

PsYk0n4uT

Senior Member
I unlock bootloader before flashing the token
I use ADB to flash the token
and I execute as required
Only show notifications "installation failed "
Maybe it's because I'm using a Samsung device(support dynamic partition)
And I flash pixel experience gsi normal version(android 12 and 13 both fail)
Sorry my English is bad...
tbh im not sure about samsung, but if it has a/b partitions it may be possible, samsung has always been a weird device, as much as ive been a samsung fan over the years, i had to move away from samsung due to most everything being too locked down. i like to mod my devices and USA model samsung devices were the bane of my existence having Awesome hardware on the flagship devices yet not being able to do much of anything with them. i assumed you meant the oneplus Nord n20, but the sideloader works on many devices and im not sure about samsung. you may HAVE to use binder 32/64 or a completely different gsi build type for those devices and then again, it may not be possible at all on samsung, ive gotten rid of all my samsung devices so i cant even test to see if its just samsung in general or simply something thats needs to be done differently on your device. have you tried using dsu in dev options? will it let you install one of the different "supported" gsi's in dsu updater ? or does it fail? also you have to make sure your inactive slot is empty for this to work either way. also i mostly used odin when i was messing with my samsung devices so i couldnt tell you much in the way of fastboot operations in samsung devices
 

alecstoner

New member
Oct 11, 2022
3
1
Austin, TX
I have the One Plus Nord N20 GN2200 with the bootloader unlocked and I was able to get DSU SideLoader to work a couple of times. Now no matter what I try I get "install failed," pretty much instantly. Also, even in developer options if I use the DSUs available for download, they are now stating "install failed." A couple days ago I was able to temporarily boot into one of the Android 13 Beta GSIs through developer options and this worked, so I am quite confused now as to what is preventing this from working. Do you have any ideas on what I can try to sort this out? I wiped all my data through recovery, and verified bootloader as being unlocked. The only thing I noticed is that secure boot is enabled on the fastboot menu on my phone. I am 100 percent certain that the bootloader is unlocked since Google Pay and other services are now not supported (since they detect bootloader as being unlocked) and phone clearly states Device State - UNLOCKED in Fastboot Mode. Lastly, I do have logs from DSU SideLoader, but I looked through them on the computer and they don't provide any valuable insight.
 
Last edited:

PsYk0n4uT

Senior Member
Have you rooted the device
Your not alone in that, as ever since not long after rooting the device/modifying bootloader I haven't been able to sideload gsi's either. Not really sure what the issue is. But I'm pretty sure I never had that issue until another "system update" was available. So I'm not sure if it has anything to do with the system update that's been downloaded and that is always trying to install but failing being the culprit of DSU failing or not but that's my latest theory. If anyone knows where the updates are downloaded to maybe that would be a good place to start, by deleting the downloaded update and getting updates completely disabled so it's not perpetually attempting to install a system update that will never succeed so long as your not completely stock. It seems looking over other threads for previous devices that others had this issue until updating to latest security patch. So this seems the likely culprit. Probably just need to delete the update that's waiting to be installed and sideload the gsi using DSU sideloader before it has a chance of attempting to update again
 
  • Like
Reactions: kbmonday

PsYk0n4uT

Senior Member
I have the One Plus Nord N20 GN2200 with the bootloader unlocked and I was able to get DSU SideLoader to work a couple of times. Now no matter what I try I get "install failed," pretty much instantly. Also, even in developer options if I use the DSUs available for download, they are now stating "install failed." A couple days ago I was able to temporarily boot into one of the Android 13 Beta GSIs through developer options and this worked, so I am quite confused now as to what is preventing this from working. Do you have any ideas on what I can try to sort this out? I wiped all my data through recovery, and verified bootloader as being unlocked. The only thing I noticed is that secure boot is enabled on the fastboot menu on my phone. I am 100 percent certain that the bootloader is unlocked since Google Pay and other services are now not supported (since they detect bootloader as being unlocked) and phone clearly states Device State - UNLOCKED in Fastboot Mode. Lastly, I do have logs from DSU SideLoader, but I looked through them on the computer and they don't provide any valuable insight.
secure boot has been enabled the whole time i was testing gsi`s with dsu sideloader...... Im pretty sure my July device has Pixel experience GSI hardflashed and secureboot is still enabled.
 

kbmonday

New member
Feb 22, 2011
4
2
I was able to get this to work a couple of times, but now every installation attempt immediately fails. My bootloader is unlocked and I have tried other images as well, even unzipping as a raw system image to expedite the process. BUT... for the life of me, I just cannot get an install to actually finish anymore. I have tried doing a complete system format and wipe, to no avail. I have seen a couple of other people who have had this problem but can't find a solution anywhere. Any help would be much appreciated. Thanks

As an aside, I have not installed any updates so it SHOULD be working. If I can figure out the issue I'll post the solution.
 
Last edited:

kbmonday

New member
Feb 22, 2011
4
2
I have the One Plus Nord N20 GN2200 with the bootloader unlocked and I was able to get DSU SideLoader to work a couple of times. Now no matter what I try I get "install failed," pretty much instantly. Also, even in developer options if I use the DSUs available for download, they are now stating "install failed." A couple days ago I was able to temporarily boot into one of the Android 13 Beta GSIs through developer options and this worked, so I am quite confused now as to what is preventing this from working. Do you have any ideas on what I can try to sort this out? I wiped all my data through recovery, and verified bootloader as being unlocked. The only thing I noticed is that secure boot is enabled on the fastboot menu on my phone. I am 100 percent certain that the bootloader is unlocked since Google Pay and other services are now not supported (since they detect bootloader as being unlocked) and phone clearly states Device State - UNLOCKED in Fastboot Mode. Lastly, I do have logs from DSU SideLoader, but I looked through them on the computer and they don't provide any valuable insight.
Did you get this figured out? I am having the exact same issue.
 

kbmonday

New member
Feb 22, 2011
4
2
I have found a possible explanation. The security patch was installed automatically without my knowledge 2 days ago. I'll try to revert and see what happens.
 

oromis995

Member
Oct 28, 2022
6
1
I attempted this fix, but it didn't help in my case. On a more positive note I did find out what the issue is, but I don't really know how to fix it:
[TABLE] [TR] [TD][liblp]Invalid partition metadata header table size. 11-12 19:52:11.495 10973 10976 E gsid : Could not read metadata file /metadata/gsi/dsu/dsu/lp_metadata 11-12 19:52:11.495 1901 7313 I DynamicSystemService: Failed to install userdata 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: java.io.IOException: Failed to start installation with requested size: 42949672960 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: java.io.IOException: Failed to start installation with requested size: 42949672960 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at com.android.dynsystem.InstallationAsyncTask.installUserdata(InstallationAsyncTask.java:334) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at com.android.dynsystem.InstallationAsyncTask.doInBackground(InstallationAsyncTask.java:186) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at com.android.dynsystem.InstallationAsyncTask.doInBackground(InstallationAsyncTask.java:46) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at android.os.AsyncTask$3.call(AsyncTask.java:394) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 11-12 19:52:11.498 10567 10965 E InstallationAsyncTask: at java.lang.Thread.run(Thread.java:923) 11-12 19:52:11.501 10973 10976 E gsid : [liblp]Invalid partition metadata header table size. 11-12 19:52:11.501 10973 10976 E gsid : Could not read metadata file /metadata/gsi/dsu/dsu/lp_metadata 11-12 19:52:11.508 10567 10567 D InstallationAsyncTask: onPostExecute(), URL: file:///storage/emulated/0/dsu/workspace_dsuhelper/lineage-20.0-20221111-UNOFFICIAL-arm64_bvS.img.gz, result: 3 11-12 19:52:11.509 10567 10567 D DynSystemInstallationService: status=NOT_STARTED, cause=ERROR_IO, detail=java.io.IOException: Failed to start installation with requested size: 42949672960[/TD] [/TR] [/TABLE]
 

beatbreakee

Senior Member
Aug 10, 2015
162
85
Frisco
Samsung Galaxy S10
I unlock bootloader before flashing the token
I use ADB to flash the token
and I execute as required
Only show notifications "installation failed "
Maybe it's because I'm using a Samsung device(support dynamic partition)
And I flash pixel experience gsi normal version(android 12 and 13 both fail)
Sorry my English is bad...
Hey, i noticed ONE step you were lacking in your steps taken to unlock your bootloader. Did you remember to flash the DM-Verity disabler? For most android 12 devices, it has become CRITICAL that you disable this, if you unlock your bootloader AND install a custom recovery! You dont have to do it, if just rooting, but if you installed TWRP (or other non stock recovery), with dm-verity still enabled, you will basically brick your device. DM-verity uses its RSA key hash to verify ANY partitions blocks AS THEY ARE ACCESSED! Meaning it does its security checks in real time, and if it sees a single block has been changed, it will get a different hash response and will stop your progress dead in its tracks! Sometimes without warning, and if your device was in the process of attempting a GSI/GSU flash, then the recovery partition would fail DM-Verity's checks, which when a partitions data fails to match EXACTLY to the hash/signature that it is expecting, it is already loading as a low level flasher, and does not have any protection thru Fastboot or EDL, to roll the "currently being installed" CHANGES TO THE FILE SYSTEM, back! It just crashes itself leaving your device with partitions mismatching, data corrupted, and chaos ensuing cuz you might have a new kernel, custom recovery, and old stock image all simultaneously existing on your main partition. You see how that would be a nightmare? And with Oneplus starting to push security updates without permission, you will slowly see more and more Fastboot functionality removed, until its like my 10T 5G - that has NO fastboot at all other than "FASTBOOTd" which is actually just a glorified recovery. No flashing capability, unless specific permissions are enabled in the HAL config... (which cant be done without unlocked bootloader, root, and a bootable device!)

But make no mistake... they are coming for your bootloader! If you havent unlocked and you are considering, i would advise EVERYONE to flip that dev option toggle, and unlock while you can! Cuz once they remove your access to fastboot, you are at the mercy of hoping an exploit becomes available to circumvent system checks, and let you downgrade. Although most downgrades will STILL keep the radio fw and others used for informing the OS that you have updated those components. Heres more about DM-Verity, but make note, that EVERY Android 12 device, (android 11 and 10 as well) has DM-Verity ENABLED from the factory. So all you bootloader unlocking, custom recovery flashing, ROM flashing ladies and gents out there, ALWAYS REMEMBER to read the details, and responses from ppl who might be having problems, cuz not one problem with these devices is UNIQUE! Some ppl may just not have attempted whatever triggers the error. But 'DM-VERITY' will brick your device, mid flash if it doesnt get the response it was expecting, to verify that your partitions arent corrupt or modified!

To me, THIS would almost definitely apply to your situation, because ESPECIALLY Samsung devices, but others as well, have DM-verity, and VB_meta active, and those are parts of the Trust Zone's secure boot library! And if they dont like what you're doing, they will MAKE SURE that you are stopped, and also make sure that you can never do it again! ( or at least make it damn hard to try again, such as what it sounds like is happening to you!

Hope some of that info helped you discover what may be the problem.

DM-Verity
 

ScarletWizard

Senior Member
Aug 31, 2022
251
34
OnePlus Nord N20 5G
im afraid to attempt root. today i unlocked bootloade. i have the oct 5 OTA update. has any achieved root with the latest ota update


UPDATE. I have Lineos sideloaded with DSU 1.02 feb 18


DOES THISMEAN IM ROOTED TEMP? AND MAY SOMONE show me a guide to back up partiton


apparently im not rooted, The GSI is not prerooted?

where can i get a prerooted GSI?
 

Attachments

  • about phone 1.jpg
    about phone 1.jpg
    217.2 KB · Views: 7
  • platform-tools  files used 2.png
    platform-tools files used 2.png
    51.8 KB · Views: 8
  • platform-tools DSU ADB 1.png
    platform-tools DSU ADB 1.png
    31.6 KB · Views: 8
  • 7 digit serial bug.jpg
    7 digit serial bug.jpg
    176 KB · Views: 7
  • a but phones 2.jpg
    a but phones 2.jpg
    110.1 KB · Views: 6
  • device unlocked locked proof.jpg
    device unlocked locked proof.jpg
    273.1 KB · Views: 7
  • DSU GSI installing.jpg
    DSU GSI installing.jpg
    274.6 KB · Views: 7
  • LineageOS.png
    LineageOS.png
    566.9 KB · Views: 7
  • network unlocked status locked.jpg
    network unlocked status locked.jpg
    219 KB · Views: 7
  • oemunlocked.jpg
    oemunlocked.jpg
    235.5 KB · Views: 5
  • OTA CURRENT oct 5.jpg
    OTA CURRENT oct 5.jpg
    176.3 KB · Views: 8
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    im afraid to attempt root. today i unlocked bootloade. i have the oct 5 OTA update. has any achieved root with the latest ota update


    UPDATE. I have Lineos sideloaded with DSU 1.02 feb 18


    DOES THISMEAN IM ROOTED TEMP? AND MAY SOMONE show me a guide to back up partiton


    apparently im not rooted, The GSI is not prerooted?

    where can i get a prerooted GSI?lin
    So I think lineage has a version that's prerooted I may be wrong tho.... I'm almost positive they do tho. Look for a version that has bgs or bvs ... Also u need phussons su binary/root app for it to work in any of the roms using phhusson patches which I believe lineage posted on the phusson GSI GitHub page DOES. U won't use magisk with it. But u will use magisk later after pulling your partitions it that's the route you choose to go in rooting ur device and since there are no roms built yet it seems to be nearly the only option for now but u need the root app for root to work in those gsi's as it's not included even if it's prerooted. I used crdroid which was rooted by default and I can't remember if I had to use the phusson root app/su binary or not but I think maybe I didn't need to with crdroid it's been a while tho so I can't recall...... If u look at the notes when downloading the lineage gsi it tells u that the root app isnt installed by default or the GSI doesn't come with it even tho it's prerooted and u need it to handle root requests
    1
    So I think lineage has a version that's prerooted I may be wrong tho.... I'm almost positive they do tho. Look for a version that has bgs or bvs ... Also u need phussons su binary/root app for it to work in any of the roms using phhusson patches which I believe lineage posted on the phusson GSI GitHub page DOES. U won't use magisk with it. But u will use magisk later after pulling your partitions it that's the route you choose to go in rooting ur device and since there are no roms built yet it seems to be nearly the only option for now but u need the root app for root to work in those gsi's as it's not included even if it's prerooted. I used crdroid which was rooted by default and I can't remember if I had to use the phusson root app/su binary or not but I think maybe I didn't need to with crdroid it's been a while tho so I can't recall...... If u look at the notes when downloading the lineage gsi it tells u that the root app isnt installed by default or the GSI doesn't come with it even tho it's prerooted and u need it to handle root requests
    Also as a side note if u want ur virtual/sideloaded system to be RW as in being able to make changes to )system u need to grab one that doesn't have "secure" in the filename... Yes I think people have rooted the October update.. but don't quote me on that.... The worst that can happen is it doesn't boot and u just reflash the original boot image. And since you were sure to play it safe and backup ALL of your partitions while in prerooted GSI, you should have a copy of it
    1
    Also for those of you having issues with DSU sideloader not working or failing after one attempt. I found out today that the issue is probably because there's no automated cleanup of the virtual B partitions inside of super. So when you update or sideload a GSI, the _cow files from an update or DSU get left behind and there's no room for the new GSI to install. If your rooted already you can delete the _cow files in super and should solve the issue hopefully. If you get a chance to install a GSI try to dump your partitions immediately so that in case you need to reinstall a GSI or whatever later without root, you could probably dump the super with some tools and delete the cow files and repack it and flash super...

    As for what to use for dumping your firmware I suggest using Partitions Backup & Restore by wanam either grab it on playstore or apkmirror or APKPure
  • 2
    Hello, I just wanted to post this as an answer to many questions regarding not being able to use DSU to install a GSI for testing or gaining root.
    The DSU install in developer options is NOT what we are using for installing GSI's temporarily for pulling boot images. And wont work for that.
    You can use DSU sideloader to install GSI's tempoarily or use the sticky feature to make it semi-permanent. but if you plan on using the GSI long term make sure to set your userdata to a reasonable size because your gonna want to install apps and download things. take note that if you dont use the sticky feature, once you reboot the phone it goes back to your regular stock OS or whatever you were running on before and you lose everything in the GSI that you havent saved to external media/sdcard/cloud. If you use the sticky feature you can reboot the phone and retain the GSI installation.

    *This is NOT mine and i take absolutely NO credit for it and am just providing it here to make it easy to find for other N20 users and newcomers looking to pull their boot images to patch with magisk and root OR for testing GSI's.
    If you want a permanent GSI install you will need to flash. BUT that being said, i have used the sticky feature to stay in a GSI for a few weeks. Definitely gonna want to set that user data pretty high if you wanna stay in one long term. This isnt the best way to install a GSI if you plan on staying in it permanently but it would work if you want to keep your stock installed in case of system failure for some reason.... Best to pull a FULL system backup while in a rooted GSI and save it to your PC or in the cloud.........PLEASE make that your #1 priority once you get root because NOBODY can help you restore your EFS partitions should you screw those up. They contain your IMEI and device-specific info that you cant get ANYWHERE else and NEVER will be able to either.
    My suggestion is to install a prerooted GSI, then use Partitions Backup & restore app found here https://www.apkmirror.com/apk/wanam/partitions-backup/ or on playstore and change options to save the backups as RAW (.img) then open the folder their saved to /storage/emulated/0/Partitions Backups/ and use zarchiver or any other compression tool to compress them all into a single archive to save some space and make them easier to manage and/or upload....... (you may want to change screen timeout/'turn off display after' in android settings to 30 mins to keep the screen from turning off while you do your backup because it takes a while (your stock full backup will be about12gb after all the .img's are compressed)...

    Now heres where you can find DSU sideloader and also a copy/paste from the github page:

    DSU Sideloader​


    A simple app made to help users easily install GSIs via DSU's Android feature.


    preview


    Requirements​


    • Android 10 or higher
    • Unlocked Bootloader
    • Device with Dynamic Partitions
    • A GSI you want to use!

    Community GSIs: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list


    Google GSIs: https://developer.android.com/topic/generic-system-image/releases


    *Remember to use GSIs compatible with your architeture, vndk implementation..


    You don't need root to use this app, however, running on non-rooted devices, requires adb (you will be prompted to run a shell script to invoke DSU installation activity)


    Rooted devices via Magisk, should be running Magisk v24 or higher, older versions may break DSU feature.


    We highly recommend using this app with Stock ROM, Custom ROMs aren't supported.


    How to use?​


    1. Install app
    2. When opening for the first time, you need to give read/write permission to a folder, create a new folder and allow access
      *this folder will be used to store temporary files, like extracted GSIs from compressed files)
    3. Select a GSI to install
      *accepted formats are: gz, xz and img
    4. You can customize installation as you want
      *like changing userdata size for dynamic system
      *changing gsi file size is not recommended (let app do it automatically)
    5. Tap on "Install GSI via DSU"
    6. Wait until finishes! (it may take a some time)
    7. Once it finishes, next step may vary:
      • On rooted devices, DSU screen will appear, prompting you to confirm installation, after that, check your notifications, DSU should start installing GSI
      • On non-rooted devices, you will be prompted to run a command in adb, once you run, DSU screen will appear asking you to confirm installation, after that, DSU should start installing GSI
    8. Once dynamic system is ready, you can boot it through notifications

    Other information​


    • DSU feature may be broken in some ROMs.
    • gsid does not let you install GSIs via DSU when you have less than 40% of free storage.
    • gsid checks if selected GSI size is multiple of 512 (preventing corrupted system images).
    • If you have disabled/debloated system apps, make sure "Dynamic System Updates" app is not disabled.
    • To use "ADB mode" on rooted device, deny root permission.

    About DSU​


    DSU (Dynamic System Updates), is a feature introduced on Android 10, that let developers boot GSIs without touching current system partition, this is done by creating new partitions to hold a GSI and a separated userdata, to boot on them when desired.


    Unfortunelly, DSU depends on Dynamic Partitions (your device need to support, otherwise, won't work), and most GSIs requires unlocked bootloader to get them booting properly (since only OEM-Signed GSIs are allowed to boot on locked bootloader).


    GSIs can be installed via DSU without root access, using ADB, running some commands, you can read more about installation process here: https://developer.android.com/topic/dsu


    Once installation finishes, Android creates a persistent notification allowing you to boot into "Dynamic System" (GSI installed via DSU), and you can boot into installed GSI, without touching your system partition, or breaking the "real userdata" partition.


    After booting Dynamic System, you can try and test whatever you want, when you need to switch back to device's original system image, everything you need to do, is just, a simple reboot!


    When doing a long test, that may requires lots of reboots, this can be a pain, however, is possible to enable "sticky mode", that enforces dynamic system, instead of device's original system image, once tests are done, you can disable sticky mode and return to original system image.


    That is basically a quickly explanation about DSU, a amazing feature, like a "dual-boot" solution, limited, however, very safe (since no read-only partition will be modified, and if GSI does not boot, just a simple reboot will return you to the original device's system image).


    You can read more about DSU here: https://source.android.com/devices/tech/ota/dynamic-system-updates


    How to enable Sticky Mode?​


    Reboot to Dynamic System, and:


    • use this command on adb: adb shell gsi_tool enable
    • or from local adb shell: gsi_tool enable
    • or from local rooted shell (eg. Termux on rooted GSI): su -c 'gsi_tool enable'

    When sticky mode is enabled, device will always boot into dynamic system, instead of device's original system image.


    To disable, use the same command, instead of enable , use disable


    ****Special Thanks To VegaBobo for this awesome app to make this a simple process And to AndyYan for the suggestion!!***

    DSU Sideloader GitHub main:

    DSU Sideloader Github Releases(downloads) [**Most will want to use the app-release.apk NOT app-debug.apk**]:

    Partitions Backup & Restore:
    or on playstore at https://play.google.com/store/apps/details?id=ma.wanam.partitions


    Please consider donating to the developers who work hard and spend their valuable time to provide these awesome apps/mods that bring joy to your life!


    ****Special Thanks To VegaBobo for this awesome app to make this a simple process And to AndyYan for the suggestion and time spent on mods/ROMs!!***
    Also shout out to Wanam for this awesome backup tool thats STILL relevant and working as great as ever.

    11/11/2022: received response from developer about the issues with DSU sideloader failing
    2
    I was able to get this to work a couple of times, but now every installation attempt immediately fails. My bootloader is unlocked and I have tried other images as well, even unzipping as a raw system image to expedite the process. BUT... for the life of me, I just cannot get an install to actually finish anymore. I have tried doing a complete system format and wipe, to no avail. I have seen a couple of other people who have had this problem but can't find a solution anywhere. Any help would be much appreciated. Thanks

    As an aside, I have not installed any updates so it SHOULD be working. If I can figure out the issue I'll post the solution.
    1
    ok if theres no dsu option in dev options then you likely cant use this as its a wrapper that lets you use that built-in function for sideloading things that Arent approved by the3 manufacturer
    1
    Have you rooted the device
    Your not alone in that, as ever since not long after rooting the device/modifying bootloader I haven't been able to sideload gsi's either. Not really sure what the issue is. But I'm pretty sure I never had that issue until another "system update" was available. So I'm not sure if it has anything to do with the system update that's been downloaded and that is always trying to install but failing being the culprit of DSU failing or not but that's my latest theory. If anyone knows where the updates are downloaded to maybe that would be a good place to start, by deleting the downloaded update and getting updates completely disabled so it's not perpetually attempting to install a system update that will never succeed so long as your not completely stock. It seems looking over other threads for previous devices that others had this issue until updating to latest security patch. So this seems the likely culprit. Probably just need to delete the update that's waiting to be installed and sideload the gsi using DSU sideloader before it has a chance of attempting to update again