Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'su' does not run on Nexus 5/Lollipop - only position independent executables (PIE) are supported #268

Open
RunasSudo opened this issue Nov 29, 2014 · 14 comments

Comments

@RunasSudo
Copy link

Clicking Recovery/Install gives ‘There was an error installing Superuser. Please send a log of the error to the developer.’ Manually installing the su binary and attempting to run it gives:
error: only position independent executables (PIE) are supported.

@RunasSudo RunasSudo changed the title Binary does not run on Nexus 5/Lollipop 'su' does not run on Nexus 5/Lollipop - only position independent executables (PIE) are supported Nov 29, 2014
@RunasSudo
Copy link
Author

Well, I compiled su from source targeting android-21, and I ended up with a binary that works in ADB but crashes in Terminal Emulator with

I/ActivityManager(  786): START u0 {flg=0x10800000 cmp=com.koushikdutta.superuser/.MultitaskSuRequestActivity (has extras)} from uid 10109 on display 0
W/Thread-568( 5781): type=1400 audit(0.0:16): avc: denied { write } for name=".socket5763" dev="tmpfs" ino=37344 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:device:s0 tclass=sock_file
I/Superuser( 5630): Permission denied
I/Superuser( 5630): java.io.IOException: Permission denied
I/Superuser( 5630):     at android.net.LocalSocketImpl.connectLocal(Native Method)
I/Superuser( 5630):     at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:290)
I/Superuser( 5630):     at android.net.LocalSocket.connect(LocalSocket.java:130)
I/Superuser( 5630):     at com.koushikdutta.superuser.MultitaskSuRequestActivity$8.run(MultitaskSuRequestActivity.java:306)

I'll leave this one to the experts.

@jazzrz86
Copy link

jazzrz86 commented Dec 4, 2014

The problem is, even if you are root, you are still effectively running in the shell or untrusted_app context. SElinux will stop you from doing anything. SU will need to have the policy adjustments alongside root- and it is a huge effort compared to previous Android.

The current root solution (SuperSU from ChainsDD) spawns from the zygote context and still requires a supporting binary to adjust the SElinux policies.

@leesah
Copy link

leesah commented Feb 8, 2015

Does this mean Lollipop cannot be rooted as previous versions and it's pointless to install any of the three alternatives in Play store?

@sparkym3
Copy link
Contributor

sparkym3 commented Feb 8, 2015

No that is not what it means. Lollipop is rootable and superSU is a great working version (though not open source).

@leesah
Copy link

leesah commented Feb 8, 2015

Thanks @sparkym3 for answering. So is there an uninstallation guide for koush/Superuser? Cuz I didn't see one mentioned in the README.md, and I have installed via the recovery zip.

@mschewe
Copy link

mschewe commented Feb 23, 2015

So if there is now way to run Superuser on Lollipop devices this is the end of the OpenSource su project? How could I adjust SElinux policies if I make my own image?

@phhusson
Copy link

This issue should actually be closed, because it's been fixed by 5291f21

@phhusson
Copy link

It even works properly on a MTK Android 5.0, assuming proper SELinux setting. (namely, I disabled SELInux)

@ildar
Copy link

ildar commented Jul 25, 2015

would you make a release with the fix?
and, BTW, F-Droid still doesn't have the working version for Loli

@valiolichev
Copy link

This is SONY XPERIA Z2 D 6503
На 25.07.2015 г. 20:46 "ildar" notifications@github.com написа:

would you make a release with the fix?
and, BTW, F-Droid still doesn't have the working version for Loli


Reply to this email directly or view it on GitHub
#268 (comment).

@phhusson
Copy link

For interested users, I'm working on an opensource Superuser, fork of Koush's SU, which I intent to be compatible with Chainfire's command options. Any help would be much appreciated. (I already have most SELinux knowledge needed, and working PoC for boot)

@valiolichev
Copy link

WHAT IS THIS "PIE".,BUT MY PHONE IS NOT NEXUS.,MY PHONE IS XPERIA Z2 D6503
На 27.07.2015 г. 21:18 "Pierre-Hugues HUSSON" notifications@github.com
написа:

For interested users, I'm working on an opensource Superuser, fork of
Koush's SU, which I intent to be compatible with Chainfire's command
options. Any help would be much appreciated. (I already have most SELinux
knowledge needed, and working PoC for boot)


Reply to this email directly or view it on GitHub
#268 (comment).

@jeekajoo
Copy link

@phhusson 👍 this is great. I cannot help you but well I support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants