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
Related
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.
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.
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,
After being disappointed by XDA as you deserted my last thread i am going to ask it again, this time in a simple way.
Want to ROOT Android :
I placed su and busybox in /system/bin (i have access to the filesystem via another OS)
In Shell terminal i type "su"
it says " su cant execute, permission denied "
I don't have access to recovery, USB or ADB.
I HAVE access to all system files and can edit them in any way possible.
Please answer soon and don't disappoint me again.
All generic Root apps were tested and failed.
For those who want to know device and stuff follow my previous "deserted" Thread.
http://forum.xda-developers.com/and...b-uncommon-t3226725/post63480568#post63480568
Don't make me give up again.
Hello community,
I'm new in the forum, It's 2 days I'm fighting with this problem: I want to root my BlackPhone 2 using TWRP and SuperSU (I think that this is the only method that works with BP2, since KingoRoot and others are patched for security)
I flashed the recovery TWRP, then I tried the following SuperSU versions:
SR3-SuperSU-v2.79-2017...zip
BETA-SuperSU-v2.74-2.zip
SuperSU-v2.79-2016...zip
UPDATE-SuperSU-v2.79-2016...zip
None of them works, in TWRP all goes OK, no errors and no warnings, but then when I open SuperSU apk it says "There is no SU binary installed... ...If you just upgraded to Android 5.0".
This is really crazy because I'm running on Android 6.0.1 (Silent OS 3.0.7) and using Total Commander I can see /su directory.
Using a root checker app it says that my device is not rooted, but the SU binary is present and also the busybox one.
The Silent Circle's Security Center in their "Privacy Meter" app warns me "Security alert, active root access detected! ...."
For install TWRP I had to switch these things on in Developer Options: "OEM unlocking", "USB debugging", then I enabled installs from unknown sources by ADB and SD card.
Any help will be great, Thanks guys
EDIT: sorry for the Thread title, I can't modify it, it should be SuperSU not sudo su (too much linux)
But did you try sudo su? Install a terminal emulator and cd to the xbin directory. FYI, the SU directory is there by default afaik.
RAZERZDAHACKER said:
But did you try sudo su? Install a terminal emulator and cd to the xbin directory. FYI, the SU directory is there by default afaik.
Click to expand...
Click to collapse
Oh I didn't knew that the /su dir was there by default sorry. I downloaded the terminal emulator and "sudo" is not a valid command, when I type "su" it says nothing, and "which su" tells "/su/bin/su", but it does nothing apparently.
If it's not rooted at all how can Silent OS say "root access active detected"?
I just installed SuperSU zip via TWRP, there are other things to do in order to maintain root privileges?
PS: another RootChecker app detects that busybox is installed in /system/xbin/busybox with version 1.13.3, I don't know how that happened, busybox is installed by SuperSU?
Unfortunately they are in the same situation. But I admit that I did not install the TWRP permanently due to a possible bootloop phone. Has anyone found a solution to the root?
i have same problem i want unlock bootloader .............need help plz!!!
Koskha said:
Oh I didn't knew that the /su dir was there by default sorry. I downloaded the terminal emulator and "sudo" is not a valid command, when I type "su" it says nothing, and "which su" tells "/su/bin/su", but it does nothing apparently.
If it's not rooted at all how can Silent OS say "root access active detected"?
I just installed SuperSU zip via TWRP, there are other things to do in order to maintain root privileges?
PS: another RootChecker app detects that busybox is installed in /system/xbin/busybox with version 1.13.3, I don't know how that happened, busybox is installed by SuperSU?
Click to expand...
Click to collapse
After you flashed the su zip, did you get the superuser app?
Blackphone 2 bootloader
RAZERZDAHACKER said:
After you flashed the su zip, did you get the superuser app
phone not flash with any file.....devices lock ....need to bootloader unlock.
Click to expand...
Click to collapse
A litle guide to increase bp2 performance
https://forum.xda-developers.com/an...e-make-bp2-t3735815/post75218344#post75218344