me176c-dev / android_device_asus_K013

Android device configuration for ASUS MeMO Pad 7 (ME176C(X))
https://forum.xda-developers.com/memo-pad-7/orig-development/rom-unofficial-lineageos-16-0-asus-memo-t3929600
Other
26 stars 5 forks source link

LineageOS 16.0 for ASUS MeMO Pad 7 (ME176C(X)))

LineageOS is a free, community built, aftermarket firmware distribution of Android 9 (Pie), which is designed to increase performance and reliability over stock Android for your device.

This is an unofficial port for the ASUS MeMO Pad 7 (ME176C(X)), based on a recent mainline kernel and various open-source components. More information available on the XDA Thread.

See Development for a technical overview of the ROM.

Building

The ROM is built in a regular LineageOS 16.0 build environment, with a few additional repositories using a local manifest.

Note: This guide assumes you have built LineageOS for another device before and therefore are aware of preparations required to build LineageOS (e.g. supported Linux distributions, additional build dependencies, ...).

  1. Initialize local repositories:

    $ repo init -u https://github.com/LineageOS/android.git -b lineage-16.0
  2. Add the local manifest: Download lineage_me176c.xml and copy it to .repo/local_manifests/. Create the directory if it doesn't exist already.

  3. Sync the repositories: Depending on your Internet connection, this will take a long time.

    $ repo sync
  4. Extract firmware: (also see: Firmware README)

    $ cd device/asus/K013
    $ ./extract_files.sh

    Note: This step is "optional". However, WiFi/BT will not be functional without the firmware from the stock system.

  5. Build the ROM: Depending on your CPU, this will take even longer.

    $ device/asus/K013/patches/apply.sh aosp
    $ . build/envsetup.sh
    $ brunch lineage_me176c-userdebug

    The first command applies some patches to repositories from AOSP/LineageOS. It should be re-run after repo sync. Note that it fails if the patches are already applied.

TWRP

TWRP (TeamWin Recovery Project) is also built in the LineageOS 16.0 tree.

Note: By default, the built TWRP will not be able to flash stock ASUS firmware ZIPs.
See recovery/asus_updater/README.md for details.

  1. Checkout TWRP fork: Right now, a few extra patches are needed to build TWRP. The command fetches TWRP and the extra patches and checks it out in bootable/recovery.

    $ device/asus/K013/twrp-checkout.sh
  2. Build TWRP:

    $ . build/envsetup.sh
    $ lunch twrp_me176c-userdebug
    $ mka recoveryimage

Additional patches

The ROM distributed as releases/on XDA comes with additional patches that are not part of the build by default. These are applied manually before the ROM build is started.

The changes that are made are documented below. Some of the patches are available in the patches directory.

Signature Spoofing

See Signature Spoofing Patch.

WireGuard VPN

WireGuard support is added to the kernel using the kernel patch script, as explained in the official XDA thread.

$ device/asus/K013/patches/wireguard/patch-kernel.sh kernel/me176c

(The official android_kernel_wireguard repository is cloned to device/asus/K013/patches/wireguard.)

Development

Introduction

Almost all Android device ports rely on components from the vendor:

This port is different: Except for a bit of firmware, there are no components used from the stock system:

Unfortunately, some hardware components are hard to get working in such an environment. Camera and GPS are the two main features missing in this port either because of missing kernel drivers, or because the user-space portion is proprietary and completely undocumented.

Overview

The ROM consists out of multiple repositories: