RESOLVED:Rooted but getting Permission Denied from ADB Shell? - T-Mobile LG G2x

ADB Shell connects just fine, but I cannot SU into it. I am rooted and have the latest SuperUser installed... In addition, I have USB debugging enabled, the LG drivers, and Root Explorer works perfectly.
RESOLVED:
You must have SuperUser OPEN while trying to SU from ADB. I don't remember this being needed on my Nexus One, but it's working now. I will keep this up for others that might need it....

Sceencast in droid explorer isnt working for me.rooted g2x. Maybe ill reinstall it after i get home from work. Is yours working?

Do you have SuperUser OPEN while trying to use it? Seems that it's not running persistently like it did on my N1

momentarylapseofreason said:
Do you have SuperUser OPEN while trying to use it? Seems that it's not running persistently like it did on my N1
Click to expand...
Click to collapse
just got home from work. gonna try it now.
nope, no screencast even with super user running. just rebooted. gonna try again. logcat seems to be going nuts though.

I was going crazy about this and asked Chris Soyars because I have never had to do this either. This is what he said:
"You can just type 'su' while in an adb shell, and it should drop you down to root. You won't get adb providing root until you have a boot image flashed that isn't running in secure mode.... -Chris Soyars"

wewoapsiak said:
I was going crazy about this and asked Chris Soyars because I have never had to do this either. This is what he said:
"You can just type 'su' while in an adb shell, and it should drop you down to root. You won't get adb providing root until you have a boot image flashed that isn't running in secure mode.... -Chris Soyars"
Click to expand...
Click to collapse
First you need to go to settings developer options and root access and check apps and ADB
Then you might have to do the CHMOD -R 777 /directorynameyouaretryingtoaccess

Guys. I am assuming the su in adb shell is preceded by an adb remount? By default system is ro not rw.
Sent from my LG-P999 using xda app-developers app

Related

I need "su" and "superuser.apk" to get root apps to work

but where the fugg is "su".
I pushed superuser.apk no prblem but were is this extensionless su app??
Reason:
I rooted my gf's hero and need to run titanium to backup all her apps before I flash Fresh 2.1.2 to it. After lots of searching I se I need to put SU on it. Can soeone shed some light...?
scirio said:
but where the fugg is "su".
I pushed superuser.apk no prblem but were is this extensionless su app??
Reason:
I rooted my gf's hero and need to run titanium to backup all her apps before I flash Fresh 2.1.2 to it. After lots of searching I se I need to put SU on it. Can soeone shed some light...?
Click to expand...
Click to collapse
hmm.. you could just use another backup program that doesnt need root. i personally use astro to back up my apps.
assuming that just pushing superuser.apk works, then you should get a prompt when you try to use titanium back up that asks for root access.
su should be in /system/bin and I believe /system/xbin. I had to cp su /system/xbin for Metamorph to work a while ago...
Code:
adb shell
cd /system/bin
ls
see if su is in this folder. if it is then
Code:
cp su /system/xbin
But wait till someone else confirms this...
Also, if you are getting the black super user request screen make sure that you have USB Debugging turned on. Settings>Applications>Development>USB Debugging Mode
"su" is not an app.. "su" is command for "super user"..
"su" is root access.. If the rom you are using is not rooted it will never have "su".. Because the rom will not allow sudo access
*search for appsaver to get the apps from an unrooted rom..
azyouthinkeyeiz said:
"su" is not an app..
"su" is root access.. If the rom you are using is not rooted it will never have "su"..
Click to expand...
Click to collapse
Have to kind of disagree with you here.
he is refering to the SU file that lives in //bin/
Which is technically "executable" when setting suid bits.
But you are correct in that the rom should have that. And if it doesn't...she's not rooted...and you'll need more than just SU eventually...you should go ahead and get busy box installed for TIbackup to use.
Kcarpenter said:
Have to kind of disagree with you here.
he is refering to the SU file that lives in //bin/
Which is technically "executable" when setting suid bits.
But you are correct in that the rom should have that. And if it doesn't...she's not rooted...and you'll need more than just SU eventually...you should go ahead and get busy box installed for TIbackup to use.
Click to expand...
Click to collapse
The su file that lives in //bin/ allows the rom to interact with busybox and supermissions.. It is not an APP just a directory file.. That's like saying on a PC that the DLL files for each program is a program.. It does "execute" but there is not a single file on your computer that isn't "executable" in someway.. I was just saying in layman's terms that he can't do what he wants..
You can't just install that on a Sprint Rom.. He cannot just push busybox into his rom because it is lacking the su file.. And it cannot interact with the Sprint Rom even if you did get it installed somehow...
Yes he rooted the phone, but the ROM is still locked in by sprint until you flash a custom rom.. You have to repackage the rom and reflash it to get those parts into the rom.. Which would not help this guy with what he wants..
*again.. Search for appsaver.. it is the easiest solution for you OP
azyouthinkeyeiz said:
The su file that lives in //bin/ allows the rom to interact with busybox and supermissions.. It is not an APP just a directory file.. That's like saying on a PC that the DLL files for each program is a program.. It does "execute" but there is not a single file on your computer that isn't "executable" in someway.. I was just saying in layman's terms that he can't do what he wants..
You can't just install that on a Sprint Rom.. He cannot just push busybox into his rom because it is lacking the su file.. And it cannot interact with the Sprint Rom even if you did get it installed somehow...
Yes he rooted the phone, but the ROM is still locked in by sprint until you flash a custom rom.. You have to repackage the rom and reflash it to get those parts into the rom.. Which would not help this guy with what he wants..
*again.. Search for appsaver.. it is the easiest solution for you OP
Click to expand...
Click to collapse
I knew it wasn't an "app" but I also figured you guys were smart enough not to hassle me about symantics
Ended up just flashing Fresh 2.1.2 and to hell with her apps.
scirio said:
to hell with her apps.
Click to expand...
Click to collapse
I tell ya what, every time I wipe my wifes phone and wipe out that "My Days" app. She wants to kill me. You'd think she has that schedule memorized...lord knows I do.

