This device repo aims to support booting AOSP on SDM845 devices supported by the mainline Linux kernel

Overview

device/generic/sdm845 (AOSP device config for SDM845 devices)

This device repo aims to support booting AOSP on SDM845 devices supported by the mainline Linux kernel.

Supported devices

  • OnePlus 6 (enchilada)
  • Xiaomi PocoPhone F1 (beryllium)

How to unlock and root Poco F1?

IMPORTANT NOTICE -->

UNLOCKING AND ROOTING MAY VOID YOUR PHONE WARRANTY AND
MAY BRICK YOUR DEVICE AS WELL. I'M NOT RESPONSIBLE FOR
EITHER OF THAT.

Here is a reasonable guide to get you started on unlocking and rooting Poco F1 --> https://forum.xda-developers.com/poco-f1/how-to/xiaomi-poco-f1-unlock-bootloader-custom-t3839405

Just for the records I downloaded and installed following external packages to unlock and root my device-->

  • miflash_unlock-en-3.3.525.23.zip (MS Windows only tool for unlocking)
  • twrp-3.3.0-0-beryllium.img (Recovery)
  • beryllium-9.6.10-9.0-vendor-firmware.zip (LineageOS dependency)
  • lineage-16.0-20190612-nightly-beryllium-signed.zip
  • Magisk-v19.3.zip (Root)
  • MagiskManager-v7.2.0.apk

Also Dont forget to take a backup of your images from TWRP and copy them to your Host machine. It will come very handy. Believe me :)

How to build and flash AOSP images?

  • Download source and build AOSP images
mkdir aosp-repo
cd aosp-repo
repo init -u https://android.googlesource.com/platform/manifest -b master
git clone https://github.com/pundiramit/android-local-manifests.git .repo/local_manifests -b master
repo sync -j$nproc
source build/envsetup.sh
# See table above
lunch <codename>-userdebug # Where  is the codename of your device
make -j$nproc

NOTE: To get display working on SDM845, we need supported Adreno firmware binaries, otherwise the device will not boot to UI.

    Adreno binaries are shipped with non-distributable license,
    hence I'm not shipping them in my build setup. You can
    extract Adreno a630_* firmware binaries from a working
    device build. I extracted mine from
    lineage-16.0-20190612-nightly-beryllium-signed.zip ;)

    OnePlus 6 firmware can be obtained here: https://gitlab.com/sdm845-mainline/firmware-oneplus-sdm845, copy the contents
    of the postmarketos subdirectory up a level.
    It will need to be supplemented by a630_sqe.fw from
    linux-firmware.

    Then copy the binaries to out vendor directory
    i.e. out/target/product/beryllium/vendor/firmware,
    and run "make -j$nproc" to create vendor.img again.
  • Flash and boot AOSP images -->
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash userdata userdata.img
fastboot flash boot boot.img
fastboot reboot

How to run custom kernels?

  • Run following commands to clone the kernel source and prebuilt Android toolchains and build scripts:
mkdir kernel-repo
cd kernel-repo
repo init -u https://android.googlesource.com/kernel/manifest -b common-android-mainline
git clone [email protected]:pundiramit/android-local-manifests.git .repo/local_manifests -b kernel
repo sync -j$nproc
BUILD_CONFIG=beryllium/build.config.beryllium ./build/build.sh
  • Delete all objects in aosp-repo/device/generic/sdm845/prebuilt-kernel/android-mainline/ then copy build artifacts from kernel-repo/out/beryllium-android-mainline/dist/ to aosp-repo/device/generic/sdm845/prebuilt-kernel/android-mainline/ build AOSP images again.
cd aosp-repo
source build/envsetup.sh
lunch beryllium-userdebug
make TARGET_KERNEL_USE=mainline -j$nproc
  • Now reflash the images as above and boot with your custom kernel.

    NOTE:

      By default the above instructions will sync/download
      beryllium-android-mainline branch to kernel-repo/beryllium directory.
      If you want to reproduce android12-5.4 or GKI build then checkout
      common-android12-5.4 repo manifest and beryllium-android-5.4 branch instead.
    

ToDo -->

  • LEDs and Brightness Control
  • Camera
  • Modem / RIL / Voice Call
  • Battery Stats
  • Sensors and Accelerometers
