android-rpi / device_brcm_rpi3

576 stars 253 forks source link

Android OS for RPI4? #123

Closed titanity closed 4 years ago

titanity commented 4 years ago

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

saurabhin25 commented 4 years ago

Even i am searching

saurabhin25 commented 4 years ago

Android oR crankshaft still searching for rpi4

ghost commented 4 years ago

I'm working on it: https://github.com/RaspberryPiFan/device_brcm_rpi4

saurabhin25 commented 4 years ago

Waiting for android 10 on my rpi4

ghost commented 4 years ago

Build it!

ghost commented 4 years ago

https://github.com/RaspberryPiFan/local_manifests

saurabhin25 commented 4 years ago

How to download

titanity commented 4 years ago

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

ghost commented 4 years ago

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?

ghost commented 4 years ago

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

ghost commented 4 years ago

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
ghost commented 4 years ago

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

ghost commented 4 years ago
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:/

saurabhin25 commented 4 years ago

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

ghost commented 4 years ago

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.

saurabhin25 commented 4 years ago

Okay ur name will be written with golden words

ghost commented 4 years ago

@saurabhin25 Do you have an PC with Windows 10?

ghost commented 4 years ago

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.

titanity commented 4 years ago

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

saurabhin25 commented 4 years ago

Yes i have windws 10

titanity commented 4 years ago

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

titanity commented 4 years ago

https://ibb.co/nz3bN8M

Berisan commented 4 years ago

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

ghost commented 4 years ago

You're doing it wrong.

saurabhin25 commented 4 years ago

I have windows 10 pc please help me

ghost commented 4 years ago

Yes, do you have the latest win10 version?

saurabhin25 commented 4 years ago

Yes

ghost commented 4 years ago

Open PowerShell as administrator

ghost commented 4 years ago

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

ghost commented 4 years ago

Reboot your PC and install this: https://www.microsoft.com/store/apps/9MSVKQC78PK6

ghost commented 4 years ago

Tell me when you're finished.

ghost commented 4 years ago

@saurabhin25 Did it work?

ghost commented 4 years ago

@saurabhin25 ?

Berisan commented 4 years ago

@RaspberryPiFan the branch name was changed. https://github.com/android-rpi/local_manifests/commit/67d814a03af6bd86d96ec5aa509d6a52d3fcc5af

ghost commented 4 years ago

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

saurabhin25 commented 4 years ago

Please make a downloadable file please

titanity commented 4 years ago

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

saurabhin25 commented 4 years ago

Ur name will be written with golden words

ghost commented 4 years ago

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

titanity commented 4 years ago

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.

titanity commented 4 years ago

this message i got after 10 mins runtime

ghost commented 4 years ago

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

saurabhin25 commented 4 years ago

Can i build this on buster

titanity commented 4 years ago

No you need a pc with linux

titanity commented 4 years ago

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

ghost commented 4 years ago
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
ghost commented 4 years ago

This will take some time...

ghost commented 4 years ago

Further comments: https://github.com/RaspberryPiFan/device_brcm_rpi4/issues/1

botswanabub commented 4 years ago

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

saurabhin25 commented 4 years ago

@titanity done?