I am trying to understand the use of the following command:
adb shell pm disable <PACKAGE_OR_COMPONENT>
For example: I have a test app with package name 'com.example.com.testapp' and it has an activity called 'TestActivity'.
I ran the following from my terminal :
./adb shell pm disable com.example.com.testapp/TestActivity
From the name of the command, I thought it would disable the activity from launching, but I can launch it fine via adb as follows:
./adb shell am start -n com.example.com.testapp/.TestActivity
So what does this command disable then ?
I found the problem. It has nothing to do whether device is rooted or not.
I command had a missing dot. It should be :
./adb shell pm disable com.example.com.testapp/.TestActivity
Now if I try to launch the component, it's blocked (the app stops working).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With