0

这曾经有效:

adb shell am start -a android.intent.action.CALL tel:1234

但是,现在我收到此错误:

09-08 14:35:57.821 W/dalvikvm( 1107): threadid=3: thread exiting with uncaught exception (group=0x4001b200)
09-08 14:35:57.841 E/AndroidRuntime( 1107): Uncaught handler: thread main exiting due to uncaught exception
09-08 14:35:57.841 E/AndroidRuntime( 1107): *** EXCEPTION IN SYSTEM PROCESS.  System will crash.
09-08 14:35:57.871 E/AndroidRuntime( 1107): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:1234 flg=0x10000000 cmp=com.android.phone/.OutgoingCallBroadcaster } from null (pid=-1, uid=-1) requires android.permission.CALL_PHONE
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at android.os.Parcel.readException(Parcel.java:1218)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at android.os.Parcel.readException(Parcel.java:1206)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1149)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at com.android.commands.am.Am.runStart(Am.java:202)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at com.android.commands.am.Am.run(Am.java:76)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at com.android.commands.am.Am.main(Am.java:54)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at com.android.internal.os.RuntimeInit.finishInit(Native Method)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:186)
09-08 14:35:57.871 E/AndroidRuntime( 1107):     at dalvik.system.NativeStart.main(Native Method)
09-08 14:35:57.911 E/JavaBinder( 1107): Unknown binder error code. 0xfffffff7
09-08 14:35:57.921 E/AndroidRuntime( 1107): Crash logging skipped, no checkin service
09-08 14:35:57.921 I/Process ( 1107): Sending signal. PID: 1107 SIG: 9

有解决方法吗?

4

2 回答 2

1

这似乎是对的——我不知道它以前为什么会起作用,但 Android 正在以它应该的方式工作adb——shell 没有调用 ( android.permission.CALL_PHONE) 的权限。您可以通过运行来规避此问题amroot如果您在手机上具有 root 权限):只需su在执行命令之前执行即可。

于 2009-09-08T19:00:36.163 回答
1

我终于能够使用 adb 服务命令完成我想要的(http://davanum.wordpress.com/2007/12/12/android-calldial-from-the-adb-shell-command-line/

于 2009-09-09T13:55:40.037 回答