[Completed] Understanding the basics: Root Process - XDA Assist

I am not sure if it has been asked before, but I want to understand the root process, not a specific phone root. I want to understand how it works. Can someone point me to a primer or any sites that at least discuss the generalities of root? Thanks in advance

hongning said:
I am not sure if it has been asked before, but I want to understand the root process, not a specific phone root. I want to understand how it works. Can someone point me to a primer or any sites that at least discuss the generalities of root? Thanks in advance
Click to expand...
Click to collapse
Maybe this post will help
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)
I can't post any outside links in this forum area but if you google for how root works you'll get heaps of good results.

Related

[Q] Conceptual Rooting question

Hi all,
First post here, be gentle.
I am a linux user (pretty noob but learning) and I'm a bit confused about what I've been reading on rooting android. I'm looking at getting a Droid X and I'm just trying to understand things before I dive in (already running 1.6 as a VM to play with it).
As far as I can tell--my bash skills not being quite good enough to completely understand everything in the rooting wikis--the methods employed to gain root access to a phone (from: wiki link) use an external OS to push image files onto the phone, then remove the native rights management files (mid.txt?) and replace them with something else in the pushed files. (Please correct me if I'm wrong, cause I probably am)
When completed, this presumably allows you to run su and changes the root password or removes it (though I have no idea how that would work). If this is the case, and I root my phone does this mean that my default login to new sessions will be as root, or will I have to run su to gain privileges? And if I have to run su, what's the password?
One of the first things I learned when getting into linux was that root can be dangerous--you can kill your computer etc.--so, what does this mean for my phone? Can I just login as an admin and then sudo for the apps that need it? (Yes, I realize that I would have to install sudo and edit the list of sudoers etc.) Is it not dangerous to run as root or it it dangerous but easily ignored?
I'm just curious about this because it seems funny to me that a lot of joe shmos who have no idea what they're unleashing by running as root might suddenly hear that it's a great idea to go into a terminal and run
Code:
#rm -rf /
and I have this desperate hope that it's not as simple as that and there is some kind of rights management still in effect once a phone is "rooted." If not, and rooting a phone really does log you in as root for every session then it's much more dangerous than I had thought.
Thanks,
Bob
Is there really no one here who can answer this?
My phone is coming on Wednesday and I'd love some help with this and I can't believe that one of the brilliant people here can't answer this.
Sorry nobody replied yet. When you root there is usually a one click root app that does everything for you. After you are rooted you can install superuser from the market and it lets you choose what apps are allowed to have root access. You can search the droid forums for more info since I have an epic. If this helped please hit the thanks button below
Sent from my Epic that craves frozen yogurt

[Q] How to root Acer Iconia A1-713 manually?

Has anyone created a method to root Acer a1-713 manually?
Those one click methods are really crude also I don't even know what's happening in there.
If anyone knows it please help me.
Dreadful man said:
Has anyone created a method to root Acer a1-713 manually?
Those one click methods are really crude also I don't even know what's happening in there.
If anyone knows it please help me.
Click to expand...
Click to collapse
Some said that Kingroot worked for them in this Q&A thread -> http://forum.xda-developers.com/chef-central/android/root-recovery-acer-iconia-tab-7-a1-713-t2851573
JnFrks said:
Some said that Kingroot worked for them in this Q&A thread -> http://forum.xda-developers.com/chef-central/android/root-recovery-acer-iconia-tab-7-a1-713-t2851573
Click to expand...
Click to collapse
Well it didn't for me. Also I want to know what I am doing with my tab and not just know that tapping this button will root my tab.
Have you ever tried to look at this site -> http://www.oneclickroot.com/device/acer-iconia-a1-713/. They featured this one-click rooting and it seems they can be trusted. I've downloaded and installed their software so no worries. Well, I'm also using a one-click root utility and it's always working. (just sayin')
The process of rooting a device is too complicated for those who don't have knowledge in Linux (like me), so your question about manually is out.
http://www.oneclickroot.com/device/acer-iconia-a1-713/
Well this one click root website was also a waste of time and didn't work either .
I may have to wait a little bit more before dumping this thread.
Rooting an android device basically means (for me) granting You (as the user) to do whatever you want to your device's system, hardware, etc. But what does root will actually do to your device that will cause you to obtain that superuser access? It's because of the "su" (Switch User) file used by Android and other UNIX-based systems that allows a process of switching of a user to be the superuser (or root user) that has access to the commands and file system, meaning those processes that requires root permission (root access or superuser access) need to invoke su. So basically the process of rooting will just push this su, a binary executable file, to the file system so that you can switch to the root user to give root permissions... And the Superuser application is just optional, but really required for some reasons, it serves as the "gatekeeper" of the su binary so when a certain command or application that invokes su will prompt the user by the Superuser app first before granting the root permission since becoming the root user can do whatever to the system which means it can cause the device to malfunction, etc... So what do you mean by manually?
Sorry for what I'd just suggest you that OneClickRoot waste your time...
Oh, there's a bad news after spending time searching how to root your device, read the news here -> [GUIDE] Firmwares, ROMs, CWM, Root - Acer Iconia (MTK) Tablets [ⒶⒸⒺⓇ ⒹⒺⓋⒾⓁⓈ]
Can't find a best way to root your Acer.
Well thanks for enlightening me on the topic, I hadn't really understood what really is su..
By manually I meant by using computer and tinkering with the files hands on.
Oh, and you needn't to be sorry since everything I tried didn't work. Sometimes I had root till the app was open while sometimes it existed until the next reboot.
Also looked at the link you gave and well, what can I say, it really is bad news and there sure is the risk of bricking my device.
Well thanks for taking your time.

[Completed] about non rooted devices

hi guys,
first, i m all time thankful to these developer guys, you make mobile world so genius, yeah it was never genius,
second, something i learn and something i want to learn more is about android always, but here is my question below that is really important. i don't know if it really make sense or not but i would like to know your opinion.
question :- i see there is a way to push files into device without rooting it. is it secure? it is safe? i guess yes. than how can i push titanium backup(data only) of particular app into my device?
example : - i myself after learning lot about apk tool and all that, modded "whatsapp" successfully and which is out of this world according to me, lately i cam to know there is already one called whatsapp GB, but mine is mine. (right now i don't have rooted device so couldn't send screenshot), but what i am trying to figure out is, i can install my modded apk on my non-rooted device and can run it either, problem comes when it is about registering number, what i really thought that if i can push titanium backup of my modded whatsapp.apk (data only - taken perviously when i had rooted device) to this non rooted device via ADB, than i didn't need to root my device ever, and so for any other app that is modded by me or any developers can be executed on non rooted device.
pros - if this is possible than i guess People won't need to root device, will not loose warranties, will not loose device by bricking it, will get out of a procedure of root methods, no one will ask more about root method, soft brick, hard brick, boot loader issues and many more questions like that i guess.
there will left only one tutorial than if this is possible and it will be like this - how to use adb?(step by step : beginner to black hat).
if this is possible than what we need? proper method of how to use adb, most of people easily can learn how to use adb but most of tutorial misses some points like how to push file by changing r/w permission, and where to put new data backup or files in device like some tutorial i have seen gives only command line but people actually don't know where to put the file like /data/data and than what?
Developers and Rooted device owner will become God in fact in this case because they can lead the rest in right path.
is this possible? or am i ridiculously making no sense?
joy.julep said:
hi guys,
first, i m all time thankful to these developer guys, you make mobile world so genius, yeah it was never genius,
second, something i learn and something i want to learn more is about android always, but here is my question below that is really important. i don't know if it really make sense or not but i would like to know your opinion.
question :- i see there is a way to push files into device without rooting it. is it secure? it is safe? i guess yes. than how can i push titanium backup(data only) of particular app into my device?
example : - i myself after learning lot about apk tool and all that, modded "whatsapp" successfully and which is out of this world according to me, lately i cam to know there is already one called whatsapp GB, but mine is mine. (right now i don't have rooted device so couldn't send screenshot), but what i am trying to figure out is, i can install my modded apk on my non-rooted device and can run it either, problem comes when it is about registering number, what i really thought that if i can push titanium backup of my modded whatsapp.apk (data only - taken perviously when i had rooted device) to this non rooted device via ADB, than i didn't need to root my device ever, and so for any other app that is modded by me or any developers can be executed on non rooted device.
pros - if this is possible than i guess People won't need to root device, will not loose warranties, will not loose device by bricking it, will get out of a procedure of root methods, no one will ask more about root method, soft brick, hard brick, boot loader issues and many more questions like that i guess.
there will left only one tutorial than if this is possible and it will be like this - how to use adb?(step by step : beginner to black hat).
if this is possible than what we need? proper method of how to use adb, most of people easily can learn how to use adb but most of tutorial misses some points like how to push file by changing r/w permission, and where to put new data backup or files in device like some tutorial i have seen gives only command line but people actually don't know where to put the file like /data/data and than what?
Developers and Rooted device owner will become God in fact in this case because they can lead the rest in right path.
is this possible? or am i ridiculously making no sense?
Click to expand...
Click to collapse
Hello,
Please post your query here Ask any Query Newbie Friendly with all relevant details, the experts there maybe able to assist you.
-Vatsal

[Completed] is this right place to post new thread?i m really not getting idea where to post.help

hi guys,
first, i m all time thankful to these developer guys, you make mobile world so genius, yeah it was never genius,
second, something i learn and something i want to learn more is about android always, but here is my question below that is really important. i don't know if it really make sense or not but i would like to know your opinion.
question :- i see there is a way to push files into device without rooting it. is it secure? it is safe? i guess yes. than how can i push titanium backup(data only) of particular app into my device?
example : - i myself after learning lot about apk tool and all that, modded "whatsapp" successfully and which is out of this world according to me, lately i cam to know there is already one called whatsapp GB, but mine is mine. (right now i don't have rooted device so couldn't send screenshot), but what i am trying to figure out is, i can install my modded apk on my non-rooted device and can run it either, problem comes when it is about registering number, what i really thought that if i can push titanium backup of my modded whatsapp.apk (data only - taken perviously when i had rooted device) to this non rooted device via ADB, than i didn't need to root my device ever, and so for any other app that is modded by me or any developers can be executed on non rooted device.
pros - if this is possible than i guess People won't need to root device, will not loose warranties, will not loose device by bricking it, will get out of a procedure of root methods, no one will ask more about root method, soft brick, hard brick, boot loader issues and many more questions like that i guess.
there will left only one tutorial than if this is possible and it will be like this - how to use adb?(step by step : beginner to black hat).
if this is possible than what we need? proper method of how to use adb, most of people easily can learn how to use adb but most of tutorial misses some points like how to push file by changing r/w permission, and where to put new data backup or files in device like some tutorial i have seen gives only command line but people actually don't know where to put the file like /data/data and than what?
Developers and Rooted device owner will become God in fact in this case because they can lead the rest in right path.
is this possible? or am i ridiculously making no sense?
This is not the right place.
You were already advised to post in the Ask any Query Newbie Friendly thread last month.
Please post there with all relevant details.
Thanks and thread closed

"Noob" security question

Hi all,
According to you, is rooting your device or unlock its bootloader a way for making it less secure, more vulnerable to attacks ?
Is it a false idea or a real subject ?
iwanttoknow said:
Hi all,
According to you, is rooting your device or unlock its bootloader a way for making it less secure, more vulnerable to attacks ?
Is it a false idea or a real subject ?
Click to expand...
Click to collapse
Yes it definitely is less seure
IronRoo said:
Yes it definitely is less seure
Click to expand...
Click to collapse
Thanks for your reply.
Coud you please give us more details ?
Do you mean that it can be hacked ?
What device's components are less secure when the it's rooted ?
iwanttoknow said:
Thanks for your reply.
Coud you please give us more details ?
Do you mean that it can be hacked ?
What device's components are less secure when the it's rooted ?
Click to expand...
Click to collapse
Yes, basically everything is less secure. Eg
quote "By gaining root access, you get total control over the entire system. With the right skills and tools, you can read and modify almost any parameter on your device. This is the reason why some apps, as as SuperSU, require root access in order to work properly. However, this type of access is a double edged sword as with root access nothing is there to prevent malicious applications from wreaking havoc on your system: system files can be corrupted or deleted, personal information can be skimmed, and you could even soft brick your device."
https://www.androidpit.com/5-reasons-not-to-root-your-device
And possible even just having su binary installed is an issue, though it's not clear to me whether this has been confirmed, it seems precautionary to me, if it's just a LinageOS issue or more devices are vulnerable, however this weeks update to Linage OS is trying to address this. Anyhow the fix seems to have some extra benefits
https://lineageos.org/Changelog-9/
Also, just to be clear, you are still able to be hacked even if you are not rooted, but it's a whole lot more difficult.
iwanttoknow said:
Thanks for your reply.
Coud you please give us more details ?
Do you mean that it can be hacked ?
What device's components are less secure when the it's rooted ?
Click to expand...
Click to collapse
Also just to be a tad bit more correct in nature,
Rooting or unlocking your bootloader do NOT necessarily mean your device is any less secure than it is when you first turn it on after purchase.
Many people tend to misunderstand what rooting a phone is intended for, and most of the popular "One-Click" methods are simple apps you download install and run on your phone to acquire root access through a process called "Privlidge Escalation" which gains permission as root by simply climbing a chain that eventually lets it give you access to all your phones internals,
Thus in theory, any given app could be injected with that same code & then used to MALICIOUSLY root your device (without your knowledge or control) which would obviously be a MAJOR security flaw *Cough Cough* on Google's end *Cough Cough* but since it is generally only used by geeks who want to use a phone properly they don't look too much deeper past that. However rooting your device by yourself, unlocking your bootloader by yourself, controlling root permissions via SuperSU or like application ensures if anything TRIES to gain root access YOU being the owner of YOUR device can deny the possible threat instead of never being aware of it........
Thanks for your reply.
What is *Cough Cough* ?
BTW I understand that a malicious application can take control of my device without I know it, if it's not rooted, by using the same code as applications rooting your device.
Do I have well understood what you wrote ?
But how can I have the insurance that I always will be warned by an application like SuperSU or others ?
I have necessarily to TRUST this type of application which could be also a malicious application...
It's a veritable vicious circle.
?
The question you should be asking yourself is this. Why do I want to root my device?
Though, any device may have vulnerabilities which can be exploited to gain root like mentioned. If you want to keep your device secure, do not install or use anything from an unknown source.
samehb said:
The question you should be asking yourself is this. Why do I want to root my device?
Click to expand...
Click to collapse
My main raison to root my device (if I did), would be to have a finest control on it.
But it's seems to be a difficult goal... like security in general.
?
iwanttoknow said:
My main raison to root my device (if I did), would be to have a finest control on it.
But it's seems to be a difficult goal... like security in general.
?
Click to expand...
Click to collapse
SuperSU will automatically deny anything asking it to provide root access by default . When you have an app for rooted phones installed and you run it for the first time you will get a pop-up from the SuperSU app to say "Yes, go ahead" or "No!" to anything before it even runs. So for me I always try to get devices with a way to root available because its the only way I know if stuff is trying to gain root access without my permission & watch it's actions.
@LilAnt530
Thanks for your reply.
My previous device was rooted and I used SuperSU.
But as I wrote before, "how can I have the insurance that I always will be warned by an application like SuperSU or others ?
I have necessarily to TRUST this type of application which could be also a malicious application..."
iwanttoknow said:
@LilAnt530
Thanks for your reply.
My previous device was rooted and I used SuperSU.
But as I wrote before, "how can I have the insurance that I always will be warned by an application like SuperSU or others ?
I have necessarily to TRUST this type of application which could be also a malicious application..."
Click to expand...
Click to collapse
Oh okay dude apologies the Open Source alternative to SuperSU is Phh's SuperUser & you can find it in the magisk related forum. SuperUser is only questioned as "Malicious" because ChainFire keeps the source closed from what I understand, so I believe it was Phusssion who came to light abt showing us systemless root methods with his open source root management app . You may need to root your phone with an unsafe method, & install Magisk Manager & deploy a magisk install to get the open source variant to work though, not 100% sure
It seems that it will be more and more difficult to root a mobile with new Android's versions.
iwanttoknow said:
It seems that it will be more and more difficult to root a mobile with new Android's versions.
Click to expand...
Click to collapse
I agree! And it also feels like its becoming a very heavy marketing plot aspect instead of another thing that made Android great. Like are we just supposed to pay ridiculously for the Pixel to obtain root? & for the record, that "Essential" phone, is still sorta essentially too expensive......
iwanttoknow said:
@LilAnt530
Thanks for your reply.
My previous device was rooted and I used SuperSU.
But as I wrote before, "how can I have the insurance that I always will be warned by an application like SuperSU or others ?
I have necessarily to TRUST this type of application which could be also a malicious application..."
Click to expand...
Click to collapse
Phh superuser with Magisk is a 100% open source method for managing root access on your device
Also discussed there: https://forum.xda-developers.com/showthread.php?t=2687933
Primokorn said:
Also discussed there: https://forum.xda-developers.com/showthread.php?t=2687933
Click to expand...
Click to collapse
Thanks I was trying to find one of those lol. As ive seen this question asked hundreds of times within recent months across forums
iwanttoknow said:
Hi all,
According to you, is rooting your device or unlock its bootloader a way for making it less secure, more vulnerable to attacks ?
Is it a false idea or a real subject ?
Click to expand...
Click to collapse
Rooting is a way to access the root-user on Android. It is the exact same as logging in as the root user in UNIX based operating systems. The windows equivalent of 'root' user, is an administrator account. Only difference is, within other UNIX based operating systems, the root user account is easily accessible. In android, it is blocked, so you need to do some process to gain access to the root user account. This process is known as "rooting".
Now, with administrative privileges, you gain the ability to modify the system, which is very useful, if kept in the right hands. But GOD FORBID, you get some nasty malware, such as a trojan or virus on your rooted device, that piece of malware now has access to administrative privileges, and can virtually do ANYTHING it wants to your system.
If you get some malware while the device does not have root access, the scenario is a lot less serious, as the malware cannot access system files, UNLESS there is an exploit designed SPECIFICALLY for that device or software version.
Now, unlocking bootloader in theory is a security flaw.... but then again, freedom is always inversely proportional to security... you have to sacrifice a bit of one to acquire the other. Theoretically, if all the custom operating systems you install are from trusted sources, and there is no embedded backdoors or spyware, or rootkits, or trojans, it is perfectly alright, software vulnerabilities, it is alright. But you simply cannot trust what these developers of custom roms actually embed into their roms, without actually examining the code itself.
I would recommend if you root and unlock the bootloader, install a custom recovery software such as TWRP. That way, in case your device gets compromised by hackers/malware, you can completely reformat the drive, and flash the stock firmware, thereby removing the malware.
Hope this helps.
Hope this helps.
---------- Post added at 09:31 AM ---------- Previous post was at 09:28 AM ----------
iwanttoknow said:
It seems that it will be more and more difficult to root a mobile with new Android's versions.
Click to expand...
Click to collapse
Yes, but the difficulty isn't because of the operating system necessarily. It is mostly because the phone manufacturers lock the bootloader, which makes the process of getting root very difficult. In addition to that, certain exploits that we use to gain root access are also being patched in the newer Android versions.
BIG_BADASS said:
Rooting is a way to access the root-user on Android. It is the exact same as logging in as the root user in UNIX based operating systems. The windows equivalent of 'root' user, is an administrator account. Only difference is, within other UNIX based operating systems, the root user account is easily accessible. In android, it is blocked, so you need to do some process to gain access to the root user account. This process is known as "rooting".
Now, with administrative privileges, you gain the ability to modify the system, which is very useful, if kept in the right hands. But GOD FORBID, you get some nasty malware, such as a trojan or virus on your rooted device, that piece of malware now has access to administrative privileges, and can virtually do ANYTHING it wants to your system.
If you get some malware while the device does not have root access, the scenario is a lot less serious, as the malware cannot access system files, UNLESS there is an exploit designed SPECIFICALLY for that device or software version.
Now, unlocking bootloader in theory is a security flaw.... but then again, freedom is always inversely proportional to security... you have to sacrifice a bit of one to acquire the other. Theoretically, if all the custom operating systems you install are from trusted sources, and there is no embedded backdoors or spyware, or rootkits, or trojans, it is perfectly alright, software vulnerabilities, it is alright. But you simply cannot trust what these developers of custom roms actually embed into their roms, without actually examining the code itself.
I would recommend if you root and unlock the bootloader, install a custom recovery software such as TWRP. That way, in case your device gets compromised by hackers/malware, you can completely reformat the drive, and flash the stock firmware, thereby removing the malware.
Hope this helps.
Hope this helps.
---------- Post added at 09:31 AM ---------- Previous post was at 09:28 AM ----------
Yes, but the difficulty isn't because of the operating system necessarily. It is mostly because the phone manufacturers lock the bootloader, which makes the process of getting root very difficult. In addition to that, certain exploits that we use to gain root access are also being patched in the newer Android versions.
Click to expand...
Click to collapse
Thanks a lot for your detailed answer.
If you need security, just root and install supersu or magisk.
If you have xposed framework, then try a nice fire wall like Xprivacy
As far as I can tell both SuperSU and Magisk are trusted and reliable, people wouldn't be using them, if they were untrustworthy. And I agree with Big's comments, freedom and ability to manipulate what you want in the device comes with a significant security issue. You are going to have to be careful about this either way.

Categories

Resources