This is a prototype of an application that can autostart another app at device startup / boot.
It works by registering a receiver for the BOOT_COMPLETED event that first starts this app and then optionally another app.
Clone the repo, connect a quest 3 device, open the repo in Android Studio and click on "Run"
Navigate to app/src/main/java/com/lucajunge/quest3autostart/BootCompletedReceiver.kt and change the PACKAGE_TO_START and CLASS_TO_START in line 13 and 14 respectively.
You can also change the packageName andclassName in the MainActivity.kt to also make the button in the UI start the corresponding app.
- Install the app on your device
- Open the Account Settings page by issuing this command:
adb shell am start -n 'com.android.settings/.Settings$AccountDashboardActivity'- Navigate to "Passwords and Accounts"
- Remove every account in the list
- You can now close the settings
- Enable Device Admin with the following command:
adb shell dpm set-device-owner com.lucajunge.quest3autostart/.DeviceOwnerReceiver