• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

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

Search This thread

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
@KonstaT
I have made a choice.
I have made a fork of your build that i will mod a bit on so it will be a TV edition and make my touch on the build.
But credit goes to you at the moment do to that the build right now is a copy of your work.

This is my repo.
I hope that fork is okay. If theres some detail theres not okay then pleace tell me so i can change it.

That's fine. Linux kernel is licensed under GPLv2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) and you need to be aware of this when you work with open source software. XDA has their own additional rules regarding that stickied on each forum (https://forum.xda-developers.com/showthread.php?t=2645321).
 
  • Like
Reactions: clockstoper

jjakajonas

Senior Member
Dec 4, 2015
329
27
30
Hornbæk
  • Like
Reactions: clockstoper

Paul_it

New member
Nov 8, 2018
4
2
Milan
Hi and thanks for the great work with the builds, but I’m having a problem with both 15.1 and 14.1 builds and I hope you can help me. I wrote an app that needs root access and privacy guards pops up correctly and asks me to grant it, I tick remember my choice and allow, but whenever the system is rebooted the choice is somehow forgot and privacy guards pops up again to ask me to grant it again and that’s a big problem for me because I want to run it without screen, headless and I can't do it manually at every reboot. I already tried to change all privacy guard settings without solutions, but I'm starting to think that it's a problem with the builds.
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Hi and thanks for the great work with the builds, but I’m having a problem with both 15.1 and 14.1 builds and I hope you can help me. I wrote an app that needs root access and privacy guards pops up correctly and asks me to grant it, I tick remember my choice and allow, but whenever the system is rebooted the choice is somehow forgot and privacy guards pops up again to ask me to grant it again and that’s a big problem for me because I want to run it without screen, headless and I can't do it manually at every reboot. I already tried to change all privacy guard settings without solutions, but I'm starting to think that it's a problem with the builds.

Yeah, I can reproduce this on LineageOS 15.1 at least. I can't tell any obvious reason why this is happening, though. Thanks for reporting this.

I've decided to discontinue my Android development on Raspberry Pi because someone took my free and open source work and sold it for his own personal profit (https://www.raspberrypi.org/forums/...sid=e6cd167e8af60a6520b2b77932ef6ec6#p1381343). There won't be any further updates to fix issues like this, but I hope you can find a solution.
 

Paul_it

New member
Nov 8, 2018
4
2
Milan
Yeah, I can reproduce this on LineageOS 15.1 at least. I can't tell any obvious reason why this is happening, though. Thanks for reporting this.

I've decided to discontinue my Android development on Raspberry Pi because someone took my free and open source work and sold it for his own personal profit. There won't be any further updates to fix issues like this, but I hope you can find a solution.

Yes I can understand, that's really bad, I didn't know that RaspAnd was just your build with some apps and I purchased it, but I will ask a refund for sure now. I think your open source project is way faster than RaspAnd and it's a pity you decided to discontinue it, also because people like me want to donate money to the person who made the work and improved the open source community and not to who just rebuilt the code.

I'm not really an expert of custom ROM development, but if you can point me in the right direction about my issue, like what you would do if you were trying to solve it or where you would start to search it in the code, I will be glad to try to solve the issue by myself and upload the code to your repository.
 
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Yes I can understand, that's really bad, I didn't know that RaspAnd was just your build with some apps and I purchased it, but I will ask a refund for sure now. I think your open source project is way faster than RaspAnd and it's a pity you decided to discontinue it, also because people like me want to donate money to the person who made the work and improved the open source community and not to who just rebuilt the code.

How could you know because he's tried his best to withhold that information. Even I didn't know until certain article was brought to my attention. Link to lineage-rpi was added after I contacted him couple of months ago. Now I'm trying to raise community awareness about this because there seems to be no way to reason with him. Nothing new here either as android-rpi guys raised issues before (https://www.reddit.com/r/Android/comments/4q40gj/androidrpi_extons_9_build/) and seems he's got experience with selling other people's work for personal profit with his other Linux releases even before that (https://www.raspberrypi.org/forums/viewtopic.php?p=754229#p753831).

