summaryrefslogtreecommitdiff
path: root/packages/Shell/Android.bp
diff options
context:
space:
mode:
author David Anderson <dvander@google.com> 2025-01-09 04:55:28 +0000
committer David Anderson <dvander@google.com> 2025-01-31 18:44:02 +0000
commitf17b79fa6b1715d6dea68d6734f74498bcbd68f7 (patch)
treeb673d49ddf4f41b1e1562e7fba8c685b0b58201f /packages/Shell/Android.bp
parentc7fa90a2f1e41325fed9a658a5f6e44f993755fb (diff)
Add helper functions for testing trade-in mode.
Trade-in mode is difficult to test in automation because it is inherently a user build feature. If it were enabled on ro.debuggable=1 builds, "TIM adb" would conflict with normal adb. So, it is one or the other, and we have to pick "normal adb" to not break all CI and developer workflows. To work around this, we are adding new APIs to ITradeInMode to enable testing TIM when ro.debuggable=1. This will allow us to test certain aspects of the SUW machinery and the "getstatus" command. We do this by setting a new persist property that is read on the next reboot. On next reboot, normal adb is forbidden from starting, and trade-in mode adb is allowed to start instead. disableTesting() unsets the persist property. These APIs are only allowed when ro.debuggable=1. Finally, we add a test method to schedule the same factory reset procedure that occurs within "tradeinmode evaluate". All the testing methods are restricted to ENTER_TRADE_IN_MODE privileges and require ro.debuggable=1. Test: adb shell tradeinmode testing start Bug: 379970773 Flag: com.android.tradeinmode.flags.enable_trade_in_mode Change-Id: I58234d4d2202e0be347e1a0486b7a0869a7867d2
Diffstat (limited to 'packages/Shell/Android.bp')
0 files changed, 0 insertions, 0 deletions