0

I want to remove some features from my settings app (device is rooted)

I used adb shell pm disable 'com.android.settings/.Settings\$SecuritySettingsActivity' to disable security settings and it worked. However, I am unable to find the activity name to disable backup and factory reset option.

Here is the AndroidManifest.xml of the settings.apk (I'm using LineageOS)

So far I have tried

adb shell pm disable 'com.android.settings/.BackupSettingsActivity'

and

adb shell pm disable 'com.android.settings/.Settings\$PrivacySettingsActivity'

Both of which did absolutely nothing. I am still able to open backup and reset option from settings.

When I try to launch the said activities

adb shell am start -n com.android.settings/.BackupSettingsActivity

It errors out at saying BAD COMPONENT

while these two commands open the back and reset activity that I want to disable

adb shell am start -a android.settings.BACKUP_AND_RESET_SETTINGS

adb shell am start -S 'com.android.settings/.Settings\$PrivacySettingsActivity'

marked as duplicate by Firelord Apr 13 at 10:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

The name of the activity was SubSettings (how intuitive!)

adb shell pm disable 'com.android.settings/com.android.settings.SubSettings'

You can find the name of any activity that's onscreen. Use

adb shell dumpsys window windows | grep 'mCurrentFocus'

  • 'com.android.settings/com.android.settings.SubSettings' seems to be various sections within settings, not just the Backup and Restore section. After disabling that, i am no longer able to change the PIN, for example. – Eric H Nov 23 '18 at 2:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.