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

Search This thread
Just wasting time even talking about "porting" treble to older devices that aren't already treble enabled, especially older devices. I mean really, what SoC manufacturers are going to waste their time rewriting code for older chipsets to make them treble capable? Guy's talking about how treble isolates the kernel from the hardware and other bs, he needs to read up a little on what treble does and does not do. Treble isolates the Android system (framework) from the hardware and enables device manufacturers to provide updates easier. With treble they can provide updates kernels and drivers without having to rewrite a lot of the Android framework every time, and they don't have to change any low level stuff to update the Android system, that's all it is. Kernels and device blobs are always going to be device specific, and since all those blobs are CLOSED source it ain't gonna happen.

Umm, no
Trebel forces standards of communication between drivers and operating system., And where the drivers are located in which partition,
And supports boot a, boot b, so if the update to boot b failed, boot a is fallback so theoretically it will be much harder to brick your device.

So let's assume a simple USB hardware driver in the side of your phone.

You plug in a USB Power and data cable to your phone.
An electric signal is sent on a wire to a chip.
The chip sends a code to the hardware interrupt

The kernel is constantly looking for things to do and scanning in order, driver a, driver b driver c, etc, and applying rules ( programming ) if x then n

Now a piece of code is constantly listening for a change in a hardware interrupt. ( Hardware driver )