Arne Exton has failed to provide Linux kernel source for his RaspAnd releases. Linux kernel is licensed under GPLv2 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) which obligates anyone distributing a binary to provide corresponding source code. Any RaspAnd release since December 15th 2017 is built based on my sources (https://github.com/lineage-rpi) and Linux kernel includes my work that is licensed under GPLv2. I feel that I've done some significant work merging together Raspberry and AOSP reference kernels and configuring it for this device and Android. This kernel wouldn't boot on any other device nor boot any other OS on the Pi.

I've also requested Linux kernel source code for another one of his Linux releases for Raspberry Pi and he only gave me a link to kernel.org. Nothing that you find on kernel.org will even boot on Raspberry Pi as the code for Pi hardware support is not included in mainline Linux. You could expect a bit more from someone who is a lawyer and made various Linux releases over a decade. GPLv2 is most definitely something that anyone selling open source software commercially should be aware of.

Money was never much of motivation for me (I'm just a hobbyist hacker and I've been around long enough to know there really isn't any here) and there hasn't been much donations either (thanks to both of you who have donated for Raspberry Pi Android development past 18+ months :)). It still doesn't feel right someone else profiting off of it either (and it's not even legal if you don't comply with GPLv2). There's no point in me open sourcing my efforts when someone is just going to take it and sell it. If I can't do it open source, there's really no point in doing it at all. :(

I'm not really an expert of custom ROM development, but if you can point me in the right direction about my issue, like what you would do if you were trying to solve it or where you would start to search it in the code, I will be glad to try to solve the issue by myself and upload the code to your repository.

You could check logcat for any clues. I can't think of any obvious reason why this is broken on this device. Flashing LineageOS's su addon in TWRP shouldn't make any difference (as it's already included in the build) but there's third party root management options as well (that I don't usually recommend).
 
Last edited:
  • Like
Reactions: kanttii

JavaLord

New member
Nov 10, 2018
3
0
Hello. Yesterday i've got my raspberry pi 3b+ , so i'm new to raspberry pi and i've got a problem with android images burning to sd card. Yesterday i wrote lineage os 15 to my sd card with etcher and i'ts booted fine, but then i tried to wrote lineage os 14.1 to this card and it doesn't boot, pwr led flashes 4 times slowly and 4 times quickly, the same with other android images, android 6, android 7 from geektillithertz.com, on all images pwr led blinking or just glowing red, only raspbian image runs ok. I tried to burn image with etcher, win32 utility and dd command from linux and always the same. Maybe i doing something wrong, could you help me.
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Hello. Yesterday i've got my raspberry pi 3b+ , so i'm new to raspberry pi and i've got a problem with android images burning to sd card. Yesterday i wrote lineage os 15 to my sd card with etcher and i'ts booted fine, but then i tried to wrote lineage os 14.1 to this card and it doesn't boot, pwr led flashes 4 times slowly and 4 times quickly, the same with other android images, android 6, android 7 from geektillithertz.com, on all images pwr led blinking or just glowing red, only raspbian image runs ok. I tried to burn image with etcher, win32 utility and dd command from linux and always the same. Maybe i doing something wrong, could you help me.

None of those builds are even supposed to work on the B+. Like it says in the thread title and in the first sentence in the OP, this build is for Raspberry Pi 3 Model B.

As for why, please read this (https://forum.xda-developers.com/showpost.php?p=77593507&postcount=16).
 

JavaLord

New member
Nov 10, 2018
3
0

bobscreations

Member
Dec 10, 2010
9
1
Hi, i build the kernel of link below to add eGalaxTouch USB driver and broken my wifi, even making no changes on kernel configs, just compiling, i try everything and no sucess to activate wifi for my car pi, please, give me a light.

My steps:
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg
(For Android-rPi)
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 zImage

the kernel boot up normally and USB touchscreen works great, but no wifi.

https://github.com/lineage-rpi/android_kernel_brcm_rpi3/tree/cm-14.1
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Hi, i build the kernel of link below to add eGalaxTouch USB driver and broken my wifi, even making no changes on kernel configs, just compiling, i try everything and no sucess to activate wifi for my car pi, please, give me a light.

My steps:
ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg
(For Android-rPi)
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 zImage

the kernel boot up normally and USB touchscreen works great, but no wifi.

https://github.com/lineage-rpi/android_kernel_brcm_rpi3/tree/cm-14.1

It may boot but wifi is not the only thing that is broken...

There's build instructions available here (https://github.com/lineage-rpi/android_local_manifest/tree/cm-14.1) and it's the only 'correct' and supported way to build anything currently. It may of course feel unnecessary to sync the whole Android source if you only want to build a kernel. At least you can build only the kernel without building the whole Android (just use 'mka kernel' in step 5).

Standalone kernel build should also be possible but you need to adapt to bunch of things. First of all lineageos_rpi3_defconfig (https://github.com/lineage-rpi/andr...4.1/arch/arm/configs/lineageos_rpi3_defconfig) is the configuration that you need to use. Wifi firmware is included in the kernel so you need to place the firmware somewhere and adapt the path (https://github.com/lineage-rpi/andr...ch/arm/configs/lineageos_rpi3_defconfig#L1055). arm-linux-gnueabihf toolchain probably also works but AOSP toolchain is used when built with Android.
 

Paul_it

New member
Nov 8, 2018
4
2
Milan
You could check logcat for any clues. I can't think of any obvious reason why this is broken on this device. Flashing LineageOS's su addon in TWRP shouldn't make any difference (as it's already included in the build) but there's third party root management options as well (that I don't usually recommend).

I've managed to find a workaround for my issue after trying unsuccessfully to fix the bug in the code for a lot time, I post it here in case someone has my problem in the future.
I've also tried magisk and supersu as suggested but they don't work neither flashing or installing them manually.

My workaround consists of installing my app as a signature system app under the /system/priv-app folder and granting it permissions from the manifest instead of calling the SU binary directly, for example instead of rebooting executing "su -c reboot", I've added android.permission.REBOOT to the manifest and then execute just "reboot".
I've retrieved the keys for the signature of the apk from the Lineageos repo.
 
  • Like
Reactions: KonstaT

bobscreations

Member
Dec 10, 2010
9
1
It may boot but wifi is not the only thing that is broken...

Standalone kernel build should also be possible but you need to adapt to bunch of things. First of all lineageos_rpi3_defconfig (https://github.com/lineage-rpi/andr...4.1/arch/arm/configs/lineageos_rpi3_defconfig) is the configuration that you need to use. Wifi firmware is included in the kernel so you need to place the firmware somewhere and adapt the path (https://github.com/lineage-rpi/andr...ch/arm/configs/lineageos_rpi3_defconfig#L1055). arm-linux-gnueabihf toolchain probably also works but AOSP toolchain is used when built with Android.

This works man, thanks for you big help, my car pi is working now, very happy :D:D
 
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
I've managed to find a workaround for my issue after trying unsuccessfully to fix the bug in the code for a lot time, I post it here in case someone has my problem in the future.
I've also tried magisk and supersu as suggested but they don't work neither flashing or installing them manually.

My workaround consists of installing my app as a signature system app under the /system/priv-app folder and granting it permissions from the manifest instead of calling the SU binary directly, for example instead of rebooting executing "su -c reboot", I've added android.permission.REBOOT to the manifest and then execute just "reboot".
I've retrieved the keys for the signature of the apk from the Lineageos repo.

OK, so it seems everything works exactly like it should if you power down/reboot your device through the power menu (F5 on keyboard is the power key). Using 'reboot -p'/'reboot' in terminal is not quite the same (I think a lot of third party reboot applications also work by using these commands).

So, you don't actually need to modify anything. After you've granted the root access for the first time you need to reboot your device through the power menu so the setting is stored. After that you can reboot using any method you like and it still works. Good to know. :)
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
This works man, thanks for you big help, my car pi is working now, very happy :D:D

Well done. :)

So, another question, any way to set wallpapers? here have a black background on launcher and i cannot set any image.

That's one of known issues with the graphics drivers (VC4 doesn't support the color mode Android uses for wallpaper?). You can use LineageOS 15.1 build that uses different graphics drivers if having a wallpaper is the most important thing. ;)
 
Last edited:

bobscreations

Member
Dec 10, 2010
9
1
I use an apk "PhotoPhase" works great.
I have some paid playstore apps like poweramp, tasker etc, any way to install that without installing gapps?
poweramp unlocker verify true license using a google email account, and i cannot add an account without gapps and i do not want to install this.

Sorry for so much quesions, i'm very excited with my car pi project :D
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
I use an apk "PhotoPhase" works great.
I have some paid playstore apps like poweramp, tasker etc, any way to install that without installing gapps?
poweramp unlocker verify true license using a google email account, and i cannot add an account without gapps and i do not want to install this.

Sorry for so much quesions, i'm very excited with my car pi project :D

With root access you can of course backup apk file of any installed application. You can install that apk on a different ROM installation (without gapps) but if the app uses Google Play services or has other protective measures, there's probably not any easy way around that.
 
Last edited:

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.