cancel
Showing results for 
Search instead for 
Did you mean: 

Solution for kiosk mode on Oculus Go

AlexEvgrashin
Explorer
As it is no built-in way to enable kiosk mode for your custom app, I will share my findings to do it via "hacks". I hope, you will share yours too and together we will solve this problem.

Make your app start at boot
This is relatively easy, thanks to Android OS. You need to add this intent-filters for your activity in manifest file.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
After that, you need to execute this command via adb.
adb shell cmd package set-home-activity <your package name>/<your activity name>
You can find your package name and your activity name in manifest file. After reboot device will start your app!

Disable home button on controller
So even after you changed home activity of your app, home button on controller will still return you to Oculus Home. I guess, it's because system prop "ro.ovr.home_uri". I didn't find a way to change it or disable button without root assess. But you can try this hack.
You will need to override onCreate and onStop of your activity. In onCreate method you have to start your custom service.
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {    
super.onCreate(savedInstanceState, persistentState);
Intent mServiceIntent = new Intent(this, AndroidDaemonService.class);
this.startService(mServiceIntent);
}
AndroidDaemonService is simple service that has static singleton field. You have to write it by yourself.
In onStop method you need to "restart" activity.
protected void onStop() {    
super.onStop();
Context context = AndroidDaemonService.instance;
Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
launchIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
context.startActivity(launchIntent);
}
So after you press home button, device will try to load Oculus home and immediately return to your application. For a user it will look like a white flash. So it's not a perfect solution, but at least it works.

Disable Welcome to VR / Controller callibration
Sadly, I haven't succeeded to solve that yet. Again, it looks like system prop "persist.ovr.wakeupdialog" should do the trick, but I don't know how to change it without root. There exists really robust approach to detect when screen goes on and send command via ADB to simulate volume button press, but I didn't test it yet. This solution need permanent adb connection via USB or via WiFi.
Another way is to delete system app vrpowermanager. It will disable the window, but it also ruins oculus tracking. If you know any solution via broadcast or something else, please share it with others.

If you have any questions about implementation of this approaches, write me PM or email.
46 REPLIES 46

TheSeanLavery
Honored Guest
Do the original instructions still work? Or is the paid solution the only thing that works?

Jonnyboybaby
Honored Guest
@undef_dev I'm using the demo mode for the kiosk mode and it is not able to see my apk. The oculus has it installed in unknown sources but the kiosk mode demo says I have no applications installed.

I have tried both installing it with adb and with the inbuilt installer.

Edit: It was a package name @undef_dev, Can't use com.oculus.UnitySample (I assume it was the oculus part).

Cyberben3d
Explorer
Okay I tried again and it worked this time. I got a prompt in the headset asking if I want to set my apk as a Home screen and I said Always Allow. The only thing that doesn't seem to work is the Oculus button makes the screen go blank. I can hear my app still running but the screen blanks out and sometimes comes back after a minute.

undef_dev
Protege
@Jonnyboybaby Could be an issue with your package name. Does it work with a different app?

DBOXVRPhones
Honored Guest
.

YerbaBuenaVR
Explorer
@AlexEvgrashin , a silly follow up question. Suppose i'm done using a Go in kiosk mode and want to restablish it in nromal mode. What's the best way to do it? I imagine it would be something like re-instating oculus home as the home activity. Do you happen  to know the package/activity name?

Doing a dumpsys, i see

com.oculus.vrshell/.MainActivity

do you know if this would be it?

AlexEvgrashin
Explorer


@AlexEvgrashin , a silly follow up question. Suppose i'm done using a Go in kiosk mode and want to restablish it in nromal mode. What's the best way to do it? I imagine it would be something like re-instating oculus home as the home activity. Do you happen  to know the package/activity name?

Doing a dumpsys, i see

com.oculus.vrshell/.MainActivity

do you know if this would be it?


I have the dumb answer - just factory reset it from boot.
https://www.androidcentral.com/how-reset-your-oculus-go?amp

Sure, you have to link Oculus Go to your phone again and it will delete all information from device.

YerbaBuenaVR
Explorer
Hmmm, i see, thanks!

The reason why i ask is that i have had bad prior experiences with factory resets on the Go (namely, a 50% rate of "orange-blink-of-death" when resetting, leading to me having to process the return), so i'd like to avoid having to do too many of these, hehe. 

vrtuous
Honored Guest


dear people 
for those how want to use a browser in kioskmode: with firefox vr browser and undef def-s kiosk solution
it does work.
wbr
klaus


Hi, can you explain this a bit? What does this mean: undef def-s kiosk solution

Thanks! 

Timnijland
Protege
Hi all,

We developed a simple solution for Oculus GO 360 video Kiosk mode.  Feel free to check it out. It's an installable app from the app store but only works with 360 video's at the moment. Hope you find it usefull.

Cheers