Project Treble and unofficial roms/updates - Android Q&A, Help & Troubleshooting

Hello!
I have been following annual Google I/O 2017 and heard about all the benefits of Google's Project Treble.
I cannot help but wonder how are developers (for example here at XDA) able to create custom roms or unofficial Android updates. Why Google can't make official Android Nougat update for Nexus 7 2013, but you here at XDA can. What is different between your work and Google's when it comes to these things, as far as neither has access to hardware manufacturer's code support.
I have to say I am not a professional software developer, so I understand if this topic is beyond my comprehension.
Thank you!

"Why Google can't make official Android Nougat update for Nexus 7 2013"
Planned obsolescence.
"neither has access to hardware manufacturer's code support"
Google is obliged to release kernel source code because Linux(the kernel powering Android) is released under the GPL. The kernel is responsible for letting Android "talk" to the hardware. Developers at XDA can then modify the open-source kernel to "fit" newer versions of Android.

I'd like to chime in on this.
Let's use the Nexus 7 2013 as an example. The difference between what an official build of Nougat from Google would be and what a build of Nougat from XDA is that the Google released one will have updated devices drivers that are made specifically for Nougat, while the XDA released one simply uses the older device drivers and hope they work. In some cases they work flawlessly (mostly on Nexus devices), however other times there are things that don't work so they either need to be disabled or worked around. So essentially a Google released OS has everything updated and tested to work with the new OS, while XDA releases are more 'hacked' together to work (simply because the device drivers aren't Open Source). Google may not have access to the hardware drivers, but they still get them updated.
Now let's touch on Project Treble (and why I am so excited about it). Instead of each and every device driver needing to be upgraded and tested for each new OS version, the OS version will specify which version of the drivers (HAL's) will work with the OS. This means there will be a separate space where all the device drivers will reside, and the OS will simply load those when booting (no more proprietary binary blobs to include in the ROM! hopefully...).
This means on any Project Treble compatible device (all phones that ship with Oreo, and some that update to Oreo) with an unlocked bootloader, a user can simply compile AOSP and flash it directly to the device with no modifications and have the device work. I believe this is actually a requirement to pass Google's certification process for new devices with Oreo. That means, say, with the LG v30 if the bootloader is unlocked, there can be an AOSP ROM on day one of its release.
So instead of Android being strictly a per device compile, it is just a general compile (sans device specific features). However, this doesn't remove the old driver issue. If the drivers in their respective partition no longer are updated by the manufacturer, the later AOSP code will need to be modified to work around these (and accept them). This is still easier in my opinion than the binary blobs.
As for official updates, Project Treble allows device hardware manufacturers to work on updating the device drivers while the OS Dev (Samsung, etc) works on updating their OS. So it is a parallel development instead of a serial one (hardware AND os instead of hardware THEN os).

A question.
Do the Nexus 5X devices have the Treble system or project incorporated with Oreo?
I do not understand the other manufacturers that cheaper excuses are giving, it is true that they are not obliged but I think it would be good practice, maybe they think as before that you will not buy them a phone.
Does someone make a Change.org or similar campaign to ask all Android manufacturers to make a minimum effort?

Related

[Q] How did your developers build a ROM when there isn't one from Samsung?

Hi.
I am a noob, not a techy
just curios - how can your devs build ICS roms when Samsung themselves did not build/create/honed/refined the Vibrant for Android 4?
What I am trying to ask is, how can your devs manage to control the hardware via android 4, if Samsung did not supply the codes/drivers/source?
Thanks
I'm not 100% sure but I think I read somewhere you can use the source code to build a ROM and then they used the Gingerbread bootloader/kernel and from there it's debugging.... again I could be wrong.
I think they took the source, and compile the source with the characteristics of the device. then applications that do not work, modified or exchanged for other versions of other rom, like the kernel, and other modifications, which is why the rom, there are many versions which fix bugs Version earlier after many users try it. (an example of this is the ICS Passion, which is now in its version 13)
Well passion is based on cm9. Which is aosp rom using source code android releases. Basically if you have drivers for hardware and a device tree you can use that source to build for any device.
Wherelse Samsung roms are usually not directly from source but just modded firmware from Samsung leaks. Oems do use close sources drivers though, usually better and get more out of hardware.
Sent from my SGH-T959 using XDA App

