How to get Source Code? - Android Q&A, Help & Troubleshooting

How developers get the source code to develop a custom rom?
for example, How CyanogenMod get marshmallow source code for SIII 9300 which hasn't have this Android version?
I wan't to develop my own rom for my device, but I can't find specially Marshmallow pure source code for s3.

There isn't device set source code. Just a base code. Then you have to get/make the device trees for that device.
Then it takes weeks sometimes months of bugs to fix.
For that device to be honest you will be hard pressed to get a fully working set up as there is no kernel for android m for that device. So you will have to merge the code bit by bit and add some of your own

Related

Mixing AOSP sources with Galaxy S4 Team-Gummy code

Hi all,
I've been experiencing with Team-Gummy Rom source code for quite some time now. I usually compile from source to get the latest, along with some of my own addition. Lately I've been obsessed with having Android L code running on my Galaxy S4 (qcom) and so I downloaded AOSP source and after some failed attempts I was able to build it with the S4 device package from Team gummy.
So way cool! I may have in my hands the first (maybe not but as far as I know anyway) Android L build on the S4. But before going further, I have a question. In theory if I flash the system.img file produced by the build process and keep the kernel and boot.img from my current install, it should all come together right? Anyone here has an Idea what it would do?

How long until the release of the source code?

Does anyone knows how long will it take to Moto/Lenovo to release the source code for Nougat on our devices? I'm new in this kernel stuff and I want to make some changes but can't seem to succeed without the source code. Thanks.
https://github.com/MotorolaMobilityLLC/kernel-msm/releases/tag/MMI-NPL25.86-15
Here ya go

[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

How do I take the Huawei Mate 9 Source Code and make a device tree on github?

Huawei recently released the source code of the mate 9 and no one seems to be building any custom roms for it. I have built CM for my Bacon once before and just set up a build environment for lineage OS. How do I take the manufacture provided source code and make a device tree to use to build roms?
Link to the source code: http://consumer.huawei.com/en/opens...Type=openSourceSoftware&pageSize=10&curPage=1
Nickco43 said:
Huawei recently released the source code of the mate 9 and no one seems to be building any custom roms for it. I have built CM for my Bacon once before and just set up a build environment for lineage OS. How do I take the manufacture provided source code and make a device tree to use to build roms?
Link to the source code: http://consumer.huawei.com/en/opens...Type=openSourceSoftware&pageSize=10&curPage=1
Click to expand...
Click to collapse
The first step is finding a device that is similar to yours and using that tree as a starting point. I would recommend taking a look at this guide here https://docs.omnirom.org/Porting_Omni_To_Your_Device. Also make sure to take a look at this guide for lineage OS https://wiki.lineageos.org/proprietary_blobs.html. Let me know if you have any more questions I'll try and answer them!

Making own rom for Mediatek device

Hello!
I'd like to build my own rom from AOSP 8.0 official branch. I'm looking for some kind of guide but couldn't find any So, let's say I've got android source code and files from other custom rom that makes camera work. What have I to do to make my rom now? How can I build it and be sure that everything will work. Generally my target is to install android 8 on my Leeco le 2 x620 device with Mediatek chip
Any help is appreciated ^v^
LEGOL2 said:
Hello!
I'd like to build my own rom from AOSP 8.0 official branch. I'm looking for some kind of guide but couldn't find any So, let's say I've got android source code and files from other custom rom that makes camera work. What have I to do to make my rom now? How can I build it and be sure that everything will work. Generally my target is to install android 8 on my Leeco le 2 x620 device with Mediatek chip
Any help is appreciated ^v^
Click to expand...
Click to collapse
"I'd like to build my own rom from AOSP"
So you mean an aftermarket os like lineageos or carbonrom or do you mean that you take the aosp repo and compile aosp for your device? You can look in source.android.com
"source code and files from other custom rom that makes camera work"
Is that an already compiled rom? Because you won't get source code out of that
"How can I build it and be sure that everything will work"
Ya don't. Nothing can ever be 100% bugfree, it can either be from your device tree's source code, or the aosp code itself.
Generally, if there is a caf tree for your device, it's going to be 3x as hard to create an aosp tree.
It is going to be 100000x as hard to create an aosp tree that is for a newly released, new hardware requirement operating system.
Wanna know the topping of the cake? Mediatek is notorious when it comes to releasing the source (in fact, it has become a meme in the Mediatek users world) but don't let that stop you son.
You can try, but don't give up just because it won't compile the first couple of hundred times. The errors when compiling should give you a great start
Good luck.
ramiabouzahra said:
"I'd like to build my own rom from AOSP"
So you mean an aftermarket os like lineageos or carbonrom or do you mean that you take the aosp repo and compile aosp for your device? You can look in source.android.com
"source code and files from other custom rom that makes camera work"
Is that an already compiled rom? Because you won't get source code out of that
"How can I build it and be sure that everything will work"
Ya don't. Nothing can ever be 100% bugfree, it can either be from your device tree's source code, or the aosp code itself.
Generally, if there is a caf tree for your device, it's going to be 3x as hard to create an aosp tree.
It is going to be 100000x as hard to create an aosp tree that is for a newly released, new hardware requirement operating system.
Wanna know the topping of the cake? Mediatek is notorious when it comes to releasing the source (in fact, it has become a meme in the Mediatek users world) but don't let that stop you son.
You can try, but don't give up just because it won't compile the first couple of hundred times. The errors when compiling should give you a great start
Good luck.
Click to expand...
Click to collapse
Oh God, how am I meant to do this ;0 There is Lineage 14.1 project on my device. I really want to have android 8 on my phone. Thank you for all the advice.
Yes im trying the same andere without any succes so far.
Im also trying to port from a different device ROM to the stock ROM what im running now.
The chip sets are the same but the Android versions not.
It would be really Nice if some mtk ROM developer find some time in his busy life to create a ROM for our phone.
Or a guide to compile/port Android o tot oud phone.

Categories

Resources