ADB Not Detecting Root - HTC EVO 3D

Hello,
When I run adb shell, it reports back with a "$,"even though I do have root. I'm running JoeyKrim Stock With Root ROM. Odexed...
I do have superuser installed with the latest binary, and latest official busybox. Terminal emulator even detects that I have root.
Basically everything works as it should, except adb. Anybody know what's going on?

Rydah805 said:
Hello,
When I run adb shell, it reports back with a "$,"even though I do have root. I'm running JoeyKrim Stock With Root ROM. Odexed...
I do have superuser installed with the latest binary, and latest official busybox. Terminal emulator even detects that I have root.
Basically everything works as it should, except adb. Anybody know what's going on?
Click to expand...
Click to collapse
When you type adb shell, does it immediately report back with a $, or does it pause for a few and then report back with a $? If it pauses for a few seconds, look down at your phone during that time. You may be being prompted with the super user request prompt, where you need to hit allow. I'm not sure why you need to do this sometimes, but I've had it happen before. If you don't look at the phone and hit 'allow', then it times out and doesn't give you root access. So type 'adb shell', check out your phone and see if your prompted, if so allow it, and you should be good. If that is not the case, then I'm unsure what could be causing it.

k2buckley said:
When you type adb shell, does it immediately report back with a $, or does it pause for a few and then report back with a $? If it pauses for a few seconds, look down at your phone during that time. You may be being prompted with the super user request prompt, where you need to hit allow. I'm not sure why you need to do this sometimes, but I've had it happen before. If you don't look at the phone and hit 'allow', then it times out and doesn't give you root access. So type 'adb shell', check out your phone and see if your prompted, if so allow it, and you should be good. If that is not the case, then I'm unsure what could be causing it.
Click to expand...
Click to collapse
Thanks, I'll test that out. I have a pin set on superuser. Maybe that's the issue.

Just checked, and it does it right away, and does not prompt... Sigh...

Rydah805 said:
Just checked, and it does it right away, and does not prompt... Sigh...
Click to expand...
Click to collapse
Very strange. I'm not sure. Has it happened on all roms, or just the one you're currently on?
Sent from my PG86100 using Tapatalk

Rydah805 said:
Just checked, and it does it right away, and does not prompt... Sigh...
Click to expand...
Click to collapse
The first time you type su from adb shell, Superuser will display a prompt on the screen to accept or deny the request. If you don't accept the request, in adb shell it will display, "Permission denied".
On the Superuser prompt, if you select deny, when typing su in adb shell the result will always be "Permission denied" until going into the Superuser app and changing "Unknown" to Allow. Not sure why the Superuser app labels adb shell as "Unknown".
Another option, inside the Superuser app, on the Settings tab, at the very bottom there is an option, update su binary. Sometimes using this update feature will resolve permission/installation issues with the su binary.
If you wanted to verify the installation of both Superuser and root as having been done properly, my free app Root Check from the market works well. Advanced Mode should provide all the details we'd need to troubleshoot further.
Hope that helps and appreciate your support!

joeykrim said:
The first time you type su from adb shell, Superuser will display a prompt on the screen to accept or deny the request. If you don't accept the request, in adb shell it will display, "Permission denied".
On the Superuser prompt, if you select deny, when typing su in adb shell the result will always be "Permission denied" until going into the Superuser app and changing "Unknown" to Allow. Not sure why the Superuser app labels adb shell as "Unknown".
Another option, inside the Superuser app, on the Settings tab, at the very bottom there is an option, update su binary. Sometimes using this update feature will resolve permission/installation issues with the su binary.
If you wanted to verify the installation of both Superuser and root as having been done properly, my free app Root Check from the market works well. Advanced Mode should provide all the details we'd need to troubleshoot further.
Hope that helps and appreciate your support!
Click to expand...
Click to collapse
Yep that does work on his rom the "type su" thing and thanks for your root check app Joey it's been super useful in trying to figure out stuff lately on the photon.... really appreciate all your contributions

