How to make a call via pc by ADB command on android?

后端 未结 6 399
旧巷少年郎
旧巷少年郎 2020-12-07 16:16

I would like to make call via ADB command on android\'s command line.

How should I use ADB command in order to make a call via PC?

please provide source code

6条回答
  •  攒了一身酷
    2020-12-07 16:33

    On some Android devices, there exists an executable

    /system/bin/radiooptions
    

    If you run it, the help dislplays

    Usage: radiooptions [option] [extra_socket_args]
               0 - RADIO_RESET, 
               1 - RADIO_OFF, 
               2 - UNSOL_NETWORK_STATE_CHANGE, 
               3 - QXDM_ENABLE, 
               4 - QXDM_DISABLE, 
               5 - RADIO_ON, 
               6 apn- SETUP_PDP apn, 
               7 - DEACTIVE_PDP, 
               8 number - DIAL_CALL number, 
               9 - ANSWER_CALL, 
               10 - END_CALL 
    

    For dialing a number, you can simply run

    adb shell su -c "radiooptions 8 XXXXXXX"
    

    where XXXXXXX is to be replaced by the phonenumber.

    I saw this command on quite many HTC devices. I run currently a Cyanogenmod 10.2 on an HTC One, and there it is as well. It could also be possible, that it is only available on devices with a Qualcomm radio chip.

提交回复
热议问题