Always run adbd as root in recovery.
At present, invoking "adb shell" while in recovery results in: - exec '/system/bin/sh' failed: No such file or directory (2) - "adb shell" should invoke /sbin/sh, but cannot as /sbin and /sbin/recovery lack other-user execute permission. Invoking "adb root" to restart adbd as root _does_ work, however this behavior may not be intuitive to users who encounter the above error. The solution implemented here is to always run adbd as root in recovery, so it has permission to run /sbin/sh. Furthemore, user shells in recovery are not particularly useful and "su" doesn't exist, thus "adb root" is likely to be invoked anyways. Change-Id: Iaaa25090e85d970e9a076fef068f5fae8202ab0b
This commit is contained in:
parent
e510810c71
commit
059db9bfb6
@ -36,16 +36,18 @@ service adbd /sbin/adbd recovery
|
||||
disabled
|
||||
|
||||
# Always start adbd on userdebug and eng builds
|
||||
# In recovery, always run adbd as root.
|
||||
on property:ro.debuggable=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18D1
|
||||
write /sys/class/android_usb/android0/idProduct D001
|
||||
write /sys/class/android_usb/android0/functions adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
#write /sys/class/android_usb/android0/enable 1
|
||||
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
|
||||
write /sys/class/android_usb/android0/iProduct $ro.product.model
|
||||
write /sys/class/android_usb/android0/iSerial $ro.serialno
|
||||
start adbd
|
||||
#start adbd
|
||||
setprop service.adb.root 1
|
||||
|
||||
# Restart adbd so it can run as root
|
||||
on property:service.adb.root=1
|
||||
|
Loading…
Reference in New Issue
Block a user