Issues
  • rmtfs: Update to latest version

    rmtfs: Update to latest version

    See individual commits for details.

    The "fix segfault" commit should be sent upstream, but I still need to validate why this crash doesn't happen on postmarketOS and only here. Either the function doesn't get called with the parameters that gets it crashed or the signed/unsigned problem is a bit undefined and gets handled differently on musl+gcc

    opened by z3ntu 4
  • Remove sdm845-userdebug build target

    Remove sdm845-userdebug build target

    Remove the common sdm845-userdebug build target. Move the common device configs to device-common.mk and {beryllium,enchilada}/device.mk file.

    Signed-off-by: Amit Pundir [email protected]

    opened by pundiramit 4
  • sdm845: add new

    sdm845: add new "axolotl" target

    This adds initial support for the SHIFT6mq (axolotl). It launched with Android 10, makes use of dynamic partitions and has A/B.

    A/B is ignored in this bringup and will be added at a later stage.


    Depends on #6

    opened by amartinz 3
  • Factor out the sdm845 device configuration

    Factor out the sdm845 device configuration

    No feature changes. Moved files around in a new shared/ folder to make room for further refactoring. Renamed relevant files and updated relative path.

    Smoke tested on Beryllium. Build tested Axolotl and Enchilada.

    @calebccff @amartinz

    opened by pundiramit 2
  • Fix tinyhal / audio configuration

    Fix tinyhal / audio configuration

    tinyhal loads audio.$(getprop ro.product.device).xml configuration file for audio mixer control and routing changes. So copy audio.sdm845.xml accordingly.

    Fixes: 298ae955c9b8 ("Remove sdm845-userdebug build target") Signed-off-by: Amit Pundir [email protected]

    opened by pundiramit 1
  • Remove sysfs_gpu type definition

    Remove sysfs_gpu type definition

    cherry-picked from upstream device/linaro/dragonboard project.

    ... as it has moved to system/sepolicy.

    Bug: b/161819018 Test: presubmit Change-Id: I77afd0d7019e0ea0cc475de3817bc2c8e7fcd4bd Merged-In: I77afd0d7019e0ea0cc475de3817bc2c8e7fcd4bd Signed-off-by: Amit Pundir [email protected]

    opened by pundiramit 0
  • sdm845: BoardConfigCommon: allow userdata to use f2fs

    sdm845: BoardConfigCommon: allow userdata to use f2fs

    TARGET_USERIMAGES_USE_EXT4 and TARGET_USERIMAGES_USE_F2FS can both be specified.

    https://cs.android.com/search?q=TARGET_USERIMAGES_USE_F2FS&sq=&ss=android%2Fplatform%2Fsuperproject

    opened by amartinz 0
  • Use TARGET_SCREEN_DENSITY

    Use TARGET_SCREEN_DENSITY

    This variable is used to auto-populate the ro.sf.lcd_density as well as selecting density bucket for resources in recovery.


    Maybe time to put the actual values for the 3 devices here and not just a generic 400?

    Also this variable is used for generating the correct graphics for recovery, once that's built.

    opened by z3ntu 0
  • audio: migrate back to yukawa HAL

    audio: migrate back to yukawa HAL

    This does the initial move to the newly "generic" yukawa audio HAL.

    The HAL supports loading the mixer_paths.xml file based on some runtime property (vendor.hw), this is used for dragonboard where the db845c and rb5 use the same lunch target. However because we use different lunch targets I've hardcoded vendor.hw to "sdm845", the mixer_paths.xml is packaged from the device specific directory to /vendor/etc/mixer_paths.sdm845.xml.

    This depends on a new patch to system/media/ to support specifying the output device in the mixer paths xml file: https://android-review.googlesource.com/c/platform/system/media/+/2036767

    I'll update our local_manifests to include this change in the mean time before it's merged.

    The beryllium and axolotl mixer paths are basically placeholder and will need to be fixed. The enchilada paths should work, but for some reason the speaker is broken, I suspect a kernel issue here. Headphone detection and auto-switching works, on enchilada I'm able to hear audio through headphones.

    The work to make it generic can be found here: https://android-review.googlesource.com/c/device/linaro/dragonboard/+/2042597 Once this is accepted into AOSP we can drop the HAL from our repo and instead build it from there.

    opened by calebccff 0
Owner
Caleb Connolly
Kernel hacker | consumer of bugs | postmarketOS developer, maintaining mainline on the OnePlus 6
Caleb Connolly
Msm8953 common kernel // ysl daisy sakura supported :)

