Is Project Treble compatible with the S5? - Galaxy S 5 Q&A, Help & Troubleshooting

Hi... I've been reading some news about Project Treble, and how it helps with the custom ROM development and software updates. But I want to ask. Is this working on phones like the Galaxy S5? Because it would be helpful considering the potential of this phone and how stable it is running on Nougat, and an Oreo update would be easier to Port.

Unfortunately, it's not. It is only compatible with phones that were initially shipped with Android 8.0.

camellirite said:
Unfortunately, it's not. It is only compatible with phones that were initially shipped with Android 8.0.
Click to expand...
Click to collapse
But Huawei Mate 9 got an AOSP build of Oreo in one day thanks to this. And it has never gotten updated since Nougat. It used Treble as the blog said.

Raynelfss said:
But Huawei Mate 9 got an AOSP build of Oreo in one day thanks to this. And it has never gotten updated since Nougat. It used Treble as the blog said.
Click to expand...
Click to collapse
After reading that article, you're right. I read a news article that said only phones shipped with 8.0 will be compatible with treble, my mistake.

Raynelfss said:
But Huawei Mate 9 got an AOSP build of Oreo in one day thanks to this. And it has never gotten updated since Nougat. It used Treble as the blog said.
Click to expand...
Click to collapse
Mate 9 have 4.4 kernel with android Oreo. S5 have 3.4 kernel always. And treble is compatible by phones with 4.4 kernel and above. So no treble for s5.

djgigi94 said:
Mate 9 have 4.4 kernel with android Oreo. S5 have 3.4 kernel always. And treble is compatible by phones with 4.4 kernel and above. So no treble for s5.
Click to expand...
Click to collapse
Ok... That's sad but ok. At least we are having Oreo anyway! Thanks for clarifying. Close thread please!

djgigi94 said:
Mate 9 have 4.4 kernel with android Oreo. S5 have 3.4 kernel always. And treble is compatible by phones with 4.4 kernel and above. So no treble for s5.
Click to expand...
Click to collapse
I heard something about repartitioning, so it doesn't necessarily has to do with the Kernel, it's more like partitioning the device storage, with A/B partitions and stuff with vendor. I heard about a tool that can do that job called REPIT but I didn't do so much of a research of it.

Mi3 with snapdragon 800 on kernel v 3.10 got android p today so is there any hope for our s5s ,can it be ported to our phones like the redmi devs did
https://www.xda-developers.com/xiaomi-mi-3-xiaomi-mi-4-xiaomi-redmi-4x-android-pie-ports/

I looked into it.
In order to get Project Treble working on our Samsung Galaxy S5, we would have to :
- Repartition device to have 2 partitions, Vendor & AOSP
1. All vendor-specific blobs should be moved to /vendor
2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
3. Label and format that unused new partition as /vendor - this should be automatically done with an OTA script
4. The kernel should mount the new partition as /vendor as well
OR
https://forum.xda-developers.com/pr.../tool-capire-le-treble-terble-vendor-t3774629
Without repartitioning?
- Have a 'Treblified' ROM already installed. (I believe we have Oreo ported..)
- Have 8.1 Vendor Blobs? I don't know much about this.
Any dev willing to make this dream a reality, please, step forward!

Rhioun said:
I looked into it.
In order to get Project Treble working on our Samsung Galaxy S5, we would have to :
- Repartition device to have 2 partitions, Vendor & AOSP
1. All vendor-specific blobs should be moved to /vendor
2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
3. Label and format that unused new partition as /vendor - this should be automatically done with an OTA script
4. The kernel should mount the new partition as /vendor as well
OR
https://forum.xda-developers.com/pr.../tool-capire-le-treble-terble-vendor-t3774629
Without repartitioning?
- Have a 'Treblified' ROM already installed. (I believe we have Oreo ported..)
- Have 8.1 Vendor Blobs? I don't know much about this.
Any dev willing to make this dream a reality, please, step forward!
Click to expand...
Click to collapse
Looks nice. It would be great to try. If someone does try please post your experience here!

clockstoper said:
Mi3 with snapdragon 800 on kernel v 3.10 got android p today so is there any hope for our s5s ,can it be ported to our phones like the redmi devs did
https://www.xda-developers.com/xiaomi-mi-3-xiaomi-mi-4-xiaomi-redmi-4x-android-pie-ports/
Click to expand...
Click to collapse
Xiaomi have a terribke habbit of skipping android versions
Take the MiBox for example, from what i hear it never got an official 7.1.2 only leaked builds, they went from 6.0 to 8.0 and still face quite alot of bugs.

don't know if this is the right place for this but my old moto g 2014 with 3.4 kernel version just got android pi port its very smooth as per the reports, i have not installed it yet as i gave that phone to my mom. the phone runs on with a lowly snapdragon 400 chip and 1gb ram also its kernel version is 3.4 which is the same as our s5s so there might be a good chance android pie can be ported to our device
LINK
https://forum.xda-developers.com/moto-g-2014/development/titan-xperience-13-0-t3830834
did some further searching and found that lenovo zuk z1 also got Pie and it has SD 801 chip like our S5 so things looking quite promising tbh.....
LINK
https://forum.xda-developers.com/zuk-z1/orig-development/rom-pixel-experience-t3830494

clockstoper said:
don't know if this is the right place for this but my old moto g 2014 with 3.4 kernel version just got android pi port its very smooth as per the reports, i have not installed it yet as i gave that phone to my mom. the phone runs on with a lowly snapdragon 400 chip and 1gb ram also its kernel version is 3.4 which is the same as our s5s so there might be a good chance android pie can be ported to our device
LINK
https://forum.xda-developers.com/moto-g-2014/development/titan-xperience-13-0-t3830834
did some further searching and found that lenovo zuk z1 also got Pie and it has SD 801 chip like our S5 so things looking quite promising tbh.....
LINK
https://forum.xda-developers.com/zuk-z1/orig-development/rom-pixel-experience-t3830494
Click to expand...
Click to collapse
Anyone working on 9.0 for S5?

Official Aex devices will get 9.0 soon so yes I presume

