Android - Can we prevent activity start through ADB Shell?

Viewed 142

I want to prevent application activity from starting through ADB shell using below command.

am start -n com.xyz.namespace/com.xyz.namespace.AbcActivity

I have tried with setting android:exported = false and setting custom permissions in AndroidManifest file, both solutions doesn't works for me.

Is there any other way to prevent activity start through ADB Shell?

1 Answers

If adb is running with root privileges no thing can stop it. Try to use command adb unroot Then try it again and you will find that it Will not work Also if the targeted activity is the main activity any application can start it because it's exported by intent filters

Related