This repository is used to record and maintain ID values for various service call commands in the Android system. These ID values are crucial when using the Shizuku framework for system-level operations, especially when directly calling system service methods.
- 🔍 Record System Service Call IDs: Maintain calling IDs for various system service methods across different Android versions and devices
- 📱 Support Shizuku Development: Provide accurate service call parameters for developers using the Shizuku framework
- 🔄 Version Compatibility: Help handle potential differences in service call IDs between different Android versions
- 📋 Backup & Recovery: Serve as a backup and reference data source for system service call IDs
Each JSON file is named after device model or Android version, containing service call ID mappings for that device/version:
{
"getSubscriberId": 8,
"getSubscriberIdForSubscriber": 10,
"setDefaultDataSubId": 31,
"setSimPowerState": 185
}- Key: System service method name
- Value: Corresponding service call command ID
This is the most accurate and detailed method for obtaining system service call IDs:
# Extract framework.jar file from device
adb pull /system/framework/framework.jar-
Download Bytecode-Viewer
- Visit Bytecode-Viewer GitHub
- Download the latest jar file
-
Open framework.jar
# Launch Bytecode-Viewer java -jar BytecodeViewer-2.11.2.jar -
Locate Service Interfaces
- Unzip framework.jar
- Drop classes.dex to Bytecode-Viewer
- Navigate to relevant system service interfaces, such as:
com/android/internal/telephony/ITelephony.classcom/android/internal/telephony/ISub.classcom/android/internal/telephony/IPhoneSubInfo.class
-
Find Transaction IDs Look for transaction constant definitions in interface classes, typically in this format:
public static final int TRANSACTION_getSubscriberId = 8; public static final int TRANSACTION_setDefaultDataSubId = 31;
- Record all relevant TRANSACTION constants
- Organize by service type
- Create corresponding JSON files
# Direct testing using service call command
adb shell service call phone 8 i32 1 # getSubscriberId for subId=1Welcome to contribute new device data to this repository:
- Fork this repository
- Analyze your device using Bytecode-Viewer:
- Extract framework.jar
- Use Bytecode-Viewer to find transaction IDs
- Create JSON files to record results
- Submit Pull Request: Please specify device model, Android version, build version, etc. in PR
Device model: [Manufacturer]/[Model].json (e.g., Xiaomi/25053RT47C.json)
- Bytecode-Viewer: Main analysis tool, supports DEX, JAR, APK and other formats
- ADB: Android Debug Bridge, used for extracting system files
- Version Differences: Service call IDs may be completely different between Android versions
- OEM Customization: OEM manufacturers may modify system services, causing ID changes
- API Level: New Android API levels may introduce new service methods or modify existing IDs
- Permission Requirements: System service calls require appropriate permissions, recommended to use with Shizuku
- Testing Verification: Please verify ID validity on target devices before use
A: Bytecode-Viewer can directly read DEX files, provides clear class structure views, and can simultaneously display bytecode and decompiled Java code, making it convenient to find transaction IDs.
A: You can use the adb shell service call command for testing and verification.
A: Usually AOSP devices with the same Android version have identical IDs, but OEM manufacturers may have custom modifications.
- Bytecode-Viewer - Java bytecode analysis tool
This project is licensed under the MIT License.
💡 Tip: If you find any issues or have new data to add, feel free to submit an Issue or Pull Request!