我该如何执行和QUOT;苏"在Android? [英] How can I execute "su" on Android?

查看:171
本文介绍了我该如何执行和QUOT;苏"在Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(command + "\n");
os.writeBytes("exit\n");
os.flush();
process.waitFor();

系统说:11月7日至六日:01:34.337:我/的System.out(3864):SU:UID 10170不允许苏

我在终端执行亚行根

:~/android/android-sdk/platform-tools$ ./adb root

adbd is already running as root

任何想法?

推荐答案

它看起来像你的亚行作为root运行,但你只有股票'苏'的工具。你可以使用亚行与您所选择的定制之一替换它。

It looks like your adb is running as root, but you only have the stock 'su' tool. You could use adb to replace it with a customized one of your choice.

如果不是这样,或者你有一个定制的一个,它被配置为不允许你在运行此应用程序的用户ID - 在这种情况下,你需要打开它的配置工具,更改此

Either that, or you do have a customized one and it's been configured not to allow this application userid you are running under - in that case, you need to open its configuration tool and change this.

这篇关于我该如何执行和QUOT;苏"在Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