Commit Graph
361 Commits
Author SHA1 Message Date
oxmc 485bb9fe50 BoardConfig: trim dynamic-sizing comments to match file style 2026-08-18 13:54:33 -07:00
oxmc 481b63eae7 BoardConfig: fix system_ext size+reserved conflict exposed by dynamic sizing
AOSP hard-errors if BOARD_SYSTEM_EXTIMAGE_PARTITION_SIZE and
BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE are both defined once
PRODUCT_USE_DYNAMIC_PARTITION_SIZE is on (build/make/core/config.mk) --
this partition already had both set, harmless before dynamic sizing was
enabled product-wide for the vendor.img fix, a hard build error now.
Drops the fixed size, keeping dynamic sizing + the existing 100M reserve.
2026-08-18 13:52:27 -07:00
oxmc 1e9aca258b BoardConfig: dynamically size vendor.img instead of a fixed ceiling
A fixed BOARD_VENDORIMAGE_PARTITION_SIZE forces vendor.img to always equal
that value exactly -- build_image.py never shrinks a fixed-size ext4 image
to its real content in this AOSP branch. Combined with
BOARD_USES_FULL_RECOVERY_IMAGE folding recovery.img into the same
assert-max-image-size check, "vendor.img + recovery.img <= ceiling" was
unsatisfiable at any fixed value (X + 128M <= X has no solution) --
confirmed by PAWLET_BUILD_RECOVERY=1 pdist failing with vendor.img already
at exactly the old 2304M ceiling. Switches to dynamic sizing
(PRODUCT_USE_DYNAMIC_PARTITION_SIZE, common.mk) with a 192M reserved size
(128M recovery.img + 64M slack) instead. mkimg.sh's fixed VENDOR_SIZE stays
valid as the physical partition ceiling -- ext4 doesn't need to fill its
containing partition.
2026-08-18 13:47:39 -07:00
oxmc 7da414a4e0 sepolicy: flip pawlet_androidauto_daemon to enforcing
Still M0 placeholder (starts, logs, idles) — no device-access code yet, so
nothing to deny. Also fixes rpi5's copy missing coredomain, which its own
sibling file's comment (rpi4) says is required since the exec type is
system_file_type.
2026-08-16 19:53:56 -07:00
oxmc 7da1ee2db5 mkimg.sh: round --slim's shrunk partition sizes up to whole MB
shrink_ext4_image's returned byte size wasn't MB-aligned (ext4 block size
is 4096 bytes, not 1048576), but the GPT partition sizing later does
SIZE / 1048576 with integer division -- truncating down, making the
partition up to ~1MB smaller than the actual shrunk file being dd'd into
it. Confirmed on real hardware: dd failed with "No space left on device"
on system/system_ext/vendor despite --slim's own reported sizes matching
what got written to the GPT table. Round up to the next MB boundary
before truncating so the later division is always exact.
2026-08-16 05:06:43 -07:00
oxmc db6fda6471 BoardConfig/mkimg: give vendor partition headroom for recovery.img
With BOARD_USES_FULL_RECOVERY_IMAGE := true, AOSP's assert-max-image-size
checks vendor.img + recovery.img together against
BOARD_VENDORIMAGE_PARTITION_SIZE. vendor.img builds to its full declared
size (confirmed: 2.0G on disk, not shrunk), and recovery.img is always a
fixed 128M FAT container (mkbootimg.mk), so the old 2GB ceiling overflowed
by exactly 128M whenever recovery was built alongside vendor. Bumped to
2.25GB (2048M vendor budget + 256M headroom) and updated mkimg.sh's
VENDOR_SIZE to match, since it's a separate hardcoded constant that has to
stay in sync with BoardConfig.mk's partition size.
2026-08-16 04:06:51 -07:00
oxmc 6400b0a393 mkimg.sh: fix redundant losetup detach, add --slim image variant
losetup -d was unconditionally called after kpartx -dv, which already
detaches the loop device itself once the last partition mapping is removed
-- always failed with "No such device or address" but was otherwise
harmless. Now only detaches if still attached.

