Question: Android 13 build for Raspberry Pi4 (arpi-13) not booting up

995 views
Skip to first unread message

Gheorghe Prelipcean

unread,
Mar 19, 2023, 8:29:50 AM3/19/23
to Android-rpi
Hello everyone,

I've been facing a problem for some while trying to run Android 13 on Raspberry Pi 4.

To achieve what I wanted I have followed the steps written in README files of following repos:
android-rpi/local_manifests
android-rpi/device_arpi_rpi4
android-rpi/kernel_manifest

Note: I also tried older branches arpi-11, arpi-12 and I was having similar issues.

I built everything and created the SD card as instructed, and I booted up the raspberry pi 4 with the SD card in and here are the results:
- raspberry pi rainbow screen appears
- immediately after there is white smoking screen animation
- and after it goes blank nothing happens anymore, no Android logo nothing
- serial communication is working and I can run Linux commands from the console but Android graphical interface does not boot up

Some errors that I spotted from the serial log are:
[    2.702188] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.800796] init: [libfs_mgr]ReadFstabFromDt(): failed to read fstab from dt
[    2.809248] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2
...
[    3.307882] init: Error: Apex SEPolicy failed signature check
[    3.313844] init: Loading APEX Sepolicy from /system/etc/selinux/apex/SEPolicy.zip
[    3.321728] init: Failed to open package /system/etc/selinux/apex/SEPolicy.zip: No such file or directory
...
[    3.750437] init: Couldn't load property file '/system_dlkm/etc/build.prop': open() failed: No such file or directory: No such file or directory
[    3.763685] init: Couldn't load property file '/vendor/default.prop': open() failed: No such file or directory: No such file or directory
[    3.783554] init: Couldn't load property file '/odm_dlkm/etc/build.prop': open() failed: No such file or directory: No such file or directory
...
[   15.047989] init: Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 138 (/system/bin/servicemanager)
...
[   33.066506] init: Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 138 (/system/bin/servicemanager)
[   33.758398] cam-dummy-reg: disabling
...
[   37.069513] init: Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 138 (/system/bin/servicemanager)
...

Can someone help me to try understand why Android graphical interface is not booting up? Because the kernel seems to be running as I have serial communication.

Also are there some good reference books that I could read to better understand the AOSP development process and porting to bespoke boards such as Raspberry Pi?

Thank you very much!

Peter Yoon

unread,
Mar 23, 2023, 6:43:20 AM3/23/23
to Android-rpi
-.  Try "logcat" on the serial console, and study the logs.
-.  source.android.com is "The documentation", and you can find following link:

Gheorghe Prelipcean

unread,
Mar 25, 2023, 4:58:00 AM3/25/23
to Android-rpi
Thank you,
I will give it a try reading more carefully the documentation

