With several months hardware, The Raspberry Pi 3B and 3B+ can finally run Android 9 pie system.
Features:
1. Bootloader: u-boot as AndroidThings on RPi 3B v.1.0.4, run on 64-bit mode
2. Kernel: v.4.14.71 run on 64-bit mode
3. Display: 720p(1280×720) @ 60Hz through on board HDMI port
4. Audio: analog, 2 channel through on board audio jack
5. WiFi: 2.4G (RPi 3B & 3B+), 5G (RPi 3B+)
6. Bluetooth: HCI over UART(ttyAMA0), RPi 3B: 921600bps no flow control; RPi 3B+: 3000000bps with flow control with a2dp and bt-pan(no test yet) support.
7. Ethernet: both work, and IP from DHCP
8. OpenGL render: based on mesa3d vc4 driver.
9. Hardware composer based on drm_hwcomposer (overlay has been disabled due to mis-compose in some satuation)
Knowing issue:
1. Enable `Debug GPU overdraw’ in system settings will make app crash
2. Enable `Debug non-retangular clip operations’ in system settings will make app crash
3. Do not disable `Disable HW overlays’ in system settings
4. Audio over HDMI not support
5. Can not play video
You can check the demo video on youtube at https://youtu.be/tJJetgz53OI (Normal record speed)
The performance is quite acceptable
The image can be download from https://www.brobwind.com/wp-content/upl ... f2b.bin.gz
Thanks
Re: Android Pie on RPi 3B(+) with hardware acceleration
Awesome, great work! Thanks for sharing this. 
Can you tell more about the hardware accelerated graphics? I see you're using latest MESA 19. Are you using mainline drm_hwcomposer and drm_gralloc as well? Getting the mainline graphics working with VC4 would be a huge win. Are you planning on open sourcing you efforts?
I see you've also got bluetooth working on Pi 3 B+.

Can you tell more about the hardware accelerated graphics? I see you're using latest MESA 19. Are you using mainline drm_hwcomposer and drm_gralloc as well? Getting the mainline graphics working with VC4 would be a huge win. Are you planning on open sourcing you efforts?
I see you've also got bluetooth working on Pi 3 B+.

KonstaKANG.com
Re: Android Pie on RPi 3B(+) with hardware acceleration
How does Android Pie run on the Pi 3? Is it usable?
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
https://github.com/CodeExecution/Ubuntu-ARM64-RPi
Re: Android Pie on RPi 3B(+) with hardware acceleration
On my Pi 3B (non-plus) it was a mixed bag, but I'd call it "sluggish" over-all, "very sluggish" at times. I kept getting "App not responding" alerts, and eventually it just froze.
IMO; not on my Pi 3B, unless one were only using it for running signage apps or similar.
Konsta's Linneage OS 14 build ( Android 7.1.2 ) has been the most responsive I have found in trying various Androids for the Pi.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Good Job. I tried the image on RPi3 and it works well.
I would like to build it from source. Pls. share link for the source.
I would like to build it from source. Pls. share link for the source.
hzak wrote: ↑Sat Jan 26, 2019 4:50 pmWith several months hardware, The Raspberry Pi 3B and 3B+ can finally run Android 9 pie system.
Features:
1. Bootloader: u-boot as AndroidThings on RPi 3B v.1.0.4, run on 64-bit mode
2. Kernel: v.4.14.71 run on 64-bit mode
3. Display: 720p(1280×720) @ 60Hz through on board HDMI port
4. Audio: analog, 2 channel through on board audio jack
5. WiFi: 2.4G (RPi 3B & 3B+), 5G (RPi 3B+)
6. Bluetooth: HCI over UART(ttyAMA0), RPi 3B: 921600bps no flow control; RPi 3B+: 3000000bps with flow control with a2dp and bt-pan(no test yet) support.
7. Ethernet: both work, and IP from DHCP
8. OpenGL render: based on mesa3d vc4 driver.
9. Hardware composer based on drm_hwcomposer (overlay has been disabled due to mis-compose in some satuation)
Knowing issue:
1. Enable `Debug GPU overdraw’ in system settings will make app crash
2. Enable `Debug non-retangular clip operations’ in system settings will make app crash
3. Do not disable `Disable HW overlays’ in system settings
4. Audio over HDMI not support
5. Can not play video
You can check the demo video on youtube at https://youtu.be/tJJetgz53OI (Normal record speed)
The performance is quite acceptable
The image can be download from https://www.brobwind.com/wp-content/upl ... f2b.bin.gz
Thanks
Re: Android Pie on RPi 3B(+) with hardware acceleration
Yes, I use the mainline drm_hwcomposer with a little modification to make it work, but I do not use the drm_gralloc (don't how to make it work), I use the minigbm for gralloc from chromium project (also needs a little modification) and it works pretty well with the latest mesa 3d source code.Konsta wrote: ↑Sun Jan 27, 2019 7:09 amAwesome, great work! Thanks for sharing this.
Can you tell more about the hardware accelerated graphics? I see you're using latest MESA 19. Are you using mainline drm_hwcomposer and drm_gralloc as well? Getting the mainline graphics working with VC4 would be a huge win. Are you planning on open sourcing you efforts?
I see you've also got bluetooth working on Pi 3 B+.![]()
The source code will be public at the end of this month and hope someone can fix these problems and make it better.
Thanks
Re: Android Pie on RPi 3B(+) with hardware acceleration
I will try the image later.(due to problem in download file from androidfilehost in my country).hippy wrote: ↑Sun Jan 27, 2019 8:06 pmOn my Pi 3B (non-plus) it was a mixed bag, but I'd call it "sluggish" over-all, "very sluggish" at times. I kept getting "App not responding" alerts, and eventually it just froze.
IMO; not on my Pi 3B, unless one were only using it for running signage apps or similar.
Konsta's Linneage OS 14 build ( Android 7.1.2 ) has been the most responsive I have found in trying various Androids for the Pi.
Due to the hardware composer(HW overlay) has been disabled, I think this will great impact the system performance.
Please try to enable the hw overlay as I mentioned in the first post and check the performance.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Yes, The source code will be available at the end of this month.selvapsk wrote: ↑Thu Jan 31, 2019 7:31 amGood Job. I tried the image on RPi3 and it works well.
I would like to build it from source. Pls. share link for the source.
hzak wrote: ↑Sat Jan 26, 2019 4:50 pmWith several months hardware, The Raspberry Pi 3B and 3B+ can finally run Android 9 pie system.
Features:
1. Bootloader: u-boot as AndroidThings on RPi 3B v.1.0.4, run on 64-bit mode
2. Kernel: v.4.14.71 run on 64-bit mode
3. Display: 720p(1280×720) @ 60Hz through on board HDMI port
4. Audio: analog, 2 channel through on board audio jack
5. WiFi: 2.4G (RPi 3B & 3B+), 5G (RPi 3B+)
6. Bluetooth: HCI over UART(ttyAMA0), RPi 3B: 921600bps no flow control; RPi 3B+: 3000000bps with flow control with a2dp and bt-pan(no test yet) support.
7. Ethernet: both work, and IP from DHCP
8. OpenGL render: based on mesa3d vc4 driver.
9. Hardware composer based on drm_hwcomposer (overlay has been disabled due to mis-compose in some satuation)
Knowing issue:
1. Enable `Debug GPU overdraw’ in system settings will make app crash
2. Enable `Debug non-retangular clip operations’ in system settings will make app crash
3. Do not disable `Disable HW overlays’ in system settings
4. Audio over HDMI not support
5. Can not play video
You can check the demo video on youtube at https://youtu.be/tJJetgz53OI (Normal record speed)
The performance is quite acceptable
The image can be download from https://www.brobwind.com/wp-content/upl ... f2b.bin.gz
Thanks
Thanks
Re: Android Pie on RPi 3B(+) with hardware acceleration
All I can see in the first post is "3. Do not disable `Disable HW overlays’ in system settings"; not quite the same as make sure it's enabled. I used it as it came but will check that is enabled next time I boot up Android Pie.
Re: Android Pie on RPi 3B(+) with hardware acceleration
In order to minimize the modification of the Android source code, I create a simple App to do this job (locate in /system/priv-app/RPiTool).
It will disable HW overlays when system booted.
You can either uncheck the HW overlays options (It will take effect immediately) or remove the app and reboot the system.
Then verify it by go to system settings -> Sound -> Phone ringtone, try to select a ringtone, then you will find the cursor is under the Phone ringtone dialog (drm hwcomposer miscompose the layers).
adb connect <your ip>
adb shell dumpsys SurfaceFlinger
In the `Display 0 HWC layers' section, If the Comp Type is Device, the layer is using hardware composer, it will save about 16ms to display on the screen compared to the Client type. (When disable HW overlays, all layers' Comp Type is Client, using GPU to compose the layer, it will take longer)
Re: Android Pie on RPi 3B(+) with hardware acceleration
Great, thanks for the info. I tested AOSP version of minigbm with drm_hwcomposer and MESA at some point. Also tested drm_gralloc and gbm_gralloc but unfortunately didn't have much luck with any of these.hzak wrote: ↑Sun Feb 03, 2019 3:29 pmYes, I use the mainline drm_hwcomposer with a little modification to make it work, but I do not use the drm_gralloc (don't how to make it work), I use the minigbm for gralloc from chromium project (also needs a little modification) and it works pretty well with the latest mesa 3d source code.
The source code will be public at the end of this month and hope someone can fix these problems and make it better.
Yeah, hopefully Android community on Raspberry Pi can help you sort out the remaining issues once the source code is available.

KonstaKANG.com
Re: Android Pie on RPi 3B(+) with hardware acceleration
Some source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
You can build it from source code now.
Thanks
Re: Android Pie on RPi 3B(+) with hardware acceleration
I see display HALs and MESA are in binary form which unfortunately doesn't help open source development (nor anyone can help you fix the remaining issues). Are you planning on releasing the source code?hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Linux kernel and U-Boot are licensed under GPLv2 (https://www.gnu.org/licenses/old-licens ... .0.en.html) which obligates you to provide source code matching the binaries you're distributing. There's no source code available for those parts (just binaries) which is not in compliance with the license.
KonstaKANG.com
Re: Android Pie on RPi 3B(+) with hardware acceleration
Yes, all will be open source soon.Konsta wrote: ↑Sun Feb 10, 2019 8:37 amI see display HALs and MESA are in binary form which unfortunately doesn't help open source development (nor anyone can help you fix the remaining issues). Are you planning on releasing the source code?hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Linux kernel and U-Boot are licensed under GPLv2 (https://www.gnu.org/licenses/old-licens ... .0.en.html) which obligates you to provide source code matching the binaries you're distributing. There's no source code available for those parts (just binaries) which is not in compliance with the license.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Great, good to hear.hzak wrote: ↑Sun Feb 10, 2019 10:37 amYes, all will be open source soon.Konsta wrote: ↑Sun Feb 10, 2019 8:37 amI see display HALs and MESA are in binary form which unfortunately doesn't help open source development (nor anyone can help you fix the remaining issues). Are you planning on releasing the source code?hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Linux kernel and U-Boot are licensed under GPLv2 (https://www.gnu.org/licenses/old-licens ... .0.en.html) which obligates you to provide source code matching the binaries you're distributing. There's no source code available for those parts (just binaries) which is not in compliance with the license.

KonstaKANG.com
Re: Android Pie on RPi 3B(+) with hardware acceleration
Tested it here on Rpi 3b.
It runs very smoothly.
Nice job. I hope this will continue.
It runs very smoothly.

Nice job. I hope this will continue.
Re: Android Pie on RPi 3B(+) with hardware acceleration
I builded it from the source per as you described.hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Now I have the images boot.img, rpiboot.img system.img, vendor.img and userdata.img.
Can you please describe how to write the images to a sdcard?
I have tried making partitions manually and writing the data from the images to it but it doesn't boot.
Thanks.
Re: Android Pie on RPi 3B(+) with hardware acceleration
The instructions can be found here: https://github.com/brobwind/pie-device- ... /README.mdMister_Ed wrote: ↑Fri Feb 15, 2019 8:53 amI builded it from the source per as you described.hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Now I have the images boot.img, rpiboot.img system.img, vendor.img and userdata.img.
Can you please describe how to write the images to a sdcard?
I have tried making partitions manually and writing the data from the images to it but it doesn't boot.
Thanks.
I will upload a script to create partition later.
Thanks.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Hi.
Awesome job!
Some questions about screen resolution:
Is your resolution of 1024x720 hard coded? I'm trying to get this screen to behave: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(B), but modifying config.txt with the reccomended settings (settings from code block below) from the user manual do nothing.
I plugged my pi 3 B+ into an ordinary computer monitor that can handle higher resolutions, but I couldn't find anywhere to define screen resolution in the android settings.
So how do I define the correct resolution for that screen in your android version?
I also would like to ask how I can access a bootloader so that I can add things like GAPPS?
Awesome job!
Some questions about screen resolution:
Is your resolution of 1024x720 hard coded? I'm trying to get this screen to behave: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(B), but modifying config.txt with the reccomended settings (settings from code block below) from the user manual do nothing.
Code: Select all
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
So how do I define the correct resolution for that screen in your android version?
I also would like to ask how I can access a bootloader so that I can add things like GAPPS?
Re: Android Pie on RPi 3B(+) with hardware acceleration
Yes, the screen resolution is 1280x720 and hard code in cmdline.txt as kernel parameter: drm_kms_helper.edid_firmware=edid/1280x720.binimelsom wrote: ↑Tue Feb 19, 2019 7:38 amHi.
Awesome job!
Some questions about screen resolution:
Is your resolution of 1024x720 hard coded? I'm trying to get this screen to behave: https://www.waveshare.com/wiki/7inch_HDMI_LCD_(B), but modifying config.txt with the reccomended settings (settings from code block below) from the user manual do nothing.
I plugged my pi 3 B+ into an ordinary computer monitor that can handle higher resolutions, but I couldn't find anywhere to define screen resolution in the android settings.Code: Select all
max_usb_current=1 hdmi_group=2 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0 hdmi_drive=1
So how do I define the correct resolution for that screen in your android version?
Please try to remove the kernel parameter and check if it can work or not.
You can refer this: https://developer.android.com/things/ha ... al-consoleI also would like to ask how I can access a bootloader so that I can add things like GAPPS?
or https://github.com/brobwind/pie-device- ... /README.md
to flash your own system images.
Or you can use adb command to install apps.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Thank you very much for your reply and your help 

Re: Android Pie on RPi 3B(+) with hardware acceleration
I've tried several options but it's not working when I change anything in cmdline.txt and/or config.txt.Yes, the screen resolution is 1280x720 and hard code in cmdline.txt as kernel parameter: drm_kms_helper.edid_firmware=edid/1280x720.bin
Please try to remove the kernel parameter and check if it can work or not.
Is there some other solution?
My 1080p TV at home will refuse the current 720p settings, as soon the Pi boots the screen freezes.
Thank you.
Re: Android Pie on RPi 3B(+) with hardware acceleration
Reasons for fixed the screen resolution to 720p:Mister_Ed wrote: ↑Mon Feb 25, 2019 2:23 pmI've tried several options but it's not working when I change anything in cmdline.txt and/or config.txt.Yes, the screen resolution is 1280x720 and hard code in cmdline.txt as kernel parameter: drm_kms_helper.edid_firmware=edid/1280x720.bin
Please try to remove the kernel parameter and check if it can work or not.
Is there some other solution?
My 1080p TV at home will refuse the current 720p settings, as soon the Pi boots the screen freezes.
Thank you.
1. The vc4/v3d GPU limited the texture size to 2048x2048.
2. And the original Android framework will require to create a max(width, height) * 2 texture.
I changed the texture size to max(width, height) * 1.4, so the maximum screen width or height should not exceed to 2048/1.4 = 1462.
(https://github.com/brobwind/pie-device- ... -framework)
3. Larger screen size/resolution will take more GPU/CMA memory and impact system performance.
4. 720p resolution is one of the most widely used.
EDID/HDMI debugging:
You can follow this document to check why your changes not take effect: https://github.com/raspberrypi/document ... /README.md
After that, you should disable the debug mode or the bluetooth will not work (both uses the PL011 ?)
(Apply HDMI related parameters in config.txt will not take effect, that's why I apply it on kernel?)
Kernel and EDID binary:
I have already uploaded the my kernel source code to https://github.com/brobwind/pie-device- ... rnel-v4.14
The kernel built-in support EDID could be found in drivers/gpu/drm/drm_edid_load.c.
720p EDID binary that I used locate at firmware/edid folder.
You can follow this guide to make EDID binary: Documentation/EDID/HOWTO.txt.
And place the binary to firmware/edid folder(the kernel configuration file .config may also need to update).
Re: Android Pie on RPi 3B(+) with hardware acceleration
Hi,hzak wrote: ↑Fri Feb 15, 2019 5:50 pmThe instructions can be found here: https://github.com/brobwind/pie-device- ... /README.mdMister_Ed wrote: ↑Fri Feb 15, 2019 8:53 amI builded it from the source per as you described.hzak wrote: ↑Sun Feb 10, 2019 6:10 amSome source code has been upload to github: https://github.com/brobwind/pie-device-brobwind-rpi3
You can build it from source code now.
Thanks
Now I have the images boot.img, rpiboot.img system.img, vendor.img and userdata.img.
Can you please describe how to write the images to a sdcard?
I have tried making partitions manually and writing the data from the images to it but it doesn't boot.
Thanks.
I will upload a script to create partition later.
Thanks.
I want to know how to launch u-boot to write Android images on Raspberry Pi.
I think it is necessary to write some files including u-boot.bin to SD card.
Is detail procudere described somewhere except for below page?
https://github.com/brobwind/pie-device- ... /README.md
Thanks.