[ROM][TREBLE] Project Treble for Xiaomi Redmi 4A & 5A [UNIFIED]

Search This thread

pedropereira22

Senior Member
Jan 10, 2014
78
23
Xiaomi Redmi 4a
Redmi Note 9 Pro
Is WiFi working for you

When I flash the android p pr1 or dp5 WiFi was not working

So can you tell me how you flashed android p
I using PR1 right now and working fine for me.

Could you tell me the zips that you've flashed? (in order), because i tried as you said but google camera and double tap to wake aren't working :/
This is what i did when flashing (used MIUI 10 8.8.2 Beta before, and using OrangeFox 3.2.1 recovery and PR1)
-Reboot to recovery
-Wipe System, Data, cache, vendor, dalvik cache
-Flash crdroidandroid treble rom (i flashed 4.5 20180721 build)
-Reboot to recovery (in my device, /vendor files corrupt if i continue without reboot)
-Flash GSI image in "Install > Install Image"
-Mount /vendor and /system if unmounted
-Flash zip in order:
1 - POST-sGSI_1_v0.14.zip
2 - POST-sGSI_2_v0.17.zip
3 - POST-sGSI_3_v0.5.zip (this may unmount /vendor and/or /system, so check it)
4 - P-Lag-Fix: https://androidfilehost.com/?fid=5862345805528049478
5 - Front Camera Fix ( I find it on Android P Telegram, and message date is July 21 and time is maybe 13:33, this patch fixed face unlock for me, maybe can fix camera issues better)
- Reboot
- Install google play services apk for Android P
- Done

Maybe this can help you :)

Android P rolex wiki page:
https://github.com/erfanoabdi/P_semiGSI/wiki/Xiaomi-Redmi-4A
 

Attachments

  • InkedScreenshot_20180817-200551_LI.jpg
    InkedScreenshot_20180817-200551_LI.jpg
    75.5 KB · Views: 749
  • Screenshot_20180817-200609.jpg
    Screenshot_20180817-200609.jpg
    58.8 KB · Views: 743
  • Screenshot_20180817-201253.png
    Screenshot_20180817-201253.png
    71.4 KB · Views: 743
Oct 9, 2015
16
1
Rize
I using PR1 right now and working fine for me.


This is what i did when flashing (used MIUI 10 8.8.2 Beta before, and using OrangeFox 3.2.1 recovery and PR1)
-Reboot to recovery
-Wipe System, Data, cache, vendor, dalvik cache
-Flash crdroidandroid treble rom (i flashed 4.5 20180721 build)
-Reboot to recovery (in my device, /vendor files corrupt if i continue without reboot)
-Flash GSI image in "Install > Install Image"
-Mount /vendor and /system if unmounted
-Flash zip in order:
1 - POST-sGSI_1_v0.14.zip
2 - POST-sGSI_2_v0.17.zip
3 - POST-sGSI_3_v0.5.zip (this may unmount /vendor and/or /system, so check it)
4 - P-Lag-Fix: https://androidfilehost.com/?fid=5862345805528049478
5 - Front Camera Fix ( I find it on Android P Telegram, and message date is July 21 and time is maybe 13:33, this patch fixed face unlock for me, maybe can fix camera issues better)
- Reboot
- Install google play services apk for Android P
- Done

Maybe this can help you :)

Android P rolex wiki page:
https://github.com/erfanoabdi/P_semiGSI/wiki/Xiaomi-Redmi-4A

Thanks a lot for the instructions, I really appreciate it, I have installed it as you said and google camera is now working. I couldn't get double tap to wake feature to work though, I think it has something to do with the kernel, tried Kernel Adiutor and it doesn't give me the "wake" option, anyways thank you for your help!
 
May 29, 2015
11
0
Camera is not working after flashing the v2 zip.........no camera app from play store is working...........I didn't even installed magisk
Also Screen flickers sometimes and some kind of display driver bug.
Device: Redmi 4A
 

Shakti Panda

Member
Apr 30, 2018
25
2
Hey all,
Does it really enable RGB notification LED? I want RGB notification LED so bad! If it doesn't work can anyone enlighten me on whether our Redmi 5A can support RGB LED and how to enable it? I'm on MoKee ROM.
Thanks!!!
 

harvey186

Senior Member
May 14, 2010
326
108
SBIA2n6.png

Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * We're 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 TREBLE
 * SUPPORT before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at us for messing up your device, we will laugh at you.
 *
 */