New 100% reliable "temp root" for Titanium Backup (won't stop working until reboot!)

New 100% reliable "temp root" for Titanium Backup (won't stop working until reboot!)
Hi all,
I grew frustrated by the annoyance of losing root access randomly, when modified files on /system suddenly become inaccessible because of the S-ON lock.
But here's some good news: I came up with a way to get a 100% reliable "temp root" for Titanium Backup.
Advantages:
You will not lose root access until next reboot!
100% reliable, does not modify /system at all.
Drawbacks:
Minimalistic approach with no BusyBox.
Will only work with select root apps.
Tested with Titanium Backup only (for now).
Requirements:
Original "out of the box" Sensation or EVO 3D (untested).
Android SDK tools ("adb" command) on a computer.
USB connection between computer and phone.
Installed Superuser app from the Market.
Initial (one-time) setup:
unzip better-temp-root.zip
adb push fre3vo /data/local/tmp/
adb shell "cd /data/local/tmp ; chmod 755 fre3vo ; ./fre3vo"
adb shell "mkdir /data/bin ; mv /data/local/tmp/fre3vo /data/bin/"
adb push su /data/bin/
adb push root.sh /data/bin/
adb shell "chmod 4555 /data/bin/su ; chmod 755 /data/bin/root.sh"
adb shell "/data/bin/root.sh"
After every reboot:
adb shell "/data/bin/fre3vo"
adb shell "/data/bin/root.sh"
The advantage of this method is that /system is not modified, therefore the rooting will be totally stable and will persist until the next reboot
Q&A:
Will it work with other root apps?
This is a minimalistic approach which installs no busybox and does not touch /system, in order to be perfectly reliable. The drawback of this is that it will work only with root apps that are able to find "su" at /data/bin/su, and that don't need a busybox in $PATH. Fortunately, Titanium Backup fulfills both of these criteria. If you know other apps that do, please post about them.
Status:
Titanium Backup (free & pro): works
Root Explorer: works
MyBackup pro: works?
SetCPU: FC
Wireless tether: needs system modification
Greetings go to #teamwin for the exploit, of course.
Have fun !
Great. Good job!
Now where is that test recovery?
If it works well, maybe you should try and pass the files onto agrabren for him to implement into Fre3vo^2 (apk that makes root better like your fix is aiming to).
That way things will move a LOT faster
Using this, I can get Titanium Backup to work, but not AdFree. Might just wait for Fre3vo^2.
Adfree is build to edit files on /system partition which is not possible with temp root
Set-Cpu is working?
possible to make a script that runs
Code:
adb shell "/data/bin/fre3vo"
adb shell "/data/bin/root.sh"
at each boot automatically?
Does barnacle or any WiFi tether apps work with this? Still at work.....
Sorry for the noob question but where do unzip it to, the computer or the phone?
Sent from my PG86100 using XDA App
madindehead said:
Using this, I can get Titanium Backup to work, but not AdFree. Might just wait for Fre3vo^2.
Click to expand...
Click to collapse
Thanks for your feedback. I hadn't tested AdFree, but I'm not surprised here. This solution is a willful compromise: we refrain from modifying /system, and thus we gain 100% reliability - but at the same time we lose compatibility with some root apps, because they often rely on BusyBox being in /system (or at least in $PATH).
I have contacted @agrabren on Twitter with a link to this thread. I haven't looked into it, but if #teamwin can come up with a way to execute adb commands locally on the phone, it could all be done automatically at boot. Hopefully they'll add a configuration choice such as:
Method 1: Full compatibility with root apps, system BusyBox, "ephemeral" root
Method 2: Compatibility with *some* root apps, no system BusyBox, 100% reliable root
Let's see how it goes... but I know which method I'd personally use
Tiffany84 said:
Sorry for the noob question but where do unzip it to, the computer or the phone?
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Unzip to the computer, you'll get 3 files. Go on from there
What about this:
Any difference to files/method from first post?
http://www.facebook.com/pages/S-Off-for-Sensation-and-Evo-3d-NOW/117107248377328?sk=wall&filter=1
joel.bourquard said:
Unzip to the computer, you'll get 3 files. Go on from there
Click to expand...
Click to collapse
Ok. So this is where I struggle with adb. So how does it know where the files are at? Do u have to tell it the location of the files or do u put it in the same directory with adb? Again, I apologize when it comes to being clueless with adb.
Sent from my PG86100 using XDA App
DomSim said:
possible to make a script that runs
Code:
adb shell "/data/bin/fre3vo"
adb shell "/data/bin/root.sh"
at each boot automatically?
Click to expand...
Click to collapse
That's the goal - but such a script would not work right now, because: (1) the 1st command terminates the current shell and (2) the 2nd command must be called through ADB.
As far as I see, the 1st command could be invoked automatically from an Android app at boot, but the 2nd one needs to be called through adb, which requires a separate computer right now.
I haven't looked into that - but I think @agrabren / #teamwin are aiming at this (ie: somehow doing the equivalent of running commands through "adb" from the device itself) with Fre3vo^2.
Thanks very much..
Sent from my HTC Sensation Z710e using XDA App
Tiffany84 said:
Ok. So this is where I struggle with adb. So how does it know where the files are at? Do u have to tell it the location of the files or do u put it in the same directory with adb? Again, I apologize when it comes to being clueless with adb.
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Same directory
Tiffany84 said:
Ok. So this is where I struggle with adb. So how does it know where the files are at? Do u have to tell it the location of the files or do u put it in the same directory with adb? Again, I apologize when it comes to being clueless with adb.
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
I run Linux personally, but I think if you just unzip the files into some empty folder, then stay in that same folder and run ADB by its absolute path, it should work fine. Something like:
"C:\Program Files\Android SDK\BIN\ADB.EXE" push xx yy
Maybe a Windows user could give you more precise advice here...
Why would you need barnacle when you have wireless tether built in?
Sent from my HTC Sensation 4G using XDA App
With this,only run fre3vo bat file and all will install
automatically:
Ganii said:
What about this:
Any difference to files/method from first post?
http://www.facebook.com/pages/S-Off-for-Sensation-and-Evo-3d-NOW/117107248377328?sk=wall&filter=1
Click to expand...
Click to collapse
Anyone tried SetCPU ? Which profile did you select, and does it work?
Pinepig said:
Same directory
Click to expand...
Click to collapse
Thanks.
Sent from my PG86100 using XDA App

trouble with adb

for some reason, i cannot gain permission through adb, i have tried everything. all i get is the $ sign. yes usb debugging is enabled, im running stock rom just updated with ota. i AM rooted, i have my drivers installed, idk why i cant get # via adb, someone help? any advice?
sk8dayfuknight said:
for some reason, i cannot gain permission through adb, i have tried everything. all i get is the $ sign. yes usb debugging is enabled, im running stock rom just updated with ota. i AM rooted, i have my drivers installed, idk why i cant get # via adb, someone help? any advice?
Click to expand...
Click to collapse
Follow the steps in this link: http://forum.xda-developers.com/showthread.php?t=1152148
He did an awesome job with this.
If you did follow this then you probably need to boot into recovery and change permissions settings.
when i type in su in adb i get # but when i type in adb shell i still get $, it says adb: Not found
sk8dayfuknight said:
for some reason, i cannot gain permission through adb, i have tried everything. all i get is the $ sign. yes usb debugging is enabled, im running stock rom just updated with ota. i AM rooted, i have my drivers installed, idk why i cant get # via adb, someone help? any advice?
Click to expand...
Click to collapse
i have the same issue after OTA update. root only with terminal emulator on the device. try'd to fix permission in recovery, no changes. adb shell gives me no #, only $, allways permission denied by trying su.
Edit:
it looks like that only adb can't switch the user. su_2.3.6.3_efgh is sccessfully installed via CWM 4.0.1.4 without any errors. all root apps (e.g. Titanium Backup Pro, Root Explorer, Superuser, Terminal Emulator) are working perfect. root check from market told me that adb binary is set to default shell user access as a standard non-root user. any idears?
holly1963 said:
i have the same issue after OTA update. root only with terminal emulator on the device. try'd to fix permission in recovery, no changes. adb shell gives me no #, only $, allways permission denied by trying su.
Edit:
it looks like that only adb can't switch the user. su_2.3.6.3_efgh is sccessfully installed via CWM 4.0.1.4 without any errors. all root apps (e.g. Titanium Backup Pro, Root Explorer, Superuser, Terminal Emulator) are working perfect. root check from market told me that adb binary is set to default shell user access as a standard non-root user. any idears?
Click to expand...
Click to collapse
i found i only have trouble with stock rom, i flashed leedroid rom last night and was able to get "#" with "adb shell" on the first try...
sk8dayfuknight said:
i found i only have trouble with stock rom, i flashed leedroid rom last night and was able to get "#" with "adb shell" on the first try...
Click to expand...
Click to collapse
for now i don't want to flash a custom rom, i'am using the VF stock ROM. So I still have the same issue
holly1963 said:
for now i don't want to flash a custom rom, i'am using the VF stock ROM. So I still have the same issue
Click to expand...
Click to collapse
You need to have Busybox installed.
Sent from my HTC Sensation 4G using Tapatalk
Rhiannon224 said:
You need to have Busybox installed.
Sent from my HTC Sensation 4G using Tapatalk
Click to expand...
Click to collapse
thanks for your help, busybox is successfully installed but i still can't change the user with adb
inside the trouble guide thread from the development they advice to flash a custom rom, but this is not my target.
seems the only way to get "#" from adb shell is with a custom rom. for me at least. i tried everything, changing the permissions of su, fixing permissions in recovery, and installing busybox,
When you type su are you going back to your phone and allowing super user for the unknown device? - I know that is a basic answer.
zylith said:
When you type su are you going back to your phone and allowing super user for the unknown device? - I know that is a basic answer.
Click to expand...
Click to collapse
i have thought about that method, but in the superuser.apk nothing comes up when trying to get a shell to my phone thorugh adb...
sk8dayfuknight said:
i have thought about that method, but in the superuser.apk nothing comes up when trying to get a shell to my phone thorugh adb...
Click to expand...
Click to collapse
When you're in CMD and type adb shell or su, if its the first time you should see a request to allow or deny su permission on the phone, right? Does that happen when you attempt?
Sent from my HTC Sensation Z710e
BlackElvis79 said:
When you're in CMD and type adb shell or su, if its the first time you should see a request to allow or deny su permission on the phone, right? Does that happen when you attempt?
Click to expand...
Click to collapse
there is no request on the phone, nothing happens (screen was on)
Open super user- and see if you already hit deny- You can also change it from there. Also when you type "adb devices" does your phone show up with serial number?
sk8dayfuknight said:
for some reason, i cannot gain permission through adb, i have tried everything. all i get is the $ sign. yes usb debugging is enabled, im running stock rom just updated with ota. i AM rooted, i have my drivers installed, idk why i cant get # via adb, someone help? any advice?
Click to expand...
Click to collapse
Try rooting again. Reinstall superuser.,also download busybox installer from the market and instal
Sent from my HTC Sensation Z710e using XDA App
It is not working with the stock ROM no point redoing every thing it wont work no matter how many times you try.
I doubt we will get much help it is not a problem with a custom ROM so there wont be that many peeps who will be looking into it.
Best bet it to stick a custom stock based ROM with a stock kernel.

[Q] Superuser permissions

Hello
Have unlocked the phone and installed custom android OS a while ago, but then all of a sudden i do not have root access anymore, even tryed to reinstall the phone. Though i do have a bad feeling about it wasn't needed
My problems is that im unable to give programs root access, it looks like the phone is not rooted acording to the programs.
Also if i try the following:
adb shell
su
then i get "permission denied"
Can't seem to figure out where my flaw is. Even tryed to
Anyone got an idea to what the problem might be? Have looked through the nexus s forum for clues but no luck.
/Fonain
fonain said:
Hello
Have unlocked the phone and installed custom android OS a while ago, but then all of a sudden i do not have root access anymore, even tryed to reinstall the phone. Though i do have a bad feeling about it wasn't needed
My problems is that im unable to give programs root access, it looks like the phone is not rooted acording to the programs.
Also if i try the following:
adb shell
su
then i get "permission denied"
Can't seem to figure out where my flaw is. Even tryed to
Anyone got an idea to what the problem might be? Have looked through the nexus s forum for clues but no luck.
/Fonain
Click to expand...
Click to collapse
Most likely the permissions on the su binary are f'd up (assuming it's present). The easiest fix is just to reflash the su binary (mount /system first) through CWM.
do you by any chance have a guide to do that? or a link to one?
fonain said:
do you by any chance have a guide to do that? or a link to one?
Click to expand...
Click to collapse
There are several rooting guides here if you do not have CWM installed:
http://forum.xda-developers.com/showthread.php?t=1067813
They will go over quite a few things. However, if you are unlocked and have fastboot set up it's as simple as downloading the recovery image, and then using fastboot to flash the recovery (fastboot flash recovery recovery.image.name.img)
Once CWM is installed boot into recovery and flash the su binary here:
http://forum.xda-developers.com/showthread.php?t=682828
well the funny thing is that i already have 2.3.6.1 installed, but i still dont have su rights.
When i try to follow the buttom guide where to install superuser. where it states that i should write "adb remount". Then i get the message back where it says "Operation not allowed", or when i type su i get the message "permission denied".
I seriously don't understand what i have done wrong :S
/Fonain
krohnjw said:
Most likely the permissions on the su binary are f'd up (assuming it's present). The easiest fix is just to reflash the su binary (mount /system first) through CWM.
Click to expand...
Click to collapse
Thanks for this, solved my issue
thanks figured it out
/Fonain
Sorry to bring back an old topic, but Ive petty much done everything and still the SU no permission no root access for everything occurs. NO TIT backup, no rommanager, no nothing T_T, why???
try chmod the folder/file or using sudo
james7132 said:
try chmod the folder/file or using sudo
Click to expand...
Click to collapse
Can you elaborate please. Whats chmod or sudo and how do I go about doing them?

