[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1779":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},1779,"Shizuku","RikkaApps\u002FShizuku","RikkaApps","Using system APIs directly with adb\u002Froot privileges from normal apps through a Java process started with app_process.",null,"https:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku","Kotlin",26199,2493,456,354,0,52,314,1224,242,45,false,"main","2026-06-12 02:00:32","# Shizuku\n\n## Background\n\nWhen developing apps that requires root, the most common method is to run some commands in the su shell. For example, there is an app that uses the `pm enable\u002Fdisable` command to enable\u002Fdisable components.\n\nThis method has very big disadvantages:\n\n1. **Extremely slow** (Multiple process creation)\n2. Needs to process texts (**Super unreliable**)\n3. The possibility is limited to available commands\n4. Even if ADB has sufficient permissions, the app requires root privileges to run\n\nShizuku uses a completely different way. See detailed description below.\n\n## User guide & Download\n\n\u003Chttps:\u002F\u002Fshizuku.rikka.app\u002F>\n\n## How does Shizuku work?\n\nFirst, we need to talk about how app use system APIs. For example, if the app wants to get installed apps, we all know we should use `PackageManager#getInstalledPackages()`. This is actually an interprocess communication (IPC) process of the app process and system server process, just the Android framework did the inner works for us.\n\nAndroid uses `binder` to do this type of IPC. `Binder` allows the server-side to learn the uid and pid of the client-side, so that the system server can check if the app has the permission to do the operation.\n\nUsually, if there is a \"manager\" (e.g., `PackageManager`) for apps to use, there should be a \"service\" (e.g., `PackageManagerService`) in the system server process. We can simply think if the app holds the `binder` of the \"service\", it can communicate with the \"service\". The app process will receive binders of system services on start.\n\nShizuku guides users to run a process, Shizuku server, with root or ADB first. When the app starts, the `binder` to Shizuku server will also be sent to the app.\n\nThe most important feature Shizuku provides is something like be a middle man to receive requests from the app, sent them to the system server, and send back the results. You can see the `transactRemote` method in `rikka.shizuku.server.ShizukuService` class, and `moe.shizuku.api.ShizukuBinderWrapper` class for the detail.\n\nSo, we reached our goal, to use system APIs with higher permission. And to the app, it is almost identical to the use of system APIs directly.\n\n## Developer guide\n\n### API & sample\n\nhttps:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku-API\n\n### Migrating from pre-v11\n\n> Existing applications still works, of course.\n\nhttps:\u002F\u002Fgithub.com\u002FRikkaApps\u002FShizuku-API#migration-guide-for-existing-applications-use-shizuku-pre-v11\n\n### Attention\n\n1. ADB permissions are limited\n\n   ADB has limited permissions and different on various system versions. You can see permissions granted to ADB [here](https:\u002F\u002Fgithub.com\u002Faosp-mirror\u002Fplatform_frameworks_base\u002Fblob\u002Fmaster\u002Fpackages\u002FShell\u002FAndroidManifest.xml).\n\n   Before calling the API, you can use `ShizukuService#getUid` to check if Shizuku is running user ADB, or use `ShizukuService#checkPermission` to check if the server has sufficient permissions.\n\n2. Hidden API limitation from Android 9\n\n   As of Android 9, the usage of the hidden APIs is limited for normal apps. Please use other methods (such as \u003Chttps:\u002F\u002Fgithub.com\u002FLSPosed\u002FAndroidHiddenApiBypass>).\n\n3. Android 8.0 & ADB\n\n   At present, the way Shizuku service gets the app process is to combine `IActivityManager#registerProcessObserver` and `IActivityManager#registerUidObserver` (26+) to ensure that the app process will be sent when the app starts. However, on API 26, ADB lacks permissions to use `registerUidObserver`, so if you need to use Shizuku in a process that might not be started by an Activity, it is recommended to trigger the send binder by starting a transparent activity.\n\n4. Direct use of `transactRemote` requires attention\n\n   * The API may be different under different Android versions, please be sure to check it carefully. Also, the `android.app.IActivityManager` has the aidl form in API 26 and later, and `android.app.IActivityManager$Stub` exists only on API 26.\n\n   * `SystemServiceHelper.getTransactionCode` may not get the correct transaction code, such as `android.content.pm.IPackageManager$Stub.TRANSACTION_getInstalledPackages` does not exist on API 25 and there is `android.content.pm.IPackageManager$Stub.TRANSACTION_getInstalledPackages_47` (this situation has been dealt with, but it is not excluded that there may be other circumstances). This problem is not encountered with the `ShizukuBinderWrapper` method.\n\n## Developing Shizuku itself\n\n### Build\n\n- Clone with `git clone --recurse-submodules`\n- Run gradle task `:manager:assembleDebug` or `:manager:assembleRelease`\n\nThe `:manager:assembleDebug` task generates a debuggable server. You can attach a debugger to `shizuku_server` to debug the server. Be aware that, in Android Studio, \"Run\u002FDebug configurations\" - \"Always install with package manager\" should be checked, so that the server will use the latest code.\n\n## License\n\nAll code files in this project are licensed under Apache 2.0\n\nUnder Apache 2.0 section 6, specifically:\n\n* You are **FORBIDDEN** to use `manager\u002Fsrc\u002Fmain\u002Fres\u002Fmipmap*\u002Fic_launcher*.png` image files, unless for displaying Shizuku itself.\n\n* You are **FORBIDDEN** to use `Shizuku` as app name or use `moe.shizuku.privileged.api` as application id or declare `moe.shizuku.manager.permission.*` permission.\n","Shizuku 是一个允许普通应用程序通过Java进程以adb或root权限直接调用系统API的工具。其核心功能是通过在具有更高权限的情况下启动一个名为Shizuku的服务，然后让应用程序与该服务通信，从而间接地使用系统级API，而无需应用程序本身拥有root权限。这解决了传统方法中速度慢、可靠性差等问题。技术上，它利用了Android的Binder机制来实现跨进程通信，并且为开发者提供了详细的API文档和示例代码。适合需要访问受限系统功能但又不想让用户设备root的应用场景，如自动化脚本执行、系统级别调试等。",2,"2026-06-11 02:45:59","trending"]