網路城邦
上一篇 回創作列表 下一篇   字體:
service call phone, on/off mobile data, data connection, telephony
2021/08/26 16:52:21瀏覽86|回應0|推薦0
adb or uart console,
cmd to make a phone call :

service call phone 2 s16 "123"

========== ========== ========== ==========

function 2, is mapping to

frameworks/base/telephony/java/
com/android/internal/telephony/ITelephony.aidl

void call(String callingpackage, String number);

service call與 aidl, function編號,是由1起算
interface ITelephony
1: dial
2: call
3: endCall

不同的android版本, function編號可能會異動

android 7.1.2
94: setDataEnabled, 用於on/off 3G/4G/5G電信數據資料網路(mobile data / data connection)

95: getDataEnabled, 查 電信數據資料網路 狀態

========== ========== ========== ==========

範例
turn on 4G LTE:
service call phone 94 i32 0 i32 1

turn off 4G LTE:
service call phone 94 i32 0 i32 0

查 電信數據資料網路 狀態
service call phone 95 i32 0

4G LTE is on
Result: Parcel(00000000 00000001 ........)

4G LTE is off
Result: Parcel(00000000 00000000 ........)



If the document helps you, how about to buy street cats a fish can ?
( 不分類不分類 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=166861897