Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

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.

License

Notifications You must be signed in to change notification settings

telegram-sms/shizuku-fallback-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Shizuku Fallback Code Repository

Overview

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.

Repository Purpose

  • 🔍 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

File Description

JSON File Format

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
}

Field Description

  • Key: System service method name
  • Value: Corresponding service call command ID

How to Obtain Service Call IDs

Recommended Method: Analyze framework.jar using Bytecode-Viewer

This is the most accurate and detailed method for obtaining system service call IDs:

Step 1: Extract framework.jar

# Extract framework.jar file from device
adb pull /system/framework/framework.jar

Step 2: Analyze using Bytecode-Viewer

  1. Download Bytecode-Viewer

  2. Open framework.jar

    # Launch Bytecode-Viewer
    java -jar BytecodeViewer-2.11.2.jar
    
  3. 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.class
      • com/android/internal/telephony/ISub.class
      • com/android/internal/telephony/IPhoneSubInfo.class
  4. 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;

Step 3: Extract and Record IDs

  • Record all relevant TRANSACTION constants
  • Organize by service type
  • Create corresponding JSON files

System Debugging and Testing

# Direct testing using service call command
adb shell service call phone 8 i32 1  # getSubscriberId for subId=1

Contribution Guide

Welcome to contribute new device data to this repository:

  1. Fork this repository
  2. Analyze your device using Bytecode-Viewer:
    • Extract framework.jar
    • Use Bytecode-Viewer to find transaction IDs
    • Create JSON files to record results
  3. Submit Pull Request: Please specify device model, Android version, build version, etc. in PR

File Naming Convention

Device model: [Manufacturer]/[Model].json (e.g., Xiaomi/25053RT47C.json)

Required Tools

  • Bytecode-Viewer: Main analysis tool, supports DEX, JAR, APK and other formats
  • ADB: Android Debug Bridge, used for extracting system files

Important Notes

⚠️ Important Reminders:

  • 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

Frequently Asked Questions

Q: Why choose Bytecode-Viewer?

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.

Q: How to verify if extracted IDs are correct?

A: You can use the adb shell service call command for testing and verification.

Q: Are IDs the same across different devices?

A: Usually AOSP devices with the same Android version have identical IDs, but OEM manufacturers may have custom modifications.

Related Projects

License

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!

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published