@@ -2,10 +2,10 @@ import type { PerfConfig } from './config.ts';
22import type { Platform } from './types.ts' ;
33
44// Local-convenience defaults for ad-hoc runs; CI always overrides them (--device / --serial).
5- // The iOS UDID is a specific local "iPhone 17" sim; the Android serial is a dedicated emulator
6- // port . Pass --udid/--device/--serial to target your own device.
5+ // The iOS UDID is a specific local "iPhone 17" sim; the Android default is an AVD name that
6+ // `boot` can launch . Pass --udid/--device/--serial to target your own device.
77const DEFAULT_IOS_UDID = 'D74E0B66-57EB-4EC1-92DC-DA0A30581FE7' ;
8- const DEFAULT_ANDROID_SERIAL = 'emulator-5556 ' ;
8+ const DEFAULT_ANDROID_AVD = 'Pixel_9_Pro_XL_API_37 ' ;
99
1010export type ProfileSelectors = {
1111 // A row on the Settings root that pushes a large sub-screen (big a11y tree).
@@ -57,13 +57,16 @@ export function resolveProfile(cfg: PerfConfig): ResolvedProfile {
5757 } ,
5858 } ;
5959 }
60- const serial = cfg . serial ?? DEFAULT_ANDROID_SERIAL ;
60+ const avdName = cfg . device ?? DEFAULT_ANDROID_AVD ;
61+ const serialFlags = cfg . serial
62+ ? [ '--serial' , cfg . serial , '--android-device-allowlist' , cfg . serial ]
63+ : [ ] ;
6164 return {
6265 platform : 'android' ,
63- deviceName : cfg . serial ? `android (${ serial } )` : 'Pixel_9_Pro_XL_API_37' ,
64- serial,
66+ deviceName : cfg . serial ? `android (${ cfg . serial } )` : avdName ,
67+ serial : cfg . serial ,
6568 platformFlags : [ '--platform' , 'android' ] ,
66- selectorFlags : [ '--serial ' , serial , '--android-device-allowlist' , serial ] ,
69+ selectorFlags : [ '--device ' , avdName , ... serialFlags ] ,
6770 appTarget : 'com.android.settings' ,
6871 selectors : {
6972 deepScreen : 'text="Network & internet"' ,
0 commit comments