"contemporary" device specific code - Android Q&A, Help & Troubleshooting

I am new with the rom development and I would like to know if there is a way to create device specific code (mostly the device tree and the proprietary blobs) depending on the desired android sdk version. To be more specific, my device (Huawei P8 Lite) will not get an official nougat update and I would like to know the prerequisites and a good guide to follow, in order to create (and contribute to others - currently active devs) device specific code for my phone, since there is no open source for this phone.
Thanks in advance.
Many might think that this could be duplicate, but I haven't seen any question regarding the connection of the device tree and the android version ...

Related

[Q][Help]Trying to Create Device Tree for ROM Building

Hello,
I'm trying to build a device tree for the Samsung Galaxy Tab A 9.7 (gt510wifi), by following CyanogenMod's porting guide here. I've managed to get a basic device tree going inside CM12.1's source tree, but I'm stuck at the part where I need to create the extract-files.shand the setup-makefiles.sh. The guide says to use other device trees as a reference for creating these scripts, but from what I can tell, each script is vastly different due to device discrepancies, and I'm unsure what to do at this point. I've searched everywhere online, but there doesn't seem to be any documentation whatsoever on how to create these files.
I'm no stranger to porting ROMs, as I've built SlimLP for my other devices, but I always had a pre-built tree created by another developer that I simply renamed files in to get it to work with SlimLP's sources.
Any help is greatly appreciated

[Questions] Kernel source issues when compiling LOS/TWRP

Hello guys.
This question is specially for devs or advanced users with development skills.
My question is related to the kernel source of one of my devices, Huawei Mediapad T1 10 (codename: hwt1a21l). I got the kernel source from the oficial Huawei website and uploaded it to a github repo. My device, which has a msm8916 chiset, doesn't have any development (roms, recoveries, device tree, etc) and his rom, EMUI 3.0, is based on Kit Kat 4.4.2.
I have been trying to bring development for this tablet many months ago because the stock rom is too deprecated for the hardware that has, with the msm8916 there is a huge potential to bring it a lot of development.
Well, i'm going to summarize my problems when trying to bring development for the device:
To get started development, for example a LineageOS build i needed a solid base to start with: device tree, propietary blobs and kernel source, so i got all of them. I ported the device tree from another one very similar to mine (with the same chipset), extracted the propietary blobs with the build tools from the source and got the kernel source from the Huawei website. So everything seemed to be good, but when i start the build process with my Linux machine (repo sync > source build/envsetup.sh > breakfast hwt1a21l > brunch hwt1a21l) i always receive thousands of build error by the kernel source, and i have been fixing (or at least avoid) a lot of them but it never ends, so i don't know if it's worth to keep trying to "fix" them or if i'm wasting my time.
So, what i have been trying to do: i have been trying to build a LineageOS 14.1 and TWRP recovery with my device tree This: Mustang-ssc/android_device_huawei_msm8916-common ported from this one from @dianlujitao : dianlujitao/android_device_huawei_msm8916-common and the specific kernel source for my device downloaded from the Huawei website Mustang-ssc/android_kernel_huawei_hwt1a21l. Here ends the summary.
So after a lot of hours, days and nights over the last months trying to make progress with this and not getting any help from the few devs i asked after seeing my lack of progress i decided to publicly ask for help.
The questions:
1. I have the official kernel source (Mustang-ssc/android_kernel_huawei_hwt1a21l) which i didn't have success to compile it, and then i saw the kernel source from a device almost identical to mine (same chipset, brand, ram, ...) (dianlujitao/android_kernel_huawei_msm8916). Can i use that kernel source as a base for my device after porting the specific configurations of my official kernel source (defconfig, drivers, libraries)? That one is much more updated and probably optimized than mine, but i don't know if it's possible to adapt a kernel source from other device using your kernel source.
2. This may be a dumb question: my device has Kit Kat 4.4.2. Is there any link between the kernel source and the android version the device has? I mean, i don't know if i should do something to adapt my kernel source for newer android versions (Marshmallow, Nougat) of if it's ok to just build with it without any change.
If you read it all, congratulations, you're awesome
Still waiting for a reply

