# 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 "" # 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