[DEV][ROM][UNOFFICIAL] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Search This thread

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
  • Like
Reactions: polfrank

f2bacon

Senior Member
Oct 20, 2011
457
81
Brooklyn NY
i cant figure out why i keep having issues. etcher kept giving me checksums dont match and when it finished the bootlogo it would shut down and start from scratch again, but when i used etcher portable it worked fine with no errors but the pi still wont boot into lineage. it still shuts off once it finishes the bootlogo.
 

iruxx

Member
Apr 8, 2012
7
0
Does somebody know if a gsm module would work and you would be able to make calls or send SMS ?
 

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
Does somebody know if a gsm module would work and you would be able to make calls or send SMS ?

This build doesn't have Android telephony stack so anything like that is not going to work out-of-the-box of course.

It's possible to create builds with telephony and drivers for certain modem hardware. I have Quectel EC25 LTE modem and mobile data and SMS are working fine. It's also possible to make/receive calls but in-call audio is not implemented yet. There's also other similar modems with Android drivers available.
 
  • Like
Reactions: polfrank

iruxx

Member
Apr 8, 2012
7
0
This build doesn't have Android telephony stack so anything like that is not going to work out-of-the-box of course.

It's possible to create builds with telephony and drivers for certain modem hardware. I have Quectel EC25 LTE modem and mobile data and SMS are working fine. It's also possible to make/receive calls but in-call audio is not implemented yet. There's also other similar modems with Android drivers available.

do you maybe have a tutorial or something I can read to make a build with such drivers ? it would be awesome.

Thank you very much again!
 

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
do you maybe have a tutorial or something I can read to make a build with such drivers ? it would be awesome.

Thank you very much again!

Modem manufacturer provides binary drivers and documentation on how to implement it on Android build.

There's source and build instructions for LineageOS 14.1 and 15.1 builds for the Pi 3 (https://github.com/lineage-rpi/android_local_manifest/tree/cm-14.1 & https://github.com/lineage-rpi/android_local_manifest/tree/lineage-15.1, respectively). I haven't released the full device specific source code for my LineageOS 16.0 builds because someone sold builds off of the sources I previously released without complying with the open source licensing.
 
  • Like
Reactions: polfrank

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
New build.

https://konstakang.com/devices/rpi4/LineageOS16.0/

-add support for storage devices with exFAT filesystem
-hide su binary when root access is not enabled in developer options
-support for booting from USB devices (see FAQ)
-add support for PCM512x audio DACs (tested with Hifiberry DAC+)
-improve support for Waveshare HDMI touchscreens
-fix recording videos with camcorder
-add TWRP flashable zip to resize data partition (see FAQ)
-update TWRP to 3.3.1-1
-update to Linux 4.19.132 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
-Android security patch level: 5 July 2020 (merged)

And there's now also an Android TV build:
https://konstakang.com/devices/rpi4/LineageOS16.0-ATV/
 
Last edited:

Dodorino

New member
Jul 22, 2020
2
0
Hi KonstaT

I am an undergraduate and in this period i am developing some apps such as Alexa app custom on android automotive emulator
So i need a miracle!
I mean, now i am working on sdk Alexa for Android and now i am testing music skills for example "Play Bluetooth" but for this skill i need to android image with Bluetooth Ad2p Sink,Audio/Video Remote Control Profile (AVRCP) and Hands-Free Profile Sink (HFP) profiles enabled.
These profiles are enabled in android automotive os
So, it's possible to have an Android Automotive OS build for Raspberry Pi 4?or a normal build android with these bluetooth profiles enabled for raspberry pi 4?
I know, a miracle is needed but I am hopeful
Thanks a lot
 

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
Hi KonstaT