Until then this is what I extracted from $ logcat *:E
--------- beginning of kernel
01-01 00:00:02.798     0     0 E init    : Failed to read vbmeta partitions.
01-01 00:00:03.335     0     0 E init    : Failed to open package /system/etc/selinux/apex/SEPolicy.zip: No such file or directory
01-01 00:00:04.051     0     0 E cgroup  : Disabled controller 'memory'
01-01 00:00:04.142     0     0 E linkerconfig: Unable to access VNDK APEX at path: /apex/com.android.vndk.v33: No such file or directory
--------- beginning of system
01-01 00:00:06.772   145   145 E incfs   : IncFs_Features: failed to open features dir, assuming v1/none.: No such file or directory
01-01 00:00:06.775     0     0 E incfs   : IncFs_Features: failed to open features dir, assuming v1/none.: No such file or directory
01-01 00:00:07.036   164   164 E keystore2: keystore2::maintenance: Call to earlyBootEnded failed for security level STRONGBOX: In call_with_watchdog: getting keymint device.
01-01 00:00:07.036   164   164 E keystore2: keystore2::error: In call_with_watchdog: getting keymint device
01-01 00:00:07.036   164   164 E keystore2:
01-01 00:00:07.036   164   164 E keystore2: Caused by:
01-01 00:00:07.036   164   164 E keystore2:     0: In get_keymint_device.
01-01 00:00:07.036   164   164 E keystore2:     1: In connect_keymint: Trying to get Legacy wrapper.
01-01 00:00:07.036   164   164 E keystore2:     2: Error::Km(ErrorCode(-68))
01-01 00:00:07.037   145   145 E vold    : keystore2 Keystore earlyBootEnded returned service specific error: -68
01-01 00:00:07.040     0     0 E vold    : keystore2 Keystore earlyBootEnded returned service specific error: -68
--------- beginning of main
01-01 00:00:10.947   205   205 E LegacySupport: Could not get passthrough implementation for android.hardware.audio@7.1::IDevicesFactory/default.
...
01-01 00:00:11.223   199   199 E TcUtils : NLMSG_ERROR message return error: -2
01-01 00:00:11.943   205   205 E LegacySupport: Could not get passthrough implementation for android.hardware.audio.effect@7.0::IEffectsFactory/default.
01-01 00:00:11.944   205   205 E LegacySupport: Could not get passthrough implementation for android.hardware.audio.effect@6.0::IEffectsFactory/default.
01-01 00:00:11.945   205   205 E LegacySupport: Could not get passthrough implementation for android.hardware.audio.effect@5.0::IEffectsFactory/default.
01-01 00:00:11.979   240   240 E bootstat: Failed to read /metadata/bootstat/persist.sys.boot.reason: No such file or directory
01-01 00:00:12.442   240   240 E bootstat: Failed to unlink /metadata/bootstat/persist.sys.boot.reason: No such file or directory
01-01 00:00:12.469   205   205 E LegacySupport: Could not get passthrough implementation for
...
01-01 00:00:14.392   223   223 E AudioFlinger: loadHwModule() error -22 loading module a2dp
01-01 00:00:14.424   226   309 E HWComposer: getSupportedContentTypes: getSupportedContentTypes failed for display 0: Unsupported (8)
01-01 00:00:14.442   223   223 E EffectsConfig: Could not parse effect configuration in any of the default locations.
01-01 00:00:14.672   214   214 E allo...@2.0-Allocator: gbm_mod_alloc() failed: -22 (Invalid argument)
01-01 00:00:14.673   226   311 E GraphicBufferAllocator: Failed to allocate (128 x 128) layerCount 1 format 22 usage 100: 5
01-01 00:00:16.151     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:17.045   263   263 E storaged: getService package_native failed
01-01 00:00:17.152     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:18.153     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:18.844   260   298 E ServiceUtilities: getInfo: Cannot find package_native
01-01 00:00:19.153     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:20.154     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:21.155     0     0 E init    : Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 136 (/system/bin/servicemanager)
01-01 00:00:21.298   200   200 E ActivityRecognitionHardware: activity_recognition HAL is deprecated. class_init is effectively a no-op
01-01 00:00:22.115   263   358 E storaged: getService package_native failed
..
03-19 09:33:06.977   384   466 E ActivityManager: at com.android.server.alarm.AlarmManagerService$AlarmThread.run(AlarmManagerService.java:4755)
03-19 09:47:16.167   384   548 E DisplayDeviceConfig: requesting nits when no mapping exists.
03-19 09:47:16.168   384   548 E DisplayDeviceConfig: requesting nits when no mapping exists.

Does any error look familiar to you and maybe you encountered before?

Thank you, have a great day!

Mohammad Hossein Heydarchi

unread,
Mar 29, 2023, 2:44:12 AM3/29/23
to Android-rpi
Hiii,

I can see some critical issues blocking the boot process. Not sure what you have done or if the image is built successfully. But they can be some good points to investigate.
1- 
01-01 00:00:04.142     0     0 E linkerconfig: Unable to access VNDK APEX at path: /apex/com.android.vndk.v33: No such file or directory
The VNDK Apex is responsible for maintaining the compatibility between the vendor implementation and the android framework that missing the VNDK Apex can cause incompatibility issues preventing botting up.

There might be an issue relating to the graphic driver, etc as well.

But I can see other issues as well. Could you send the dmesg out put and the logcat output separately through 2 files?

Gheorghe Prelipcean

unread,
Mar 31, 2023, 4:19:11 AM3/31/23
to Android-rpi
Thank you for the hint! This weekend I will dig deeper into the errors and try to understand them, but I never saw them and I find Android porting really hard.

