Commit Graph

194 Commits

Author SHA1 Message Date
Michael Wright
665cd457bb Update wakeUp signature.
Bug: 122949636
Test: N/A
Change-Id: I14c2962451a2f4f5e959e52fc0e2df3ac1e8d1b4
2019-02-05 00:18:36 +00:00
Nicholas Sauer
fed1b54c14 Update Monkey to lookup the current user so that it can execute against secondary users.
bug: 118503943
Test: cts-tradefed run cts-dev -a arm64-v8a -m CtsMonkeyTestCases -t com.android.cts.monkey.MonkeyTest#testIsMonkey
Change-Id: Id7d320fddfbf91d4451a4e141a91614ee9104dec
2018-11-09 04:28:01 +00:00
Netta Peterbursky
3119eaac6a Fix monkey when it encounters a tombstone.
* Sleep until file is done writing. Meanwhile appCrashed() should be called.

Bug: 68762010
Test: Run monkey + call "killall -SIGSEGV com.google.android.inputmethod.latin" in adb shell (repeated many times)
Change-Id: I4c8bd5d653fc195878275e291d927f2d87814858
2018-01-02 14:38:57 -08:00
Netta Peterbursky
7dcd1ea28a Print out CRASH info when monkey encounters tombstone.
Bug: 68762010
Test: Run monkey + manually add tombstone
Change-Id: I8c819ad42d1dd09b98a575a8a761041dded3d7ba
2017-12-19 14:29:47 -08:00
Netta Peterbursky
d46f37edbc Fix NullPointerException in Monkey.
Change-Id: Ibfeb2e68826d8aff748a02cd8bd1c3c3991f9127
Fixes: b/65113577
Test: adb shell monkey -p com.android.calculator2 -p com.android.launcher -p com.google.android.launcher -p com.android.mms -p com.android.phone -p com.google.android.dialer -p com.android.providers.downloads.ui -p com.android.settings -p com.google.android.gms -p com.google.android.setupwizard -p com.google.android.packageinstaller -p com.google.android.apps.nexuslauncher -c android.intent.category.LAUNCHER --ignore-security-exceptions --monitor-native-crashes -s 19 -v -v -v 125000
2017-08-29 10:20:02 -07:00
Netta Peterbursky
45d91a062c Change Monkey to allow launching home even if gsa is disabled.
Bug: 38121026
Test: adb shell monkey -p com.android.calculator2 -p com.android.launcher -p com.google.android.launcher -p com.android.mms -p com.android.phone -p com.google.android.dialer -p com.android.providers.downloads.ui -p com.android.settings -p com.google.android.gms -p com.google.android.setupwizard -p com.google.android.packageinstaller -p com.google.android.apps.nexuslauncher -c android.intent.category.LAUNCHER --ignore-security-exceptions --monitor-native-crashes -s 19 -v -v -v 125000
Change-Id: Ie4e0966249e8e63e0c66d40ad0e13d7046edf56a
2017-08-23 15:06:11 -07:00
Svet Ganov
22ab37903c Fix usage of a changed IPC API am: 4c9e483779
am: 4f8582184b

Change-Id: I6c560b8dc3766f4b1d2845b19f3ac526a811431d
2017-07-28 16:58:20 +00:00
Svet Ganov
4c9e483779 Fix usage of a changed IPC API
Test: builds successfully

bug:62755026

Change-Id: Icf4b8640a2d673b819a41bfa9e0d7f0190064ccd
2017-07-28 05:52:18 +00:00
Narayan Kamath
ac9cc7d5b4 Monkey: Dump the most recent ANR trace.
Don't assume a single global trace file. /data/anr might contain
multiple files - always dump the most recent.

