android-rpi/device_brcm_rpi3

Android OS for RPI4?

titanity opened this issue · 95 comments

Android OS for RPI4? Cant find it anywhere on the net...

Even i am searching

Android oR crankshaft still searching for rpi4

Waiting for android 10 on my rpi4

Build it!

How to download

RaspberryPiFan i cant wait to see it. Do you have a finished image ready to burn to USB for the 4gb version?

RaspberryPiFan i cant wait to see it. Do you have a finished image ready to burn to USB for the 4gb version?

No, I'm sorry, I haven't build or tested this, but I'm going to do it soon. Do you need an tutorial how to build it yourself?

You can't build this on Windows or on Raspberry Pi, you need an PC with linux

Run this on Debian or Ubuntu:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
cd
mkdir android
cd android
repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r2
git clone https://github.com/RaspberryPiFan/local_manifests .repo/local_manifests -b android-10
repo sync
sudo apt install gcc-arm-linux-gnueabihf libssl-dev
cd kernel/rpi
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2711_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs
cd ../..
sudo apt install python-mako
lunch rpi3-eng
make ramdisk systemimage vendorimage

Next step:

Prepare sd card

Partitions of the card should be set-up like followings.
p1 256MB for BOOT : Do fdisk : W95 FAT32(LBA) & Bootable, mkfs.vfat
p2 640MB for /system : Do fdisk, new primary partition
p3 128MB for /vendor : Do fdisk, new primary partition
p4 remainings for /data : Do fdisk, mkfs.ext4
Set volume label for /data partition as userdata
: use -L option of mkfs.ext4, e2label command, or -n option of mkfs.vfat

cd out/target/product/rpi4
sudo dd if=system.img of=/dev/<p2> bs=1M
sudo dd if=vendor.img of=/dev/<p3> bs=1M

replace <p2> and <p3> with the partition

