[alpha] Android 13 for Odroid C4 with mainline kernel 5.15
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
[alpha] Android 13 for Odroid C4 with mainline kernel 5.15
The first release of my Android build:
https://www.dropbox.com/s/zw01i8copmqt3 ... ar.gz?dl=0
It's a first version and it remains a lot of work to make it more complete and eliminate some errors.
At init process of Android the userdata partition will resize to maximum free space. On my 16GB emmc I have >12GB free space.
Works:
- audio over hdmi, over s/pdif, over usb, over bluetooth
- gpiomem and wiringPi
- logo is shown, but only for some seconds
- wifi dongle rtl8192eu based
- rooting with Magisk, but version 24.x, not 25.x
Doesn't work, or wip:
- devicetree overlays
- wifi dongles rtl8811au, rtl8188eu based, like Odroid or Edimax, and others maybe...
- gps
- spi, pwm, onewire
A lot of things are not tested:
- google apps
- video
- etc
.
https://www.dropbox.com/s/zw01i8copmqt3 ... ar.gz?dl=0
It's a first version and it remains a lot of work to make it more complete and eliminate some errors.
At init process of Android the userdata partition will resize to maximum free space. On my 16GB emmc I have >12GB free space.
Works:
- audio over hdmi, over s/pdif, over usb, over bluetooth
- gpiomem and wiringPi
- logo is shown, but only for some seconds
- wifi dongle rtl8192eu based
- rooting with Magisk, but version 24.x, not 25.x
Doesn't work, or wip:
- devicetree overlays
- wifi dongles rtl8811au, rtl8188eu based, like Odroid or Edimax, and others maybe...
- gps
- spi, pwm, onewire
A lot of things are not tested:
- google apps
- video
- etc
.
Last edited by joerg on Mon Jan 30, 2023 5:38 am, edited 2 times in total.
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
HowTo Section
Install to emmc card (only!):
Be sure which device is your emmc card!
Or use other flashing tool.
Install Magisk:
https://github.com/topjohnwu/Magisk/rel ... -v24.3.apk
Install to emmc card (only!):
Be sure which device is your emmc card!
Code: Select all
#dd if=Android13-20230129-odroidc4.img of=/dev/sdX bs=1M
#sync
Install Magisk:
https://github.com/topjohnwu/Magisk/rel ... -v24.3.apk
Code: Select all
adb shell
#su
#dd if=/dev/block/by-name/boot of=boot.img
//In Magisk Manager use patch file method...
#dd if=magisk_patched-24300_xxxx.img of=/dev/block/by-name/boot
#reboot
Last edited by joerg on Mon Jan 30, 2023 12:21 am, edited 1 time in total.
- odroid
- Site Admin
- Posts: 40517
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English, Korean
- ODROIDs: ODROID
- Has thanked: 2998 times
- Been thanked: 1662 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Nice to meet UpsideDownCake on a modern Kernel 5.15 

- voodik
- Posts: 2347
- Joined: Sat Dec 07, 2013 2:36 am
- languages_spoken: armenian, english, russian
- Location: Armenia
- Has thanked: 77 times
- Been thanked: 584 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Great!
Can i know which mali, gralloc and hwcomposer modules you use ?
Can i know which mali, gralloc and hwcomposer modules you use ?
Buy me a beer 
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY
https://github.com/voodik/puttyadb/releases

https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY

https://github.com/voodik/puttyadb/releases
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Hello voodik, I used the configuration from https://source.android.com/docs/setup/c ... m3l_boards, specially from VIM3L as this board has the same cpu architecture
BTW. a lot is not working yet. I am searching for USB Bluetooth solution. Android 13 has now Gabeldorsche as Bluetooth stack and it lacks of well documentation...
More things are not working:
MTP device, USB configuration wrong
HDMI-CEC, does bootloop when is included in image.
HDMI or S/PDIF audio does not work, but USB audio yes
I was wondering that the graphics stack is working out of the box:
Gralloc is delivered with the yukawa device repo:
Midgard Mali is from kernel source:
Kernel sources are cloned from:
Hwcomposer is delivered with android sources in:
meson-sm1
.BTW. a lot is not working yet. I am searching for USB Bluetooth solution. Android 13 has now Gabeldorsche as Bluetooth stack and it lacks of well documentation...
More things are not working:
MTP device, USB configuration wrong
HDMI-CEC, does bootloop when is included in image.
HDMI or S/PDIF audio does not work, but USB audio yes
I was wondering that the graphics stack is working out of the box:
Gralloc is delivered with the yukawa device repo:
device/amlogic/yukawa/hal/gralloc
.Midgard Mali is from kernel source:
drivers/gpu/arm/midgard
Kernel sources are cloned from:
git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.15
with the meson_defconfig
and the meson-sm1-odroid-c4.dtb
.Hwcomposer is delivered with android sources in:
external/drm_hwcomposer
and added as hwcomposer.drm_meson
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
I made a step forward with Bluetooth. I copied the firmware of my Asus dongle, rtl8761 based, to wrong folder. Now I can enable the Bluetooth and I can find my JBL headphones, can pair, but no sound.
And I have this:
[edit]
It works! I had to pair the JBL LIVE460NC with headphone symbol, not the JBL LIVE460NC-LE LowEnergy!

