RikkaApps / Shizuku

Using system APIs directly with adb/root privileges from normal apps through a Java process started with app_process.
Apache License 2.0
8.96k stars 531 forks source link

USB debugging will be disabled by system once Shizuku shell script is executed on HyperOS #515

Open rewired-gh opened 1 month ago

rewired-gh commented 1 month ago

Please report bugs of Shizuku itself.

Requirements:

Change "[ ]" to "[x]" if it meets the requirements.

Reports not meet the requirements will be immediately closed.

Information:

Logs:

Related full logcat.

(Not applicable)

Describe the bug:

USB debugging will be disabled by system once Shizuku shell script is executed on HyperOS.

The behavior in terminal is as follow:

> adb -d shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh

info: start.sh begin
info: attempt to copy starter from /storage/emulated/0/Android/data/moe.shizuku.privileged.api/starter to /data/local/tmp/shizuku_starter
info: exec /data/local/tmp/shizuku_starter
info: starter begin
info: killing old process...
info: apk path is /data/app/~~Qy_3cmtij5vJlitlBk2WAw==/moe.shizuku.privileged.api-kg-bWwXbxLvGcFRTrYX86A==/base.apk
info: starting server...
info: shizuku_starter exit with 0

> adb -d shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh

adb: no devices found

Also, the Shizuku service will not be successfully started despite the exit code being 0. I suspect that Xiaomi implements some sneaky detections in HyperOS to prevent Shizuku from working.

Additional context:

Add any other context about the problem here.

(Not applicable)