[JDCTeam][TREBLE][v6 RC2][Gemini] The Full Treble support project

Search This thread

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
Jflte_DevCon_Treble.png


The Full Treble Project for MI5 Gemini
Brought to you by Jflte DevConnection Team


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


Gemini hardware vs Treble implementation:
Gemini is an ARM64 and 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.


Available GSI downloads:
Up today, thanks to @phhusson and other devs, are available a bunch of Android 9.0 system images that can be flashed on Gemini.
You can find these Gsi at the following links:

- ANDROID Q (Gsi)... Is just a preview... but it works on our Mi5!!
- Phh AOSP 9.0 (Gsi).
- Resurrection Remix v7.0 (Gsi).
- LineageOS 16.0 (Gsi).
- HavocOS v2.0 (Gsi) (Use A only).
- ViperOS v6.0 (Gsi) (Use A only).
- JDC AOSP 9.0 (PURE AOSP Gsi, built from sources, just for testing purpose, no gapps support for this preview version).

- GSI & sGSI List page


Treble implementation and download:
JDCTeam is working from latest months of 2017 to implement on Gemini (un-supported from producer) the full support of Treble.
Thanks to @sir mordred, we reached on MI5 the full working status... from v5 we moved to full versioned vndk v28 (aka PIE support... and Q ready!).
NOTE: just to be clear, it's a work in progress development...
We tested with some available Gsi and we put over here some links to these images.
We are sharing a TWRP flashable zip that include vendor and boot images (flash only through TWRP 3.2.3-0 Official).

NOTE: ONLY with TWRP 3.2.3-0 version is possible to handle the treble flash!

How to use:
  • Download the TREBLE zip provided here: Mediafire
  • Download a GSI image (Remember: ARM64 and A-ONLY version)
  • Reboot to recovery (TWRP 3.3.1-0 REQUIRED)
  • Clean the device (wipe Dalvik/Cache/System/Data partitions)
  • Flash Treble gemini zip
  • Flash the GSI system image you wish to use
  • Reboot
---> Video on How to install <---

Screenshots:

TWRP-TREBLE-FLASH-v6-RC2.png
TREBLE-CHECK.png
Android_Q_Mi5.png


Youtube review: (To Be Updated when new links available)

- ANDROID Q Gsi on MI5 (How to Install) ---> Click here to play the video

- ANDROID Q Gsi on MI5 ---> Click here to play the video

- RR v7.0.0 Gsi on MI5 ---> Click here to play the video

- PHH AOSP 8.1 Gsi on MI5 ---> Click here to play the video

- AEX 8.1 Gsi on MI5 ---> Click here to play the video



What's working (... and not working):
The development is now @ an RC status (this is not a rom)... you have the possibility to have a look and test the phone with a GSI rom... let us know what does not work (not related to the GSI itself)!!

Issue reporting:
We already say that this is not the place to report issues or bugs ROM related... but in any case a bug encountered can be linked to the treble support not perfect or missing supported features... be free to post about issues you encountered, and please provide logs with the description of the issue. We will check the logs to understand the reason, and in case of fixes to be done, we will update on post#3 (MISCELLANEA) a kind of todo list for us and for users as a "bug list"... but the meaning is "what has to be checked/fixed to get a better treble support for future".

Any question?
If you have any question about, please check first on the post#2 (FAQ) to see if your question has already an answer... if not, post in the thread and we will give you informations.

Sources
GitHub

Social
YouTube: JDCTeam TV
XDA News: Read article

Credits
  • JDCTeam
  • LinageOS
  • Google
  • MI5Devs

Special thanks:
  • @sir mordred (developer)
  • @musabcel (for his test support)
  • Team Codefire - JDCTeam-Build03


XDA:DevDB Information
GEMINI Full Treble support project, ROM for the Xiaomi Mi 5

Contributors
smeroni68, sir mordred, mzo, ktulu84
Source Code: https://github.com/Project-Treble-Mi5

ROM OS Version: 9.x Pie
ROM Kernel: Linux 3.x
ROM Firmware Required: Latest available
Based On: AOSP

Version Information
Status: Stable
Current Stable Version: v6
Stable Release Date: 2019-03-16

Created 2018-03-10
Last Updated 2019-06-27
 
Last edited:

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
FAQ Section...

