Posts

Open app using rish

~/rish/rish -c 'monkey -p com.example.app 1'

Disable battery optimization with rish

 ~/rish/rish -c 'dumpsys deviceidle whitelist +com.example.app'   Example: ~/rish/rish -c 'dumpsys deviceidle whitelist +com.arlosoft.macrodroid'  

Turn off and on Developer options without losing any setting with risk

 ~/rish/rish -c 'settings put global development_settings_enabled 0' ~/rish/rish -c 'settings put global development_settings_enabled 1'

Enable all accessibility services with rish

This method is for Samsung devices. First, dump all accessibility services: ~/rish/rish -c 'dumpsys accessibility' > dump.txt This saves the output to dump.txt . Make sure your rish path is correct or added to PATH . In the dump output, look for: installed services: You can ignore the first few com.samsung.xxx entries. The rest will look like: com.anydesk.adcontrol.ad1/com.anydesk.adcontrol.AccService com.arlosoft.macrodroid/.triggers.services.MacroDroidAccessibilityServiceJellyBean com.arlosoft.macrodroid/.action.services.UIInteractionAccessibilityService com.catalinagroup.callrecorder.helper/com.catalinagroup.callrecorder.service.AnyCallListenerService com.eset.ems2.gp/com.eset.commoncore.core.accessibility.CoreAccessibilityService org.skvalex.cr/.full.service.MyAccessibilityService Combine them into one line, separated by : and ending with a trailing : (important for One UI): ~/rish/rish -c 'settings put secure enabled_accessibility_services ...

Grant all permissions with rish

~/rish/rish -c '      PACKAGE="com.your.package.name"      dumpsys package $PACKAGE | grep -oE "android.permission.[A-Z_]+" | while read PERMISSION; do           pm grant $PACKAGE $PERMISSION      done '

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' Sa...

Install APK on Windows Subsystem for Android (WSA) using command-line adb tool

Enable Developer mode in the WSA settings Type adb connect 127.0.0.1:58526 (or use the IP address shown in the WSA settings) and press Enter. A firewall prompt may appear; allow it. Type adb install "path\to\your\app.apk" (replace with the actual path to your file) and press Enter. The app will appear in your Start menu.