Skip to content

Instantly share code, notes, and snippets.

@jmschrack
Last active March 30, 2022 19:42
Show Gist options
  • Select an option

  • Save jmschrack/289455f7db02d0fa28a17054bb663d1f to your computer and use it in GitHub Desktop.

Select an option

Save jmschrack/289455f7db02d0fa28a17054bb663d1f to your computer and use it in GitHub Desktop.
Researching into resurrecting Oculus Go devices for events

Goals

  1. Figure out how to "lock" the headset into a demo mode for 360 content
  2. See what else we can do

Useful Links

Unlock the Bootloader

  • I had to factory reset the device in order to login with my account, so I could enable developer mode.
  • Then I could use ADB
  • I had to apply the unlock twice for some reason. It took the second time.
  • You can now use "adb root" to get at files on the device

Partial Root

  • Rehosted below just in case ChinaLinda's disappears

Linux Kernel

  • can be used to make a custom ROM (hopefully)

GyroJoe's Oculus Launcher

Regular Android apps currently appear in the Library under "unknown sources" and automatically launch in VR Shell.

Launching a video via ADB

If launched via adb shell am start -a android.intent.action.VIEW -t video/mp4 -d file:///sdcard/Movies/Video1.mp4 , the android system menu for "Choose which app to open this with" appears. Oculus MediaGallery, Oculus MediaPlayer, Android VideoPlayer are the only options. MediaGallery and MediaPlayer fail to open. VideoPlayer does open successfully, but there is no UI or stereoscopic support.

The manifest for Oculus MediaGallery seems to include an intent filter for opening videos. However, it's not working when I try using the VIEW intent...

<intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:scheme="file"/>
                <data android:mimeType="image/*"/>
                <data android:mimeType="video/mp4"/>
                <data android:mimeType="video/m4v"/>
                <data android:mimeType="video/3gp"/>
                <data android:mimeType="video/3gpp"/>
                <data android:mimeType="video/3g2"/>
                <data android:mimeType="video/ts"/>
                <data android:mimeType="video/MP2T"/>
                <data android:mimeType="video/webm"/>
                <data android:mimeType="video/mkv"/>
                <data android:mimeType="video/x-matroska"/>
                <data android:mimeType="video/wmv"/>
                <data android:mimeType="video/x-ms-wmv"/>
                <data android:mimeType="video/asf"/>
                <data android:mimeType="video/x-ms-asf"/>
                <data android:mimeType="video/avi"/>
                <data android:mimeType="video/x-msvideo"/>
                <data android:mimeType="video/flv"/>
                <data android:mimeType="video/x-flv"/>
            </intent-filter>

After poking around the MediaGallery's APK and logcat, it appears that at somepoint, all functionality was migrated to VRShell (the oculus Go's OS) and the APK itself just forwards a response. However, either it does not forward the Intent correctly, or VRShell no longer listens for it correctly..

Third Party VR media player apps

  • HeadVR : Does not work at all on Oculus GO
  • VLC : *uns in Oculus TV. Will not respond to intent
  • DeoVR : Works correctly!!!
  • Playa : Does not register intent
  • Skybox : Runs normally, Will not respond to intent

This will launch a video via DeoVR! adb shell am start -a android.intent.action.VIEW -t video/mp4 -d file:///sdcard/Movies/video_360.mp4 com.deovr.gearvr

Bonus Points for DeoVR: They have a Remote Control option built in!

Partial Root

Rehosted below just in case ChinaLinda's disappears

1、disable selinux
adb root 
adb shell
echo 0 > /sys/fs/selinux/enforce
/system/xbin/daemonsu --auto-daemon &
2、download supersu zip and apk
3、setup
adb root
adb remount
adb push SuperSU.apk /system/app/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU.apk
adb shell chcon u:object_r:system_file:s0 /system/app/SuperSU.apk
adb push arm64/su /system/xbin/su
adb shell chmod 0755 /system/xbin/su 
adb shell chcon u:object_r:system_file:s0 /system/xbin/su 
adb push arm64/su /system/bin/.ext/.su 
adb shell chmod 0755 /system/bin/.ext/.su 
adb shell chcon u:object_r:system_file:s0 /system/bin/.ext/.su 
adb push arm64/su /system/xbin/daemonsu 
adb shell chmod 0755 /system/xbin/daemonsu 
adb shell chcon u:object_r:system_file:s0 /system/xbin/daemonsu 
adb push arm64/supolicy /system/xbin/supolicy 
adb shell chmod 0755 /system/xbin/supolicy 
adb shell chcon u:object_r:system_file:s0 /system/xbin/supolicy 
adb push arm64/libsupol.so /system/lib64/libsupol.so 
adb shell chmod 0755 /system/lib64/libsupol.so 
adb shell chcon u:object_r:system_file:s0 /system/lib64/libsupol.so 
adb reboot

4、disable selinux again
adb root 
adb shell
echo 0 > /sys/fs/selinux/enforce
/system/xbin/daemonsu --auto-daemon &
5、open the su apk
adb shell am start -a android.intent.action.VIEW -d com.oculus.tv -e uri eu.chainfire.supersu/.MainActivity  com.oculus.vrshell/.MainActivity
6、enjoy the root for app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment