feat(rooted-debugging): add support for rooted debugging#12
feat(rooted-debugging): add support for rooted debugging#12pixincreate merged 3 commits intomainfrom
Conversation
this feature will only be visible on userdebug and eng builds
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Khmer (Central) translation along with an ADB root feature that is available only on userdebug and eng builds.
- Introduces a new ADB_ROOT setting and related UI changes in SettingsFragment.
- Adds ADB root command handling in AdbWirelessHelper and a new root() function in AdbClient.
- Updates ShizukuSettings by adding the ADB_ROOT constant and reordering the LaunchMethod annotation.
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| manager/src/main/java/moe/shizuku/manager/settings/SettingsFragment.kt | Added ADB_ROOT preference and modified visibility based on build type. |
| manager/src/main/java/moe/shizuku/manager/adb/AdbWirelessHelper.kt | Integrated ADB_ROOT checks with duplicate ADB root command execution logic. |
| manager/src/main/java/moe/shizuku/manager/adb/AdbClient.kt | Introduced a new root() function to handle the ADB root command. |
| manager/src/main/java/moe/shizuku/manager/ShizukuSettings.java | Added ADB_ROOT constant and restructured LaunchMethod annotation. |
Files not reviewed (2)
- manager/src/main/res/values/strings.xml: Language not supported
- manager/src/main/res/xml/settings.xml: Language not supported
There was a problem hiding this comment.
Pull Request Overview
This PR introduces rooted debugging support for Shizuku by adding an ADB_ROOT setting and related functionality. Key changes include updates in the SettingsFragment to show a debug option on userdebug/eng builds, integration of ADB_ROOT handling in the AdbWirelessHelper and AdbClient modules, and documentation updates in the README.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| manager/src/main/java/moe/shizuku/manager/settings/SettingsFragment.kt | Introduces a new TwoStatePreference for ADB_ROOT and updates visibility and change listener logic for rooted debugging. |
| manager/src/main/java/moe/shizuku/manager/adb/AdbWirelessHelper.kt | Adds a new helper method to execute ADB root commands when the ADB_ROOT setting is enabled and invokes it within the startShizukuViaAdb flow. |
| manager/src/main/java/moe/shizuku/manager/adb/AdbClient.kt | Implements a root() function to handle the ADB daemon’s switch to root privileges. |
| manager/src/main/java/moe/shizuku/manager/ShizukuSettings.java | Adds the ADB_ROOT constant and reorders the LaunchMethod annotation definition. |
| README.md | Documents the new Rooted-Debugging feature and other additional fork features. |
Files not reviewed (2)
- manager/src/main/res/values/strings.xml: Language not supported
- manager/src/main/res/xml/settings.xml: Language not supported
Comments suppressed due to low confidence (1)
manager/src/main/java/moe/shizuku/manager/settings/SettingsFragment.kt:135
- [nitpick] The onPreferenceChangeListener for adbRoot only checks the type of newValue and returns a boolean without handling any side effects. Consider enhancing this listener to trigger any necessary actions or to log unsuccessful updates if that behavior is intended.
adbRoot.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _: Preference?, newValue: Any ->
this feature will only be visible on
userdebugandengbuilds.do note that this feature has not been tested.Currently translated at 76.2% (93 of 122 strings)
closes #1