What is Project Treble:
Project Treble basically partitions your device into two separate partitions, a system and a vendor: system contains your generic system image, while vendor partition has your device specific files required for booting and running your phone. This way we can easily change the system image and be able to run our device on different system images with the same kernel and vendor partition​
Read more about Project Treble

What's a GSI?:
A GSI literally means Generic System Image. It is a general system image meant for no specific device. Treble enabled devices have the capability to run a GSI. You can find a GSI here: Phh-Treble

Xiaomi Redmi 4A hardware vs Treble implementation:
Our Redmi 4A is an A-only device. This means that regarding the GSI images (GSI = Generic System Image) to be used, you need to get ARM64 and A-Only system images​

How to report bugs:
Logcat, a simple description of the bug, kmsg or dmseg depending on the bug​

What's Packaged in the zip:
A boot image (kernel)​
A compressed vendor image (cust partition)​

How to use:
  • Reboot to recovery (Custom TWRP recovery for Redmi 4A - Direct link)
  • Format /system, /data and /cache
  • Install Treble flashable zip package (Project Treble flashable for Redmi 4A - Direct link)
  • Install the GSI system image you wish to use (How to flash a Generic System Image (GSI) on Project Treble supported devices - Direct link)
  • Reboot
Important notes:
  • Current minimal * required * firmware version is MIUI 8.3.29 Global dev, otherwise installation could have issues. Download the latest dev fastboot package directly from Xiaomi and flash it prior to installing LineageOS or, alternatively, download and install one of the latest custom packages containing firmware only (at your own risk).
  • GApps can only be flashed on clean installs.
  • Formatting data (all user data is wiped, including internal storage) is a must if MIUI was previously installed and device was encrypted.

Screenshots:
zt7kfwV.png
jKDFKsQ.png


Broken:
  • WIFI MAC address gets randomly generated (only once, you will keep the same as long as you are on LOS)
  • Encryption (format data or remove encryption when coming from a non-treble rom)
  • Sepolicy is still permissive
  • Nothing else? Otherwise please report it!

