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
Related
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).
In this Article by Mishaal Rahman , we can understand why OnePlus and Nokia doesn't have treble support to their devices.
I open this thread to discuss about your opinions about how danger can be to create vendor partition outside system partition.
Tell us your opinion and how we can do it safely!
/vendor
FSadino said:
In this Article by Mishaal Rahman , we can understand why OnePlus and Nokia doesn't have treble support to their devices.
I open this thread to discuss about your opinions about how danger can be to create vendor partition outside system partition.
Tell us your opinion and how we can do it safely!
Click to expand...
Click to collapse
That partition is not accessible by the user or anyone else unless the phone is rooted, and it's no more dangerous than having the drivers and libraries in the system partition, OnePlus, as nothing more than a rebranded oppo, as well as Nokia, just don't want to put in the effort, Google has made it perfectly clear that treble is not optional, it is mandatory for devices shipping with Oreo and later, Nokia and OnePlus can do what they want with existing phones, but even they have no real choice that to support treble, unless of course that want to be stuck on phones shipping with nougat and maybe upgrading to Oreo, both of them will see the Android world passing them by and their implementations of Android will become more and more fragmented. Each to their own I suppose
Repartitioning a phone carries a certain risk, especially if it is done via OTA Update, but there are ways to do it and make it relatively safe...if you are willing to put in the work. I think that's the main point.
To me, it's much more interesting to see right now, how OEMs actually use Treble. They no longer have the excuses they used to, so someone like Sony should now be able to provide the Update to Android 8.1 within Days instead of Months...but will they actually do it?
The reasoning behind OnePlus deliberately not using Oreo on the 5T and not preplanning the extra partition...well, that tells it's own story. Not really that unexpected. Nokia though...I would have expected more from them, since they started with big promises about Stock Android and fast Updates, but so far very little has materialised...
I really think people are blowing this up far more then it needs to be. In the Google article it stated that even after the treble code is sent, the oems will still have to make their changes. So as far as I can see this will only matter to oems.
I expect to see many devices with day one 8.0 updates for a while.
Well, like I said, this will be the benchmark for Updates in the future. Since a new OS version can now boot on a phone without any big changes to the UI, Drivers or Apps, it SHOULD be far quicker. How much quicker will be interesting to see. Custom ROMs already show how fast the process can be...so... interesting times!
CommanderROR said:
Well, like I said, this will be the benchmark for Updates in the future. Since a new OS version can now boot on a phone without any big changes to the UI, Drivers or Apps, it SHOULD be far quicker. How much quicker will be interesting to see. Custom ROMs already show how fast the process can be...so... interesting times!
Click to expand...
Click to collapse
Yeah if you don't want any of the main features from the oem. Like Samsung cameras on aosp. Things like that.
As for faster updates. I doubt it. As now the oems will, have to do twice the work. Instead of adding their code to the stock frameworks. Now they will have to make completely new framework files to over write the default. Downloads will be a lot bigger now as well.
Hmm... that's not the way I understand Treble!
From what I've read, the OEM can basically exchange the OS Version without really touching much of their OEM UI...
The fact that Custom Roms are limited is mostly due to the fact, that devs don't have access to the OEM Sources, so they can only compile AOSP versions of Android...
CommanderROR said:
Hmm... that's not the way I understand Treble!
From what I've read, the OEM can basically exchange the OS Version without really touching much of their OEM UI...
The fact that Custom Roms are limited is mostly due to the fact, that devs don't have access to the OEM Sources, so they can only compile AOSP versions of Android...
Click to expand...
Click to collapse
And see that is why XDA articles are crap. The way OEMS roms have worked for years is that they replace and/or recode all of googles files. Now they will have to make even more. To over write them.
That is what you will get. Either AOSP or OEM. The aosp will not have access to the OEM code. Nor will OEM push their code to aosp for google to make things work right. This comes from the fact that OEMS dont write the drivers and code for alot of the hardware. They get that from others.
Just checked, my us997 LG G6 has a symlink for 'vendor', it points to 'system/vendor'... so no separate partition on the G6 either... I was hoping! alas.
Not unexpected...the G6 launched way before Treble was announced and hasn't been Updated to Oreo yet...
They should build a tool and require a wired connection to a pc to repartition and fallback just in case.
FWIW, I made patches to AOSP to be able to have a vendor partition WITHOUT needing to repartition, here:
https://github.com/phhusson/treble_experimentations/tree/master/no-vendor
The way it works, is it tells the kernel to look at the "system" partition, as if it was an hard-drive, to look for partition table, and then use partitions inside this fake hard-drive
Clever. Sell that idea to Oneplus and Nokia please...?
CommanderROR said:
Clever. Sell that idea to Oneplus and Nokia please...
Click to expand...
Click to collapse
I might be a good coder, but definitely not a good seller
phhusson said:
FWIW, I made patches to AOSP to be able to have a vendor partition WITHOUT needing to repartition, here:
https://github.com/phhusson/treble_experimentations/tree/master/no-vendor
The way it works, is it tells the kernel to look at the "system" partition, as if it was an hard-drive, to look for partition table, and then use partitions inside this fake hard-drive
Click to expand...
Click to collapse
Did you already tried this? I mean, I'm not developer and I can't understand the pros/cons about your patch but is extremely interesting!
@franciscofranco @eng.stk @Sultanxda @flar2 can you guys share your opinion about this? Thanks in advance
FSadino said:
Did you already tried this? I mean, I'm not developer and I can't understand the pros/cons about your patch but is extremely interesting!
Click to expand...
Click to collapse
Yup, actually my main testing device for my Treble ROM is a device using this.
Pros:
- doesn't need to repartition
- Easy to integrate
Cons are only for community rom devs:
- /system and /vendor are in read-only, even if dm-verity is disabled, the only way
- some TWRP change is required
- fastboot flashing will require to launch a s cript to merge system.img and vendor.img and flash both at the same time
Frankly, I'd guess OEMs had better to repartition. If you don't move partitions, only split system into system/vendor, and write the script with error-checking in mind, I really can't see how you would brick your device.
But this patch makes it possible to answer to OEMs saying they can't because of missing vendor partition
It will be interesting to see what happens, if a Device with strong XDA Community support like the OnePlus lineup can be "Trebleized" by the community and then supported more easily without help from the OEM that made it.
Following up here, very curious about where this is going.
Not a developer, but willing to test, my device is OP3T.
In light of a dev getting Treble support on the Redmi Note 4X, is it possible to get it on our devices too? I'm willing to test.
phhusson said:
FWIW, I made patches to AOSP to be able to have a vendor partition WITHOUT needing to repartition, here:
https://github.com/phhusson/treble_experimentations/tree/master/no-vendor
The way it works, is it tells the kernel to look at the "system" partition, as if it was an hard-drive, to look for partition table, and then use partitions inside this fake hard-drive
Click to expand...
Click to collapse
Does the Zenfone 4 use your patch actually? (didn't checked if sources are available yet)
I read a while back that first devices (or just one device?) is now project treble ready without vendor partition, not knowing you might have anything to do with it...
For reference:
https://www.androidpolice.com/2017/11/26/phones-updated-support-project-treble-continuously-updated/
Sent from my OnePlus 3T using XDA Labs
Will Project Treble make porting rom easy, like a one-day job?
Could we port roms between different hardware platforms on devices have Treble support?
For example, can we flash the system.img of Honor 9 into an Essential Phone PH-1 and boot EMUI 8.0 on it, or boot Essential's system image on Honor devices?That's not possible before Treble.
The short answer: no. System images from Huawei/Honor phones reference a ton of vendor-specific stuff that isn't available on other phones.
MishaalRahman said:
The short answer: no. System images from Huawei/Honor phones reference a ton of vendor-specific stuff that isn't available on other phones.
Click to expand...
Click to collapse
In fact the EMUI camera port is partly working on a xiaomi device,even rhe camera is related to a vendor.xxx.so file that is vendor-specific .The phone even don*t support treble.So I wonder if the vendor stuffs could also be ported.
Hi.
I will turn arround the question.
Will we be able to use the same ROM file (it can be LineageOS) on 2 different devices ?
The hardware specific applications can be installed like now we do it with weather service or root service for LOS or open gapps .
Tomek0000 said:
Will we be able to use the same ROM file (it can be LineageOS) on 2 different devices ?
Click to expand...
Click to collapse
Yes, of course, it already works, check other threads
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!
I would like to know if in any way there would be a treble project in the harpia, I read that it could be enabled in 2016 android devices, I would like to know if it will be in the harpia
ReftLight said:
I would like to know if in any way there would be a treble project in the harpia, I read that it could be enabled in 2016 android devices, I would like to know if it will be in the harpia
Click to expand...
Click to collapse
Highly unlikely given technical prerequisites. Seems beyond the scope of what Moto would do for an aging 'value' oriented device that struggles to receive conventional updates and/or the scope of services provided by custom ROM custodians.
Davey126 said:
Highly unlikely given technical prerequisites. Seems beyond the scope of what Moto would do for an aging 'value' oriented device that struggles to receive conventional updates and/or the scope of services provided by custom ROM custodians.
Click to expand...
Click to collapse
But, you could not unofficially because they did treble in an officer Xiaomi.
ReftLight said:
But, you could not unofficially because they did treble in an officer Xiaomi.
Click to expand...
Click to collapse
Boils down to reasonable effort given the technical base, developer support and target community. Morphing a device and ROM to support treble is not for the faint of heart.
How much is the cust partition for Moto g4 play(harpia)???
mad_max69 said:
How much is the cust partition for Moto g4 play(harpia)???
Click to expand...
Click to collapse
What exactly are you asking? If partition sizes system is ~2.5Gb, data ~10Gb.
ReftLight said:
I would like to know if in any way there would be a treble project in the harpia, I read that it could be enabled in 2016 android devices, I would like to know if it will be in the harpia
Click to expand...
Click to collapse
It's not possible coz Treble implementation requires an extra partition to be masked as Vendor Partition. Xiaomi Devices have a partition labelled 'cust'. It is used in the MIUI ROM but practically unusable in AOSP or any other custom Roms. The developers developed a customized recovery that masked the cust partition as Vendor partition to unofficially implement Treble Support in the Xiaomi devies.
Moto G4 play or other Moto devices don't ship with an extra partition. Also, repartitioning the device will lead to brick. So, it's not possible.
uncannyjish said:
It's not possible coz Treble implementation requires an extra partition to be masked as Vendor Partition. Xiaomi Devices have a partition labelled 'cust'. It is used in the MIUI ROM but practically unusable in AOSP or any other custom Roms. The developers developed a customized recovery that masked the cust partition as Vendor partition to unofficially implement Treble Support in the Xiaomi devies.
Moto G4 play or other Moto devices don't ship with an extra partition. Also, repartitioning the device will lead to brick. So, it's not possible.
Click to expand...
Click to collapse
Umm what. I have the Moto g6 play and it came treble enabled. Any android device that ships with android Oreo is officially treble enabled. sounds like your talking about A/B partition for seamless system updates. My Moto g6 play is A only partition and there is plenty of gsi.img files for A only partition. Theres ways to make older devices treble enabled also our Moto g4 play would be considered an A only partition if we get unoffical treble support. I also have a Moto g4 play in case your wondering why a Moto g6 play user is on here.
It may be possible, using only the system partition. I would try that if I had reliable internet access.
https://forum.xda-developers.com/pr.../tool-capire-le-treble-terble-vendor-t3774629
ReftLight said:
I would like to know if in any way there would be a treble project in the harpia, I read that it could be enabled in 2016 android devices, I would like to know if it will be in the harpia
Click to expand...
Click to collapse
Technically, you could use "steal" an fstab from a treble device, wipe internal storage, and use that to create a new vendor partition, and then place the blobs there.