app sroteapp独领是什么意思思

Here’s How to Root the Nexus 7 – But Should You?
on August 12th 2012
I waited several weeks for my brand new Nexus 7. I opened the box with lingering anticipation, powered it on (without charging it first, even though I know better), salivated as I saw the new home screen, and started downloading app after app hoping to find a barrier that this little beast couldn’t surmount. I found nothing. I found absolutely nothing this quad-core $200 steal couldn’t lay to waste.
Satisfied? I should be. Am I? No. I’m an Android lover, and Android lovers aren’t so easy to please…
What Tweaking Can Lead To…
The Nexus 7, Manufactured by Asus
I think Android fans may be a technologically-minded congregation of masochists. Those of us that have been with the ecosystem for a long time anticipate that something will go wrong. Yet we stick with it.
Whether you were an early adopter of the G1 or a true believer in the “Droid” line, you adapted to the flaws in the hope that someday, this ship would right itself.
For me, Android offered a budget-friendly path to touch-screen capability, to 24/7 connectivity, to something to do while I’m sitting in a desolate reception area waiting for my job interview. But the day that Nexus 7 came in the mail, I was already seeking a way to tweak it, to make it better. I was scouring the forums for ROMs, longing to improve upon the performance, to eke out a slightly better benchmark. My device is ranked under the Transformer Prime? Erroneous! I can change that with a quick bootloader unlock, root, custom recovery, Linaro-based kernel, a few init.d tweaks…
Why? It wasn’t until I starting comparing my device against others that I began desiring something with a bit more horsepower, customizations, and tweaking. At one point, a 600MHz processor fit the bill. When that passed, a 1GHz Snapdragon held its own. When that looked like a tick in molasses, I bumped it up to a dual-core Tegra 2. Was that enough? No – my computer at home has four cores! I demand such things from a device a fraction of the size. And while we’re at it, I demand it be reasonably priced.
Now I have four cores in both my phone and my tablet.
has been crushed by the mobile onslaught, and Android – which began as a pipe dream for a handful of developers and Google – has evolved into an OS to truly compete with Steve Jobs’ brainchild. It grappled the international market capturing a majority of the world’s smartphone users. It finally saw its first hardware victories in creating the first dual-core devices. And with Ice Cream Sandwich, it reinvented itself, finally delivering on its long-overdue promise: a complete mobile handset.
The Nexus 7
The best tablet $200 can buy.
Now, with Jelly Bean, and a spectacular and affordable tablet, we are still pining. When I pitched this piece to my editor, I had just received my Nexus 7 and followed suit with most Android anticipations. I was ready to dig into this tablet, dissect its many secrets, root it, unlock it, drop a new ROM, and see what I could knock out with a benchmark. But then I spent a few days with it.
I am actually already an owner of the older, but very capable, ASUS Transformer TF101. Yes, the original. I use it for browsing, reading, gaming, and so on. So when I expressed my interest in the Nexus 7, people asked me why. To be honest, I just like the 7 inch form factor. If I want to watch a movie, I turn to a laptop or my TV. But if I want to lie in bed and read, or take something into a business meeting for quick reference, I like the 7 inch tablet – . When I saw the Nexus 7 for cheap, I figured it’d last me a long while.
I wanted a leisure device. Something with which I wouldn’t fool. I wanted a HD screen (check), a fast processor (check), good battery (check), and lightweight enough that it could go everywhere I did (check). A few weeks with the Nexus 7 and I feel that customization is unnecessary. I wanted so much and this device fulfilled every need.
So tonight I sit here, with my shiny new tablet in front of me, ADB already pulled up, and everything ready to go. This thing is about as easy to root as anything could be. But, I’m not quite sure if I’m ready to pull the trigger. Maybe I’ll just have another beer and think about it while I catch up on Breaking Bad with this 0 screen.
How to Root It
If you choose to go forward, I include the instructions below. It’s about as simple as an easy-bake oven. I just wanted you to think twice before you let the little green monster out of you.
Find the ToolKit here:
Download ToolKit.
Install driver in “drivers” folder if not already installed (it will say PdaNet)
Plug in device to computer and place in USB debugging mode (Settings & Developers Options & USB Debugging)
After drivers are installed, run root.exe.
It will asked if your bootloader is locked or unlocked. If you just bought it from Google, it’s locked.
Select your preference of “super user” or “supersu” for root (just a preference choice).
Once you make this choice, it will do its magic. Just keep in mind that if your bootloader was locked, it will wipe all your data. If you’d like a video of the process, check out the video below.
Related Posts
Popular Posts
Pingback: ()
Pingback: ()
Pingback: ()
RT : See You : 8 Alternatives That Are Worth the Hype
1 hour agoInsightly: CRM, Project Management, And More 6 hours ago. is a
and project management app for
that offers something for sales and marketing teams 13 hours agoInsightly: CRM, Project Management, And More
18 hours agoAndroid 的提权 (Root) 原理是什么?
按投票排序
Android的内核就是Linux,所以Android获取root其实和Linux获取root权限是一回事儿。你想在Linux下获取root权限的时候就是执行sudo或者su,接下来系统会提示你输入root用户的密码,密码正确就获得root权限了。Android本身就不想让你获得Root权限,大部分手机出厂的时候根本就没有su这个程序。所以你想获得Android的root权限,第一步就是要把编译好的su文件拷贝到Android手机的/system/bin或者/system/xbin/目录下。我们先假设你可以把su放在xbin下,接下来你可以在Android手机的adb shell或者串口下输入su了。Linux下su以后输入密码就可以root了,但Android里的su和Linux里的su是不一样的,Android里的su不是靠验证密码的,而是看你原来的权限是什么。意思就是如果你是root,那你可以通过su切换到别的用户,比如说shell,wifi,audio什么的。但如果你是root之外的其他用户,就不能切换回root了,会提示你permission denied。(具体su是怎么做到这一点的,我准备过几天有时间的时候写在下面,单独说明)也就说用root运行su才有用,但我这个时候还没有root怎么办呢?这就涉及到另外个问题。一般我们在Linux的console下输入 ls -l 会列出所有文件的权限。比如:-rwxr-xr-x,用过Linux的人都知道r代表该文件可读,w代表可写,x代表可执行,-就代表没有该权限。第一个rwx代表文件所有者的权限,第二个rwx代表和所有者同组人的权限,第三个rwx代表其他用户对该文件的权限。但下面这个文件就比较特殊。rws,它的执行权限标志位是一个s,s代表当任何一个用户执行该文件的时候都拥有文件所有者的权限,这文件的所有者是root,简单点说就是不管谁执行这个文件,他执行的时候都是以root身份执行的。rws,它的执行权限标志位是一个s,s代表当任何一个用户执行该文件的时候都拥有文件所有者的权限,这文件的所有者是root,简单点说就是不管谁执行这个文件,他执行的时候都是以root身份执行的。也就说即使我不是root也有可能以root身份来执行程序,那么我就把一个所有者是root的su程序权限标志位置成-rwsr-xr-x,那么不管谁执行它,都是root身份执行,su就可以顺利执行成功了,执行成功之后我就是root身份了。问题都清楚了,就是你需要把一个所有者是root的su拷贝到Android手机上,并且把su的权限标志位置成-rwsr-xr-x。能把这个事情搞定你就成功root了一个手机。大概意思就是两行代码cp /data/tmp/su /system/bin/
#copy su 到/system/分区chown root:root su
#su的所有者置成rootchmod 4775 /system/bin/su
#把su置成-rwsr-xr-x熟悉Android的同学都知道,执行上面的每一行代码都需要root权限才能成功。意思就是说,你只有有root权限的情况下才能执行上面两行代码,而这两行代码就是为了让你获得root权限的,这是一个逻辑闭环,那么如何打破这个逻辑闭环呢?一个办法就是找一个本身已经有root权限的进程来启动我上面的两行代码,那我这两行代码一启动就是root权限,就可以顺利执行了。但是已经有root权限的进程都是出厂时候就装到手机上的,代码写死了,你没法控制它执行你自己的代码啊。这个时候就需要你找漏洞了,比如用来破解Android2.3 root权限的zergRush漏洞就是利用一个拥有root权限的进程栈溢出漏洞。/*
* 栈溢出说白了就是这个进程读到了自有内存之外的地址空间,这段内存空间没分配给它,谁都能写* 这段内存,那我就可以把自己的两行代码预先写到这里,运行zergRush代码,然后等那个倒霉的进* 程执行我就行了。 */栈溢出这段也解释错了,关于栈溢出的解释大家可以看答案下面 的评论。上面有下划线的部分可以忽略。如果各位有一定基础,能看懂我上面讲的,就基本知道原理其实并不难,难点在于找到漏洞。zergRush的代码在这儿:有兴趣的可以看看,网上也有很多分析文章。另外iphone的越狱其实和Android的root是一回事儿,都是越权操作。所以越狱的方式也都差不多,也是找IOS自带程序的漏洞,只不过IOS安全性强一点,所以也比较难找。如果你发现你的iphone的某个自带程序经过一些特定操作会出现系统崩溃重启的现象,并且是可以复现的,那就很有可能可以用来越狱了。好像是IOS6出来的时候,由于比较难搞,某个越狱团队就号召大家来找茬,发现的漏洞可以报告给他们用来越狱。说明IOS越狱越来越难。直接体现就是现在越狱需要的时间越来越长。不过如果你发现漏洞也可以报告给苹果,苹果会根据漏洞严重程度给予一定奖励。我记得看新闻说南非一个家伙靠给苹果找漏洞赚25万美元。发家致富的好路子啊,哈哈。================================================谢谢各位支持关于为什么su一定要放到/system/bin/或者/system/xbin/一个同事告诉我,这个问题我的解释是错的,su不能放在data分区原因是因为data分区在mount时就指定了不能给可执行程序加s位。你在adb shell里执行mount就可以看到,或者看我下面的截图。下面有下划线的部分是我自己的解释,各位可以忽略。下面有下划线的部分是我自己的解释,各位可以忽略。/* * 首先,你当然可以把su这个程序copy到/data/分区,但你adb push进去的时候,su有这个程序的所
* 有者肯定不是root,一般是shell什么的(记不清了,应该是和adbd这个进程的所有者一样),这个时 * 候即使你把它权限置为-rwsr-xr-x,哪你运行它的时候也是shell身份运行的,su会提示你输入密码
* 的。 * 第二我们root手机的目的是为了运行需要root权限的APP,比如goagent或者什么的。这些APP里代
* 码需要获得root的时候是这么写的: * Process p = Runtime.getRuntime().exec("su"); * 也就是它们在代码里调用了一下su这个程序,哪可以写成下面这个样子吗? * Process p = Runtime.getRuntime().exec("./data/tmp/su"); * 我没写过APP,不太清楚,估计是不行的。换句话说你必须把su放到环境变量PATH所有的目录 * 里,APP才能调用到它。如果你不想放到bin或者xbin下,你就必须给PATH增加一个目录。PATH是* root权限才能修改的,你如果能修改PATH,说明你已经有root权限了,修改PATH就没必要了,还
* 不如直接放到bin下面。 */关于sudoandroid的工程里没有sudo这个东西。sudo是为了给普通用户临时分配root权限的,Android里建立了很多用户,比如wifi,shell等等,这些用户可以访问那个文件,不可以访问那个文件,代码里已经写死了,权限也分配的很分明。它们在运行的过程中不需要临时获得root权限。所以Android不需要sudo这个程序。回复1. Android的su确实是不验证密码的,是我想当然了。答案已经修改了。2. chmod 1755也是我错了,应该是4755,答案已经改了。3. 你的答案我看了,你没发觉你跟我说的是一回事吗?我觉得你应该是没仔细看我的答案吧。4. 你叙述的 so call"一般的root流程",只是一种方法,而这个问题是问原理。实际上不管你用什么漏洞获得了root,下面需要做的一样的,都是copy su到xbin, chown最后chmod。你的“一般的root流程”和别人不管用什么方法的二般流程有什么区别吗?不都是为了刚上面这些事吗?/* ChangeLog * 08/13/2013 *
修改栈溢出的解释错误 *
修改为什么su一定要放到/system/bin/或者/system/xbin/的解释错误* 08/16/2013* 修改chmod错误* 修改运行su需要密码的错误* 回复somebody */
Android 的提权 (root) 原理是什么?
更多提到ROOT管理背后的原理,这就是Android和Linux中的SID的用途,这是所有类UNIX通用的申请处理高权限方式。其实在我的理解中应该是两个:1,提权2,ROOT对于 1,提权 是利用系统的漏洞,获得原本获取不了的权限,提升本应用的权限。已知的漏洞:1.a:之前提到的利用adbd的漏洞,在2.X时代有效。这个利用的过程还是比较复杂,时间也比较长;1.b:三星CPU的漏洞,比如在Galaxy系上可以利用这个漏洞来ROOT,这个漏洞就比较好利用了,之接在APK代码里就可以利用。在我的Galaxy Note上用过。提权不一定是对于主系统(Android系统),还有些是针对辅助系统(BOOTLOADER和RECOVERY)。1.c:三星系的手机可以利用一个BOOTLOADER的漏洞(我不太清楚是不是漏洞,但是三星本身没有官方解锁工具这一说的,难道是官方提供的?),可以任意的刷包,这样我们就可以利用这个途径来修改SYSTEM分区了,都有权限修改SYSTEM分区了,往上放个文件还不是分分钟的事。官方解锁的就是提供方式,允许用户刷入自定义的文件。1.d:OPhone系统的老版本(2.0、2.5)中(不知道还有没有人用这个系统)的RECOVERY存在一个关于路径的处理的漏洞。它有一个自己定义的upk升级包,只能处理/system/carrier下的文件,但在路径处理上估计是文本比较,你可以通过/system/carrier/../app这种方式来绕过它的管理系统,来修改/system/app下的文件。一般情况下主系统的漏洞对用户的危害最大,因为它使一个普通权限的应用可以访问到本没有权限访问的资源。对于三星CPU漏洞,如果一个应用利用它提高自己的权限,直接访问短信的数据库文件,而不是通过Android提供的Provider,系统就没有使用沙盒检查的机会,而且用户也不知道它们做了什么,你从它的权限申请列表上也看不到它会读取短信。对于辅助系统的漏洞,一个普通的应用就没有办法了,因为平时辅助系统是不启动的。但也并不是没有利用的可能。对于 2,ROOT 在我理解就是安装ROOT管理工具,对于Linux的发行版本来说,本身提供了ROOT管理工具su还有sudo。但是对于Android来说本身没有提供ROOT管理工具,所以我们需要利用提权的这个过程在系统中插入ROOT管理工具,以方便我们使用更高的权限。因为毕竟提权这个过程一般来说不是很容易实现的。比如我们提到的BOOTLOADER或RECOVERY的漏洞,是没有办法在主系统中使用的,所以需要安装ROOT管理工具以在主系统中使用。ROOT之后因为可以修改系统,所以我们也有机会修复已知的漏洞,比如上面提到的三星CPU的漏洞。以下由于本身半桶水水平,可能不正确,请轻拍:对于ROOT本身来说不会降低系统安全性,除非ROOT管理器本身又有漏洞。所以通过官方解锁的方式,使用安全的RECOVERY和安全的ROOT管理器,与官方的安全性一致。但是两个黑色的“安全”提醒着我们,市面上鱼龙混杂的ROOT工具并不是都安全的,所以使用时一定选用大家认可的,安全的方式。例如说我们平时用的SuperU.apk和与其相配的su应用,在应用层申请ROOT权限时,都会提示用户许可。但是针对一些黑色的ROOT的管理工具,它如果留下后门,对于一些特定的请求不提示直接同意,而且不记录日志的话,这样就像在自己的设备中下了一个定时炸弹一样。
的答案有问题,看来他并不知道root的原理先引用他的两段话:大概意思就是两行代码cp /data/tmp/su /system/bin/ #copy su 到/system/分区chmod 1775 /system/bin/su #把su置成-rwsr-xr-x那怎么搞定这个事情呢?Android的system分区本身不可写,只有是root的权限才能改动它,执行不了啊。获得root的时候是这么写的:Process p = Runtime.getRuntime().exec("su");
也就是它们在代码里调用了一下su这个程序,哪可以写成下面这个样子吗?Process p = Runtime.getRuntime().exec("./data/tmp/su");
先看第一段,理解没有错误的话他是想说,只要system有了写入的权限,就可以执行这两行代码,进而获取root权限。既然Android的system分区不可写,那干脆不写system,等获取root权限再写入system就行了,第一条命令需要system可写入,命令一只是拷贝,其本身没有实质性意义。第二条命令把su设置成-rwsr-x-rx也其实只完成了一半——su还需要所有者(Owner)是root才能正确的给其他程序赋予root权限。linux系统中,当前用户执行的程序,该程序进程的 有效用户ID(Effective UID)就是当前用户,但拥有s(set uid)权限的程序,其进程的有效用户ID是这个程序的所有者。换句话说,有set uid权限的程序,运行之后,就相当于所有者运行了这个程序,如果所有者是root,那这个进程也拥有root权限。能够正常授权的su,其所有者必须是root,否则不能正常授权。没有root权限的情况下,我们可以通过chmod来设置s权限,但是不能使用chown来修改su的所有者为root(提示Unable to chown su: Operation not permitted)。所以通过zergRush破解权限的原因是,只有破解到了root权限,才能设置su的所有者是root,才能有可正常使用的su。再看第二段,就算把代码改成Process p = Runtime.getRuntime().exec("./data/tmp/su");也不能获得root权限。正如我前面所说的,必须先修改su的所有者为root才能获取root权限,所以在破解到root权限之前,无论做什么都不能获得一个有效的su。现在root流程一般是zergRush破解root权限,然后用root权限启动adbd,电脑端用adb登陆之后直接就拥有了root权限,然后设置su权限和所有者,重挂载system使system可写入,然后拷贝su到/system/xbin/并安装SuperSu,重启手机。这个过程还可以变成
安装SuperSu,破解root权限,设置su的权限和所有者,重启手机,执行su,重挂载system,拷贝su自身到/system/xbin。看到了吗,获取root权限跟system不可写没有关系,重挂载system并拷贝su到xbin只是为了让应用程序更容易调用su罢了PS:
chmod 1775 /system/bin/su #把su置成-rwsr-xr-x
这个chmod的权限应该是4755才对吧?1755对应的权限是-rwxr-xr-t,连s都没有PPS:还有一点,Kevin说输入su要密码,安卓连/etc/passwd都没有,哪来的密码
简单来说,其实就是linux系统里面的su命令,切换root用户,等于window系统的超级管理员。
安卓基于linux,su命令的效果一样。
root就是在你的安卓系统里面添加一个su二进制文件,当app需要使用root权限时(一般都是涉及系统文件),就通过执行su文件获取一个root的权限。
而我们需要一个管理app获取root权限的管理软件,这个就是平时用到的超级用户等app。只有安装了这个管理软件之后,我们才可以限制app的root权限,不然的话,如果系统本身不识别你安装的su文件,app就可以直接使用root权限。
作为补充,发一下之前从网上扒来的SU中的部分代码,以此解释Android是通过原有的权限来判断你有没资格执行su :/* Until we have something better, only root and the shell can use su. */
myuid = getuid();
if (myuid != AID_ROOT && myuid != AID_SHELL) {
fprintf(stderr,"su: uid %d not allowed to su\n", myuid);
简单点说,就是Android系统里面没有su这个可执行的文件,提权就是利用Android系统漏洞把su装入系统。
对于ARM平台的root已经毫无压力了,但是对于X86平台,就算将su和suuserapk给拷贝进去并赋予正确的权限,也还是无法进行root的。不知道这个大家有啥办法?
根本的问题在于获取root权限,然后执行什么都是次要的了。至于答案中提到的su啊sudo啊,之类的都是获取了root权限后的事情,不是问题的根本。获取root权限不是你按照常规的在命令行执行一些命令或者运行一个程序就可以得到的。因为这些都是在linux的既定规则内玩,怎末可能破坏其规则?所以只有一条路:非正常路径,比如:找到bug和漏洞,让规则破坏,从而获得提权。或者在系统之外进行操作,比如系统还没启动就操作其磁盘上的文件系统,让某些你安排的程序发生规则外的特性。这时候由于系统还没启动,任你摆布(他睡着完全没有知觉和抵抗以及运行规则的能力)所以你可以换掉系统(涮rom把自己改过的系统刷上去)不过如果硬件上不允许那么此路不通。所以无论安卓、ios还是pc系统的linux,windows等都是一样的。必须找到漏洞或走非常规路线才能取得特权。而取得特权对于系统安全是十分严重的事情,即如果普通用户很容易获取到特权,那将是严重性的安全灾难。你想想如果运行于企业服务器集群上的linux如果某个版本发现提权漏洞,那被黑客黑掉拿到数据的风险后果非常严重。
在Android里通常是在程序中执行su去获取root权限,而就是在这个su中调用了setUid(0)和setGid(0),大概是,记不清了,通过这两个函数把你进程的uid设为和root一样(root的uid就是0),所以也就是说你自己随便写一个可执行文件,去调用这两个函数就能提权。而要成功调用这两个函数,需要特殊权限,一般我们可以见到chmod 0777 xxx这样的形式,前面的那个0就是对应的setUid和setGid的权限,可以用chmod 4777 xxx去改。其实看透了之后原理很简单,一些操作可以在adb shell中实现,试试就知道了~
最近也在捣鼓这个问题,想弄明白如何获取最初的root权限。很多命令比如mount,chown都需root权限才能执行的。这些命令能够执行成功,说明已经获取到了临时的root权限了。拷贝一段root精灵的执行脚本:#!/system/bin/sh
export PATH=$PATH:/sbin:/system/bin:/system/sbin:/system/xbin:/data/local/tmp
//此句不需要root权限,只是当前shell的path值会改变。
mount -o suid,remount /dev /dev || busybox mount -o suid,remount /dev /dev
//此句执行成功的话,是需要root权限的,那么root权限从何来呢??
cat /system/bin/sh & /dev/sh
chown 0.0 /dev/sh
chmod 06755 /dev/sh
#permanent root
mount -o remount,rw /system
if [ -d "/system/xbin/"]
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown root.root /system/xbin/busybox
chmod 04755 /system/xbin/busybox
/system/xbin/busybox --install -s /system/xbin
/system/xbin/busybox --install -s /system/bin
rm /system/xbin/su
rm /system/bin/su
dd if=/data/local/tmp/su of=/system/xbin/su
chown root:root /system/xbin/su
chmod 06755 /system/xbin/su
ln -s /system/xbin/su /system/bin/su
dd if=/data/local/tmp/busybox of=/system/bin/busybox
chown root.root /system/xbin/busybox
chmod 04755 /system/bin/busybox
/system/bin/busybox --install -s /system/bin
rm /system/bin/su
dd if=/data/local/tmp/su of=/system/bin/su
chown root:root /system/bin/su
chmod 06755 /system/bin/su
dd if=/data/local/tmp/KingUser.apk of=/system/app/KingUser.apk
chmod 0644 /system/app/KingUser.apk
pm install -r /system/app/KingUser.apk
rm /data/local/tmp/su
rm /data/local/tmp/KingUser.apk
rm /data/local/tmp/busybox
一句话解释:添加拥有最高权限的su binary文件用于进行最高权限操作。
DDMS有个工具 Dump View Hierarchy需要用到ROOT权限然后我找了root包,刷入后,敲入命令adb shellshell@android:$输入su后变为root@generic:#另建了模拟器,敲入adb shell直接显示root@generic想问下,第一种需要输入su才变为root用户第二种直接是root用户这两种用户区别在哪里?
所有答案已经过时,Android 4.3以后就不能用setuid的su了,更不用说4.4以后的SELinux了

我要回帖

更多关于 app store是什么意思 的文章

 

随机推荐