The Galaxy S5 (klte) Kernel source on LOS has reportedly submitted comments about LineageOS 16. So we're having our pie soon.

LineageOS 16.0 teaser trailer by haggertk.

Rhioun said:
I looked into it.
In order to get Project Treble working on our Samsung Galaxy S5, we would have to :
- Repartition device to have 2 partitions, Vendor & AOSP
1. All vendor-specific blobs should be moved to /vendor
2. Some blobs load config files from /system/etc. Just hex-edit them to load from /vendor/etc instead
3. Label and format that unused new partition as /vendor - this should be automatically done with an OTA script
4. The kernel should mount the new partition as /vendor as well
OR
https://forum.xda-developers.com/pr.../tool-capire-le-treble-terble-vendor-t3774629
Without repartitioning?
- Have a 'Treblified' ROM already installed. (I believe we have Oreo ported..)
- Have 8.1 Vendor Blobs? I don't know much about this.
Any dev willing to make this dream a reality, please, step forward!
Click to expand...
Click to collapse
I've heard from the official website of lineage os that they can turn a device into an A/B device, but I am not sure that whether the A/B device is the one that have 2 partitions, here it is (https://lineageos.org/Changelog-19/)

Frank Telescope said:
I've heard from the official website of lineage os that they can turn a device into an A/B device, but I am not sure that whether the A/B device is the one that have 2 partitions, here it is (https://lineageos.org/Changelog-19/)
Click to expand...
Click to collapse
Its not as simple as having a/b partitions , there is a kernel issue. a simple google search wich show you guys that there is a minimum kernel version required for treble which the s5 is far and i mean far behind that minimum requirement for treble.

I know this is like off-topic but there is now a project WIP going on for Samsung Galaxy S3 Neo, since it's using 3.4 kernel, we using S5 have luck to support treble. At least if someone willing to do it.
For the AB partition it might be impossible to do so.

Now with pascua28's Intelli-Kernel we're even closer to the dream. This guy has managed to do wonders with this device... The last thing that may happen is him being able to update our Kernel version. I don't know how the A/B partition things work, but from what I've heard it requires a higher Kernel version. The S5 runs 3.4 right now, but with @pascua28 work it may get a higher version soon.

Related

[GUIDE] [Future] [news and build Oreo] Oreo Go Older Oreo Device and or Trebel Dev

Update News Flash Galaxy note 4 running Oreo 8.1
3-29-18
OMG. I said it here first. 32 bit processors CAN be ported to Oreo. Maybe not trebel yet. Smug emoticon
In just a few days , not even I thought it was possible.
Running Oreo via lineageOS 15.1 with root on my Samsung Galaxy Note 4.
The dev who devotes time to compiling builds @ripee has had his daily downloads of 14.1 for the note 4 has more than doubled. Currently running about 250 users testing builds. SMOKIN.....
Here is the OP
https://forum.xda-developers.com/no...0-unofficial-lineage-15-1-rom-t3760969/page92
Update 2-28-18
OpenGapps 8.1 is released for both arm and arm 64.
That means Oreo can be compiled it 32 bit.
Researching Oreo and Oreo go compiler instructions.
Mebbe I can compile AOSP for my older Note 4 .. So cool
https://forum.xda-developers.com/android/apps-games/arm-unofficial-opengapps-builds-android-t3743495
Updated 1-20-18
Newest musings on top. Oreo Go is currently being modded into an older Sony phone. Awesome
So since I posted this OP...my musings have been correct in these posts.
This came out on XDA, check out the links in it.
https://www.xda-developers.com/android-go-old-android-8-1-oreo/
Android Oreo and android in general is getting closer to Linux . Mainly for the same reasons
I have been installing different distributions of Linux on an older laptop.
1. To learn installing hard to find drivers
2. Learning Linux architecture and commands
3. Learning to build Linux kernel for my device
http:// www.kernel.org
4. Learning to build lineageos14 in general
With these guides
https://forum.xda-developers.com/note-4/general/guide-build-lineageos-14-1-trltexx-t3567885
Thanks @_mone and @ripee
https://forum.xda-developers.com/chef-central/android/how-to-build-lineageos-14-1-t3551484
Thanks @FSadino
5. Actually compiling lineageOS-14 for my two devices I have access to
Galaxy note 4 Verizon thanks to @ripee for his contribution by building daily's at
https://forum.xda-developers.com/note-4/snapdragon-dev/rom-lineageos-14-1-t3536401
And my galaxy tab S2 sm-t710
Thanks to @Bonuzz for getting the camera, mic GPS and Bluetooth working, and posting sources
https://forum.xda-developers.com/tab-s2/development/t710-t715-lineage-14-1-t3713097
Thanks to @Ather for getting Samsung to release their Kernel sources and building a android 7 rom
https://forum.xda-developers.com/tab-s2/development/kernel-poseidonkernel-v1-0-permissive-t3588069
https://forum.xda-developers.com/tab-s2/development/rom-poseidonrom-v1-0-deodexedrooted-t3590228
6. Thinking and musing about things
Symlinks, multi boot, and partitions. ( Treble )
In Linux, I have another partition with downloaded files on another drive
When the kernel boots, the directory tree just sees /data even though it's a separate drive
This is because of a symbolic link that mounts the partition as a folder. This prevents me, from deleting that data with permissions
So the Trebel rules tell the vendor to make a separate partition in the drive but the kernel gets a symbolic link to it, and the user (Google) cannot over write the partition with the critical info..when the ROM gets flashed? correct ?
The bootloader has boot path a, or boot path b.
The user files are in protected memory
So with Linux, when I updated my kernel,
The grub bootloader tells me I can use kernel 4.1.x or 4.2.x when I boot
The kernel loads the drivers
And then looks at the symbolic links to mount the drives.
This is somewhere in the /etc files or somewhere
So Trebel has to be a set of decision trees based on symbic links to hardware
Where all the hardware drivers are independent of the kernel
More musings later. Must build....
**************
Dec 2017 sometime
Thanks to all for viewing my first OP.
I'm just learning about building ROMs, and look forward to this thread to spitball ideas and see what sticks.
If I don't know something its because I am correcting my ignorance.
This won't be an actually development thread, just trying to understand hardware from 30 years of not being in the tech field.
Eventually I will tire or wear out of driving truck, and work with my passion again.
I am a follow the steps kind of mind, so I am learning how the world of Android / Linux works.
If I understand the Trebel development correctly...
https://www.xda-developers.com/goog...ze-android-so-oems-can-update-devices-faster/
IF we can modify the older device drivers to be Trebel compliant, then once they work, then they always should work. And any Trebel ROM can work on Any Trebel Device withOUT compiling over and over.
This should result in an explosion of custom ROMs .
So I am suggesting a repository of drivers per device that are compliant for older devices.
How do we do that?
So here is the Google announcement of Trebel
https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html?m=1
Here is the developer preview of ”O”
https://developer.android.com/preview/download.html
It details how to install it on your Trebel Device.
Wow. Just Wow.
OH MY GOODNESS. I would love this on my lg g3, oneplus one, and moto e2. WOW.
TotalNoobTrucker said:
If I understand the Trebel development correctly...
https://www.xda-developers.com/goog...ze-android-so-oems-can-update-devices-faster/
IF we can modify the older device drivers to be Trebel compliant, then once they work, then they always should work. And any Trebel ROM can work on Any Trebel Device withOUT compiling over and over.
This should result in an explosion of custom ROMs .
So I am suggesting a repository of drivers per device that are compliant for older devices.
How do we do that?
Click to expand...
Click to collapse
How do you wanna to do that ?
Vendor files are NOT open-source so you cannot make them treble enabled sadly.
Haxk20 said:
How do you wanna to do that ?
Vendor files are NOT open-source so you cannot make them treble enabled sadly.
Click to expand...
Click to collapse
So far all it looks like ROM dev is trial and error with people posting guides on repeatable success... (Community)
I haven't built a ROM, ( haven't built a compiler computer yet) plus I drive truck 70 hrs a week..
but have read
https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763/
And
https://forum.xda-developers.com/android/software/how-to-port-samsung-rom-to-samsung-t3481114/
So what's different in the building process? With Trebel?
Google dev page lists an additional partition for drivers called VENDOR
A file called manifest.xml
And a A/B partition.
So assuming I am building a Lineage OS ROM 14.x
In that compile process, everything is compiled in the ROM
Kernel, Lineage front end, AOSP programs etc.
So somewhere in the compiler process the drivers to my N910V are pulled in from somewhere? Github¿?
If they are not open source, they were pulled from system image via ADB or Android image kitchen and uploaded to where?
So i guess we need a guide on how to build Trebel for non Trebel devices. The folks on the other Trebel thread are doing it on newer devices and getting some exciting results.
There is only a couple of Lineage 15.x builds going, but once someone has the Process down to build a Trebel on non / close to Trebel hardware,
It should be repeatable for ANY Oreo and up compiled ROM.
I may not be able to build yet, but since Trebel is the new path, I want to gather Trebel success and Process here. Maybe make a guide..
In conclusion, the drivers may not be open source, but the code is out there somewhere.
Sent from my Lineage OS 14 Samsung Verizon Note 4 from @ripee
My other device is a Samsung T710 running Posiedon 1.0 . Thanks for a stable rooted tablet @Ather
Sent from my Samsung SM-N910V using XDA Labs
TotalNoobTrucker said:
So far all it looks like ROM dev is trial and error with people posting guides on repeatable success... (Community)
I haven't built a ROM, ( haven't built a compiler computer yet) plus I drive truck 70 hrs a week..
but have read
https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763/
And
https://forum.xda-developers.com/android/software/how-to-port-samsung-rom-to-samsung-t3481114/
So what's different in the building process? With Trebel?
Google dev page lists an additional partition for drivers called VENDOR
A file called manifest.xml
And a A/B partition.
So assuming I am building a Lineage OS ROM 14.x
In that compile process, everything is compiled in the ROM
Kernel, Lineage front end, AOSP programs etc.
So somewhere in the compiler process the drivers to my N910V are pulled in from somewhere? Github¿?
If they are not open source, they were pulled from system image via ADB or Android image kitchen and uploaded to where?
So i guess we need a guide on how to build Trebel for non Trebel devices. The folks on the other Trebel thread are doing it on newer devices and getting some exciting results.
There is only a couple of Lineage 15.x builds going, but once someone has the Process down to build a Trebel on non / close to Trebel hardware,
It should be repeatable for ANY Oreo and up compiled ROM.
I may not be able to build yet, but since Trebel is the new path, I want to gather Trebel success and Process here. Maybe make a guide..
In conclusion, the drivers may not be open source, but the code is out there somewhere.
Sent from my Lineage OS 14 Samsung Verizon Note 4 from @ripee
My other device is a Samsung T710 running Posiedon 1.0 . Thanks
Click to expand...
Click to collapse
The OEM needs to add support for treble there is no treble for non-treble devices.
Treble works like so:
Vendor files are stored in separate partition (Those files are edited to work with treble)
Then android just takes those files from there and work.
The vendor files are not in system.img but in /vendors (the partition is mounted here)
Only a few devices have vendor files open source there is possible to make the device treble supported but 99% of devices have vendor files closed and so its not possible for some dev here to make the device supported.
Also A/B is new partition layout:
You have your system on A but once update is available its downloaded onto B and then it just switch them (Don't read about that much so I canbe wrong here).
Also I have build ROM for xperia P and if I wanted to build 8.0.0 I cannot use treble sadly that would have made my job lot easier.
Hmm.
Haxk20 said:
The OEM needs to add support for treble there is no treble for non-treble devices.
Treble works like so:
Vendor files are stored in separate partition (Those files are edited to work with treble)
Then android just takes those files from there and work.
The vendor files are not in system.img but in /vendors (the partition is mounted here)
Only a few devices have vendor files open source there is possible to make the device treble supported but 99% of devices have vendor files closed and so its not possible for some dev here to make the device supported.
Also A/B is new partition layout:
You have your system on A but once update is available its downloaded onto B and then it just switch them (Don't read about that much so I canbe wrong here).
Also I have build ROM for xperia P and if I wanted to build 8.0.0 I cannot use treble sadly that would have made my job lot easier.
Click to expand...
Click to collapse
So where are the Xperia P files you imported into your 8.0 biuld¿ Can't you put them in the vendor folder and see if it boots¿ I presume you have to make a manifest.xml file so the ROM can see the files
Sent from my Samsung SM-N910V using XDA Labs
TotalNoobTrucker said:
So where are the Xperia P files you imported into your 8.0 biuld¿ Can't you put them in the vendor folder and see if it boots¿ I presume you have to make a manifest.xml file so the ROM can see the files
Click to expand...
Click to collapse
I haven't done 8.0.0 build yet cause the device got only CM-12.1 and now trying to port 8.0.0 and no putting the files there will not work:
1. Old devices don't have that partition and evenif I reformat it and add it and edited fstab to see it.
2. The files NEEDS TO BE EDITED TO WORK WITH TREBLE. If it was that easy to make partition put there the files and tadaaa treble device then every old device could get 8.0.0 to run but well I don't see threads about it. It's not that easy you NEED THE SOURCES TO MAKE IT TREBLE ENABLED.
Haxk20 said:
I haven't done 8.0.0 build yet cause the device got only CM-12.1 and now trying to port 8.0.0 and no putting the files there will not work:
1. Old devices don't have that partition and evenif I reformat it and add it and edited fstab to see it.
2. The files NEEDS TO BE EDITED TO WORK WITH TREBLE. If it was that easy to make partition put there the files and tadaaa treble device then every old device could get 8.0.0 to run but well I don't see threads about it. It's not that easy you NEED THE SOURCES TO MAKE IT TREBLE ENABLED.
Click to expand...
Click to collapse
Sadly, I think android 8.1 trebel is 64 bit. My note 4 is a 32bit arm71
So I dunno how it could run on my note 4. However the nexus 6 is the same cpu hardware as the note 4
However the nexus 6p is the 8core with 2 other core chipset, which is 64 bit and supported by 8.1 Trebel
So me thinks the older devices are not able to run trebel
Sent from my Samsung SM-N910V using XDA Labs
TotalNoobTrucker said:
Sadly, I think android 8.1 trebel is 64 bit. My note 4 is a 32bit arm71
So I dunno how it could run on my note 4. However the nexus 6 is the same cpu hardware as the note 4
However the nexus 6p is the 8core with 2 other core chipset, which is 64 bit and supported by 8.1 Trebel
So me thinks the older devices are not able to run trebel
Click to expand...
Click to collapse
Yeah that's another problem even if there was a way to edit vendor files treble is 64bit only
If I undertand it correctly, there's another layer between the HAL and the android framework, the HIDL, which decribes the interface of the HAL.
Shouldn't we theorically be able to edit that?
The good news is my sm-t710 is a exynos5433 chipset which supports 64bit. So maybe I will get to play with 8.n someday
android1111 said:
If I undertand it correctly, there's another layer between the HAL and the android framework, the HIDL, which decribes the interface of the HAL.
Shouldn't we theorically be able to edit that?
Click to expand...
Click to collapse
I think so. If you look at the other forum, it seems they're editing only a couple files. The manifest.xml describes what files are the drivers and where to look for them. This is a crucial file, as the drivers are in a separate partition from the system/data partition now. Download one and read it .it's a very simple exchange script
TotalNoobTrucker said:
I think so. If you look at the other forum, it seems they're editing only a couple files. The manifest.xml describes what files are the drivers and where to look for them. This is a crucial file, as the drivers are in a separate partition from the system/data partition now. Download one and read it .it's a very simple exchange script
Click to expand...
Click to collapse
As I said above you NEED the vendor file sources then create /vendor partition to add the vendor files there.
Without sources you can't make Treble running.
So if you ever want to play with 8.0 on your phone you should start porting right now.
---------- Post added at 10:42 PM ---------- Previous post was at 10:41 PM ----------
TotalNoobTrucker said:
I think so. If you look at the other forum, it seems they're editing only a couple files. The manifest.xml describes what files are the drivers and where to look for them. This is a crucial file, as the drivers are in a separate partition from the system/data partition now. Download one and read it .it's a very simple exchange script
Click to expand...
Click to collapse
I mean porting as the "hard way" = modifying device tree to work with new sources and patching the sources.
Haxk20 said:
As I said above you NEED the vendor file sources then create /vendor partition to add the vendor files there.
Without sources you can't make Treble running.
So if you ever want to play with 8.0 on your phone you should start porting right now.
---------- Post added at 10:42 PM ---------- Previous post was at 10:41 PM ----------
I mean porting as the "hard way" = modifying device tree to work with new sources and patching the sources.
Click to expand...
Click to collapse
I get that to begin the process for non Trebel, that's the idea.
Move all the vendor libraries to the vendor file, and run them through the Google process to make them compliant.
I would have to find a piece of hardware that has the same SoC just to begin.
No wonder the note 4 stalled at 6.0.1, verizion want going to rewrite the code. Just to get to 7. They would rather sell note 8's
Sent from my Samsung SM-N910V using XDA Labs
See scenario 2 on
source android com devices architecture hidl-cpp
We need to code o adapt a passthrough HIDL
It's not a matter of editing a file
TotalNoobTrucker said:
I think so. If you look at the other forum, it seems they're editing only a couple files. The manifest.xml describes what files are the drivers and where to look for them. This is a crucial file, as the drivers are in a separate partition from the system/data partition now. Download one and read it .it's a very simple exchange script
Click to expand...
Click to collapse
It's not a matter of editing a file to tell Android and the kernel where to look for drivers. We are not "editing" manifest.xml, it is generated during the build process. The whole structure and system calls of the drivers is changed to make them suitable for treble. And that is done by the SoC vendor whomever they may be. You can build Oreo to work on older devices by using your existing drivers, but not by using treble, you have to use your existing kernel, and write your own "hooks" into your existing drivers (better be familiar with hex code), and do a LOT of modifications to the Android code. Treble is not intended as a way for older devices to get custom ROMs, as their pre Oreo kernels and drives are not capable.
A N00b's explanation of Project Treble
Okay so I've seen a lot of confusion about how Project Treble does and does not work, so I'm going to provide a small explanation, simplified to a fault, but it'll do:
In ye olden days (Nougat and back), the Android OS was very tightly integrated with the drivers of the system. This made custom firmware very difficult to port (relatively speaking). Certain drivers were more difficult to make workable and as a result you'd have work in progress ROMs that didn't have WI-FI or cameras working, etc. It really was a pain in the butt.
Project Treble changes all of that. What it does is separate the operating system from the drivers, making porting much easier for devices that support it. The problem is that in order to enable this it would require almost a complete rebuild of these drivers, which would in turn require access to the source code and a LOT of work (hence why companies like OnePlus are releasing devices with Nougat so they don't have to use Treble, which is required on all devices that start with Oreo).
In short, COULD Treble be ported to older devices? Yes; Google and Essential have proven that. Is it feasible? Unless you've got some friends at Samsung/HTC/Xiaomi/insert-other-company-here willing to leak source code, no not really. The only device that I could possibly see getting a Treble port is the HTC HD2, simply because that phone is basically the technological equivalent of a cockroach, and I think they may have actually reverse engineered their drivers to get them to work on so many operating systems. I know I've probably made some mistakes in my explanation, but it's my best way if simplifying how this works so that people don't come along, see Treble and expect an Oreo ROM for their Fire Phone or something
2390 said:
Okay so I've seen a lot of confusion about how Project Treble does and does not work, so I'm going to provide a small explanation, simplified to a fault, but it'll do:
In ye olden days (Nougat and back), the Android OS was very tightly integrated with the drivers of the system. This made custom firmware very difficult to port (relatively speaking). Certain drivers were more difficult to make workable and as a result you'd have work in progress ROMs that didn't have WI-FI or cameras working, etc. It really was a pain in the butt.
Project Treble changes all of that. What it does is separate the operating system from the drivers, making porting much easier for devices that support it. The problem is that in order to enable this it would require almost a complete rebuild of these drivers, which would in turn require access to the source code and a LOT of work (hence why companies like OnePlus are releasing devices with Nougat so they don't have to use Treble, which is required on all devices that start with Oreo).
In short, COULD Treble be ported to older devices? Yes; Google and Essential have proven that. Is it feasible? Unless you've got some friends at Samsung/HTC/Xiaomi/insert-other-company-here willing to leak source code, no not really. The only device that I could possibly see getting a Treble port is the HTC HD2, simply because that phone is basically the technological equivalent of a cockroach, and I think they may have actually reverse engineered their drivers to get them to work on so many operating systems. I know I've probably made some mistakes in my explanation, but it's my best way if simplifying how this works so that people don't come along, see Treble and expect an Oreo ROM for their Fire Phone or something
Click to expand...
Click to collapse
So who do we know at Samsung/HTC/Xiaomi ?
Haha.
Or better yet who do we ask there? Do they have only internal development? Customer service? How do some Devs get source code? When a company releases a developers version ( thankfully someone had a way to flash a dev version 5.1.1 of my verizion note 4 so it could get a ROM.. ), does the developers edition phone come with the support and access of developers?
The reason I ask. Is I used to have MSDN access when I worked at [email protected]#$0ft . just asking again. What's the path to be a developer from a builder like Samsung?
Good luck with that
TotalNoobTrucker said:
So who do we know at Samsung/HTC/Xiaomi ?
Haha.
Or better yet who do we ask there? Do they have only internal development? Customer service? How do some Devs get source code? When a company releases a developers version ( thankfully someone had a way to flash a dev version 5.1.1 of my verizion note 4 so it could get a ROM.. ), does the developers edition phone come with the support and access of developers?
The reason I ask. Is I used to have MSDN access when I worked at [email protected]#$0ft . just asking again. What's the path to be a developer from a builder like Samsung?
Click to expand...
Click to collapse
You're going to have better luck getting blood out of a rock than that. Even when they have "developer" editions of phones they don't give you access to their code, that just means it's totally unlocked for you to f*** up or flash ROMs to. The phone manufacturers get the drivers for the SoC from the manufacturer of the chip, and except in binary form that never leaves and stays in house. Only way you're going to get that is by knowing someone who works at Qualcomm, Samsung, etc. who is willing to risk being fired, sued, thrown in jail, or all of the above for stealing the source code and leaking it to you. When a phone manufacturer releases "source code" if you examine it you will find that those closed source drivers are not included, you can build it but a lot of things won't work. (Besides the fact that it is always outdated code).

[Research][Dev] Can Project Treble be ported?

Hi all,
I am searching and wondering for any guides/ experience/ instructions about:
Can Project Treble be ported to a device where the support is not introduced by the official vendor?
What would be required to do so? I wonder if it would be possible to use the information provided from a released kernel source in combination with some re-partitioning (?), but these are just guesstimates.
So can anyone share some insight please? I think the possibilities such a project could introduce for custom rom developments would be even much more noticeable than right now. But that's just my 2 cents.
Looking forward to hear your thoughts and productive input.
P.S.: Please keep it friendly and productive as I know this is a topic with high chances for very different point of views and that is a good thing as long as everyone is not judging, polite and fine with co-existing opinions.
---
Update: 9th May 2018
I found an interesting lead for enabling treble on devices which current partition layout would not allow it otherwise:
https://github.com/Lanchon/REPIT
Given my understanding of project treble, I would say no. This is due to the fact that you would have to have the individual drivers and their own partitions. So I believe you would have to have those drivers and the partitioning set up from the vendor in order to do it. Then again, this is xda...someone may figure out a way to do all this and make some magic!
@BakedTator Do you reckon an open-source Treble-compatible alternative could be made?
We could call it "Bass".
majamee said:
Hi all,
I am searching and wondering for any guides/ experience/ instructions about:
Can Project Treble be ported to a device where the support is not introduced by the official vendor?
What would be required to do so? I wonder if it would be possible to use the information provided from a released kernel source in combination with some re-partitioning (?), but these are just guesstimates.
So can anyone share some insight please? I think the possibilities such a project could introduce for custom rom developments would be even much more noticeable than right now. But that's just my 2 cents.
Looking forward to hear your thoughts and productive input.
P.S.: Please keep it friendly and productive as I know this is a topic with high chances for very different point of views and that is a good thing as long as everyone is not judging, polite and fine with co-existing opinions.
Click to expand...
Click to collapse
I'd say it's possible.
There are some good tentatives on the way on some devices, and it seem to have nicely progressed.
It is still not able to boot GSI, but I'm quite confident.
FWIW, this has basically nothing to do with kernel sources, and not with partitioning either.
phhusson said:
I'd say it's possible.
There are some good tentatives on the way on some devices, and it seem to have nicely progressed.
It is still not able to boot GSI, but I'm quite confident.
FWIW, this has basically nothing to do with kernel sources, and not with partitioning either.
Click to expand...
Click to collapse
Thank you for the info, especially for the FWIW part. Nevertheless, could you please be so nice to share what you know what is neccessary instead? I'm not finding any good leads/ information sources about this topic so far. Would be appreciated
zoomer296 said:
@BakedTator Do you reckon an open-source Treble-compatible alternative could be made?
We could call it "Bass".
Click to expand...
Click to collapse
You heard the man...he says it's possible...I would listen to him over me any day! Lol. Would be nice to see it happen...make more rooms reach more devices
mi5devs are porting Treble to Xiaomi MSM8996 devices (Mi5, Mi5S, mi5S plus, Mi Mix, Mi Note 2)
https://review.lineageos.org/#/q/topic:xiaomi8996-treblize-all-the-things
Nice... the avalanche is starting
Codeworkx is working on bringing treble to Oneplus 5/5T.
https://review.lineageos.org/#/c/205186/
Yes: https://forum.xda-developers.com/re...other-development/rom-lineageos-15-0-t3690465
Another device with Treble ported, Redmi 3S (Land)... @TeamMex has brought in initial Treble support to Redmi 3S just like it was done on Redmi Note 4, using Cust as the Vendor partition... Hope He has great success in it...
Source: https://plus.google.com/u/0/+klozzjesus/posts/5REcrMxfq67
Correct me if I'm wrong. To use Treble device must have /vendor partition right? So if device have this partition by default it will be easier to implement it?
Sent from my Nexus 5X using XDA Labs
Banan PL said:
Correct me if I'm wrong. To use Treble device must have /vendor partition right? So if device have this partition by default it will be easier to implement it?
Click to expand...
Click to collapse
Yes, but devices that have extra AOSP unused partitions, such as the Xiaomi /cust and Motorola /oem can have those partitions mounted as /vendor for treble ports. I'm guessing what's most important is that the partition has enough space for all the vendor blobs
I'm wondering about why they can make their devices (like xiaomi redmi 4 .Etc) adapt to treble.
The vendor code is close-source isn't it? So they write the code completely by them selves????
KuwaLee said:
I'm wondering about why they can make their devices (like xiaomi redmi 4 .Etc) adapt to treble.
The vendor code is close-source isn't it? So they write the code completely by them selves????
Click to expand...
Click to collapse
No. There were HALs before Treble, they just connect the old HALs to binderized HALs, Google even wrote several such converters.
(That's a big simplification, they still had to do a lot of work for that, that's not easy)
phhusson said:
No. There were HALs before Treble, they just connect the old HALs to binderized HALs, Google even wrote several such converters.
(That's a big simplification, they still had to do a lot of work for that, that's not easy)
Click to expand...
Click to collapse
I didn't thought it was possible without rewriting the blobs...are you willing to share some more details/resources to help other people do the same with other terminals?
For example, the whole Xperia X line has an oem partition which can be used as vendor (in the aosp version is used to store the blobs, and they also have some HALs binderized https://github.com/sonyxperiadev/device-sony-common/blob/master/manifest.xml)...but there is still something missing for full treble support.
Thank you
@phhusson when we get Android P dev preview images can we extract/make something to get them work on every treble device or do devs need sources released?
stunned said:
@phhusson when we get Android P dev preview images can we extract/make something to get them work on every treble device or do devs need sources released?
Click to expand...
Click to collapse
Hard to say. I'd say we'll need the sources.
That means that unsupported MTK devices that are still stuck on 6.0 would be able to use treble?
Then if kernel source are necessary for treble would it be possible for devices using MTK Helio Cpus to be finally updated to 8.1 as Kernel Sources are only available for a couple devices using Helio X SOCs?
For instance Helio X20 source are available from Vernee that helped developers building a semi-stable 7.1 ROM for LeEco X62x devices while the Redmi Note 4 MTK is stuck on AOSP 6.0
I think there is a way. We need to explain how Treble Works (I think anybody know's but casual users)
Devices with Treble Support had a /vendor partition with vendor, kernel and all things needed to boot, Before treble all these things will be on /system partition. Now what we can do ?
We can:
- add /vendor partition by adb
What developers need to know to port Treble sucessfully
- Developers need to know how to mount all drivers to be visible for android in /vendor partition

[Discussion] How long until we start seeing Project Treble ports of Android P?

Seeing as the first Android P Preview came out today, I'm wondering what (and how long) it would take to port it to Project Treble compatible devices.
Considering it is closed source, hard to say...
Though many people are on this.
phhusson said:
Considering it is closed source, hard to say...
Though many people are on this.
Click to expand...
Click to collapse
Nice to know!
When the source code is usually released? With the official release of the new Android version? In this case we should wait September 2018 for android P...
Can't we just flash GSI of already released pixel images?
espireso said:
Can't we just flash GSI of already released pixel images?
Click to expand...
Click to collapse
Released images are not GSI.
phhusson said:
Released images are not GSI.
Click to expand...
Click to collapse
I've learned it from the hard way. I extracted system.img out of newly released pixel.zip. It didn't boot ¯\_(ツ)_/¯
phhusson said:
Considering it is closed source, hard to say...
Though many people are on this.
Click to expand...
Click to collapse
does it always go open source only after all dp r released and stable is out?
zohaibahd said:
does it always go open source only after all dp r released and stable is out?
Click to expand...
Click to collapse
Yes
I too have a question. what if the manufacturer no longer updates their device to android P but the device is trebled supported on Android O. will the devs still can update the device to android P and so on?
Because on not trebled enabled devices still getting the latest OS thru custom roms and powered also by snapdragon SoC.
If we gotta wait until the source is released then what's the point of project treble compared to the usual custom rom developement process ? Correct me if I'm wrong, but isn't treble supposed to allow any device that got a vendor partition to boot any system partition regadless of the hardware used by the given device ?
If I'm not mistaken:
Treble allows for a generic system image to be used. The Android P developer previews are very likely not GSIs: they target a particular vendor configuration. (I wouldn't be surprised to find that they include an updated vendor partition to go along with them.)
A GSI doesn't target a particular device, it targets only the known services specified by a particular release of Android - an Android GSI could theoretically target any specified vendor interface, be it 8.0, 8.1, 9.0, or whatever future interface appears, or even multiple if someone wanted to put in the effort.
That doesn't get past the fact that there is no source for Android P yet, so a GSI can't really be built for it. And the vendor interface doesn't mean that any image will boot on any device - maybe one that depends on a strict subset of what's provided in the vendor interface on a particular device, but I wouldn't be able to grab a Pixel image and load it on a Galaxy S9 or Mate 10 Pro, or otherwise for any mix of devices. They all have dependencies on vendor-specific pieces in their vendor partition, at the very least; there's also /product, /oem, and /odm on the Mate 9, which is also depended upon by it's system.img. A GSI can't depend on the existence of those things, an OEM image can.
Maybe, with a fair bit of work, someone could rip apart the Pixel system image and make a GSI out of it, but P would probably be out before that made significant headway into making it a GSI.
irony_delerium said:
If I'm not mistaken:
Treble allows for a generic system image to be used. The Android P developer previews are very likely not GSIs: they target a particular vendor configuration. (I wouldn't be surprised to find that they include an updated vendor partition to go along with them.)
Click to expand...
Click to collapse
Yup, vendor partition has been updated.
And all your explanation is correct
Are GSIs for future versions of Android going to be released by Google or some other official entity? I thought this was the whole point of Project Treble :|
bemymonkey said:
Are GSIs for future versions of Android going to be released by Google or some other official entity? I thought this was the whole point of Project Treble :|
Click to expand...
Click to collapse
Google does make GSIs available to oems for testing (cts/vts) -- you can find evidence of this in the android-vts google group. I suppose they could make those publicly available, but if they are just stock aosp (with no google apps) they probably don't want to do that yet.
GSIs are a nice outcome of Treble, but that wasn't the main goal.
There is a really good podcast discussing what Treble is over at Android Developers Backstage (episode 75).
Yall need to seriously learn to chill out and enjoy what you have for a second, for real. The P preview is exactly what it is and has always been...a PREVIEW. Just like before when it was only available to nexus devices, it's the same for pixel. Plus, it's highly unstable and buggy as hell right now, and like most previews before this one, a lot of the features will be removed and more added in as time goes.
And to answer your question, ge-n, about what the difference is, it's not an instant invitation to see what Google releases as a preview. For us, our greatest advantage is if you're running a S9 per say (bloated to hell and grossified by their "Samsung experience" aka former TouchWiz) you can get a more stock version if you'd like.
It seems like there's been some movement on this...
How long will we get Stable Treble rom?
MAH35H said:
How long will we get Stable Treble rom?
Click to expand...
Click to collapse
As long as it takes you to develop one.
Will be interesting to see how the P beta program is distributed since it's a lot of treble devices that's getting it now!

failed to mount partition '/vendor' (invalid argument)

I got a new OP5 (had a OP3). I unlocked the bootloader, installed TWRP, and was looking to root and load LOS 15.1.
I did that, sort of, but then got spooked because every zip I flashed, I got this error:
failed to mount partition '/vendor' (invalid argument)
I flashed back to stock and all seemed well, though I also got stock recovery. When I installed TWRP again and then a custom kernel, I got the same error. Then I couldn't boot with the custom kernel and now I'm headed back to stock.
When I go in to Mount in TWRP, it won't let me select vendor to be mounted.
What's causing that and how do I fix it?
TWRP is just complaining about the missing 'vendor' partition, that only exists in Project Treble ROMs. Therefore, there's nothing to fix. Ignore the error.
https://forum.xda-developers.com/showpost.php?p=76621704&postcount=285
That one has been modified to remove the warning.
As already wroted, it's just a "cosmetic" bug. Imho it's not a good thing to fix it: every time TRWP release a new patch of their software, you have to wait a lone programmer that modifies the new patch in order to remove this message error.
Consider also this: with next release of Android, named P for now, that is already available as beta for Oneplus 6, the project Treble will be mandatory and not optional as for Android Oreo. There are already some rumors that Oneplus 5/5T will receive update to Android P, and the problem with vendor partition will be gone forever.
Elleby said:
As already wroted, it's just a "cosmetic" bug. Imho it's not a good thing to fix it: every time TRWP release a new patch of their software, you have to wait a lone programmer that modifies the new patch in order to remove this message error.
Consider also this: with next release of Android, named P for now, that is already available as beta for Oneplus 6, the project Treble will be mandatory and not optional as for Android Oreo. There are already some rumors that Oneplus 5/5T will receive update to Android P, and the problem with vendor partition will be gone forever.
Click to expand...
Click to collapse
That's true, but till then, this lone programmer (me ) will patch any updated TWRP that is released so that the the error isn't displayed if you aren't on a treble-compatible ROM.
Thanks all. That makes sense, and also explains why I didn't see it previously with TWRP for OP3.
Elleby said:
As already wroted, it's just a "cosmetic" bug. Imho it's not a good thing to fix it: every time TRWP release a new patch of their software, you have to wait a lone programmer that modifies the new patch in order to remove this message error.
Consider also this: with next release of Android, named P for now, that is already available as beta for Oneplus 6, the project Treble will be mandatory and not optional as for Android Oreo. There are already some rumors that Oneplus 5/5T will receive update to Android P, and the problem with vendor partition will be gone forever.
Click to expand...
Click to collapse
Source of this, please?
Astur_Torque said:
Source of this, please?
Click to expand...
Click to collapse
Check out this article, point 3 under "Will my device benefit from Project Treble".
Official statement on Oneplus forum. That part in particular:
Over 135,000 of our users signed up to review the OnePlus 6 early via The Lab. With the OnePlus 6 device in their hands, they'll be among the first in our community to be able to download the Android P Build. (OnePlus 5/5T friends, we'll have something nice lined up for you later this year.)
Click to expand...
Click to collapse
For me that means that they will release Android P on Oneplus5/5T after the initial release for Oneplus 6.
And Project Treble mandatory, link on discussion on reddit. That part in particular:
Devices launching with Android O will come Treble-enabled out of the box.
Click to expand...
Click to collapse
shadowstep said:
Check out this article, point 3 under "Will my device benefit from Project Treble".
Click to expand...
Click to collapse
But there does not mention anything about that is compulsory Treble on Android P (on preoreo phones), just it says its compulsory on Oreo recent-released devices
Astur_Torque said:
But there does not mention anything about that is compulsory Treble on Android P (on preoreo phones), just it says its compulsory on Oreo recent-released devices
Click to expand...
Click to collapse
It's true for Android Oreo and above. Treble is the reason why there are Android P Betas available for non-Google devices. Also, here's an excerpt from this article: "Going forward, updates to phones will become far more common, as all devices that launch with Android Oreo or newer are required to implement Treble."
shadowstep said:
It's true for Android Oreo and above. Treble is the reason why there are Android P Betas available for non-Google devices. Also, here's an excerpt from this article: "Going forward, updates to phones will become far more common, as all devices that launch with Android Oreo or newer are required to implement Treble."
Click to expand...
Click to collapse
Yes I agree with you with that... However... "All devices launched with oreo"... One plus 5 is not one of those... Just 6 and incoming..
Enviado desde mi Oneplus 5 mediante Tapatalk
Astur_Torque said:
Yes I agree with you with that... However... "All devices launched with oreo"... One plus 5 is not one of those... Just 6 and incoming..
Click to expand...
Click to collapse
You're spot on. I never said that OP5/5T will definitely get Treble. Also, I'm not the OP, if you haven't realized that yet. OnePlus got away with having to mandatorily provide Treble to the OP5/5T by launching the device with Nougat (but making it upgradeable to Oreo) -- meaning that these devices don't come under the category of devices that launch with Android Oreo, thereby putting OnePlus under no compulsion to provide Treble to these devices. However, there are rumours that have been floating around that even though there is no compulsion, OnePlus is considering providing Treble to these devices.

Android 10 (Q) GSI Images working with Axon 7?

Hey guys
I've seen some Android Q GSI Images on the internet and I'm asking myself whether or not they would work with our axon (A2017G for me)?
Also, I have a general question about GSI on Axon: I've seen A GSI Roms, B GSI Roms and A/B GSI Roms.. what's the difference and more importantly, which one of those can I take for our axon? I have trebleized right now on latest LiquidRemix Pie
Thanks in advance,
Fred x
No harm in trying them out. We use x64 A only. No idea what the differences are
jojofreddy said:
Hey guys
I've seen some Android Q GSI Images on the internet and I'm asking myself whether or not they would work with our axon (A2017G for me)?
Also, I have a general question about GSI on Axon: I've seen A GSI Roms, B GSI Roms and A/B GSI Roms.. what's the difference and more importantly, which one of those can I take for our axon? I have trebleized right now on latest LiquidRemix Pie
Thanks in advance,
Fred x
Click to expand...
Click to collapse
There are only two actually: A-only and AB ROMs, this pertains to the seamless update scheme. A-only means you only have one system partition, while AB means that there are two system partitions. If your phone is AB then the ROM can download updates in the background and flash them to the unused partition, and after it's done you can reboot and the active partition will be switched to that one. you basically don't lose time updating.
When Treble for our phone was made by djkuz, it was unclear whether it would be possible to implement an A/B scheme. We wouldn't lose much storage space (maybe none at all) because our stock system partition is actually huge, so it could be shrunk considerably and duplicated (I think it's 6GB in size). Oki said he would look into it some time ago.
Just use ARM64 A-only images for the Axon
Try Q yourself and report back, there's no obvious reason why it wouldn't work. maybe it does, maybe it doesn't, the question is why you would even bother with a leaked release idk
Thank you for your in-depth answer!
I've seen that leaked GSI Rom but also read an article that some sort of DP or Beta will be officially released soon. Maybe I'll get into Rom building, maybe I'll just try and report back, but of course: being on the very bleeding edge
Cheers
I tried the only gsi rom I could find at the time of writing this. I had no luck with all the vendors we have here. Every time I reboot I get a promising android text on the screen as if its booting but soon after it goes to the fastboot menu. It did this for every vendor i used. Let me know other peoples luck with this.
That leaked GSI will never work in axon7 because it requires the device to be "system as root" .
I heard that there will be another version of the GSI but could not find it anywhere
king1990 said:
That leaked GSI will never work in axon7 because it requires the device to be "system as root" .
I heard that there will be another version of the GSI but could not find it anywhere
Click to expand...
Click to collapse
Could you briefly explain what this is?
stevecaboose said:
Could you briefly explain what this is?
Click to expand...
Click to collapse
System-as-root requires the ramdisk to be part of the system image, as in the AB images
It also loads your img file into root " { "/" folder } compared to the normal /system before.
So, if your kernel is not configured to read the ramdisk from system, then it would not be able to use a System-as-root image.
This is my understanding of it, correct me if I am wrong..

Categories

Resources