Rooting and su permissions - Nexus S General

Assuming I root my Nexus S and install su.
Does any application that wish to use it can just use it or there's some kind of popup that asks me for password or at least confirmation ?
If not sound like a too big of a risk to root

aviramsegal said:
Assuming I root my Nexus S and install su.
Does any application that wish to use it can just use it or there's some kind of popup that asks me for password or at least confirmation ?
If not sound like a too big of a risk to root
Click to expand...
Click to collapse
The superuser app will give you a pop-up and ask for permission. You can set some apps to always have permission, and you can revoke whenever you want through the superuser app. The app is in addition to the binary that actually gives su rights.
Superuser asks permission even for adb from the terminal, so I think it's pretty good protection.
You also get a notification bar or toast message every time an app gets granted su rights.
I don't feel unsafe on my rooted phone.

distortedloop said:
The superuser app will give you a pop-up and ask for permission. You can set some apps to always have permission, and you can revoke whenever you want through the superuser app. The app is in addition to the binary that actually gives su rights.
Superuser asks permission even for adb from the terminal, so I think it's pretty good protection.
You also get a notification bar or toast message every time an app gets granted su rights.
I don't feel unsafe on my rooted phone.
Click to expand...
Click to collapse
All right, sounds decent.
Thank you.

As I observe in my unrooted Nexus S, su comes pre-installed in Nexus S. Unlike Samsung captivate (unrooted) where, if you run su on adb shell, you get 'command not found', in the Nexus S, I received the message 'Permission denied'

Su is not pre installed in the nexus s. If it where then it would be no need to install it as part of the root process.

blahsphemer said:
As I observe in my unrooted Nexus S, su comes pre-installed in Nexus S. Unlike Samsung captivate (unrooted) where, if you run su on adb shell, you get 'command not found', in the Nexus S, I received the message 'Permission denied'
Click to expand...
Click to collapse
jerrycycle said:
Su is not pre installed in the nexus s. If it where then it would be no need to install it as part of the root process.
Click to expand...
Click to collapse
[email protected] is your phone an out of the box new purchase? If you really do have su installed already, you might have gotten someone's returned unit.

Related

(Q) Root with Super User