And I have this:
servicemanager: Could not find android.hardware.bluetooth.IBluetoothHci/default in the VINTF manifest.
. I tried already to add it to manifest.xml...[edit]
It works! I had to pair the JBL LIVE460NC with headphone symbol, not the JBL LIVE460NC-LE LowEnergy!
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Now the MTP file access over the otg port is working.
It was a wrong symlink in the Android sources in
Must be:
But was:
As the old form is not any more present in modern kernel. There is missing
I also changed the vid pid to Nexus/Pixel. After reboot my LinuxMint didn't mount the odroid-c4 and I had to change the udev rules in
I have searched too much time for all this. 
Now I would like to make some install makefile to generate the GPT partition table, flash the meson mainline u-boot and all the other images as boot.img, super.img etc directly to emmc.

It was a wrong symlink in the Android sources in
system/core/rootdir/init.usb.configfs.rc
Must be:
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
But was:
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
As the old form is not any more present in modern kernel. There is missing
f_mtd.c
and config CONFIG_USB_CONFIGFS_F_MTP
I also changed the vid pid to Nexus/Pixel. After reboot my LinuxMint didn't mount the odroid-c4 and I had to change the udev rules in
51-android.rules
for it to:
Code: Select all
ATTR{idProduct}=="4ee1", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
ATTR{idProduct}=="4ee2", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"

Now I would like to make some install makefile to generate the GPT partition table, flash the meson mainline u-boot and all the other images as boot.img, super.img etc directly to emmc.
- voodik
- Posts: 2347
- Joined: Sat Dec 07, 2013 2:36 am
- languages_spoken: armenian, english, russian
- Location: Armenia
- Has thanked: 77 times
- Been thanked: 584 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
What about video hw decode/encode ?joerg wrote: ↑Sun Jan 22, 2023 12:59 amNow the MTP file access over the otg port is working.![]()
It was a wrong symlink in the Android sources insystem/core/rootdir/init.usb.configfs.rc
Must be:
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
But was:
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
As the old form is not any more present in modern kernel. There is missingf_mtd.c
and configCONFIG_USB_CONFIGFS_F_MTP
I also changed the vid pid to Nexus/Pixel. After reboot my LinuxMint didn't mount the odroid-c4 and I had to change the udev rules in51-android.rules
for it to:I have searched too much time for all this.Code: Select all
ATTR{idProduct}=="4ee1", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k" ATTR{idProduct}=="4ee2", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
Now I would like to make some install makefile to generate the GPT partition table, flash the meson mainline u-boot and all the other images as boot.img, super.img etc directly to emmc.
I working on almost same for N2, but for now just hdmi output is working ))) no audio, no decoders etc)
Buy me a beer 
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY
https://github.com/voodik/puttyadb/releases

https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY

https://github.com/voodik/puttyadb/releases
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
As always I appreciate your work.
I never came in touch with video hw decode/encode. Pls tell me what and how I need to test for it?
I never came in touch with video hw decode/encode. Pls tell me what and how I need to test for it?
- voodik
- Posts: 2347
- Joined: Sat Dec 07, 2013 2:36 am
- languages_spoken: armenian, english, russian
- Location: Armenia
- Has thanked: 77 times
- Been thanked: 584 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Nothing))
Only software decoders/encoders are listed

https://android.googlesource.com/device ... codecs.xml
Buy me a beer 
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY
https://github.com/voodik/puttyadb/releases

https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY

https://github.com/voodik/puttyadb/releases
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
I found the right setting for getting hdmi audio working!
Mixer paths have been wrong, must be (mixer_paths_hdmi_only.xml):
Now I am searching solution for S/PDIF out. I need it for my All-In-One PC in living room connected to the Onkyo amplifier.

