[EXPERIMENTAL] [AOSP] Phh-Treble for Tissot [8.0] [PORT]

Status
Not open for further replies.
Search This thread

ur0

Senior Member
Jun 17, 2012
118
343
Mumbai
In theory, as long as we don't return to stock rom, & if group of devs actually make that possible for a device, there shouldn't be any major problems. But unfortunately Tissot doesn't have any cust partition. So we'll have to look for something else...

You can always re-partition the device (or disable a/b and use the system_b as the vendor partition).
 

zeyaan

Senior Member
Jun 11, 2012
917
644
Bangalore
OnePlus 5T
OnePlus 6
Can gpt.bin can repartition?
May be sm1 with good experience can hex edit gpt.bin
Or mass tweet #xiaomi again for reparationed gpt.bin with treble support

Mass Tweet or going on change.org i snot going to help here. we are on our own here. The OEM's have already given reasons stating, Sending re-partition update via OTA more likely brick the devices and no OEM is ready to take the risk. OTA's work in a very different way from how we manually flash zip's on TWRP.

anyways, the solution could be were in we can use one partition for Vendor and one for ROM. Need to check other partitions as well. May be we might have some useless partition.
 

majamee

Senior Member
Apr 16, 2011
250
199
Mass Tweet or going on change.org i snot going to help here. we are on our own here. The OEM's have already given reasons stating, Sending re-partition update via OTA more likely brick the devices and no OEM is ready to take the risk. OTA's work in a very different way from how we manually flash zip's on TWRP.

anyways, the solution could be were in we can use one partition for Vendor and one for ROM. Need to check other partitions as well. May be we might have some useless partition.

+1 for change.org
 

majamee

Senior Member
Apr 16, 2011
250
199
Lol... Xiaomi is not gonna repartition the ROM just so you can flash experemntal treble partitions. as others have said we will have to use one of the two system partitions as a vendor partition, which is fine seeing as we don't use it anyway on a regular bases (only upgrades)

The thing is, if we could make Xiaomi understand how much easier all sub-sequent System Upgrades will be after project treble, even they might reconsider it as it will save them overall time and money throughout the supported device life span. Just saying ;)
 

sooti

Recognized Developer
Jan 26, 2012
2,537
6,764
The thing is, if we could make Xiaomi understand how much easier all sub-sequent System Upgrades will be after project treble, even they might reconsider it as it will save them overall time and money throughout the supported device life span. Just saying ;)
Ya they don't care, coming from the tech industry I can tell you that the risk is too big, even if 0.001% of users get their device bricked during the upgrade it's too heavy of a price
 

zeyaan

Senior Member
Jun 11, 2012
917
644
Bangalore
OnePlus 5T
OnePlus 6
Ya they don't care, coming from the tech industry I can tell you that the risk is too big, even if 0.001% of users get their device bricked during the upgrade it's too heavy of a price

Thanks. This is what I was trying to explain here. Even a fraction of users getting affected will result a huge loss for Xiaomi considering they sell phones at near cost to build Prices and there are other factors post sale which they need to maintain like R&D teams, service centers etc. And it's too much to handle.
 

sooti

Recognized Developer
Jan 26, 2012
2,537
6,764
Thanks. This is what I was trying to explain here. Even a fraction of users getting affected will result a huge loss for Xiaomi considering they sell phones at near cost to build Prices and there are other factors post sale which they need to maintain like R&D teams, service centers etc. And it's too much to handle.
True. Also xda users are an even smaller fraction, the only reason they released the kernel sources was to complay with Google's gpl
 

Blackheart151

Senior Member
Mar 13, 2015
55
13
But they might. Coz android p it's compulsory to implement treble. So they might do it in sometime.

They might partition themselves..
 

Blackheart151

Senior Member
Mar 13, 2015
55
13
They haven't yet released android p yet so can't say for sure. But as u already know Oreo out of the box needs to be treble supported. But android p might only work if treble support is there.
Can't say for sure.. but I remember reading some article saying something like this..


