Create rish shortcut on Home Screen
- Install Shizuku from GitHub (not playstore vesion)
- Install Termux (Terminal emulator with packages) from F-Droid
- Install Termux:Widget (Launch Termux commands from the homescreen) from F-Droid
- Make sure your Shizuku can be run on boot using Wireless ADB (look up for it)
- In Shizuku, click "Use Shizuku in terminal apps"
- Click "Export files"
- Export anywhere, like in Download/rish
- Run Termux
- Type "termux-setup-storage"
- Copy both files exported from Shizuku
- mkdir ~/rish
- cp ~/storage/shared/Download/rish/* ~/rish
- Edit rish as instruction on Shizuku
- nano ~/rish/rish
- Press CTRL + \
- Type PKG
- Press Enter
- Type com.termux
- Press Ctrl + O
- Press Enter
- Press Ctrl + X
- Change rish permission
- chmod +x ~/rish/rish
- Create shortcuts folder
- mkdir ~/.shortcuts
- Create your shortcut file in .shortcuts folder
- Example:
- To archive and unarchive Macrodroid
- nano ~/.shortcuts/archive_macrodorid.sh
- ~/rish/rish -c 'pm archive --user 0 com.arlosoft.macrodroid'
- Save and exit
- nano ~/.shortcuts/unarchive_macrodorid.sh
- ~/rish/rish -c 'pm request-unarchive --user 0 com.arlosoft.macrodroid'
- Save and exit
- chmod +x ~/.shortcuts/*
- Add permission to Termux to allow "Appear on top"
- Add a widget to your home screen:
- Long-press on an empty area of your Android home screen
- Select "Widgets" (or a similar option depending on your launcher)
- Locate the "Termux:Widget" options. You will typically find two types:
- Termux widget (menu widget): This widget displays a list of all scripts found in your ~/.shortcuts/ directory, allowing you to select and run them from a menu.
- Termux shortcut (individual script widget): This widget allows you to select a specific script from ~/.shortcuts/ to launch directly with a single tap.
- Choose the desired widget type, long-press or tap "Add," and place it on your home screen.
- Configure the widget (if applicable)
- If you chose the individual script widget, you will be prompted to select the specific script from ~/.shortcuts/ that the widget should execute
- Run the script: Tap on the widget or select the script from the menu to execute the Termux commands. You might need to grant Termux background execution permissions on the first run, depending on your device and Android version.
Comments
Post a Comment