[Q] Is there a possibility to build a universal android ROM

Hello
Here is a little question, is it possible to create a universal android rom.
Today, cyanogenmod allow us to have different flavour of android for many devices. But cyanogenmod is not universal and requires specific hacks for each device.
I know that Android is based on a linux kernel, that kernel should beallow an automatic detection of the devices specifications....
Moreover, Motorola initiates its Ara project. This new concept should be linked to an evolutive version of Android.
Is there anyway to see one day an android repository to upgrade and costumize your phone/phablet/tablet. With an essential package (OS) and options (launcher/Touchwiz....).
An universal evolutive OS should be a way to solve
- android fragmentation.
- security update
- Easy update without formatting your device
- OTA update for all devices (Samsung, Cube, HTC....) even for olders or chinese models
bart47 said:
Hello
Here is a little question, is it possible to create a universal android rom.
Today, cyanogenmod allow us to have different flavour of android for many devices. But cyanogenmod is not universal and requires specific hacks for each device.
I know that Android is based on a linux kernel, that kernel should beallow an automatic detection of the devices specifications....
Moreover, Motorola initiates its Ara project. This new concept should be linked to an evolutive version of Android.
Is there anyway to see one day an android repository to upgrade and costumize your phone/phablet/tablet. With an essential package (OS) and options (launcher/Touchwiz....).
An universal evolutive OS should be a way to solve
- android fragmentation.
- security update
- Easy update without formatting your device
- OTA update for all devices (Samsung, Cube, HTC....) even for olders or chinese models
Click to expand...
Click to collapse
I'm not going to be the one to say its impossible but its very unlikely. Different devices use different modems, kernels, and other system requirements. The CM team may be able to come up with something like that but you won't see it anytime soon if it happens. There are some ROMs out there that are in 1 big AROMA zip file and they all have the same features but the bases meet the requirements of the specific device.
bart47 said:
Hello
Here is a little question, is it possible to create a universal android rom.
Today, cyanogenmod allow us to have different flavour of android for many devices. But cyanogenmod is not universal and requires specific hacks for each device.
I know that Android is based on a linux kernel, that kernel should beallow an automatic detection of the devices specifications....
Moreover, Motorola initiates its Ara project. This new concept should be linked to an evolutive version of Android.
Is there anyway to see one day an android repository to upgrade and costumize your phone/phablet/tablet. With an essential package (OS) and options (launcher/Touchwiz....).
An universal evolutive OS should be a way to solve
- android fragmentation.
- security update
- Easy update without formatting your device
- OTA update for all devices (Samsung, Cube, HTC....) even for olders or chinese models
Click to expand...
Click to collapse
I doubt it's possibility. Different phones have different kernels/coding for hardware. All Android phones uses Linux kernel, but are coded differently, and that's why we have different/custom kernels. Phones/phablets/tablets have different UIs, which will result in larger updates. Furthermore, u said "essential package" which is hardly possible due to large file size and company issues. For example, Samsung has TouchWiz (and all it's bloatware ), while HTC has Sense (and the bloatwares ), and to stuff everything in a single ROM /Update, it's simply too much. (A update from Samsung would cost 100-300mb, and if what u say is true, OTA updates would cost 600mb~. (Take into account the stock Android launcher.)) I doubt Samsung would like this idea too. Companies like Samsung and HTC have their own launchers to differentiate themselves from others, and if consumers have a choice, they might use other launchers other than their own. (E.g. a Samsung user wants to use Sense, while preserving the Samsung hardware.) Though I would very much like to see this in the future, this is technically impossible. Hoped this explained your question.
Smack that thanks button If I helped!
Always make a nandroid backup before trying anything risky
Sent from my fabulous N7105 powered by Illusion ROM and Plasma Kernel.
Sent from dat small country called Singapore.
P.S. Quote my post for replies ASAP.
This is literally impossible, All devices would need to be designed to perform for that rom. Not only that but not a single one of those companies would agree to it. They'd actually attempt to make their own os before doing that, and the reasoning is simple, each company is in this race for themselves not as a team effort. For this to happen would be going the route of IOS, which android is not.
Sent from an Xposed LG-G2/LS-980

Alternative, compatible custom OS

Hi all,
Now that CM is dead (RIP) and official Lineage OS for the Wileyfox Swift 2 has not yet happened, i've been looking into other alternative OS's that are compatible with the Wileyfox Swift 2 [marmite].
However i'm not seeing any that are compatible for this device (Resurrection Remix, Dirty Unicorn, LineageOS (yet) and wondered if anyone has had any experience with any other custom OS's that they know are compatible?
Thanks
There are none because there is no source code for this device. You must be patient and wait until Wileyfox releases (Before the end of this month?!) the promised Android 7.1 update, and hope they also release the source code with it.
I did several modifications to stock CyanogenOS 13.1 version for myself, but I found not worth it sharing that, since we're going to receive the new update really really soon. If the update is a disaster, or they do a OnePlus (release the update on the 31st, late in the night before the end of the month, and full of bugs), I'll consider sharing it. But until then, just wait for it.
Thanks for the update. :good::good:
linuxct said:
since we're going to receive the new update really really soon.
Click to expand...
Click to collapse
I live in hope. :fingers-crossed:
linuxct said:
There are none because there is no source code for this device. You must be patient and wait until Wileyfox releases (Before the end of this month?!) the promised Android 7.1 update, and hope they also release the source code with it.
I did several modifications to stock CyanogenOS 13.1 version for myself, but I found not worth it sharing that, since we're going to receive the new update really really soon. If the update is a disaster, or they do a OnePlus (release the update on the 31st, late in the night before the end of the month, and full of bugs), I'll consider sharing it. But until then, just wait for it.
Click to expand...
Click to collapse
Thats not true there is maybe not a source code but the chips inside the device (and drivers) are also used in other devices wich are so you can make roms for this device.
There are no roms because this phone isn't used by many peaple yet or the community isnt big at the moment for this device but we can port roms from the xiaomi redmi 3s for instance
draakwars said:
Thats not true there is maybe not a source code but the chips inside the device (and drivers) are also used in other devices wich are so you can make roms for this device.
There are no roms because this phone isn't used by many peaple yet or the community isnt big at the moment for this device but we can port roms from the xiaomi redmi 3s for instance
Click to expand...
Click to collapse
WTF? Do you think that by having same CPU means we should have the very same source code? I know there's source code for the SD430 in codeaurora, and that Xiaomi released sources for land, but that doesn't mean anything. It'd require a lot of dirty and unnecessary stuff to get it working here (it's not only about the CPU, right?), and since Wileyfox is REQUIRED to release the source code (all OEMs are) we can avoid it by just waiting patiently. From there, building Lineage will be easier, but hey, if anyone wants to do the hard job, use land-m source code and try to port it, is free to do so! :laugh:
linuxct said:
Wileyfox is REQUIRED to release the source code
Click to expand...
Click to collapse
Manufacturers need to release kernel source as it's under a GPL license, but Android itself is under the Apache License 2.0 and manufacturers are not required to release any source code. In fact the vast majority of manufacturers do not release any of their internal Android code.
And having kernel source does not magically allow you to make custom ROMs. In fact you shouldn't even need the manufacturers kernel source unless they are using some obscure hardware.
flibblesan said:
Manufacturers need to release kernel source as it's under a GPL license, but Android itself is under the Apache License 2.0 and manufacturers are not required to release any source code. In fact the vast majority of manufacturers do not release any of their internal Android code.
And having kernel source does not magically allow you to make custom ROMs. In fact you shouldn't even need the manufacturers kernel source unless they are using some obscure hardware.
Click to expand...
Click to collapse
I know, but it's better having and working with it, isn't it? I know we will need to bring up a device tree, and that it's not that easy, but starting out of a good base is better than mixing sources from other phones, at least that's my opinion.
The kernel sources are already available for a long time (slowpokes?): https://bitbucket.org/wileyfox/kernel-wileyfox-msm8937
BeYkeRYkt said:
The kernel sources are already available for a long time (slowpokes?): https://bitbucket.org/wileyfox/kernel-wileyfox-msm8937
Click to expand...
Click to collapse
Oops. You made my day man. I swear I wasn't able to find that, I had no idea they published it already, they didn't mention it on social media, and whenever I asked them on the support chat they were like "Sorry, we don't have that".
linuxct said:
Oops. You made my day man. I swear I wasn't able to find that, I had no idea they published it already, they didn't mention it on social media, and whenever I asked them on the support chat they were like "Sorry, we don't have that".
Click to expand...
Click to collapse
Because I do not think that the public (where most users are not geeks, probably) will be interested in the post that the developers have released the source code of the kernel. Or someone beforehand, before closing Cyanogen Inc, released the source code for the kernel. And support is usually not answered to such questions, because they do not have such information.
But in any case you need the information you need to find in all available ways.