joeykrim said:
The first time you type su from adb shell, Superuser will display a prompt on the screen to accept or deny the request. If you don't accept the request, in adb shell it will display, "Permission denied".
On the Superuser prompt, if you select deny, when typing su in adb shell the result will always be "Permission denied" until going into the Superuser app and changing "Unknown" to Allow. Not sure why the Superuser app labels adb shell as "Unknown".
Hope that helps and appreciate your support!
Click to expand...
Click to collapse
Got it! Thanks! Any idea why I had to do that with your rom though? On others, I didn't need to type Su and grant it. (Doesn't bother me though.)

Rydah805 said:
Got it! Thanks! Any idea why I had to do that with your rom though? On others, I didn't need to type Su and grant it. (Doesn't bother me though.)
Click to expand...
Click to collapse
Short answer: Since Superuser.apk is another developer's software, I didn't include it in my ROM as I didn't have his permission. I provide the superuser apk market link in my ROM OP for users. Instead of packaging Superuser apk, I used the su binary provided in AOSP as its source code is public and publically available for android usage.
Long answer: There is a free version of Superuser available thru the market and figured that would be the best way to load the Superuser apk. From personal experience as an android developer, when an app is provided with a ROM, it doesn't appear in the developer's market statistics and essentially is "off the radar". Which makes it more difficult to track which devices have loaded the software, which versions of android, etc and makes it more difficult to prioritize software upgrades to the application.
Hope I was able to explain and it helps!

joeykrim said:
Short answer: Since Superuser.apk is another developer's software, I didn't include it in my ROM as I didn't have his permission. I provide the superuser apk market link in my ROM OP for users. Instead of packaging Superuser apk, I used the su binary provided in AOSP as its source code is public and publically available for android usage.
Long answer: There is a free version of Superuser available thru the market and figured that would be the best way to load the Superuser apk. From personal experience as an android developer, when an app is provided with a ROM, it doesn't appear in the developer's market statistics and essentially is "off the radar". Which makes it more difficult to track which devices have loaded the software, which versions of android, etc and makes it more difficult to prioritize software upgrades to the application.
Hope I was able to explain and it helps!
Click to expand...
Click to collapse
Gotcha, I'm not complaining, just wondering why. I've always loved your roms over any others. Any way I can easily set it to use the superuser app binary over aosp binary?

ADB starting with root depends on the ro.secure property; if you type "getprop ro.secure" it should show either 0 meaning ADB keeps root or 1 meaning you have to use su for root. Just about all custom kernels/ROMs use unsecured boot.imgs but you can always change it yourself by modifying the default.prop file packed in the boot.img.
This is also what people are referring to when they say the kernel/boot.img/rom is secured or unsecured.

Rydah805 said:
Got it! Thanks! Any idea why I had to do that with your rom though? On others, I didn't need to type Su and grant it. (Doesn't bother me though.)
Click to expand...
Click to collapse
xHausx said:
ADB starting with root depends on the ro.secure property; if you type "getprop ro.secure" it should show either 0 meaning ADB keeps root or 1 meaning you have to use su for root. Just about all custom kernels/ROMs use unsecured boot.imgs but you can always change it yourself by modifying the default.prop file packed in the boot.img.
This is also what people are referring to when they say the kernel/boot.img/rom is secured or unsecured.
Click to expand...
Click to collapse
Rydah805 said:
Gotcha, I'm not complaining, just wondering why. I've always loved your roms over any others. Any way I can easily set it to use the superuser app binary over aosp binary?
Click to expand...
Click to collapse
Ah! Your question in the first quote above could be intrepreted two different ways. I provided one answer for one intrepretation and Haus provided the other answer for a different intrepretation!
I'll try and bring both together. There are two primary ways to access the shell interface on an android device.
1) Via adb shell. When typing adb shell and it opens the connection to the device, by android standard, it drops you to a shell with non root access reflected with the $ prompt. As Haus articulated above, this can be modified in the /default.prop file inside the ramdisk of the boot.img file. There are two options, have adb shell drop to root access or have adb shell drop to non root access. Many custom kernels modify this option so the user drops to root access.
In my kernel I'm using a non-modified stock kernel so it drops to non root access. I prefer to have to type su, once in the shell, to elevate to root access. Mainly because most functions I perform in adb shell I don't want root access for.
2) Via terminal emulator/connectbot. When accessing the shell directly on the device thru one of the common android applications, these generally open up a standard "sh" or non root shell. Then by typing "su" the user can elevate to root access (if the device has the su binary, etc.).
There are two main options for how to handle the "su" command inside a shell on the android device.
1) Superuser.apk - this application provides its own su binary, which hooks into the android application. Whenever su is called, the Superuser application is therefore called and allows the user to accept/deny root access requests.
2) su binary - from aosp or busybox. this is a version of the su binary more common to android developers in aosp, or the busybox version is more common to a generic linux version. the aosp version of su will grant any user/application root access. the busybox version will grant any user/application root access but does rely on an /etc/passwd and /etc/group file for permissions.
To answer your previous question, why you haven't had to type su on other custom ROMs, as Haus explained, they probably modified adb shell access in the /defult.prop file to automatically elevate adb shell to root priviledges.
To answer your last question regarding Superuser.apk and aosp su. Once you install the Superuser.apk file and it properly installs its own version of the su binary, it has now overwrite the previous aosp su binary. Superuser will now control all root access requests. Once you grant an application, adb shell, titantium backup, root explorer, or whatever application root access with Superuser, it will not prompt again and will handle every future request with the default action (grant/deny) provided.
Hope the extra details help!