Test: Manual
Bug: 32064548
Change-Id: Ib24e7364cac9e3fd105dafb40d6e399d46759770
2017-06-22 18:30:03 +01:00
Chad Brubaker
91e0bb6afd Track registerReceiver changes
Test: see fw CL
Change-Id: I063aa7ac218d25aabdce845451ec48ed8d7a4ed4
2017-04-18 11:26:24 -07:00
Netta P
af27957ba5 Handle RuntimeException in monkey
Bug: 36099611
Test: "adb shell am restart" in the middle of the monkey run
Change-Id: I589885a0f47a0ec66d8c3562946ece27e4729fb0
2017-03-15 14:01:34 -07:00
Chad Brubaker
c849856eb9 Merge "Track visibleToInstantApp changes" 2017-03-13 20:52:11 +00:00
Phil Weaver
3c726ef47a Adjust use of hidden API which I'm changing.
The runner is using internal constants from accessibility.
I'm moving window IDs to AccessibilityWindowInfo, so this
project needs to change as well.

Bug: 34773134
Test: Just verifying the build.
Change-Id: I64fa4ff63543deadb7aa32b3e93d3dad1d6b9439
2017-03-07 12:12:05 -08:00
Chad Brubaker
d44ea7ad94 Track visibleToInstantApp changes
Test: see fw CL
Change-Id: Iad76e87ad391b31a3226f067de4a7413a315ef84
2017-03-02 12:33:12 -08:00
Phil Weaver
02ba80e43e Adjust use of accessibility aidl
Bug: 30170631
Test: One-line change to build with larger, tested, change
Change-Id: Ia784f2f657bc55b080bdcf752477946473b6499a
2017-02-03 15:08:31 -08:00
Dianne Hackborn
8a416b3033 API demo for notification that starts a background service.
Test: not relevant

Change-Id: I9ad6640dccded3be0baf879a6694f9535144d80c
2017-01-23 14:20:03 -08:00
Joe Onorato
9b433529b9 Send monkey logs to logcat as well.
Change-Id: I14ec175afb963a4d3c3b790c25e4bebb3b25a4dc
2016-12-07 17:05:59 -08:00
Joe Onorato
a56875b997 Add --match-description to Monkey
Which lets it ignore monkey errors that don't match the pattern you supply

Change-Id: I69e8b02e7172223e7313d0fbd87af395d2d4f0a2
2016-12-07 17:03:14 -08:00
Sudheer Shanka
5b6205978e Update usage of ActivityManagerNative.
Bug: 30977067
Test: N/A
Change-Id: If76488d9e7b1a33f7f5c9d65eb9254d126ef02b6
2016-11-11 15:01:34 -08:00
Eric Rowe
daa527a39b Monkey: print tombstone names when they're found
Bug: 32247044
Test: adb shell monkey -p com.google.android.calculator -c
android.intent.category.LAUNCHER --ignore-security-exceptions
--monitor-native-crashes -s 27 -v -v -v 1000 & (sleep 2; adb shell "echo
abc > /data/tombstones/tombstone_00")

Change-Id: Ie5a444673d0577da360de1e911fcd8322ca8503d
2016-10-21 15:40:02 -07:00
songjinshi
86190d02f2 Merge \"Fixes the system server hang forever issue caused by the monkey not read completed the sync pipe.\"
am: e85e33cfd7

Change-Id: Ic3a4d45b844cb8661b4287bdac26c65d6281ad17
2016-07-06 17:50:07 +00:00
songjinshi
f032537cea Fixes the system server hang forever issue caused by
the monkey not read completed the sync pipe.

- Incorrect exception handle.

When no space left on the device the write will
occurs an I/O exception, so we needed to catch it
and continue to read the data of the sync pipe to
aviod the bugreport hang forever.

https://code.google.com/p/android/issues/detail?id=211970

Change-Id: I80c6548434587bcc17b50f0c246a5887cdd339cf
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2016-06-30 00:55:45 +00:00
Dan Willemsen
15348ea4aa Merge "Replace custom rules, remove ACP"
am: a279b12

* commit 'a279b12905f31231a8f3c36c52abcd1224449c1a':
  Replace custom rules, remove ACP
2016-03-23 22:02:06 +00:00
Dan Willemsen
f230a38299 Replace custom rules, remove ACP
A few LOCAL_ADDITIONAL_DEPENDENCIES were required, where
LOCAL_REQUIRED_MODULES would be nicer, but you can't require a module of
the same name. It would create a dependency loop with the current
require implementation, so it's filtered by the build system.

Also translate monkey from ALL_PREBUILTS to a prebuilt like the rest of
the tools. This doesn't change anything, since 'monkey' is already in
build/target/product/base.mk.

ACP is being removed, so use the standard build system macros to copy
files.

Change-Id: I4f73c6b35c0d7ae25467145b0a9d5c32ba4578d2
2016-03-23 13:22:38 -07:00
Jeff Sharkey
ff1a33d591 Follow framework refactoring.
Bug: 27391893
Change-Id: Ia56279a5fb3c1e65ee9e70615e71045cba2c0348
2016-03-04 16:28:00 -07:00
Dianne Hackborn
952cb1f15a Fix issue #27385109: control activity behavior without triggering...
...isUserAMonkey for testing purpose

Change-Id: If261bc860d3974796ec382dcd5f625d40ab093a5
2016-02-29 15:15:05 -08:00
Michael Wright
6be53d1e30 Blacklist KEYCODE_SOFT_SLEEP from random key generation
Change-Id: Ibaddfa0cc6f6bee24f27f919c7cf4b1fa38a331b
2015-09-16 23:42:40 +00:00
Dianne Hackborn
d574af02c8 Track reason for screen turning on.
Change-Id: I1ab64b6d29d7e2c6f9006587d41a318289f13227
2015-07-15 10:08:36 -07:00
Guang Zhu
973ecb6108 fix slotting of permission category
Per convention, event categories that are not key events should
be inserted before the block of key event categories.

Change-Id: I2cbe4a34231462dbdee1f8b97270fdd0b3354690
2015-06-23 11:25:56 -07:00
Guang Zhu
403be1157f teach monkey to flip permissions on apps
1. added a new MonkeyEvent type for permission events
2. added monkey permission utility for randomized permission
   events generation against targeted packages
3. refactored package whitelist/blacklist into MonkeyUtils class

Change-Id: I8f7998d74c3e28d02f5bcd47a0f9cc6167b93c93
2015-06-21 12:32:22 -07:00
Jeff Hao
016fc167ac Update call to IActivityManager.startActivity.
Multi-project change to go with
https://googleplex-android-review.git.corp.google.com/529286

Bug: 17040932
Change-Id: I7fa018213acd71bc0f63c97399a1676bbde61d44
2014-08-26 09:59:36 -07:00
Narayan Kamath
01347d965e am 361fce55: am d9fb901d: am 479cf9ff: Merge "Track changes to IActivityManager.startInstrumentation."
* commit '361fce55866e220380fdf1c81f29e5498b5fa0a7':
  Track changes to IActivityManager.startInstrumentation.
2014-05-30 11:50:55 +00:00
Narayan Kamath
fc9e3f6878 Track changes to IActivityManager.startInstrumentation.
Change-Id: Iceaecb720c2824134a1d6d13b1f3e0a16d41d76d
2014-05-30 11:33:02 +01:00
Michael Wright
26b91ca81c Add logging for failed injections to Monkey.
Bug: 13679803
Change-Id: Iefb0073ad892b15b734b739fe036262ea60066d2
2014-04-01 00:05:37 +00:00
Guang Zhu
644b822218 blacklist KEYCODE_SLEEP in random key generation
Bug: 13583213
Change-Id: Ic0fa933440acb27a0636b2db83be08695e9df0db
2014-03-21 12:16:05 -07:00
Ying Wang
695f66a7d4 Merge "Revert "Monkey support for swipes from the sides of a device."" 2013-06-11 16:45:35 +00:00
Ying Wang
056d0a598a Revert "Monkey support for swipes from the sides of a device."
This reverts commit 47937eb6b2

Change-Id: I788739c7a70132afb1f1ca13b71fff7d89ad200f
2013-06-11 16:39:09 +00:00
Svetoslav
e37f81e5a4 Optimizing AccessibilityNodeInfo caching (Monkey).
Update monkey due to an API change.

Main change:https://googleplex-android-review.googlesource.com/#/c/316822

Change-Id: Ib945c5e977925775569f2bbd78be9c7a66267480
2013-06-04 18:27:17 -07:00
Ying Wang
47937eb6b2 Monkey support for swipes from the sides of a device.
Bug: 8446772
Change-Id: I875f7bd083e275cce877e2168b5f580dd1d03dcd
2013-05-14 11:10:13 -07:00
Dianne Hackborn
cb8739c53f Debugging help for issue #8734824: WATCHDOG KILLING SYSTEM PROCESS
The monkey now gets told about system hangs, and does stuff about
it!  Most especially, it can collect a bug report.  Monkey wins!

Change-Id: Ic8350721e715ef21d1ec813c6aff9a83262d5faa
2013-05-06 11:16:34 -07:00
Dianne Hackborn
6b16feb5a0 Update to follow activity manager protocol change.
Change-Id: Iee6382c8ed35e296fe27a8fdb69e97dd8b455cc9
2013-01-31 15:17:38 -08:00
Svetoslav Ganov
00fc93c6fe Refactoring due to removing some private APIs.
Change-Id: Id00d9fa974d8cb747cebb99c5a64ed5b438b56e9
2013-01-23 00:20:07 +00:00
Brian Muramatsu
c200e94ff5 am ab8b25ff: am 03c58239: am c6fbad00: Merge "Make all monkeys do the same thing" into jb-mr1-dev
* commit 'ab8b25ff8ec856f490f5bbb95240c8fc0d24ba43':
  Make all monkeys do the same thing
2012-10-09 19:18:57 -07:00
Kenny Root
3cbf850ab6 Make all monkeys do the same thing
Monkeys were using SecureRandom, but what it really wanted was an LCRNG
that allowed it to reproduce the same output with seeds. This change
allows the monkeys to shine.

Bug: 6950454
Change-Id: Iabf0fc5e7d50b786fa32b946e85de797220ff569
2012-10-09 13:57:13 -07:00
Yu Shan Emily Lau
90bbdd2e1b am 0c8fe324: am 1e1926db: Merge "For the recent SD card access change. The non-zogyte process need to use the Environment#getLegacyExternalStorage to access the sdcard." into jb-mr1-dev
* commit '0c8fe324e579842cb04818a96016ef7b929e625a':
  For the recent SD card access change. The non-zogyte process need to use the Environment#getLegacyExternalStorage to access the sdcard.
2012-09-24 00:51:37 -07:00
Yu Shan Emily Lau
b894c71af8 For the recent SD card access change.
The non-zogyte process need to use the
Environment#getLegacyExternalStorage to access the sdcard.

Change-Id: I797d235954defe25e1bd8728f167250e4f9d0fe9
2012-09-21 16:20:12 -07:00
Dianne Hackborn
6764197565 am 6852ac74: am 077c59a0: Track multi-user change.
* commit '6852ac7430cdf909a223e6ba9d9ec9b9ca22e46a':
  Track multi-user change.
2012-09-10 17:06:25 -07:00
Dianne Hackborn
077c59a0b9 Track multi-user change.
Change-Id: I0b45ec880f6149fba5d2d83c014e1e71a6524b99
2012-09-07 13:08:27 -07:00
Dianne Hackborn
70d53bb0cc am a80e74b7: am dbb1e6af: Fix some more.
* commit 'a80e74b710e3bc262395c7dbbfa3a82eb189ceb1':
  Fix some more.
2012-09-04 11:27:30 -07:00
Dianne Hackborn
dbb1e6af7f Fix some more.
Change-Id: Ieeba0ba87f65eed25f3a0f23924fc99b90cc1d69
2012-09-04 11:20:29 -07:00