arter97 Pie Software Collection for the Mi Pad 4

Search This thread


Senior Member
Jan 5, 2014
Dear Forum ?,

Does encryption work using the Thargorsson Lineage OS v16 build and and the arter97 Software Collection?

Thank you for any information.


Senior Member
Apr 9, 2012
This is a super awesome rom/software package. Thanks @arter97.

---------- Post added at 11:28 PM ---------- Previous post was at 11:28 PM ----------

This is a super awesome rom/software package. Thanks @arter97.


Dec 28, 2018
Did you guys do anything to make otg work?

I was hoping to use it with audio apps because this seemed to have lower audio latency (tested via trrs jack and tonebridge). But was not able to make otg work,usb audio, usb midi even for flash drives..

Top Liked Posts

  • There are no posts matching your filters.
  • 58

    arter97 Pie Software Collection for the Mi Pad 4​

    /* Summary */

    Stock software stack on this Mi Pad 4 is horrendous and full of retarded junks top to bottom.
    This is a project to replace most of the software stack on the Mi Pad 4.

    This is done by reworking the entire kernel and the vendor image, and providing a custom TWRP recovery with f2fs support.

    Please read the entire post to get an idea how to use as this ain’t like other ROMs/kernels on this forum.

    (Please don’t quote this entire post and spam the thread.)

    /* System */

    You may use Android Pie-based GSI images. Oreo is not supported. MIUI is obviously not supported. (Are you f***ing serious?) Compatibilities between other source-built ROMs targeting clover(Mi Pad 4) specifically is not guaranteed and most likely to cause issues.

    You can also use Paranoid Android for Mi Pad 4, which is recommended for best performance.

    /* Kernel */

    The kernel is fully rebased to the latest Pie CAF tag, which is a different base from the stock Oreo CAF tag, not to mention most of Xiaomi’s ultra-poor-quality codes are gone.

    - To mitigate the horrendous touch latency, numerous touch panel optimizations were made.
    - Mi Pad 4 is using eMMC instead of UFS. Numerous changes were made to improve its performance including the enforcement of f2fs filesystem and optimizations to CFQ I/O scheduler.
    - 3/4 GB of RAM is quite insufficient these days. zram is activated with updated LZ4 compression algorithm to provide a better memory management along side revamped lowmemorykiller.
    - Touch boost is set aggressively due to the reality of most ROMs lacking QPerformance. This improves responsiveness.
    - Kernel module support is disabled to make it a bit lighter.
    - WireGuard is supported.
    - Automatically sets correct Android version and security level to prevent booting issues caused by keymaster.
    - Double-tap-to-wake is enabled by default.
    - A whole lot more that I forgot.

    /* Vendor */

    For the best compatibility with Pie ROMs, Pie vendor must be used. To make this happen, the entire vendor firmware is ported from the Mi A2. This process took me weeks to debug and make it stable to this point.

    Since this is the only one of its kind on the Mi Pad 4, the software experience with this vendor image will be quite different from other ROMs.

    Also, an overlay is integrated to give the correct corner overlay for rounded corners.

    Unfortunately, it’s not bug-free, but way beyond usable. Bugs will be listed below.

    /* Recovery */

    As I said, f2fs is enforced. Reason for this will be explained below.
    You must format your userdata partition(erasing everything on the device) to f2fs before using this project.

    You cannot use existing TWRP for 2 reasons:
    a) The TWRP kernel won’t support f2fs.
    b) TWRP’s mkfs.f2fs tool is outdated.

    A custom TWRP is also provided, powered by my kernel and the latest mkfs.f2fs tool. You must use it to format /data to f2fs before using this project.

    /* Harmony */

    The whole kernel and the vendor image is meant to be used together. If you mix one another(e.g. using my kernel on other vendor image or vice versa), you will definitely encounter issues. Please don’t.

    To make the experience consistent and since you’re locked with the kernel/vendor combination anyways, I decided to force f2fs. Please be extremely cautious when you want to test out other kernels that claims to support f2fs. If the f2fs version isn’t inline with my kernel, you may experience random panics, or even worse - data corruption.

    It’s extremely recommended for you to wipe the entire /data back to ext4 if you want to switch from using this project.

    /* Instructions */

    You must be familiar with fastboot.

    - Download kernel, vendor and TWRP from the link below.
    *.img.xz is for fastboot. Extract the .xz files before feeding it to fastboot. *.zip is for TWRP.
    - Download an Android Pie based GSI of your choosing.
    - Flash kernel by ‘fastboot flash boot /path/to/kernel/image’.
    - Flash TWRP by ‘fastboot flash recovery /path/to/recovery/image’.
    - Flash vendor by ‘fastboot flash vendor /path/to/vendor/image’. This process will take about 5 minutes(it took 275 seconds for me).
    - Enter TWRP by ‘fastboot boot /path/to/recovery/image’.
    - Do ‘Wipe > Format Data’. This will automatically wipe to f2fs.
    - Follow the instructions you got from the GSI ROM developer and flash system image.
    - Reboot.
    - Leave feedback.

    Note about Magisk

    Due to a (supposed) Magisk bug with f2fs. You must flash Magisk after the first initial setup to avoid memory leaks(which ultimately causes the kernel to shutdown). After Magisk is installed, reboot again after confirming Magisk Manager is installed.

    /* Disclaimer */

    Your warranty is now void.
    I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in this project before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.

    /* Warning */

    I won’t be granting permissions to redistribute or extract files from this project to serve others, without actually contributing something to this project.
    You will be reported to XDA forum moderators.

    Making mirrors, re-uploading to another servers are also prohibited with no exceptions.

    /* Thanks to */

    jjajjaroni - for reporting bugs ahead of public release
    nathanchance - for android-linux-stable

    /* Downloads and links */
    Kernel source

    XDA:DevDB Information
    arter97 Pie Software Collection for the Mi Pad 4, ROM for the Xiaomi Mi Pad 4

    ROM OS Version: 9.x Pie

    Version Information
    Status: Beta

    Created 2019-01-13
    Last Updated 2019-03-07
    /* Bugs */

    - Phone calls won't work
    - Fingerprint sensor and GPS on the Mi Pad 4 Plus doesn't work

    - For the Wi-Fi variant, the device may get confused and think it’s a phone. Not a big deal.
    - Didn’t notice anything else.
    This device took an enormous amount of my time that it clearly didn't deserve.
    Hey everyone :)

    As you guys may have noticed, the fundraiser reached its goal.
    I've been a little busy with my work on OnePlus 6 and Magisk to make the purchase, but I will do it sometime during this or the next week.

    (The irony is that I worked to fix MagiskHide when I tried to use my banking app to purchase the Mi Pad 4 Plus, lol)

    Also, PA will soon release another update to QSSI msm8998 image, which will run without major quirks on the Mi Pad 4(still requires an update from this project).

    Thanks! (Especially the ones contributed to the fundraiser)
    New version is up.
    This is a major update.

    Please update all kernel, recovery and vendor image.

    Bunch of stuffs missed from previous port were applied
    - This affects multiple parts of the system
    Fixed video recording
    Booting issues fixed for ROMs with 2019 security patch level
    MTP fixed
    Wi-Fi drivers' inconsistencies fixed
    Merged Linux 4.4.172
    Enabled ULPS for lower power consumption
    Merged several changes from Sultan's kernel
    - GPU performance improved with corrected priority
    - Faster display wake-up
    - Lower power consumption