Skip to content
Android device configuration for ASUS MeMO Pad 7 (ME176C(X))
C Makefile C++ Shell Java Python Forth
Branch: lineage-16.0
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
audio audio: Remove explicit include dir that is no longer needed Jan 20, 2019
bluetooth Run long-running bluetooth/wifi daemons without root Apr 21, 2019
build build: release: Update TWRP version to 3.3.1 Jun 7, 2019
firmware firmware: Update README.md Aug 19, 2019
init init: root: recovery: Fix mounting /apd when using external storage Jun 7, 2019
kernel kernel: defconfig: Enable IKHEADERS as module Jul 7, 2019
lid Refactor kernel modules insertion Jan 20, 2019
light light/power: Re-order "using" lines Aug 15, 2019
media media: Enable hardware accelerated MPEG2 codec Jun 6, 2019
overlay overlay: frameworks/base: Re-enable LiveDisplay/color transformations Jan 19, 2019
patches patches: Add patch to replace fingerprint in /system/vendor/build.prop Jun 6, 2019
power power: Restore Lineage power profile implementation Aug 15, 2019
recovery Allow mounting partitions from external storage Jun 6, 2019
sepolicy power: Restore Lineage power profile implementation Aug 15, 2019
wifi Run long-running bluetooth/wifi daemons without root Apr 21, 2019
.gitignore Isolate forked projects in hardware/me176c/* May 8, 2019
Android.bp Isolate forked projects in hardware/me176c/* May 8, 2019
Android.mk Initial work on port to Android 9.0 Pie Oct 19, 2018
AndroidProducts.mk Initial work on port to Android 9.0 Pie Oct 19, 2018
BoardConfig.mk BoardConfig.mk: Set TARGET_BOOTLOADER_BOARD_NAME Aug 14, 2019
LICENSE Initial Commit Apr 26, 2017
README.md README.md: Update link to XDA thread Jun 8, 2019
config.fs Move battery daemon (/sbin/upi_ug31xx) to /upi_ug31xx Apr 20, 2019
device.mk device.mk: Build android.hardware.power@1.1-service.me176c Aug 19, 2019
extract-files.sh Remove vendor repository, move firmware extraction into this repository Apr 10, 2019
lineage_me176c.mk Initial work on port to Android 9.0 Pie Oct 19, 2018
lineage_me176c.xml lineage_me176c.xml: Use latest linux-firmware Aug 12, 2019
manifest.xml power: Restore Lineage power profile implementation Aug 15, 2019
system.prop system.prop: Enforce privileged permission whitelisting May 11, 2019
twrp-checkout.sh Add release scripts to simplify release process May 12, 2019
twrp_me176c.mk Initial work on port to Android 9.0 Pie Oct 19, 2018

README.md

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:

  • Kernel: The Linux kernel used in these devices is usually forked from a rather old release, and then modified heavily with millions lines of code changed for additional hardware support. This code is usually messy, and potentially insecure because it does not go through the same review process. Those kernels also get increasingly more difficult to maintain with upstream security fixes.

    Projects like LineageOS usually take this kernel, and try to make the best of it, by porting certain changes made in other projects.

  • User-space components: Each Android device needs device-specific user-space components that make Android work with the specific hardware. Some parts of that code may be open-source, either through AOSP or related projects. However, there is not a single device that fully works without additional proprietary user-space components.

    Most devices cannot even boot without those proprietary "blobs", because for example the OpenGL implementation is proprietary. It is almost impossible to maintain these "blobs" properly, because they need to be provided from some vendor in compiled form or can be only edited manually in binary form. As the device ages, more and more security issues will be found in these "blobs", and it becomes increasingly difficult to keep them working on newer Android versions.

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

  • Kernel: This port uses a mainline (i.e. a largely unmodified) Linux kernel. There are a few minor changes and extra drivers that have not been submitted upstream yet, but those changes can be easily rebased on top of new kernel releases. Therefore, this port usually targets the latest Linux LTS release, as those are maintained with Android-specific patches in AOSP.

  • User-space components: This port does not make use of proprietary user-space libraries. Various open-source projects are used to implement the device-specific parts:

  • Firmware: See Firmware README.

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:

You can’t perform that action at this time.