The hardware driver sends a ( hey look at this ) to the cpu, the cpu reads the code ( what do I do if I see ”look at this")
And executes ( so that )

Let's say in the binary code
Qualcomm driver says OnUsbPlugIn send WakeUpBit to CPU hardware address 123abc
But
Samsung says ( hey let's run a security check before we do that ) hardware address 123ab1
But handset manufacturer xomami says ( we don't care, but let's send an update to some Chinese server that this device was hot plugged ) 123ab2

But now Verizon, AT+T , and TMobile all use the 3 different above , and compile a superduperCrapola driver for every different country they sell their handset.

Same chipset , many multiple different drivers

But now with Trebel, Google says no matter who makes the crap
OnUsbPlugIn must send 123abc to location TrebelOnUSBPlugin or You won't get our operating system and updates.

Forced standards ( free tools from Google to make your crapware drivers compliant )

So as an example..
So driver USBx.nougat just has to be pointed to Trebel.USB

I haven't coded this deep since Pascal, but the principal is the same

I think Google has a virtual Android Device , and there is a Trebel certification process.

So somewhere in the process ...

Qualcomm or whoever must release some basic hardware drivers source code or standards on it's IO specifications?

Also I saw a comment about partitions not being possible

You can partition any memory thing with any partition. Even virtual.

So yes it is possible to install Trebel partitions on my Note4 Verizon. It will be a brick, but it Can be done.

This boils down to
If Trebel has universal driver interfaces
So any ASOP ROM can run on any Trebel Device...

Could there ( not is ) be a universal Bootloader?

If the driver partition is separate
And the rexovery partition is separate
And the kernel and ROM are separate

Then we need to backbuild a universal Trebel to any device
Is a
Bootloader
And driver code

Now TWRP is as close to a universal recovery partition as we can get
It has a small operating system, ( probably Linux based ) and drivers built in.

The boot loader in any phone must provide some basic functions. It too must have some basic operating system as well. It will most likely be an EEPROM
On power up read hardware location x to y IN EEPROM
Copy x to y to PHYSICAL RAM memory location a to b
Excecute instruction is a to b
If no hardware interrupt load kernel and ROM
If hardware interrupt load recovery partition into memory and excute
If USB plug in display battery icon
If download display Android download screen
If bootloader lock bit set, deny write access


So all the Bootloaders do the same functions
These are all based on a physical program residing on a selectively flashable memory somewhere

Same as the BIOS on a Intel board.

Oh well I'm beat
Think more later
 

Haxk20

Senior Member
Aug 18, 2015
494
554
Umm, no
Trebel forces standards of communication between drivers and operating system., And where the drivers are located in which partition,
And supports boot a, boot b, so if the update to boot b failed, boot a is fallback so theoretically it will be much harder to brick your device.

So let's assume a simple USB hardware driver in the side of your phone.

You plug in a USB Power and data cable to your phone.
An electric signal is sent on a wire to a chip.
The chip sends a code to the hardware interrupt

The kernel is constantly looking for things to do and scanning in order, driver a, driver b driver c, etc, and applying rules ( programming ) if x then n

Now a piece of code is constantly listening for a change in a hardware interrupt. ( Hardware driver )

The hardware driver sends a ( hey look at this ) to the cpu, the cpu reads the code ( what do I do if I see ”look at this")
And executes ( so that )

Let's say in the binary code
Qualcomm driver says OnUsbPlugIn send WakeUpBit to CPU hardware address 123abc
But
Samsung says ( hey let's run a security check before we do that ) hardware address 123ab1
But handset manufacturer xomami says ( we don't care, but let's send an update to some Chinese server that this device was hot plugged ) 123ab2

But now Verizon, AT+T , and TMobile all use the 3 different above , and compile a superduperCrapola driver for every different country they sell their handset.

Same chipset , many multiple different drivers

But now with Trebel, Google says no matter who makes the crap
OnUsbPlugIn must send 123abc to location TrebelOnUSBPlugin or You won't get our operating system and updates.

Forced standards ( free tools from Google to make your crapware drivers compliant )

So as an example..
So driver USBx.nougat just has to be pointed to Trebel.USB

I haven't coded this deep since Pascal, but the principal is the same

I think Google has a virtual Android Device , and there is a Trebel certification process.

So somewhere in the process ...

Qualcomm or whoever must release some basic hardware drivers source code or standards on it's IO specifications?

Also I saw a comment about partitions not being possible

You can partition any memory thing with any partition. Even virtual.

So yes it is possible to install Trebel partitions on my Note4 Verizon. It will be a brick, but it Can be done.

This boils down to
If Trebel has universal driver interfaces
So any ASOP ROM can run on any Trebel Device...

Could there ( not is ) be a universal Bootloader?

If the driver partition is separate
And the rexovery partition is separate
And the kernel and ROM are separate

Then we need to backbuild a universal Trebel to any device
Is a
Bootloader
And driver code

Now TWRP is as close to a universal recovery partition as we can get
It has a small operating system, ( probably Linux based ) and drivers built in.

The boot loader in any phone must provide some basic functions. It too must have some basic operating system as well. It will most likely be an EEPROM
On power up read hardware location x to y IN EEPROM
Copy x to y to PHYSICAL RAM memory location a to b
Excecute instruction is a to b
If no hardware interrupt load kernel and ROM
If hardware interrupt load recovery partition into memory and excute
If USB plug in display battery icon
If download display Android download screen
If bootloader lock bit set, deny write access


So all the Bootloaders do the same functions
These are all based on a physical program residing on a selectively flashable memory somewhere

Same as the BIOS on a Intel board.

Oh well I'm beat
Think more later
Sure but where do you get vendor sources ?
Do you create your own ?
AlsoTWRP uses one 2 generic drivers for touch.
No matter the device touch is 95% sure that it will work.
So the question is are you going to create your vendor files ?
Or idk how you get them.
And if so you decide to make them then good luck with that.
If it was that easy ROM devs would make vendor files too to make the process sooooo much easier.
 
  • Like
Reactions: tripLr

2390

Senior Member
Jun 23, 2012
199
35
Orange Park
Open GL will support any device that has open GL hardware and it's in Android Linux keenel

And what "no hardware acceleration" means is that the operating system "Android Linux Kernel" cannot see the OpenGL capable hardware because it needs code that belongs to the OEMs and GPU manufacturers that cannot, will not, ever, be made available to the public. The only, and I mean ONLY possible device I can think of that has a chance in hell of a community Treble port is the HTC HD2, because they've reverse engineered everything, and that's only because 1: HTC used to open source almost everything back in the day, and 2: they've had 8 years to work on it

---------- Post added at 12:35 AM ---------- Previous post was at 12:28 AM ----------

Think of it like this: imagine somebody paralyzed from the waist down due to a spinal injury. Do their legs work? Yes, in theory, but the body cannot access them. Could the body grow the spine? Sure, they grew one in utero but the cells lack the blueprints to do it again (look up how scar tissue works if you're interested). Porting Treble to older devices would be like that. Is the hardware there? Yes. Can the OS see or use them? No, because they (and we, the devs) lack the blueprints to rebuild things, which would be required. I know that analogy kinda went a bit off the rails, but I think it gets the general point across
 
Ok, we have a new trebel article.

https://www.xda-developers.com/project-treble-aosp-android-oreo-huawei-mate-10-pro/

So in here is a chipset mention in different devices.
One of them is the Qualcomm snapdragon chip

Now I know most programmers ate mostly cut paste, tweak, library links, and scripting

Hardware driver however coders dread new families of hardware, but they all start with CPU architecture, buss addresses, memory IO addresses which represent physical connections.

So here we have a trebel snapdragon device.

By running the compiled drivers of trebel, through a code comparison with a non trebel driver should be able to identify

I/O address --->software code----> Trebel handle

Or visaversa

Trebel requirement ----->code------>device


Hardware development also follows lines.
Witness Intel CPUs and AMD, and the chipset to make them work on the motherboard.


So figure the easy stuff first
Buttons
Screen input sensor
GPS
Memory controller

Then harder stuff
GPU
CPU
Sensors
Camera

When a chipset maker makes x
Does the handset maker say, I want x and then adds the camera controller it wants, is there a standard IO for a camera in the chipset?

Is there a driver guru out there that understands the hardware itself ?

When u look at the comments for the kernel, you can see email addresss for contributors for things like the scsi controller etc for Linux. All these comments are in almost all the kernel.sources.

Anyway still figuring things out..
 
As for not being open source drivers, who cares, the hardware has published specs.

Bluetooth is a spec
Arm is a spec. The patent owner in England licenses the arm tech to builders
So Arm has an instruction set
Arm 64 has an instruction set

Open GL is a open video spec

And Android is an open spec.

A compiled lineage os is about 334 megabytes
In there the Kernel is compiled about what , 3 megabytes?

The modem partition is what 15 megabytes?

What's this all compiled in C++ or what. Just askin
 

revjamescarver

Senior Member
Sep 23, 2012
487
220
Tucson
Do you even bother to read?

Umm, no
Trebel forces standards of communication between drivers and operating system., And where the drivers are located in which partition,
And supports boot a, boot b, so if the update to boot b failed, boot a is fallback so theoretically it will be much harder to brick your device.

So let's assume a simple USB hardware driver in the side of your phone.

You plug in a USB Power and data cable to your phone.
An electric signal is sent on a wire to a chip.
The chip sends a code to the hardware interrupt

The kernel is constantly looking for things to do and scanning in order, driver a, driver b driver c, etc, and applying rules ( programming ) if x then n

Now a piece of code is constantly listening for a change in a hardware interrupt. ( Hardware driver )

The hardware driver sends a ( hey look at this ) to the cpu, the cpu reads the code ( what do I do if I see ”look at this")
And executes ( so that )

Let's say in the binary code
Qualcomm driver says OnUsbPlugIn send WakeUpBit to CPU hardware address 123abc
But
Samsung says ( hey let's run a security check before we do that ) hardware address 123ab1
But handset manufacturer xomami says ( we don't care, but let's send an update to some Chinese server that this device was hot plugged ) 123ab2

But now Verizon, AT+T , and TMobile all use the 3 different above , and compile a superduperCrapola driver for every different country they sell their handset.

Same chipset , many multiple different drivers

But now with Trebel, Google says no matter who makes the crap
OnUsbPlugIn must send 123abc to location TrebelOnUSBPlugin or You won't get our operating system and updates.

Forced standards ( free tools from Google to make your crapware drivers compliant )

So as an example..
So driver USBx.nougat just has to be pointed to Trebel.USB

I haven't coded this deep since Pascal, but the principal is the same

I think Google has a virtual Android Device , and there is a Trebel certification process.

So somewhere in the process ...

Qualcomm or whoever must release some basic hardware drivers source code or standards on it's IO specifications?

Also I saw a comment about partitions not being possible

You can partition any memory thing with any partition. Even virtual.

So yes it is possible to install Trebel partitions on my Note4 Verizon. It will be a brick, but it Can be done.

This boils down to
If Trebel has universal driver interfaces
So any ASOP ROM can run on any Trebel Device...

Could there ( not is ) be a universal Bootloader?

If the driver partition is separate
And the rexovery partition is separate
And the kernel and ROM are separate

Then we need to backbuild a universal Trebel to any device
Is a
Bootloader
And driver code

Now TWRP is as close to a universal recovery partition as we can get
It has a small operating system, ( probably Linux based ) and drivers built in.

The boot loader in any phone must provide some basic functions. It too must have some basic operating system as well. It will most likely be an EEPROM
On power up read hardware location x to y IN EEPROM
Copy x to y to PHYSICAL RAM memory location a to b
Excecute instruction is a to b
If no hardware interrupt load kernel and ROM
If hardware interrupt load recovery partition into memory and excute
If USB plug in display battery icon
If download display Android download screen
If bootloader lock bit set, deny write access


So all the Bootloaders do the same functions
These are all based on a physical program residing on a selectively flashable memory somewhere

Same as the BIOS on a Intel board.

Oh well I'm beat
Think more later

Do you even bother to read? There is no "backporting" to older non treble devices. First off you're not going to get closed source driver code from the SoC manufacturer, it just isn't going to happen. You also make a wrong assumption about twrp, there is nothing universal about it, as of oreo twrp no longer contains a kernel of any kind. There can never be a universal bootloader as those have and always be particular to the specific SoC, you can talk about code all you want and hope you haven't done it sonce pascal, but there are some simple facts that you refuse to grasp no matter how many people try to tell you. First off, treble REQUIRES driver and kernels that have been written to support it, second you are NEVER going to get the source code for the drivers from the SoC manufacturer, third you are comparing the android device to a pc and the two are as different as night and day, on a pc some of the low level functions are handled by the bios, whereas on any android device there is no bios, everything between the hardware is handled by the kernel, it's modules, the CLOSED SOURCE drivers, and then the android os. You trying to port treble to your device would be just like me getting to port it to my retired s5, a ton of time wasted on a futile effort. If you want to waste your time go for it, but realize that forest your going to have to port a complete kernel, write ALL your own drivers, rewrite a s***load of the android os, compile it all, repartition your device, at very minimum you're going to have a recovery, ram disk, kernel, vendor, system, and data partitions (kernel and ram disk because with oreo there is no boot partition anymore, it is /kernel and /ramdisk). So if you want to chase windmills get to coding. As some additional information, the phone manufacturer does not write their own drivers for the hardware on the SoC, those are provided in binary form from the SoC vendor, the carrier has nothing to do with drivers or low level software at all.
 
Last edited:
Do you even bother to read? There is no "backporting" to older non treble devices. First off you're not going to get closed source driver code from the SoC manufacturer, it just isn't going to happen. You also make a wrong assumption about twrp, there is nothing universal about it, as of oreo twrp no longer contains a kernel of any kind. There can never be a universal bootloader as those have and always be particular to the specific SoC, you can talk about code all you want and hope you haven't done it sonce pascal, but there are some simple facts that you refuse to grasp no matter how many people try to tell you. First off, treble REQUIRES driver and kernels that have been written to support it, second you are NEVER going to get the source code for the drivers from the SoC manufacturer, third you are comparing the android device to a pc and the two are as different as night and day, on a pc some of the low level functions are handled by the bios, whereas on any android device there is no bios, everything between the hardware is handled by the kernel, it's modules, the CLOSED SOURCE drivers, and then the android os. You trying to port treble to your device would be just like me getting to port it to my retired s5, a ton of time wasted on a futile effort. If you want to waste your time go for it, but realize that forest your going to have to port a complete kernel, write ALL your own drivers, rewrite a s***load of the android os, compile it all, repartition your device, at very minimum you're going to have a recovery, ram disk, kernel, vendor, system, and data partitions (kernel and ram disk because with oreo there is no boot partition anymore, it is /kernel and /ramdisk). So if you want to chase windmills get to coding. As some additional information, the phone manufacturer does not write their own drivers for the hardware on the SoC, those are provided in binary form from the SoC vendor, the carrier has nothing to do with drivers or low level software at all.

Hi,

why should the SoC/module vendor change the way on how a driver is writen for linux kernel?
Are the SoCs/modules only used for Android devices or also for other devices that maybe are also linux kernel driven?
If their SoCs/modules are used for other than android devices, are they really implementing different drivers for the same kernelversion?

I don't know, but maybe somebody, who knows how vendors create drivers for their SoCs, can tell us? Or maybe somebody can explain this picture mentioned in early post?
https://xdaforums.com/showpost.php?p=74993403&postcount=550

Old-vs-new-HAL-process-840x338.jpg


These are seriously meant questions!!!!! And i will appreciate somebody competent will answer them!!!
 
  • Like
Reactions: tripLr

revjamescarver

Senior Member
Sep 23, 2012
487
220
Tucson
Your questions

Hi,

why should the SoC/module vendor change the way on how a driver is writen for linux kernel?
Are the SoCs/modules only used for Android devices or also for other devices that maybe are also linux kernel driven?
If their SoCs/modules are used for other than android devices, are they really implementing different drivers for the same kernelversion?

I don't know, but maybe somebody, who knows how vendors create drivers for their SoCs, can tell us? Or maybe somebody can explain this picture mentioned in early post?
https://xdaforums.com/showpost.php?p=74993403&postcount=550

Old-vs-new-HAL-process-840x338.jpg


These are seriously meant questions!!!!! And i will appreciate somebody competent will answer them!!!

I can understand your questions, I suppose the best way to look at it that the kernel (and it's modules) live in one space, Android lives in another space, and the Hal occupies the space in-between, the SoC drivers are specific to Android devices. There are distributions of Linux that run on arm core devices (raspberry pi for example) but they generally rely on the kernel and it's own built in drivers to support hardware. The last Linux build I did for arm used broadcom for Wi-Fi, realtec for the sound, etc., All off the shelf chips, SoC's for phones are a different animal. As far as the how any why the SoC vendors do things the way they do, you are probably not going to find the answer you are looking for on XDA, you'll really have to talk to a software development person at the SoC you are looking to find out the answers about.
 

o-l-a-v

Senior Member
Jan 6, 2012
685
544
Oslo
Can a Treble compatible driver for a SoC used by multiple devices, across OEMs, be used by another device with the same SOC?
Lets say a OEM ported Treble to a device using the same SOC as my OP3T, could my phone benefit from it later on?
 
  • Like
Reactions: tripLr

Haxk20

Senior Member
Aug 18, 2015
494
554
Can a Treble compatible driver for a SoC used by multiple devices, across OEMs, be used by another device with the same SOC?
Lets say a OEM ported Treble to a device using the same SOC as my OP3T, could my phone benefit from it later on?
NOOO
The treble files are device specific and thats it.
There is no way to backport treble for older devices.
 
  • Like
Reactions: o-l-a-v
Can a Treble compatible driver for a SoC used by multiple devices, across OEMs, be used by another device with the same SOC?
Lets say a OEM ported Treble to a device using the same SOC as my OP3T, could my phone benefit from it later on?
The answer is kinda maybe, it's gonna be hard.

As hard as making a driver from scratch from code like the original Linux.

1. You need to start by hoping your device has a list of all drivers
Here is a clue
All SOC makers have a standard they licence from the source of the ARM platform, the parents are owned by a company in England.
The next standards are all the IO standards. So far I am talking the actual hardware no software yet

Most SOC manufacturers like Qualcomm will sell a chip for hardware developers like watches, medical devices, display manufacturers, case manufacturers etc. These chips are then sold to a mother board maker that makes a ”phone" that sits on a open motherboard.

Qualcomm releases build able somewhat open source kernels and drivers for these hardware testers.

Older drivers are released as open source on the Qualcomm website, and some Samsung.

In a phone unlike a computer, there is only 1or 2 chips that have everything built together.

So these testbeds, just plug in screens with touch input and cameras .

These developers play around with the drivers to get their configuration to work

https://developer.qualcomm.com/hardware/snapdragon-835-hdk
 

afridi.shahriar

Senior Member
May 22, 2014
352
108
Hey!! I developed trebel for my phone, Xiaomi Mi max (hydrogen).
But, there are many limitations.

1: trebel is only for the same android SDK version.
Like, the trebel won't boot sdk27 roms, as it's only SDK26 supported.


2: t
With trebel, other ROMs booted, bur, baseband was showing error, and, many wireless related apps showed force close, like: com.android.phone.



Btw, i think, vendor/trebel also need to be upgraded in these trebel devices, which will bu automatically updated from Google services. So, it will be automatically supported to new android SDK versions.
Which won't be available in our custom trebel ports.
Or, we need to have a developer's site, who will upgrade trebel files like Google do, for unofficially trebel enabled phones.
As, now, we have lineageos, which provides custom roms, when we don't get official updates
 
Hey!! I developed trebel for my phone, Xiaomi Mi max (hydrogen).
But, there are many limitations.

1: trebel is only for the same android SDK version.
Like, the trebel won't boot sdk27 roms, as it's only SDK26 supported.


2: t
With trebel, other ROMs booted, bur, baseband was showing error, and, many wireless related apps showed force close, like: com.android.phone.



Btw, i think, vendor/trebel also need to be upgraded in these trebel devices, which will bu automatically updated from Google services. So, it will be automatically supported to new android SDK versions.
Which won't be available in our custom trebel ports.
Or, we need to have a developer's site, who will upgrade trebel files like Google do, for unofficially trebel enabled phones.
As, now, we have lineageos, which provides custom roms, when we don't get official updates


That's awesome.
Thanks for sharing.

Can you post a thread in this zone on how you did it with your sources?
Please share this wonderful accomplishment

General steps are ok, post your steps.


I have been digging into building ROMs. To catch up on getting into building Oreo.

So for my progress which I will update in the OP


Learning Linux from scratch on an 6 year old dual hard drive 4 gb HP dual 64 gb laptop

Which further reinforces my ideas on Trebel and or oreo



https://www.xda-developers.com/android-go-old-android-8-1-oreo/

Sent from my SM-N910V using XDA Labs
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    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://xdaforums.com/note-4/snapdragon-dev/oreo-8-1-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://xdaforums.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://xdaforums.com/note-4/general/guide-build-lineageos-14-1-trltexx-t3567885
    Thanks @_mone and @ripee

    https://xdaforums.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://xdaforums.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://xdaforums.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://xdaforums.com/tab-s2/development/kernel-poseidonkernel-v1-0-permissive-t3588069
    https://xdaforums.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.
    8
    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
    5
    OK I saw in the other thread that the note 5 is going Oreo. Whether thats trebel Oreo or not that's irrelevant. Someone is also going to publish the source.

    So.back in the day of the 486 586 etc...
    There was a little company making RISC chips.
    IBM clones vs apple.

    Now apple runs on IBM cores, and windows 8 to 10 runs on RISC cores.

    Where am I going..

    Android must have some white papers which contain the following ...

    CPU standards
    IO standards
    GPU standards

    So.there must be a build map that has common hardware development paths, why?

    Because its a Linux OS. Linux is the key to all the mods.

    I played with hardware and some Open BSD builds

    What's now common across Linux, BSD, Windows NT and up like 2000 and server editions, Windows 7,8,10, and all MAC and apple IPhone is this.

    A common operating system .

    All the kernel does is wait for a command or input, and execute a command and produce output

    The hardware stores commands (memory), on a memory bus , send signals to an output device , or converts analog signals to digital and send the signal to the CPU for processing.

    In the course of building code from scratch that the CPU can execute , the code writer must know all the outputs of the CPU from the input it takes.

    I built a 4 bit CPU . it had the following inputs 0000 to 1111

    16 different instructions.
    It could add, subtract store and retrieve memory

    I built a LED register to visually see each bit and its instruction.
    OK not bragging here,

    Because Linux can run on thousands of different hardware configurations
    Most CPU's have some basic common instructions
    Getting into multiple cores and such is way over my head, but people in the Unix business have been doing it for decades

    Add standards like openGL, direct X, GSM, surround sound, Bluetooth, allows different hardware to.interact with ANY software and computing platform that supports it.

    So
    1.SOMEWHERE there must be some basic Android Standards
    2. If SOC(x) gets Oreo Trebel, then ANY related SOC should have the same basic driver.
    3. If Bluetooth adapter (mfg xyZ corp) is included in the phone that has the (SOC) in number 2, then that driver will work on any of the same.
    (Or modem, or touch screen, SD card adapter, home screen switch volume switch , ...basic io devices )
    That's the reason a custom bootloader works like TWRP.

    There is a default graphic mode for the screen
    There is a common io for the switches and touchscreen
    There is a common io for the sdcard

    So my point is what trebel.has done, is
    Isolate the Linux core from the hardware,
    Require the hardware drivers to.have the same standard commands to ANY driver.

    What this means is this
    If the note 5 Oreo is trebel enabled,
    Then that note 5 SOC will Have to run the SAME drivers on any other device with the same SOC.

    So its exciting to say the least.

    Here is the cool part.

    Coders and hardware makers are notorious for being lazy.
    Cut and paste programming
    Cookie cutter hardware makers

    So there is only ONE British company with the patent on ALL the ARM/Risc processors. They hardly make Any chips.
    They license it to anyone who wants to.make one.

    Guess what the most popular CPU is in the world, its not the IBM clones, the AMD clones ,
    Its what's in your phone and tablet.

    I predict that Trebel will be eventually compatable with every SoC. Even Oreo has a pared down simple version that can run on SOCs that only have 500mb ram
    5
    Just wasting time even talking about "porting" treble to older devices that aren't already treble enabled, especially older devices. I mean really, what SoC manufacturers are going to waste their time rewriting code for older chipsets to make them treble capable? Guy's talking about how treble isolates the kernel from the hardware and other bs, he needs to read up a little on what treble does and does not do. Treble isolates the Android system (framework) from the hardware and enables device manufacturers to provide updates easier. With treble they can provide updates kernels and drivers without having to rewrite a lot of the Android framework every time, and they don't have to change any low level stuff to update the Android system, that's all it is. Kernels and device blobs are always going to be device specific, and since all those blobs are CLOSED source it ain't gonna happen.

    Umm, no
    Trebel forces standards of communication between drivers and operating system., And where the drivers are located in which partition,
    And supports boot a, boot b, so if the update to boot b failed, boot a is fallback so theoretically it will be much harder to brick your device.

    So let's assume a simple USB hardware driver in the side of your phone.

    You plug in a USB Power and data cable to your phone.
    An electric signal is sent on a wire to a chip.
    The chip sends a code to the hardware interrupt

    The kernel is constantly looking for things to do and scanning in order, driver a, driver b driver c, etc, and applying rules ( programming ) if x then n

    Now a piece of code is constantly listening for a change in a hardware interrupt. ( Hardware driver )

    The hardware driver sends a ( hey look at this ) to the cpu, the cpu reads the code ( what do I do if I see ”look at this")
    And executes ( so that )

    Let's say in the binary code
    Qualcomm driver says OnUsbPlugIn send WakeUpBit to CPU hardware address 123abc
    But
    Samsung says ( hey let's run a security check before we do that ) hardware address 123ab1
    But handset manufacturer xomami says ( we don't care, but let's send an update to some Chinese server that this device was hot plugged ) 123ab2

    But now Verizon, AT+T , and TMobile all use the 3 different above , and compile a superduperCrapola driver for every different country they sell their handset.

    Same chipset , many multiple different drivers

    But now with Trebel, Google says no matter who makes the crap
    OnUsbPlugIn must send 123abc to location TrebelOnUSBPlugin or You won't get our operating system and updates.

    Forced standards ( free tools from Google to make your crapware drivers compliant )

    So as an example..
    So driver USBx.nougat just has to be pointed to Trebel.USB

    I haven't coded this deep since Pascal, but the principal is the same

    I think Google has a virtual Android Device , and there is a Trebel certification process.

    So somewhere in the process ...

    Qualcomm or whoever must release some basic hardware drivers source code or standards on it's IO specifications?

    Also I saw a comment about partitions not being possible

    You can partition any memory thing with any partition. Even virtual.

    So yes it is possible to install Trebel partitions on my Note4 Verizon. It will be a brick, but it Can be done.

    This boils down to
    If Trebel has universal driver interfaces
    So any ASOP ROM can run on any Trebel Device...

    Could there ( not is ) be a universal Bootloader?

    If the driver partition is separate
    And the rexovery partition is separate
    And the kernel and ROM are separate

    Then we need to backbuild a universal Trebel to any device
    Is a
    Bootloader
    And driver code

    Now TWRP is as close to a universal recovery partition as we can get
    It has a small operating system, ( probably Linux based ) and drivers built in.

    The boot loader in any phone must provide some basic functions. It too must have some basic operating system as well. It will most likely be an EEPROM
    On power up read hardware location x to y IN EEPROM
    Copy x to y to PHYSICAL RAM memory location a to b
    Excecute instruction is a to b
    If no hardware interrupt load kernel and ROM
    If hardware interrupt load recovery partition into memory and excute
    If USB plug in display battery icon
    If download display Android download screen
    If bootloader lock bit set, deny write access


    So all the Bootloaders do the same functions
    These are all based on a physical program residing on a selectively flashable memory somewhere

    Same as the BIOS on a Intel board.

    Oh well I'm beat
    Think more later
    4
    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?
    How do you wanna to do that ?
    Vendor files are NOT open-source so you cannot make them treble enabled sadly.