VegaBobo / DSU-Sideloader

A simple app made to help users easily install GSIs via DSU's Android feature.
Apache License 2.0
1.48k stars 113 forks source link

How to Uninstall/Remove GSI ROM #111

Closed shuvashish76 closed 1 year ago

shuvashish76 commented 1 year ago

I've installed A14 following this guide on a non-rooted device.

The only way of removing/uninstalling GSI from your Android device was by performing a factory reset.

But it's still there even after factory reset. Checked from System settings > System > Developer options > DSU Loader

VegaBobo commented 1 year ago

I'm sorry but I didn't understand, anyway, you don't need to perform a factory reset to remove a GSI installed via DSU. Once you install a GSI via DSU, two partitions are allocated and stored in your internal storage (or sdcard if supported and present), in case of installing a GSI via DSU, two partitions will be allocated, system (containing the GSI itself) and userdata (containing a separated userdata to be used exclusively with installed GSI). When you have a installed GSI via DSU, your device will show a "Dynamic System Updates" notification, with two options, "Reboot" (that will reboot your device into installed GSI), and "Discard" (that will remove all stuff related to GSI installed via DSU, which will remove all files, and partitions related to this installation), this notification with those options are only shown when you're running your device original OS, when running a GSI installed via DSU, "Dynamic System Updates" notification will show something like "You're currently running a Dynamic System, reboot to return to original OS", with a option to reboot your device.

Then, to remove, everything you need to do is, just boot your phone into device original OS and tap on discard at "Dynamic System Updates" notification 👍. You can also remove installed DSU via command line (eg, you have dismissed the notification), with "gsi_tool wipe" command.

If you have turned on "Sticky mode" (this option is disabled by default, option that enforces booting into installed DSU, instead of original device OS), then you must disable "Sticky mode", after disabling, a reboot should bring you again to original device OS.

Feel free to ask more questions, i can take some time to answer because im pretty busy nowadays, but i highly recommend reading the README for more info.

shuvashish76 commented 1 year ago

Screenshot_20230723-080316_1

I was confused about this. I thought it's the older one but now I got it.

Android 11 introduced the DSU Loader, a tool available in the device's developer options that lets you download, install, and manage GSIs entirely through the system's UI. (source)

One more question the DSU loader of device developer option always download the latest Google GSI ? Cause it always shows Early access Android 14 version of Google GSI.


Highly recommend reading the README for more info.

Lazy me, searched (Ctrl+F or find in page) with keywords like remove, uninstall, discard. 🤦‍♂️ Suggestion add that "Discard" info to README FAQs.

You can also remove installed DSU via command line (eg, you have dismissed the notification), with "gsi_tool wipe" command.

From terminal or ADB ? Add it to FAQs, thanks 👍

VegaBobo commented 1 year ago

DSU understanding might be complicated at beginning, you can consider DSU the "implementation", DSU Loader being an official supported frontend to it, and DSU Sideloader as an alternative frontend.

DSU Loader, by default, will try to fetch available images from this prop "persist.sys.fflag.override.settings_dynamic_system.list", if this prop is not set, then it will fetch images from default DSU list, which is set to be the Google ones (if OEM doesn't change the default behavior). ref: https://cs.android.com/android/platform/superproject/main/+/main:packages/apps/Settings/src/com/android/settings/development/DSULoader.java;l=69

The default DSU list includes DSU Packages multiple Android versions, i think DSU Loader filters available DSU Packages depending on current Android version due compatibility.

I've tested on this device that runs Android 12, and seems that DSU Loader only shows packages higher than my current Android version.

screenshot_2023-07-23_00-34-17

About discarding: To discard, from device, reboot to original OS, wait for DSU notification, and tap on discard To discard, rooted device, reboot to original OS, open DSU Sideloader, tap on "discard" To discard, reboot to original OS, from adb: adb shell gsi_tool wipe To discard, reboot to original OS, from local shell (should work as shell/adb or root authority): gsi_tool wipe

shuvashish76 commented 1 year ago

If original OS rooted then do I've to root the GSI again or it automatically rooted as well?

VegaBobo commented 1 year ago

It depends on root solution and GSI, modern root solutions (like Magisk and KernelSU) commonly provides root to Android by modifying something inside boot partition, when installing a GSI, only system partition will be replaced, which means that the installed GSI via DSU will boot using your device's original boot partition, if boot partition holds a root solution, then installed GSI should be also rooted, however, there is a problem, some GSI may come rooted out-of-box with a builtin root solution, in those cases, the root solution you have inside boot partition may conflict with the one present on GSI, so, in this case, to use root properly, you should remove the builtin root solution that come with the GSI.

shuvashish76 commented 1 year ago

After restart from GSI to original OS, I noticed I can't toggle on/change "Userdata size". Which means its 1 time action, to change it you've to install the GSI again. Add info regarding this in FAQ. Thanks for your quick replies :D