2015-11-06 63 views
2

我想通過亞行外殼am和亞行外殼服務調用發送短信。我得到兩個錯誤。 一)按服務單元短信使用亞行外殼不工作

adb shell service call isms 5 s16 "phonenumber" i32 0 i32 0 s16 "BodyText" 

結果傳送當我嘗試發送短信以下亞行外殼am命令

adb shell am start -a android.intent.action.SENDTO -d sms:"phoneNumber" --es sms_body "SMS BODY GOES HERE" --ez exi 
t_on_sent true adb adb shell input keyevent 66 

和我得到無差錯

Starting: Intent { act=android.intent.action.SENDTO dat=sms:xxxxxxxxxxxx pkg=BODY (has extras) } 
Error: Activity not started, unable to resolve Intent { act=android.intent.action.SENDTO dat=sms:xxxxxxxxxxxx flg=0x1000 
0000 pkg=BODY (has extras) } 

B) -

Result: Parcel(
    0x00000000: ffffffff 00000061 006f0043 00790070 '....a...C.o.p.y.' 
    0x00000010: 006e0069 00200067 0065006d 00730073 'i.n.g. .m.e.s.s.' 
    0x00000020: 00670061 00200065 006f0074 00490020 'a.g.e. .t.o. .I.' 
    0x00000030: 00630063 0020003a 0065004e 00740069 'c.c.:. .N.e.i.t.' 
    0x00000040: 00650068 00200072 00730075 00720065 'h.e.r. .u.s.e.r.' 
    0x00000050: 00320020 00300030 00200030 006f006e ' .2.0.0.0. .n.o.' 
    0x00000060: 00200072 00750063 00720072 006e0065 'r. .c.u.r.r.e.n.' 
    0x00000070: 00200074 00720070 0063006f 00730065 't. .p.r.o.c.e.s.' 
    0x00000080: 00200073 00610068 00200073 006e0061 's. .h.a.s. .a.n.' 
    0x00000090: 00720064 0069006f 002e0064 00650070 'd.r.o.i.d...p.e.' 
    0x000000a0: 006d0072 00730069 00690073 006e006f 'r.m.i.s.s.i.o.n.' 
    0x000000b0: 0052002e 00430045 00490045 00450056 '..R.E.C.E.I.V.E.' 
    0x000000c0: 0053005f 0053004d 0000002e   '_.S.M.S..... ') 

但我的設備上沒有短信。

請幫我弄清楚兩種情況下都缺少什麼。

謝謝!

回答

2

也許這個號碼有問題。嘗試不帶引號。 您是否嘗試過這樣的:

adb shell am start -a android.intent.action.SENDTO -d sms:+1-222-333-4444 
adb shell input text "sampletexthere" 
adb shell input keyevent 66