Android source code for Alcatel pop c7

Where can I found the source code for build android for Alcatel pop c7 ?
I wrote a whole piece on how you could contact them, but they actualy shared sources for alott of their phone's and such already.
But that doesnt make it a ready 1-2-3 step compile android for yourself Ow no, Alcatel like many companies only comply by the licenses to share any source they used or modifications they made if required by lisences. If they have a NDA with Mediatek (wich they do) they are probably not required to include proprietary software, tools or sources they got from mediatek.
Think mediatek chipset specific header files, drivers, firmware (only binairy blobs might be shared). maybe they share enough for you to compile a working kernel and filesystem, but no signing keys, maybe the resulting files will run on a rooted, Custom firmware phone but No updates, some hardware not working, maybe the phone funstion doesnt work (due to missing specific code to use the mobile chipset).
Quick google, Alcatel shared it on sourceforge: https://sourceforge.net/projects/alcatel/files/ search for (ctr+f)
Code:
OT_7041_20141204.tar.xz
A quick look inside reveals alott of the expected sources, generic hardware support and specific drivers (in blob form it seems). A readme with instructions seem to be included, but very basic,
So, here you go. The "sourcecode". all 162MB of it. or go search on Baidu, maybe an ex dev leaked internl documents and firmware sources :fingers-crossed: maybe this is just what you needed, enjoy

Build ROM from scratch

I would like to develop a custom ROM for my device. I read some guides and obtained some basic knowledge, but still don't know how to start. So I would like to ask some questions to test my knowledge and expand them.
My device: Wiko View
My Android version (actually installed): 7.1.2 almost pure Android (just some third-party apps)
Desired Android version: AOSP 9.0 (maybe?)
So as far as I know I need these things:
AOSP Source Code (9.0)
Kernel
Vendor (tree or blobs?)
Device tree
So for the AOSP: I can get it from the repo hosted by Google. How should it look once downloaded?
For the kernel: should I use that from my actual ROM, or the most recent one? And how to include it in my ROM before compiling?
For the Vendor: As far as I read, with project treble I shouldn't edit this. But since I'm not developing a treble ROM, I'm in troubles, right? In older ROMs (before Oreo and Treble), they're stored in /system/vendor. Is just that folder or are there more? Do I need to update something? Where do I need to put this folder?
For the device tree: I read some guides that explains how to extract it from ROM (only from 5.0 and up, since mine is 7.1 no problems, I hope). Is this right or are there other ways? Or do I need to write it myself?
I'm going to thanks anyone in advance. I know there are plenty of questions, but I hope this thread will be a place for begginer (like me) to know more about compiling from source a ROM. Have a great day!

COmpiling for custom ROM

Hello all,
I have a question regarding compiling the android source. This is mostly a general question that can be applied to any device ; however, the device I will be using is the Ascend Mate 7.
I recently got an old Ascend Mate 7 from a friend that I can do what ever with. So, I figured I would try to build Android from source and then flash it to the device.
I have already downloaded the source code. I am about to build the source for the Ascend Mate 7. Then, I found out that I might need to know the Device tree? There seems to be some conflicting information regarding this. Using google's guide, all I need to know is the code name for the device and there we go. We can compile the source! (Woot!)
On the other hand, other guides state that I need to download the device identity such as the tree, vendor, and kernel and include this in the source. (See this guide on xda website: https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763) In another guide, I need to setup the jack server? (https://www.digitalocean.com/community/tutorials/how-to-build-android-roms-on-ubuntu-16-04)
So which is it? Should I just follow Google's guide or do I really need to know the device identity? If the latter, How do I search for the device tree, vendor, and kernel? More importantly, what are these and how do they work in relation to the Android source?
Also, I believe I will need manufacturer drivers for my phone to operate the peripherals. How do I download this? This might be a stretch but can't I get those files from the Mate 7?
Any thoughts?

Categories

Resources