的SH文件看起來如下上午CMD不起作用
#!/system/bin/sh
am start -a android.intent.action.MAIN -n com.android.settings/.Settings
echo hello,world
exit 1
但報告錯誤,如
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.Sett
}gs
Error type 3
} does not exist.lass {com.android.settings/com.android.settings.Settings
hello,world
exit: Illegal number: 1
,但是當我在sh shell中直接鍵入它,就像在亞行shell提示符,輸入am start -a android.intent.action.MAIN -n com.android.settings/.Settings
,它的工作原理和運行活動
那麼,有什麼問題?
呃試過在你的腳本上設置'chmod + x'嗎? –
順便說一句,Android版本是2.3,並使用sh hello.sh來運行腳本。 – user1616565
使用chmod 777 hello.sh,謝謝。 – user1616565