开发者

Run shell script -- doesn't seems to take effect

So I have a need to modify the Xoom tablet iptables rules and I created a shell script to do that, and it works if I run it directly from the shell but doesn't seems to work if I have an (Java) activity r开发者_运维技巧un it.

I must be missing something, can you guys give me some clue?


adb shell has root permissions, whereas Java doesn't.

in adb:

# id
uid=0(root) gid=0(root)

You can get your user id in Java to see what you're running as.

If you have access to the OS build, then you can raise your application level to system, but that still won't give you root. Here's an SO post on that if you're interested.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