Repository navigation
fix(automation): make Turn On/Off Hotspot actually tether - #1289
Merged
Merged
Conversation
Start and stop tethering over a Shizuku binder instead of the argument-less `cmd wifi start-softap`, which failed and never shared internet anyway.
# Conflicts: # app/src/main/java/com/sameerasw/essentials/services/automation/executors/CombinedActionExecutor.kt
…ntroller - Use the Shizuku binder path only when the resolved mode is Shizuku or Porter - Add the file header and trim the comments to single lines
sameerasw
approved these changes
Oct 8, 2026
sameerasw
left a comment
Owner
There was a problem hiding this comment.
Thanks for your contributions <3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The DIY actions "Turn On / Turn Off / Toggle Hotspot" run
cmd wifi start-softap/stop-softapwith no arguments.start-softaprequires<ssid> <security> <passphrase>, so the command fails and nothing happens. Even with arguments it wouldn't help, since its help text says "the shell command doesn't activate internet tethering" (WifiShellCommand.java).New
domain/controller/HotspotControllercallsITetheringConnector.startTethering/stopTetheringthroughShizukuBinderWrapper, using the same reflection pattern asDataSimController. This is the tethering service the Settings hotspot toggle uses, so carrier entitlement checks run as usual.callingAttributionTag(ITetheringConnector.aidl).com.android.shell, which holdsTETHER_PRIVILEGED(Shell manifest).hotspot_tethering_failed).Not covered:
rootas the caller package; untested.DataSimController, this relies on Shizuku's cached service binder, which isn't re-fetched if it dies.Type of change
UI changes
None, apart from a toast when tethering fails.
Checklist
develop(notmain)../gradlew assembleDebug../gradlew testDebugUnitTest.0, anddumpsys tetheringshows Wi-FiTETHEREDwith internet sharing. Root-mode Shizuku is untested.SettingsRepositoryfor keys and getter/setter methods. (N/A, no new preferences)FeatureRegistry.ktfor search indexing. (N/A)ui/core/. (N/A)res/values/strings.xmland drawables use rounded variants (R.drawable.rounded_*).