Skip to content

Instantly share code, notes, and snippets.

@wasokeli
Last active October 4, 2023 05:26
Show Gist options
  • Select an option

  • Save wasokeli/0b31aa71f8b00d1906050f6fcfd1b140 to your computer and use it in GitHub Desktop.

Select an option

Save wasokeli/0b31aa71f8b00d1906050f6fcfd1b140 to your computer and use it in GitHub Desktop.
Push LÖVR files to org.lovr.app on a Quest, restart the app, and start logging. I have this in my ~/.zshrc as "load". (public domain CC0)
# === loadquest ===
# push lovr files to org.lovr.app on a Quest, restart the app, and start logging.
#
# usage:
# navigate to a folder with a main.lua, and do
# loadquest
# or navigate to a folder with your files, and do
# loadquest gorilla.lua
# in the latter case, gorilla.lua will be renamed to main.lua on the Quest.
loadquest() {
# if we provide an argument
if [ $# -ne 0 ]
then
# then that's the filename we want to rename to main.lua. still push the whole folder
adb push --sync . /sdcard/Android/data/org.lovr.app/files
adb shell mv /sdcard/Android/data/org.lovr.app/files/$1 /sdcard/Android/data/org.lovr.app/files/main.lua
else
# else, still push the whole folder
adb push --sync . /sdcard/Android/data/org.lovr.app/files
fi
adb shell am force-stop org.lovr.app
adb shell am start org.lovr.app/org.lovr.app.Activity
adb logcat -s LOVR
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment