[Q] Nexus S Rooted, but I always have to type "su"... - Nexus S Q&A, Help & Troubleshooting

By all accounts, my Nexus S 2.3.4 has been successfully rooted using this method: http://forum.xda-developers.com/showthread.php?t=1138755
Now I can use apps that require root access, and I can also type "ADB shell su" to gain root access if I want to poke around within the file stucture.
HOWEVER, what puzzles me is that when I type "adb shell", I am prompted by a "$" symbol instead of "#". I have to type "su" from the adb shell in order to get the "#" symbol, and when I exit out of shell I lose my su status. It means that I cannot simply do something like "adb shell ls /system/" or "adb remount"; I get a "permission denied" message. It also means I cannot easily pull or push files to/from the /system/ dirs from the command prompt.
When I was using a rooted 2.3.3, I was always promted with the "#" symbol after typing "ADB shell". How do I get this level of root access in 2.3.4?

This is normal.
Sent from my Nexus S 4G using xda premium

Fair enough. But is there a way to get "#" access directly from "ADB shell" ?
The main thing I want to be able to do is pull and push files directly from/to the system directories. As I mentioned previously, with my old rooted OS (2.3.3) I was able to achieve this by simply typing "adb push [myfile] /system/".
But now, it seems my only options are:
a) "adb push [myfile] sdcard/", then "shell", then "su" and then copy the files from /sdcard/ over to /system/, then "exit" "exit".
b) Boot into recovery, mount the system, then "adb push [myfile] /system/".
Is there a simpler method?

shanksworthy said:
Fair enough. But is there a way to get "#" access directly from "ADB shell" ?
The main thing I want to be able to do is pull and push files directly from/to the system directories. As I mentioned previously, with my old rooted OS (2.3.3) I was able to achieve this by simply typing "adb push [myfile] /system/".
But now, it seems my only options are:
a) "adb push [myfile] sdcard/", then "shell", then "su" and then copy the files from /sdcard/ over to /system/, then "exit" "exit".
b) Boot into recovery, mount the system, then "adb push [myfile] /system/".
Is there a simpler method?
Click to expand...
Click to collapse
Yeah, flash an insecure boot image, otherwise no.
Sent from my Nexus S using xda premium

krohnjw said:
Yeah, flash an insecure boot image, otherwise no.
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Can anyone recommend an insecure boot image for I9020A, v2.3.4?
I've looked everywhere...

shanksworthy said:
Can anyone recommend an insecure boot image for I9020A, v2.3.4?
I've looked everywhere...
Click to expand...
Click to collapse
no one wants an insecure boot image. imagine if a malicious app was installed onto your phone, and it had complete root privilege to whatever it want. before you would know it, you would have a $20000 bill to some porn site. and there would be a video of you doing whatever you do in privacy, floating around the internet, recorded from your phones front facing camera

Related

JF 1.42 rc33 and T.E.