Linux kernel release 4.x <http://kernel.org/> These are the release notes for Linux version 4. Read them carefully, as they tell you what this is al

Giovanni Ricca 3 Jan 29, 2022
Emergency alert and tracer for realtime high-performance computing app (work in progress, currently supported env is only Linux x86-64).

HPC Emerg Emergency alert and tracer for realtime high-performance computing app (work in progress, currently supported env is only Linux x86-64). Exa

Ammar Faizi 7 Jan 19, 2022
Converts file formats supported by AdPlug to VGM format.

adlib2vgm Converts file formats supported by AdPlug to VGM format. Notice This tool is originally designed to work with the RetroWave OPL3 Sound Card.

SudoMaker 12 Feb 8, 2022
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Pavel Stehule 1.8k Jun 21, 2022
An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

CO2-Gadget An easy to build CO2 Monitor/Meter with cell phone App for real time visualization and charting of air data, datalogger, a variety of commu

Mariete 19 Jun 23, 2022
PyWinRT is a community-supported fork of the pywinrt tool from the Microsoft xlang project.

PyWinRT is a community-supported fork of the pywinrt tool from the Microsoft xlang project.

null 8 Jun 18, 2022
BMI_automatics-faceshielding-device - this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device

BMI_automatics-faceshielding-device this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device in

Lyu Tian 2 Dec 23, 2021
The alsa-lib is a library to interface with ALSA in the Linux kernel and virtual devices using a plugin system

alsa-lib only for termux android Advanced Linux Sound Architecture (ALSA) project The alsa-lib is a library to interface with ALSA in the Linux kernel

null 2 Jan 22, 2022
Identify I2C devices from a database of the most popular I2C sensors and other devices

I2C Detective Identify I2C devices from a database of the most popular I2C sensors and other devices. For more information see http://www.technoblogy.

David Johnson-Davies 19 Jun 11, 2022
DEV repository for full support of Ikea Vindriktning device to #Tasmota

Ikea Vindriktning a Tasmota V tomto repu. je vývojová verze úpravy Tasmota FW, tak aby mohl být použit na PCB LaskaKit ESP-VINDRIKTNING ESP-32 I2C. Cí

Adam Hořčica 5 May 22, 2022
A kernel module that patches Linux kernel "on-the-fly" to skip TASK_RSS_EVENTS_THRESH check in check_sync_rss_stat

split-rss-counting-patch A kernel module that patches Linux kernel "on-the-fly" to skip TASK_RSS_EVENTS_THRESH check in check_sync_rss_stat. Why? Read

Bao-Hiep Le 3 Mar 6, 2022
Plua is a superset of Lua for classic PalmOS devices with added support for graphics, UI, networking, events and sound.

Plua2c Plua is a superset of Lua for classic PalmOS devices with added support for graphics, UI, networking, events and sound. This is the source code

Cameron Kaiser 8 May 16, 2022
CAFest kernel for Xiaomi SM8250/SM8250-AC devices

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

Utsav Balar 66 Jun 27, 2022
Nexus CAF 4.14 Kernel Source For Xiaomi Miatoll Devices.

Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Please notice that there are several guides for kernel develop

RoHaN 7 Mar 21, 2022
CAF upstreamed kernel for nokia sdm660 devices

Linux kernel release 4.x <http://kernel.org/> These are the release notes for Linux version 4. Read them carefully, as they tell you what this is al

GPUCode 1 Nov 14, 2021
The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)

Introduction The WSL2-Linux-Kernel repo contains the kernel source code and configuration files for the WSL2 kernel. Reporting Bugs If you discover an

Microsoft 5.8k Jun 23, 2022
My personal Linux device driver

LinuxDeviceDriver If you violate your legal rights, please contact me on [email protected] THANK YOU! . ├── adc │ └── tpc512.c ├── charger │ └── bq24

Fenix 1 Nov 18, 2021
A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux.

TasmoManager A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux. Features Native Tasmota device discovery (via ta

Tom Butcher 44 Jun 30, 2022
A simple tool that aims to efficiently and quickly parse the outputs of web scraping tools like gau

massurl is a simple tool that aims to parse the outputs of tools like gau, and extract the parameters for each URL, remove duplicates and do it all very quickly. Because web scraping tools' outputs can get very large very quickly, it is nice to have a tool that parses them and and outputs something clean and easy to read.

Fr1nge 14 Mar 22, 2022