I can't attach files here but I highlighted previously the errors seen on the terminal from logcat and systemd boot process, and below are the errors from dmesg:
...
[    2.783585] init: Using Android DT directory /proc/device-tree/firmware/android/
[    2.791342] init: Failed to read vbmeta partitions.
[    2.805756] mmc1: new high speed SDIO card at address 0001
...
[    3.347186] init: Loading APEX Sepolicy from /system/etc/selinux/apex/SEPolicy.zip
[    3.355121] init: Failed to open package /system/etc/selinux/apex/SEPolicy.zip: No such file or directory
[    3.391834] init: Loading SELinux policy
...
[    3.887724] init: Setting product property ro.product.model to 'Raspberry Pi 4' (from ro.product.product.model)
[    4.031359] cgroup: Disabled controller 'memory'
[    4.119313] linkerconfig: Unable to access VNDK APEX at path: /apex/com.android.vndk.v33: No such file or directory

[    4.192000] ueventd: ueventd started!
...
[    6.424175] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: nomblk_io_submit,errors=panic. Quota mode: none.
[    6.833381] incfs: IncFs_Features: failed to open features dir, assuming v1/none.: No such file or directory
[    6.992999] vold: keystore2 Keystore earlyBootEnded returned service specific error: -68

[    7.076881] logd: logd reinit
...
[   11.179948] healthd: battery none chg=
[   16.072617] init: Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 138 (/system/bin/servicemanager)
...
[   33.758918] cam-dummy-reg: disabling
[   34.104433] init: Control message: Could not find 'aidl/package_native' for ctl.interface_start from pid: 138 (/system/bin/servicemanager)
...
Near the end of boot there are a lot of init: Control message: Could not find 'aidl/package_native' errors.

Best regards!

Gheorghe Prelipcean

unread,
Apr 30, 2023, 1:47:51 PM4/30/23
to Android-rpi
After many tries and builds from different repos, I found out that I don't see anything on screen due to dtoverlay=vc4-kms-v3d , I have to use dtoverlay=vc4-fkms-v3d which is a "fake" kms and I would not have the hardware acceleration that kms is providing.

Does someone have any idea why on my board the vc4-kms-v3d is not working? I can only use vc4-fkms-v3d, I saw this issue also with some Yocto projects that I build for my board. Is my board faulty?

Gheorghe Prelipcean

unread,
Apr 30, 2023, 1:54:39 PM4/30/23
to Android-rpi
Even after more investigations I see the problem is the backlight, so when using kmd overlay I have no backlight, but if I flash light on TFT I see the graphics.

yammanuru karthik

unread,
Jun 6, 2023, 10:27:46 PM6/6/23
to Android-rpi
Hi Gheorghe Prelipcean 

" serial communication is working and I can run Linux commands from the console but Android graphical interface does not boot up " 

How did you achieved the above step. Actually I have flashed the Android 13 onto Raspberry Pi 4 , I am stuck at Android is Starting screen, could you please help me on how the serial communication. 

I want check the logs and see what is going wrong, but not sure how to do it. Please do reply back if you have something to share. 

Thank you !! 
boot_issue_android12.webm

Gheorghe Prelipcean

unread,
Jun 7, 2023, 3:23:37 AM6/7/23
to Android-rpi
raspberry-pi-serial-cable-connection.png
You need a serial cable, connect to Raspberry UART pins and from PC use a serial application like minicom (linux), teraterm (windows). Speed is 115200.

yammanuru karthik

unread,
Jun 8, 2023, 12:50:14 AM6/8/23
to Android-rpi
Thank you for the reply!! 

I am curious to know that if you have solved the boot issue of Android 13 on Raspberry pi 4  ? 

or have you tried any different android version and was successful on Flashing Android onto Raspberry Pi? 

will be helpful for me if you have something to share on this Gheorghe Prelipcean. 

Thank you !!

Gheorghe Prelipcean

unread,
Jul 13, 2023, 3:23:16 AM7/13/23
to Android-rpi
Hello again, yes I solved it, it was about the dtoverlay=vc4-kms-v3d, I need to use fkms instead of kms, the issue was the backlight. I also tried GloDroid and same issue I had. My board was booting and I could see the file systems and so on with serial connection, even mirror the screen on PC with scrcpy, so at that point I knew it was something else, and it has to do with those overlays.

yammanuru karthik

unread,
Jul 14, 2023, 4:45:43 AM7/14/23
to Android-rpi
Thank you for the reply Gheorghe Prelipcean 
have you followed the konstakang build steps in the github or anyother blog? or have you just cloned a branch from Android 13 and tried to flash it on RPI ? 

vegg v