Thanks, wasn't trying to be a pest. Just curious. The info in this thread is a nice thing to know.

Related

[Q] Why does "adb shell" give root access or shell access?

Hi all!
This question may seem a little dumb.. But I'm trying to understand what configuration file (if it's that kind of thing used) gives the "shell" uid on my phone but a root uid on the emulator when I type "adb shell" command.
If someone could point out the process used, that would be great.
Thanks!
Nobody can give me a hint on my question?
Nerver mind, found the answer with the ps command..
All depends on the uid running adbd. On the emulator the uid is root and ion my phone it's shell.
I also believe in build.prop or default.prop or something. That ro.secure controls whether adb is root.
Thanks, I'll try to dig that.
in the ramdisk of your boot image you have a file called default.prop
if the setting in that file have:
persist.service.adb.enable=1
you get a root shell, if it has
persist.service.adb.enable=0
You do not get a root shell, basicly that is what you change when you root a phone or tablet, and then normally also add su and busybox to /system/xbin, and add the Superuser apk.
Per
If you type su on the prompt, you get root, nothing tricky.
yareally said:
If you type su on the prompt, you get root, nothing tricky.
Click to expand...
Click to collapse
Nothing tricky indeed, but you need a rooted phone to do this..
foxl3y said:
Nothing tricky indeed, but you need a rooted phone to do this..
Click to expand...
Click to collapse
True. I was just under the notion they had root.

Are Root and ADB root different things?

