0

I'm currently running a continuous monkey test to test the stability of a device, and I've noticed that when using monkey, it's able to change settings, including developer options and whatnot. Is there any way to prevent it from being launched, without limiting it to a specific package?

I've tried using chmod 600 /system/priv-app/Settings.apk, but it could still be launched, and I'm not sure where it would be installed to otherwise.

Would the best option just to be manually list out all packages in the system, and then use -p for all of them?

Thanks!

yeah568
  • 108
  • 1
  • 10

3 Answers3

0

Yes, it will as Monkey Test as the name suggests is used to create a random sequence of user touches for your app and those touches can be anything including opening other apps, what exactly are you looking for

Aniruddha K.M
  • 7,361
  • 3
  • 43
  • 52
0

It turns out there's a flag you can use to provide a text file with a list of names of packages you want to exclude (--pkg-blacklist-file path/to/blacklist.txt, and it won't launch those at all (since the monkey test launches applications via intents, not the launcher).

More info: android monkey test exclude some packages

Community
  • 1
  • 1
yeah568
  • 108
  • 1
  • 10
0

You can use

adb shell pm disable $apk

to disable a specific package in your devices.

For example, if you want to disable system setting package.

First, use:

adb shell pm list packages | grep setting

to list all the packages in your devices, and find the system settings package: com.android.settings

Then use:

adb shell pm disable com.android.settings

to disable system settings.

After test, use

adb shell pm enable com.android.settings

to enable system settings.

cover
  • 26
  • 5