Need help rooting my first AOSP build.. Please

273 views
Skip to first unread message

Shakir Abdul-Ahad

unread,
Jun 1, 2014, 7:43:03 PM6/1/14
to android-...@googlegroups.com
Hi,

I've just finished building AOSP from source for the Nexus 5. Everything works, no issues there. I'm sincerely hoping that someone can help me with the issue I'm having with Superuser/su-binary. I've successfully embedded koush's Superuser app into the Settings app with no problem. My issue is with the actual su binary. I cannot seem to get it working. I open Terminal and type su, but the prompt stays the same. I run 'adb shell' then type su and still nothing. My logcat reads:

[ 05-31 16:22:59.631 3728: 3728 D/su ]
su invoked.

[ 05-31 16:22:59.631 3728: 3728 D/su ]
starting daemon client 2000 0

[ 05-31 16:22:59.631 3728: 3728 E/su ]
connect failed with 2: No such file or directory

But, ls /system/xbin/su shows that the file is there and ls /system/bin/su shows the symlink for /system/xbin/su.  Here's what's currently in my updater-script:

set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");


so it "appears" as thought the perms are being set properly. I've even written an init script to ensure that the permissions are correct at each boot, but still nothing.  I've also written the following init script to try and start 'su --daemon': [mmc]  cat 91-busybox_linkage.sh

for cmd in $(busybox --list);do ln -s /system/xbin/$cmd $cmd; done; chmod ug+s /system/xbin/su; ln -s /system/xbin/su su; /system/xbin/su --daemon;


but still no SU access. 
 Can someone PLEASE PLEASE tell me what I'm doing wrong here? I'd really appreciate it. 

Thanks in advance.


Prem C

unread,
Jun 3, 2014, 2:22:17 AM6/3/14
to android-...@googlegroups.com

andrew_esh

unread,
Jun 11, 2014, 2:17:43 PM6/11/14
to android-...@googlegroups.com
What kind of AOSP build did you install on the Nexus 5? With my builds, if it's userdebug, I reboot into TWRP recovery to do any activities that require su. If it's an eng build, I don't need a separate su utility. I am root already, or I can obtain it in an adb shell easily.
Reply all
Reply to author
Forward
0 new messages