Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Launch termux widget script from adb
- # First get token from termux widget (Might need root)
- token_file="/data/data/com.termux.widget/shared_prefs/com.termux.widget_preferences.xml"
- grep token $token_file |sed -e 's/<[^>]*>//g;s/ //g' > /sdcard/termux.widget.token
- cat /sdcard/termux.widget.token
- # Launch script (you don't need root for this part
- token="$(</sdcard/termux.widget.token)"
- script="file://com.termux.widget/data/data/com.termux/files/home/.shortcuts/myscript"
- am start -n com.termux.widget/.TermuxLaunchShortcutActivity -d $script --es com.termux.shortcut.token $token
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement