Android ICS关机跟重新启动功能研究
作者:网络转载 发布时间:[ 2013/5/6 10:38:49 ] 推荐标签:
提示的错误是权限问题,但是代码是一样的,manifest里面也给了REBOOT权限,在网上找了一下解释还是没有什么好的解决方案,错误信息如下:
[plain] view plaincopyprint?
01-01 08:05:26.319 W/System.err( 776): java.io.IOException: Error running exec(). Command: [su, -c, reboot] Working Directory: null Environment: null
01-01 08:05:26.319 W/System.err( 776): at java.lang.ProcessManager.exec(ProcessManager.java:211)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:168)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:241)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:184)
01-01 08:05:26.319 W/System.err( 776): at com.android.settings.DevelopmentSettings.exeShell(DevelopmentSettings.java:591)
01-01 08:05:26.319 W/System.err( 776): at com.android.settings.DevelopmentSettings.onPreferenceChange(DevelopmentSettings.java:580)
01-01 08:05:26.319 W/System.err( 776): at android.preference.Preference.callChangeListener(Preference.java:885)
01-01 08:05:26.319 W/System.err( 776): at android.preference.ListPreference.onDialogClosed(ListPreference.java:265)
01-01 08:05:26.329 W/System.err( 776): at android.preference.DialogPreference.onDismiss(DialogPreference.java:381)
01-01 08:05:26.329 W/System.err( 776): at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1235)
01-01 08:05:26.329 W/System.err( 776): at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 08:05:26.329 W/System.err( 776): at android.os.Looper.loop(Looper.java:137)
01-01 08:05:26.329 W/System.err( 776): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-01 08:05:26.329 W/System.err( 776): at java.lang.reflect.Method.invokeNative(Native Method)
01-01 08:05:26.329 W/System.err( 776): at java.lang.reflect.Method.invoke(Method.java:511)
01-01 08:05:26.329 W/System.err( 776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-01 08:05:26.329 W/System.err( 776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-01 08:05:26.329 W/System.err( 776): at dalvik.system.NativeStart.main(Native Method)
01-01 08:05:26.329 W/System.err( 776): Caused by: java.io.IOException: Permission denied
01-01 08:05:26.329 W/System.err( 776): at java.lang.ProcessManager.exec(Native Method)
01-01 08:05:26.339 W/System.err( 776): at java.lang.ProcessManager.exec(ProcessManager.java:209)
01-01 08:05:26.339 W/System.err( 776): ... 17 more
01-01 08:05:26.369 W/InputManagerService( 174): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4138ecb8
01-01 08:05:26.319 W/System.err( 776): java.io.IOException: Error running exec(). Command: [su, -c, reboot] Working Directory: null Environment: null
01-01 08:05:26.319 W/System.err( 776): at java.lang.ProcessManager.exec(ProcessManager.java:211)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:168)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:241)
01-01 08:05:26.319 W/System.err( 776): at java.lang.Runtime.exec(Runtime.java:184)
01-01 08:05:26.319 W/System.err( 776): at com.android.settings.DevelopmentSettings.exeShell(DevelopmentSettings.java:591)
01-01 08:05:26.319 W/System.err( 776): at com.android.settings.DevelopmentSettings.onPreferenceChange(DevelopmentSettings.java:580)
01-01 08:05:26.319 W/System.err( 776): at android.preference.Preference.callChangeListener(Preference.java:885)
01-01 08:05:26.319 W/System.err( 776): at android.preference.ListPreference.onDialogClosed(ListPreference.java:265)
01-01 08:05:26.329 W/System.err( 776): at android.preference.DialogPreference.onDismiss(DialogPreference.java:381)
01-01 08:05:26.329 W/System.err( 776): at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1235)
01-01 08:05:26.329 W/System.err( 776): at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 08:05:26.329 W/System.err( 776): at android.os.Looper.loop(Looper.java:137)
01-01 08:05:26.329 W/System.err( 776): at android.app.ActivityThread.main(ActivityThread.java:4424)
01-01 08:05:26.329 W/System.err( 776): at java.lang.reflect.Method.invokeNative(Native Method)
01-01 08:05:26.329 W/System.err( 776): at java.lang.reflect.Method.invoke(Method.java:511)
01-01 08:05:26.329 W/System.err( 776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-01 08:05:26.329 W/System.err( 776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-01 08:05:26.329 W/System.err( 776): at dalvik.system.NativeStart.main(Native Method)
01-01 08:05:26.329 W/System.err( 776): Caused by: java.io.IOException: Permission denied
01-01 08:05:26.329 W/System.err( 776): at java.lang.ProcessManager.exec(Native Method)
01-01 08:05:26.339 W/System.err( 776): at java.lang.ProcessManager.exec(ProcessManager.java:209)
01-01 08:05:26.339 W/System.err( 776): ... 17 more
01-01 08:05:26.369 W/InputManagerService( 174): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4138ecb8
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11