Hey guys,
I currently have LeoMar Revolution ROM installed, so phone is rooted, Superuser works fine etc.
Want to start playing around with adb (am new to this) and have the device showing up when running 'adb devices' but i cannot get adb root? Although the device is rooted ok?
So question is (yes i searched but cant find the answer) are phone root and adb root different things?
If so how do i go about getting adb root so i can push apps etc from cmd line?
Thanks in advance
kangfu84 said:
Hey guys,
I currently have LeoMar Revolution ROM installed, so phone is rooted, Superuser works fine etc.
Want to start playing around with adb (am new to this) and have the device showing up when running 'adb devices' but i cannot get adb root? Although the device is rooted ok?
So question is (yes i searched but cant find the answer) are phone root and adb root different things?
If so how do i go about getting adb root so i can push apps etc from cmd line?
Thanks in advance
Click to expand...
Click to collapse
When through cmd, you write su and press enter
If you get a $ sign, then you aren't adb rooted!
If you get a # sign, then you are adb rooted!
Umm, for adb root, I guess use superoneclick root and click shell root, you will get the # sign then!
Thanks for quick reply
I run abd shell and then su and i do get the #.
id=0 so i have root in an 'abd shell' but i cant get root when i just put 'adb root'
Tried to adb push the apks manually in adb shell but adb push doesnt exist in shell?
But i am trying to run a batch file that pushes some hidden apks and i get the error "cannot run as root in production builds" when i run the batch file?
Edit: I may have had a secure kernel installed, will try another kernel and re-try. Is it possible to have su rights when booted up with a secure kernel? That would explain things ..
kangfu84 said:
Thanks for quick reply
I run abd shell and then su and i do get the #.
id=0 so i have root in an 'abd shell' but i cant get root when i just put 'adb root'
But i am trying to run a batch file that pushes some hidden apks and i get the error "cannot run as root in production builds" when i run the batch file?
Edit: I may have had a secure kernel installed, will try another kernel and re-try. Is it possible to have su rights when booted up with a secure kernel? That would explain things ..
Click to expand...
Click to collapse
I have never tried doing pushing/pulling on stock/secure kernels ... so I can't tell you what's going wrong!
Will have a play with flashing other kernels and try again.
I have the yellow triangle show up on boot so i thought i had an insecure kernel. But maybe it is just there from when i installed a previous ROM/insecure kernel?
kangfu84 said:
Will have a play with flashing other kernels and try again.
I have the yellow triangle show up on boot so i thought i had an insecure kernel. But maybe it is just there from when i installed a previous ROM/insecure kernel?
Click to expand...
Click to collapse
Yellow triangle means you have a insecure kernel, maybe, Cf-root
"adb root" was only available on the original "Google dev phones" and requires special code somewhere on the phone (in the kernal?) to support it. When you root the phone it does not include the special code for "adb root" to work. I don't know what you need to do to get it working, but most people don't bother because there are other ways to do the same thing.
{Build:KI4, Version:1.3.4 (stock, rooted)}
LouisJB said:
"adb root" was only available on the original "Google dev phones" and requires special code somewhere on the phone (in the kernal?) to support it. When you root the phone it does not include the special code for "adb root" to work. I don't know what you need to do to get it working, but most people don't bother because there are other ways to do the same thing.
{Build:KI4, Version:1.3.4 (stock, rooted)}
Click to expand...
Click to collapse
Can i adb push apk's as su in an adb shell?
If so i guess i can push the apks i want to manually instead of using the batch file which is trying to get adb root.
kangfu84 said:
Can i adb push apk's as su in an adb shell?
Click to expand...
Click to collapse
1. If you use one of my insecure kernels, adb will be running as root, issue "adb root" and it will reply "adb is already running as root"
2. Yes you can adb push when using su root.
3. Why do you want to push APKs? If its to install them, then just use adb install <FILE NAME>
adb root can be used when ro.debuggable is set to 1 in /default.prop
and on every reboot ro.debuggable is replaced by the one in kernel you are using
Why did you bump a thread from November 2011 to post this gem? Is that what "Recognized Contributors" do? I did wonder.
Geez Oinky. I could really take that comment of yours (which is true on so many levels) & run with it ;-) But I can't be arsed these days (like more than a few people on here).
Probably one of the criteria for getting RC status; how many 8 mth old threads you bump over X period of time
oinkylicious said:
Why did you bump a thread from November 2011 to post this gem? Is that what "Recognized Contributors" do? I did wonder.
Click to expand...
Click to collapse
i was googling something related to this but not this and found this thread, readed it all and found that no one had answered this
then i thought many others can also look for this and i thought of answering for others who are googling for it not for the op, because i know op had got the answer many moths ago
and real xda member never offense but help others

[Q] How do I get SU in a terminal emulator?

