您好,我需要以 adb shell <command>
的形式运行
当我在 adb shell 中测试所有内容时,它起作用了,因为我能够在 .bashrc
中设置一些别名。 .
然而,当我做 adb shell <command>
, 没有任何效果因为 .bashrc
运行时不使用 adb shell <command>
,因为它处于非交互模式。
我该如何解决这个问题?我可以adb push
一些文件到文件系统,以便在 adb shell
时别名将在那里运行了吗?
最佳答案
如果您的 android 设备已获得 root 权限,您可以将 adb shell
的别名添加到 /system/etc/mkshrc
文件中。
关于android - 在 adb shell 非交互模式下有别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26288222/