如何在recovery模式支持adbshell

月光宝盒 2012-10-25 09:05:22
$adb reboot recovery
$adb devices
List of devices attached
19761202 recovery
$ adb shell
exec '/system/bin/sh' failed: No such file or directory (2) -
$ adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -

有上面的错误提示,无法进入shell,如何进入recovery也能用adb shell 看到文件系统?
...全文
1872 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
linkscue 2015-03-13
  • 打赏
  • 举报
回复
fix up adb to prefer /sbin/sh if it exists https://github.com/CyanogenMod/android_system_core/commit/b78534f1efdd2587041dadc045fbbdade456a442
linkscue 2015-03-13
  • 打赏
  • 举报
回复
修改recovery/root/init.rc 确保有以下配置: mkdir /system mkdir /system/bin symlink /system/etc /etc symlink /sbin/busybox /system/bin/sh
sergio_ramos 2015-01-20
  • 打赏
  • 举报
回复
楼主recovery模式下支持adb shell的问题解决了吗?
  • 打赏
  • 举报
回复
同求啊有结果了吗
hpsoar 2013-04-15
  • 打赏
  • 举报
回复
in 'mounts and storage', 'mount /system'
月光宝盒 2012-10-29
  • 打赏
  • 举报
回复
recovery的init.rc就这些

service ueventd /sbin/ueventd
critical

service recovery /sbin/recovery

service adbd /sbin/adbd recovery
# disabled

on property:persist.service.adb.enable=1
start adbd

on property:persist.service.adb.enable=0
stop adbd


而且看到说提示是正确的
Launching ADB in recovery
Currently, we don't know how it happens, but sometimes ADB starts while the system is booting in recovery. (We believe it to be a race condition at present.)

On the host, run adb shell in a loop.
On Linux, syntax will be something like while true; do adb shell; done
Repeatedly reboot your device into recovery mode (if it comes up normally, adb reboot recovery).
If the shell repeatedly says error: device not found when in recovery mode, press vol-up and power at the same time, then reboot and try again.
If the shell repeatedly says - exec '/system/bin/sh' failed: No such file or directory (2) -, then ADB is running in recovery mode; congratulations.
hello_kitty8888 2012-10-26
  • 打赏
  • 举报
回复
系统有一个init.rc文件,修改启动次序。

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