Thanks will tell you what I find
I decompiled the APK, and got a list of all activities.
I am going to post a document from Claude, best I can do without the device.
Try these methods and let me know. Sorry.
============================================================
META QUEST ACCOUNT REMOVAL METHODS
============================================================
STEP 1: IDENTIFY THE ACCOUNT
------------------------------------------------------------
# List all accounts on the device
adb shell dumpsys account
# Filter for Meta/Oculus accounts
adb shell dumpsys account | grep -iE "oculus|meta|facebook"
# On Windows:
adb shell dumpsys account | findstr /i "oculus meta facebook"
STEP 2: GUI-BASED REMOVAL METHODS
------------------------------------------------------------
# Open main accounts dashboard
adb shell am start -a android.settings.SYNC_SETTINGS
# Open account management settings
adb shell am start -a android.settings.MANAGE_ACCOUNTS_SETTINGS
# Open account sync settings
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS
# Direct activity launch
adb shell am start -n com.android.settings/.Settings\$AccountDashboardActivity
# Open with specific account type
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS --es account_types "com.oculus.account"
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS --es account_types "com.facebook.account"
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS --es account_types "com.meta.account"
STEP 3: CLEAR APP DATA (REMOVES ACCOUNT STATE)
------------------------------------------------------------
# Clear Oculus/Meta account-related apps
adb shell pm clear com.oculus.accountscenter
adb shell pm clear com.oculus.companion.server
adb shell pm clear com.oculus.socialplatform
adb shell pm clear com.oculus.horizon
adb shell pm clear com.oculus.updater
adb shell pm clear com.oculus.systemactivities
adb shell pm clear com.oculus.firsttimenux
adb shell pm clear com.facebook.system
# Clear all Oculus packages (aggressive)
adb shell "for pkg in $(pm list packages | grep oculus | cut -d: -f2); do pm clear $pkg; done"
# Clear all Facebook packages
adb shell "for pkg in $(pm list packages | grep facebook | cut -d: -f2); do pm clear $pkg; done"
STEP 5: REMOVE ACCOUNT VIA SHELL COMMANDS
------------------------------------------------------------
# Using AccountManager (may require root)
adb shell am instrument -w -e account_name "YOUR_EMAIL" -e account_type "com.oculus.account" com.android.shell/.RemoveAccount
# Using content provider
adb shell content call --uri content://settings/system --method DELETE_ACCOUNT --arg "com.oculus.account"
# Using settings command
adb shell settings delete secure account_name
STEP 8: REVOKE PERMISSIONS
------------------------------------------------------------
# Revoke account-related permissions
adb shell pm revoke com.oculus.accountscenter android.permission.GET_ACCOUNTS
adb shell pm revoke com.oculus.accountscenter android.permission.MANAGE_ACCOUNTS
adb shell pm revoke com.oculus.accountscenter android.permission.AUTHENTICATE_ACCOUNTS
STEP 9: KILL ACCOUNT PROCESSES
------------------------------------------------------------
# Force stop all Oculus apps
adb shell am force-stop com.oculus.accountscenter
adb shell am force-stop com.oculus.companion.server
adb shell am force-stop com.oculus.horizon
adb shell am force-stop com.oculus.socialplatform
# Kill all Oculus processes
adb shell "for pkg in $(pm list packages | grep oculus | cut -d: -f2); do am force-stop $pkg; done"
============================================================
NOTES
============================================================
- Replace YOUR_EMAIL with actual Meta account email
- Replace YOUR_PACKAGE with your device admin app package
- Some commands require root access
- Always backup important data before attempting removal
- Factory reset is guaranteed to remove account but erases all data
2 Likes
Some more probably dead ends to try.
adb shell appops set com.oculus.accountscenter GET_ACCOUNTS deny
adb shell appops set com.oculus.accountscenter MANAGE_ACCOUNTS deny
adb shell cmd appops set com.oculus.accountscenter RUN_IN_BACKGROUND deny
adb shell cmd appops set com.oculus.accountscenter RUN_ANY_IN_BACKGROUND deny
adb shell content delete --uri content://accounts/accounts --where "type='com.oculus.account'"
adb shell content call --uri content://settings/system --method DELETE_ACCOUNT --arg "com.oculus.account"
adb shell settings delete secure account_name
adb shell settings delete secure last_account
adb shell settings delete secure sync_settings
adb shell settings list secure | findstr /i account
adb shell am start -a android.accounts.AccountManager.ACTION_REMOVE_ACCOUNT
adb shell am start -n com.oculus.accountscenter/.RemoveAccountActivity
adb shell am start -n com.oculus.accountscenter/.LogoutActivity
adb shell am start -n com.oculus.accountscenter/.SignOutActivity
adb shell am start -n com.oculus.accountscenter/.MainActivity
adb shell am start -a com.oculus.companion.UNPAIR
adb shell am start -a com.oculus.companion.LOGOUT
adb shell am start -a com.oculus.companion.REMOVE_ACCOUNT
adb shell pm clear com.oculus.companion.server
More likely to work. Grasping at straws here
============================================================
META ACCOUNT REMOVAL - FROM DECOMPILED SETTINGS.APK
============================================================
VERIFIED FROM DECOMPILATION:
- Account removal uses: AccountManager.removeAccountAsUser()
- Blocked by restriction: "no_modify_accounts"
- Preference key: "remove_account"
- Dialog tag: "confirmRemoveAccount"
METHOD 1: CHECK IF REMOVAL IS BLOCKED
------------------------------------------------------------
# Check if "no_modify_accounts" restriction is set
adb shell dumpsys user | findstr -i "no_modify_accounts"
# Check user restrictions
adb shell dumpsys user | findstr -i "restriction"
# Remove the restriction (if you can)
adb shell pm clear com.android.providers.settings
METHOD 2: DIRECT ACTIVITY WITH ACCOUNT EXTRAS
------------------------------------------------------------
# The AccountDetailDashboardFragment needs account + userHandle
# Bundle keys found: "account", "android.intent.extra.USER"
adb shell am start -n com.android.settings/.Settings\$AccountSyncSettingsActivity ^
--es "account" "YOUR_META_EMAIL" ^
--es "account_type" "com.oculus.account" ^
--ei "android.intent.extra.USER" 0
METHOD 3: TRIGGER REMOVE DIALOG DIRECTLY
------------------------------------------------------------
# Fragment tag for removal dialog: "confirmRemoveAccount"
# Requires passing Account parcelable - hard via ADB
# Try starting sync settings which has remove button
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS
METHOD 4: USE ACCOUNTMANAGER API DIRECTLY
------------------------------------------------------------
# The code calls: AccountManager.removeAccountAsUser(account, activity, callback, handler, userHandle)
# This is done via Android API, not directly callable from ADB
# But you can use 'cmd account' which wraps AccountManager:
adb shell cmd account remove-account "YOUR_META_EMAIL"
# List accounts first to get exact name:
adb shell cmd account list-accounts
METHOD 5: CLEAR RESTRICTION ENFORCER
------------------------------------------------------------
# Restrictions checked via RestrictedLockUtilsInternal
# If blocked, it shows "Admin support details"
# Check device policy for restrictions
adb shell dumpsys device_policy | findstr -i "restriction\|no_modify"
# Check which package enforces restriction
adb shell dumpsys device_policy | findstr -i "admin"
METHOD 6: ACTIVITIES FOUND IN MANIFEST
------------------------------------------------------------
# Main accounts dashboard
adb shell am start -n com.android.settings/.Settings\$AccountDashboardActivity
# Account sync settings (has remove button)
adb shell am start -n com.android.settings/.Settings\$AccountSyncSettingsActivity
# Choose account type
adb shell am start -n com.android.settings/.Settings\$ChooseAccountActivity
# Add account (to verify account type names)
adb shell am start -n com.android.settings/.accounts.AddAccountSettings
METHOD 7: INTENT FILTERS FROM MANIFEST
------------------------------------------------------------
# These intents are registered:
adb shell am start -a android.settings.SYNC_SETTINGS
adb shell am start -a android.settings.ACCOUNT_SYNC_SETTINGS
METHOD 8: BYPASS RESTRICTION CHECK
------------------------------------------------------------
# The restriction is: "no_modify_accounts"
# Checked for specific user ID
# Try as different user (user 0 = owner)
adb shell am start --user 0 -a android.settings.SYNC_SETTINGS
# Create new user without restriction
adb shell pm create-user "TempUser"
adb shell pm list-users
adb shell am switch-user [NEW_USER_ID]
# Then remove account from new user context
METHOD 9: DIRECTLY CALL ACCOUNTMANAGER SERVICE
------------------------------------------------------------
# Service name from code: AccountManager
adb shell service list | findstr account
# Service call (transaction codes vary by Android version)
# removeAccount is typically transaction 10-15
adb shell service call account 10
METHOD 10: FORCE REMOVAL VIA SETTINGS PROVIDER
------------------------------------------------------------
# Settings uses AccountManager internally
# Force refresh account state
adb shell am broadcast -a android.accounts.LOGIN_ACCOUNTS_CHANGED
adb shell am broadcast -a android.accounts.action.ACCOUNT_REMOVED --es "account" "YOUR_EMAIL"
============================================================
MOST LIKELY TO WORK (BASED ON DECOMPILED CODE)
============================================================
1. First check if restricted:
adb shell dumpsys user | findstr -i "no_modify"
2. If NOT restricted, open account settings:
adb shell am start -n com.android.settings/.Settings\$AccountDashboardActivity
Then tap on account > Remove account
3. If that doesn't show remove button:
adb shell cmd account remove-account "YOUR_EMAIL"
4. If restricted, find what's enforcing it:
adb shell dumpsys device_policy
============================================================
KEY FINDINGS FROM DECOMPILATION
============================================================
1. RemoveAccountPreferenceController.java controls removal
2. Uses standard Android AccountManager API
3. Blocked by "no_modify_accounts" user restriction
4. Restriction enforced by RestrictedLockUtilsInternal
5. If restricted, shows admin support dialog instead
6. Actual removal: AccountManager.removeAccountAsUser()
7. No Oculus-specific removal logic in Settings app
(Oculus handles this in their own account app)
1 Like
Get me the oculus account center APK too?
Can you give me the command?
adb shell pm list packages oculus
adb shell pm path com.package.name
# copy the path
adb pull /path/to/package_name.apk
Any luck with any of the above posts?
https://send.magicode.me/send-file/file/d8a41a2eba5b88fc3054632888da99292e611912/view
C:\platform-tools>adb shell dumpsys accountUser UserInfo{0:vr:4c13}:Accounts: 3Account {name=Meta, type=com.meta}Account {name=Horizon Worlds Platform, type=com.horizonworldsplatform}Account {name=Oculus, type=com.oculus}
AccountId, Action_Type, timestamp, UID, TableName, KeyAccounts History1,action_account_add,2025-12-15 21:06:26,10129,accounts,02,action_account_add,2025-12-15 21:06:26,10129,accounts,13,action_account_add,2025-12-15 21:06:27,10129,accounts,23,action_clear_password,2025-12-15 21:06:27,10129,accounts,33,action_clear_password,2025-12-15 21:06:27,10129,accounts,43,action_clear_password,2025-12-15 21:06:27,10129,accounts,5
Active Sessions: 0
RegisteredServicesCache: 8 servicesServiceInfo: AuthenticatorDescription {type=com.whatsapp}, ComponentInfo{com.whatsapp/com.whatsapp.accountsync.AccountAuthenticatorService}, uid 10140ServiceInfo: AuthenticatorDescription {type=com.meta}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.meta.MetaAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.instagram.sso}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.instagramsso.InstagramSsoAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.facebook.sso}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.facebooksso.FacebookSsoAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.oculus}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.oculus.OculusAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.horizonworldsplatform}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.horizonworldsplatform.HorizonWorldsPlatformAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.meta.work}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.work.WorkAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.facebook.messenger}, ComponentInfo{com.facebook.orca/com.facebook.messaging.phonebookintegration.account.MessengerAuthenticatorService}, uid 10144
Account visibility:Horizon Worlds Platformandroid:accounts:key_legacy_visible, 4Oculuscom.oculus.avatareditor, 1com.oculus.explore, 1com.oculus.metacam, 1com.oculus.store, 1com.oculus.firsttimenux, 1com.oculus.systemux, 1com.oculus.helpcenter, 1com.oculus.vrshell, 1android:accounts:key_legacy_visible, 4com.oculus.presence, 1com.oculus.socialplatform, 1com.oculus.backuptransportservice, 1com.oculus.identitymanagement.service, 1com.oculus.appsafety, 1Metaandroid:accounts:key_legacy_visible, 4com.oculus.firsttimenux, 1
C:\platform-tools>adb shell pm clear com.oculus.horizon
Exception occurred while executing ‘clear’:java.lang.SecurityException: PID 11298 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.oculus.horizonat com.android.server.am.ActivityManagerService.clearApplicationUserData(ActivityManagerService.java:3597)at com.android.server.pm.PackageManagerShellCommand.runClear(PackageManagerShellCommand.java:2474)at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:268)at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)at android.os.ShellCommand.exec(ShellCommand.java:40)at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6419)at android.os.Binder.shellCommand(Binder.java:1093)at android.os.Binder.onTransact(Binder.java:913)at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4367)at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6403)at android.os.Binder.execTransactInternal(Binder.java:1369)at android.os.Binder.execTransact(Binder.java:1300)
C:\platform-tools>adb shell pm clear com.facebook.systemFailed
C:\platform-tools>adb shell pm clear com.oculus.vrshellSuccess
C:\platform-tools>adb shell dumpsys accountUser UserInfo{0:vr:4c13}:Accounts: 3Account {name=Meta, type=com.meta}Account {name=Horizon Worlds Platform, type=com.horizonworldsplatform}Account {name=Oculus, type=com.oculus}
AccountId, Action_Type, timestamp, UID, TableName, KeyAccounts History1,action_account_add,2025-12-15 21:06:26,10129,accounts,02,action_account_add,2025-12-15 21:06:26,10129,accounts,13,action_account_add,2025-12-15 21:06:27,10129,accounts,23,action_clear_password,2025-12-15 21:06:27,10129,accounts,33,action_clear_password,2025-12-15 21:06:27,10129,accounts,43,action_clear_password,2025-12-15 21:06:27,10129,accounts,5
Active Sessions: 0
RegisteredServicesCache: 8 servicesServiceInfo: AuthenticatorDescription {type=com.whatsapp}, ComponentInfo{com.whatsapp/com.whatsapp.accountsync.AccountAuthenticatorService}, uid 10140ServiceInfo: AuthenticatorDescription {type=com.meta}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.meta.MetaAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.instagram.sso}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.instagramsso.InstagramSsoAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.facebook.sso}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.facebooksso.FacebookSsoAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.oculus}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.oculus.OculusAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.horizonworldsplatform}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.horizonworldsplatform.HorizonWorldsPlatformAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.meta.work}, ComponentInfo{com.oculus.horizon/com.oculus.auth.authenticator.work.WorkAuthenticatorService}, uid 10129ServiceInfo: AuthenticatorDescription {type=com.facebook.messenger}, ComponentInfo{com.facebook.orca/com.facebook.messaging.phonebookintegration.account.MessengerAuthenticatorService}, uid 10144
Account visibility:Horizon Worlds Platformandroid:accounts:key_legacy_visible, 4Oculuscom.oculus.avatareditor, 1com.oculus.explore, 1com.oculus.metacam, 1com.oculus.store, 1com.oculus.firsttimenux, 1com.oculus.systemux, 1com.oculus.helpcenter, 1com.oculus.vrshell, 1android:accounts:key_legacy_visible, 4com.oculus.presence, 1com.oculus.socialplatform, 1com.oculus.backuptransportservice, 1com.oculus.identitymanagement.service, 1com.oculus.appsafety, 1Metaandroid:accounts:key_legacy_visible, 4com.oculus.firsttimenux, 1
C:\platform-tools>adb shell am instrument -w -e account_name “Meta” -e account_type “com.meta” com.android.shell/.RemoveAccountandroid.util.AndroidException: INSTRUMENTATION_FAILED: com.android.shell/com.android.shell.RemoveAccountat com.android.commands.am.Instrument.run(Instrument.java:535)at com.android.commands.am.Am.runInstrument(Am.java:208)at com.android.commands.am.Am.onRun(Am.java:85)at com.android.internal.os.BaseCommand.run(BaseCommand.java:62)at com.android.commands.am.Am.main(Am.java:54)at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.android.shell/com.android.shell.RemoveAccount}INSTRUMENTATION_STATUS: id=ActivityManagerServiceINSTRUMENTATION_STATUS_CODE: -1
C:\platform-tools>adb shell am instrument -w -e account_name “Horizon Worlds Platform” -e account_type “com.horizonworldsplatform” com.android.shell/.RemoveAccountActivity manager (activity) commands:helpPrint this help text.start-activity [-D] [-N] [-W] [-P ] [–start-profiler ][–sampling INTERVAL] [–clock-type ] [–streaming][-R COUNT] [-S] [–track-allocation][–user <USER_ID> | current] [–suspend]Start an Activity. Options are:-D: enable debugging–suspend: debugged app suspend threads at startup (only with -D)-N: enable native debugging-W: wait for launch to complete–start-profiler : start profiler and send results to–sampling INTERVAL: use sample profiling with INTERVAL microsecondsbetween samples (use with --start-profiler)–clock-type : type can be wall / thread-cpu / dual. Specifythe clock that is used to report the timestamps when profilingThe default value is dual. (use with --start-profiler)–streaming: stream the profiling output to the specified file(use with --start-profiler)-P : like above, but profiling stops when app goes idle–attach-agent : attach the given agent before binding–attach-agent-bind : attach the given agent during binding-R: repeat the activity launch times. Prior to each repeat,the top activity will be finished.-S: force stop the target app before starting the activity–track-allocation: enable tracking of object allocations–user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.–windowingMode <WINDOWING_MODE>: The windowing mode to launch the activity into.–activityType <ACTIVITY_TYPE>: The activity type to launch the activity as.–display <DISPLAY_ID>: The display to launch the activity into.–splashscreen-icon: Show the splash screen icon on launch.start-service [–user <USER_ID> | current]Start a Service. Options are:–user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.start-foreground-service [–user <USER_ID> | current]Start a foreground Service. Options are:–user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.stop-service [–user <USER_ID> | current]Stop a Service. Options are:–user <USER_ID> | current: Specify which user to run as; if notspecified then run as the current user.broadcast [–user <USER_ID> | all | current][–receiver-permission ][–allow-background-activity-starts][–async]Send a broadcast Intent. Options are:–user <USER_ID> | all | current: Specify which user to send to; if notspecified then send to all users.–receiver-permission : Require receiver to hold permission.–allow-background-activity-starts: The receiver may start activitieseven if in the background.–async: Send without waiting for the completion of the receiver.compact [some|full] <process_name> [–user <USER_ID>]Perform a single process compaction.some: execute file compaction.full: execute anon + file compaction.system: system compaction.compact systemPerform a full system compaction.compact native [some|full]Perform a native compaction for process with .some: execute file compaction.full: execute anon + file compaction.freeze [–sticky] [–user <USER_ID>]Freeze a process.–sticky: persists the frozen state for the process lifetime oruntil an unfreeze is triggered via shellunfreeze [–sticky] [–user <USER_ID>]Unfreeze a process.–sticky: persists the unfrozen state for the process lifetime oruntil a freeze is triggered via shellinstrument [-r] [-e ] [-p ] [-w][–user <USER_ID> | current][–no-hidden-api-checks [–no-test-api-access]][–no-isolated-storage][–no-window-animation] [–abi ]Start an Instrumentation. Typically this target is in theform <TEST_PACKAGE>/<RUNNER_CLASS> or only <TEST_PACKAGE> if thereis only one instrumentation. Options are:-r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT). Use with[-e perf true] to generate raw output for performance measurements.-e : set argument to . For test runners acommon form is [-e <testrunner_flag> [,…]].-p : write profiling data to-m: Write output as protobuf to stdout (machine readable)-f <Optional PATH/TO/FILE>: Write output as protobuf to a file (machinereadable). If path is not specified, default directory and file name willbe used: /sdcard/instrument-logs/log-yyyyMMdd-hhmmss-SSS.instrumentation_data_proto-w: wait for instrumentation to finish before returning. Required fortest runners.–user <USER_ID> | current: Specify user instrumentation runs in;current user if not specified.–no-hidden-api-checks: disable restrictions on use of hidden API.–no-test-api-access: do not allow access to test APIs, if hiddenAPI checks are enabled.–no-isolated-storage: don’t use isolated storage sandbox andmount full external storage–no-window-animation: turn off window animations while running.–abi : Launch the instrumented process with the selected ABI.This assumes that the process supports the selected ABI.trace-ipc [start|stop] [–dump-file ]Trace IPC transactions.start: start tracing IPC transactions.stop: stop tracing IPC transactions and dump the results to file.–dump-file : Specify the file the trace should be dumped to.profile start [–user <USER_ID> current][–clock-type ][–sampling INTERVAL | --streaming]Start profiler on a process. The given argumentmay be either a process name or pid. Options are:–user <USER_ID> | current: When supplying a process name,specify user of process to profile; uses current user if notspecified.–clock-type : use the specified clock to report timestamps.The type can be one of wall | thread-cpu | dual. The defaultvalue is dual.–sampling INTERVAL: use sample profiling with INTERVAL microsecondsbetween samples.–streaming: stream the profiling output to the specified file.profile stop [–user <USER_ID> current]Stop profiler on a process. The given argumentmay be either a process name or pid. Options are:–user <USER_ID> | current: When supplying a process name,specify user of process to profile; uses current user if notspecified.dumpheap [–user <USER_ID> current] [-n] [-g]Dump the heap of a process. The given argument maybe either a process name or pid. Options are:-n: dump native heap instead of managed heap-g: force GC before dumping the heap–user <USER_ID> | current: When supplying a process name,specify user of process to dump; uses current user if not specified.set-debug-app [-w] [–persistent]Set application to debug. Options are:-w: wait for debugger when application starts–persistent: retain this valueclear-debug-appClear the previously set-debug-app.set-watch-heapStart monitoring pss size of , if it is at orabove then a heap dump is collected for the user to report.clear-watch-heapClear the previously set-watch-heap.clear-exit-info [–user <USER_ID> | all | current] [package]Clear the process exit-info for given packagebug-report [–progress | --telephony]Request bug report generation; will launch a notificationwhen done to select where it should be delivered. Options are:–progress: will launch a notification right away to show its progress.–telephony: will dump only telephony sections.fgs-notification-rate-limit {enable | disable}Enable/disable rate limit on FGS notification deferral policy.force-stop [–user <USER_ID> | all | current]Completely stop the given application package.stop-app [–user <USER_ID> | all | current]Stop an app and all of its services. Unlike force-stop this doesnot cancel the app’s scheduled alarms and jobs.crash [–user <USER_ID>] <PACKAGE|PID>Induce a VM crash in the specified package or processkill [–user <USER_ID> | all | current]Kill all background processes associated with the given application.kill-allKill all processes that are safe to kill (cached, etc).make-uid-idle [–user <USER_ID> | all | current]If the given application’s uid is in the background and waiting tobecome idle (not allowing background services), do that now.set-deterministic-uid-idle [–user <USER_ID> | all | current] <true|false>If true, sets the timing of making UIDs idle consistent anddeterministic. If false, the timing will be variable depending onother activity on the device. The default is false.monitor [–gdb ] [-p ] [-s] [-c] [-k]Start monitoring for crashes or ANRs.–gdb: start gdbserv on the given port at crash/ANR-p: only show events related to a specific process / package-s: simple mode, only show a summary line for each event-c: assume the input is always [c]ontinue-k: assume the input is always [k]ill-c and -k are mutually exclusive.watch-uids [–oom ] [–mask ]Start watching for and reporting uid state changes.–oom: specify a uid for which to report detailed change messages.–mask: Specify PROCESS_CAPABILITY_XXX mask to report.By default, it only reports FOREGROUND_LOCATION (1)FOREGROUND_CAMERA (2), FOREGROUND_MICROPHONE (4)and NETWORK (8). New capabilities added on or afterAndroid UDC will not be reported by default.hang [–allow-restart]Hang the system.–allow-restart: allow watchdog to perform normal system restartrestartRestart the user-space system.idle-maintenancePerform idle maintenance now.screen-compat [on|off]Control screen compatibility mode of .package-importancePrint current importance of .to-uri [INTENT]Print the given Intent specification as a URI.to-intent-uri [INTENT]Print the given Intent specification as an intent: URI.to-app-uri [INTENT]Print the given Intent specification as an android-app: URI.switch-user <USER_ID>Switch to put USER_ID in the foreground, startingexecution of that user if it is currently stopped.By default, waits for completion for a short period of time.-w: wait for switch-user to complete using the default timeout.–dont-wait: don’t wait for switch-user to complete.get-current-userReturns id of the current foreground user.start-user [-w] [–display DISPLAY_ID] <USER_ID>Start USER_ID in background if it is currently stopped;use switch-user if you want to start the user in foreground.-w: wait for start-user to complete and the user to be unlocked.–display <DISPLAY_ID>: starts the user visible in that display, which allows the user to launch activities on it.(not supported on all devices; typically only on automotive builds where the vehicle has passenger displays)unlock-user <USER_ID>Unlock the given user. This will only work if the user doesn’thave an LSKF (PIN/pattern/password).stop-user [-w] [-f] <USER_ID>Stop execution of USER_ID, not allowing it to run anycode until a later explicit start or switch to it.-w: wait for stop-user to complete.-f: force stop even if there are related users that cannot be stopped.is-user-stopped <USER_ID>Returns whether <USER_ID> has been stopped or not.get-started-user-state <USER_ID>Gets the current state of the given started user.track-associationsEnable association tracking.untrack-associationsDisable and clear association tracking.get-uid-stateGets the process state of an app given its .attach-agentAttach an agent to the specified , which may be either a process name or a PID.get-config [–days N] [–device] [–proto] [–display <DISPLAY_ID>]Retrieve the configuration and any recent configurations of the device.–days: also return last N days of configurations that have been seen.–device: also output global device configuration info.–proto: return result as a proto; does not include --days info.–display: Specify for which display to run the command; if notspecified then run for the default display.supports-multiwindowReturns true if the device supports multiwindow.supports-split-screen-multi-windowReturns true if the device supports split screen multiwindow.suppress-resize-config-changes <true|false>Suppresses configuration changes due to user resizing an activity/task.set-inactive [–user <USER_ID>] true|falseSets the inactive state of an app.get-inactive [–user <USER_ID>]Returns the inactive state of an app.set-standby-bucket [–user <USER_ID>] active|working_set|frequent|rare|restrictedPuts an app in the standby bucket.get-standby-bucket [–user <USER_ID>]Returns the standby bucket of an app.send-trim-memory [–user <USER_ID>][HIDDEN|RUNNING_MODERATE|BACKGROUND|RUNNING_LOW|MODERATE|RUNNING_CRITICAL|COMPLETE]Send a memory trim event to a . May also supply a raw trim int level.display [COMMAND] […]: sub-commands for operating on displays.move-stack <STACK_ID> <DISPLAY_ID>Move <STACK_ID> from its current display to <DISPLAY_ID>.stack [COMMAND] […]: sub-commands for operating on activity stacks.move-task <TASK_ID> <STACK_ID> [true|false]Move <TASK_ID> from its current stack to the top (true) orbottom (false) of <STACK_ID>.listList all of the activity stacks and their sizes.info <WINDOWING_MODE> <ACTIVITY_TYPE>Display the information about activity stack in <WINDOWING_MODE> and <ACTIVITY_TYPE>.remove <STACK_ID>Remove stack <STACK_ID>.task [COMMAND] […]: sub-commands for operating on activity tasks.lock <TASK_ID>Bring <TASK_ID> to the front and don’t allow other tasks to run.lock stopEnd the current task lock.resizeable <TASK_ID> [0|1|2|3]Change resizeable mode of <TASK_ID> to one of the following:0: unresizeable1: crop_windows2: resizeable3: resizeable_and_pipableresize <TASK_ID> <LEFT,TOP,RIGHT,BOTTOM>Makes sure <TASK_ID> is in a stack with the specified bounds.Forces the task to be resizeable and creates a stack if no existing stackhas the specified bounds.update-appinfo <USER_ID> <PACKAGE_NAME> [<PACKAGE_NAME>…]Update the ApplicationInfo objects of the listed packages for <USER_ID>without restarting any processes.writeWrite all pending state to storage.compat [COMMAND] […]: sub-commands for toggling app-compat changes.enable|disable [–no-kill] <CHANGE_ID|CHANGE_NAME> <PACKAGE_NAME>Toggles a change either by id or by name for <PACKAGE_NAME>.It kills <PACKAGE_NAME> (to allow the toggle to take effect) unless --no-kill is provided.reset <CHANGE_ID|CHANGE_NAME> <PACKAGE_NAME>Toggles a change either by id or by name for <PACKAGE_NAME>.It kills <PACKAGE_NAME> (to allow the toggle to take effect).enable-all|disable-all <PACKAGE_NAME>Toggles all changes that are gated by .reset-all [–no-kill] <PACKAGE_NAME>Removes all existing overrides for all changes for<PACKAGE_NAME> (back to default behaviour).It kills <PACKAGE_NAME> (to allow the toggle to take effect) unless --no-kill is provided.memory-factor [command] […]: sub-commands for overriding memory pressure factorset <NORMAL|MODERATE|LOW|CRITICAL>Overrides memory pressure factor. May also supply a raw int levelshowShows the existing memory pressure factorresetRemoves existing override for memory pressure factorservice-restart-backoff […]: sub-commands to toggle service restart backoff policy.enable|disable <PACKAGE_NAME>Toggles the restart backoff policy on/off for <PACKAGE_NAME>.show <PACKAGE_NAME>Shows the restart backoff policy state for <PACKAGE_NAME>.get-isolated-pidsGet the PIDs of isolated processes with packages in thisset-stop-user-on-switch [true|false]Sets whether the current user (and its profiles) should be stopped when switching to a different user.Without arguments, it resets to the value defined by platform.set-bg-abusive-uids [uid=percentage][,uid=percentage…]Force setting the battery usage of the given UID.set-bg-restriction-level [–user <USER_ID>] unrestricted|exempted|adaptive_bucket|restricted_bucket|background_restricted|hibernationSet an app’s background restriction level which in turn map to a app standby bucket.get-bg-restriction-level [–user <USER_ID>]Get an app’s background restriction level.list-displays-for-starting-usersLists the id of displays that can be used to start users on background.set-foreground-service-delegate [–user <USER_ID>] start|stopStart/stop an app’s foreground service delegate.set-ignore-delivery-group-policyStart ignoring delivery group policy set for a broadcast actionclear-ignore-delivery-group-policyStop ignoring delivery group policy set for a broadcast actioncapabilities [–protobuf]Output am supported features (text format). Options are:–protobuf: format output using protobufferMetaActivityManagerInternal commands:meta set-perception PROCESS_NAME USER_ID PERCEPTION_LEVELSet the perception level for the specified process/uid.PERCEPTION_LEVEL must be >= 0 and <= 5.
specifications include these flags and arguments:[-a ] [-d <DATA_URI>] [-t <MIME_TYPE>] [-i ][-c [-c ] …][-n <COMPONENT_NAME>][-e|–es <EXTRA_KEY> <EXTRA_STRING_VALUE> …][–esn <EXTRA_KEY> …][–ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> …][–ei <EXTRA_KEY> <EXTRA_INT_VALUE> …][–el <EXTRA_KEY> <EXTRA_LONG_VALUE> …][–ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> …][–ed <EXTRA_KEY> <EXTRA_DOUBLE_VALUE> …][–eu <EXTRA_KEY> <EXTRA_URI_VALUE> …][–ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>][–eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE…]](multiple extras passed as Integer)[–eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE…]](multiple extras passed as List)[–ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE…]](multiple extras passed as Long)[–elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE…]](multiple extras passed as List)[–efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE…]](multiple extras passed as Float)[–efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE…]](multiple extras passed as List)[–eda <EXTRA_KEY> <EXTRA_DOUBLE_VALUE>[,<EXTRA_DOUBLE_VALUE…]](multiple extras passed as Double)[–edal <EXTRA_KEY> <EXTRA_DOUBLE_VALUE>[,<EXTRA_DOUBLE_VALUE…]](multiple extras passed as List)[–esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE…]](multiple extras passed as String; to embed a comma into a string,escape it using “,”)[–esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE…]](multiple extras passed as List; to embed a comma into a string,escape it using “,”)[-f ][–grant-read-uri-permission] [–grant-write-uri-permission][–grant-persistable-uri-permission] [–grant-prefix-uri-permission][–debug-log-resolution] [–exclude-stopped-packages][–include-stopped-packages][–activity-brought-to-front] [–activity-clear-top][–activity-clear-when-task-reset] [–activity-exclude-from-recents][–activity-launched-from-history] [–activity-multiple-task][–activity-no-animation] [–activity-no-history][–activity-no-user-action] [–activity-previous-is-top][–activity-reorder-to-front] [–activity-reset-task-if-needed][–activity-single-top] [–activity-clear-task][–activity-task-on-home] [–activity-match-external][–receiver-registered-only] [–receiver-replace-pending][–receiver-foreground] [–receiver-no-abort][–receiver-include-background][–selector][ | | ]
Error: Invalid userId -2
C:\platform-tools>adb shell am instrument -w -e account_name “Oculus” -e account_type “com.oculus” com.android.shell/.RemoveAccountINSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.android.shell/com.android.shell.RemoveAccount}INSTRUMENTATION_STATUS: id=ActivityManagerServiceandroid.util.AndroidException: INSTRUMENTATION_FAILED: com.android.shell/com.android.shell.RemoveAccountINSTRUMENTATION_STATUS_CODE: -1at com.android.commands.am.Instrument.run(Instrument.java:535)at com.android.commands.am.Am.runInstrument(Am.java:208)at com.android.commands.am.Am.onRun(Am.java:85)at com.android.internal.os.BaseCommand.run(BaseCommand.java:62)at com.android.commands.am.Am.main(Am.java:54)at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
C:\platform-tools>adb shell pm disable-user --user 0 com.oculus.horizon
Exception occurred while executing ‘disable-user’:java.lang.SecurityException: Cannot disable a protected package: com.oculus.horizonat com.android.server.pm.PackageManagerService.setEnabledSettings(PackageManagerService.java:3938)at com.android.server.pm.PackageManagerService.-$$Nest$msetEnabledSettings(PackageManagerService.java:0)at com.android.server.pm.PackageManagerService$IPackageManagerImpl.setApplicationEnabledSetting(PackageManagerService.java:5778)at com.android.server.pm.PackageManagerShellCommand.runSetEnabledSetting(PackageManagerShellCommand.java:2528)at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:274)at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)at android.os.ShellCommand.exec(ShellCommand.java:40)at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6419)at android.os.Binder.shellCommand(Binder.java:1093)at android.os.Binder.onTransact(Binder.java:913)at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4367)at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6403)at android.os.Binder.execTransactInternal(Binder.java:1369)at android.os.Binder.execTransact(Binder.java:1300)
The commands didn’t help me.
@ars18 @TripleU Do you know Unity? Because I built an app that would fit the tour I want to build and in the latest version I had some bug that I can’t identify because the AI went wrong.
Never used it. Looks cool
1 Like
יש מצב אתה עובר למייל?
You want to email me?
1 Like
שלחתי באתר שלך
1 Like