Mixer paths have been wrong, must be (mixer_paths_hdmi_only.xml):
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<mixer>
<!-- FIXME: This should be moved to the appropriate path -->
<!-- Enable HDMITX Control from TDM A -->
<ctl name="TOHDMITX Switch" value="1" />
<ctl name="TOHDMITX I2S SRC" value="I2S B" />
<!-- PCM0 to TDMB -->
<ctl name="TDMOUT_B SRC SEL" value="IN 0" />
<ctl name="FRDDR_A SINK 1 SEL" value="OUT 1" />
<ctl name="FRDDR_A SRC 1 EN Switch" value="1" />
</mixer>
ctl name="FRDDR_A SINK 1 SEL" value="OUT 1"
and ctl name="TOHDMITX I2S SRC" value="I2S B"
did the trick.Now I am searching solution for S/PDIF out. I need it for my All-In-One PC in living room connected to the Onkyo amplifier.
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Sound over S/PDIF also working!
I had to patch the device tree to add spdifout node and add this line to mixer paths xml:
This results in sound output at both hdmi and s/pdif connector.
I had to patch the device tree to add spdifout node and add this line to mixer paths xml:
Code: Select all
<ctl name="FRDDR_A SINK 3 SEL" value="OUT 3" />
<ctl name="FRDDR_A SRC 3 EN Switch" value="1" />
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Now I managed also making wiringPi working and using with my app.
The libraries can't longer be on vendor partition at
BTW. I was not yet able to make a functional install script.
The manual installation process is somehow complicated:
-Flash mainline u-boot to emmc.
-Boot up Odroid C4 to fastboot.
-Command
-For partitions boot, super, cache, recovery, dtbo, userdata, odm command
-Primary GPT header resides at the same address range as u-boot. Need to remove the emmc and flash u-boot again.
-Now primary GPT isn't there anymore. U-boot is patched to accept the backup GPT header.
-Put emmc again and boot up Android.
My script should do this all, but in the way not to use u-boot with fastboot to make and flash the partitions. Ready to put the emmc to the C4 to boot up.
I can make the partitions and write the images to a loop device. But when I try to flash the emmc with this created whole image and flash afterwards u-boot, u-boot boots up, but the kernel is not found.
If I flash u-boot before to the loop device and flash all to emmc, it does not boot up u-boot.

The libraries can't longer be on vendor partition at
/vendor/lib64
. They must be on system partition and library name must be added to public.libraries.txt
also on system partition.BTW. I was not yet able to make a functional install script.
The manual installation process is somehow complicated:
-Flash mainline u-boot to emmc.
-Boot up Odroid C4 to fastboot.
-Command
fastboot oem format
to make the GPT partition table and the 10 partitions.-For partitions boot, super, cache, recovery, dtbo, userdata, odm command
fastboot flash ...
.-Primary GPT header resides at the same address range as u-boot. Need to remove the emmc and flash u-boot again.
-Now primary GPT isn't there anymore. U-boot is patched to accept the backup GPT header.

-Put emmc again and boot up Android.
My script should do this all, but in the way not to use u-boot with fastboot to make and flash the partitions. Ready to put the emmc to the C4 to boot up.
I can make the partitions and write the images to a loop device. But when I try to flash the emmc with this created whole image and flash afterwards u-boot, u-boot boots up, but the kernel is not found.
If I flash u-boot before to the loop device and flash all to emmc, it does not boot up u-boot.
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
I make progress with my script to flash whole Android image included u-boot to emmc. But I need to figure out, how to resize the userdata partition at first start.
I have some options: Use u-boot, use recovery or use Android init process.
Once I am ready with it, I would like to publish the image, so others could give it a try.
What would be the best and free file host service for this about 1GB image?
I have some options: Use u-boot, use recovery or use Android init process.
Once I am ready with it, I would like to publish the image, so others could give it a try.
What would be the best and free file host service for this about 1GB image?
- rooted
- Posts: 9968
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Has thanked: 777 times
- Been thanked: 580 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
@mdrjr will provide you with the necessary storage I bet, or even Hardkernel
- joerg
- Posts: 1752
- Joined: Tue Apr 01, 2014 2:14 am
- languages_spoken: german, english, español
- ODROIDs: C1, C1+, C2, N1, N2, C4
- Location: Germany
- Has thanked: 157 times
- Been thanked: 341 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
I have ready a first image that can be flashed to emmc. If someone like to try it out, stay tuned. Need to upload it to a file host service...
- voodik
- Posts: 2347
- Joined: Sat Dec 07, 2013 2:36 am
- languages_spoken: armenian, english, russian
- Location: Armenia
- Has thanked: 77 times
- Been thanked: 584 times
- Contact:
Re: First impression of Android 13 with mainline kernel 5.15
Google drive?))
Buy me a beer 
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY
https://github.com/voodik/puttyadb/releases

https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY

https://github.com/voodik/puttyadb/releases
Who is online
Users browsing this forum: No registered users and 2 guests