Okay so I have just been informed Android has a function called "isUserAMonkey()".
Conversation
It returns true when the app is being operated by a "monkey" script that clicks buttons at random
This is a common QA term but what's odd, if you think about it is on Android it returns the opposite of truth
Literally speaking it's only true when a monkey is *not* using the app
3
60
. suggested they could disambiguate with separate "isUserAMonkey()" and "isUserAnApe()" functions
Possibly implement one in terms of the other
bool isUserAMonkey() { return !isUserAnApe(); }
3
29
developer.android.com/studio/test/mo is the monkey. It's actually a pretty smart fuzzer and if you use testing channels on the Play Store (or upload to Firebase manually) they run it against your app on a bunch of devices, check for crashes, jank, etc. and let you see the videos. It's neat.
1
8
It amuses me that it pretty much always submits attestation samples from each device they test on via the Submit sample data button in the menu for github.com/GrapheneOS/Aud. Beyond that it just gets stuck trying to scan a QR code from a virtual camera with no QR code visible.
There's also isUserAGoat in developer.android.com/reference/andr.
Sadly can't detect if the user is a goat anymore due to Android 11 privacy improvements. Not joking by the way. It would have required the QUERY_ALL_PACKAGES permission which they want to be limited in use.
1
6
27
There's also DISALLOW_FUN there as one of the user restrictions. Most of those are only exposed in AOSP via device policy managers set as device or profile owners.
May be less a joke and more them making fun of companies which wanted to disable the Android version easter egg.
1
4
16
Show replies

