androidandroid-sourcedevice-treelineageos

Why Device Tree Changes With Newer Android Version?


I Have Oreo Based Stock Rom And Its Relevant Device Tree. I Want To Build Latest Version Of Aosp Or LineageOs Then Why Do I Need To Port My Current Device Tree To Newer Android Version. As Far As I Knows Device Tree Is A Hardware Description And Should Not Change With Android Version Because The Hardware Information Is Constant. The Kernel Tree And Vendor Tree Remains Same And Dont Change With Newer Android Version Then Why Device Tree Changes With Newer Android Version.

For Example, The Device Tree Based On Oreo Will Not Work With Android 12 We Need To Port It First.But The Kernel Tree And Vendor Tree Which Was Working In Oreo Will Continue To Work Further Without Any Modification.


Solution

  • Actually device tree changes because of source changes that Google brings on every Android version. Vendor tree doesn't get modifications because it is mostly the blobs. And sometimes kernel also needs modifications, eg. Android 12 needs bpf backport support which is not in the case with Android 11. Source changes should be appropriately added in device tree. Otherwise it may not work properly.

    I'm taking an example of my device here(Asus Zenfone Max Pro M1) running Android 12 right now, launched with Android 8 and OEM dropped OS support at Android 10 beta. Device tree needs changes as per the source changes. Vendor tree can remain the same because we're still using Android 10 blobs on Android 11 and 12. Kernel can also be used without modification because changes are very less. But it's not recommended.