feat(telephony): Add Data SIM switcher & Network Mode band locking with Shizuku reflection#565
Closed
zax4r0 wants to merge 4 commits into
Closed
feat(telephony): Add Data SIM switcher & Network Mode band locking with Shizuku reflection#565zax4r0 wants to merge 4 commits into
zax4r0 wants to merge 4 commits into
Conversation
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.
Purpose
This PR adds support for quick toggling of the Default Data SIM subscription and force locking network bands (e.g. LTE-only, 5G-only) on dual-SIM Android devices. The implementation uses Shizuku and standard Java reflection to directly interface with internal Android telephony binder stubs (
ISubandITelephony), fully bypassing hidden API restriction blocks without requiring root access.Core Features Added
ISub.setDefaultDataSubIdto instantly apply changes at the system level.setDataEnabledForReason/setDataEnabled) on the target subID on switch, preventing connection drops.setAllowedNetworkTypesForReasonmethods).TelephonyActionReceiverlistens to intent-driven commands (com.sameerasw.essentials.SET_DATA_SIMandcom.sameerasw.essentials.SET_NETWORK_MODE), enabling full automation.releasebuild types to utilize default debug signing keys for easy developer installations.TelephonyParserTest.ktto verify active SIM parsing fromdumpsys isuboutput.Commit Structure (4 Clean Commits)
be8e42b9test: Add TelephonyParserTest unit test suite & configure release signing95d5edd1feat: Add NetworkModeSettingsActivity for in-app configuration127f7b3ffeat: Add TelephonyActionReceiver for ADB controls and register services45fd9b3afeat: Add core Data SIM and Network Mode quick setting tilesManual Testing & Verification
1. Data SIM Toggle
Data SIMtile to switch data connection from Airtel to Jio and vice-versa.2. Network Mode Toggle
Network Modetile to toggle between 4G (LTE Only) and 5G (NR Only) on the active data SIM.3. Settings UI Overlay
Data SIMorNetwork Modetile.-1are successfully ignored.