Mirror first boot: how a fresh userdata comes up with nothing to tap
On this page
Status (2026-11-16): verified on the unit. The root's Mirror run (below) found every claim true on the glass, with nothing tapped. Kiln's images now set, before the first boot:
- Wi-Fi on, with the person's network saved;
- the screen staying on;
- no lock screen;
- no auto-rotate.
Each mechanism was read from Android 6.0.1's source and checked against the Glass Panes image 2 files. None has run on a Mirror yet. The root's test plan is at the end.
Device: lululemon Mirror (MSM8916), Glass Panes mirror-android-2 (Android 6.0.1, userdebug,
test-keys, no pre-optimised odex). Tools: @glassworks/ext4, Android SDK build-tools 36.0.0 and platform android-36 (pinned in build.sh)
(aapt2, apksigner), AOSP source at android-6.0.1_r81 (android.googlesource.com).
Question
The Mirror has no touchscreen. A fresh Glass Panes userdata comes up with:
- Wi-Fi off and no saved network;
- a 60 s screen timeout;
- the swipe lock screen;
- auto-rotate on.
There is nothing to tap to fix any of it. Can Kiln's images set all of that before the first boot,
from system or the fresh userdata it already builds?
What we tried
-
Whether a pre-made settings file works (2026-11-16, read: AOSP 6.0.1
packages/SettingsProvider/.../SettingsProvider.java:1577). On first boot, SettingsProvider builds the default settings withDatabaseHelperonly whensettings_secure.xmldoesn't exist, then writes the XML files. So a pre-madesettings_*.xmlreplaces every default (device_provisioned, user_setup_complete and the rest), not just ours. A pre-made legacysettings.dbat the current version skipsonCreatethe same way. Ruled out, because we would have to reproduce every default ourselves. -
System properties DatabaseHelper reads (2026-11-16, read:
DatabaseHelper.java, allSystemProperties.get). These exist:ro.lockscreen.disable.default(line 2483), which setslockscreen.disabled;ro.kernel.qemu, which setsstay_on_while_plugged_in. It also makes Android behave as an emulator: ruled out;ro.allow.mock.location,ro.com.android.dataroaming,ro.com.android.mobiledataandro.telephony.default_cdma_sub.
There is none for
wifi_on,screen_off_timeoutor rotation. The image's Wi-Fi service dex reads no property for them either (2026-11-16,stringsonwifi-service.jar's andservices.jar'sclasses.dex). -
ro.lockscreen.disable.defaulton this image (2026-11-16, read: the image's dex). BothSettingsProvider.apk'sclasses.dexandservices.jar's contain the string. In AOSP 6.0.1,LockSettingsService(lines 103–112) writeslockscreen.disabled=1into a newlocksettings.dbwhen it is true, andDatabaseHelper(line 2483) seeds it too.LockPatternUtils.isLockScreenDisabledhonours it when no PIN or pattern is set. The only migration that clears it does so with more than one switchable user (LockSettingsService.java:233–255, the clearing at about line 245). A fresh userdata has one. -
A static resource overlay for SettingsProvider (2026-11-16, read: AOSP 6.0.1
PackageManagerService.java:2066and:5588,rootdir/init.rc:31). Android 6 scans/vendor/overlaybefore any app. It trusts an overlay by where it sits, not by its key: there is no signature match with the target, onlymTrustedOverlayfrom that folder. It builds an idmap that matches resources by type and name.init.rclinks/vendorto/system/vendoron devices without a vendor partition. This image has/system/vendor(withlib,lib64,bin) and nooverlayfolder.The image's SettingsProvider has these resources (
aapt2 dump resources):bool/def_wifi_onfalse;integer/def_screen_off_timeout60000;bool/def_stay_on_while_plugged_infalse;bool/def_lockscreen_disabledfalse;bool/def_accelerometer_rotationtrue.
-
The Wi-Fi network in userdata (2026-11-16, read: AOSP 6.0.1
libhardware_legacy/wifi/wifi.c:377,init.rc:325,sepolicy/file_contexts:251). The Wi-Fi HAL uses an existing/data/misc/wifi/wpa_supplicant.confas it is. It copies the template (/system/etc/wifi/wpa_supplicant.conf) only when the file doesn't exist.init.rcmakes/data/misc/wifi0770wifi:wifi.- The HAL makes the file 0660
system:wifi. file_contextslabels bothu:object_r:wifi_data_file:s0.- The image's template (read 2026-11-16) is
update_config=1,eapol_version=1,ap_scan=1,fast_reauth=1,pmf=1,p2p_no_group_iface=1. - The image's own
file_contextsis in its signed boot ramdisk, which Kiln doesn't read, so the labels are AOSP's.
Result
| What | How Kiln sets it | Where | Evidence |
|---|---|---|---|
| No lock screen | ro.lockscreen.disable.default=true |
system's build.prop |
Read: AOSP 6.0.1, and the string in the image's dex |
| Wi-Fi on | Overlay: def_wifi_on true |
/system/vendor/overlay/GlassworksSettings.apk |
Read: AOSP 6.0.1 PMS and DatabaseHelper |
| The person's network | network={ ssid psk key_mgmt=WPA-PSK priority=1 } after the template; the PSK is PBKDF2-HMAC-SHA1 (passphrase, SSID, 4096, 256 bits), never the password |
userdata's /misc/wifi/wpa_supplicant.conf, 0660 1000:1010, wifi_data_file |
Read: AOSP 6.0.1 wifi.c; tests on the IEEE 802.11i vectors |
| Screen stays on | Overlay: def_screen_off_timeout 2147483647 (no timeout in practice) and def_stay_on_while_plugged_in true. DatabaseHelper turns that into 1 (AC only), not 7: there is no default that gives 7 |
Overlay | Read: DatabaseHelper.java:2580 |
| Portrait, no auto-rotate | Overlay: def_accelerometer_rotation false. The first boot over adb: settings put system accelerometer_rotation 0, settings put system user_rotation 3, then dumpsys window windows until mRotation=3 exactly; Kiln stops after 10 s otherwise (setPortrait) |
Overlay, the first boot | Corrected 2026-11-17. This row said rotation stays 0 and ro.sf.hwrotation=270 makes it portrait, with no user_rotation needed. Wrong: the real legacy app came up sideways (the maintainer saw landscape), and nothing on the image reads ro.sf.hwrotation (image-patch.md). 3 is upright: verified 2026-11-17 at the first boot, the maintainer on the glass. After a reboot: untested (the run's record on #439 lists it as not checked; the setting lives in userdata, so it should hold) |
| Our app as HOME | Unchanged: makeOnlyHome hides the image's launchers only once our app answers HOME, and Kiln refuses an APK without one (#385) |
Verified with the probe app (below). The legacy build of Glassworks, Kiln's app since 2026-11-16, has not run on a Mirror yet |
The overlay is frames/lululemon-mirror/overlay (AndroidManifest.xml, res/values/defaults.xml).
build.sh builds GlassworksSettings.apk: aapt2, then v1 signing with AOSP's public test key
(checked by SHA-256), since Android 6 reads no v2. Two builds give the same bytes. Kiln pins it by
SHA-256 (SETTINGS_OVERLAY), and patchSystem refuses any other file.
Kiln's Wi-Fi form now fills the network into the image. Sending the network to the app after the boot stays as a fallback.
How to reproduce
Offline, nothing touches a device:
ANDROID_HOME=~/Library/Android/sdk frames/lululemon-mirror/overlay/build.sh: the SHA-256 it prints must equalSETTINGS_OVERLAY.sha256.npm test -w @glassworks/lululemon-mirror-installer. The image tests check the overlay and the saved Wi-Fi with e2fsprogs: owners, modes, SELinux labels, and no plain password.- With the real image:
GW_MIRROR_SYSTEM_IMG=<image 2 system.img> npm test -w @glassworks/lululemon-mirror-installer. On 2026-11-16 it passed: the overlay andro.lockscreen.disable.defaultare in, and e2fsck finds nothing new.
The run on the Mirror (2026-11-16, verified by the root)
A local build of #395 (3af4c89b) merged with main (a72c4702): image 2, #389's turned boot animation,
and #398's probe app as the APK (an app with MAIN, HOME and DEFAULT on API 23). Flashed with
tools/mirror/flash-node.ts and a Wi-Fi network from a file. Nothing was tapped on the glass. The
full table is on #395.
| Check | Result |
|---|---|
/vendor |
vendor -> /system/vendor; GlassworksSettings.apk in /vendor/overlay, applied |
| Wi-Fi | wifi_on=1, connected on its own at the first boot and again after a reboot |
| Screen | screen_off_timeout=2147483647, stay_on_while_plugged_in=1; it doesn't sleep |
| Rotation | accelerometer_rotation=0. The boot animation (#389) upright on the glass (the maintainer's photo). "Portrait" here was the probe app asking for portrait itself, not the system: corrected 2026-11-17, the system stayed at rotation 0, landscape (image-patch.md) |
| Lock screen | mShowingLockscreen=false at the first boot, after sleep and wake, and after a reboot |
| Home | the probe's .MainActivity; Launcher3 hidden once it answered HOME |
The run also found that the first boot's Wi-Fi step logged the network's name. It now reads "Wi-Fi: the network you entered", and tests check that no log line holds the name or the password.
The root's test plan
Steps 1–4 and 6 ran on 2026-11-16 (above). Step 5 changed on 2026-11-17 and passed that day on the root's run of #439 at the first boot: rotation 3, the app upright on the glass. Its "repeat after a reboot" part is untested (not checked in that run). The run above (2026-11-16) saw rotation 0.
Flash with this build (Kiln or tools/mirror/flash-node.ts), with the Wi-Fi name and password
given, a Home Assistant address, and an APK that has a home screen on API 23. Then, touching nothing
on the Mirror:
- Wi-Fi. After the first boot,
adb shell dumpsys wifi | grep -m3 -E "Wi-Fi is|mNetworkInfo"shows Wi-Fi enabled and connected to the network.adb shell settings get global wifi_ongives- If it's 0, the overlay wasn't applied: check
adb shell ls /vendor/overlayandadb shell ls /data/resource-cache, which should hold an idmap for SettingsProvider.
- If it's 0, the overlay wasn't applied: check
- Network saved, not the password.
adb shell su -c cat /data/misc/wifi/wpa_supplicant.conf(if root exists) showspsk=followed by 64 hex digits. - No lock screen. Let the screen sleep (
adb shell input keyevent KEYCODE_SLEEP), then wake it (KEYCODE_WAKEUP). It must show the app directly, with no swipe screen. Repeat after a reboot.adb shell dumpsys window policy | grep -i keyguardshould show it isn't showing. - Screen stays on.
adb shell settings get system screen_off_timeoutgives 2147483647 andsettings get global stay_on_while_plugged_ingives 1. Leave it 10 minutes: the screen stays on. - Portrait.
adb shell settings get system accelerometer_rotationgives 0,settings get system user_rotationgives 3, anddumpsys window windows | grep mRotation=givesmRotation=3(until 2026-11-17 this step expected rotation 0, which is landscape; plaindumpsys windowdoesn't printmRotationon Android 6). Photograph the app on the glass: upright, not sideways. - HOME.
adb shell am start -a android.intent.action.MAIN -c android.intent.category.HOMEopens the app (in the run above, the probe).
If any step fails, write down what it showed. The way back is the plain Glass Panes image.
Open questions
Whether the overlay applies to SettingsProvider, which runs in the system process.Yes (2026-11-16):wifi_on=1, the timeout and rotation came from it.Whether Android 6 keeps a pre-saved network enabled for auto-join with noYes (2026-11-16): it joined at the first boot and after a reboot.networkHistory.txt.- Whether the Mirror's power supply counts as AC for
stay_on_while_plugged_in. Not checked; the timeout keeps the screen on either way.