I am an undergraduate and in this period i am developing some apps such as Alexa app custom on android automotive emulator
So i need a miracle!
I mean, now i am working on sdk Alexa for Android and now i am testing music skills for example "Play Bluetooth" but for this skill i need to android image with Bluetooth Ad2p Sink,Audio/Video Remote Control Profile (AVRCP) and Hands-Free Profile Sink (HFP) profiles enabled.
These profiles are enabled in android automotive os
So, it's possible to have an Android Automotive OS build for Raspberry Pi 4?or a normal build android with these bluetooth profiles enabled for raspberry pi 4?
I know, a miracle is needed but I am hopeful
Thanks a lot

This build uses the default bluetooth feature configuration (https://github.com/LineageOS/androi...ob/lineage-16.0/res/values/config.xml#L16-L35). It's possible to have more features enabled Android side but it doesn't mean hardware supports it or that it actually works. Last time I tested mic did't work on my bluetooth headset so there's no voice input.
 

Dodorino

New member
Jul 22, 2020
2
0
Thanks a lot for the support
So, i will try to build Lineage enabling some Bluetooth feature in config.xml
I need the usb microphone on raspberry to work, no on bluetooth headset. In this way i am be able to use ad2p and avrcp profile for playing music bluetooth and call from my phone paired with raspberry
 

bp1982

New member
Jul 25, 2020
4
2
Hi
I am trying the Android TV, thanks for this great job.
I have install GApps ...it is ok. but I cant use Chromecast functionalty. On my Smartphone I see the Chromecast button and I see "raspberry pi 4 TV" but there is nothing on rpi' s screen. The Netflix app said error "Sscr-s4010-2204..."
Somebody has tried Chromecast functionalty ?
Thanks a lot
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
Hi
I am trying the Android TV, thanks for this great job.
I have install GApps ...it is ok. but I cant use Chromecast functionalty. On my Smartphone I see the Chromecast button and I see "raspberry pi 4 TV" but there is nothing on rpi' s screen. The Netflix app said error "Sscr-s4010-2204..."
Somebody has tried Chromecast functionalty ?
Thanks a lot

I think that Chromecast support only works on official Android TV devices. Same goes for the Android TV Remote Control app.
 

bp1982

New member
Jul 25, 2020
4
2
I think that Chromecast support only works on official Android TV devices. Same goes for the Android TV Remote Control app.

I think so:confused:
But with the official remote control App I havent issue. I was able to connect it at first boot when proposed to configure.
I am newbie but I hope there will be a solution to solve the problm....
Again thanks a lot
 
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
I think so:confused:
But with the official remote control App I havent issue. I was able to connect it at first boot when proposed to configure.
I am newbie but I hope there will be a solution to solve the problm....
Again thanks a lot

Nice, the official remote app does indeed work!

As for Chromecast, there's bunch of errors on the logs. Looks like it needs server side certification.

Code:
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: error parsing cast info Json {"device_info":{"4k_blocked":0,"capabilities":{"audio_hdr_supported":false,"audio_surround_mode_supported":false,"cloudcast_supported":true,"display_supported":true,"fdr_supported":false,"hdmi_prefer_50hz_supported":false,"hdmi_prefer_high_fps_supported":false,"hotspot_supported":false,"https_setup_supported":true,"keep_hotspot_until_connected_supported":true,"opencast_supported":false,"reboot_supported":false,"set_group_audio_delay_supported":true,"setup_supported":false,"stats_supported":false,"system_sound_effects_supported":false,"wifi_auto_save_supported":true,"wifi_supported":false},"cloud_device_id":"058D070CF8C31992476D86384AB26075","factory_country_code":"","hotspot_bssid":"XX:XX:XX:XX:XX:XX","mac_address":"00:00:00:00:00:00","manufacturer":"Raspberry","model_name":"Raspberry Pi 4","product_name":"rpi4","public_key":"MIIBCgKCAQEAnrt6Zj5QHmN\/qUZ\/C7iv7+EduMzD62NvdK+fTehz1TwKcflwBTVBTx2S3HSASpHg71Yd2+yl0oL1mt\/qdu5XoXQMrmDlfxQeXlbO4R0ll1NqiPeDAKiIDF8yDZB7\/rAupbz6UJ0ffSwLU2f26jYV8ZeER5ory5G556m9oRuAJ9AvqQ\/lXswG1oo6nYghD8zwt7CTQEyQGTNjIpHHyanvZ1kcgTsQAplOanXxUMYWuVv5VaCNX+O30cTVBLkpUC4rZ6A2LRh73fQeXQGdUVFqqR27lXN\/5LCSFGUJ3nPThSkBBV8gtHkgo3p6UyZpqKifQnMnuNPfBjBMjQuEC4K5VQIDAQAB","ssdp_udn":"626f682a-fd47-40f6-4d1b-d9f232eba7d9","uma_client_id":"39a57344-50d5-4cb1-bada-aa85c4b92f6b","uptime":617.338564,"weave_device_id":""}}
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: org.json.JSONException: No value for sign
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at org.json.JSONObject.get(JSONObject.java:392)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at org.json.JSONObject.getJSONObject(JSONObject.java:612)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at lao.a(PG:4)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at lan.call(Unknown Source:15)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at ddr.a(Unknown Source:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at qmb.call(Unknown Source:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at swv.run(PG:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at swb.run(Unknown Source:4)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.lang.Thread.run(Thread.java:764)
07-26 00:09:41.759   833  1187 W LoadCastServiceInfoTask: Failed to get cast id and certificate from cast service.
 

bp1982

New member
Jul 25, 2020
4
2
Nice, the official remote app does indeed work!

As for Chromecast, there's bunch of errors on the logs. Looks like it needs server side certification.

Code:
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: error parsing cast info Json {"device_info":{"4k_blocked":0,"capabilities":{"audio_hdr_supported":false,"audio_surround_mode_supported":false,"cloudcast_supported":true,"display_supported":true,"fdr_supported":false,"hdmi_prefer_50hz_supported":false,"hdmi_prefer_high_fps_supported":false,"hotspot_supported":false,"https_setup_supported":true,"keep_hotspot_until_connected_supported":true,"opencast_supported":false,"reboot_supported":false,"set_group_audio_delay_supported":true,"setup_supported":false,"stats_supported":false,"system_sound_effects_supported":false,"wifi_auto_save_supported":true,"wifi_supported":false},"cloud_device_id":"058D070CF8C31992476D86384AB26075","factory_country_code":"","hotspot_bssid":"XX:XX:XX:XX:XX:XX","mac_address":"00:00:00:00:00:00","manufacturer":"Raspberry","model_name":"Raspberry Pi 4","product_name":"rpi4","public_key":"MIIBCgKCAQEAnrt6Zj5QHmN\/qUZ\/C7iv7+EduMzD62NvdK+fTehz1TwKcflwBTVBTx2S3HSASpHg71Yd2+yl0oL1mt\/qdu5XoXQMrmDlfxQeXlbO4R0ll1NqiPeDAKiIDF8yDZB7\/rAupbz6UJ0ffSwLU2f26jYV8ZeER5ory5G556m9oRuAJ9AvqQ\/lXswG1oo6nYghD8zwt7CTQEyQGTNjIpHHyanvZ1kcgTsQAplOanXxUMYWuVv5VaCNX+O30cTVBLkpUC4rZ6A2LRh73fQeXQGdUVFqqR27lXN\/5LCSFGUJ3nPThSkBBV8gtHkgo3p6UyZpqKifQnMnuNPfBjBMjQuEC4K5VQIDAQAB","ssdp_udn":"626f682a-fd47-40f6-4d1b-d9f232eba7d9","uma_client_id":"39a57344-50d5-4cb1-bada-aa85c4b92f6b","uptime":617.338564,"weave_device_id":""}}
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: org.json.JSONException: No value for sign
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at org.json.JSONObject.get(JSONObject.java:392)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at org.json.JSONObject.getJSONObject(JSONObject.java:612)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at lao.a(PG:4)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at lan.call(Unknown Source:15)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at ddr.a(Unknown Source:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at qmb.call(Unknown Source:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at swv.run(PG:2)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at swb.run(Unknown Source:4)
07-26 00:09:41.758   833  1187 E LoadCastServiceInfoTask: 	at java.lang.Thread.run(Thread.java:764)
07-26 00:09:41.759   833  1187 W LoadCastServiceInfoTask: Failed to get cast id and certificate from cast service.

I Saw that page,but I am too newbie to understand...
Yingtongli.me/blog/2019/12/20/ gcast-auth.htlm
 
  • Like
Reactions: polfrank

cem_ari

Senior Member
Jul 7, 2008
101
4
Thanks for your work.
I will use it with Raspbery Pi 4 8 GB in car. I need to auto power on-off according to igniton. I have applied your "How to create a DIY hardware power button?" Power off function is OK. Short press is screen off and long press is power menu. I just need power off without menu but i think can do it by some script or command etc. But i have problem about power on. If i push to button when power state off, nothing happens. Is it normal? Or did i wrong someting?

Second issue is that boot time is more than 1 minute. My micro sd card is Sandisk Ultra 32GB class 10. Old model. Same question again. Is it normal?
BTW i have ordered SanDisk 64GB Extreme Pro MicroSDXC.

My third question is that which your OS is suitable for carputer? Should i stick with this? Or should i upgrade to your LineageOS 17.1?
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
685
424
KonstaKANG.com
Thanks for your work.
I will use it with Raspbery Pi 4 8 GB in car. I need to auto power on-off according to igniton. I have applied your "How to create a DIY hardware power button?" Power off function is OK. Short press is screen off and long press is power menu. I just need power off without menu but i think can do it by some script or command etc. But i have problem about power on. If i push to button when power state off, nothing happens. Is it normal? Or did i wrong someting?

Second issue is that boot time is more than 1 minute. My micro sd card is Sandisk Ultra 32GB class 10. Old model. Same question again. Is it normal?
BTW i have ordered SanDisk 64GB Extreme Pro MicroSDXC.

My third question is that which your OS is suitable for carputer? Should i stick with this? Or should i upgrade to your LineageOS 17.1?

You should most definitely use LineageOS 17.1 instead. This build is most likely discontinued and there's won't be any updates.

The DIY power button acts exactly like a power button on any Android device. There's a script in the LineageOS 17.1 thread to power down the device on GPIO event. I've been told GPIO3 can be used to power on the device.

Android just takes certain time to boot. Around minute is normal.
 

cem_ari

Senior Member
Jul 7, 2008
101
4
You should most definitely use LineageOS 17.1 instead. This build is most likely discontinued and there's won't be any updates.

The DIY power button acts exactly like a power button on any Android device. There's a script in the LineageOS 17.1 thread to power down the device on GPIO event. I've been told GPIO3 can be used to power on the device.

Android just takes certain time to boot. Around minute is normal.

I have flashed it. Woww it's just floading. Very fast. Thank you very much. Now time to handle power issue. I will keep going in the LineageOS 17.1 thread. Thanks again.
 

Mary1989

Member
Feb 9, 2020
30
4
DeepL translation:

I have read all the answers and they have clarified many doubts, thank you all.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Here’s my build of LineageOS 16.0 for Raspberry Pi 4 Model B. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. This build currently uses Google’s SwiftShader software renderer so graphics performance is probably not what you’d expect. Pi 4 model with at least 2GB of RAM is required to run this build.

    Important! This image includes parts that are licensed under non-commercial license (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International). You may use this build freely in personal/educational/etc use. Commercial use is not allowed with this build!

    Screenshot_20200105-125543_Settings.png


    https://konstakang.com/devices/rpi4/LineageOS16.0/

    lineage-16.0-20200713-UNOFFICIAL-KonstaKANG-rpi4.zip
    https://www.androidfilehost.com/?fid=8889791610682891700
    md5:d8fe572b7ba14b010fc5475557bc8f77

    Working:
    • Audio (HDMI, 3.5mm jack, USB microphones, bluetooth speakers/headsets, etc)
    • Audio DAC (using PCM512x DACs e.g. Hifiberry DAC+)
    • Bluetooth
    • Camera (using official Pi camera modules & UVC USB webcams)
    • GPIO
    • GPS (using external USB modules e.g. U-Blox 7)
    • Ethernet
    • HDMI display
    • I2C
    • IR remotes (using external GPIO IR modules e.g. TSOP4838)
    • RTC (using external GPIO I2C modules e.g. DS3231)
    • Serial console (using external GPIO serial console adapters e.g. PL2303)
    • SPI
    • Touchscreen/multi-touch (using official 7” display)
    • USB (mouse, keyboard, storage, etc)
    • Wifi
    • Wifi tethering

    Not working:
    • Hardware accelerated graphics (V3D)
    • Hardware video decoding & encoding

    Issues:
    • SELinux is in permissive mode
    • and more…

    Sources:

    Thanks:
    • peyo-hd and everyone who has contributed to android-rpi
    • brobwind for bluetooth fixes
    • Google for Android Things platform
    • Android-x86 project
    • LineageOS team & everyone who has contributed to LineageOS 16.0
    6
    Merged commits not mentioned in the changelog.

    13.7. changelog:
    • add support for storage devices with exFAT filesystem
    • hide su binary when root access is not enabled in developer options
    • support for booting from USB devices (see FAQ)
    • add support for PCM512x audio DACs (tested with Hifiberry DAC+)
    • improve support for Waveshare HDMI touchscreens
    • fix recording videos with camcorder
    • add TWRP flashable zip to resize data partition (see FAQ)
    • update TWRP to 3.3.1-1
    • update to Linux 4.19.132 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 July 2020 (merged)

    12.2. changelog:
    • add camera HAL to support Pi camera modules and USB webcams (thanks to Android-x86)
    • fix portrait apps on forced landscape orientation (thanks to Ladehunter)
    • update GPS HAL
    • add ir-keytable tool to configure IR remotes
    • enable USB gadget support & fix adb toggle in developer options
    • update to Linux 4.19.103 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 February 2020 (merged)

    16.1. changelog:
    • fix USB storage
    • fix wifi tethering
    • update to Linux 4.19.95 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 January 2020 (merged)

    6.1. changelog:
    • initial LineageOS 16.0 build
    • use SwiftShader software renderer for graphics
    • option to use DIY hardware power button to boot to TWRP recovery (see FAQ)
    • initial support for IR modules and remotes (tested with TSOP4838)
    • include TWRP 3.3.1-0
    • use Linux 4.19.84 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 December 2019 (merged)

    Previous builds:
    6
    New build.

    lineage-16.0-20200116-UNOFFICIAL-KonstaKANG-rpi4.zip

    https://www.androidfilehost.com/?fid=4349826312261702446
    md5:d5dc9d577e5170bbf8b07f95506ed55d

    -fix USB storage
    -fix wifi tethering
    -update to Linux 4.19.95 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 January 2020 (merged)
    6
    New build.

    https://konstakang.com/devices/rpi4/LineageOS16.0/

    -add camera HAL to support Pi camera modules and USB webcams (thanks to Android-x86)
    -fix portrait apps on forced landscape orientation (thanks to Ladehunter)
    -update GPS HAL
    -add ir-keytable tool to configure IR remotes
    -enable USB gadget support & fix adb toggle in developer options
    -update to Linux 4.19.103 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 February 2020 (merged)
    4
    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 tablet -> Click ‘Build number’ several times

    Q: I have no root, why? What is that hashtag on my status bar?
    A: You need enable root access under Settings -> System -> Developer options -> Root access. Root management is now integrated as part of LineageOS’ Privacy Guard and you can manage per app permissions under Settings -> System -> 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: Settings -> Storage shows total system size of 4 GB. 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. You can use e.g. GParted and extend /data partition (/dev/block/mmcblk0p4) 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.

    Or you can flash my resize zip in TWRP.


    Q: My display is not working. I can only see the rainbow screen but no Android boot animation. What should I do?
    A: This build uses 1280x720 resolution by default so you need to use a HDMI display that supports it. See this page under ‘Which values are valid for my monitor?’ to see how to check which resolutions your display supports using Raspbian. If your display doesn’t support 1280x720 resolution, you can try changing values in /boot/config.txt to something it does (see this page). 720p is still the maximum resolution that is supported by the graphics drivers used in this build.

    Q: I have official 7” LCD display and touchscreen. What should I do?
    A: Official 7” touchscreen is supported without any modifications. You will only need to change display size under Settings -> Display -> Display size (or change ro.sf.lcd_density to 120 in /system/build.prop) to adapt to the smaller resolution.

    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 create a DIY hardware power button?
    A: You can send power button events by connecting GPIO21 to ground.

    powerbutton.png


    Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> System -> Developer options -> Local terminal) to enable the feature and reboot your device:

    Code:
    su
    rpi4-powerbutton.sh

    You can also use the DIY power button to boot the device to TWRP recovery. Press and hold the button while powering on the device until you see the TWRP screen. If you use this method to boot to recovery, you can ignore what is said about booting into/out of TWRP later in the FAQ.

    Q: How to enable audio through 3.5mm jack?
    Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> System -> Developer options -> Local terminal) to enable the feature and reboot your device:

    Code:
    su
    rpi4-audio-jack.sh

    Q: How to boot from USB device?
    A: Warning, this is an experimental feature and there’s still some issues with it. Android shows USB storage notification for each partition and you should ignore these. TWRP shows errors in few places but everything seems to be working regardless of this.

    1. Install EEPROM that supports booting from USB
    2. Write image to your USB device as above
    3. Mount the USB device on your computer and rename following files on the boot partition:
      Code:
      mv ramdisk.img ramdisk-sdcard.img
      mv ramdisk-usb.img ramdisk.img
      mv ramdisk-recovery.img ramdisk-recovery-sdcard.img
      mv ramdisk-recovery-usb.img ramdisk-recovery.img
    4. Plug in the USB device to your Raspberry Pi, remove any sdcard, and boot

    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 -> System -> Developer options -> Local terminal) and reboot your device:

    Code:
    su
    rpi4-recovery.sh

    If mouse cursor doesn’t appear, try replugging your mouse.

    Q: How to boot out of TWRP recovery?
    A: You can execute the same script in TWRP terminal (Advanced->Terminal) if you have boot and system partitions mounted (Mount->Boot & Mount->System):

    Code:
    rpi4-recovery.sh boot

    Or you can flash my recovery2boot zip in TWRP.

    Q: How to update from previous LineageOS 16.0 build without losing data?
    A:
    1. Boot to TWRP recovery with the build you want to keep the data (see FAQ)
    2. Plug in an external USB storage device and select ‘Backup’
    3. Use ‘Select Storage’ to choose the USB device and ‘Swipe to backup’ (it’s only necessary to backup the data partition so you can uncheck other partitions to speed up the process)
    4. Write new LineageOS 16.0 image to the sdcard following installation instructions
    5. Boot to TWRP recovery with the new build (see FAQ)
    6. Select ‘Restore’ and find the backup you created from the USB device (‘Select Storage’)
    7. Make sure you only have data selected as partitions to restore (uncheck other partitions if available) and select ‘Swipe to Restore’
    8. (Flash Google apps package/other add-ons you had previously installed)
    9. Boot out of recovery (see FAQ)

    Q: How to install Google apps?
    A:
    1. Download open_gapps-arm-9.0-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-9.0-pico-xxxxxxxx.zip from your selected storage
    4. Wipe->Factory reset!
    5. Boot out of recovery (see FAQ)