Diskio Pi Community

The ultime Open Source Tablet.

You are not logged in.

#1 2017-02-17 09:28:38

Gaara14
Administrator

How to install Android on Raspberry Pi (1920x1080 resolution)

This tutorial is available only for Raspberry Pi 3. To run with Raspberry Pi 2, see this link.


******************************************************
Edit 2018:

This tutorial is no longer relevant because AndroidRT is abandonned, but you can still install LineageOS, an Open Source system based on Android 7.1.
A new tutorial to install LineageOS and gapps (google play) is available here -> link

******************************************************


It explains how to install Android with 1920x1080 resolution, works with any full HD screen.

With time, a special image for Diskio Pi will be available.

The version choosen is RTAndroid, it's not an official version from the fundation, but works well and still in development. Thanks to Igor Kalkov for his development.
The touch screen is supported, and the USB DAC too.


Prerequies:
- A formated 8Gb SD card, with UHS speed class 4. Class 10 is recommended.
- A SD card adapter
- A linux PC host to burn the SD card. Windows users should use a Live-CD or VirtualBox.
- Gparted if you use Ubuntu, or other partition soft.

1: Download the image.

Go to this page: https://rtandroid.embedded.rwth-aachen. … pberry-pi/ to download the latest image file.

2: Unzip the downloaded package.

cd Downloads
unzip rtandroid-[VERSION]-[DATE]-rpi3.zip -d .

3: Edit the file "boot/config.txt" for desired resolution. You can find more informations here or here.
For DiskioPi, the screen is 1920x1080. You can run Android with this resolution:

hdmi_mode=82

If you prefer run android in 1280x720 resolution, keep

hdmi_mode=85

To enable USB sound, add these lines in config.txt:

hdmi_ignore_edid_audio=1
hdmi_ignore_edid=0xa5000080

4: Insert your SD card in your PC.

5: Find the device name of the SD card. Several methods can be used.

- Terminal method:

sudo fdisk -l
and find the letter correspond to your SD card.

- Graphical method:
You can check with Gparted the SD card name. You can also delete all partition already created before.

The name will be /dev/sdX (/dev/sde for example)

Be sure of this name, the next operation will delete all data of the device.

6: Burn the SD card:
On the terminal, run the install script:
Use the "-p" flag to partition your card.
Use the "-f" flag to format your card.

cd rtandroid-aosp-7.1-20170211-rpi3
./install.sh -p -f /dev/sdX

with X your specific letter found in step 5

The script will create 4 partitions and burn the system.
Finally, you should have this:

 * Copying new system files...
   - mounting the boot partition to /media/rpi-sd
   - copying boot files
   - unmounting the boot partition
   - writing the system image
2048+0 enregistrements lus
2048+0 enregistrements écrits
2147483648 bytes (2,1 GB, 2,0 GiB) copied, 234,006 s, 9,2 MB/s

Installation successful. You can now put your sdcard in the RPi.

7: If you have chosen 1280x720 resolution, you can remove your SD card from the PC and put it into the raspberry pi and power it on.
Next step is 9.

8: In the case of 1920x1080 resolution:

Mount the SD card. (I remove the card and re-plug, more easier)
Go to the system partition.

Comment (add #) before this line:
debug.drm.mode.force=1280x720

and add these lines:

debug.drm.mode.force=1792x1008
ro.sf.lcd_density=166

Find

ro.sf.lcd_density=213

and comment this line.

The file should be:

#debug.drm.mode.force=1280x720
debug.drm.mode.force=1792x1008
ro.sf.lcd_density=166
[...]
#ro.sf.lcd_density=213

Save and close gedit.

Then, the system will start with 1792x1008 resolution.
To have a real 1920x1080 resolution, there's a command to send when Android will be started (see step 10).

You can unmount & remove your SD card from the PC and put it into the raspberry pi and power it on.

9: Gapps Installation:
Gapps is a suite of Android software including Google Play Store.

Your Android is runing on your RPi. You must be connected (wifi or Ethenet)

Settings -> Wifi -> Wifi ON -> Add your passphrase

Then, get the IP adress:

Setting -> About tablet -> Statut

The IP adress is like 192.168.1.xx

With the host PC, open a terminal, then:

Edit the gapps.sh file and find the ADB_ADDRESS="" line.
add your IP adress like this:

ADB_ADDRESS="192.168.1.xx"

Save, close.

and execute the script:

./gapps.sh -a arm

You must maybe install some package (lzip or other)

Wait until the script end, the Raspberry must reboot.

All done, you should have Google Play Store installed!

10: Set the 1920x1080 resolution:

With the PC host, enter this (the Raspberry Pi must be connected)

To connect your PC with the Android RT,

adb connect 192.168.1.xx

and set the new resolution:

adb shell wm size 1920x1080

Limitations of this method:
At this time, we can not set the build.prop file with 1920x1080 resolution. The resolution is not reconized by the screen.

I will add corrections if I find a better method. (Or if I manage to modify/compile a custom image for Diskio Pi @RPi)

Have fun!

Guillaume

Sources: https://rtandroid.embedded.rwth-aachen. … pberry-pi/
https://www.td72pro.com/accueil/2017/2/ … hd-franais
RT Android Google group: https://groups.google.com/forum/#!forum/android-rpi

Offline

#2 2018-02-05 10:53:13

Gaara14
Administrator

Re: How to install Android on Raspberry Pi (1920x1080 resolution)

Here will be soon a complete tutorial to install LineageOS with gapps.
LineageOS is an Open Source fork of Android, based on the 7.1 version.


Prerequies:
- A Linux system, tested on x64. Should work also with x86
- A Raspberry Pi 3 ! (with power, screen etc)
- SD card, class 10 / 8Gb or 16Gb, 32Gb is perfect to install many apps



1) INSTALL LINEAGEOS

