[Q] Using ROM source to delevope ASOP or CM ROM - Android Q&A, Help & Troubleshooting

I've been looking at getting a Huawei Honor 3C and finally found the website of where to actually get the official ROM from:
http://zh.ui.vmall.com/emotiondownload.php?mod=myrom&modelid=32
Anyway I also found they had the source, downloaded it, opened the .GZ file and the single file says "H30-U10_kernel_opensource" (H30-U10 being the model code for the device. Says its a JellyBean kernel-3.4.5
Anyway I was reading the other day about source code being useful for porting CM to a device that doesn't currently have it. I'm happy to have a go when I get the device, but I was wondering is this going to be enough to fill in the missing bits?
Mainly asking cause this uses a Mediatek MT6582 processor which apparently people don't have the source for, so they can't build proper ROM's for it. At they talking about the SOC source or a decent ROM source.
Anyway, thank for any advice/help you can give me.
B.

Related

[Q] Samusung XCOVER/GT-S5690 questions.

Hi all,
i'm a noob to android, but i have nit of experience on other unix based systems.
I was wondering, why there is no custom roms for GT-S5690?
What's the problem?
Is bootloader locked some other way or is it somehow different from example Gio/GT-S5660?
There is a bunch of roms for gio..
I have one xcover, wich has no screen and covers, i thought i could use it for testing.
I think there are too less people who have a xcover, and I was actually pretty disappointed when I say there is a successor to the xcover available only in the US (Rugby Smart / Pro <-- with ICS!).
From the technical side, I don't know. Even the source code of the firmware is available at opensource.samsung.com. The Bootloader seems pretty much unlocked.
For me, the xcover is the best phone ever, it takes so much abuse. Maybe someday someone will port a newer ROM from the Ace/Gio/idk. It's a shame Samsung abandons their old phones :crying:
xkawer said:
I think there are too less people who have a xcover, and I was actually pretty disappointed when I say there is a successor to the xcover available only in the US (Rugby Smart / Pro <-- with ICS!).
From the technical side, I don't know. Even the source code of the firmware is available at opensource.samsung.com. The Bootloader seems pretty much unlocked.
For me, the xcover is the best phone ever, it takes so much abuse. Maybe someday someone will port a newer ROM from the Ace/Gio/idk. It's a shame Samsung abandons their old phones :crying:
Click to expand...
Click to collapse
I didn't were aware of successor models, now i'm very dissappointed.
I'm downloading these source codes at the moment, i'll check these out.
I'm not a developer, atleast YET..
AFAIK, hardware of s5690 is way different from any other samsung phones,
correct me if i'm wrong..
jonezy82 said:
AFAIK, hardware of s5690 is way different from any other samsung phones,
correct me if i'm wrong..
Click to expand...
Click to collapse
Seems like it's the only one with a Marvell MG2.
Let me know if you do anything interesting with the sources
Just flashed my xcover to XXLJ2 yesterday. At least it seems a bit faster now, but I have a weird bug when scrolling. If I give a list (for example settings) momentum, it doesn't stop when I put my finger on it again. But it does stop if I release the finger the second time.
jonezy82 said:
I'm downloading these source codes at the moment, i'll check these out.
Click to expand...
Click to collapse
Did the same. The GT-S5690_Platform.txt says:
Code:
How to build platform
1. Get android open source.
: version info - Android gingerbread 2.3.6
( Download site : http://source.android.com )
2. Remove external\webkit module in android open source which you got.
And then execute "clean build"
2. Copy files and modules to original Gingerbread source tree (overwrite)
3. build
- ./build.sh user
So wouldn't it be possible to download the JB sources, and compile them with the original kernel? Would be so cool.
Edit: It seems you need device specific binaries (drivers) since ICS. see: http://www.freeyourandroid.com/guide/compile-ics
Found a git https://github.com/manakeri/android_device_samsung_xcover, there is a
Code:
cyanogen_xcover.mk
file, this seems interesting. Apparently someone is trying to port it.
Edit2: In this git, there is also a "extract-files.sh"-file, which is neccessary to pull the proprietary files from the phone! With this I think we actually have everything we need to compile ICS/JB, like in the "freeyourandroid" tutorial.
I have never done this before, but someone must try it lol.
Oh look, there are more people who care about it!
http://www.droidevelopers.com/f338/14412-gt-s5690-opensource-kernel-available.html
Someone discovered my link and made a overclock kernel from the sources! This is so cool.
I hope we are going to see more :good:
xkawer said:
Oh look, there are more people who care about it!
http://www.droidevelopers.com/f338/14412-gt-s5690-opensource-kernel-available.html
Someone discovered my link and made a overclock kernel from the sources! This is so cool.
I hope we are going to see more :good:[/QUOTE
I own an xcover too a developer on another forum looked at some files i pulled using adb to try to port clockworkmod but no success. Told me the files i sent weren't standard android img but he would continue to look into it. Apparently the teamhacksungs goal is to port cyanogenmod for every Samsung device surely they can get it done. I've been waiting a long time to see some development for the awesome xcover
Click to expand...
Click to collapse
If its possible on the galaxy mini its got to be possible on xcover!. Ive tried to get involved and learn to port cyanogenmod but when it comes to git, repo, source tree, source code e.t.c e.t.c its a bit behond me for now.
Step in the right direction it seems. Fingers crossed

How do I develop an image for my Samsung Galaxy Note 3 from the Samsung Source Code?

I have a Samsung Galaxy Note 3 which I want to build an image for. I followed the procedures given by http://wiki.cyanogenmod.org/w/Build_for_hlte#Prepare_the_device-specific_code and I was able to compile it successfully. But I have an issue, and that is I need to patch the code to get additional functionality. The patch I need to apply is only available for Jelly Bean, and the Cyanogenmod procedures use Kitkat. I tried to manually apply the patch, and I had to remove a number of lines before the image compiled. But when I flash the phone with it, I get an error about NFC adapter. Basically the message says that NFC adapter is disabled. I think I know why it says that. The patch is for allowing extended functionality of NFC adapter, and well you know...It seems like either me or the patch broke the NFC adapter. Most likely it was me I tried to download the Jelly Bean version from Cyanogenmod repo, but the procedures explicitly say not to. And when I tried, I get a repo sync error and the whole thing does not download. So I am trying to do something different. I like to download the phone's source code from Samsung Source code. But that is just the kernel as I understand it. There is a lot of what Cyanogenmod people call "proprietary blob", which they provide a way to extract from the phone. So this is why I am where I am, and I am trying to mix the two together. Please tell me if there is a better way for me. And if not, then I like to know if it is possible for me to replace the Cyanogenmod source that I downloaded from Git repository with the Samsung Source and successfully compile it. I wish I could just download Cyanogenmod's version 10.5; I think they remove the previous version due to resource issues. I am not sure. I have to say Cyanogenmod rocks. My understanding is most developers there and here on this site are really busy. More power to you guys. You are really doing a big service for the open source community. Thank you all.
Thread moved to Q&A.

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.

Willing to build Lineage OS... But will require community help

As there is no interest nor popularity on this device to stimulate a healthy developer community, I have decided to look into ROM building and what is required. I have followed this three part video in explaining how to build Lineage OS from source to a device. I have made it to part two where I download the Lineage OS source code to my Linux work-space. Where I get stuck is adding the source to the ROM. The question now is How do I attach the Lineage OS source code to the kernel source code for this device?
Information sources...
Part 1 https://www.youtube.com/watch?v=iZmjOlUq_3c&t=1s
Part 2 https://www.youtube.com/watch?v=MGI3NSJFtKA
Part 3 https://www.youtube.com/watch?v=AJCgOHtli64&t=153s
Current Kernel source code from Asus https://www.asus.com/ca-en/Phone/ZenFone-4-ZE554KL/HelpDesk_Download/
Just ordered one. I've never built Lineage OS either, but maybe we can work together to figure it out.
I have the lineage OS sorce code ready to compile on my system. I just need to know how to add the nesary kernel with it. Any ideas?
Any progress?
Sent from my [device_name] using XDA-Developers Legacy app
Nope! Unless you have anything to contribute.
someaguy said:
As there is no interest nor popularity on this device to stimulate a healthy developer community, I have decided to look into ROM building and what is required. I have followed this three part video in explaining how to build Lineage OS from source to a device. I have made it to part two where I download the Lineage OS source code to my Linux work-space. Where I get stuck is adding the source to the ROM. The question now is How do I attach the Lineage OS source code to the kernel source code for this device?
Click to expand...
Click to collapse
I also looked into building Lineage, seems like it's going to be more than I'm willing to commit to, so I'll share what I found in hopes that it will help you or anyone else move forward with this.
I found this restored CM wiki page on the subject: fat-tire.github.io/porting-intro.html (Sorry, can't make it clickable since I'm new)
The gist seems to be that you need to make three directories in the lineage source (note z01kd appears to be the codename for the Zenfone 4 based on the build.prop file I pulled from my phone)
device/asus/z01kd - Device file tree
kernel/asus/z01kd - Kernel
vendor/asus/z01kd - Proprietary blobs
In the above CM guide, it says to use ./build/tools/device/mkvendor.sh to generate the Device file tree from a boot.img file extracted from an update.zip (from Asus) or extracted from the phone, but that didn't work with the version I was trying to do (15.1), mkvendor.sh wasn't there at all. So I explored option #2 which was to fork an existing device file tree repo from a similar device and tweak it for the device you want to port and I found that the Zenfone Max Pro M1 (X00TD) (github.com/LineageOS/android_device_asus_X00TD) is the closest lineage supported device that we could copy from (at least that I could find). It looks like you might even be able to use the same kernel as that device (github.com/LineageOS/android_kernel_asus_sdm660) because the SOCs are pretty close (Snapdragon 630 vs Snapdragon 636), but you may need to use the stock kernel that you linked to in your original post, not sure.
There's a part in the lineage docs about building from source (only for supported devices) (wiki.lineageos.org/devices/X00TD/build#extract-proprietary-blobs) about extracting proprietary blobs (wiki.lineageos.org/extracting_blobs_from_zips.html) for the vendor/asus/z01kd folder. It said that you could use a lineage update.zip, but I was able to do it with the Asus update.zip. Don't know if that will work or not, but it seems like the only option since the Zenfone 4 doesn't have a lineage update.zip to pull proprietary blobs from.
And that's about as far as I got
Once you have those three folders set up and properly configured you should in theory be able to build it.
Update 9/3/2018
I just found the device file tree and kernel for Zenfone 4 that @shakalaca used to build TWRP. Looks like there are some different naming conventions from what lineage would expect (omni_Z01K.mk vs lineage.mk), but a lot of the stuff looks to be the same (eg BoardConfig.mk) and the files that do have a different name look like they're roughly equivalent.
github.com/TeamWin/android_device_asus_Z01K - Zenfone 4 TWRP device file tree
github.com/shakalaca/android_kernel_asus_ze554kl - Zenfone 4 TWRP kernel
Between these and the above X00TD device file tree and kernel links, we should be able to get pretty close to a working config.
What if you compile what you have and see if it boots on your device?
someaguy said:
What if you compile what you have and see if it boots on your device?
Click to expand...
Click to collapse
Sorry...I already deleted the environment I had set up, to reclaim the 50+ GB of disk space.
If it's any consolation, I never made it far enough for it to build successfully.
I am trying to build Lineage OS too
In this guide(https://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763)
It says we need three files(device tree,kernel,vendor) to build it.
We have kernel and device tree from github(https://github.com/TeamWin/android_device_asus_Z01K)
but we still need vendor from our device,and the commend under this guide(https://www.isthnew.com/archives/build-lineageos.html) says that we can get vendor files by running "extract-files.sh".
But where can we find that?
(Sorry for my bad English
rol.
try to look here.https://forum.xda-developers.com/pr.../tool-capire-le-treble-terble-vendor-t3774629
I have tried that CLT project,but it didn't work
Maybe use this?
https://forum.xda-developers.com/axon-7/development/tool-party-v0-1-vendor-partition-t3831517

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