[Q] How does rooting work? - Asus Eee Pad Transformer Prime

I'm sure the answer to this question is somewhere there, but I cannot find it. There is plenty of information on how to root your phone or tablet, but not on how the root works on Android.
When I work on my Linux box I usually use a "normal", limited user. Only when I need to install something, I switch to superuser, or root, using "su" or "sudo".What happens on a rooted Android? Do all apps run with root privileges all the time? Or rather some sort of "su" command is unlocked, and an app can access it when required. Can I give and revoke superuser powers to an app?
It is always safer to run all programs or apps with limited privileges, so when they misbehave, the risk to system integrity is minimal. If everything runs in root mode, it might just spectacularly crash one day.
In this context, how does adaway work? Does it start with the system, sitting in the background and using its root privileges to intercept and filter incoming HTTP packages? If I understand this correctly, it should then work with any browser?
Sorry for asking several questions in one topic, but I'd appreciate if someone could briefly explain the whole thing.

There is a superuser app, which seems to be doing the same job as gksu does on a linux desktop. Apps can request root, you can allow/deny. If you use the shell, su works as normal (just no password) - but connectbot needs to be given root privileges in order for this to succeed.

Related

[Q] How does "Android Root" works ?

Hello XDA-Forum users,
I ask you a question: How does Android Root works ?
I mean, for example, How does it works in Nexus One ?
This would be an understanding question to know more about how I get root from my Phone (Nexus One, for example) from scratch, from sources.
upupupupupup
Rooting basics:
http://lifehacker.com/5342237/five-great-reasons-to-root-your-android-phone
For details on how to do it on your device, Google or use the forum search. Lots of rooting information that is device dependent out there.
It basically gives your phone permission to do almost anything. It is similar to giving a user in Windows Administrator rights. It is called super user. You can do many things such as removing unwanted apps and overclocking.
This is not what I mean, I asks for an explaining in which the question is "How the root is possible? What active the root ?" Probably a kernel exploit, or stuff like that, to understand the underground passage to take it, from an hack view.
So, How works a root utility (such SuperOneClick) to set gid to 0 ?
Valid question, I am also interested in learning this.
In other words, if I were to perform the rooting manually, where can I find such info?
And some of the question is why su must be in some diredctories, and can't be run from /data/local/tmp for example?
Someone can enlighten us?
diego.stamigni said:
Someone can enlighten us?
Click to expand...
Click to collapse
The general approach is taking advantage of bugs in the android OS
The process works something like this
User crafts some special data that contains a "payload" (the script/executable that we want to run)
User runs a system process that has root privileges and gets it to open the special data
The bug causes the system process to get confused by the data, and ends up running the embedded script
The embedded script runs with the same privileges as the system process, and thus can stuff that normal users aren't allowed to do (e.g. installs the SU app)
Commonly, things such as buffer overflows are used
So after gaining root access, which apps can run as root?
Or the user becomes root(as in desktop), and can run all types of apps?
Can root app(run as root) access everything?? Or app permission still applies?
Is it that system exploit is always used to run root apps?
can someone explain in technical details? not how to root.
are rooting programs open source??
What is the root procedure
Bayint Naung said:
So after gaining root access, which apps can run as root?
Or the user becomes root(as in desktop), and can run all types of apps?
Can root app(run as root) access everything?? Or app permission still applies?
Is it that system exploit is always used to run root apps?
can someone explain in technical details? not how to root.
are rooting programs open source??
Click to expand...
Click to collapse
Hi guys!
I have the same question and after searching and asking find this!
it is good!!
hope it works!
http://stackoverflow.com/questions/...hat-are-the-pre-requisites-for-it-to-work-wha
also look at the suggestedpages at the right of this page!

[Q] what does rooting actually do ?

