Short Answer:
No, there is no officially documented or manufacturer-supported API (e.g., Samsung, Xiaomi, Huawei) that allows remote USSD execution over Wi-Fi without installing an app. While manufacturers sometimes include proprietary APIs for device management (e.g., Samsung Knox, Xiaomi Mi APIs), these require app integration and explicit user permissions. Undocumented "backdoors" or exploits are not reliable, ethical, or scalable solutions.
Key Considerations
-
Manufacturer APIs:
- Samsung Knox, Xiaomi ADB/Fastboot Tools, and Huawei HMS Core provide advanced device management features, but they:
- Require an app to be installed.
- Need permissions granted by the user (e.g.,
CALL_PHONE, SYSTEM_ALERT_WINDOW).
- Are designed for enterprise/developer use, not remote execution via Wi-Fi.
-
Undocumented Features:
- While Android has hidden APIs (e.g., via reflection or
@hide annotations), these:
- Are inaccessible without root access or a signed system app.
- Often patched in newer Android versions.
- Cannot be triggered remotely over Wi-Fi without a receiver app.
-
Carrier-Specific Tools:
- Mobile carriers sometimes use proprietary tools (e.g., OTA provisioning), but these are locked to carrier infrastructure and not exposed for third-party use.
-
Security Restrictions:
- Android blocks direct USSD automation for security reasons. Even if a manufacturer API existed, it would require explicit user consent or system-level privileges.
Closest Alternatives
If you absolutely cannot use ADB or install apps, these are the only options (with major caveats):
-
Physical Automation:
- Use robotics or hardware tools (e.g., USB-controlled robotic arms) to physically press buttons on devices.
- Limitations: Expensive, impractical for scaling.
-
Wi-Fi Direct + Accessibility Hacks:
- Use Wi-Fi Direct to send commands and exploit Android’s Accessibility Service to automate dialer input.
- Limitations:
- Requires manual Accessibility Service enablement on each device.
- Not truly "remote" (needs initial setup).
-
Enterprise Device Provisioning:
- Use QR code-based zero-touch enrollment (e.g., Google’s Android Zero-Touch) to push configurations.
- Limitations:
- Requires MDM/EMM solutions (e.g., Hexnode, Miradore).
- Still needs user cooperation and app-like profiles.
Why No "Secret" API Exists
- Security Risks: Remote USSD execution could drain balances, change carrier settings, or leak sensitive data (e.g., IMEI).
- Privacy Laws: Manufacturers avoid exposing such APIs to comply with regulations like GDPR.
- Carrier Control: USSD codes are tied to carrier infrastructure, not device firmware.
Final Recommendation
If your goal is enterprise-scale automation (e.g., testing USSD responses on multiple devices):
- Use ADB over Wi-Fi with a script to execute:
adb shell am start -a android.intent.action.CALL -d tel:%23%23006%23
- Deploy a minimal app (e.g., via MDM) to handle USSD requests via HTTP/MQTT.
- For unmanaged devices, manual interaction (e.g., QR codes with
tel: links) is unavoidable.
No manufacturer or Android version provides a "magic" solution here—security and user consent are foundational to mobile OS design.