porting cm to a new device - whats needed and difficulties - General Questions and Answers

Hey,
i'm just curious about what the title describes. First of all.
What do i really need:
-kernel sources
-binary blobs (extractable)
-recovery / boot.img (extractable)
Let us just talk about the fairphone 2. Additional to the things mentioned we get the full source code of the OS (which i do not need?).
Where do the difficulties lie? For my understanding we just take the kernel sources, the official cyanogenmod (e.g.) source code, the binary blobs and the recovery / boot.img.
How difficult would it be to port Cyanogenmod to the fairphone 2.
Why is it difficult to port a device with existing (again cyanogenmod just as an example) cyanogenmod to a newer Cyanogenmod (Android) version?
I ask this to estimate/evaluate/judge (don't know the right term) the effort needed to do this. I think i'd be able to do that if i put enough work into it (i "speak" c and java), but i just need some answers.
Especially for example why it is more difficult to port Android 6 instead of Android 5 (which is the currently running Android version)
Thanks!
bigCrash

Has nobody an answer? Just one?
Im specifically interested in why it is more difficult to port e.g. cyanogenmod if there is only an older version of stock android and how important the kernel is? Why do we need kernel sources? Can't one just self-compile a kernel.
Where are the limits if i have a device running 4.2. Why can it possibly run 5.1 but not 6? Is the kernel limiting? Or only the effort to realize such a thing.
Thanks!
bigCrash

Related

[Q] Android kernel programming

Hi All
I am a newbi to kernel programming , especially to android kernel.
Can you tell me some good places on the net , that can be great sources for getting in touch with that thing.
I want to become familiar with the android kernel , dalvic etc. ( I speak english and german )
thanks in advance.
Sz_gergo
I am too interested in this subject. I am learning slowly as and when I get time.
kernelnewbies.org
Generally good resource for starting out learning linux kernel
(Which is what the android is built off of)
android.git.kernel.org
Android Kernel Source
lwn.net/Kernel/LDD3/
Online guide to driver development among many other related topics.
pdk.android.com
This guide provides an under-the-hood introduction to the Android platform, and is designed for platform developers and manufacturers building Android-powered devices.
Sorry for not providing the links...xda won't allow me to post links since I have less posts.
Android kernel
Dear All
as i understand, the android kernel source, what you can download from Google , should be enough for building a new kernel to some phone.
If i am right, does that mean that the Linux kernel sources are already included?
Or am i totally wrong?
Thanks for your answers
I am also interested in learning the Kernel Development and ROM development. Can Any one Help.
sz_gergo;11673408 begin_of_the_skype_highlighting 11673408 end_of_the_skype_highlighting said:
Dear All
as i understand, the android kernel source, what you can download from Google , should be enough for building a new kernel to some phone.
If i am right, does that mean that the Linux kernel sources are already included?
Or am i totally wrong?
Thanks for your answers
Click to expand...
Click to collapse
I have the answere for the question above.
After i have inspected the Android kernel sources, it came out, that i have been right.The only source you need for creating a new kernel for a phone, is the complete android kernel.
The linux kernel is allready included.
I think if you want to build a kernel, specific for your phone. you have to overwrite the default dirs with the specific sources of your phone. If it is not allready done by others.
Android Kernel
Hi,
We need to distinguish between Linux and Android. Android was forked from Linux, and now those are managed as separate products. Android usually takes the updates from linux, but there are features in Android which Linux refused to get (such as wakelocks).
So the android kernel source includes all needed to build a working kernel.

[Q] Noob development question

I don't know a whole lot about how android phones work so this is probably a stupid question.
If the android operation system code is open source and available for anyone to download what's stopping people from putting pure AOSP goodness on any given phone? Is it the kernel or bootloader or what?
Fe_Man said:
I don't know a whole lot about how android phones work so this is probably a stupid question.
If the android operation system code is open source and available for anyone to download what's stopping people from putting pure AOSP goodness on any given phone? Is it the kernel or bootloader or what?
Click to expand...
Click to collapse
from my understanding it has to be completely recoded or whatever to run on the hardware of a new phone, I think Cyanogen and crew just supply the base and framework to build on... but yes its out there for anyone to try and port, typically takes a team of devs with different specialties
blazing through on my VZ Droid Charge 4G
Kernel, RIL, and potentially a number of other things.
Just like drivers has to be ported for Linux on any PC (if the company didn't already code one for it), drivers has to be ported to a pure AOSP ROM from a TouchWiz source (which is still Android-based).
Most company-applied UIs to Android are deep in the system, therefore, you can't just take some files and put it into an AOSP ROM and have it magically work (known as kanging from another ROM), but you have to write in some stuff and build it specially for AOSP before it works.

Proprietary Binary Compatibility

Hi all, this is a question that belongs in the dev forums, mod please move if you'd like.
I'm trying to compile a ROM from AOSP source for my tablet and need to get the device's proprietary binaries. What is the success rate of using proprietary binaries from an older version of Android (5.x) on a newer build (7.x)?
My device (T330-NU) only has binaries available for 5.x. Logically I would think that I can't use these on newer Android builds.
If the answer is that I cannot use the binaries from 5.x in my 7.x build then how do unoffical ROMs such as CM14 for my device seem to work? Are these binaries/drivers created from scratch? In these situations do the developers use a generic driver?
tyia
Bump since moved to another forum

Porting B2G to moto g3

Hi Folks,
I'm trying to port B2G to my moto g3. I was referring to this doc (https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Porting_B2G_OS/basics). However some of the things mentioned in this doc are not clear to me. Could you please help me with the below issue.
I'd like to build the AndroidKernel from source. So where should I include the below lines? Is it in this file?
https://github.com/LineageOS/android_device_motorola_osprey/blob/cm-14.1/rootdir/etc/init.target.rc
HTML:
on early-init
start ueventd
import /init.b2g.rc
Also if I understood correctly. building the kernel from source doesn't require to unpack , edit the init.rc file and repack the kernel from the device. Could you please confirm this?
Thanks,
Arun
Hi Arun,
I totally understand your frustration with this. You'd like to contribute to the Servonk project but first you need to port B2G to your phone or buy a new phone. Since the only other supported phones are the Z3 compact and Nexus 5, both of which are still relatively expensive secondhand, you want to use your Moto G3 which means first porting B2G to it.
So, I think there are two options you have:
1. Port direct from the AOSP code
2. Port from the CM12 code.
As Gerard said in telegram, porting from CM to B2G was never finalised so may actually require more work. However there may actually be more people here who can help you since people seem more familiar with CM than AOSP (in general, I know some people are very knowledgeable in both).
I see you've posted in the AOSP 7.1.1 kernel thread. Unfortunately, for the Servonk project you currently need a Lollipop based build, so 5.x AOSP kernel or CM12.x.
It might be worth asking a mod to move this thread into one of the development sub-forums.
As you know, this is the limit of my knowledge, but I really hope you find some success, if would be great if you could contribute to the Servonk project.
Your last option is to use the desktop build of Servonk, based on Glutin instead of Gonk, but I understand that you really want to get Servonk working on your phone.
Best of luck

ROMS for android version beyond 6.0

Hello all,
I have an old ascend mate 7 that a friend gave to me. I was wondering, are there any ROMs (custom or official) for the smartphone that contains an android version beyond 6.0?
I have the mate 7 MT7-TL10.
Thank you
Ok, so I am thinking that I will attempt to compile a version of Android that is above 6.0. However, I do have some questions:
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/che...pment-t2814763) In another guide, I need to setup the jack server? (https://www.digitalocean.com/communi...n-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?

Categories

Resources