hi. i can't believe i'm the first person to ask this but i've searched as best i can through these forums, and on google, and cannot find a definitive answer. there are lots of pages giving high level descriptions of rooting a phone like "gives admin access", "allows access to the root filesystem", etc. but, when you root a phone, what actually happens ? does it simply make the "su" binary available so that apps can call it to access the root user ? eg. i've got a samsung galaxy s2, if i install an insecure kernel, then add su to /system/xbin, and then reinstall a stock kernel, is that technically a rooted phone ? this is actually what i did on my phone, although i installed superuser and busybox from the market after adding su. i am aware that there are various threads in the sgs2 forums on how to root, i'm just using my phone as an example, i'm just trying to understand generically what is meant when someone says a phone has been rooted. cheers.
Full control over your system
Ability to alter system files. You can replace many parts of the "Android Core" with this including:
Themes
Core apps (maps, calendar, clock etc)
Recovery image
Bootloader
Toolbox (linux binary that lets you execute simple linux commands like "ls") can be replaced with Busybox (slightly better option)
Boot images
Add linux binaries
Run special apps that need more control over the system
SuperUser (lets you approve or deny the use of root access to any program)
Task Manager For Root (Lets you kill apps that you otherwise could not kill)
Tether apps (like the one found at [android-wifi-tether.googlecode.com])
<there are more but I cannot think of any right now>
Backup your system
You can make a folder on your sdcard and backup all of your .apk files to your sdcard (helps if an author decides to "upgrade" you to a version that requires you to pay to use the version you just had)
Relocate your (browser/maps/market) cache to your /sdcard
Relocate your installed applications to your /sdcard
Reboot your phone from the terminal app easily (su <enter> reboot <enter>)
Copied and pasted from google... it is your friend.
thanks for the response however, i'm trying to understand what actually changes on the phone when you root it, rather than simply the benefits of rooting a phone.
Carrot Cruncher said:
thanks for the response however, i'm trying to understand what actually changes on the phone when you root it, rather than simply the benefits of rooting a phone.
Click to expand...
Click to collapse
Unrooted phone is like logging on as user in a computer. By rooting you have "administrative" rights, just like using sudo command in Ubuntu. Some binaries which are important in gaining administrative rights are installed in the phone.
sent from my nokia 3210
If you come from Windows, you're familiar with the Administrator account. A user that can do everything on the system, as opposed to other users than only have limited privileges. In Linux, that account is called "root". That's all there is to it. It's a user that can do everything on the system.
@Panos_dm: Actually, it's *not* like using sudo. Sudo gives elevated privileges to your existing user account, whereas "root" is a whole separate account.
Nope, sudo actually switches users
i'm a linux user and have been a linux admin in the past so understand the difference between su and sudo. sorry to sound pedantic but i'm still not clear on exactly what happens when you root a phone, i.e. what exactly happens during the rooting process ?
It opens your phone to a whole new array of possibilities.
Sent from my HTC Sensation 4G using xda premium
Carrot Cruncher said:
but i'm still not clear on exactly what happens when you root a phone, i.e. what exactly happens during the rooting process ?
Click to expand...
Click to collapse
In a gist? The "su" binary and the Superuser.apk app get installed. Sometimes doing so requires exploiting a vulnerability via a trigger. Rageagainstthecage is a common trigger. I once had a link that explained what exactly rageagainstthecage does, but I don't have it anymore.
If you really want to know all the details, here's the script I used to root my Defy: http://pastebin.com/G3m9v4FQ
Hmm, I see the script contains a link to the explanation of what rageagainstthecage does. Cool.
many thanks for confirming my understanding of the process.

[Q] Help rooting omap5 running 4.2.2

As title, I'm trying to root a development board running 4.2.2. I do have root access and put busybox and su, but my problem is that whenever I start apps that require root access, superuser never gives me prompt asking whether root access is allow (yes, my setting in Superuser is to prompt for every apps that require root), as a result, the app would not run reporting that my device is not rooted. As an example, when I trying to run droidvncserver, it would tell me "could not start server", but if I start it as root on a shell, it would run and start server, this leads me to think that droidvncserver is not requesting root access or Superuser does not know that droidvncserver needs root access. I'm pretty sure I'm missing something in my system, but what is it. All this works on a rooted phone, but not on the development board. I've read through some of the rooting script for other phones, mostly include remounting /system as rw and put busybox and su onto the system, and that's what I've done on the board, but there's just no connection between those root-require apps and superuser. Anyone knows what I'm doing wrong/missing?

[Q] Pyle PTBL102BCD tablet has only partial ROOT

