AOSP on Nexus 5X: How to get root on shell?

1,071 views
Skip to first unread message

gps...@gmail.com

unread,
Mar 14, 2016, 12:11:12 PM3/14/16
to Android Building
I am working on building AOSP for nexus 5X. code builds and installs and runs,

but when trying to access adb shell, I couldn't get to su.

I checked and /system/xbin/su is now in su_exec tag, so I modified file_contexts to put su in system tag

shell@bullhead:/ $ which su
/system/xbin/su
shell@bullhead:/ $ ls -Z /system/xbin/su
-rwsr-x--- root     shell             u:object_r:system_file:s0 su

But still:

shell@bullhead:/ $ su
su: setgid failed: Operation not permitted

I also tried disabling selinux but:

shell@bullhead:/ $ setenforce 0                                                
setenforce: Couldn't set enforcing status to '0': Permission denied


I am out of ideas now. Please help.

Stuart Monteith

unread,
Mar 16, 2016, 9:56:35 AM3/16/16
to Android Building
Have you tried:
   adb root

then:
   adb shell
Reply all
Reply to author
Forward
0 new messages