• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[AIO] Project Treble [DEV & DISCUSSION] {tissot}

Search This thread

ghpranav

Senior Member
Aug 14, 2013
376
1,788
Bangalore
techphreak.com
Code:
/*
 * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...). 
 * Please do some research if you have any concerns about features included in the products you find here 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. 
 * Your warranty will be void if you tamper with any part of your device / software.
 * Same statement for XDA.
 */


Finally the wait is over. Project Treble is finally here for Tissot, but unofficial obviously :p . Before I proceed any further, I would like to quote @theandroidguy's explanation about Project Treble.

What is Project Treble?
Ans. Treble is the most significant low-level change to the Android platform to date. To simplify heavily, it separates the vendor implementation from the Android framework in an effort to avoid lengthy waits for updates. . Let’s break things down a bit more:
The full update process to bring a new Android version to devices is a long and complex topic.
The “vendor” usually refers to silicon-manufacturers such as Qualcomm, but can also refer to the maker of any other proprietary hardware found in a device. The “device maker” or “OEM” usually needs to wait for the vendor to update their code so the proprietary hardware works with the Android OS framework in a newer version of Android.
However, what is happening with Project Treble is that Google is requiring that any vendor-specific code be separated from the Android OS framework and instead live in its own vendor implementation. Usually this means that there is now a separate /vendor partition on Treble-enabled smartphones that contains a bunch of HALs (Hardware Abstraction Layers).
Furthermore, vendors must implement code that lets the Android OS framework communicate with HALs in a standardized way. This is done via HIDL (HAL Interface Definition Language). With this in place, an OEM can work on an Android update without having to wait on vendors to update their HALs. Theoretically, this should speed up the entire Android update process as vendors can update their code at any time through the Play Store.
For in-depth information check out this pagehttps://www.androidauthority.com/project-treble-818225/

xHhPPAH.jpg


So now that you know what's Project Treble, let's try to understand how we achieved Treble in our beloved Tissot.

Project Treble for Tissot?
Most of the unofficial Treble support for other devices was due to the presence of any unused extra partition, like cust partition in many Xiaomi devices, which developers used it to mount that unused partition as vendor partition. But Tissot doesn't have any such unused extra partition. Luckily @CosmicDan came up with a perfect guide to repartition our huge system_a & system_b to vendor_a & vendor_b. Which allows us to enjoy Project Treble & seemless updates (A/B partition) at the same time. So all we had to do was move all the device specific stuff to vendor partition, & clean the system partition. Hence making it possible to use GSIs (Generic System Images). Benefit :) .
(Fun Fact: Tissot is the first-ever A/B device to get unofficial Treble support)

How to get Treble on my Tissot?
• Repartition your Tissot device to create vendor_a & vendor_b partitions, using CosmicDan's guide.
• Reboot to custom TWRP provided by CosmicDan, & wipe system & vendor on both slots.
• Check what slot you are in. I will assume A for the sake of these instructions.
• Install RR-Treble build & custom TWRP installer zip from TWRP. (Prior permission has been taken from @mountaser halak to upload an experimental build of RR)
• Reboot recovery
• Make sure the active slot is B (if you started in A). If not, you need to reboot to fastboot and do
Code:
fastboot —set-active=b
then reboot to recovery again.
• After making sure active slot is B (if you started in A), wipe data. Install Magisk & GApps (optional).
• Reboot to phone & enjoy a Trebelized ROM ;) .
• Now you can flash any GSI from fastboot.

Links Section
Repartition guide & TWRP
RR Treble Build - 20190522
Treble devices development
Device Tree
Kernel Source
Proprietary Vendor

Credits:
@ghpranav
@CosmicDan
@phhusson
@flex1911
• #TeamOreo
• Also thanks to all my haters for always having time to point out my mistakes immediately, & helping me to learn more :D

Please refer to 2nd & 3rd post for FAQ, Vendor images & more.
 
Last edited:

ghpranav

Senior Member
Aug 14, 2013
376
1,788
Bangalore
techphreak.com
Reserved

F.A.Q:(Readme first!)

1. What's the use main use of Project Treble for an advanced user?
A: GSIs. One system image for all Treble enabled devices.

2. Will I be able to use already existing custom ROMs after repartitioning?
A: Depends. If you shrink your system partition to create vendor partition, then nope, you'll not be able to flash the existing custom ROMs anymore. But if you shrink your data partition (will erase all data, including internal storage), then you'll be able to use the existing ROMs, & also the trebelized RR.

3. Can I use custom kernels?
A: Nope. Unless the maintainer releases a Treble compatible version of their custom kernel, you won't be able to use any custom kernels as they don't mount our newly created vendor partition properly.