unread,
Apr 6, 2024, 2:34:08 AMApr 6
to Android-rpi
Hello Everyone!
I'm encountering the same error you might have seen earlier related to SurfaceFlinger. My system is running kernel version 5.10 for Android 12 on an rk3399 board.

[   10.281857][  T248] fsck.f2fs: Info: Sections per zone = 1
[   10.281867][  T248] fsck.f2fs: Info: sector size = 4096
[   10.281875][  T248] fsck.f2fs: Info: total sectors = 6577583 (25693 MB)
[   10.282710][  T248] fsck.f2fs: Info: MKFS version
[   10.282724][  T248] fsck.f2fs:   "5.10.160"
[   10.282732][  T248] fsck.f2fs: Info: FSCK version
[   10.282740][  T248] fsck.f2fs:   from "5.10.160"
[   10.288188][  T217] init: Unable to set property 'ro.boottime.init.fsck.data' from uid:0 gid:0 pid:248: Read-only property was already set
[   10.289131][  T248] F2FS-fs (dm-7): Using encoding defined by superblock: utf8-12.1.0 with flags 0x0
[   10.308139][  T248] F2FS-fs (dm-7): Found nat_bits in checkpoint
[   10.388640][  T248] F2FS-fs (dm-7): Mounted with checkpoint version = 70ae8703
[   10.389268][  T217] init: Unable to set property 'ro.boottime.init.mount.data' from uid:0 gid:0 pid:248: Read-only property was already set
[   10.411726][    T1] init: Userdata mounted using /vendor/etc/fstab.rk30board result : 6
[   10.411824][    T1] init: Keyring created with id 593464845 in process 1
[   10.412084][    T1] init: Command 'mount_all /vendor/etc/fstab.${ro.hardware} --late' action=late-fs (/vendor/etc/init/hw/init.mount_all.rc:19) took 3465ms and succeeded
[   10.413781][    T1] init: starting service 'vendor.gralloc-4-0'...
[   10.417547][    T1] init: Control message: Processed ctl.interface_start for 'android.hardware.graphics.allocator@4.0::IAllocator/default' from pid: 240 (/system/bin/hw)
[   10.417828][    T1] init: processing action (late-fs) from (/vendor/etc/init/init.tune_io.rc:1)
[   10.418552][    T1] init: Control message: Processed ctl.interface_start for 'android.hardware.graphics.allocator@4.0::IAllocator/default' from pid: 240 (/system/bin/hw)
[   10.419206][    T1] init: Control message: Could not find 'aidl/SurfaceFlinger' for ctl.interface_start from pid: 239 (/system/bin/servicemanager)
[   10.509833][    T1] fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-ce"
[   10.560635][  T277] fscrypt: AES-256-XTS using implementation "xts-aes-ce"
INF USER-TA:TA_InvokeCommandEntryPoint:2132: -------1111-----TA_InvokeCommandEntryPoint------105

