我正在为nexus 5X构建AOSP。代码构建,安装和运行,

但是当尝试访问adb shell时,我无法进入su。

我检查了一下,/ system / xbin / su现在在su_exec标记中,所以我修改了file_contexts以将su放入系统标记

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


但仍然:

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


我也尝试禁用selinux,但是:

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


我现在没主意了。请帮忙。

最佳答案

带有userdebug构建的adb根目录对我不起作用。

为了生根,我不得不做一个eng bui。在此构建中,adb始终位于root shell中。

谢谢@克里斯的回答。

关于android - Nexus 5X上的AOSP:如何获得root,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35936934/

10-12 02:01