From 1de2570cbf2e9360a96bd3451cbce92f1936bde5 Mon Sep 17 00:00:00 2001 From: basti564 Date: Thu, 8 Apr 2021 17:36:32 +0200 Subject: [PATCH] added option to disable telemetry --- .idea/codeStyles/Project.xml | 139 ++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + README.md | 21 ++- app/build.gradle | 4 +- app/release/output-metadata.json | 4 +- app/src/main/AndroidManifest.xml | 27 +++- .../java/com/bos/oculess/DevAdminReceiver.kt | 16 ++ .../main/java/com/bos/oculess/MainActivity.kt | 112 ++++++++++++-- app/src/main/res/layout/activity_main.xml | 13 +- app/src/main/res/values-de-rDE/strings.xml | 5 + app/src/main/res/values/strings.xml | 5 + app/src/main/res/xml/device_admin.xml | 5 + 12 files changed, 330 insertions(+), 26 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 app/src/main/java/com/bos/oculess/DevAdminReceiver.kt create mode 100644 app/src/main/res/xml/device_admin.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..3c7772a --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/README.md b/README.md index 237772c..9d15d91 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,21 @@ # Oculess -### Removes account requirements from Oculus Quest devices -Follow this tutorial on how to use the app: https://basti564.github.io/blog/Quest-Account-Logout +## Features +- Remove Oculus / FaceBook account +- Disable telemetry + +## Tutorial + +### Remove Account +1. Click on "DISABLE COMPANION" +2. Click "OK" +3. Choose “Companion Server” from the List +4. Click “Deactivate this device admin app” +5. Restart your Quest + +### Disable Telemetry +```diff +!Warning! You won't be able to remove this app without a factory reset after running the following command +``` +1. Run this command ```adb shell dpm set-device-owner com.bos.oculess/.DevAdminReceiver``` +2. Click on "DISABLE TELEMETRY" in the app \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index bba80e8..12654f0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.bos.oculess" minSdkVersion 23 targetSdkVersion 30 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index aee5191..21b4d71 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -10,8 +10,8 @@ { "type": "SINGLE", "filters": [], - "versionCode": 1, - "versionName": "1.0", + "versionCode": 2, + "versionName": "1.1", "outputFile": "app-release.apk" } ] diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0362fba..0818cc8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ - + + android:theme="@style/Theme.Oculess"> + + + + + + - + - + + + @@ -22,5 +39,5 @@ - + \ No newline at end of file diff --git a/app/src/main/java/com/bos/oculess/DevAdminReceiver.kt b/app/src/main/java/com/bos/oculess/DevAdminReceiver.kt new file mode 100644 index 0000000..9babc7e --- /dev/null +++ b/app/src/main/java/com/bos/oculess/DevAdminReceiver.kt @@ -0,0 +1,16 @@ +package com.bos.oculess + +import android.app.admin.DeviceAdminReceiver +import android.content.Context +import android.content.Intent +import android.util.Log +import android.widget.Toast + +class DevAdminReceiver : DeviceAdminReceiver() { + private val TAG = "DeviceAdminReceiver" + override fun onEnabled(context: Context, intent: Intent) { + super.onEnabled(context, intent) + Log.d(TAG, "Device Owner Enabled") + Toast.makeText(context, "Device Owner Enabled", Toast.LENGTH_LONG).show() + } +} \ No newline at end of file diff --git a/app/src/main/java/com/bos/oculess/MainActivity.kt b/app/src/main/java/com/bos/oculess/MainActivity.kt index 860c76b..a4acf7c 100644 --- a/app/src/main/java/com/bos/oculess/MainActivity.kt +++ b/app/src/main/java/com/bos/oculess/MainActivity.kt @@ -5,9 +5,7 @@ import android.content.ComponentName import android.content.Context import android.content.DialogInterface import android.content.Intent -import android.content.Intent.FLAG_ACTIVITY_NEW_TASK import android.graphics.Color -import android.net.Uri import android.os.Bundle import android.view.WindowManager import android.widget.Button @@ -22,19 +20,35 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) + val telemetryApps = arrayOf( + "com.oculus.unifiedtelemetry", + "com.oculus.gatekeeperservice", + "com.oculus.notification_proxy", + "com.oculus.bugreporter", + "com.oculus.os.logcollector", + "com.oculus.appsafety" + ) + val viewAdminsBtn = findViewById