Working:
  • Camera (and flashlight)
  • WiFi
  • Bluetooth
  • Telephony (Calls and Data)
  • Audio (Record and Playback)
  • Video Playback
  • Sensors
  • GPS
  • VoLTE (AOSP doesn't have the needed patches to get it working, but most other GSIs have them)

Credits & collaborations:
This work is due to efforts from RedmiDevs founding members that did the full device bring-up. Huge thanks to @xboxfanj for all the help during that bring-up.​
Finally, all RedmiDevs & LineageOS team would like to thank everyone involved in helping with testing, coding, debugging & documenting! Enjoy!​
And I would give a special thanks to Baron Bronson for providing his device for developing!​


Device wiki:

XDA:DevDB Information
Project Treble, ROM for the Xiaomi Redmi 4A & 5A

Contributors:
33bca
ROM OS Version: 8.1 Oreo
ROM Kernel: Linux 3.18.71
ROM Firmware Required: MIUI 8.4.12 dev

Version Information
Status:
Beta

Created 2018-05-13
Last Updated 2018-05-24

Never use Treble Check app. It is always showing wrong partition layout. Use Treble Info app !!!!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    SBIA2n6.png

    Code:
    #include <std_disclaimer.h>
    /*
     * Your warranty is now void.
     *
     * We're 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 TREBLE
     * SUPPORT before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at us for messing up your device, we will laugh at you.
     *
     */

    What is Project Treble:
    Project Treble basically partitions your device into two separate partitions, a system and a vendor: system contains your generic system image, while vendor partition has your device specific files required for booting and running your phone. This way we can easily change the system image and be able to run our device on different system images with the same kernel and vendor partition
    Read more about Project Treble

    What's a GSI?:
    A GSI literally means Generic System Image. It is a general system image meant for no specific device. Treble enabled devices have the capability to run a GSI. You can find a GSI here: Phh-Treble

    Xiaomi Redmi 4A hardware vs Treble implementation:
    Our Redmi 4A is an A-only device. This means that regarding the GSI images (GSI = Generic System Image) to be used, you need to get ARM64 and A-Only system images​

    How to report bugs:
    Logcat, a simple description of the bug, kmsg or dmseg depending on the bug​

    What's Packaged in the zip:
    A boot image (kernel)
    A compressed vendor image (cust partition)​

    How to use:
    • Reboot to recovery (Custom TWRP recovery for Redmi 4A - Direct link)
    • Format /system, /data and /cache
    • Install Treble flashable zip package (Project Treble flashable for Redmi 4A - Direct link)
    • Install the GSI system image you wish to use (How to flash a Generic System Image (GSI) on Project Treble supported devices - Direct link)
    • Reboot
    Important notes:
    • Current minimal * required * firmware version is MIUI 8.3.29 Global dev, otherwise installation could have issues. Download the latest dev fastboot package directly from Xiaomi and flash it prior to installing LineageOS or, alternatively, download and install one of the latest custom packages containing firmware only (at your own risk).
    • GApps can only be flashed on clean installs.
    • Formatting data (all user data is wiped, including internal storage) is a must if MIUI was previously installed and device was encrypted.

    Screenshots:
    zt7kfwV.png
    jKDFKsQ.png


    Broken:
    • WIFI MAC address gets randomly generated (only once, you will keep the same as long as you are on LOS)
    • Encryption (format data or remove encryption when coming from a non-treble rom)
    • Sepolicy is still permissive
    • Nothing else? Otherwise please report it!

    Working:
    • Camera (and flashlight)
    • WiFi
    • Bluetooth
    • Telephony (Calls and Data)
    • Audio (Record and Playback)
    • Video Playback
    • Sensors
    • GPS
    • VoLTE (AOSP doesn't have the needed patches to get it working, but most other GSIs have them)

    Credits & collaborations:
    This work is due to efforts from RedmiDevs founding members that did the full device bring-up. Huge thanks to @xboxfanj for all the help during that bring-up.
    Finally, all RedmiDevs & LineageOS team would like to thank everyone involved in helping with testing, coding, debugging & documenting! Enjoy!
    And I would give a special thanks to Baron Bronson for providing his device for developing!​


    Device wiki:

    XDA:DevDB Information
    Project Treble, ROM for the Xiaomi Redmi 4A & 5A

    Contributors:
    33bca
    ROM OS Version: 8.1 Oreo
    ROM Kernel: Linux 3.18.71
    ROM Firmware Required: MIUI 8.4.12 dev

    Version Information
    Status: Beta

    Created 2018-05-13
    Last Updated 2018-05-24
    4
    You like my work? Feel free to donate here.
    3
    Changelog:
    V1 - 13.05.2018
    - Initial Release

    V2 - 24.05.2018
    - Unified with Redmi 5A from now on!
    - Added full RGB LED (It's slow while selecting the colors, but I'll improve the HAL soon)
    - Added new poweroff charging animations (Yay, it even shows percentage)
    - Fixed calls over bluetooth
    - Updated screen off gestures ( Added some new goodies)
    - Updated Camera to the latest CAF tag
    - Updated Kernel to the latest CAF tag
    3
    [tested][working] root support for treble

    Please add this to OP. It will be very useful. Thank you.

    Hello, I noticed that root support is broken with both Magisk (Stable & Beta) and SuperSU (Stable & Beta) in Treble. I think this is because of Xiaomi's vendor partition as /cust.

    Official Magisk installed successfully but booted into black screen.

    Official SuperSU failed to install while patching sepolicy. I took a check at logs and saw that some files are missing (ramdisk) while SuperSU is patching sepolicy.

    I've attached a working Magisk Installer v16.4 patched by @Jerry981028 at GitHub. This Magisk Installer has /cust partition as vendor support. It does not bootloop and root is working normally.

    NOTE: This is universal for Xiaomi devices. Every Xiaomi device with Treble support can use this zip this zip to root. This is NOT for mido only!

    Download: https://www.mediafire.com/file/7tb1n6a3e92rg89/Magisk-v16.4.zip/file

    Credit goes to @Jerry981028 at GitHub.
    This is the original link: https://github.com/Jerry981028/Magisk
    3
    Update

    • Unified with Redmi 5A from now on!
    • Added full RGB LED (It's slow while selecting the colors, but I'll improve the HAL soon)
    • Added new poweroff charging animations (Yay, it even shows percentage)
    • Fixed calls over bluetooth
    • Updated screen off gestures ( Added some new goodies)
    • Updated Camera to the latest CAF tag
    • Updated Kernel to the latest CAF tag

    You can find the remaining bugs in the OP.
    Due to my broken Redmi 4A I can't deliver that many and bigger updates. I should receive the replacement parts in about a month. (I didn't find any faster delivery at a reasonable price..)

    Grab the update here!

    BTW: You will need a TWRP with custom vendor support like this one.