This is the FAQ (Frequently Asked Questions).
Have a look here before asking in the thread... in the worst case you will not find the answer you are searching!
If this section is useful for most users needs, I'll be glad to continue investing time to update this Q/A list!!

Q1:Fingerprint wake/home button works?
A: Yes, now we have the complete support and this feature is available on standard GSI roms (treble support is ready for it)

Q2: How can I revert back from treble to custom ROM whenever required?
A: Just flash the custom rom you like from TWRP and that's all. Custom rom flash will overwrite the boot.img,system and vendor partitions.

Q3: If I revert to a Custom rom, what I need to do to restore treble support?
A: Just flash the Treble zip through TWRP as the first time. Treble support need boot.img and vendor.img to be installed into the phone... nothing more... nothing less...

Q4: Phh GSI rom is quite poor in functionality. Why?
A: The purpose of Phh GSI AOSP rom is not to be a custom/featured rom. It is an experimental project that is born to have a common rom (better to say the same system.img) usable on many devices with treble support.
This support can be native, acquired after an Oreo original update or as we have done a custom integration on an "unsupported" device.
The meaning today of using a GSI rom is not to be a perfect rom for dayly use... or let's say, it can be a dayly rom only for users that like pure vanilla code.
In future we hope that many others custom roms will move to be a GSI (as JDC will try to do), so we will have the treble base to use these new project also on our devices.

Q5: If a new version of treble support is out, did I need to flash it or not?
A: Our project is on the way. This means that if is available a new update from us, it is for sure an enhancement with more support of feature or fixes.
In case you will need to install a GSI rom, check always here if there is any new version and get it.
In case you are running a custom rom without treble support, DO NOT update with treble flash, because most probably you will break your current installation.
Treble flash is 100% safe from the phone point of view... isn't safe for your current installation!! Why? Mainly because your current boot.img will be overwritten with treble support... 99% you will get a bootloop with a not treble rom!

Q6: How to get ROOT on phh gsi?
A: Firstly download the phh-gapps-su image. After installation, go to the market and install "phh superuser" app to manage the su access for the apps that need it. In the other cases, you can flash from TWRP the correct Magisk zip to gain root.

Q7: Where I can find the GSI images available?
A: Have a look in the OP post over here... there you can find the available ones. In any case here the LINK to the Treble Enabled Device Development section on XDA or here on GSI & sGSI List page

Q8: Everytime I entered the password, it says Decryption Unsuccessful!
A: You have internal SD encrypted. If after MIUI stock, you haven't FORMATTED the internal SD (FORMAT is not WIPE... Format will erase all data and files from the phone, so you must know what you are doing before formatting), the phone result as encrypted, so the rom is asking the password to decrypt the datas... Decryption Unsuccesful clearly states that the decryption procedure is not working. Post about the issue on the GSI rom you are using and provide logs to the developer to help digging the problem... if Developer will answer that encryption is not supported, you can only do one thing: backup all your data, files and pictures on an external storage (eg. a PC) and procede with a FORMAT DATA from TWRP to "destroy" the encryption and "free your phone from it"!

Q9: Is Google Camera working on Gsi?
A: Yes. But remember you need to install gapps package to let gcam works as it should.
We tested Gcam up to v6.1.021 on AOSiP Gsi. If you have greenish selfies pics, go in the Settings -> Fix ->and enable the fix for Front Camera and reboot. For SlowMotion, set 120fps.

Q10: Why can't flash a micro gapps and only pico is flashable?
A: If you get an error of Insufficent space on system partition, you need to resize the partition. Do in this way:
  • Flash the SYSTEM.IMG you wanna use (select a Vanilla based one)
  • Reboot to RECOVERY
  • MOUNT the SYSTEM partition
  • Go in WIPE menu -> ADVANCED WIPE -> select SYSTEM from the list and press the button REPAIR OR CHANGE FILE SYSTEM
  • select RESIZE FILE SYSTEM
  • than SWIPE to execute the command...
  • in case of error (you will see in red), repeat the RESIZE until it goes completed (Resizing... Done)
  • After this operation, the system partition will be resized to his maximum dimension (on Mi5 is around 2992MB)
  • before the installation of gapps package, do a REBOOT to recovery and after MOUNT the SYSTEM partition (check that it is really mounted)
  • Now you can flash the micro gapps without problem.

Q11: Is there any Magisk version working on Treble gsi?
A: Yes, you need to get v18.1 version or newer with treble support (check around).

