Under your constraints (no app installation, no ADB, and Wi-Fi communication), there is no direct, reliable, or officially supported method to programmatically trigger USSD codes on multiple Android devices. Here’s why:
Key Challenges
-
USSD Codes Require Dialer App Interaction:
- USSD codes (e.g.,
*#06#) must be executed through the native dialer app. This requires user interaction or a system-level API call (which apps need permissions for).
-
No App on the Device:
- Without an app to receive commands (via Wi-Fi, TCP/IP, etc.), there’s no way to automate the dialer or bypass user interaction.
-
Security Restrictions:
- Android intentionally blocks remote execution of sensitive actions (like dialing) to prevent abuse.
Possible Workarounds (With Caveats)
1. Web-Based Automation (Limited to User Interaction)
- Create a webpage that opens a
tel: link (e.g., <a href="tel:*%2306%23">Dial USSD</a>).
- Host it locally on your Wi-Fi network and ask users to open the link manually.
- Limitations:
- Requires users to click the link individually.
- Not fully automated; impractical for multiple devices.
2. Google Assistant/Google Home Integration
- Use voice commands like "Hey Google, dial *#06#" on devices linked to the same Google account.
- Limitations:
- Requires Google Assistant enabled and voice match.
- No programmatic control; manual setup per device.
3. MDM (Mobile Device Management) Solutions
- Enterprise MDM tools like VMware Workspace ONE or Microsoft Intune can sometimes enforce dialer actions via policies.
- Limitations:
- Requires device enrollment (admin privileges).
- May still lack direct USSD support.
4. QR Code Scanning
- Generate QR codes containing
tel:*#06# and ask users to scan them with their dialer apps.
- Limitations:
- Relies on manual user action.
- Not scalable for automation.
Recommended Solutions (If Constraints Relaxed)
-
ADB Over Wi-Fi:
-
Pre-Install a Lightweight App:
- Develop a minimal app that listens for Wi-Fi commands (e.g., via HTTP) and triggers USSD codes. Install it once on all devices.
- Pros: Full automation.
- Cons: Initial app installation required.
Conclusion
Without ADB or a pre-installed app, there’s no practical way to automate USSD codes on multiple Android devices over Wi-Fi. To achieve this, you’ll need to relax at least one constraint:
- Use ADB over Wi-Fi (most reliable).
- Deploy a companion app once (minimal setup).
- Use enterprise MDM tools (for managed devices).
If none of these are feasible, manual user interaction (e.g., QR codes/links) is the only option.