You need to escape the dollar character. Otherwise, the shell would interpret anything after $ as the variable name. Since $SystemDashboardActivity
as a variable is not set, your command is effectively interpreted as:
pm disable com.android.settings/.Settings
That naturally would disable the parent (.Settings
) component.
Escape $ by prefixing it with \
so as to prevent unwanted interpretation from shell. Your command should look like this:
pm disable com.android.settings/.Settings\$SystemDashboardActivity
Tested on Android 9.0 running on OnePlus 6. Make sure to run the command as root.