Ok so some background, I am running the newest molten and enjoying it thouroughly but just noticed that when i open terminal emulator and type SU to get root access in the terminal it says permission denied and most other commands return same error, i downloaded a differant terminal emulator that checks for the su.bin and it shows no su binary is installed yet when i goto the directory system/bin/ in es file explorer su is indeed there?
Could someone please tell me why none of the terminal emulators are finding the superuser binary? I ve already tried opening superuser app and updating the su binary (it did update and i rebooted after) but it hasnt helped, I also read on other forums that there are multiple su binaries on some phones? could this be the problem and if so where would i find the right binaries?
It just seams odd that terminal emulator would be included in the build if it is completly unusable
su then hit enter
lol, thanks, im not the smartest with linux commands but i know to hit enter.
I tried typing su and hitting enter in 3 differant terminal emulators but keep getting permission denied in all of them
You should get a super user request once you hit enter. Maybe permission was already denied. Try clearing defaults for su.
Sent from my DROID X2 using xda premium
Did you recent apply the 2.3.5 update? When I went from rooted 234 to 235 I lost root privileges even though the superuser app was still there.
Could be your root isnt quite right. What setup do you have. Also try going into your superuser application and see if they are on the not allowed list.
Also should go from a "$" to a "#" sign after you hit enter if su took.
thanks for the ideas, that really narrowed it down, i cleared data for superuser and terminal, reinstalled terminal, still didnt work.....then i realised im a idiot, my keyboards autocap was on and su has to be "su" not "SU"
lol well thanks again for all the help
brilock42 said:
thanks for the ideas, that really narrowed it down, i cleared data for superuser and terminal, reinstalled terminal, still didnt work.....then i realised im a idiot, my keyboards autocap was on and su has to be "su" not "SU"
lol well thanks again for all the help
Click to expand...
Click to collapse
If it is solved then put (solved) in the OP subject line and list what fixed it for you. It can help future users
Pesky case sensitive terminal
Sent from my DROID X2 using xda premium
No SU in SSH
su did not work here as I did use a bad SSH-app.
I now use sshdroid

Qualcomm mdp tablet APQ8064 root

I recently won this developer tablet and I can't seem to get on-device root access. It came with su binaries installed. (very old ones but I updated it) It also has an unsecured kernel because ADB always runs as root. However I installed superuser and it can't get root access and when other apps attempt root access something seems to be denying access before the superuser prompt is even able to come up. Just curious if anyone has any ideas??
JBO1018 said:
I recently won this developer tablet and I can't seem to get on-device root access. It came with su binaries installed. (very old ones but I updated it) It also has an unsecured kernel because ADB always runs as root. However I installed superuser and it can't get root access and when other apps attempt root access something seems to be denying access before the superuser prompt is even able to come up. Just curious if anyone has any ideas??
Click to expand...
Click to collapse
This may seem like a stupid suggestion but I suppose you could try uninstalling the superuser app and use Chainfire's Super SU app to see if that might make any difference.
Tried that too lol. I was even able to go into old su app and toggle permission for super su to allowed and it still said fail when it tried to update binary. Thanks for the suggestion though. It seems to me the problem is that the chown and chmod commands are not sticking on the su binary. They appear to work but the actual ownership and permissions of the file don't change. Even when I do adb remount first.
I figured it out. For some reason I had to put the su binary in /system/bin instead of xbin. Which is strange because all my other device it went in xbin. Also the reason the chmod and chown commands were not working properly is because I forgot to do adb remount. (duh!) In case anyone is wondering this thing is a beast. I just wish I could figure out a way to get my Gameloft games to work. I (mainly modern combat 3 and nova3)
JBO1018 said:
I figured it out. For some reason I had to put the su binary in /system/bin instead of xbin. Which is strange because all my other device it went in xbin. Also the reason the chmod and chown commands were not working properly is because I forgot to do adb remount. (duh!) In case anyone is wondering this thing is a beast. I just wish I could figure out a way to get my Gameloft games to work. I (mainly modern combat 3 and nova3)
Click to expand...
Click to collapse
One way to get your games to work would be try side loading the Modern Combat 3 and Nova 3 APK's onto the device and installing them manually that way. Another way if that doesn't work is you could try modifying your build.prop and changing your product id to match the galaxy nexus that way the play store will think your on a galaxy nexus and it should say that the games are compatible then.
JBO1018 said:
I figured it out. For some reason I had to put the su binary in /system/bin instead of xbin. Which is strange because all my other device it went in xbin. Also the reason the chmod and chown commands were not working properly is because I forgot to do adb remount. (duh!) In case anyone is wondering this thing is a beast. I just wish I could figure out a way to get my Gameloft games to work. I (mainly modern combat 3 and nova3)
Click to expand...
Click to collapse
I know this is an older post but I'm at the same point where I can't figure out how to allow superuser access. I'm using the 8064 for research and I need the root access but can't seem to figure out how to update the SU. Any tips?
mcforan said:
I know this is an older post but I'm at the same point where I can't figure out how to allow superuser access. I'm using the 8064 for research and I need the root access but can't seem to figure out how to update the SU. Any tips?
Click to expand...
Click to collapse
Do you have the Superuser.apk app installed along with the SU binary in the correct place /system/bin as mentioned by JBO1018? If you already had working root access before on the device and just need to update the SU binary you can open the Superuser app, then go under the info tab and tap on the SU binary version number this should then check for updates and then ask you if you want to install any found updates.
shimp208 said:
Do you have the Superuser.apk app installed along with the SU binary in the correct place /system/bin as mentioned by JBO1018? If you already had working root access before on the device and just need to update the SU binary you can open the Superuser app, then go under the info tab and tap on the SU binary version number this should then check for updates and then ask you if you want to install any found updates.
Click to expand...
Click to collapse
I have both the Superuser.apk and SU binary in the right place. Each time I open up an app that needs root access a toast message pops saying that the app has been denied Superuser permissions. I tried restarting both apps but its not working.
mcforan said:
I have both the Superuser.apk and SU binary in the right place. Each time I open up an app that needs root access a toast message pops saying that the app has been denied Superuser permissions. I tried restarting both apps but its not working.
Click to expand...
Click to collapse
Try going into the Superuser app and under settings and then security the default behavior is set to prompt not deny.
Sent from my SCH-I535 using xda premium
join have a tablet TIR 8960 is preloaded with windows rt, tablet says about the problems of the system,

