Repository navigation
Shizuku & Background Installation
This document explains how to set up and how Shizuku and the background installation service work in ApkUp — explained in plain, everyday language in Part 1, followed by a deep-dive technical reference for power users and developers in Part 2.
- 🟢 Part 1: Explained Simply for Everyone (Plain Language)
- 💻 Part 2: Technical Documentation for Experts & Power Users
-
❓ Part 3: Comprehensive Frequently Asked Questions (FAQ) & Common Issues
- 3.1 Do I need Root access on my phone to use Shizuku?
- 3.2 Will Shizuku void my warranty or break banking apps?
- 3.3 Why do I have to restart Shizuku after rebooting my phone?
- 3.4 Issue: "Wireless debugging" is grayed out and cannot be turned on!
- 3.5 Issue: Shizuku searches endlessly for the pairing service or the code input never appears!
- 3.6 Issue: Shizuku stops by itself in the background after a while (Xiaomi, Samsung, OnePlus)!
- 3.7 What happens if Shizuku stops while ApkUp is downloading an update?
- 3.8 Does "Update All" also work without Shizuku?
- 3.9 Why does my phone recognize apps installed via Shizuku as "Installed from Google Play Store"?
- 🔗 Part 4: Official Links & Further Resources
For security reasons, Android does not allow regular apps to silently install other apps in the background. If you start 10 updates in an app without special system permissions, Android pops up a confirmation dialog 10 times in a row ("Do you want to update this app? [Cancel] [Update]"). You have to tap every single dialog manually.
Shizuku is a free, open-source companion app for Android. It uses an official built-in Android system feature (Wireless Debugging) to grant trusted apps like ApkUp the exact same installation privileges that normally only the pre-installed Google Play Store has.
Your benefits with Shizuku in ApkUp:
- ⚡ One tap on "Update All" is enough: All available updates are downloaded and installed completely automatically in the background, without you having to tap a single confirmation popup!
- 🛡️ No Root required: Your smartphone stays completely unmodified.
On Android 11 and newer, you can set up Shizuku directly on your phone without a PC (see also the official Shizuku user guide):
-
Step 1 – Download Shizuku:
Install the official Shizuku app for free from the Google Play Store or via GitHub. -
Step 2 – Enable Developer Options:
Open Android Settings ➔ About phone. Tap the "Build number" at the bottom 7 times quickly in a row until you see the message: "You are now a developer!". -
Step 3 – Pair Wireless Debugging (one-time setup):
- Connect your phone to a Wi-Fi network.
- Open the Shizuku app and tap "Pairing" under "Start via Wireless debugging".
- Tap the "Developer options" button.
- Scroll down to "Wireless debugging", toggle it on, and tap directly on the text "Wireless debugging" to open its sub-menu.
- Select "Pair device with pairing code" and enter the displayed 6-digit code into the Shizuku notification at the top of your screen.
-
Step 4 – Start Shizuku:
Go back to the Shizuku app and tap "Start". After 2–3 seconds, Shizuku will show "Shizuku is running" at the top. (After that, you can even turn Wi-Fi off again — Shizuku will keep running!)
Open ApkUp and navigate to the Setup ➔ Installation & Permissions tab. There you will see a clear status indicator with three checkpoints:
| Status Checkpoint | Meaning | What to do if inactive? |
|---|---|---|
| 1. Shizuku installed | Checks whether the Shizuku app is installed on your phone. | Install Shizuku from the Google Play Store. |
| 2. Service running (Binder) | Checks whether Shizuku has been started in the background. | Open the Shizuku app and tap "Start". |
| 3. Permission granted | Checks whether ApkUp is allowed to access Shizuku. | Toggle the switch in ApkUp and tap "Allow all the time" in the popup. |
Once all three checkpoints light up green, all installations in ApkUp run completely silently and automatically!
Since version v1.32, ApkUp includes a dedicated background download service (Foreground Download Service):
- When you start a large update or tap "Update All", you can immediately minimize ApkUp, use other apps, or lock your screen.
- In your notification shade, you can always see which app is currently downloading, complete with a percentage progress bar and a "Cancel" button.
- With Shizuku: Apps finish installing silently even while your screen is turned off.
- Without Shizuku: As soon as the background download finishes, ApkUp sends you a notification ("Ready to install") that you simply tap once to confirm.
To guarantee maximum reliability for both single and batch updates, ApkUp uses a Dual-Path Strategy with Automatic Fallback. All installation jobs are processed sequentially through a synchronized queue (Mutex lock):
flowchart TD
Start["Installation Job (Single APK / Split Bundle)"] --> Mutex["Sequential Session Synchronization"]
Mutex --> CheckPref{"Shizuku Mode Enabled?"}
CheckPref -- "Yes" --> CheckBinder{"Shizuku Binder & Permission Ready?"}
CheckPref -- "No" --> NativePath["Standard Android PackageInstaller API"]
CheckBinder -- "Ready" --> ShizukuExec["Privileged PackageManager Shell Transaction"]
CheckBinder -- "Not Ready / Denied" --> FallbackNotice["Notice + Automatic Fallback"]
ShizukuExec --> ShizukuSuccess{"Exit Code == 0 & 'Success'?"}
ShizukuSuccess -- "Yes" --> Cleanup["Clean Temporary Files & Report Success"]
ShizukuSuccess -- "No (Error)" --> FallbackNotice
FallbackNotice --> NativePath
NativePath --> BALCheck{"App in Foreground?"}
BALCheck -- "Yes" --> DirectDialog["Open System Installer Dialog Immediately"]
BALCheck -- "No (Background / Lock Screen)" --> HeadsUpNotif["Send High-Priority Install Notification"]
DirectDialog --> Cleanup
HeadsUpNotif --> Cleanup
Communication with the privileged Shizuku server (running under system identity UID 2000 / shell or UID 0 / root) is performed via Android's Inter-Process Communication (Binder IPC):
-
Package Verification: Queries the Android
PackageManagerto verify whethermoe.shizuku.privileged.apiis registered on the device. -
Liveness Check: Synchronously verifies the remote Binder descriptor (
pingBinder()) prior to every transaction. - Reactive State Events: System listeners for Binder receipt, Binder death, and permission changes update the UI in real time whenever the Shizuku service starts or stops in the background.
When installing via Shizuku, ApkUp executes a multi-stage transaction against the Android system package manager (pm):
-
Isolated Staging & GZIP Verification:
All downloaded package artifacts (single APK, extracted
.apkmsplits, or compressed Google Play splits) are staged in the private app cache and automatically decompressed if a GZIP magic header (0x1f8b) is detected. -
Session Creation with Play Store Origin:
pm install-create -r -i com.android.vending
-
-r: Replaces the existing application while preserving all user data (INSTALL_REPLACE_EXISTING). -
-i com.android.vending: Sets the official installation origin (installerPackageName) to the Google Play Store. This ensures full compatibility with apps that verify at runtime whether they were installed from an official store source.
-
-
Streaming Package Data via Standard Input (
stdin): For each APK split file, binary data is piped directly through a file descriptor stream into thepmprocess:Piping directly overpm install-write -S <byte_size> <session_id> <split_name.apk> -
stdincleanly avoids SELinux file access restrictions on private application directories. -
Atomic Commit & Rollback Protection:
If any sub-step fails, the session is cleanly aborted via
pm install-commit <session_id>
pm install-abandon <session_id>and temporary staging files are purged.
To prevent the Android OS from terminating active downloads when the screen is off or memory pressure is high, ApkUp executes active transfers inside a protected Android Foreground Service (foregroundServiceType="dataSync"):
- Lifecycle Management: The service stays active strictly as long as downloads or installations remain in the queue and stops itself immediately afterward.
- Protection Against Background Activity Launch (BAL) Restrictions on Android 10–16: When Shizuku is not used and a download finishes while ApkUp is in the background, modern Android blocks unsolicited system dialogs from popping up. ApkUp detects this state automatically and dispatches an interactive high-priority notification so the user can launch the Android installer dialog with a single tap at their convenience.
No! Starting with Android 11, Shizuku works completely without Root using Android's built-in Wireless Debugging feature. However, if your device is rooted (e.g., via Magisk, KernelSU, or APatch), Shizuku can optionally be started directly via Root — which is even faster and requires no pairing code.
No, your warranty remains 100% intact and all banking apps continue to work normally. Because Shizuku neither unlocks the bootloader nor modifies system partitions (Root), Google's security checks (Play Integrity / SafetyNet) and Samsung Knox remain completely untouched.
If your phone is not rooted, Android terminates all debugging services whenever the device is completely powered off or restarted for security reasons.
- You do not have to repeat the 6-digit pairing process!
- After rebooting your phone, simply open the Shizuku app and tap "Start" once (takes about 3 seconds).
Cause: Android only allows enabling Wireless debugging while your smartphone is connected to a Wi-Fi network.
- Solution: Connect your phone briefly to your home Wi-Fi (or a mobile hotspot) and start Shizuku. As soon as Shizuku says "Shizuku is running", you can turn Wi-Fi off again — the service will stay active!
This behavior occurs most frequently on smartphones from Xiaomi (MIUI / HyperOS), Oppo/Realme, and Samsung:
- Notification Style (Xiaomi): Go to Android Settings ➔ Notifications & Control center ➔ Notification shade and switch it from "MIUI" to "Android" (Classic). Otherwise, the text box for entering the pairing code inside the notification cannot be expanded.
- USB Debugging (Security settings): On Xiaomi devices, open Developer options and enable "USB debugging (Security settings)" in addition to standard USB debugging.
- Notification Permission: Make sure you have granted the Shizuku app permission to display notifications.
If Shizuku stops after a few hours on its own, this is caused by aggressive OEM battery-saving policies or Android 12/13's Phantom Process Killer:
- Solution 1 (Battery Optimization): Long-press the Shizuku app icon ➔ App info ➔ Battery and select "Unrestricted".
- Solution 2 (Developer Options on Android 13+): In Developer options, enable the toggle "Disable child process restrictions".
- You can also find manufacturer-specific instructions on DontKillMyApp.com.
ApkUp will not crash and your downloaded update will not be lost! If ApkUp detects that the Shizuku service is unresponsive at the moment of installation, the app automatically and seamlessly falls back to the standard Android package installer and shows the regular Android confirmation prompt.
Yes, of course. Even without Shizuku, tapping "Update All" downloads all updates in the background. The only difference is that without Shizuku, you briefly tap "Update" in the Android system dialog for each downloaded app.
This is an intentional feature of ApkUp! When ApkUp installs an app via Shizuku, it passes the parameter -i com.android.vending (the official package identifier of the Google Play Store) to Android. Some apps otherwise refuse to run or display warnings if they detect they were updated outside the Play Store. Thanks to this attribution, all updated apps behave as if they came directly from the official store.
Starting with v1.43.0+, rooted devices (Magisk, KernelSU, or APatch) can optionally enable Root Installer (su) under Setup ➔ Installation & Automation:
-
Smart Fallback or Standalone: When both Shizuku and Root are enabled, ApkUp uses Shizuku first and seamlessly falls back to
suif Shizuku was not restarted after a reboot. If Shizuku is disabled, ApkUp usessudirectly for silent foreground and autonomous background updates (while excluding uninstalled Watchlist apps from unattended background installs). -
Pre-Install Integrity Verification & Origin Preservation: Before opening a
pm install-createsession,RootInstallerverifies all staged base and split APKs viaApkIntegrityVerifier(fail-closed) and preserves the existing installer package origin (-i). -
Interactive Root Check Bottom Sheet: Tapping the Root Installer (
su) row opens the dedicatedRootSetupBottomSheetwhere you can verify superuser availability live at any time. For security, importing a configuration backup resetsuseRootInstallertofalseuntil you re-enable it on the device. - Completely Optional: On non-rooted phones, keep this option turned off and continue using Shizuku or the normal Android installer.
- 🌐 Official Shizuku Website & Documentation: https://shizuku.rikka.app/
- 📖 Official Shizuku Setup Guide (with screenshots): https://shizuku.rikka.app/guide/setup/
▶️ Shizuku on Google Play Store: Play Store Link- 💻 Shizuku on GitHub (Open Source Code & APK Releases): https://github.com/RikkaApps/Shizuku
- 🔋 Preventing Background App Termination by Manufacturer (Samsung, Xiaomi, Pixel, OnePlus): https://dontkillmyapp.com/
- 🤖 Android Developer Documentation (Wireless Debugging): developer.android.com/tools/adb#wireless-android11-command-line