From d686dd0bbc001f866c4a5750cd6cd9b3d5a05c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=ADaz?= Date: Sat, 1 Aug 2026 11:14:36 +0200 Subject: [PATCH 1/4] support Android 17 Bump PRODUCT_MODEL to redroid17_* and switch the lunch targets to the cp2a release configuration (SDK 37). --- AndroidProducts.mk | 8 ++++---- redroid_arm64.mk | 2 +- redroid_arm64_only.mk | 2 +- redroid_x86_64.mk | 2 +- redroid_x86_64_only.mk | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 52e1db7..a232e43 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -21,8 +21,8 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/redroid_arm64_only.mk \ COMMON_LUNCH_CHOICES := \ - redroid_x86_64-bp2a-userdebug \ - redroid_x86_64_only-bp2a-userdebug \ - redroid_arm64-bp2a-userdebug \ - redroid_arm64_only-bp2a-userdebug \ + redroid_x86_64-cp2a-userdebug \ + redroid_x86_64_only-cp2a-userdebug \ + redroid_arm64-cp2a-userdebug \ + redroid_arm64_only-cp2a-userdebug \ diff --git a/redroid_arm64.mk b/redroid_arm64.mk index 52ddaf0..3f5212b 100644 --- a/redroid_arm64.mk +++ b/redroid_arm64.mk @@ -22,6 +22,6 @@ $(call inherit-product, $(LOCAL_PATH)/redroid_arm64/device.mk) PRODUCT_NAME := redroid_arm64 PRODUCT_DEVICE := redroid_arm64 PRODUCT_BRAND := redroid -PRODUCT_MODEL := redroid16_arm64 +PRODUCT_MODEL := redroid17_arm64 DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay diff --git a/redroid_arm64_only.mk b/redroid_arm64_only.mk index 5a3adb2..186e997 100644 --- a/redroid_arm64_only.mk +++ b/redroid_arm64_only.mk @@ -24,7 +24,7 @@ $(call inherit-product, $(LOCAL_PATH)/redroid_arm64_only/device.mk) PRODUCT_NAME := redroid_arm64_only PRODUCT_DEVICE := redroid_arm64_only PRODUCT_BRAND := redroid -PRODUCT_MODEL := redroid16_arm64_only +PRODUCT_MODEL := redroid17_arm64_only DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay diff --git a/redroid_x86_64.mk b/redroid_x86_64.mk index 95089e3..0af8b16 100644 --- a/redroid_x86_64.mk +++ b/redroid_x86_64.mk @@ -21,6 +21,6 @@ $(call inherit-product, $(LOCAL_PATH)/redroid_x86_64/device.mk) PRODUCT_NAME := redroid_x86_64 PRODUCT_DEVICE := redroid_x86_64 PRODUCT_BRAND := redroid -PRODUCT_MODEL := redroid16_x86_64 +PRODUCT_MODEL := redroid17_x86_64 DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay diff --git a/redroid_x86_64_only.mk b/redroid_x86_64_only.mk index e7d7852..0597842 100644 --- a/redroid_x86_64_only.mk +++ b/redroid_x86_64_only.mk @@ -23,7 +23,7 @@ $(call inherit-product, $(LOCAL_PATH)/redroid_x86_64_only/device.mk) PRODUCT_NAME := redroid_x86_64_only PRODUCT_DEVICE := redroid_x86_64_only PRODUCT_BRAND := redroid -PRODUCT_MODEL := redroid16_x86_64_only +PRODUCT_MODEL := redroid17_x86_64_only DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay From 362bb2ca38e260f4a536e48c7c46c0ea3db70c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=ADaz?= Date: Sat, 1 Aug 2026 11:14:36 +0200 Subject: [PATCH 2/4] use memfd instead of ashmem Android <= 16 needs the ashmem kernel driver, removed from Linux in 5.18, so redroid 16 cannot boot on a current host. Android 17 accepts memfd instead; on 16 the property alone was not enough because an extra ashmem ioctl check still ran against it. The property must go in PRODUCT_SYSTEM_PROPERTIES: sepolicy declares use_memfd_prop as system_restricted_prop, so vendor_init cannot set it and putting it in redroid.prop is silently ignored. --- redroid.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/redroid.mk b/redroid.mk index 7e6c7d2..06e79a1 100644 --- a/redroid.mk +++ b/redroid.mk @@ -45,6 +45,13 @@ endif PRODUCT_SHIPPING_API_LEVEL := 34 +# Android >= 17 has no ashmem, so force memfd instead. The property alone +# was not enough on Android 16 (an extra ashmem ioctl check ran against +# memfd), but Android 17 dropped that check. It must go in SYSTEM: +# use_memfd_prop is system_restricted_prop and vendor_init cannot set it. +PRODUCT_SYSTEM_PROPERTIES += \ + sys.use_memfd=true \ + AUDIOSERVER_MULTILIB := first TARGET_VENDOR_PROP += device/redroid/redroid.prop From cc7ce6cb7a2d6ad65e851a2778282f07250d724f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=ADaz?= Date: Sat, 1 Aug 2026 11:14:36 +0200 Subject: [PATCH 3/4] add gralloc 5 via minigbm Android 17 enables the require_gralloc4_or_newer build flag in cp2a, which rejects gralloc 2 and 3 outright, so surfaceflinger cannot start with the current stack. minigbm provides gralloc 5 and coexists with gralloc 2: GraphicBufferMapper probes 5 -> 4 -> 3 -> 2. Requires the host to load the vkms kernel module. minigbm needs no real GPU but does need a DRM device it recognises; bochs-drm has no render node and virtio-gpu buffers are not GPU-writable. --- redroid.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/redroid.mk b/redroid.mk index 06e79a1..8460474 100644 --- a/redroid.mk +++ b/redroid.mk @@ -62,6 +62,14 @@ PRODUCT_PACKAGES += \ libGLESv2_angle \ vulkan.pastel \ +# gralloc 5 (IMapper 5 stable-C) through minigbm. Coexists with the +# existing gralloc 2: GraphicBufferMapper probes 5 -> 4 -> 3 -> 2. +# The host must load the vkms kernel module, otherwise minigbm finds no +# DRM device it recognises and the allocator never starts. +PRODUCT_PACKAGES += \ + mapper.minigbm \ + android.hardware.graphics.allocator-service.minigbm \ + # Phone App required PRODUCT_PACKAGES += \ From 03d70f8cafc1864e70816d1fc3c92ee003072cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=ADaz?= Date: Sat, 1 Aug 2026 11:14:36 +0200 Subject: [PATCH 4/4] enable ueventd cold boot Skipping the cold-boot scan leaves /dev unpopulated, with two symptoms that look unrelated to each other and to the cause: no /dev/block/loopN apexd activates 0 APEX, so /apex stays empty and /system/bin/linker64 is a dangling symlink no /dev/graphics/fb0 the composer cannot open the framebuffer; after four deaths init takes surfaceflinger and zygote down with it This also affects the 14, 15 and 16 branches. --- redroid.prop | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/redroid.prop b/redroid.prop index f20de9a..39a7e37 100644 --- a/redroid.prop +++ b/redroid.prop @@ -1,7 +1,10 @@ ro.hardware=redroid -# disable ueventd cold-boot for performance -ro.cold_boot_done=true +# Do not disable ueventd cold boot. Without the cold-boot scan there is no +# /dev/block/loopN (apexd activates 0 APEX, so /system/bin/linker64 is a +# dangling symlink) and no /dev/graphics/fb0 (the composer cannot open the +# framebuffer and init takes surfaceflinger and zygote down with it). +# ro.cold_boot_done=true persist.sys.fuse=1