A bare operating system

Hello... Since I'm not very familiar with cell phones I'm curious about something. With a desktop computer, one can build their own or have a manufacturer type ( Dell, HP and so ) Now if you take the custom build system you basically can decide which OS you want, why can't cell phones be similar to that be able to install whichever OS you like, Or can you? Like in Android is it possible to install just a basic OS onto a phone? one that doesn't have let's say Google ( Google store)? Is there an Android build without Google? Also, does Android have an OS with its own browser, if not, why not? thanks
Dude905 said:
Hello... Since I'm not very familiar with cell phones I'm curious about something. With a desktop computer, one can build their own or have a manufacturer type ( Dell, HP and so ) Now if you take the custom build system you basically can decide which OS you want, why can't cell phones be similar to that be able to install whichever OS you like, Or can you? Like in Android is it possible to install just a basic OS onto a phone? one that doesn't have let's say Google ( Google store)? Is there an Android build without Google? Also, does Android have an OS with its own browser, if not, why not? thanks
Click to expand...
Click to collapse
You're thinking about it along the correct route. There are plain, unbranded Android builds known as Vanilla Android. These are the builds you see on Nexus and Pixel devices, built from the AOSP (Android Open Source Project) and have no carrier or OEM bloat.
If you're looking for a lightweight Android OS with no GApps (Google Apps), there are a ton of custom Android builds available, the most popular in the world being LineageOS. However, it should be noted that you can't simply flash a vanilla or custom Android build to your device and expect it to boot and function properly. Android ROMs need to be ported to a specific device. This is due to the vast hardware differences between various manufacturers and models.
To see if any custom Android builds are available for your particular device, search your model device in the Search Plus option. If any custom ROMs, kernels, recoveries, etc., are available for your device, you'll find them here on XDA.
MotoJunkie01 said:
You're thinking about it along the correct route. There are plain, unbranded Android builds known as Vanilla Android. These are the builds you see on Nexus and Pixel devices, built from the AOSP (Android Open Source Project) and have no carrier or OEM bloat.
If you're looking for a lightweight Android OS with no GApps (Google Apps), there are a ton of custom Android builds available, the most popular in the world being LineageOS. However, it should be noted that you can't simply flash a vanilla or custom Android build to your device and expect it to boot and function properly. Android ROMs need to be ported to a specific device. This is due to the vast hardware differences between various manufacturers and models.
To see if any custom Android builds are available for your particular device, search your model device in the Search Plus option. If any custom ROMs, kernels, recoveries, etc., are available for your device, you'll find them here on XDA.
Click to expand...
Click to collapse
Thank you for your input it gave me more of an understanding and I will do as suggested

Files/info needed to build LineageOS/Custom ROM for any unsupported device

Method to unlock bootloader
The device tree
The kernel (source code)
Proprietary blobs
Any other necessary repos
We recently completed a successful Kickstarter campaign for a minimalist smartphone running a modified version of LineageOS.
For that first version, we used the Xiaomi Mi A1 as the base phone. It’s a nice phone, official build and so straightforward to work with.
We would like to shift to a new phone, ideally something smaller, a bit cheaper (it doesn’t need to be super high spec). This new phone will need to be able to run Lineage (and so our modified version of Lineage).
I'm trying to figure out what we will need to ask for from suppliers so that we know that we can get a build working.
List above is what I have figured out so far. Would appreciate any comments.

Categories

Resources