Advertisement
metalx1000

Android Create Shortcut to Retroarch Game with Termux

Jun 18th, 2023 (edited)
2,076
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.87 KB | None | 1 0
  1. #install retroarch
  2. wget -c "https://buildbot.libretro.com/stable/1.15.0/android/RetroArch.apk"
  3. adb install -g RetroArch.apk
  4.  
  5. #start retro arch
  6. adb shell am start -a android.intent.action.MAIN -n com.retroarch/.browser.mainmenu.MainMenuActivity
  7.  
  8. #load retroarch and install cores [example: mame-current]
  9. #Download and push roms to Android device
  10. wget -c "https://archive.org/download/mame-merged/mame-merged/qsound_hle.zip"
  11. wget -c "https://archive.org/download/mame-merged/mame-merged/mvsc.zip"
  12. adb push mvsc.zip qsound_hle.zip /sdcard/RetroArch/downloads/
  13.  
  14. #make sure retroarch is closed
  15. adb shell am force-stop com.retroarch
  16.  
  17. #disable onscreen controls
  18. adb shell 'sed -i "s/input_overlay_enable = \"true\"/input_overlay_enable = \"false\"/g" /sdcard/Android/data/com.retroarch/files/retroarch.cfg'
  19.  
  20. #load retroarch and install cores [example: mame-current]
  21. #test launch command
  22. adb shell am force-stop com.retroarch
  23. adb shell am start -n com.retroarch/.browser.retroactivity.RetroActivityFuture -e ROM /sdcard/RetroArch/downloads/mvsc.zip -e LIBRETRO /data/data/com.retroarch/cores/mamearcade_libretro_android.so -e CONFIGFILE /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg -e QUITFOCUS --activity-clear-task --activity-clear-top --activity-no-history
  24.  
  25.  
  26. #use termux to create shortcut
  27. wget -c "https://f-droid.org/repo/com.termux_118.apk" -O termux.apk
  28. wget -c "https://f-droid.org/repo/com.termux.widget_13.apk" -O termux.widget.apk
  29. adb install -g termux.apk
  30. adb install -g termux.widget.apk
  31.  
  32.  
  33. #start termux once to setup files
  34. adb shell am start -n com.termux/.app.TermuxActivity
  35.  
  36. ##########################################
  37. #in termux run these commands
  38. mkdir -p ~/.shortcuts
  39. curl "https://gitlab.com/-/snippets/2557869/raw/main/mvsc.sh?inline=false" -o ~/.shortcuts/mvsc.sh
  40. chmod +x ~/.shortcuts/mvsc.sh
  41. ##########################################
  42.  
  43. #launch game at boot
  44. wget "https://f-droid.org/repo/com.termux.boot_7.apk"
  45. adb install -g com.termux.boot_7.apk
  46.  
  47. ##########################################
  48. #in termux run these commands
  49. mkdir -p ~/.termux/boot
  50. curl "https://gitlab.com/-/snippets/2557869/raw/main/mvsc.sh?inline=false" -o ~/.termux/boot/mvsc.sh
  51. chmod +x ~/.termux/boot/mvsc.sh
  52. ##########################################
  53.  
  54. #now added icon widget to desktop
  55. #for custom icon use launcher that allows changing icons
  56. #example lawnchair
  57. wget -c "https://filmsbykris.com/scripts/2023/ch.deletescape.lawnchair.plah.apk" -O lawnchair.apk
  58. adb install -g lawnchair.apk
  59. #set lawnchair as default launcher
  60. adb shell cmd package set-home-activity ch.deletescape.lawnchair.plah/ch.deletescape.lawnchair.Launcher
  61.  
  62.  
  63. #download icon
  64. wget -c "https://filmsbykris.com/scripts/2023/mvsc.png"
  65. adb push mvsc.png /sdcard/Download/
  66.  
  67. #Disable Android lock screen
  68. adb shell locksettings set-disabled true
  69. adb shell locksettings clear –old CREDENTIAL
  70.  
  71.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement