200字
一个public引发的惨案
2025-08-18
2025-10-01

While developing the Shizuku API, the compiled APK showed no response and no error when calling Shizuku.bindUserService. I spent nearly five hours troubleshooting:

Due to an oversight when converting from Kotlin to Java, I declared the top-level UserService class using something like class UserService extends IUserService.Stub. Unlike Kotlin, Java's top-level classes default to package-private access. Because they're so niche they're accessible to the entire package by default, so there were no error messages in the project. However, the system logcat was empty. Even more frustrating, installing the modified APK over the original didn't change the results; I had to uninstall and reinstall it.

Without any logs, the painful debugging experience fully exposed my technical shortcomings (considering proper package separation could have avoided these issues) and the clumsiness of Java. I still have a long way to go.

一个public引发的惨案
Author
Sunight
Published at
2025-08-18
License
CC BY-NC-SA 4.0

Comment