• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DEV][ROM][UNOFFICIAL] LineageOS 14.1 (Android 7.1.2) for Raspberry Pi 3 B

Search This thread

JavaLord

New member
Nov 10, 2018
3
0
Recovery

Hello. Can someone send me recovery image or zip file? Maybe i can use recovery and scripts for entering it from this image for emteria android image
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Hello. Can someone send me recovery image or zip file? Maybe i can use recovery and scripts for entering it from this image for emteria android image

No. This is not the right place to ask tech support for other distributions either.

First of all Raspberry Pi doesn't have boot/recovery images/partitions in the traditional sense like other Android devices (as this is not an Android device to begin with). TWRP image included in this image only works with this build because of the partition structure. You couldn't even switch TWRP images included in LineageOS 14.1 and LineageOS 15.1 builds because of this (Oreo has additional vendor partition).
 

Doom Mortal

New member
Mar 29, 2014
3
1
Hello KonstaT,

I want to thank you very much for your work and thanks to all the contributors.
I tried to build your lineage build from scratch but it fails with this message:
Code:
[email protected]:/home/adminroot/Schreibtisch/android# . build/envsetup.sh
including device/brcm/rpi3/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
[email protected]:/home/adminroot/Schreibtisch/android# lunch lineage_rpi3-userdebug
Trying dependencies-only mode on a non-existing device tree?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20181129-UNOFFICIAL-rpi3
TARGET_PRODUCT=lineage_rpi3
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-39-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/adminroot/Schreibtisch/android/out
WITH_SU=true
============================================
[email protected]:/home/adminroot/Schreibtisch/android# mka kernel ramdisk systemimage vendorimage
make: Verzeichnis „/home/adminroot/Schreibtisch/android“ wird betreten
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20181129-UNOFFICIAL-rpi3
TARGET_PRODUCT=lineage_rpi3
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-39-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/adminroot/Schreibtisch/android/out
WITH_SU=true
============================================
Running kati to generate build-lineage_rpi3.ninja...
Environment variable BUILD_NUMBER was modified (ec2d02c89e => bc2453d5a1), regenerating...
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20181129-UNOFFICIAL-rpi3
TARGET_PRODUCT=lineage_rpi3
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-39-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/adminroot/Schreibtisch/android/out
WITH_SU=true
============================================
external/libdrm/libkms/Android.mk:21: invalid GPU drivers: vc4
Starting build with ninja
ninja: Entering directory `.'
[  0% 4/33264] Lex: aidl <= system/tools/aidl/aidl_language_l.ll
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/adminroot/Schreibtisch/android/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Zusicherung >>cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))<< nicht erf?llt.
Aborted (core dumped)
[  0% 4/33264] host Java: jarjar (/hom...IBRARIES/jarjar_intermediates/classes)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Verzeichnis „/home/adminroot/Schreibtisch/android“ wird verlassen

#### make failed to build some targets (22 seconds) ####

[email protected]:/home/adminroot/Schreibtisch/android#

Do you have a clue what is the problem ?

Thanks in advance.
 

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Hello KonstaT,

I want to thank you very much for your work and thanks to all the contributors.
I tried to build your lineage build from scratch but it fails with this message:
Code:
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -o/home/adminroot/Schreibtisch/android/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_l.cpp system/tools/aidl/aidl_language_l.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Zusicherung >>cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))<< nicht erf?llt.
Aborted (core dumped)

Do you have a clue what is the problem ?

Thanks in advance.

Quick Google search tells me this is known issue building with Ubuntu 18.04. Try one of the suggested workarounds.

https://groups.google.com/forum/#!topic/android-building/0kzPnw3akxg
https://stackoverflow.com/questions/49301627/android-7-1-2-armv7
 
Last edited:

Doom Mortal

New member
Mar 29, 2014
3
1
Thank you very much for for that hint, finally I was successfull.
I was so irritated of the message that the vc4 driver wasnt found, that I thought that this is the problem.
Unfortunately after that i had to type various other commands and da a lot of error research to make it finally work.

Here are the instructions to make it work on Xubuntu 18 hope it helps who are struggeling too:
Minmum specs for your Ubuntu installation: 110GB till 120GB HDD and 6Gb till 8GB RAM.

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openjdk-8-jdk
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip

sudo apt-get install kpartx python-mako
repo init -u git://github.com/LineageOS/android.git -b lineage-14.1
curl --create-dirs -L -o .repo/local_manifests/manifest_brcm_rpi3.xml -O -L https://raw.githubusercontent.com/lineage-rpi/android_local_manifest/lineage-15.1/manifest_brcm_rpi3.xml
repo sync


--> Copy these patches
https://github.com/lineage-rpi/android_local_manifest/tree/cm-14.1/patches
to the corresponding directory and execute the following command:

cd path/to/project
git am patchname.patch



export LC_ALL=C

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx24096m"
out/host/linux-x86/bin/jack-admin kill-server
out/host/linux-x86/bin/jack-admin start-server

. build/envsetup.sh
lunch lineage_rpi3-userdebug
mka kernel ramdisk systemimage

if it fails execute:
make update-api

And finally execute:
cd device/brcm/rpi3
sudo ./mkimg.sh

My God I was spending at least two days with that topic.
I have only one more question. I havent tested it yet, but will it work when I clone the new mesa3d library sources to the project ?
Is it neccesary to adapt some of the project code ?

Thank you for your time. :)
 
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Thank you very much for for that hint, finally I was successfull.

I have only one more question. I havent tested it yet, but will it work when I clone the new mesa3d library sources to the project ?
Is it neccesary to adapt some of the project code ?

Well done. :)

I wish it was that simple. There's a lot of moving parts (MESA, libdrm, drm_gralloc, gralloc, hwcomposer, and even kernel).
 

quintez

Member
Apr 3, 2017
15
5
Munich
Magisk

Hello,
is there a way to flash Magisk with your ROM ? I always got an error, tried magisk v16 - v18.

I also tried, as suggested, to flash with BootBridge, still not working.

Any ideas ?

Greets
 

Attachments

  • 20181225_012032.jpg
    20181225_012032.jpg
    133.8 KB · Views: 66

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Hello,
is there a way to flash Magisk with your ROM ? I always got an error, tried magisk v16 - v18.

I also tried, as suggested, to flash with BootBridge, still not working.

Any ideas ?

Greets

Please see FAQ how to enable built-in root access management. Third party mods (Magisk, Xposed, etc) are unsupported.

Boot partition on Raspberry Pi is different to any other Android device (as this not an Android device to begin with) so the Magisk installer doesn't know how to handle it (patching ramdisk is part of the installation process).
 

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
  • Like
Reactions: micdesa

quintez

Member
Apr 3, 2017
15
5
Munich
Please see FAQ how to enable built-in root access management. Third party mods (Magisk, Xposed, etc) are unsupported.

Boot partition on Raspberry Pi is different to any other Android device (as this not an Android device to begin with) so the Magisk installer doesn't know how to handle it (patching ramdisk is part of the installation process).

Hello,

i don't really need root access, i need to "hide" root and Custom ROM, like Magisk does. I want to run the Sky Go App on my Raspi because the Android Version is running smoother than the Windows Version. The problem is that the app does not run on Custom ROM, the stream starts, but stops immediately with an error message. Thanks anyway for providing your ROM.

Greets
 

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Hello,

i don't really need root access, i need to "hide" root and Custom ROM, like Magisk does. I want to run the Sky Go App on my Raspi because the Android Version is running smoother than the Windows Version. The problem is that the app does not run on Custom ROM, the stream starts, but stops immediately with an error message. Thanks anyway for providing your ROM.

Greets

This build has a kernel side patch that hides su binary if root access is not enabled from the setting (Settings -> Developer options -> Root access).

You're probably talking about SafetyNet (https://lineageos.org/Safetynet/) which is a completely different thing than having root access (checking root access is only a part of SafetyNet tests).
 

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Basically I need Modbus over RS485, but your info suggests this is achievable, even if through adapters. Or is there something equivalent in there already?

Well, I'm no electronics expert and this is the first I'm hearing about Modbus over RS-485. I had quick search and it seems this requires some tweaking even with Raspbian so I doubt it's going to work out-of-the-box here either. Achievable maybe if you're willing to see the effort.
 

tb2668

Member
Mar 9, 2013
29
3
Hi, first of all: Great work!
Android boot flawless.

However, when I try to enter TWRP by following the FAQ (at least I think I am) the RPi ends up in a boot loop.
All I do are the following steps:
1) activate developer options
2) activate root for ADB and Apps in developer options
3) activate local terminal in developer options
4) open the terminal app
5) enter "su"
6) grant root access
7) enter "rpi3-recovery.sh"
8) enter "reboot"
From that point on the RPi seems to be in a boot loop with the monitor just flickering every 10 sec or so.

Did I miss a step?
Thanks!
 

KonstaT

Senior Member
Jan 20, 2016
439
299
KonstaKANG.com
Hi, first of all: Great work!
Android boot flawless.

However, when I try to enter TWRP by following the FAQ (at least I think I am) the RPi ends up in a boot loop.
All I do are the following steps:
1) activate developer options
2) activate root for ADB and Apps in developer options
3) activate local terminal in developer options
4) open the terminal app
5) enter "su"
6) grant root access
7) enter "rpi3-recovery.sh"
8) enter "reboot"
From that point on the RPi seems to be in a boot loop with the monitor just flickering every 10 sec or so.

Did I miss a step?
Thanks!

Your steps look fine. Could be an issue with compatibility with your monitor or something else went wrong.

There's really no proper way to boot between Android and recovery on this device (as this is not an Android device to begin with). You can check rpi3-recovery.sh script and make the same changes manually (rename ramdisk files and change some properties in config.txt) after mounting the sdcard on your computer.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    How to install:
    1. Follow the official Raspberry Pi instructions for writing the image to the SD card (Linux, Mac, Windows).

    FAQ:

    Q: I can’t find developer options, why?
    A: Settings -> About phone -> Click ‘Build number’ several times

    Q: I don’t have reboot options in power menu, why?
    A: Settings -> Developer options -> Advanced restart

    Q: I have no root, why? What is that hashtag on my status bar?
    A: You need enable root access under Settings -> Developer options -> Root access. Root management is now integrated as part of LineageOS’ Privacy Guard and you can manage per app permissions under Settings -> Developer options -> Manage root access. You’ll have a persistent notification in the status bar when you’re running an app that uses root permissions.

    Q: I have official 7” LCD display and touchscreen. What should I do?
    A: Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> Developer options -> Local terminal) and reboot your device:
    Code:
    su
    rpi3-display.sh

    Q: Settings -> Storage shows xx GB used by system. There’s unallocated space on my sdcard. What should I do?
    A: This is a 4 GB image, remaining space on your sdcard will remain unallocated. Settings app shows unallocated space as used by system which in reality it is not. You can use e.g. GParted and extend /data partition (/dev/block/mmcblk0p3) to cover the unallocated space. Resizing the partition manually will break support for encrypting /data. Format /data in TWRP recovery (Wipe->Format data) after resizing to leave required space for crypto footer.

    Q: Raspberry Pi doesn’t have power button, how do I power off/reboot my device?
    A: Following keyboard keys work as Android buttons: F1 = Home, F2 = Back, F3 = Multi-tasking, F4 = Menu, F5 = Power, F11 = Volume down, and F12 = Volume up. You can also use one of many third party reboot applications.

    Q: How to boot to TWRP recovery?
    A: There’s currently no proper way to boot between Android and TWRP, but this can achieved by renaming the ramdisk you want to boot. Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> Developer options -> Local terminal) and reboot your device:

    Code:
    su
    rpi3-recovery.sh
    If mouse cursor doesn’t appear, try replugging your mouse.

    Q: How to boot out of TWRP recovery?
    A: Flash my recovery2boot zip in TWRP.

    Q: How to install Google apps?
    1. Download open_gapps-arm-7.1-pico-xxxxxxxx.zip and save it to your device’s internal storage or use an external USB drive
    2. Boot to TWRP recovery (see FAQ)
    3. Install open_gapps-arm-7.1-pico-xxxxxxxx.zip from your selected storage
    4. Wipe->Factory reset!
    5. Boot out of recovery (see FAQ)
    1
    Merged commits not mentioned in the changelog.

    17.8. changelog:
    • include TWRP 3.2.3-0 custom recovery (see FAQ how to boot)
    • fix Gallery app crashing (and likely various third party apps as well)
    • add support for encrypting the device
    • merge AOSP kernel/common android-4.4-n branch to have proper Android Nougat kernel
    • update to Linux 4.4.148 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 August 2018 (merged)

    15.6. changelog:
    • add support for USB webcams (UVC) with third party USB webcam apps
    • default to noop I/O scheduler
    • update to Linux 4.4.137 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 June 2018 (merged)

    15.4. changelog:
    • update audio HAL (fix USB microphone, etc)
    • add support for external USB GPS dongles (1546:01a7 U-Blox AG, etc - GPS dongle must be plugged-in while booting the device)
    • update to Linux 4.4.127 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 April 2018 (merged)

    18.1. 2018 changelog:
    • add support for I2C devices
    • enable Android low-RAM configuration
    • add lights HAL to control display brightness from Android on offical RPI display (version 1.1)
    • update to Linux 4.4.112 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 January 2018 (merged)

    17.11. changelog:
    • fix wifi reconnect on boot (thanks to Google)
    • update to Linux 4.4.97 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • patch recently disclosed BlueBorne and KRACK vulnerabilities (merged)
    • Android security patch level: 5 October 2017 (merged)

    10.8. changelog:
    • update to Linux 4.4.80 kernel
    • merge AOSP kernel/common android-4.4 branch to have proper Android kernel
    • enable sdcardfs
    • add BFQ i/o scheduler and enable it by default
    • Jelly browser (merged)
    • Android security patch level: 5 August 2017 (merged)

    16.4. changelog:
    • add support for wifi tethering
    • add support for Widevine DRM
    • improve Play Store compatibility
    • Android 7.1.2 (merged)
    • Android security patch level: 5 April 2017 (merged)

    11.4. changelog:
    • initial relase

    Previous builds:
    1
    Yes. It worked this time after only flashing the recovery2boot zip file. Thank you.
    1
    Its possible to update ROM via recovery?

    No, not currently. Partition structure (especially boot partition) on this device is different than on Android devices usually (well, as Raspberry is not an Android device to begin with). It would require some quite significant modifications to LineageOS build system to build recovery flashable ROM zips for this device (it's all open source so you're welcome to have a crack at it). There's also no proper way to cold boot (from power off) to recovery which makes it less useful than on other devices. I only included TWRP recently and it's currently mostly just used for installing gapps.
    1
    So no way for updating ROM without loose data?

    No, not currently and who said there was going to be any updates. :p

    Well, you can actually restore your previous /data partition in TWRP after you've installed a new image.