4. Can I flash XYZ GSI?
A: Yes, you can flash any A/B ARM64 GSI.

5. What's "Unable to mount '/vendor' (Invalid argument)" error in TWRP?
A: It means that you haven't repartitioned your device to Treble compatibility yet. Please repartition first, before proceeding.

6. Bootloop! Plox haalp!!!
A: Get logs. Or it never happened.


Vendor Images:
I'll try to maintain up-to-date vendor images here.

Vendor - 20180521
Vendor - 20180522
Vendor - 20180523
Vendor - 20180614
Vendor - 20180705
Vendor - 20190522

Treble patched boot images:
Based on Flex's Kernel. Source code link is given in 1st post.

Boot Image - 20180522
Boot Image - 20180523
Boot Image - 20180614
Boot Image - 20180705
Boot Image - 20190522
 
Last edited:

ghpranav

Senior Member
Aug 14, 2013
376
1,788
Bangalore
techphreak.com
Reserved #2

What's working:
• Everything
• Selinux is enforcing

What's broken:
• You tell me ;)

Changelog:
Code:
[LIST]
[*]2019-05-22:
[LIST]
[*] Fixed OEM bootloop issue
[*] Fixed internal hardware error at first boot
[*] Fixed Dirac giving problems
[*] Enabled KCAL control
[/LIST]

[*]2019-05-21:
[LIST]
[*] First public release of 4.9 Pie vendor
[*] Updated to latest Flex's trees & kernel
[*] Removed jank in some use cases
[*] Updated GPS blobs & config
[*] Optimised Auto Brightness
[*] Cleaner Dirac implementation into vendor
[*] Add audioshpere effect engine
[*] Improved performance
[*] Reduced boot time
[*] Added Boeffla wakelock blocker driver
[*] Added KCAL calibration support
[*] Added Sound Control
[*] Lot of under the hood kernel changes for better performance & battery life
[/LIST]
[*]2018-07-05:
[LIST]
[*] Fixed signal fluctuations. Feel Stock like signal bar stability. (April modem recommended)
[*] Fixed MIUI offline charging animation in GSIs
[*] Fixed Battery Drain
[*] Slightly faster & smoother boot animation
[*] Various fixes for better stability
[*] Merged changes from latest Void Kernel
[*] Kernel upstream to 3.18.114
[*] Lineage & RR upstream
[/LIST]
[*]2018-06-14:
[LIST]
[*] Resurrection Remix upstream to v6.1.0
[*] Added Lineage Trust
[*] Selinux enforcing
[*] Fixed USB Tethering
[*] Fixed random crash of Bluetooth MAC address on reboot
[*] Switch to less hacky way of getting camera to work on GSIs
[*] Reduced screen retention problem
[*] Reduced hissing sound on earphones (needs more feedback)
[*] Added ExFAT support & enabled NTFS
[*] Probable fix for FM on GSIs
[*] Added Joystick support
[*] Update GCam
[*] Merged changes from latest Void kernel
[*] Kernel upstream to 3.18.113
[/LIST]
[*]2018-05-23:
[LIST]
[*] Fixed camera
[*] Fixed Bluetooth MAC address issue
[*] Kernel upstreamed to 3.18.109
[/LIST]
[*]2018-05-22:
[LIST]
[*] Fixed booting issues
[*] Fixed WiFi MAC address issue
[/LIST]
[*]2018-05-21:
[LIST]
[*] Initial Release
[/LIST]
[/LIST]
 

Attachments

  • Screenshot_Settings_20180522-121906.png
    Screenshot_Settings_20180522-121906.png
    134.9 KB · Views: 6,987
  • Screenshot_DiskInfo_20180522-122637.png
    Screenshot_DiskInfo_20180522-122637.png
    239.7 KB · Views: 6,988
Last edited:

moonsmart00712345

Senior Member
Dec 10, 2016
127
19
Congratulations on such a great development.
Waiting for full-fledged treble ROM development.;)

Sent from my Mi A1 using XDA Labs
 

Maximaro