I'm sorry I don't remember where I read the article.. tried searching for it.. couldn't find it..
 
  • Like
Reactions: majamee

mahesh2040

Senior Member
Jan 8, 2014
204
49
Xiaomi Poco F1
Do you have a link for project treble becoming mandatory in Android P?
There is no need to guess that... Cause from Oreo google made it mandatory to OEM for treble support, as other guy said , those devices comes with Oreo out of box must have treble support and why google will remove this thing from android P? So basically it gonna stay like this until google have different plans ( chances are very very slim but I am sure they will not revert this decision ) All the changes from previous version are taken consider in new version and latest features and changes are on top of it. In short android P devices will also have treble support mandatory
 
L

ludlum123

Guest
Mass Tweet or going on change.org i snot going to help here. we are on our own here. The OEM's have already given reasons stating, Sending re-partition update via OTA more likely brick the devices and no OEM is ready to take the risk. OTA's work in a very different way from how we manually flash zip's on TWRP.
If Google was able to do it, why can't Xiaomi too? 1st Gen Pixel devices have treble support, even if they had Nougat out of the box. I think Xiaomi is too lazy to implement it.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    EDIT:
    We have now achieved proper Treble implementation. We no longer need this method of trying to port a GSI to our device. This thread is now absolute. Please refer to newer threads to get Treble support on your Tissot devices.

    UPDATE:
    This ROM is currently not booting. So use this thread only to provide useful logs.
    Interested developers can help me to try to port Treble :) :
    https://github.com/ghpranav/android_device_xiaomi_tissot/tree/Trebelizer
    https://github.com/ghpranav/proprietary_vendor_xiaomi/tree/lineage-15.0/

    Code:
    /*
     * Your warranty is now void.
     *
     * We are 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 ROM
     * 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.
     *
     */

    WARNING: You'll most probably loose ALL your data, and might break your phone, because our phone doesn't support Treble officially. Please use with extreme caution, because this hasn't been tested yet!

    The goal of this ROM is to provide full Treble-compatible hardware support, and nothing else.
    This means that hardware which DON'T have Treble API won't be supported, like Essential's external camera.
    No feature will be added. This will ease forward porting to new Android versions, which is the very goal of Project Treble :)

    My hope is that other ROM developers will use this ROM as a basis to construct more advanced ROM.
    Devices will be marked as supported, unless known otherwise.

    I have tried to port a Treble based rom to our Mi A1 device based on my knowledge of Treble. If this works properly, then we might be able to use almost any Project Treble rom on our device.

    How to flash:
    - First, you MUST be running on stock Android 8.0 ROM (OPR1.170623.026.7.12.29)
    - Obviously, unlock your bootloader
    - Download the zip file, & extract it.
    - Flash the system.img to the correct active slot [A/B]
    - Do a Factory reset
    - Reboot

    Downloads:
    V1:
    https://www.androidfilehost.com/?fid=962157660013069216


    Changelog:
    v1: (02/01/2018)
    - Initial port based on Phh-Treble v7 (inc. gapps & su).

    SuperSU and Magisk screws with SELinux policy. DO NOT USE SuperSU OR Magisk WITH THIS ROM.

    XDA:DevDB Information
    Phh-Treble Tissot, ROM for the Xiaomi Mi A1

    Contributors
    ghpranav, phhusson
    Source Code: https://github.com/ghpranav/android_device_xiaomi_tissot/tree/Trebelizer

    ROM OS Version: 8.x Oreo
    ROM Firmware Required: OPR1.170623.026.7.12.29
    Based On: AOSP

    Version Information
    Status: Testing
    Current Beta Version: V1
    Beta Release Date: 2018-01-02

    Created 2018-01-02
    Last Updated 2018-08-31
    15
    Useful logs?
    Our device does not support treble
    This ROM will never boot,I bet it doesn't even include any device related HAL.
    Do you even know what treble is?

    I know what Treble is. I tried to port ROM, instead of porting Treble support. But I failed. So now I'll wait for Xiaomi to release kernel source, so that I can try to create a separate vendor image partition, & try to implement HALs, so that we can actually port Treble itself. And yes, Treble support can be ported, for instance Mi5 devs are working on it, & it'll be released soon...
    13
    Good to see this thread.

    Sad to see that the GitHub branch has been deleted. Wat?

    As I talked ranted about in my post here, what I think needs to be done is to do-away with Seamless A/B system and replace system_b with vendor. EDIT: Actually, with the knowledge I found, we could have system_a, system_b, vendor_a and vendor_b too, but the Seamless A/B is probably pointless for the custom ROM's we'll surely need to even use Treble anyway.

    Here is my quick initial research on that matter.

    From what I can see, the partition map is "soft" in this device - meaning it's defined by GPT binary files rather than embedded in the bootloader. So in theory we can try and edit this without risk of hard-brick.

    We have the following files in full official fastboot ROM:

    gpt_backup0.bin
    gpt_both0.bin
    gpt_main0.bin
    partition.xml

    Then I found this article, which mentions these files:

    GUIDE -->> How To Create Partition.xml [GPT]

    According to this guide, gpt_main0.bin is what's flashed to "partition" via Fastboot. This is also what appears in the flash_factory script in official fastboot ROM.

    I think we can build a new gpt_main0.bin from partition.xml, patch0.xml and rawprogram0.xml but I'm really not sure. This is where I'm up to.

    EDIT: It seems we can factory-flash the partition map in XML directly if we use Qualcomm QFIL tool (via MBN loader), which is part of QPST, but I am not sure if it will cause issues if we modify XML partition map since the gpt bin files will not match the XML. Also I don't know if QPST talk is allowed on XDA, it is probably some internal Qualcomm tool that's only for their partners...?

    EDIT2: Best avoid the QPST and factory flash stuff, that can brick and wipe IMEI. I think all we need to do is edit the partition table via parted, and then the partition table data is actually stored in the "partition" partition, which can then be dumped to a new gpt_both0.bin. Will try this out.
    10
    This could be possible

    Let me be clear first, I am not an expert on this, but i read and search.

    According to this thread of XDA News
    Someone ported Project Treble support for Xiaomi Redmi 4.

    This developer claims that Xiaomi already use a partition named "cust" of almost 840MB for their customization HALS (not sure if proper word) and the same developer reused this partition as /vendor to use vendor HALS as it is completely unused space for AOSP roms.
    Project-Treble-Xiaomi-Redmi-Note-4-1-576x1024.jpg


    And more importantly Redmi 4 do not have a-b partitioning for seamless updates claimed by Android where Mi A1 have it!!
    Considering this we may not have to request Xiaomi to re-partition,

    For other device manufacture many developers claim that it can be done and very easy to achieve by just splitting the space of system partition,
    Untitled.png

    This needed to be done only once in order to add minimum 5 Years of project treble support will be added to the device (considering Linux kernel is built for this time span of support)

    Where some devices have too much unused space like OnePlus 5T, They can also use this space as /vendor partition
    Capture2.png
    6
    So the GPT information is stored at the beginning of the eMMC block device, which I dumped, but for some reason is quite a bit different to the GPT bin that's included in official fastboot firmware packs.

    I'd like some more data before I continue experimenting with my daily device :D I can't find a working "decoder" or "decompiler" for GPT binary yet either, all the existing scripts/tools I found error-out.

    If a volunteer or two could share their GPT info dumps too (along with if you remember the last official stock firmware you flashed in fastboot; either Nougat or Oreo) I would appreciate it.

    Run something like this via shell / command prompt...

    Code:
    adb shell dd if=/dev/block/mmcblk0 of=/tmp/gpt.bin bs=8 count=4352
    adb pull /tmp/gpt.bin
    ...and share the gpt.bin file here (probably have to ZIP it for XDA to accept it).

    Thanks!