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

Projects
None yet
9 participants
@RunasSudo

RunasSudo commented Nov 29, 2014

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 from Binary does not run on Nexus 5/Lollipop to 'su' does not run on Nexus 5/Lollipop - only position independent executables (PIE) are supported Nov 29, 2014

@RunasSudo

This comment has been minimized.

Show comment
Hide comment
@RunasSudo

RunasSudo Dec 1, 2014

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.

RunasSudo commented Dec 1, 2014

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

This comment has been minimized.

Show comment
Hide comment
@jazzrz86

jazzrz86 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.

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

This comment has been minimized.

Show comment
Hide comment
@leesah

leesah 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?

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

This comment has been minimized.

Show comment
Hide comment
@sparkym3

sparkym3 Feb 8, 2015

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@leesah

leesah 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.

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

This comment has been minimized.

Show comment
Hide comment
@mschewe

mschewe 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?

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

This comment has been minimized.

Show comment
Hide comment
@phhusson

phhusson Apr 14, 2015

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

phhusson commented Apr 14, 2015

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

@phhusson

This comment has been minimized.

Show comment
Hide comment
@phhusson

phhusson Apr 14, 2015

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

phhusson commented Apr 14, 2015

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

@ildar

This comment has been minimized.

Show comment
Hide comment
@ildar

ildar Jul 25, 2015

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

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

@valentin12345

This comment has been minimized.

Show comment
Hide comment
@valentin12345

valentin12345 Jul 25, 2015

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).

valentin12345 commented Jul 25, 2015

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

This comment has been minimized.

Show comment
Hide comment
@phhusson

phhusson Jul 27, 2015

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)

phhusson commented Jul 27, 2015

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)

@valentin12345

This comment has been minimized.

Show comment
Hide comment
@valentin12345

valentin12345 Jul 27, 2015

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).

valentin12345 commented Jul 27, 2015

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

This comment has been minimized.

Show comment
Hide comment
@jeekajoo

jeekajoo Jul 27, 2015

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

jeekajoo commented Jul 27, 2015

@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