Created
May 14, 2023 06:16
-
-
Save ekiara/5b817b5acab77c38c5e4641fd6b0e04e to your computer and use it in GitHub Desktop.
adb_ussd_command.sh
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
# Start the phone dialer activity | |
adb shell am start -a android.intent.action.CALL -d "tel:*123#" | |
# Wait for the dialer to open | |
sleep 2 | |
# Input the USSD command | |
adb shell input text "<your_ussd_code><parameter>" | |
# Send the USSD command | |
adb shell input keyevent 66 | |
# Wait for the response to be displayed | |
sleep 5 | |
# Take a screenshot (optional) | |
adb shell screencap -p /sdcard/ussd_response.png | |
# Pull the screenshot to your computer (optional) | |
adb pull /sdcard/ussd_response.png <path_to_save_screenshot> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment