summaryrefslogtreecommitdiff
path: root/cmds
AgeCommit message (Collapse)Author
2025-03-21Merge "Revert "app_process: += libutilscallstack"" into main Treehugger Robot
2025-03-20Revert "app_process: += libutilscallstack" ELIYAZ MOMIN (xWF)
This reverts commit f9502857fb45f381070bc2f4c39b1c8772590ece. Reason for revert: Droidmonitor created revert due to Jank regression b/403831347. Change-Id: I577966b2683d55a217e89db3b3d38b2f17f47492
2025-03-19uinput: fix end-of-file handling Harry Cutts
Change I69c2cb651cd871ea0ceea9702c66b76abb37285a inadvertently broke evemu playback from a file, because when getNextEvent() called CommentAwareReader#isAtEndOfFile(), CommentAwareReader#findNextLine() hadn't been called, so it hadn't realized it was at the end of the file. That meant expectLine() failed because acceptLine() returned null. This wasn't caught because when used in "interactive mode" (e.g. with a test passing one line at a time and checking the injections), the parsing exception only occurred at the end, by which time all events had been injected. When passing a whole recording at once (either by setting the command-line parameter or piping a file into standard input), the parsing error occurred before any of the scheduled event injections. The unit tests for EvemuParser didn't check the behaviour of getNextEvent() at the end of the recording, something which this change also fixes. Test: $ adb shell uinput - < some-recording.evemu Test: $ adb shell uinput /sdcard/some-recording.evemu Test: make an evemu recording with only an 'N:' line and check the special EOF parsing error message shows up Test: $ atest --host UinputTestsRavenwood Test: $ atest \ InputTests:com.android.test.input.UinputRecordingIntegrationTests Bug: 367419268 Flag: TEST_ONLY Change-Id: I1f0e185cf42b3d57b0b384718ffeeb78d99248c5
2025-03-18Merge "uinput: don't read next line of evemu recording until peek" into main Harry Cutts
2025-03-14Merge "incidentd: filter more unnecessary sections from bugreports" into ↵ Yao Chen
main am: a925685baa am: b5d8d4df99 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3544559 Change-Id: Ief02270d8d9cd79941644159e07f5fb40ed741a1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-03-14incidentd: filter more unnecessary sections from bugreports Yao Chen
This change includes the following updates: * filter out dumpsys last x logs section * filter out all dumpsys sections except for odpm Test: adb bugreport Bug: 382611507 Change-Id: Ie423d6140faa012ff3d230fc441d67c2959863fe
2025-03-14Merge "app_process: += libutilscallstack" into main Treehugger Robot
2025-03-14uinput: don't read next line of evemu recording until peek Harry Cutts
When EvemuParser "accepts" a line of an evemu recording (i.e. it's found the line type it was expecting and is ready to process it), it calls CommentAwareReader#advance() before processing the current line. advance() was reading the next line of the file, ready for peeking, even though the current line hadn't been processed yet. When playing from standard input, this meant that a line wouldn't be executed until the next one was written, requiring a no-op line to be added to the end of event recordings. To fix this, only load the next line when peekLine() is called after the advance(). Test: $ atest --host UinputTestsRavenwood Test: $ atest InputTests:com.android.test.input.UinputRecordingIntegrationTests Bug: 367419268 Flag: TEST_ONLY Change-Id: I69c2cb651cd871ea0ceea9702c66b76abb37285a
2025-03-13app_process: += libutilscallstack Steven Moreland
app oneway spam notification showing like this: 10-18 13:10:34.022167 10290 30064 30094 W IPCThreadState: CallStack::getCurrentInternal not linked, returning null 10-18 13:10:34.022253 10290 30064 30094 W oneway spamming: CallStack::logStackInternal not linked If we add libutilscallstack into app process, we should be able to see the callstack of the oneway call offendors. Bug: 374362340 Test: N/A Change-Id: Id16fbce63617add50a4b50a37ac276d0413f16b7
2025-03-07Merge "Log cancellation reason for full backups to BMM" into main Sarp Misoglu
2025-03-07Log cancellation reason for full backups to BMM Sarp Misoglu
Currently it's not possible to know from these logs if the backup was cancelled due to timeout or the app crashing or due to backups being explicitly cancelled by an external caller. This CL fixes that issue. Flag: EXEMPT log only update Test: manual // PFTBT is notoriously impossible to write unit tests for. Bug: 399645990 Change-Id: Ia18fdec1d9547130926bf62666ac055e320fb0b6
2025-03-06Merge "UsbCommand: Print error and bail when failing to get USB service" ↵ Andrei Ciubotariu
into main
2025-03-05Don't cancel the entire backup if agent disconnects and log if the agent ↵ Sarp Misoglu
pipe is broken Normally the bug fix and the extra logging should be in separate CLs. However as explained in the linked bug, there is a race condition between the method throwing the IOException returning and us getting a cancellation callback from ActivityManager. If we get the callback first, the session fails. The extra IPC from the logging in handling the exception means the callback gets a few additional milliseconds to win the race. So with the logging, the race condition is much more likely to happen and the logging should not be checked in without the bug fix. And if one gets rolled back, the other should as well. This is why I made them a single CL. Flag: EXEMPT bugfix Bug: 400669414 Test: manual // PFTBT is notoriously impossible to write unit tests for. Change-Id: Icbcb72a876f927a94675c9837b0206f1a631dff5
2025-03-03Merge "Harden construction sites of android::Surface." into main Anton Ivanov
2025-02-28UsbCommand: Print error and bail when failing to get USB service Andrei Ciubotariu
Bug: 373078564 Flag: EXEMPT bugfix Change-Id: Ia9eb80cec5326572b73fd11ec3c2ac7a00424519
2025-02-27Merge 25Q1 (ab/12770256) to aosp-main-future Xin Li
Bug: 385190204 Merged-In: Ibc80f09d54bec2c83814874d94a8f8eb22b5075f Change-Id: If7779ae57fd91631d08bd8af5434c2ddd963aad7
2025-02-26Harden construction sites of android::Surface. Anton Ivanov
Since this type is inteded to be managed as a StrongPointer, ensure that is always constructed as such. Bug: 393217449 Test: presubmit Flag: EXEMPT_refactor Change-Id: Ia74493743653a9e41384cfb4c384ac30bef1e907
2025-02-26Merge "[owners] Remove toddke@google.com from cmds/idmap2/OWNERS" into main ↵ Owner Cleanup Bot
am: 8ac629cca2 am: 1db90a8d73 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3507430 Change-Id: Iea92a77cb33b13f194fd2c5ff6d26c3aacb5c833 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-26Merge "[owners] Remove zhouwenjie@google.com from cmds/incidentd/OWNERS" ↵ Owner Cleanup Bot
into main am: 36154a3726 am: 6571575cf5 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3506960 Change-Id: I83061e4fe355040d9b88bf2fec0f5b23ec27f6db Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-25Merge "[owners] Remove toddke@google.com from cmds/idmap2/OWNERS" into main Owner Cleanup Bot
2025-02-24[owners] Remove zhouwenjie@google.com from cmds/incidentd/OWNERS Owner Cleanup Bot
This suggested change is automatically generated based on group memberships and affiliations. Please approve this change and vote the highest CR. This will keep the OWNERs file tidy. We ask that you do not ignore this change and approve it unless you know a reason the OWNER should remain. It can always be reverted if needed. If this change is in error, vote the lowest CR value (i.e. reject the CL) and the bot will abandon it. See the owner's recent review activity for context: https://android-review.googlesource.com/q/zhouwenjie@google.com To report an issue, file a bug in the Infra>Codereview component. Change-Id: Ic3ffbcfda5d453cf6e07ca66372bfbb66e324e51
2025-02-24[owners] Remove toddke@google.com from cmds/idmap2/OWNERS Owner Cleanup Bot
This suggested change is automatically generated based on group memberships and affiliations. Please approve this change and vote the highest CR. This will keep the OWNERs file tidy. We ask that you do not ignore this change and approve it unless you know a reason the OWNER should remain. It can always be reverted if needed. If this change is in error, vote the lowest CR value (i.e. reject the CL) and the bot will abandon it. See the owner's recent review activity for context: https://android-review.googlesource.com/q/toddke@google.com To report an issue, file a bug in the Infra>Codereview component. Change-Id: Ibc38a547c17db93fab4836fa041e94a40e6d7603
2025-02-19Filter overlays based on constraints during resource resolution Biswarup Pal
Keep AssetManager updated about displayId and deviceId changes so that it can filter resource overlays based on displayId and deviceId constraints. Test: atest libandroidfw_tests Test: atest FrameworkServicesTests Test: atest CtsResourcesTestCases Bug: 371801644 Flag: android.content.res.rro_constraints Change-Id: I6163114b62501cb5f77531443e8995a83168701b NO_IFTTT=Introduce overlay constraint type values in libandroidfw, which are already same as the ones in OverlayConstraint.java
2025-02-11Merge "Fix nfc owners location" into main am: a4df8f749c am: cde197cac4 Treehugger Robot
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3489591 Change-Id: I403f8d0c6771889b97480f6c856f8e0b10e28212 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-02-11Fix nfc owners location Roshan Pius
Bug: N/A Test: N/A Change-Id: Ia0424a3672a4d662b90ece78f1ac843705af0e97
2025-02-10Merge "am: set to top-app process group only for instrument" into main Treehugger Robot
2025-02-10Merge "uinput: add Ravenwood test target" into main Harry Cutts
2025-02-07Fixed bmgr so it supports --user cur Felipe Leme
Test: adb shell bmgr --user cur activated Test: adb shell bmgr --user current activated Fixes: 393353657 Flag: EXEMPT changes on debugging components only Change-Id: I0cb107cb7ab3fb24ecf8ce979bbd07ea7e97b4e2
2025-02-07Merge changes from topic "display_err_handling_bug_fixes" into main Manasi Navare
* changes: Use Display Events from DisplayEventType Enum class Add dispatchModeRejected exception in NativeDisplayReceiver
2025-02-07uinput: add Ravenwood test target Harry Cutts
The unit tests for the uinput command don't currently use any Android APIs, but can't be run on the host. Add a Ravenwood test target so that they can. Test: $ atest --host UinputTestsRavenwood Bug: 245989146 Flag: TEST_ONLY Change-Id: I150efac6e6d1fff83a48f0ad7d895d315fb736de
2025-02-06Merge "Add constraints for enabling RROs" into main Biswarup Pal
2025-02-06Add constraints for enabling RROs Biswarup Pal
This change introduces hidden API's for setting constraints for enabling RROs. Currently, the constraints are of the following types: 1. Display id constraint: This can be set for a RRO if the RRO is desired to be applied on only the apps running on that specific display. 2. Device id constraint: This can be set for a RRO if the RRO is desired to be applied on only the apps running on that specific device (for apps running on the default device, this would be Context#DEVICE_ID_DEFAULT, and for apps running on a virtual device, this would be the id of the virtual device). An overlay would be enabled when any of the given constraints are met. Constraints can only be set while enabling a RRO. Re-enabling a RRO with different constraints updates the constraints for the RRO. This change facilitates the writing of the constraints for RROs into the correspodning idmap files, and also persists them as part of the settings used by OverlayManagerService. The filtering of resource overlays based on constraints during resource resolution will be done in a follow-up CL. Test: atest FrameworksServicesTests Test: atest idmap2_tests Test: atest libandroidfw_tests Test: atest CtsResourcesTestCases Bug: 371801644 Flag: android.content.res.rro_constraints Change-Id: I0cad58bfb5b9b90105e2ef839c58147b9a50767c
2025-02-06Use Display Events from DisplayEventType Enum class Manasi Navare
Display Events are now defined as part of the new DisplayEventType Enum class in android namespace. Use it from there instead of DisplayEventReceiver enum. Bug: 393133868 Test: Manual Flag: com.android.graphics.surfaceflinger.flags.display_config_error_hal Change-Id: Idcd2bc3f0ab532a3e5c86e52e59367c22351b994 Signed-off-by: Manasi Navare <navaremanasi@google.com>
2025-02-05Fix shadow variable warning in screencap.cpp Anton Ivanov
In addition, apply clang-format. Test: NA Flag: EXEMPT refactoring Change-Id: Ib0b0201cb712fb1dfc1d624f4215e6404fd3860c
2025-02-03Revert^2 "Improve error message when invalid display id is passed to ↵ Anton Ivanov
screencap with -d argument." This reverts commit 5e6a24974f91f99adaf2f5671f0aefa8f60aa07d. Reason for revert: Roll forward with fix for failing test. Test: adb shell screenap; unit test. Bug: 306733214 Flag: EXEMPT bugfix Change-Id: I6b57de337f8b1278fc4452874ecc5a127b94b11a
2025-01-30Merge "Revert "Improve error message when invalid display id is passed to ↵ Pechetty Sravani (xWF)
screencap with -d argument."" into main
2025-01-30Revert "Improve error message when invalid display id is passed to screencap ↵ Pechetty Sravani (xWF)
with -d argument." This reverts commit e696b74f13875bb5c5fa388c5a198df4eb1e98b9. Reason for revert: <Droidmonitor created revert due to b/393477524.Will be verified through ABTD for standard investigation.> Change-Id: Ib5ed9640d568bbc79648118acd305f63ed2919f5
2025-01-30Merge "Improve error message when invalid display id is passed to screencap ↵ Anton Ivanov
with -d argument." into main
2025-01-30Improve error message when invalid display id is passed to screencap with -d ↵ Anton Ivanov
argument. Change-Id: Ifd38b347b64d1f6fc28f99c47adcab974e8e2467 Test: adb shell screencap -d 0 -p /tmp/test.png Bug: 306733214 Fix: 306733214 Flag: EXEMPT bugfix
2025-01-15am: set to top-app process group only for instrument Wei Wang
Bug: 379892006 Bug: 383813628 Change-Id: I6cf725f659cb1936c40665e72e5f739dea66de0e Test: Build Flag: NONE for a script change
2025-01-15Merge "Run AM as a top-app process" into main Wei Wang
2025-01-15Run AM as a top-app process Wei Wang
Bug: 379892006 Bug: 383813628 Test: Build Flag: NONE for a script change Change-Id: I2281f6f1f575016d6c4dcb85c620d8a2c9a1a2cb
2025-01-15Update documentation for uinput command's bus values Harry Cutts
The set of accepted values was massively widened in change Ie2f969da24db9aa04037335d5b697cdc0db0b3ca, but the documentation wasn't updated. Bug: 245989146 Change-Id: I7fceaddc5e70ba85c94ce4a92fb5d74e3a22093f Test: check gitiles rendering Flag: DOCS_ONLY
2024-12-07Expand gainmap screencapture: Alec Mouri
* Add gainmap support to ScreenCapture proper * Remove attachGainmap flag in screencap, since flag guarding is done entirely in SF by both the true_hdr_screenshots flag AND the seamless transition hint * Plug in PNG gainmap encoding Bug: 329465218 Flag: com.android.graphics.surfaceflinger.flags.true_hdr_screenshots Test: Trigger screencapture Change-Id: Id4fdb0c32d09f7a94a2acdf6c3cf2698861c8ec9
2024-12-02[res] Make TargetResourcesContainer valid after an error Yurii Zubrytskyi
ApkResourcesContainer class has a variant that is either a zip file object, or a full blown AssetManager with ApkAssets with the same zip file inside. But if transition from one to the other fails, it could end up in a state with neither, causing a crash if the users try accessing it. This change ensures that: 1. The zip file object is only moved into ApkAssets if the loading succeeds 2. If any part of the further initialization of ResState fails, we take the zip file out and put it back into the variant + Add unit tests for both ApkAssets and libidmap2 to ensure they don't crash in any of those scenarios (they used to) + Enable root tests in libidmap2 as they were never running Flag: EXEMPT bugfix Bug: 381108280 Test: atest libandroidfw_tests idmap2_tests + boot Change-Id: I8f4803fdf03a41ba7a6892e6aed07f04b77788ce
2024-11-20[idmap] Small cleanup in create-multiple Yurii Zubrytskyi
Test: build + idmap2_tests Flag: EXEMPT cleanup Change-Id: I949087c6b0a6ac93d56eecc5eec14df924dbf317
2024-11-19Merge "Remove interrupter." into main am: a8b10c99b0 am: 50c98c8d24 Elliott Hughes
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3362268 Change-Id: Ia7d36fbbd76b1aaa538761b904d26b68da665684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "Remove interrupter." into main am: a8b10c99b0 Elliott Hughes
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3362268 Change-Id: I1018ec507640e0423b49d4ba78b065231217e086 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "_GNU_SOURCE is public; _USE_GNU is an implementation detail." into ↵ Treehugger Robot
main am: 0b46c906bb am: 75182316a1 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3361286 Change-Id: I8e94e8daad9cbe915df8bcb20591649dbae40f44 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-11-19Merge "_GNU_SOURCE is public; _USE_GNU is an implementation detail." into ↵ Treehugger Robot
main am: 0b46c906bb Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3361286 Change-Id: I83daccaaf34502b8da4771e60a4f7b30f2c2f08b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>