Q12: VoLTE is working[/B]?
A: Yes. Install this ims.apk to use it!

Q13: ADB Logs are needed in case of Issue reporting...
A: In case you need help and want report an issue (eg. a boot problem), we need logcat of the phone. Just as sample, we report here what to do (but you must able to do by yourself... we are not giving help on how to do...)
  • prepare a PC (with adb package to support debug via usb connection)
  • flash on the phone our treble and the GSI image (just these 2 files, not any patch or other stuff)
  • reboot the phone
  • connect the usb cable
  • after the Mi logo screen, wait to hear from PC a sound that means the usb periferial has been recognised
  • go in a command window and type:
    --> adb devices (if the phone is connected, you will see the code written after the command executed)
    --> adb shell logcat > bootlog.txt (this will start real time recording of logs into the pc in the bootlog.txt file)
    --> when the phone has completed boot/reboot (eg. a boot loop or fastboot), you need to press Ctrl+C from keyboard to stop log recording.
  • send attached to the issue description post the bootlog.txt
  • ...let's dev check what's happening by reading the logcat.


... list will be updated...
 
Last edited:

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
Miscellanea...

Download (public versions history)

Here you can find the shared folder with all the version released of Treble support: GEMINI-TREBLE


Changelog's

v6 (20190316) - Release Candidate 2 full versioned_vndk v28
- VERSİONED_VNDK support is fully implemented
- FIXED NFC support
- FIXED Ambient Display main icon size and settings menu icons style... Thanks to Subezhj for helping fixing.
- FIXED ConfigPanel - Fingerprint settings menu icons style

v5 (20190308) - Release Candidate full versioned_vndk v28
- VERSİONED_VNDK support is fully implemented
- Mostly all library dependencies between system/vendor which are called as violations against treble's rule are succesfully eliminated
- Updated kernel as per treble's kernel docs (enforced)
- Vendor image's version is now 28
- Misc updates and fixes
- GSI Pie roms support (check in OP for some links)
- JDC PIE GSI rom given just as a preview for testing (JDC PIE GSI is build from sources without ANY hack!!)... It's pure AOSP as Google bring to their devices... NOTE: No support for gapps... they do not complete setup... you are advised.

v4 (20180409) - Beta partially versioned_vndk with the following updates:
- VERSİONED_VNDK support is partially implemented
- Lots of library dependencies between system/vendor which are called as violations against treble's rule are succesfully eliminated, only small number of lib dependencies which needs to be resolved are left
- Updated kernel as per treble's kernel docs
- Vendor image is now using google's stock vndk-sp, ll-ndk libs which are called as treble layer libs
- Vendor image's version is now 27.1.0
- Misc updates and fixes

v3 (20180329) - Beta status with the following updates:
- Updated camera Hal from latest qualcomm 8996 repo
- Hexedited more libs and removed more vendor system dependency (better treble and preparation for versioned vndk)
- Updated wifi configs from lates CAF

v2 (20180318) - Still alpha build with the following updates:
- Upstreamed kernel
- Hexedited blobs to correct path (for treble)
- Linker issues fixed
- Vendor overlays
- Latest device tree updates from CAF and miui oreo beta
- Disabled non-working apps (custom xiaomi doze package and configpanel app which were designed to work with LOS APIs)
- Disabled userspace thermal hal initialization which we dont have in cameraHal (faster cam launch)
- Increased jpeg quality parameters
- other misc. dev tree updates

v1 (20180310) - Initial release (Alpha)


Reported/Known Issues

- Camera works perfectly, but on some apk after a shot is taken with Flash active, the camera do not get more pictures... Close the app will clear the issue and you can get other pictures! Suggestion: do not use the flash with this camera apk if you have the issue! :p... or use a working camera apk (is a better solution)!

to be updated...
 
Last edited:

sir mordred

Senior Member
Sep 22, 2013
724
1,109
mmcblk0p15
Big thanx and credits also goes to @smeroni68

All of the story is started with the identifying unused CUST partition which xiaomi left on our device Mi5 https://forum.xda-developers.com/showpost.php?p=74702470&postcount=300

And after we determined that the /cust partiton is unused on AOSP roms, we used it as /vendor partition as per the requirement of Full-Treble https://github.com/sirmordred/android_device_xiaomi_gemini-twrp/commit/5faf9c4e162e8144b71f87d6d21c384931b1ac0c nearly 3 month ago