[   10.636544][  T255] type=1400 audit(1706687797.496:10): avc: denied { open } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s0" d1
[   10.637005][  T255] type=1400 audit(1706687797.496:11): avc: denied { getattr } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s01
[   10.637140][  T255] type=1400 audit(1706687797.496:12): avc: denied { map } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s0" de1
[   10.649055][  T364] apexd: This device does not support updatable APEX. Exiting
[   10.649145][  T364] apexd: Marking APEXd as activated
[   10.687978][  T309] binder_alloc: 271: binder_alloc_buf, no vma
[   10.688040][  T309] binder: 296:309 transaction failed 29189/-3, size 76-0 line 2929
[   10.697582][   T44] binder: undelivered transaction 502, process died.
[   10.697651][   T44] binder: release 271:281 transaction 423 in, still active
[   10.697660][   T44] binder: send failed reply for transaction 423 to 272:351
[   10.703794][   T44] binder: undelivered death notification, b400007d6fcc5f10
[   11.203942][  T255] type=1400 audit(1706687798.063:16): avc: denied { open } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s0" d1
[   11.204453][  T255] type=1400 audit(1706687798.063:17): avc: denied { getattr } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s01
[   11.204737][  T255] type=1400 audit(1706687798.063:18): avc: denied { map } for comm="crash_dump64" path="/dev/__properties__/u:object_r:qemu_sf_lcd_density_prop:s0" de1
[   11.204842][  T255] type=1400 audit(1706687798.063:19): avc: denied { open } for comm="crash_dump64" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev=1
[   11.204930][  T255] type=1400 audit(1706687798.063:20): avc: denied { getattr } for comm="crash_dump64" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" d1
[   11.205015][  T255] type=1400 audit(1706687798.063:21): avc: denied { map } for comm="crash_dump64" path="/dev/__properties__/u:object_r:hwservicemanager_prop:s0" dev="1
[   11.207118][  T245] logd: logdr: UID=1000 GID=1003 PID=397 n tail=0 logMask=8 pid=372 start=0ns deadline=0ns
[   11.207907][  T245] logd: logdr: UID=1000 GID=1003 PID=397 n tail=0 logMask=1 pid=372 start=0ns deadline=0ns
[   11.448218][  T417] apexd: This device does not support updatable APEX. Exiting
[   11.448274][  T417] apexd: Marking APEXd as ready
[   11.500115][  T255] type=1400 audit(1706687798.360:22): avc: denied { create } for comm="init" name="camera_tool" scontext=u:r:init:s0 tcontext=u:object_r:socket_device1
[   11.500426][  T255] type=1400 audit(1706687798.360:23): avc: denied { setattr } for comm="init" name="camera_tool" dev="tmpfs" ino=542 scontext=u:r:init:s0 tcontext=u:o1
[   11.896576][  T218] init: Verified that /data/nfc has the encryption policy c78c1accbc9d94cac8312f23d97fe3fd v2 modes 1/4 flags 0xa
[   11.897010][  T218] init: Inferred action different from explicit one, expected 0 but got 2
[   11.897458][  T218] init: Verified that /data/nfc/param has the encryption policy c78c1accbc9d94cac8312f23d97fe3fd v2 modes 1/4 flags 0xa
INF USER-TA:TA_OpenSessionEntryPoint:114: Hello Rockchip gatekeeper! rpmb :0


INF USER-TA:TA_OpenSessionEntryPoint:96: Hello Rockchip Weaver! rpmb :0


[   12.155450][  T469] healthd: No battery devices found
[   12.169427][  T469] healthd: battery none chg=u
[   12.254916][  T218] file system registered
[   12.265484][  T218] using random self ethernet address
[   12.265625][  T218] using random host ethernet address
[   12.638008][  T309] binder_alloc: 488: binder_alloc_buf, no vma
[   12.638084][  T309] binder: 296:309 transaction failed 29189/-3, size 76-0 line 2929
[   12.659496][  T191] binder: undelivered transaction 1404, process died.
[   12.659665][  T191] binder: release 488:531 transaction 1354 in, still active
[   12.659682][  T191] binder: send failed reply for transaction 1354 to 406:529
[   12.678742][   T46] binder: undelivered death notification, b4000070f5e29e50
[   12.724399][  T562] read descriptors
[   12.724471][  T562] read strings
[   13.656460][  T598] dwc3 fe800000.usb: device reset
[   13.749078][  T598] dwc3 fe800000.usb: device reset
[   13.859799][   T15] android_work: sent uevent USB_STATE=CONNECTED
[   13.895686][   T15] android_work: sent uevent USB_STATE=CONFIGURED
[   16.108685][    T1] init: starting service 'audioserver'...
[   16.114691][    T1] init: processing action (init.svc.audioserver=running) from (/system/etc/init/audioserver.rc:38)
[   16.115212][    T1] init: starting service 'vendor.audio-hal'...
[   16.117603][  T646] libprocessgroup: Failed to open /dev/stune/foreground/tasks: No such file or directory
[   16.117663][  T646] libprocessgroup: Failed to apply HighPerformance task profile: No such file or directory
[   16.122337][    T1] init: Command 'start vendor.audio-hal-4-0-msd' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:40) took 0ms and failed: serviced
[   16.122509][    T1] init: Command 'start audio_proxy_service' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:41) took 0ms and failed: service audid
[   16.122563][    T1] init: Command 'start vendor.audio-hal-2-0' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:43) took 0ms and failed: service vend
[   16.122645][    T1] init: Command 'start audio-hal-2-0' action=init.svc.audioserver=running (/system/etc/init/audioserver.rc:44) took 0ms and failed: service audio-hal-d
[   16.125214][  T647] libprocessgroup: Failed to open /dev/stune/foreground/tasks: No such file or directory


I am not able to attach log file here so these are the logs for your reference.
Could you please guide me on how to troubleshoot this error?

Thanks in advance for your help. :)

Reply all
Reply to author
Forward
0 new messages