--slim shrinks system/system_ext/vendor to their actual used size (e2fsck
-f + resize2fs -M + truncate) instead of the fixed 8GB/4GB/2GB
BoardConfig.mk partition sizes, before sizing the GPT partitions and
writing the image. userdata/metadata stay fixed-size for now -- growing
userdata to fill the real target device is a separate, deferred piece of
work (first-boot on-device growth, not something buildable at
image-creation time since the real device size isn't known yet).
2026-08-16 03:52:36 -07:00
oxmc 379a8a0b1b sepolicy: classify pawlet_androidauto_daemon as coredomain
Its exec file is system_file_type (installs to /system/bin), but the domain
itself was never classified coredomain -- Treble's vendor-vs-system
neverallow rules then treat it as a vendor domain executing/entering a
system file. Classifying it coredomain matches where the binary actually
lives.
2026-08-15 16:10:37 -07:00
oxmc 998db2c36d device+ramdisk: Widevine build guard; restore ro.hardware fix
- device.mk: guard the Widevine CDM PRODUCT_COPY_FILES entry with
  $(wildcard ...) so a checkout that hasn't run extract-widevine.sh still
  builds (the HAL dlopen()s it at runtime and degrades gracefully already).
- ramdisk/init.rpi4.rc: restore the ${ro.hardware} mount_all generalization
  (matches pawlet_rpi5, which already had it — this device tree's copy was
  lost when an earlier android-16.0 upstream-sync merge got reset away).
2026-08-15 01:50:13 -07:00
oxmc cfa7ed8502 product: disable Lawnchair pending AOSP 16 launcher API support
Commented out (not removed) across pawlet_rpi4.mk, pawlet_rpi4_phone.mk,
and pawlet_rpi4_tablet.mk. Default AOSP launcher (pulled in by
full_base.mk) is used in the meantime.
2026-08-15 01:46:20 -07:00
ThangNN99 9372abec9a Set androidboot.verifiedbootstate=orange to allow adb remount
adb remount and adb disable-verity require ro.boot.verifiedbootstate
to equal "orange" (bootloader unlocked), otherwise fs_mgr_remount
refuses with "Device must be bootloader unlocked" even on userdebug
builds. This board has no real bootloader/AVB enforcement
(TARGET_NO_BOOTLOADER := true), so the property was never set and
adb remount always failed.

Same fix as applied upstream for hikey/hikey960:
https://android.googlesource.com/device/linaro/hikey/+/fa66979a87e53d92dc717fd524f7958af20eb9f3

Tested on real Raspberry Pi 4 hardware: after this change,
ro.boot.verifiedbootstate=orange is reported and
"adb root && adb remount" succeeds (remounts / and /vendor as RW).
2026-08-15 00:59:46 -07:00
ThangNN99 d1a91f1307 overlay: car: Fix Phone app does not display ready-to-make-call status when connected via Bluetooth
* config_voice_capable is not overridden here as car build target needs the
  DIALER role to be available and com.android.car.dialer gets its runtime
  phone permissions auto-granted for Bluetooth HFP calling.
2026-08-15 00:59:46 -07:00
Konsta 9ef1a9e360 overlay: car: use separate package for car target
* Copy of AndroidRpiOverlay to be modified in later commits.
2026-08-15 00:59:46 -07:00
oxmc 05ee592f41 car: wire up PawletAndroidAuto + Widevine DRM HAL sepolicy/packages
M0 scaffold wiring for app_PawletAndroidAuto (native daemon + app) and the
Widevine L3 HAL: product packages, file_contexts, and a permissive
domain for pawlet.androidauto-daemon.
2026-08-15 00:59:46 -07:00
oxmc 60ed00046c rpi4: recovery as a separate on-demand image; A/B on tryboot
- mkbootimg.mk: boot.img uses the normal ramdisk again; the recovery.img rule
  is guarded so it only builds when recovery is enabled (PAWLET_BUILD_RECOVERY=1)
  and carries the recovery ramdisk.
- config.txt [tryboot] back to boot_partition=2 (A/B trial); recovery enters
  via reboot,3.
- vendor.prop reboot reason back to reboot,tryboot.
- drop the no-op reserved-size lines (AOSP ignores RESERVED_SIZE for fixed
  non-dynamic partitions).
2026-07-17 05:11:07 -07:00
oxmc ce05f7d3c2 rpi4: clean mkbootimg staging (fix mcopy hang) + reserve system.img size
- mkbootimg.mk: rm -rf the rpiboot staging dir at the start of the stamp rule
  and strip any cmdline*.txt before assembling the images. A stale cmdline.txt
  left in staging by the previous recipe got bulk-copied into the FAT, so the
  per-image `mcopy ... ::cmdline.txt` then blocked forever on mtools'
  interactive overwrite prompt ("stuck on boot.img/recovery.img").
- BoardConfig.mk: add BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE (100MB) so
  system.img is sized to content + reserve instead of padded to the full 8GB
  (matches system_ext / vendor); clears the "approaching size limit" warning.
2026-07-17 03:47:17 -07:00
oxmc 7fb1f5e3da rpi4: embed recovery ramdisk in the boot FAT; A/B via reboot,2
Recovery lives in the boot partition WITHOUT BOARD_USES_RECOVERY_AS_BOOT —
that flag makes AOSP claim the boot.img rule (Makefile:2840, no custom-bootimg
guard) and collide with the custom FAT mkbootimg.mk. Instead:

- BOARD_USES_FULL_RECOVERY_IMAGE=true, TARGET_NO_RECOVERY=false so the recovery
  ramdisk builds (BOARD_USES_RECOVERY_AS_BOOT stays false, from
  BoardConfigPawlet.mk).
- mkbootimg.mk stages ramdisk-recovery.img into the boot FAT as ramdisk.img and
  writes two cmdlines: cmdline.txt with androidboot.force_normal_boot=1
  (first-stage init boots Android) and cmdline_recovery.txt without it.
  config.txt [tryboot] selects cmdline_recovery.txt, so `reboot tryboot` from
  pawlet-recoveryboot.sh brings the same partition up in recovery.
- mkbootimg.mk also builds a standalone recovery.img (satisfies
  INSTALLED_RECOVERYIMAGE_TARGET; a fallback, not flashed by default).
- A/B slot switching uses a one-shot `reboot,2` (vendor.prop reboot_reason),
  freeing tryboot for recovery.

Also size vendor.img to content + 100MB reserved (matching system_ext) so
vendor.img plus the recovery.img added to its size assertion fit under 2GB.

device.mk: move core_64_bit_only / dalvik-heap inherits ahead of the ADB block.

Firmware behaviors to verify on first flash: [tryboot] cmdline selection and
the reboot,2 partition boot.
2026-07-15 23:06:57 -07:00
oxmc 3124d26023 Fix: reserve vendor partition size instead of always making it 2GB 2026-07-15 17:31:04 -07:00
oxmc 22194ac50f recoveryboot: run the BCB watcher in vendor_misc_writer
private/domain.te neverallows misc_block_device access for all but a few
domains, and the check always compiles as a user build, so the custom
domain failed the sepolicy_neverallows gate. hal_bootctl_server (the other
exempt candidate) is out: hal_neverallows.te forbids HAL domains from
exec'ing vendor sh/toybox, and the chain-loader is a shell script. So use
AOSP's vendor_misc_writer — the domain built for vendor tools touching
misc — adding BCB read-back, vendor shell/toybox exec, the /metadata
attempt counter, sys.powerctl, and kmsg logging on top of the write
access system policy already grants.
2026-07-15 17:14:04 -07:00
oxmc d0e671ff24 sepolicy: domain for pawlet-recoveryboot
BCB read/clear on misc_block_device, /metadata attempt counter,
powerctl_prop set — mirrors the hal_boot_control access pattern.
2026-07-15 11:41:01 -07:00
oxmc aae0c153e5 recovery: build recovery.img as a bootable FAT (Phase 1, stock UI)
Recovery support in two pieces that were always meant to fit together:
build/make stages recovery/root and produces ramdisk-recovery.img
itself, and skips its own mkbootimg-based recovery.img rule whenever
BOARD_CUSTOM_BOOTIMG_MK is set — expecting the custom mk to provide it.
mkbootimg.mk now does: same firmware/kernel/DTB payload as boot.img,
config.txt sed'd to load ramdisk-recovery.img, packed into a 128M FAT32
that wrimg.sh dd's to partition 3. Firmware boots it via autoboot.txt
boot_partition=3 (runtime reboot-to-recovery switcher: follow-up).

BoardConfig: recovery re-enabled with the STOCK AOSP recovery UI —
TARGET_RECOVERY_UI_LIB stays commented until the TWRP GUI port links
(libaosprecovery gap). BOARD_USES_FULL_RECOVERY_IMAGE=true disables the
legacy boot->recovery imgdiff path (recovery-resource.dat) that failed
the previous full build. TARGET_RECOVERY_PIXEL_FORMAT must be unquoted:
literal quotes leak into soong.*.extra.variables and break its JSON.
The old PRODUCT_COPY_FILES recovery/root line is dropped — product vars
in board makefiles are never collected; the TWRP helper files it aimed
at return via device.mk in Phase 2.

Verified: m recoveryimage produces recovery.img (FAT: kernel, DTBs,
overlays, ramdisk-recovery.img, correct initramfs line).
2026-07-15 11:30:18 -07:00
oxmc b9251bc03c BoardConfig: re-disable recovery until the TWRP port is buildable
Enabling it (a116945) breaks every full build: RPi has no
INSTALLED_KERNEL_TARGET so build/make never emits a recovery.img rule,
but with BUILDING_RECOVERY_IMAGE on, vendor installs
recovery-resource.dat which depends on recovery.img -> ninja 'missing
and no known rule'. librecovery_ui_pawlet_twrp also still cannot link
(libaosprecovery unported). Block kept, commented, with both blockers
documented.
2026-07-15 10:57:48 -07:00
oxmc 1c000e511e product: ship Lawnchair-QuickstepSwitcherOverlay
The RRO that points config_recentsComponentName at app.lawnchair has
existed in prebuilt_lawnchair all along but was never in
PRODUCT_PACKAGES — so the framework kept recents on the stock Launcher3
component (which the Lawnchair prebuilt overrides away), Lawnchair
disabled its quickstep half, SystemUI had no TouchInteractionService to
bind, and no taskbar/nav buttons ever rendered. Verified on device: with
the overlay pushed manually, SystemUI binds TIS.
2026-07-15 07:04:13 -07:00
oxmc a1169456f1 BoardConfig.mk: re-enable recovery via new UI-plugin design
Old block inherited a full TWRP recovery.mk fork and was disabled
pending Android 16 TWRP support. Current design keeps stock
bootable/recovery unforked and points TARGET_RECOVERY_UI_LIB at
librecovery_ui_pawlet_twrp (vendor/pawlet/recovery_ui), which
recovery_main.cpp dlopen()s at runtime. Not build-tested yet —
libaosprecovery (vendor/pawlet/recovery_toolkit/helpers) has no
Android.bp yet, so this module won't link until that's ported.
2026-07-11 19:40:36 -07:00
oxmc 3963268947 vendor.cfg: enable setup wizard by default 2026-06-16 20:14:40 -07:00
oxmc bce8f248ba init.rpi4.rc: enable console and logcat_uart on debuggable builds
start console (was incorrectly stop) so the UART shell is interactive.
Add logcat_uart service writing to /dev/ttyS0 so Java crashes are
visible on the serial console.
2026-06-16 09:38:49 +00:00
oxmc 0c0975b507 sepolicy: drop platform_app serialno_prop rule (neverallow) 2026-06-13 23:01:22 -07:00
oxmc c44e92841f sepolicy: allow platform_app to read serialno_prop 2026-06-13 05:04:02 -07:00
oxmc c43805e28c overlays: strip shared defaults into SettingsProviderRpiCommonOverlay 2026-06-13 03:56:26 -07:00
oxmc 12a4c88ac3 SettingsProviderRpiOverlay: set default Monet seed color to #83EBE1 2026-06-13 03:54:24 -07:00
oxmc 25470fec6d overlays: remove shared overlays, now live in pawlet_rpi_common
AndroidRpiOverlay, AndroidTvRpiOverlay, BluetoothRpiOverlay,
CarServiceRpiOverlay, SettingsRpiOverlay, and SystemUIRpiOverlay have
moved to device/pawlet/rpi (pawlet_rpi_common). Module names are
unchanged so no PRODUCT_PACKAGES edits are needed.
2026-06-13 03:43:15 -07:00
oxmc bde8f10d7a overlay: disable Taskbar via config_taskbarEnabled=false in SystemUI overlay
On RPi 4/CM4 the density override (wm density 160) makes smallestScreenWidthDp
exceed 600 dp, which causes NavigationBarControllerImpl to route navigation
through TaskbarDelegate instead of creating a traditional NavigationBar window.
Lawnchair's Taskbar is not active, so no navigation buttons are shown at all.

Setting config_taskbarEnabled=false in the SystemUI overlay (backed by the
sysui-taskbar-navfix.patch in vendor/pawlet) makes supportsTaskbar() return
false, falling back to the traditional 3-button navigation bar.
2026-06-13 02:06:12 -07:00
oxmc 8a6b997313 overlay: disable config_isDesktopModeSupported to restore nav bar
On Android 16, config_isDesktopModeSupported=true on a large screen
triggers desktop windowing mode, which skips navigation bar creation
entirely (expecting the taskbar to handle it). With config_enableTaskbar
also false, the result is no navigation at all.

Disabling desktop mode restores the standard nav bar. Freeform windows
remain available via developer options without this flag.
2026-06-13 00:32:29 -07:00
oxmc 810325fb77 rpi4: inherit default-vendor-config; update vendor.cfg to new keys
Switch all build variants to inherit vendor/pawlet/config/default-vendor-config.mk
for the common vendor.cfg. Per-device vendor.cfg copy is wired up and commented
out, ready to activate when device-specific config is needed.

Update configs/provisioner/vendor.cfg to new ConfigProvisioner key names
(enable_configapk_service, device_provisioned, enable_setupwizard) and
point config_apk_url to https://oxmc.me/aosp_apis/data/default-config.apk.
2026-06-12 18:10:14 -07:00
oxmc 0d6551f178 rpi4: partition layout, boot setup, slow_storage, BootControl, wrimg for Android 16
Partition layout:
- BoardConfig: system 8 GB, vendor 2 GB
- mkimg: matching system/vendor partition sizes
- fstab: remove discard from metadata; make discard opt-in via
  BOARD_STORAGE_SUPPORTS_DISCARD to avoid boot-time I/O stalls
- slow_storage.mk: raise Watchdog timeout so first-boot SELinux label pass
  does not kill system_server on slow SD cards

Boot:
- mkbootimg: use stamp file for rpiboot; uppercase FAT volume label for
  compatibility with some UEFI firmware
- rpi4: set androidboot.boot_devices for by-name symlink creation
- wrimg: stamp androidboot.slot_suffix in cmdline.txt after each A/B write
- rpi4: disable AVB (no vbmeta partition in this layout)

A/B / BootControl:
- sepolicy: add BootControl HAL policy and fix partition file_contexts
- wrimg: switch to PARTLABEL-based device detection; fix system_ext brackets

Packages:
- product: add LawnchairQuickStep to PRODUCT_PACKAGES

SELinux:
- Fix remaining Android 16 boot-log denials and permission labels
2026-06-11 09:14:11 -07:00
oxmc 42a953db99 Fix selinux perms 2026-06-03 22:17:33 -07:00
oxmc ade925a5d1 Fix package name 2026-06-03 01:43:57 -07:00
oxmc 649ec17187 Fix paths 2026-05-30 01:58:48 -07:00
oxmc 7146b57b90 Fix include path and disable recovery/twrp 2026-05-30 01:13:14 -07:00
oxmc ba08776aca Seperate into new repo 2026-05-26 06:37:23 -07:00
oxmc 05d2abb265 Update to upstream 2026-05-26 05:54:26 -07:00
oxmc 36e87623ea Common stuff 2026-03-20 06:17:27 -07:00
oxmc ea675a2b9f Fix partition layout 2026-03-05 00:40:38 -08:00
oxmc 58e19810d1 Update to same as upstream 2026-03-04 22:17:40 -08:00
oxmc d3064f9f9d wifi: start wpa_supplicant as user wifi (same as upstream) 2026-01-17 04:41:05 +00:00
oxmc 0cd3897c6a Upd 2025-12-21 23:21:27 -08:00
oxmc a648de1043 Update BoardConfig.mk 2025-12-02 10:37:52 -08:00
oxmc ee3762f0fe Move recovery before kernel info 2025-12-02 10:28:50 -08:00
oxmc 29a91cf576 Recovery support (Part 1) 2025-12-02 09:26:21 -08:00
oxmc 83afede4c7 Update mkimg.sh 2025-11-29 15:37:07 -08:00