[Q] motorola i886, halfway rooted... i think

I am trying to root a motorola i886. Its a really wierd nextel iDEN PTT phone that is running (i believe) android 2.0 or 2.1 but has no touchscreen...
Basically I have been able to get a root shell (#) from 'adb shell' by pushing some program called psneuter to the phone and running it. Once I had this I could install apps via adb ok, but it seems like whenever I try to run any apps that require root they error saying they do not have root access.
As far as I can tell pretty much every rooting guide for every other phone has you putting 'su' and sometimes 'busybox' into /system/bin and 'Superuser.apk' into /system/app. I did both of these but still got the same errors about apps not having root. I tried a few different versions of these files I found from different sites to no avail. Running su on a terminal emulator on the phone itself would get the error "operation not allowed" or something like that. Then I found some other guide where you just copy 'sh' to 'su' and chmod su to 4755. When I did that I could get to a # prompt on the phone's terminal emulator app by typing 'su' but still got root errors for apps that need root.
I though maybe someone here would know something that I missed. As far as I can tell, I have applied the correct permissions to all these files or have at least tried every combination I can think of to no avail (shouldn't chmod 777 just make everything work?)
Also, does the phone usually come with a stock version of busybox on it? Do you need a specific version of these files for your device or version of android?
When an app on the phone tries to get root access is it just basically trying to run 'su' internally or something like that?
Also forgot to mention I have tried all the one-click-root apps and they do not work for this stupid phone. (well the super one click one was how I figured out how to get the adb shell root but the regular root button doesn't work...)
I can't help with your specific questions, but there is some info about rooting the i1, another iDEN with Android. Although it looks like the i1 is actually Android, and not the Motorola-altered, not-really-Android, proprietary software that the i886 has.
http://www.howardforums.com/showthread.php/1662431-Motorola-i1-Rooted
http://forum.cyanogenmod.com/topic/5520-ive-rooted-my-i1/
garbb said:
I am trying to root a motorola i886. Its a really wierd nextel iDEN PTT phone that is running (i believe) android 2.0 or 2.1 but has no touchscreen...
Basically I have been able to get a root shell (#) from 'adb shell' by pushing some program called psneuter to the phone and running it. Once I had this I could install apps via adb ok, but it seems like whenever I try to run any apps that require root they error saying they do not have root access.
As far as I can tell pretty much every rooting guide for every other phone has you putting 'su' and sometimes 'busybox' into /system/bin and 'Superuser.apk' into /system/app. I did both of these but still got the same errors about apps not having root. I tried a few different versions of these files I found from different sites to no avail. Running su on a terminal emulator on the phone itself would get the error "operation not allowed" or something like that. Then I found some other guide where you just copy 'sh' to 'su' and chmod su to 4755. When I did that I could get to a # prompt on the phone's terminal emulator app by typing 'su' but still got root errors for apps that need root.
I though maybe someone here would know something that I missed. As far as I can tell, I have applied the correct permissions to all these files or have at least tried every combination I can think of to no avail (shouldn't chmod 777 just make everything work?)
Also, does the phone usually come with a stock version of busybox on it? Do you need a specific version of these files for your device or version of android?
When an app on the phone tries to get root access is it just basically trying to run 'su' internally or something like that?
Also forgot to mention I have tried all the one-click-root apps and they do not work for this stupid phone. (well the super one click one was how I figured out how to get the adb shell root but the regular root button doesn't work...)
Click to expand...
Click to collapse
PM to me,i rooted sucefully, and install many applications with android SDK suite.
Regards.
geminis said:
PM to me,i rooted sucefully, and install many applications with android SDK suite.
Regards.
Click to expand...
Click to collapse
Wow, I can't believe someone found this thread and replied after so long. Thanks, but in the meantime I actually figured out how to root it fully and get root apps to work. I think i just tried different su's and superuser.apk's that I found on the internet until one worked...
Now, if you have figured out how to change the nextel push-to-talk chirp/beep sounds then let me know how you did that. I actually found the .wav files for the PTT sounds in some .apk in /system (phone.apk I think?) but for some reason changing them had no effect on the sound the phone makes when using the push-to-talk feature...
Its been 10 years but do you still have the firmware for this device? I need to flash it, it doesnt finish booting up
I don't have a full ROM .zip file for this phone, only some update .zips. But the first link result for a google search for "motorola admiral stock rom" worked for me for downloading a file.
Wrong phone, sorry.
Sorry but i don't understand. Isn't the Motorola admiral a different device? Does that zip work for the i886? If so, how do I flash it, because the i886 doenst have a recovery mode.
Oh, oops sorry, I was confusing this phone with another one. I looked and I don't have and firmware files for this, sorry.
OK, thanks for replying

Categories

Resources