1.1) The best way to burn images is Etcher
Install it (with adding the repo, or only the package)

1.2) Download the latest LineageOS image.
http://konstakang.com/devices/rpi3/CM14.1/

1.3) Please note the number version! Today, it's 20180118. We will need it later.

1.4) Unzip the archive, and use Etcher to burn it on your SD card.
When it's done, put the SD card in the Pi and boot it.
Setup the wifi or ethernet with the interface.



2) SETUP LINEAGEOS

2.1) Developer mode:
Settings -> About tablet -> Click ‘Build number’ several times

2.2) Root access:
You need to enable root access under Settings -> Developer options -> Root access

2.3) Note the IP adress:
Settings -> About tablet -> Statut



3) INSTALL GAPPS

3.1) On your Ubuntu PC, create a folder:

mkdir ~/lineageos
cd ~/lineageos

3.2) Click on this link (on a new tab):
https://www.diskiopi.com/archives/gapps.sh
Copy the contents and paste in a new file, named gapps.sh
The script is based on the AndroidRT script, a little modified.

nano gapps.sh

3.3) Now, you must set up the script with adding the version number (here 20180118) and the IP adress (192.168.1.xx) of the Pi like this:

TIMESTAMP="20180203"
VERSION="7.1"
VARIANT="pico"

SHOW_HELP=false
ADB_ADDRESS="192.168.1.xx"
ARCHITECTURE="arm"
PACKAGE_NAME="pico"
INIT_FILE="/etc/init.d/gapps"

When ok, save ([ctrl]+[o]) and quit ([ctrl]+[x])

3.4) Make it executable and launch the script:

chmod +x ~/lineageos/gapps.sh
./gapps.sh

Install the dependancies if needed

3.5) Wait for the reboot of the Pi, and enjoy !

Here is the result: https://youtu.be/J6_xciWE890

Optional: install SuperSU from the Play Store, and an app to reboot/shutdown !

Source: https://raspbian-france.fr/installer-an … pberry-pi/

***************
If you liked this tutorial, take a look at our crowdfunding, we need your support to build the third prototype of the ultimate open source tablet ! Thanks smile

https://www.ulule.com/diskio-pi/
***************

Offline

#3 2018-04-02 17:18:28

bevangg
Member

Re: How to install Android on Raspberry Pi (1920x1080 resolution)

Hi when I try to run the script I get this:

pi@am8:~ $ cd ~/lineageos
pi@am8:~/lineageos $ chmod +x ~/lineageos/gapps.sh
pi@am8:~/lineageos $ ./gapps.sh
GApps installation script
Used package: open_gapps-arm-7.1-pico-20180203.zip
./gapps.sh: line 222: adb: command not found
ADB version: 
ADB IP address: 192.168.0.43

ERR: adb not found. Please install: "phablet-tools"
pi@am8:~/lineageos $ 

Any ideas? I tried substituting 20180203 with 20180111118 and got the same error. Also if I do finally get it to work is there any way to set the resolution to arbitrary values? I have  7 inch 1024 x 600 touchscreen that would be nice to get working.

Cheers

Offline

#4 2018-04-02 17:29:40

Gaara14
Administrator

Re: How to install Android on Raspberry Pi (1920x1080 resolution)

Hi,
The script must be execuded on a Linux PC, not on the Pi.
You must install the package android-tools-adb on the PC, and lunch the script with the Pi, connected via wifi or ethernet

Offline

#5 2018-04-03 06:35:25

bevangg
Member

Re: How to install Android on Raspberry Pi (1920x1080 resolution)

Ok thanks for the quick reply. I was trying do use one pi to run the script on another. I will give it a go with an ubuntu vm.
Cheers. Any ideas on the display resolution?

Offline

#6 2018-04-03 07:12:58

Gaara14
Administrator

Re: How to install Android on Raspberry Pi (1920x1080 resolution)

Ah ok, I havn't tried via another Pi.
Maybe you can try to install phablet-tools, like it says !
Be also sure about the IP adress of the second Pi.

About the screen, no idea, I'm sorry !

Offline

Users in this topic: 0 guests, 0 registered users

Board footer

Powered by FluxBB