I'm sure i'm not the only one that has noticed that you can't update terminal emulator with modded firmware, i did a mild look through the searches, and didn't find what i was looking for, is there a means to update this, i've tried takeing it out of white list and then updating, but no go... Not that its a big deal TE works, its just an annoying knawing thing in the back of my mind, knowing there is an update on the market, and i can't have it
Delete the terminal app in terminal by
su
cd /system/app
ls
them find the app that starts with com. something
type rm -> name of the app
update it in market
card13 said:
Delete the terminal app in terminal by
su
cd /system/app
ls
them find the app that starts with com. something
type rm -> name of the app
update it in market
Click to expand...
Click to collapse
gives me a read only error, i have to chmod it first right? have no clue how to do that right now, have to look it up. Thanks for pointing me to the proper file though
It'd probably be best to use adb.exe (available in the android SDK) to remove terminal emulator rather than using terminal emulator.
Also, in order to change anything in the /system partition, you need to remount it as read/write.
With adb this is easy:
Make sure your android has debug mode enabled (which I think is by default in all JF releases)
Hook it up to your computer with the USB cable
Open up a command prompt in windows (or whatever other OS you're using that has the Android SDK) and go to the tools directory in the SDK
Type "adb devices" to make sure adb sees your phone, if it doesn't, well uh...it's not working right, and you'll have to figure out why
Type "adb remount" to remount the /system partition as read-write
Type "adb shell" this will give you shell access to your G1, from there you can delete stuff from the /system partition. I think you might also be able to use "adb uninstall" but I don't know if that works for the /system/app folder.
thanks for the info TM will play with the sdk tools and see what i can do, they have been giving me a headache on linux, but then i haven't played with linux in about 6 years.. its come along way. Thanks again for the info wait 2 secs to reload the image
I've noticed that, too. I don't see a reason why I need to update TE, the one I have works just fine.
here your answer in the link below
this will allow you to remove the terminal and install the new one from market
http://forum.xda-developers.com/showthread.php?p=3287558

{Howto}Downgrrade form rooted 1.47.651.1

Ok... If your wimax isn't working and you want to downgrade to try to get it working this is how to do it...
1st get all of the files like you want to do Toast's Part-2. link: http://forum.xda-developers.com/showthread.php?t=701835
Then do this part:
STEP 2~FLASHING MTD PARTITION TO ENABLE DOWNGRADE:
- download all files posted above
- unzip the flash_image.zip and the mtd-eng.zip
- put the flash_image and mtd-eng.img on the root of your sdcard
- go into shell on ur pc and do:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
- this should only take a second or two
- now put the PC36IMG.zip on the root of your sdcard
- power off the phone
STEP 3~FLASHING ENG BUILD:
- hold volume down + power to boot into hboot
- it should now find and verify the PC36IMG.zip on the root of your sdcard. itll show a blue status bar on the top right of the screen.
- after a minute or so it will ask u if u wanna flash SAY YES
- affter it flashes the PC36IMG.zip it will ask if you wanna reboot. SAY YES
After if finally boots you should see HTC quietly brilliant which hangs forever but it should eventually get past it. Once it does you will have the oldest everything. This is a beta build and has a bunch of tools but just do an upgrade to root like you normally would. I would suggest going to .6 then upgrading to the latest 47 from there.
Hope that this helps someone.
P.S. is anyone willing to dump all of the tools that are included in this rom. It might be helpful for the other devs.
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Tell me the easy way. I would love to do it instead.
kthejoker20 said:
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Click to expand...
Click to collapse
It's just easier to copy and paste stuff, even typing on a real keyboard. It's a pain in the ass doing it via terminal emulator with the lack of a physical keyboard on our Evo's.
Can anyone confirm if this helps fix the 4g issue?
krosemm said:
Can anyone confirm if this helps fix the 4g issue?
Click to expand...
Click to collapse
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Neotelos_com said:
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Click to expand...
Click to collapse
I used the toast method. And if i'm not mistaken I should flash roms w/o the 1.47.651.1 OTA update after downgrading right?
Nope, I try this method and it is not working. Some how the new OTA encrypted a code that any lower version will not over write it.
You don't have root access to even copy/paste or push the files to /data. I tried this and got a permission denied error message.
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
It worked for me... you have to make sure that when you enter the su command in adb to look at your phone. There should be a super user permission box that pops up. Accept it and youll be able to adb. It went fine for me after that.
urcboss07 said:
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
Click to expand...
Click to collapse
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
mrmomoman said:
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
Click to expand...
Click to collapse
This would only work if after the messup your still has root access. Some people have root and the "SU" will work but for the people w/o root will get access denied.
also
From above (I hate quoting) have you tried going to your tools folder inside your android folder and from there try your adb commands?
If you applied the OTA sent from Sprint, you lost root access. There will be no Ninja in the programs folder, because it was a new rom that the was flashed with the OTA. Root access has been closed for those that downloaded the update. If you try and type su, you will get permission denied.
Those of you that still have the root and superuser rights, DON'T DOWNLOAD THE OTA!! You are in a better position then the rest of us. I wanted the good battery life, so that's why I did it.

Root and ADB

My Xoom is rooted and running tiamat 1.41.
I'm trying to push a file onto the xoom and having trouble with it.
I have the Android SDK installed.
When I type ADB DEVICES, it shows my xoom listed as a long string of letters and numbers.
I figured out I could get into the shell by using ADB -s ###### shell (where #### is the numbers/letters shown as the device).
If I type remount, i get permission denied.
If I try to push a file onto the Xoom, I get permission denied.
What am I missing here and how do I mount the Xoom so that I can push files onto the it?
Anyone know where the libflashplayer.so goes? I have the official flash installed and don't see it in /system/lib
you have to cd into the directory where adb is. most people put it right on the root of there C drive so in terminal type "cd c:\android-sdk-windows\platform-tools" without quotes then type "adb remount" and you should be mounted
if you need more help with adb check out this guide http://androidsamurai.com/forum/viewtopic.php?f=12&t=4&sid=b8c229b771793d03bb84efbcf562e55b
I have tools and platform-tools directories in my PATH so I can run them from any directory. Even running it from the directory containing the executable fails with 'remount failed - operation not permitted'
you could try uninstalling and reinstalling android sdk
shobirama said:
If I type remount, i get permission denied.
If I try to push a file onto the Xoom, I get permission denied.
Click to expand...
Click to collapse
What does running "getprop ro.secure" say? (in adb shell/terminal on the tablet)
ydaraishy said:
What does running "getprop ro.secure" say? (in adb shell/terminal on the tablet)
Click to expand...
Click to collapse
Running getprop ro.secure in both adb shell and in terminal emulator on the tablet returns 1
shobirama said:
Running getprop ro.secure in both adb shell and in terminal emulator on the tablet returns 1
Click to expand...
Click to collapse
You're not in insecure mode. I thought flashing that kernel would put you into insecure mode? Maybe you need to reflash?
If you still actually have a working su binary, copy the file somewhere writeable, then su to root, then copy it from there again to the location.

[Q] How to unroot phone Atrix 2

I used the eacy one click to root phone. I would like to unroot it now. I am having touch screen freezing problem. I need to start removing applications to see which one is causing the problem or if it is a hardware issue or software.
I downloaded the zip file 1-click_exploit. I expanded the files and ran the application. I have read that there is an option to uninstall with in that file but I don't see one. Where do I find it. If I just do a factory reset will it remove it? If I do a reset do I have to repurchase all of my apps?
Thank you in advance!
A factory data reset will not remove root.
Also, a reset does not delete your purchases. They are all stored in your google account. So, if they do get deleted, just reinstall them.
As far as unrooting, I do not know. Someone else may chime in here...probably going to tell you to post in the Q&A section as well.
Doesn't the one-click have an un-root feature?
Sent from my bootloader-locked MB865.
The one click method also has an un root option in the folder.
Sent from my MB865 using xda app-developers app
Generally the only trace rooting leaves is a setuid binary "su" in /system/bin. And Superuser.apk to manage permission which apps get to invoke the binary. So unrooting involves uninstalling Superuser application and removing the su binary. If you want to do it by hand: (1) adb remount (2) adb shell (3) su (4) rm /system/bin/su
kousik said:
Generally the only trace rooting leaves is a setuid binary "su" in /system/bin. And Superuser.apk to manage permission which apps get to invoke the binary. So unrooting involves uninstalling Superuser application and removing the su binary. If you want to do it by hand: (1) adb remount (2) adb shell (3) su (4) rm /system/bin/su
Click to expand...
Click to collapse
I have no idea what the above manual steps are for. I can uninstall the application but where and how do I remove the su binary. On the phone? Please send directions for a non technical type of user.
Thank you!
MaTrixJ said:
The one click method also has an un root option in the folder.
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
Not sure where in the the following files in 1-click_exploit is the unroot option.I have attached a list of the files in the download.
bushbaum said:
Not sure where in the the following files in 1-click_exploit is the unroot option.I have attached a list of the files in the download.
Click to expand...
Click to collapse
Out of these files, adb.exe and .dll files are left in your windows PC. Not sure if they are deleted afterwards, if not, you can always unzip the above into a directory. You'll need the adb and the dll files.
The su and superuser.apk are two files that are pushed to your phone that provides the root functionality.
The zerg file is the exploit payload temporarily used to root your phone, and removed later by the script.
So if you have unzipped these into a directory, connect your phone via USB (make sure usb debugging is on), and run the commands
Code:
adb.exe remount
adb.exe shell
su // superuser may pop a permission request on phone screen
rm /system/bin/su
rm /system/app/Superuser.apk
exit
kousik said:
Out of these files, adb.exe and .dll files are left in your windows PC. Not sure if they are deleted afterwards, if not, you can always unzip the above into a directory. You'll need the adb and the dll files.
The su and superuser.apk are two files that are pushed to your phone that provides the root functionality.
The zerg file is the exploit payload temporarily used to root your phone, and removed later by the script.
So if you have unzipped these into a directory, connect your phone via USB (make sure usb debugging is on), and run the commands
Code:
adb.exe remount
adb.exe shell
su // superuser may pop a permission request on phone screen
rm /system/bin/wu
rm /system/app/Superuser.apk
exit
Click to expand...
Click to collapse
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Sorry for all these questions but I warned you that I was not a technical user. Thanks
bushbaum said:
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Sorry for all these questions but I warned you that I was not a technical user. Thanks
Click to expand...
Click to collapse
I was wondering do I have to have the elite version superuser installed to grant permission to system? I just have the free version.
bushbaum said:
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Click to expand...
Click to collapse
1. yes -- charge only
2. it is better to open a command prompt -- in run commands type in "cmd" which'll give you a shell, easy to track command outputs
3. in that shell cd to the directory you unzipped and run "adb.exe remount"
4. Unless it says "remount succeeded" further operations won't succeed
5. After you execute "su" your prompt will change from $ to # ... is this happening?
6. Only on # prompt, you can do "rm /system/bin/su" ... that too only if remount succeeded
Let us know at which step it fails.
kousik said:
1. yes -- charge only
2. it is better to open a command prompt -- in run commands type in "cmd" which'll give you a shell, easy to track command outputs
3. in that shell cd to the directory you unzipped and run "adb.exe remount"
4. Unless it says "remount succeeded" further operations won't succeed
5. After you execute "su" your prompt will change from $ to # ... is this happening?
6. Only on # prompt, you can do "rm /system/bin/su" ... that too only if remount succeeded
Let us know at which step it fails.
Click to expand...
Click to collapse
I get the following error after entering the run "adb.exe remount"
*daemon not running starting it now*
*daemon started successfully*
remount failed: operation not permitted
bushbaum said:
I get the following error after entering the run "adb.exe remount"
*daemon not running starting it now*
*daemon started successfully*
remount failed: operation not permitted
Click to expand...
Click to collapse
Then try remounting manually:
Code:
C:\> adb.exe shell
edison$/ su
edison#/ mount -o remount,rw /dev/block/system /system
Afterwards proceed with rest of the script.

Rooting with/using a Linux computer

Here's (almost) the process I used
change settings on device
"Unknown Sources"
"USB Debugging"
Find which device is mounted as "/system"
On my stock ICS .26 system this is "/dev/block/mmcblk0p1", but this might be something different (?)
adb shell mount | grep " /system"​
copy files to device
copy debugfs to device
adb push debugfs /data/local/ ​
copy su to device
adb push su /data/local/ ​
copy debugfsinput to device
adb push debugfsinput /data/local/​
setup temp directory
rename /data/local/tmp to /data/local/tmp.bak
make a new /data/local/tmp that is a symlink to /system device (as determined in step B)
ln -s /dev/block/mmcblk0p1 /data/local/tmp ​
reboot tablet
mark debugfs program executable
adb shell chmod 777 /data/local/debugfs​
run debugfs using "/data/local/debugfsinput" script
adb shell "/data/local/debugfs -w /dev/block/mmcblk0p1 < /data/local/debugfsinput"​
cleanup
remove /data/local/tmp symlink
move /data/local/tmp.bak to /data/local/tmp
remove /data/local/su
remove /data/local/debugfs
remove /data/local/debugfsinput
reboot
test superuser (see if "su" command works [no output, especially no error message])
install superuser app
adb install Superuser.apk ​
One thing I did different in some places was to just do "adb shell", and then issue commands one-by-one in the remote shell.
Related threads:
How to root TF700 Jelly Bean from Linux without unlocking?
[description of process updated and moved to first post]
It occurs to me that steps D through J should be doable on the device using the Terminal Emulator app that I've got installed.
Thoughts, anyone? See any dangerous pitfalls ahead on the path I'm about to undertake?
I'm going to hold off on actually doing this until tomorrow. This will to give people a chance to respond, and I need to attend to other matters (dinner, chores, etc...)
bsammon said:
It occurs to me that steps D through J should be doable on the device using the Terminal Emulator app that I've got installed.
Click to expand...
Click to collapse
Another thought.... step C obviously doesn't need adb, and step K could be done with the "pm" command in the Terminal Emulator.
It seems I could do this without using adb at all--- not sure why I'd bother, unless I have problems getting it to work, or just to prove that I can.
I rooted my TF700 under Linux by reading the batch file and doing the steps manually - similar as you describe in your second post, but I even typed the input to debugfs manually. The whole process depends on getting at least "shell" user access, so I am not sure that it could be done without adb - a local terminal app would run under its own, more restricted user account.
_that said:
I rooted my TF700 under Linux by reading the batch file and doing the steps manually - similar as you describe in your second post, but I even typed the input to debugfs manually. The whole process depends on getting at least "shell" user access, so I am not sure that it could be done without adb - a local terminal app would run under its own, more restricted user account.
Click to expand...
Click to collapse
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
FordPrefect said:
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
Click to expand...
Click to collapse
But doing it manually is so much more l33t.
FordPrefect said:
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
Click to expand...
Click to collapse
Got a link?

Categories

Resources