Senior Member
Sep 24, 2016
431
89
Potsdam
Samsung Galaxy J5
Redmi Note 8
So to #2 then i need to wait for Treblized Roms that the original way used of smaller system Partition.
So far i need to wait for out coming Rom´s.
One Qestion: Are the Rom builds specific for one Device or for all device´s that have Trebel?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 86
    Code:
    /*
     * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...). 
     * Please do some research if you have any concerns about features included in the products you find here 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. 
     * Your warranty will be void if you tamper with any part of your device / software.
     * Same statement for XDA.
     */


    Finally the wait is over. Project Treble is finally here for Tissot, but unofficial obviously :p . Before I proceed any further, I would like to quote @theandroidguy's explanation about Project Treble.

    What is Project Treble?
    Ans. Treble is the most significant low-level change to the Android platform to date. To simplify heavily, it separates the vendor implementation from the Android framework in an effort to avoid lengthy waits for updates. . Let’s break things down a bit more:
    The full update process to bring a new Android version to devices is a long and complex topic.
    The “vendor” usually refers to silicon-manufacturers such as Qualcomm, but can also refer to the maker of any other proprietary hardware found in a device. The “device maker” or “OEM” usually needs to wait for the vendor to update their code so the proprietary hardware works with the Android OS framework in a newer version of Android.
    However, what is happening with Project Treble is that Google is requiring that any vendor-specific code be separated from the Android OS framework and instead live in its own vendor implementation. Usually this means that there is now a separate /vendor partition on Treble-enabled smartphones that contains a bunch of HALs (Hardware Abstraction Layers).
    Furthermore, vendors must implement code that lets the Android OS framework communicate with HALs in a standardized way. This is done via HIDL (HAL Interface Definition Language). With this in place, an OEM can work on an Android update without having to wait on vendors to update their HALs. Theoretically, this should speed up the entire Android update process as vendors can update their code at any time through the Play Store.
    For in-depth information check out this pagehttps://www.androidauthority.com/project-treble-818225/

    xHhPPAH.jpg


    So now that you know what's Project Treble, let's try to understand how we achieved Treble in our beloved Tissot.

    Project Treble for Tissot?
    Most of the unofficial Treble support for other devices was due to the presence of any unused extra partition, like cust partition in many Xiaomi devices, which developers used it to mount that unused partition as vendor partition. But Tissot doesn't have any such unused extra partition. Luckily @CosmicDan came up with a perfect guide to repartition our huge system_a & system_b to vendor_a & vendor_b. Which allows us to enjoy Project Treble & seemless updates (A/B partition) at the same time. So all we had to do was move all the device specific stuff to vendor partition, & clean the system partition. Hence making it possible to use GSIs (Generic System Images). Benefit :) .
    (Fun Fact: Tissot is the first-ever A/B device to get unofficial Treble support)

    How to get Treble on my Tissot?
    • Repartition your Tissot device to create vendor_a & vendor_b partitions, using CosmicDan's guide.
    • Reboot to custom TWRP provided by CosmicDan, & wipe system & vendor on both slots.
    • Check what slot you are in. I will assume A for the sake of these instructions.
    • Install RR-Treble build & custom TWRP installer zip from TWRP. (Prior permission has been taken from @mountaser halak to upload an experimental build of RR)
    • Reboot recovery
    • Make sure the active slot is B (if you started in A). If not, you need to reboot to fastboot and do
    Code:
    fastboot —set-active=b
    then reboot to recovery again.
    • After making sure active slot is B (if you started in A), wipe data. Install Magisk & GApps (optional).
    • Reboot to phone & enjoy a Trebelized ROM ;) .
    • Now you can flash any GSI from fastboot.

    Links Section
    Repartition guide & TWRP
    RR Treble Build - 20190522
    Treble devices development
    Device Tree
    Kernel Source
    Proprietary Vendor

    Credits:
    @ghpranav
    @CosmicDan
    @phhusson
    @flex1911
    • #TeamOreo
    • Also thanks to all my haters for always having time to point out my mistakes immediately, & helping me to learn more :D

    Please refer to 2nd & 3rd post for FAQ, Vendor images & more.
    56
    Reserved

    F.A.Q:(Readme first!)

    1. What's the use main use of Project Treble for an advanced user?
    A: GSIs. One system image for all Treble enabled devices.

    2. Will I be able to use already existing custom ROMs after repartitioning?
    A: Depends. If you shrink your system partition to create vendor partition, then nope, you'll not be able to flash the existing custom ROMs anymore. But if you shrink your data partition (will erase all data, including internal storage), then you'll be able to use the existing ROMs, & also the trebelized RR.

    3. Can I use custom kernels?
    A: Nope. Unless the maintainer releases a Treble compatible version of their custom kernel, you won't be able to use any custom kernels as they don't mount our newly created vendor partition properly.

    4. Can I flash XYZ GSI?
    A: Yes, you can flash any A/B ARM64 GSI.

    5. What's "Unable to mount '/vendor' (Invalid argument)" error in TWRP?
    A: It means that you haven't repartitioned your device to Treble compatibility yet. Please repartition first, before proceeding.

    6. Bootloop! Plox haalp!!!
    A: Get logs. Or it never happened.


    Vendor Images:
    I'll try to maintain up-to-date vendor images here.

    Vendor - 20180521
    Vendor - 20180522
    Vendor - 20180523
    Vendor - 20180614
    Vendor - 20180705
    Vendor - 20190522

    Treble patched boot images:
    Based on Flex's Kernel. Source code link is given in 1st post.

    Boot Image - 20180522
    Boot Image - 20180523
    Boot Image - 20180614
    Boot Image - 20180705
    Boot Image - 20190522
    44
    Reserved #2

    What's working:
    • Everything
    • Selinux is enforcing

    What's broken:
    • You tell me ;)

    Changelog:
    Code:
    [LIST]
    [*]2019-05-22:
    [LIST]
    [*] Fixed OEM bootloop issue
    [*] Fixed internal hardware error at first boot
    [*] Fixed Dirac giving problems
    [*] Enabled KCAL control
    [/LIST]
    
    [*]2019-05-21:
    [LIST]
    [*] First public release of 4.9 Pie vendor
    [*] Updated to latest Flex's trees & kernel
    [*] Removed jank in some use cases
    [*] Updated GPS blobs & config
    [*] Optimised Auto Brightness
    [*] Cleaner Dirac implementation into vendor
    [*] Add audioshpere effect engine
    [*] Improved performance
    [*] Reduced boot time
    [*] Added Boeffla wakelock blocker driver
    [*] Added KCAL calibration support
    [*] Added Sound Control
    [*] Lot of under the hood kernel changes for better performance & battery life
    [/LIST]
    [*]2018-07-05:
    [LIST]
    [*] Fixed signal fluctuations. Feel Stock like signal bar stability. (April modem recommended)
    [*] Fixed MIUI offline charging animation in GSIs
    [*] Fixed Battery Drain
    [*] Slightly faster & smoother boot animation
    [*] Various fixes for better stability
    [*] Merged changes from latest Void Kernel
    [*] Kernel upstream to 3.18.114
    [*] Lineage & RR upstream
    [/LIST]
    [*]2018-06-14:
    [LIST]
    [*] Resurrection Remix upstream to v6.1.0
    [*] Added Lineage Trust
    [*] Selinux enforcing
    [*] Fixed USB Tethering
    [*] Fixed random crash of Bluetooth MAC address on reboot
    [*] Switch to less hacky way of getting camera to work on GSIs
    [*] Reduced screen retention problem
    [*] Reduced hissing sound on earphones (needs more feedback)
    [*] Added ExFAT support & enabled NTFS
    [*] Probable fix for FM on GSIs
    [*] Added Joystick support
    [*] Update GCam
    [*] Merged changes from latest Void kernel
    [*] Kernel upstream to 3.18.113
    [/LIST]
    [*]2018-05-23:
    [LIST]
    [*] Fixed camera
    [*] Fixed Bluetooth MAC address issue
    [*] Kernel upstreamed to 3.18.109
    [/LIST]
    [*]2018-05-22:
    [LIST]
    [*] Fixed booting issues
    [*] Fixed WiFi MAC address issue
    [/LIST]
    [*]2018-05-21:
    [LIST]
    [*] Initial Release
    [/LIST]
    [/LIST]
    23
    New build is up!

    Here comes a huge update after a long time. I have tried to address almost all the issues which were there to provide a stable experience. And now, I do believe almost everything is fixed. So please don't expect regular updates, hence forth I'll update only if someone finds out a groundbreaking bug, or when Xiaomi updates its blobs. This Experimental RR is only meant to be a path way for using GSIs. If you want regular updates, please use Official RR. Checkout OP for links. And also a huge thumbs up for @CosmicDan for regularly guiding users & contributing to this thread.

    Changelog:
    • Resurrection Remix upstream to v6.1.0
    • Added Lineage Trust
    • Selinux enforcing
    • Fixed USB Tethering
    • Fixed random crash of Bluetooth MAC address on reboot
    • Switch to less hacky way of getting camera to work on GSIs
    • Reduced screen retention problem
    • Reduced hissing sound on earphones (needs more feedback)
    • Added ExFAT support & enabled NTFS
    • Probable fix for FM on GSIs
    • Added Joystick support
    • Update GCam
    • Merged changes from latest Void kernel
    • Kernel upstream to 3.18.113
    22
    New Build is Up [23/05/2018]

    Updated the OP with new build. It fixes the camera, & also BT MAC address issue. Even the kernel has been upstreamed to 3.18.109.
    If you were on the previous build, then you can just update your vendor & boot image using latest TWRP by CosmicDan, & everything should be fine.
    Do report back if you guys find any bugs. Enjoy ;)