How to use sudo on Termux?

I have Termux and SuperSU installed on an android 8 old console, I am able to use su in terminal, when su command is executed, SU manager pops a window for permission, if I accept, terminal user goes into su. I installed tsu package, and when I try to run any command with sudo <command>, this error shows:
Code:
/data/data/com.termux/files/usr/bin/sudo: line 304: /sbin/su: No such file or directory
No superuser binary detected.
Are you rooted?
I noticed the su binary file is under the termux app location, /data/data/com.termux/files/usr/bin/su. And I checked the sudo script under /data/data/com.termux/files/usr/bin/sudo, all su related path reference are pointing to /sbin/su, knowing that I can try to modify the script to point to the su binary under termux path, or try to make /sbin/ writable and copy su file there.
But this way seems very sketchy, I haven't try those yet, just want to know is this the right way to deal with this problem?
Here are some extra info, in case they are relevant.
1. The device is a Xiaomi MI 5, gemini, running an official MIUI rom dev ver, bootloader unlocked, rooted before. But this issue seems more of general root and app problem so I posted here...
2. I flashed a Floppy kernel for Oreo, according to author's post, root is expected to be deleted, user should install root after kernel flashed, that is what I did.
3. After 2, adb root stops to work, not giving any error, but su won't be activated when adb shell is opened, but I am able to run su in the shell, permission window will pop on phone, after granted, it's su in PC terminal. This su is under /su/bin/su
4. Usually Miui has it's own security center where I can manage root permission, but after 2, it just shows bootloader is not unlocked, and apparently it shows it's unlocked when I try to unlock it again in fastboot.
I'm thinking...may be the default su (the one i get when i use MIUI's root manager) is under /sbin/su, that's why tsu is referring to that path, and adb root would referring to it as well, but it's not there now, because SuperSU is installing su at /su/bin/su? Not sure if this theory is right...
Any ideas? Thanks!
You may try tsu. It is working for me.
Please, give it a try:
GitHub - cswl/tsu: Gain root shell on Termux.
Gain root shell on Termux. Contribute to cswl/tsu development by creating an account on GitHub.
github.com
VD171 said:
You may try tsu. It is working for me.
Please, give it a try:
GitHub - cswl/tsu: Gain root shell on Termux.
Gain root shell on Termux. Contribute to cswl/tsu development by creating an account on GitHub.
github.com
Click to expand...
Click to collapse
Can I get some help.....
Here is rest

Categories

Resources