Manually running app as root? - General Questions and Answers

Hello All,
I am trying to figure out some way to manually start an app as root. It seems that apps which "require" root privileges are coded to elevate to root using su. However, what I would like to do is manually start *any* app as root - even an app that does not "require" root privileges. For anyone familiar with Linux or Unix, this would be similar to running 'su -c /usr/bin/myapp' (or less so, but also similar to running 'sudo /usr/bin/myapp'). In Windows this would be like using 'runas /user:Administrator myapp.exe'. Specifically, what I would like to do is open my text editor as root, so I can modify my hosts file. I needed to change this today, but was not near a computer, and therefore I could not use ADB. I finally gave up trying to figure it out and simply used Vi from the terminal, which is fine when using ADB, but quite difficult when actually using the phone. I could not find many questions (or answers) about doing this, and the few posts I could find, I get the impression that those who replied did not fully understand what the OP was asking. If my question does not seem clear, please let me know and I will try to rephrase it. I very much appreciate any insight. Thank you.

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] Temp root with rage method, where to go from here?

This is for anyone who is experienced with rooting using the rage method (command-line), using the Terminal Emulator, etc. I'm looking to root my phone, but aside from that, just looking to poke around and see what I can do at this point.
Ok, here's the skinny: I can get a temporary root (#) on my phone via the Terminal Emulator (will NOT show up in cmd.exe via adb) using the rage method, detailed steps are in my post here.
I can't push any files to /system after I get the temporary root - /system seems to lock up with any commands, like cat, attempting to do so (another post with details). However, I can copy /system files onto /sdcard, no limits as far as I know. Also, I can use dd to make a back-up of some of the mtd partitions. That's about the extent of the poking around that I've done after many hours of poring over other forums of different devices.
Where can I go from here? Can I use a different directory on the phone to try and push either su or Superuser to? Should I just give up? Haha.
I know that I already have my own thread dedicated to my phone and trying to figure out stuff for it. So, I hope I'm not stepping out of bounds by asking a question like this in regards to this rooting method...my apologies if I am being improper. My thanks and gratitude for anyone who reads this and can help me get to the next step, as little or big as that may be.

[Q] Looking for information on Temporary Root access of devices

Hello.
I am looking for some information on temporary rooting devices.
My current goal is to gain access to a root adb shell without actually modifying the device permanently. Be able to run a app with elevated privileges that will not modify the phone/tablet in any way and then exit and be back to stock with no changes to the device.
I have been looking at different oneclick root scripts and it seems across many different devices rageagainstthecage-arm5.bin is ran to gain root.
Does it do permanent changes at that point or does it just get access to a root shell to install busybox and su for permanent root after reboot?
If it is just used to gain a root shell, then my goal is to use this within a script to gain root access, run my app with elevated privileges and once finished, close out with no lasting effects to the device. So I will have to do the same process again if needing to run the app again.
If someone can comment on the process of gaining a root shell on android devices I would apprecaite it. I'm sure there is not a simple bin that can be ran on all 2.1 or newer devices but from the research I been doing tonight, seems it has been used on HTC's and Samsungs to gain root.
However if rageagainstthecage-arm5.bin does more than just hack itself root temporarly then that will not work for my issue.
If there is a different area in XDA Forums I should be asking this, please refer me there.
Greatly apprecaite all help on this.
MobileMedic
Just root it. Doesnt cause damage
Sent from my Nexus S using XDA App
Perm root would be the direct and simple answer to my needs. However it is not what we are looking for. I basically need to be able to remote control a device for the user and help them correct any issues they are having. There is no simple option for doing this as no one has written a "Log Me In" type app for android. And any that are written are for rooted phones. However, Mary-Jo and JimBob who call for help won't have rooted devices only stock. I am not allowed to root the devices because technically its voiding the warranty (even a flash back to stock would be just fine of a fix, but End Users are not that smart sometimes)
So having a Temp root option to be able to run remote control app is my only solution I can see at this time.
Any help would be greatly appreciated.
Hmmm. I root phones for customers as its my job. I understand a bit more where ur ciming from now.
sent from my boosted nexus S

[Q] What is rooting?

I know how to root devices but whenever someone ask me what is rooting i am not able to explain it :-\ anyone got idea about how to explain rooting
Sent from my GT-I9100 using xda premium
ankur.co.in said:
I know how to root devices but whenever someone ask me what is rooting i am not able to explain it :-\ anyone got idea about how to explain rooting
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Rooting is opening the operating system to be alerted.
Sent from my Rooted Gameboy
Rooting allows you to run special applications like SuperUser, SetCPU. Allows you to flash custom kernels and ROMs like cyanogen mod. Also you free up memory that extra apps use.. In easy language, you get full access to everything..
Sent from my GT-I9300 using xda premium
If you want the most complete, hands-on way to control what your phone is capable of...it's best to root it. Rooting gives you access to manipulate your phone in a way that carriers try to keep you from doing.
Sent from my SGSIII running some "Goodness" 4.0 (Team Nocturnal) using xda app-developers app
Allow you to backup & access apps/info/data etc that no root phone cant.
ankur.co.in said:
I know how to root devices but whenever someone ask me what is rooting i am not able to explain it :-\ anyone got idea about how to explain rooting
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Rooting is the act of gaining superuser access(root permissions) to the root(main files) of the device's operating systems, letting apps run at kernel level. Rooting allows for overclocking, however, in Jelly Bean, root is not required to overclock. Overclocking is the most frequently used root application. Root also lets you change system files.
Here is rooting for all you noobs
Basically every linux system has an administrator capable of making changes to the computer and access all the files that make the system up. On Mobile phones however, this is locked down for security/warranty reasons etc.
This is a great start, we know that the admin (root) access is there, we are just locked down from using it. So the point of rooting is not to install Super User, it is to trick the system into giving us adb shell as root and therefore allowing us to mount the /system partition as Read/Write (instead of read only).
That is what allows us to change the value of ro.secure in the kernel, which sets the flag that allows us a root shell, instead of a regular (non-privileged) shell. Then we push the SU binary and SU app to the system, which gives us choice as to what apps are allowed su rights and what is not. In other words, we don't need the SU app to obtain root access. It is just for data protection.
It sounds so simple, but it is not. Since the /system partitions cannot be mounted as read/write by default, and ro.secure=1, we cannot have a root shell and therefore not able to change ro.secure=0. Therefore, it is secure.
In order to gain the root shell we have to find an exploit that will trick the system. We use an exploit (hack, vulnerability) to trick the android OS into giving us a root shell in adb. For example on of them (in simple terms is...)
1. We kill adbd ***(this is the parent) It spawns a shell (adb) based on its rights*** keep this in mind.
2. When it adbd starts up, it must run as root. When its done, it will set its id back to a non root user
3. The program (SuperOneClick for ex) races adbd by spawning a process that tries to change its id at the same time (slightly first).
4. Since we are busy changing the id of our fake process, the kernel wont be able to change adbd since it is busy and therefore adbd continues to run as root.
5. Now we can spawn a root shell, because the root rights are passed from adbd to the shell, which is now root.
6. Sucess! Now lets set everything up!
This has been answered about as well as it can. For future reference, please try searching before posting as extremely basic questions like this do not warrant creating a thread. Closed.

[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.

Categories

Resources