Copy
device/brcm/rpi4/boot/* to p1:/
kernel/rpi/arch/arm/boot/zImage to p1:/
kernel/rpi/arch/arm/boot/dts/bcm2711-rpi-4-b.dtb to p1:/
kernel/rpi/arch/arm/boot/dts/overlays/vc4-kms-v3d.dtbo to p1:/overlays/vc4-kms-v3d.dtbo
out/target/product/rpi4/ramdisk.img to p1:/

Sorry i am a newbee cant do this...please make a downloadable file if u can ... Its been a month searching for android for my rpi4

Sorry i am a newbee cant do this...please make a downloadable file if u can ... Its been a month searching for android for my rpi4

Sorry, I can't do this at the moment, but eventually next week.

Okay ur name will be written with golden words

@saurabhin25 Do you have an PC with Windows 10?

If yes, I can tell you how to build it.
But you can't use your PC while building.
And I don't know if it works.

Yes i do and i also got ubuntu and win10 together as multiboot

Yes i have windws 10

when i run :
git clone https://github.com/android-rpi/local_manifests .repo/local_manifests -b android-10
in Ubuntu it says :
Remote branch android-10 not found in upstream origin

The branch name doesn't exist, try:
git clone https://github.com/android-rpi/local_manifests .repo/local_manifests -b android10

You're doing it wrong.

I have windows 10 pc please help me

Yes, do you have the latest win10 version?

Open PowerShell as administrator

Type Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Tell me when you're finished.

@saurabhin25 Did it work?

It was a typo, I wanted to use my repository. https://github.com/RaspberryPiFan/local_manifests

Please make a downloadable file please

RaspberryPiFan do you know how many people waiting for android for RPI4 atm? You are really gonna be famous if you can make a working android for RPI4... Specially if its android 10. Im on discord with ppl who is quite famous on youtube who didnt even finish a image yet

Ur name will be written with golden words

I don't know if it works, but if someone wants to build it yourself, I can tell him how.

You use teamspeak? i got my own private server if so... im building atm...

i had a stop when repo sync .. it said:

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

this message i got after 10 mins runtime

You can contact me at discord https://discord.gg/kf4ZPqP

Can i build this on buster

No you need a pc with linux

@raspberrypifan Let me know if you get the time today. Because im done with the first part. But im stuck at compiling the kernel

git clone https://github.com/raspberrypi/tools ~/tools
echo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc
source ~/.bashrc
sudo apt-get install git bison flex libssl-dev

This will take some time...

received this

HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c:97:10: fatal error: sys/types.h: Datei oder Verzeichnis nicht gefunden #include <sys/types.h> ^~~~~~~~~~~~~ compilation terminated. scripts/Makefile.host:90: recipe for target 'scripts/basic/fixdep' failed make[1]: *** [scripts/basic/fixdep] Error 1 Makefile:467: recipe for target 'scripts_basic' failed make: *** [scripts_basic] Error 2

while

ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2711_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config

@botswanabub Du kannst mit mir Deutsch sprechen.

Ich arbeite am Problem.

@titanity The conection doesn't works

@raspberrypifan auch gut, aber vielleicht haben ja andere auch das Problem.
Leider bin ich auf dem Feld absolut unerfahren, daher kann ich da nicht wirklich mit helfen.

Waiting for the release

@botswanabub Ich konnte dein Problem nicht reproduzieren. Ich arbeite gemeinsam mit @titanity am Build, dabei ist der Fehler nicht aufgetreten. Warte am besten auf die fertige Version, wahrscheinlich erscheint sie schon morgen.

wenn ich dir mit ner Info helfen kann, sage bescheid. Ansonst vielleicht noch:

nach dem SYNC scheitert es bei mir grundsätzlich schon daran, dass er das Verzeichnis gar nicht geladen hat: cd kernel/rpi

nach dem SYNC scheitert es bei mir grundsätzlich schon daran, dass er das Verzeichnis gar nicht geladen hat: cd kernel/rpi

Das Problem gab es manchmal bei mir auch.
Ich update nochmal meine Repos und sag es dir dann.

New lunch-install
envsetup.txt

You because you were really annoying and not contributing anything.

No, but I'll tell you when it's finished.

Okay

Any updates? What abt that boot error and mesa?

sudo apt install gcc-arm-linux-gnueabihf libssl-dev python-mako git bison flex curl
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir ~/android
cd ~/android
repo init -u https://android.googlesource.com/platform/manifest -b android-10.0.0_r2
git clone https://github.com/RaspberryPiFan/local_manifests .repo/local_manifests -b android-10
repo sync
source device/brcm/rpi3/envsetup.sh
cd kernel/rpi
git clone https://github.com/raspberrypi/tools ~/tools
echo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc
source ~/.bashrc
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2711_defconfig kernel/configs/android-base.config kernel/configs/android-base-arm.config kernel/configs/android-recommended.config
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage dtbs 
cd ../..
lunch rpi3-eng
make ramdisk systemimage vendorimage -j4

Downloadable image? Or i have to run these cmds in buster?

Please let me know the abt the progress

Downloadable image? Or i have to run these cmds in buster?

Run the cmds in buster

Progress: Trying to switch from mesa3d to swiftshader

36% now.

@saurabhin25 I unbanned saurabhgupta25 now, but you'll be read-only.
https://discord.gg/DQr3aU

rp4k commented

Hi is there any update for this thread about the burnable image for rasberry pi 4b 4gb version

This sources i am able to build. but when i flashed into SD-card and try to boot the device 3B+ i get a black screen and i see the RED LED light always on. i don't see the Green one on not even once.
SO ONLY RPI4 is supported. if you how to modify the changes for 3b+ please let know the steps or any document is available.

regards,
Nageswara

This sources i am able to build. but when i flashed into SD-card and try to boot the device 3B+ i get a black screen and i see the RED LED light always on. i don't see the Green one on not even once.
SO ONLY RPI4 is supported. if you how to modify the changes for 3b+ please let know the steps or any document is available.

regards,
Nageswara

Nageswara where can i DL the suported image file for RPI4 so i can test it? Join the discord and write me if you got the llink... im eager to see if you get it to work

This sources i am able to build. but when i flashed into SD-card and try to boot the device 3B+ i get a black screen and i see the RED LED light always on. i don't see the Green one on not even once.
SO ONLY RPI4 is supported. if you how to modify the changes for 3b+ please let know the steps or any document is available.
regards,
Nageswara

Nageswara where can i DL the suported image file for RPI4 so i can test it? Join the discord and write me if you got the llink... im eager to see if you get it to work

i downloaded the sources from the steps mentioned in
https://github.com/android-rpi/local_manifests/tree/android10
as well as
https://github.com/android-rpi/device_brcm_rpi3/tree/android10
then i built the sources to get all the necesssary bianries.
i flashed the build into the SD card.
Latest updates: i am able to boot the raspberry pi 3b+ with the build from above sources.
but the display is not up.
from the shell i can see the Kernel and Android are up and running but not display.

regards,
Nageswara

I havent learn to compile or edit yet. Thats why i follow what you guys are talking about to see if i can learn a bit. Started 1 year ago with my first board RPI3b and didnt know anything about arm, computing, linux or anything. And didnt have anyone at all to ask or talk to about the new world with the small computers and the new OS called linux. So after 4 months of 100% fail missions in linux then i had my very first victory. compiling a u-boot for a armbian OS... which was a automated script (.sh) haha. but then again i learned how to start the script (sudo ./learnlinuxffsnow.sh) all i experienced with small board computing i have learned from forums and youtube and still doing it the day today. So i search for android OS for RPI4 4gb in a compiled and ready to burn image file. Enough of my boring non knowledge history. I have been searching for it every day since i bought the RPI4. Asked on many youtubers comment section for the iso file.... Nothing yet. So thats why i cant wait until the day where i can drop a iso file onto micro sd and start up a android OS. IF android 10 is the version then we make history which isnt completed yet at all in the world. So my father just died and left me a computer which i installed linux on and told raspberrypifan he can use it as he likes, do what he wants to get closer to a final build. So i hope we get there in time before everyone else :)

endline: its friken a huge step for me that i get to know RPIfan in this thread. He is the very first i ever could ask question to and got the help i needed. So cant thank him enough. and i hope this new community here dont walk away even after the goal is reached!

@karnatinagesh I think you should not post that in this issue. This repo is for Raspberry Pi 3B and 3B+. Do you want a compiled build for 3B+?

And what sources did you build?

@karnatinagesh Use device_brcm_rpi3, it's working on pi 3b+

Hello @raspberrypifan, i have got the swiftshader display up on a raspberry pi 4, very early stage, android10 with the basic ui for android TV, it is barely usable, but I'll see how far I can get with it

@vonneucode great work! is the build/code available online?