So I'm rooted and downloaded Super User app from market. I have a bunch of root apps but the only app listed in the super user app is Titanium. Any reason why the other rooted apps (Set Cpu, Minfree Manager, etc.) aren't listed?
Have they asked for superuser?
Via EVO on 4G with XDA App
awenthol said:
Have they asked for superuser?
Via EVO on 4G with XDA App
Click to expand...
Click to collapse
No it doesn't
Sent from my CM6 powered device
krazyflipj said:
No it doesn't
Sent from my CM6 powered device
Click to expand...
Click to collapse
We managed to fix this problem the other night on the irc channel. I didn't post anything because it doesn't seem like many people are using superuser.apk. The problem is that superuser needs to install it's own version of the su program to run properly. The current root method replaces su every reboot. When you lose the su that superuser.apk installs it can't control root access anymore and basically any program can request root without a prompt to you. The fix is to just replace the jk-su file in /system/bin/ with the superuser su. Then every reboot it will just use the one that works with the superuser app. I did this a few days ago and haven't had any problems.
The procedure is as follows (you need to use adb):
Go into the superuser app, go to the "settings" tab and at the very bottom choose to update su (it should change from saying original to something like "su v2.3.1-ef").
Plug the phone into usb and make sure you have USB debugging enabled.
Open a command prompt on the computer and goto your android sdk tools folder to run these commands (IMPORTANT NOTE - Make sure you have the phone screen on and unlocked when you run the su command below because superuser will ask you for permission and you need to click yes. It wont prompt if the screen is off or locked and the adb shell will just sit there waiting for a response. As soon as you click yes on the phone you should get a # in the adb shell):
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
Now you should just reboot the phone and check that it worked by running any program that needs root access that isn't already listed with superuser. I suggest shootme or wifi tether. tether asks when you start or stop tethering and when you allow a mac address in the access control.
richse said:
We managed to fix this problem the other night on the irc channel. I didn't post anything because it doesn't seem like many people are using superuser.apk. The problem is that superuser needs to install it's own version of the su program to run properly. The current root method replaces su every reboot. When you lose the su that superuser.apk installs it can't control root access anymore and basically any program can request root without a prompt to you. The fix is to just replace the jk-su file in /system/bin/ with the superuser su. Then every reboot it will just use the one that works with the superuser app. I did this a few days ago and haven't had any problems.
The procedure is as follows (you need to use adb):
Go into the superuser app, go to the "settings" tab and at the very bottom choose to update su (it should change from saying original to something like "su v2.3.1-ef").
Plug the phone into usb and make sure you have USB debugging enabled.
Open a command prompt on the computer and goto your android sdk tools folder to run these commands (IMPORTANT NOTE - Make sure you have the phone screen on and unlocked when you run the su command below because superuser will ask you for permission and you need to click yes. It wont prompt if the screen is off or locked and the adb shell will just sit there waiting for a response. As soon as you click yes on the phone you should get a # in the adb shell):
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
Now you should just reboot the phone and check that it worked by running any program that needs root access that isn't already listed with superuser. I suggest shootme or wifi tether. tether asks when you start or stop tethering and when you allow a mac address in the access control.
Click to expand...
Click to collapse
Hmmm cp /system/bin/su /system/bin/jk-su didn't work. I ls /system/bin and don't see jk-su listed just su...
krazyflipj said:
Hmmm cp /system/bin/su /system/bin/jk-su didn't work. I ls /system/bin and don't see jk-su listed just su...
Click to expand...
Click to collapse
What root did you use? I did mine manually so there may be some differences if you used a one click.
Edit: I just looked at noobnl's one click root and it uses the same script that contains the line:
#copies busybox su
cat /system/bin/jk-su > /sdx/su
so it should definitely be there even if you used his one click.
When you run the command "ls -l /system/bin/jk-su" what do you get?
I get this:
ls -l /system/bin/jk-su
-rwsr-sr-x root root 26264 2010-09-18 06:10 jk-su
Please delete
krazyflipj said:
Please delete
Click to expand...
Click to collapse
Did you get it working? After you updated su through the superuser app then it started working so that is why it asked you for permission when you were in terminal. The problem is that if you reboot without applying the rest of the fix to replace jk-su then you will lose the updated su and it will stop working.
richse said:
Did you get it working? After you updated su through the superuser app then it started working so that is why it asked you for permission when you were in terminal. The problem is that if you reboot without applying the rest of the fix to replace jk-su then you will lose the updated su and it will stop working.
Click to expand...
Click to collapse
Hey Richse, I'm trying to get this to work but it isn't.
rose1 said:
Hey Richse, I'm trying to get this to work but it isn't.
Click to expand...
Click to collapse
can you give me more information, what errors are you getting or what exactly is happening?
richse said:
can you give me more information, what errors are you getting or what exactly is happening?
Click to expand...
Click to collapse
Okay, I did the one click root method that is stickied. Then I did
adb shell
su
after doing su, I initially saw on the phone that unknown user was asking for superuser access. Of course, "unknown user" is me so I granted it. Then I saw the # then I went ahead and did
mount -t rfs -o remount,rw /dev/block/stl9 /system
That worked fine . The line repeated itself which indicates that it worked. When I do
cp /system/bin/su /system/bin/jk-su
it then says cp: not found.
Just to give you a little more info, I just restored my phone with odin to factory defaults, then I updated to the DI07 update. Then I installed the final clockwork mod recovery, then I did the one click root method. Then I installed superuser in the system/app folder.
rose1 said:
Okay, I did the one click root method that is stickied. Then I did
adb shell
su
after doing su, I initially saw on the phone that unknown user was asking for superuser access. Of course, "unknown user" is me so I granted it. Then I saw the # then I went ahead and did
mount -t rfs -o remount,rw /dev/block/stl9 /system
That worked fine . The line repeated itself which indicates that it worked. When I do
cp /system/bin/su /system/bin/jk-su
it then says cp: not found.
Just to give you a little more info, I just restored my phone with odin to factory defaults, then I updated to the DI07 update. Then I installed the final clockwork mod recovery, then I did the one click root method. Then I installed superuser in the system/app folder.
Click to expand...
Click to collapse
I'm not sure why cp doesn't work, it just means copy. An alternative to try is to delete jk-su and replace it with the su you updated. Use these commands in place of the cp command:
rm /system/bin/jk-su
cat /system/bin/su > /system/bin/jk-su
Make sure you do this after updating su in the superuser app and without rebooting in between. Let me know if you have any problems.
followed instructions. no errors but i still have no programs asking for permission. i had wifi tether downloaded before and it worked. I downloaded shootme to see if it would ask for permission and it didnt - but it works. neithe one is lited in superuser either.
listed is:
adfree / quickboot / root manager / startup manager ( 3 of them) / super manager / unknown ( spawned right after i followed instrution)
any ideas
uninstall supersuser and reinstalled:
listed apps now:
adfree / busybox installer / root explorer / rootmanager / sufbs / tit backup
again not sure is it is correct. but seems to work "I THINK"
spdwiz18 said:
followed instructions. no errors but i still have no programs asking for permission. i had wifi tether downloaded before and it worked. I downloaded shootme to see if it would ask for permission and it didnt - but it works. neithe one is lited in superuser either.
listed is:
adfree / quickboot / root manager / startup manager ( 3 of them) / super manager / unknown ( spawned right after i followed instrution)
any ideas
uninstall supersuser and reinstalled:
listed apps now:
adfree / busybox installer / root explorer / rootmanager / sufbs / tit backup
again not sure is it is correct. but seems to work "I THINK"
Click to expand...
Click to collapse
When you go to update su in the superuser app does it say "original" and then change or does it stay updated after you reboot?
richse said:
When you go to update su in the superuser app does it say "original" and then change or does it stay updated after you reboot?
Click to expand...
Click to collapse
what i have:
cwm 2.5.1
root 2.1.1
di07
now for the long and skinny:
i checked. went to superuser and it told me 2.3.1 -ef i then HARD rebooted, came back with no root.and superuser told be original, hard reboot again, still no root. So one more time- third time is a charm - i have root and superuser told me 2.3.1 -ef
thanks again for the help.
i think my phone might not be total stable.. lol
any ideas.
also - i thought about upping root to most recent but unsure if i need to unroot or if i can install over it. your thoughts on this matter!!!!
spdwiz18 said:
what i have:
cwm 2.5.1
root 2.1.1
di07
now for the long and skinny:
i checked. went to superuser and it told me 2.3.1 -ef i then HARD rebooted, came back with no root.and superuser told be original, hard reboot again, still no root. So one more time- third time is a charm - i have root and superuser told me 2.3.1 -ef
thanks again for the help.
i think my phone might not be total stable.. lol
any ideas.
also - i thought about upping root to most recent but unsure if i need to unroot or if i can install over it. your thoughts on this matter!!!!
Click to expand...
Click to collapse
I doubt you need to update root. The root I used was the original manual method by joeykrim. The one click just automates that method. There is no reason why you should have to reboot multiple times to get this working. You basically just replaced a file with a similar file and the script that was installed when you rooted uses that file to create a new su every time you reboot. Personally, I would wipe to stock with Odin and then use the manual root method to make sure nothing funny is going on with your phone. When you rebooted and the su was "original" you didn't lose root, it just meant that superuser wouldn't work. For now, as long as the 2.3.1 -ef sticks around superuser will work just fine. As an alternative you could try noobnl's newest stuff. Looks like he made it compatible with superuser, so I think that would negate the need to use this type of fix. I'm not sure what he did to add the compatibility but you could probably ask him.
if you flash noobnl's latest kernel, it includes superuser and it works perfectly.
rose1 said:
if you flash noobnl's latest kernel, it includes superuser and it works perfectly.
Click to expand...
Click to collapse
The only issue I see with that is you have to use a DG27 kernel. If you want to use a DI07 kernel you still need to use this fix.
richse said:
The only issue I see with that is you have to use a DG27 kernel. If you want to use a DI07 kernel you still need to use this fix.
Click to expand...
Click to collapse
Very true. I didn't think about that.
I have latest Noobls kernel flashed on top of DI07 and this fix did not work.First thing that dint work is i never got SuperUser prompt after i typed su in adb shell,i got su in windows but no prompt on the phone.
To make it short i did the whole procedure from BetterTerminal(now i got su prompt) rebooted and back to same problem.Man,this been bugin me for two days now,sometimes i reboot the phone and i have root permissions then i reboot again and they are gone!
Big question is:is everybody on Epic have same issue or is it just on certain phones,kernels or roms?

Adb remount help

When i try to do a adb remount i get operation not permitted.
It looks like you dunt have superuser
Sent from my DROID2 using Tapatalk
See if your phone is asking to allow superuser permission. It does not stay on screen very long, so just glance at it and see if it pops up and then push the grant permission button.
i got it. i just had to put the bootstap on it.
driverx125 said:
i got it. i just had to put the bootstap on it.
Click to expand...
Click to collapse
Without bootstrap you do not have a constant root adb shell. In order to get root in adb shell, you would have to type su. Bootstrap patches adbd on the phone to allow for a constant root adb shell.

[Q] ADB "Permission Denied"

hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
mrpanic7 said:
hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
You may have to run visionary and reboot a few more times to make root privileges stick.
My MyGlacier 4G MINE!!!
Try this:
: adb shell (this should give $)
:$ su (next line type su, this should give you prompt on Super user to allow permission)
:# ( once you get this your good)
Sent from my HTC Glacier using Tapatalk
Try to install visionary and then re install open click temp root then permoot super user should ask to approve click yes. After that restart
Sent from my HTC Glacier using XDA App
Please post questions in Q&A forum. Thank you
ok everytime i try adb shell in terminal emulator it says the permission denied, im gonna try the first reply again and then see....any other ideas?
also guys, when i try and run visionary again it says your device is already rooted, along with when i type su in TE, it gives # with superuser permissions quote showing on bottom of screen, but i was trying to run adb commands from pc or from te and they still show permission denied. SetCPU works.
mrpanic7 said:
also guys, when i try and run visionary again it says your device is already rooted, along with when i type su in TE, it gives # with superuser permissions quote showing on bottom of screen, but i was trying to run adb commands from pc or from te and they still show permission denied. SetCPU works.
Click to expand...
Click to collapse
Ok, go into adb shell and type su + enter. Watch your phone when you do this. Superuser should ask if you want to allow "unknown" root privileges. "unknown" is adb. Click allow and your problems should go away.
My MyGlacier 4G MINE!!!
So typing su works and the message terminal emulator is granted permissions, but then any other commands dont work
Sent via MyTouch 4G
Whats a test command I could try?
Sent via MyTouch 4G
mrpanic7 said:
So typing su works and the message terminal emulator is granted permissions, but then any other commands dont work
Sent via MyTouch 4G
Click to expand...
Click to collapse
I ran into this same issue and it drove me crazy. I would not get prompted by the phone to allow su permissions when going through ADB- kept getting "permission denied"
I did finally get SU permissions through ADB, but I dont recall exactly what I did to get prompted to allow access.
I will try to retrace what I did... believe I had ADB shell running (without su permissions "$"), but I also had terminal emulator running on my phone. I entered the su command on my phone, then I did the same from ADB shell.
Finally the phone prompted me to allow access - accepted - and no problems from that point.
Basically, I just had to keep f'n with it.
Yeah thats my problem exactly. Yeah I appreciate any assistance you can provide. I mean my pc reads my device when I adb devices command, but it wont allow nothing past that. Please keep me informed on anything I can try, also im not thag most fluent with using sdk/adb stuff so any additional info with using that is much appreciated thanks again fellow enthusiasts!
Sent via MyTouch 4G
Have you tried to bacup su, then uninstall su. Reinstall su, Then try it again. MIGHT work
Sent from my HTC Glacier using XDA App
yeah i re-installed su and didnt help, @dbiggs-what can i do thru adb to initiate the su permissions to the device like you did?
I wish I could help more specifically, but I dont remember exactly what I did that allowed me access- just kept trying
Maybe try this...(dont be offended if any of these steps are ones that you already know or have tried, I am just trying to be as thorough as I can from memory)
Open up super user, then go back to the terminal emulator and enter the "su" command to gain superuser permissions.
Plug the phone into the computer, select charge only, enter ADB through tools (probably "C:\Android\tools" if your Android folder is in the root of your harddrive).
from the prompt C:\Android\Tools, enter:
adb shell
then you will get the "$" that you mentioned.
enter the "su" command, and hopefully you will get prompted to allow superuser permissions for ADB.
I am pretty sure these are the steps that I took, just had to keep trying.
Lemme know how it works out.
I see some people here asking about getting su privileges in adb, however I do have SU and I can run su in adb shell. My problem is that I am trying to push some files and use Android Commander. I can't run "adb remount" (remount failed: Operation not permitted), I can't copy files in Android Commander (it's says that I do not have ROOT)
How can I get Read-Write in ADB ??
Edit: Oh, now I got it, I don't have root in ADB, when i type "adb root" it says "adbd cannot run as root in production builds"
Did anyone figure this out? I'm being denied on TE and PC also.
I have managed to be able to get around this issue by going into recovery mode on my phone.
If the end result that you are looking for is to adb push files, then the easier way to do this is to flash clockwork recovery to your phone, then start your phone into recovery mode, mount system and you should be able to push files no problem.
Lemke know if this helps.
Sent from my HTC Glacier using XDA App
mrpanic7 said:
hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
I'm pretty sure your issue has nothing to do with SU access. Most likely, your phone is simply mounting as r/o (read only) when it boots up, so ADB is unable to change anything to the system folder. The easiest way to mount as r/w (Read/Write) is to go into Root Explorer and click the r/w button in the top right corner, and then go to ADB and see if it will allow you to do the same commands that it previously denied.
I have the same issue with my phone mounting as r/o by default, but I haven't been able to figure out how to automount as r/w on the MT4G. If anyone knows how, please share.
I had this same issue, on several android phones including MT4G. Here is how I fixed it.
1. Connect phone via usb (I was in "charge only" mode, not disk drive mode)
2. Open command prompt and navigate to the android tools folder
3. type "adb shell"
4. MAKE SURE YOUR PHONE SCREEN IS ON AND UNLOCKED
- The above step is very important otherwise you will not get the SU prompt
5. At the "$" prompt type "su"
6. Your phone should now display the SU screen asking you to allow the connection root access.
7. Once you allow it, you are golden.
I did this on a windows pc. Hope it helps.

[Q] rooted or not?

Hello,
I followed the Dummies guide that Shmarim posted here on XDA and also over on Android forums. I've posted on that forums thread, and had come to the conclusion that the rooting process was not successful, based upon permission denied when I type su in a connectbot local session, as well as getting permission denied when typing su in an adb shell session. Then, this morning I installed Juice Defender on my EVO Shift, and noticed in the logging of that app: 10:32 AM The device is rooted.
How do I know definitively if the device is rooted? Why does Juice Defender report it as rooted if I am unable to get SU permissions with connectbot and ADB?
Do you have the su icon in the app drawer?
Otherwise dl root checker on the market....
tdischino said:
How do I know definitively if the device is rooted? Why does Juice Defender report it as rooted if I am unable to get SU permissions with connectbot and ADB?
Click to expand...
Click to collapse
Turn off your phone.. turn back on by holding the power and volume down at the same time. Once you enter bootloader, if you see s-off at the top your rooted.
minlo said:
Do you have the su icon in the app drawer?
Otherwise dl root checker on the market....
Click to expand...
Click to collapse
I uninstalled the SU app per the instructions in the linked guide, so no, it's not there.
I just ran root checker, And it says
Code:
Root access is not properly configured or was not granted.
Standard su binary location:
/syste/bin/su: No such file or directory
Alternat su binary location:
/sbin/su: Permission Denied
SU binary not found in the system declared path.
Turn off your phone.. turn back on by holding the power and volume down at the same time. Once you enter bootloader, if you see s-off at the top your rooted.
Click to expand...
Click to collapse
Yes, it says S-Off... With the results above from root checker, and the S-off, what does this mean?
tdischino said:
Yes, it says S-Off... With the results above from root checker, and the S-off, what does this mean?
Click to expand...
Click to collapse
Download Super User from the market and you should be good... Next thing is to flash recovery

Rooted but not rooted (U8800-51)

I can root this phone. No problem. I can then remount /system (or and other mount) as read-write and make changes. HOWEVER, I cannot get any other programs to recognize the device as rooted. I have su over-permissioned to 777 (I have it permissioned to root.shell).
What have I overlooked?
Did you install superuser app?
Sent from my GT-P1000 using Tapatalk 2
Yes, I installed superuser. Then when I try to install something like busybox, it does not prompt to provide root privileges. It then fails to install. The whole thing is antithetical to the Linux model/sudo due to the lack of a login I suppose.
eyeconic said:
Yes, I installed superuser. Then when I try to install something like busybox, it does not prompt to provide root privileges. It then fails to install. The whole thing is antithetical to the Linux model/sudo due to the lack of a login I suppose.
Click to expand...
Click to collapse
SU needs chmod 4775 doesn't it? You have the binary inserted but it doesn't have the authority to execute as root.
mezkalz said:
SU needs chmod 4775 doesn't it? You have the binary inserted but it doesn't have the authority to execute as root.
Click to expand...
Click to collapse
I forgot that this isn't full-blown Linux. Of course you are correct and thank you. The leading (setuid) digit is necessary because we are permitting an unprivileged program with a pseudo-UID access to root-owned executables.

Categories

Resources