Skip to content

App Backup

thejaustin edited this page Sep 19, 2026 · 1 revision

App Backup & Restore

App Backup lets Shizuku+ back up and restore installed apps — APKs (including split APKs), app data, external/OBB data, runtime permissions, and enabled/frozen state — using the privileged service instead of root. It's the engine behind Shizuku+'s backup screen and is exposed to developers as the IBackupRestorePlus API.

Because it runs at shell UID (2000), it can reach far more than a normal app's own sandbox — but Android's own backup rules still apply in places (see Data backup on Android 12+).

What it can back up

Component How it's captured
APK + splits Resolves every APK path for a package (base + config splits) and streams them out, so the exact installed variant can be reinstalled.
App data On Android 11 and older, via the framework bu backup pipe. See the caveat below for Android 12+.
External data tar of /sdcard/Android/data/<package>.
OBB data tar of /sdcard/Android/obb/<package>.
Runtime permissions Captures the granted-permission set and re-applies it on restore.
Enabled/frozen state Records whether an app is disabled/frozen so restore can reproduce it.

It can also enumerate installed packages with rich metadata (version name/code, source dir, data dir, UID, target SDK, system/debuggable/allow-backup flags, frozen state) and report per-app data size via dumpsys diskstats.

Restoring

Restore reverses the capture:

  • APKs are reinstalled through a streaming PackageInstaller session (createInstallSession → writeApkToSession → commitInstallSession), including all splits.
  • App / external / OBB data is un-tar'd back into place.
  • Permissions are re-granted (via the Android-17-aware compat layer, with a pm grant fallback).
  • Frozen/disabled state is re-applied with setApplicationEnabledSetting (with a pm disable-user fallback).

Freeze / unfreeze

Beyond backup, the same API can freeze (disable) and unfreeze an app without uninstalling it — useful for parking apps you don't want running. Freezing uses setApplicationEnabledSetting(DISABLED_USER) with a pm disable-user fallback; isAppFrozen reports current state.

Data backup on Android 12+

Google closed the bu backup/bu restore transport for app data starting with Android 12 (SDK 32). On those versions:

  • APK, external data, OBB data, permissions, and freeze state still work — those don't depend on bu.
  • Internal app data backup via bu returns nothing. This is an OS restriction, not a Shizuku+ bug, and affects every rootless backup tool the same way.

For full internal-data backup on Android 12+, an app must either support its own export, or the device must have real root. Shizuku+ backs up everything shell UID is permitted to reach.

Backup Manager (bmgr) hooks

The API also surfaces the system Backup Manager: check whether backup is enabled, trigger a bmgr backup, list backup sets, and read the active transport. These drive Android's own cloud/local backup framework rather than the file-level capture above.

Notes & caveats

  • Storage location — external/OBB captures read from /sdcard/Android/data and /sdcard/Android/obb; on Android 16 / One UI 8 that path is locked down for normal apps, but the privileged service (and the Storage Bridge) can still read it.
  • allowBackup=false apps — apps that opt out of backup in their manifest limit what any backup tool, including this one, can pull for internal data.
  • Reinstalled splits must match — restoring an app onto a different ABI/density device may skip incompatible config splits; the base APK still installs.

Related

Clone this wiki locally