Charger-insertion boots (androidboot.mode=charger, ABL-appended) divert to a minimal charging.target instead of the full UI, ending the dead-battery bootloop: ADSP charging/USB-PD runs, splash+panel killed ~6-10s in via an initramfs hook, modem+cdsp stopped, radios/sensors suppressed, CPU capped. Power key reboots to a normal boot, volume-up shows battery status, volume-down enables USB ssh, unplug powers off. Measured >= breakeven on a 100mA-classified SDP port, strongly net-positive on real chargers. Suspend duty-cycling (~13mA floor) exists behind an off-by-default flag: resume from deep suspend intermittently kills the UFS link (hibern8 exit failed ret=5) - do not enable until that kernel bug is fixed. Byte-identical to the deployment verified on the dev phone 2026-08-24 (journal/power: r5 armed tests, crash autopsies, measurements). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
16 lines
486 B
Shell
Executable file
16 lines
486 B
Shell
Executable file
#!/bin/sh
|
|
# Give the USB gadget interface its usual static address (the one the NM
|
|
# "Developer Mode" profile would assign) without NetworkManager. The
|
|
# workstation side self-configures 172.16.42.2 via its udev rule, so
|
|
# `ssh fp6usb4` works in charging mode.
|
|
|
|
IF=""
|
|
for i in $(seq 1 30); do
|
|
IF=$(ls /sys/class/net 2>/dev/null | grep '^usb' | head -1)
|
|
[ -n "$IF" ] && break
|
|
sleep 1
|
|
done
|
|
[ -n "$IF" ] || exit 0
|
|
|
|
ip addr replace 172.16.42.1/16 dev "$IF"
|
|
ip link set "$IF" up
|