And that is also the reason of nearly all devices which get Full-Treble support via custom implementation, are Xiaomi devices (Redmi Note 4, Mi5S and our Mi5)

Thanx also to my teammates who contributed this project :good:

Our goal is now separating/isolating all vendor <=> system interactions (which will be enforced on future android releases for treble devices) and stabilizing vendor.img while getting closer to pure AOSP sources

Enjoy ;)
 

MichaelPan01

Senior Member
Jan 25, 2017
97
5
Great Job dude! Finally we got treble. Downloading now. Can't wait flashing.

通过我的 MI 5 上的 Tapatalk发言
 

kishan314

Senior Member
Jul 19, 2014
194
29
Great news ..only one query .. How can I revert back from treble to custom ROM whenever required?
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
Great news ..only one query .. How can I revert back from treble to custom ROM whenever required?

Good question... I'll report also in post#2 in FAQ section.

Q: How can I revert back from treble to custom ROM whenever required?
A: Just flash the custom rom you like from TWRP and that's all. Custom rom flash will overwrite the boot.img and the system partition... vendor partition will stay there waiting for your next test!
 
Last edited:

StealthHD

New member
Feb 23, 2013
2
2
Installed. Yeap, we finally got a vanilla android :)
For first alpha, it working flawlessly.
Some bugs i founded.
1. After magisk install on stock kernel, got bootloop. Fixed after installing AEXMod latest kernel.
2. Gcam not working. buildprop (vendor folder) doesnt help. Got FC anyway
3. HMP... stock governor settings cant provide smooth scrolling in settings, 820 sd stuttering like 210, okay. It happens on every gemini hmp kernel on 8.1 oreo. Maybe some to perfd related. Need EAS.
4. Gpay wont work, magisk can't help, maybe device id change will help
All other working fine
 

smeroni68

Inactive Recognized Contributor
Jan 23, 2011
4,455
11,020
Milano
When charging, the battery icon won't show. The bug is phh's?

Sent from my MI 5 using Tapatalk

Here it is working.

Screenshot_20180311-082824.png


Have you set the battery icon visibility status under the statusbar settings?

Installed. Yeap, we finally got a vanilla android :)
For first alpha, it working flawlessly.
Some bugs i founded.
1. After magisk install on stock kernel, got bootloop. Fixed after installing AEXMod latest kernel.
2. Gcam not working. buildprop (vendor folder) doesnt help. Got FC anyway
3. HMP... stock governor settings cant provide smooth scrolling in settings, 820 sd stuttering like 210, okay. It happens on every gemini hmp kernel on 8.1 oreo. Maybe some to perfd related. Need EAS.
4. Gpay wont work, magisk can't help, maybe device id change will help
All other working fine

1) Phh rom support natively Phh superuser app (from market) with stock kernel and phh-gapps-su gsi image.
2) Gcam require API2/HAL3 support, and on phh gsi hasn't been implemented (as written is an experimental rom with the meaning to be compatible with stock Oreo treble devices). Instead, it has API1/HAL1 support for stock vanilla camera.
3) Stock kernel is HMP. We do not develop till now the EAS kernel on stock treble kernel (we will do for our JDC gsi).
4) Magisk is clearly reported into Phh thread to not be used. In custom development we have a plus, because we can change the kernel (as you have done)...