Have a strange one I don't know how to fix. Purchased a Pyle PTBL102BCD tablet for the Mrs. to use basically as an ebook reader (according to About, running 4.2.2). When it came in I started sideloading apps to prepare it for her (I do not have a Google account), and searched on the Net about rooting the device. Found a one-click that worked with a different Pyle tablet, so I gave it a shot.
Now I have root access _only_ through the adb shell. None of the apps (including Superuser.apk itself as tested by updating /system/bin/su) can get root access, yet I have no problem running root through an adb shell - remounted file systems, even performed an su which is the only instance Superuser.apk's log shows. Root access in the shell remains between reboots, so it's not a temporary root.
If the adb shell has root, I _should_ be able to use it to grant access to everything else, and I've followed a few different "manual" root instructions (having different permission settings for su and busybox), with no joy. So long as I connect with a USB cable and type on the Windows machine, I'm god. On the tablet itself...not so much.
I hope that someone with a more intimate knowledge of Android internals can point me in the right direction for achieving root completely. Currently have Titanium Backup and ConnectBot (long java errors when I attempt to su there) installed to test root, Superuser v3.1.3 and su v3.1.1. Permissions on su are -rwsr-sr-x. And the human is confused.
Did you get anywhere with this? I have the same problem. What one-click did you use?
mfurlend said:
Did you get anywhere with this? I have the same problem. What one-click did you use?
Click to expand...
Click to collapse
Side note; REALLY hate the new forum software. With all the untrusted Google and Amazon javascript (which my company firewalls), it's a pain for me to even log in let alone post replies. (And I wonder if I'm the only person in the world sick to death of all the unnecessary ajax garbage...)
Anywho, used Kingo, rooted and unrooted a few times, until I finally acquired complete root on the thing. Once I did, I could run Samba, and once that worked, I could more easily transfer files and apks to the tablet.
Still don't understand why it was left in such a...weird...state - having root by default in adb is just a scary thing!
thanks for the information. I tried doing that but I encountered various problems. Eventually, after trying to do it manually, I totally screwed up the device. Now it won't boot.. I still have access to adb. I need to flash this thing. Do you know what the stock ROM is?
mfurlend said:
Do you know what the stock ROM is?
Click to expand...
Click to collapse
No...I can give you the Kernel version info (3.0.36+ [email protected] #48) and build number (rk3168_k11_4.2.2_v20131230), but other than that no clue.

Why the need to root Remix OS for PC?

I'm new to Android on PC, so the question. (I'm somewhat versed in Linux, though.)
Why the need to root Remix OS for PC, if we can become root by pushing Alt+F1?
When I open the Terminal, I get [email protected] /$, while Alt+F1 gives me [email protected]_86_64:/#
I couldn't become root by writing su in the Terminal, but would be root in Alt+F1. Additionally, what are the commands in Android/Remix OS?
What advantages you get by rooting the hard disk installation?
There are a lot of different apps out there that require root permissions to function. While many of them would not really be applicable to RemixOS, or at least could be worked around using the root console, others still have their uses. For one, I'd rather trust Titanium Backup to backup my app data rather than manually copying things with the root console.
Granted, the root console is a very useful feature and does allow for a lot of tweaking, but without app access it's not the full story.
Actually, I want to, that what is the benefit if I am using root console
atiqursumon said:
Actually, I want to, that what is the benefit if I am using root console
Click to expand...
Click to collapse
Being able to take ota's without returning to the stock system.img. But you can tweak more if you have a rooted system.img.
Remix OS is a "desktop" user experience, and anywhere in the desktop's i want my Administrator rights .
The idea to root our phones/tablets came from the experience from the desktop era.
Personally, i think Root should be at least a choice officially for RemixOS
PlutoDelic said:
Remix OS is a "desktop" user experience, and anywhere in the desktop's i want my Administrator rights .
Personally, i think Root should be at least a choice officially for RemixOS
Click to expand...
Click to collapse
I would also like to have Administrator rights. If I root the system.img, rename it from root.img to system.img, would I be able to become root in the Terminal? If so, what would be the command? Is it su? Can I make a user, or rename the user from u0_a77 and can I change localhost to some other name? What would be my root password?
Right now, I can get to root terminal by Alt+F1, but I feel as the root is at Jide, and they can do whatever without my knowing it. The password for root is there, not with me. I am thinking the Linux way here. Android is anyway Linux, most probably Gentoo.
I don't use a tablet, only an android phone, and the only time I go to internet is to check the bus timetable. Never thought of rooting the phone. Now with Remix OS, and Phoenix OS, I'd like to dig in. Hopefully, with you guys help.
ostrolk said:
I would also like to have Administrator rights. If I root the system.img, rename it from root.img to system.img, would I be able to become root in the Terminal? If so, what would be the command? Is it su? Can I make a user, or rename the user from u0_a77 and can I change localhost to some other name? What would be my root password?
Right now, I can get to root terminal by Alt+F1, but I feel as the root is at Jide, and they can do whatever without my knowing it. The password for root is there, not with me. I am thinking the Linux way here. Android is anyway Linux, most probably Gentoo.
I don't use a tablet, only an android phone, and the only time I go to internet is to check the bus timetable. Never thought of rooting the phone. Now with Remix OS, and Phoenix OS, I'd like to dig in. Hopefully, with you guys help.
Click to expand...
Click to collapse
Yes, root is su; no there isn't a password (conditional access to SU is what apps like SuperSU are for - you could password protect apps if you really wanted to).
The u0_a* is the owner/group of the app itself, every app gets its own owner/group (I think this is part of the selinux security measures; despite RemixOS running with SELinux off (permissive)).
I have systemless root working if anyone wants to try; just writing a short how to atm.
HypoTurtle said:
Yes, root is su; no there isn't a password (conditional access to SU is what apps like SuperSU are for - you could password protect apps if you really wanted to).
The u0_a* is the owner/group of the app itself, every app gets its own owner/group (I think this is part of the selinux security measures; despite RemixOS running with SELinux off (permissive)).
I have systemless root working if anyone wants to try; just writing a short how to atm.
Click to expand...
Click to collapse
Being in permissive mode means SELinux allow more access to the system. Sometimes having SELinux enforcing affects performance because it will deny the system access to certain modules like Bluetooth, WiFi, etc. Also you can set a password in SuperSU and set apps so they always ask for permission before granting root access you have to enter the master password.
HypoTurtle said:
I have systemless root working if anyone wants to try; just writing a short how to atm.
Click to expand...
Click to collapse
Yes, I would like that. If you could write about the commands, it would be much nicer.
ostrolk said:
Yes, I would like that. If you could write about the commands, it would be much nicer.
Click to expand...
Click to collapse
I've posted it here at the top; it will take me a while to get a 32bit setup built though...

Categories

Resources