我想在init.rc中运行我的应用程序,我写了一个脚本:
#!/system/bin/sh
am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n my.package.name/my.package.name.MainActivity
此命令在终端中有效但运行时
sh /system/bin/myscript
我收到了这个错误:
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=yaghuti.manshoor.possystemsample/.Main2Activity } Error type 3 Error: Activity class {yaghuti.manshoor.possystemsample/yaghuti.manshoor.possystemsample.Main2Activity } does not exist.