Thanks for this testing report.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 79
    Jflte_DevCon_Treble.png


    The Full Treble Project for MI5 Gemini
    Brought to you by Jflte DevConnection Team


    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


    Gemini hardware vs Treble implementation:
    Gemini is an ARM64 and 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.


    Available GSI downloads:
    Up today, thanks to @phhusson and other devs, are available a bunch of Android 9.0 system images that can be flashed on Gemini.
    You can find these Gsi at the following links:

    - ANDROID Q (Gsi)... Is just a preview... but it works on our Mi5!!
    - Phh AOSP 9.0 (Gsi).
    - Resurrection Remix v7.0 (Gsi).
    - LineageOS 16.0 (Gsi).
    - HavocOS v2.0 (Gsi) (Use A only).
    - ViperOS v6.0 (Gsi) (Use A only).
    - JDC AOSP 9.0 (PURE AOSP Gsi, built from sources, just for testing purpose, no gapps support for this preview version).

    - GSI & sGSI List page


    Treble implementation and download:
    JDCTeam is working from latest months of 2017 to implement on Gemini (un-supported from producer) the full support of Treble.
    Thanks to @sir mordred, we reached on MI5 the full working status... from v5 we moved to full versioned vndk v28 (aka PIE support... and Q ready!).
    NOTE: just to be clear, it's a work in progress development...
    We tested with some available Gsi and we put over here some links to these images.
    We are sharing a TWRP flashable zip that include vendor and boot images (flash only through TWRP 3.2.3-0 Official).

    NOTE: ONLY with TWRP 3.2.3-0 version is possible to handle the treble flash!

    How to use:
    • Download the TREBLE zip provided here: Mediafire
    • Download a GSI image (Remember: ARM64 and A-ONLY version)
    • Reboot to recovery (TWRP 3.3.1-0 REQUIRED)
    • Clean the device (wipe Dalvik/Cache/System/Data partitions)
    • Flash Treble gemini zip
    • Flash the GSI system image you wish to use
    • Reboot
    ---> Video on How to install <---

    Screenshots:

    TWRP-TREBLE-FLASH-v6-RC2.png
    TREBLE-CHECK.png
    Android_Q_Mi5.png


    Youtube review: (To Be Updated when new links available)

    - ANDROID Q Gsi on MI5 (How to Install) ---> Click here to play the video

    - ANDROID Q Gsi on MI5 ---> Click here to play the video

    - RR v7.0.0 Gsi on MI5 ---> Click here to play the video

    - PHH AOSP 8.1 Gsi on MI5 ---> Click here to play the video

    - AEX 8.1 Gsi on MI5 ---> Click here to play the video



    What's working (... and not working):
    The development is now @ an RC status (this is not a rom)... you have the possibility to have a look and test the phone with a GSI rom... let us know what does not work (not related to the GSI itself)!!

    Issue reporting:
    We already say that this is not the place to report issues or bugs ROM related... but in any case a bug encountered can be linked to the treble support not perfect or missing supported features... be free to post about issues you encountered, and please provide logs with the description of the issue. We will check the logs to understand the reason, and in case of fixes to be done, we will update on post#3 (MISCELLANEA) a kind of todo list for us and for users as a "bug list"... but the meaning is "what has to be checked/fixed to get a better treble support for future".

    Any question?
    If you have any question about, please check first on the post#2 (FAQ) to see if your question has already an answer... if not, post in the thread and we will give you informations.

    Sources
    GitHub

    Social
    YouTube: JDCTeam TV
    XDA News: Read article

    Credits
    • JDCTeam
    • LinageOS
    • Google
    • MI5Devs

    Special thanks:
    • @sir mordred (developer)
    • @musabcel (for his test support)
    • Team Codefire - JDCTeam-Build03


    XDA:DevDB Information
    GEMINI Full Treble support project, ROM for the Xiaomi Mi 5

    Contributors
    smeroni68, sir mordred, mzo, ktulu84
    Source Code: https://github.com/Project-Treble-Mi5

    ROM OS Version: 9.x Pie
    ROM Kernel: Linux 3.x
    ROM Firmware Required: Latest available
    Based On: AOSP

    Version Information
    Status: Stable
    Current Stable Version: v6
    Stable Release Date: 2019-03-16

    Created 2018-03-10
    Last Updated 2019-06-27
    38
    FAQ Section...

    This is the FAQ (Frequently Asked Questions).
    Have a look here before asking in the thread... in the worst case you will not find the answer you are searching!
    If this section is useful for most users needs, I'll be glad to continue investing time to update this Q/A list!!

    Q1:Fingerprint wake/home button works?
    A: Yes, now we have the complete support and this feature is available on standard GSI roms (treble support is ready for it)

    Q2: How can I revert back from treble to custom ROM whenever required?
    A: Just flash the custom rom you like from TWRP and that's all. Custom rom flash will overwrite the boot.img,system and vendor partitions.

    Q3: If I revert to a Custom rom, what I need to do to restore treble support?
    A: Just flash the Treble zip through TWRP as the first time. Treble support need boot.img and vendor.img to be installed into the phone... nothing more... nothing less...

    Q4: Phh GSI rom is quite poor in functionality. Why?
    A: The purpose of Phh GSI AOSP rom is not to be a custom/featured rom. It is an experimental project that is born to have a common rom (better to say the same system.img) usable on many devices with treble support.
    This support can be native, acquired after an Oreo original update or as we have done a custom integration on an "unsupported" device.
    The meaning today of using a GSI rom is not to be a perfect rom for dayly use... or let's say, it can be a dayly rom only for users that like pure vanilla code.
    In future we hope that many others custom roms will move to be a GSI (as JDC will try to do), so we will have the treble base to use these new project also on our devices.

    Q5: If a new version of treble support is out, did I need to flash it or not?
    A: Our project is on the way. This means that if is available a new update from us, it is for sure an enhancement with more support of feature or fixes.
    In case you will need to install a GSI rom, check always here if there is any new version and get it.
    In case you are running a custom rom without treble support, DO NOT update with treble flash, because most probably you will break your current installation.
    Treble flash is 100% safe from the phone point of view... isn't safe for your current installation!! Why? Mainly because your current boot.img will be overwritten with treble support... 99% you will get a bootloop with a not treble rom!

    Q6: How to get ROOT on phh gsi?
    A: Firstly download the phh-gapps-su image. After installation, go to the market and install "phh superuser" app to manage the su access for the apps that need it. In the other cases, you can flash from TWRP the correct Magisk zip to gain root.

    Q7: Where I can find the GSI images available?
    A: Have a look in the OP post over here... there you can find the available ones. In any case here the LINK to the Treble Enabled Device Development section on XDA or here on GSI & sGSI List page

    Q8: Everytime I entered the password, it says Decryption Unsuccessful!
    A: You have internal SD encrypted. If after MIUI stock, you haven't FORMATTED the internal SD (FORMAT is not WIPE... Format will erase all data and files from the phone, so you must know what you are doing before formatting), the phone result as encrypted, so the rom is asking the password to decrypt the datas... Decryption Unsuccesful clearly states that the decryption procedure is not working. Post about the issue on the GSI rom you are using and provide logs to the developer to help digging the problem... if Developer will answer that encryption is not supported, you can only do one thing: backup all your data, files and pictures on an external storage (eg. a PC) and procede with a FORMAT DATA from TWRP to "destroy" the encryption and "free your phone from it"!

    Q9: Is Google Camera working on Gsi?
    A: Yes. But remember you need to install gapps package to let gcam works as it should.
    We tested Gcam up to v6.1.021 on AOSiP Gsi. If you have greenish selfies pics, go in the Settings -> Fix ->and enable the fix for Front Camera and reboot. For SlowMotion, set 120fps.

    Q10: Why can't flash a micro gapps and only pico is flashable?
    A: If you get an error of Insufficent space on system partition, you need to resize the partition. Do in this way:
    • Flash the SYSTEM.IMG you wanna use (select a Vanilla based one)
    • Reboot to RECOVERY
    • MOUNT the SYSTEM partition
    • Go in WIPE menu -> ADVANCED WIPE -> select SYSTEM from the list and press the button REPAIR OR CHANGE FILE SYSTEM
    • select RESIZE FILE SYSTEM
    • than SWIPE to execute the command...
    • in case of error (you will see in red), repeat the RESIZE until it goes completed (Resizing... Done)
    • After this operation, the system partition will be resized to his maximum dimension (on Mi5 is around 2992MB)
    • before the installation of gapps package, do a REBOOT to recovery and after MOUNT the SYSTEM partition (check that it is really mounted)
    • Now you can flash the micro gapps without problem.

    Q11: Is there any Magisk version working on Treble gsi?
    A: Yes, you need to get v18.1 version or newer with treble support (check around).

    Q12: VoLTE is working[/B]?
    A: Yes. Install this ims.apk to use it!

    Q13: ADB Logs are needed in case of Issue reporting...
    A: In case you need help and want report an issue (eg. a boot problem), we need logcat of the phone. Just as sample, we report here what to do (but you must able to do by yourself... we are not giving help on how to do...)
    • prepare a PC (with adb package to support debug via usb connection)
    • flash on the phone our treble and the GSI image (just these 2 files, not any patch or other stuff)
    • reboot the phone
    • connect the usb cable
    • after the Mi logo screen, wait to hear from PC a sound that means the usb periferial has been recognised
    • go in a command window and type:
      --> adb devices (if the phone is connected, you will see the code written after the command executed)
      --> adb shell logcat > bootlog.txt (this will start real time recording of logs into the pc in the bootlog.txt file)
      --> when the phone has completed boot/reboot (eg. a boot loop or fastboot), you need to press Ctrl+C from keyboard to stop log recording.
    • send attached to the issue description post the bootlog.txt
    • ...let's dev check what's happening by reading the logcat.


    ... list will be updated...
    36
    Treble gemini progression... versioned_vndk!!

    Hi guys,
    we have some news about this project... are you curious?

    Well, today @sir mordred has finally built the first version (only for internal use and testing... so do NOT ask for ETA) of VERSIONED VNDK TREBLE for our device!!

    For who has time to read a bit more, here I'll report some info from devs!!

    What's versioned_vndk?

    It's simply a superior version of full-treble implementation which has been introduced by Google in 8.0 Oreo.

    Even if the full-treble implementation was supposed to isolate system (framework) and vendor implementation (HALs), vendor modules can still access system modules (as fallback mechanism), but with versioned_vndk Google applied strict rules to full-treble implementation that no module which is labeled as vendor module can access to system modules and vice versa.

    Android's dynamic linker is responsable to do this isolation/restriction as described in google's treble docs, so its just an updated treble implementation which applies full-restriction/isolation rule between system modules and vendor modules (libs,executables etc.), hence its superior version of full-treble implementation, and for reference versioned_vndk is not enabled neither in 8.0 nor 8.1 (Oreo-mr1) by default but as per google's treble documentation, enabling of versioned_vndk is recommended to OEMs on Oreo-mr1 and it has been clearly stated that it will be enforced on android P.

    On versioned_vndk enabled builds, vendor image's treble-version (ro.vendor.vndk.version) is 27 and vendor image is using new subset of vndk-sp modules which are just an intermediate compatibility libs between system layer and vendor layer, and from the latest public AOSP sources, Google enabled versioned_vndk support for their Pixel 2 series phones (wahoo family) and didn't enable it for their fully-trebelized Pixel 1 series (Marlin and Sailfish) and with ongoing development which we are doing for Mi5 as JDCTeam we removed dozens of vendor <=> system dependencies (we are calling them as violation since as we said earlier, no vendor modules should access/depend system modules and vice versa, as per the versioned_vndk rule) we have now compiled and booted fine a build with versioned_vndk enabled, and we partially achieved versioned_vndk support for Mi5.

    Now, our configuration (system, vendor and kernel) are configured against versioned_vndk changes/support and it booted fine, well why we call it as "partially"? Since we have a lots of closed source proprietary libs, unfortunatly a lots of them depend/link to system modules (violations! As per versioned_vndk rule) and since we dont have source for them, removing these dependency/linkage without breaking functionality requires really hard work... but thanx to our hexedit skilled devs we succesfully eliminated lots of violations and we have now a small number of violations left to fix, and since we still have these violations we temporarily disabled runtime-restriction (isolation) via BOARD_VNDK_RUNTIME_DISABLE as google suggested to OEMs in here https://source.android.com/devices/architecture/vndk/linker-namespace in case of some violations which need to be resolved.

    Hope you enjoy the reading over here!! ;)
    36
    General info for treble users: we synced P sources and started the implementation on Pie directly... do not ask ETA... as I always say: I'll advise sometime about the status, and when ready we will publish. Thanks for understanding and patience.

    Inviato dal mio Xiaomi Mi5 utilizzando Tapatalk
    31
    Big thanx and credits also goes to @smeroni68

    All of the story is started with the identifying unused CUST partition which xiaomi left on our device Mi5 https://forum.xda-developers.com/showpost.php?p=74702470&postcount=300

    And after we determined that the /cust partiton is unused on AOSP roms, we used it as /vendor partition as per the requirement of Full-Treble https://github.com/sirmordred/android_device_xiaomi_gemini-twrp/commit/5faf9c4e162e8144b71f87d6d21c384931b1ac0c nearly 3 month ago

    And that is also the reason of nearly all devices which get Full-Treble support via custom implementation, are Xiaomi devices (Redmi Note 4, Mi5S and our Mi5)

    Thanx also to my teammates who contributed this project :good:

    Our goal is now separating/isolating all vendor <=> system interactions (which will be enforced on future android releases for treble devices) and stabilizing vendor.img while getting closer to pure AOSP sources

    Enjoy ;)