如何苏在Android上工作?什么是pre必备它的工作?什么是生根在Android? [英] How does su work on android? And what are the pre-requisites for it to work? What is rooting on Android?

查看:126
本文介绍了如何苏在Android上工作?什么是pre必备它的工作?什么是生根在Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:<一href="http://stackoverflow.com/questions/6100662/what-does-the-su-mean-process-runtime-getruntime-execsu">what请问苏意思是:工艺=调用Runtime.getRuntime()EXEC(&QUOT;苏&QUOT;);

我厌倦尝试所有不同的东西。其实我还是不成功的理解时,将苏的工作。什么是生根于Android的设备?有人请,请帮助我。

I am tired trying all the different things yet i am still unsuccessful in understanding when will su work. What is rooting a device in Android? Someone please please help me with this.

我回答了以下问题。我张贴有解决的办法,我测试也它的工作。

I replied to the following question. The solution i posted there, i tested and also it worked.

<一个href="http://stackoverflow.com/questions/9884209/adding-full-permission-for-a-image-file-in-android/9884310#9884310">Adding全权限在Android的一个图像文件。

这是我的问题:

我试着以下。

复制的苏。

安装SuperUser.apk,

Installed SuperUser.apk,

这节目,我叫苏,然后使用新创建的过程中,我完成所需的操作。

From program i called su and then using the newly created process i performed the required operations.

这有2个结果。

1)当设备是植根(如执行在z4root永久root选项),它的工作原理,它更改系统文件的权限。

1) When the device is rooted(like executing Permanent root option in z4root), It works, it changes the system file permissions.

2)当设备没有扎根,它亘古不变的工作。

2) When device is not rooted, It doesnot work.

请解释什么额外的东西不z4root执行,这使得该任务成为可能。说明在短​​暂的吧。

Kindly explain what extra thing does z4root performs which makes the task possible. Explain in brief please.

让我知道,如果我的问题不明确。由于一吨。

Let me know if my question is not clear. Thanks a ton..

推荐答案

什么z4root(或任何其它生根程序)做它运行的一些漏洞来修改自己的UID(用户ID)为0(根)。你可以把它看成是执行某种黑客攻击和欺骗内核,以为它实际上已经是root权(那么如果z4root是一个病毒它可以做一切与您的手机上安装键盘记录器砌体吧)。当然,如果有可能欺骗内核以这样的方式给你的根访问它被认为是一个安全漏洞(任何应用程序可以做到这一点,并执行一些恶意的东西),通常被固定在未来的内核更新(这就是为什么z4root不得如果您升级固件)工作。

What z4root (or any other rooting program) does it runs some exploit to change its own uid (user-id) to 0 (root). You can think of it as of performing some kind of hack and tricking kernel into thinking it actually has the right to be root (then if z4root was a virus it could do everything with your phone from installing keyloggers to bricking it). Of course if it is possible to trick kernel in such a way to give you root access it is considered a security vulnerability (any app could do that and perform some malicious stuff) and usually gets fixed in future kernel updates (that's why z4root may not work if you upgrade your firmware).

在z4root树立了UID为0,将执行以下操作:重新装入 /系统分区读写(默认情况下它是只读),在苏二,超级副本apk文件和busybox的,然后重新装入 /系统回为只读。

When z4root has set its uid to 0 it does the following: remounts /system partition as writable (by default it's read-only), copies over su binary, Superuser.apk and busybox and then remounts /system back as read-only.

那么,如何苏二进制给你没有做黑客的事情root访问权限时,通常应用程序具有相同的UID父进程?这是因为苏二进制有设置的uid 标志设置,并始终跑了作为UID 0(根)。

So how does the su binary give you root access without doing "the hack" thing when normally applications have same uid as parent process? This is because su binary has set-uid flag set and is always ran as uid 0 (root).

现在,如果你复制苏二进制交给 /系统/斌这意味着你只是忘了更改所有者/权限,那么你必须有root访问权限( CHOWN根:根/系统/斌/苏;搭配chmod 6755 /系统/斌/苏),但你仍然需要root访问权限做到这一点

Now, if you have copied su binary over to /system/bin then you must have had root access which means you just forgot to change owner/permissions (chown root:root /system/bin/su; chmod 6755 /system/bin/su) but you still need root access to do that.

这篇关于如何苏在Android上工作?什么是pre必备它的工作?什么是生根在Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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