Dynamic System Update(DSU)


Dynamic System Updates (DSU) is a system feature introduced in Android Q that does the following:

  • Downloads a new GSI (or other Android system image) onto your device
  • Creates a new dynamic partition.
  • Loads the downloaded GSI onto the new partition.
  • Boots the GSI as a guest OS on the device.

DSU also enables developers to freely switch between the current system image and the GSI so you can try GSI without risking corruption of the current system image.

DSU Requirements

DSU depends on the Android Dynamic Partition feature and requires the GSIs to be signed by Google or your OEMs as a trusted system image.

DSU is a feature provided by your device’s manufacturer. Please refer to your device manufacturer’s support page for availability. Google has enabled DSU on Pixel 3 and Pixel 3 XL devices as of Android Q Beta 4 release.

Using DSU

This section describes how to use DSU.

Enable DSU Feature flag

Before using DSU, be sure the corresponding feature flag is enabled. You can enable the flag through one of the following methods:

  • With a userdebug Android OS, enable DSU by enabling settings_dynamic_android under the Feature Flags setting within Developer Options.
  • Use the following adb command:

    adb shell setprop persist.sys.fflag.override.settings_dynamic_system 1

Note: If you are using a userdebug Android build, you can also enable the feature in Settings > System > Developer options > Feature flags > settings_dynamic_android.

Start DSU

After the feature is enabled, launch DSU using the adb tool.

  1. Download Q GSI from the GSI preview page or other GSI image server.

    Note: If you build your GSI, or if you download a GSI from a separate image server, your GSI might not be in unsparse format. In that case, use the following command inside your build tree to convert to an unsparse image:

    simg2img system.img system_raw.img
  2. Launch DSU using adb:

    gzip -c system_raw.img > system_raw.gz
    adb push system_raw.gz /storage/emulated/0/Download/
    adb shell am start-activity \
    -n com.android.dynsystem/com.android.dynsystem.VerificationActivity  \
    -a android.os.image.action.START_INSTALL    \
    -d file:///storage/emulated/0/Download/system_raw.gz  \
    --el KEY_SYSTEM_SIZE $(du -b system_raw.img|cut -f1)  \
    --el KEY_USERDATA_SIZE 8589934592

You should see something similar to the following inside your device's notification drawer:

DSU Menu

Boot into GSI

After DSU installs the GSI, you should see a DSU menu inside the system notification drawer, as shown below:

DSU Menu

Here you can do the following:

  • Boot into the GSI with RESTART
  • Clean up the GSI with DISCARD

Switch back to the original OS

After you are done with the GSI for your application validation, you can simply do a code reboot, and the system will boot back into the original OS.

If you want the next reboot to use a GSI, you can change the GSI sticky flag with the following adb command:

Enable sticky mode:

adb shell gsi_tool enable

Disable sticky mode:

adb shell gsi_tool disable
adb shell gsi_tool enable -s
adb shell gsi_tool disable

DSU Restrictions

Currently DSU cannot install images larger than 1.5 GB.

Additional Information

DSU is in an early experimental stage. We welcome your thoughts about DSU. Please file bugs for any issues that you encounter, or let us know via social media channels such as Reddit or Stack Overflow.