ErVidic

General CyanogenMod Porting Discussion

128 posts in this topic

CM is a great mod, but as of now with the large number of different Android phone models, CM only works on a couple of models, that is unless you port it.

* So the CyanogenMod source is hosted over at GitHub, here

* If you're new to the whole AOSP (Andriod Open Source Project), you should start over at the AOSP page, here

You can get up to speed with everything to do with handling the source there, and also porting!

--- From this point am assuming you have knowledge from the AOSP page on handling the source and debugging the system ---

So what do you require to get CM over to your device? (apart from the CM source)

Its hard to speak for all devices, but I would suggest

- A working android rom/system (preferably stock and same android version as the port you want to make)

You would need a working rom/system to learn how different parts of a working build work, identify different/propriety/special files, extract binary blobs etc etc...

- common sense/reasoning ;)

Chances are, if you just make a generic build of CM and bundle it with the kernel from a working rom/system, it will boot into CM, hopefully to the standby screen.

Unless you know exatcly what you need to modify/change in the source or build, this would one of the suitable ways to go if your starting out. (You'd be very lucky if your device manfuacturer have your device/part sources released. )

From the generic build, booted into, you should be dot down everything that is'nt working and everything that is. Some notable things to always check would be the list below System on this page and see if they are working.

If a build fails to boot into an operative state, you can always callup the debugging tools to see what went wrong. Here is where common sense/reasoning would come in. Most issues can be easily understood/solved if you study the debug output well enough.

There are too many situations that an issue can arise, and you may find yourself alone a lot.

Most of the time the paining issues that you hit (concerning the system) will have to do with the /system/lib folder.

- broken libraries,

- missing libraries,

- wrong libraries,

- right libraries but wrong dependancies,

- right dependancies but wrong libraries... and the list would go on.

Trust me when i say your debugging tools will save you a lot of time, I constantly use

- ddms/logcat/dmesg

- strace

- the arm-eabi-* set

Porting can take time, with a lot of bugging.

Of course, with time, and customizing your build for a device, it'll be not so generic.

Building a kernel and adding several enhancements like OC and modules would follow suit.

Its best to share your builds, source with the community,

That way your build can get attention, more devs, and also help out other device ports with similar to yours.

Feel free to add tips, guidelines, info, corrections... the like

Edited by ErVidic
adhill and strider2011 like this

Share this post


Link to post
Share on other sites

I am also interested to know this. The following is from what I've read so far. I really really hope someone can correct me or add additional info:

From device:

  • Source code for internal devices like display, touchscreen, accelerometer, gps so you can recompile it for the kernel version that CyanogenMod 6 uses.
  • Failing that, the compiled drivers for said devices from your filesystem but this limits you to whatever CyanogenMod release that uses the same kernel version. If your device originally has Donut, you should be able to port CyanogenMod 5.08.

From CM:

  • SoC support in the kernel. If it's not there because the SoC manufacturer didn't submit any patches to AOSP then you're out of luck.

Can someone explain how to pull older releases using git? Just found out about using branches from Google.

Edited by AlanMN
mikeyggg likes this

Share this post


Link to post
Share on other sites

I'm interested too.

From a broader perspective, is there a mailing list or forum I can use as a developer knowledge base?

All the forums here, including IRC, appear end-user support oriented.

The Wiki provides some help for setting up the environment (which I've done) but little guidance for starting a port.

At a minimum, I would like to browse past similar projects to understand how much effort is required.

I'm hesitant to dive in and start hacking without understanding the road map.

Share this post


Link to post
Share on other sites

Here are the questions I have accumulated during my research this week.

Is there a mailing list or forum where these discussions take place? (I could not find answers by searching)

I already have

• The phone, with root access and the ability to load through adb/recovery (From SDX developers)

• All the source code in one place, including the Samsung patches

• A build environment good enough for making emulator ROMs and test kernels

• More than enough industry experience to qualify me for doing this work

Assuming I were to engage in a port:

1. How much effort is typical to get a port to a Beta and full release

2. Are any working devices in the CM portfolio using the S3C6410 SOC (ARM1176JZF-S Core)

Are there other developers currently working on this platform? Are they making progress?

3. Should I build my prototype on the 6.1 (Froyo) or 7.0 (Gingerbread) branch

How much extra work am I creating for myself developing on "stable", merging into "development" later

4. Can the kernel and user spaces be developed independently of each other

a. Will CM7 (Gingerbread) user space run on top of a Eclair (2.6.29) stock/hacked kernel

If not, what are the specific dependencies preventing this?

b. Conversely, is it practical to get the hardware running under 2.6.36 leaving the stock user space alone

5. What issues can be expected merging vendor patches from Eclair/Froyo up to CM7 branch

6. What pieces in user space need to be tweaked on a per-device basis

In an ideal world, I would expect user space to just “work” once the kernel is done, but I know better :o

7. How does the CM community deal with binary-only (proprietary) kernel modules

I expect I will find some of these as I reverse engineer the stock release

8. I expect I'll be cloning an existing phone and working from there - Which device should I start with?

9. Is there a way to merge the Cyanogen and Google source repositories (I'm maintaining two trees now)

like I can do for the kernel (By tracking multiple remotes inside the same git repository)

10. What regression suite(s) need to be passed before the port is blessed by CM leaders

Edited by martyg

Share this post


Link to post
Share on other sites

First Post

Edited by ErVidic

Share this post


Link to post
Share on other sites

I have used cyanogenmod on many devices the last couple years. I have been reading through the wiki and trying to figure out the process for building Cyanogenmod 7 from source on a Sprint LG Optimus S I picked up to hack on.

It is rooted and running a ported CM from another device. The full source code for the device (froyo) is available from LG and I have it.

My question is about the step in the build process where you extract the files from the device. The wiki says to use adb to extract files from the device using this command:

./extract-files.sh

However it says you must already be running cyanogenmod on the handset.

Is there an option to use the manufacturers source to get needed files instead? I don't want to extract files from the ported CM that is running, I want to build this device from scratch properly.

Thanks for the help.

Share this post


Link to post
Share on other sites
My question is about the step in the build process where you extract the files from the device. The wiki says to use adb to extract files from the device using this command:

./extract-files.sh

However it says you must already be running cyanogenmod on the handset.

Is there an option to use the manufacturers source to get needed files instead? I don't want to extract files from the ported CM that is running, I want to build this device from scratch properly.

Yes, this is exactly what I need to know also and am trying to figure out (unsuccessfully).

How did you get the source files from LG? I emailed them asking for it for my LG Shine Plus and they told me I need to contact "the manufacturer of Android (Google) as they have the files I need", no word of a lie, that's what they told me. After a curt reply and waiting 2 weeks, they told me my message would be forwarded to the phone department, and I'm still waiting.

Have you had any luck in finding anything out on this process? I would really like to know, as I'm sure many others would to.

Thanks.

Share this post


Link to post
Share on other sites

Yes, this is exactly what I need to know also and am trying to figure out (unsuccessfully).

How did you get the source files from LG? I emailed them asking for it for my LG Shine Plus and they told me I need to contact "the manufacturer of Android (Google) as they have the files I need", no word of a lie, that's what they told me. After a curt reply and waiting 2 weeks, they told me my message would be forwarded to the phone department, and I'm still waiting.

Have you had any luck in finding anything out on this process? I would really like to know, as I'm sure many others would to.

Thanks.

In general, you have

The Android Source Code (AOSP) - all your device manufacturers who published an android device used this code (its free and online)

The Linux Kernel - all your device manufacturers also used this code (its aso free and online) but its customized for different devices. Most manufacturers release this code to the public so check the relevant device sites.

Now ./extract-files.sh extracts propriety files (files that are not open-sourced/not in the source tree) from your device that is using a "working" rom! Not from a running cyanogenmod rom for your device, that just would not make sense, otherwise you would just get that running rom and use it as cyanogenmod instead.

So for your sources, you should go to the cyanogenmod github and follow the instructions to get the source. For your kernel, LG should have released it, (most likely). Search for their open source portal site/ developer site/technical site and you'll most likely find something.

For anything else, you should snoop around cyanogenmod's for devices similar to yours (same manufacturer), high chance you can reuse/get helpful info from them

Edited by ErVidic

Share this post


Link to post
Share on other sites

I have a few questions.

I would like to port over CM for the Dell Streak 7. It run Froyo, Would I be able to port over CM 7 or would it have to be CM 6?

Also,

I'm trying to follow the wiki. I did these steps: I already have the sdk and eclipse installed

the Kernel, bluetooth and wpa are here: http://opensource.dell.com/releases/streak7/3.22/

and I also have done a pull /system from my device

I have completed: Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

For 64-bit only systems:

g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

add-apt-repository "deb http://archive.canonical.com/ maverick partner"

Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin

mkdir -p ~/android/system

Install the Repository

Enter the following to download make executable the "repo" binary:

curl http://android.git.kernel.org/repo > ~/bin/repo

chmod a+x ~/bin/repo

NOTE: You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

repo sync -j16

Now I'm up to this part and I'm not sure what to do:

Copy proprietary files

What's the next steps in porting this over?

Share this post


Link to post
Share on other sites

ok.. Well what I did was this. I talked to DJ_steve and he told me to try to do a harmony build

so I did a . build/envsetup.sh

then lunch

I then selected cyanogen_harmony-eng

and then did a make

I got the following errors: any ideas?

1.

Docs droiddoc: out/target/common/docs/doc-comment-check

2.

htmlDir not a directory: out/target/common/docs/gen

3.

DroidDoc took 392 sec. to write docs to out/target/common/docs/doc-comment-check

4.

frameworks/base/core/java/android/content/Context.java:1169: error 1: Unresolved link/see tag "android.net.wimax.WimaxManager WimaxManager" in android.content.Context

5.

frameworks/base/core/java/android/content/Context.java:1477: error 1: Unresolved link/see tag "android.net.wimax.WimaxManager" in android.content.Context

6.

make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45

http://pastebin.com/ZV1u80Di

Share this post


Link to post
Share on other sites

I've been running CyanogenMod on my Evo since the very first nightly was posted, and I'm up for an upgrade in a couple weeks. I'm planning on picking up the Evo 3D when it launches, and I'd like to get involved in bringing CyanogenMod support to the device. I do have experience with development, I've been involved in a small handful of open source projects and am currently finishing up a degree in computer engineering, as well as some Android application development, so I've got some experience, just not with the Android system itself. Any tips on getting started would be great :D

Share this post


Link to post
Share on other sites

Most of the question above are pretty good.

The answer would be awesomw :)

Share this post


Link to post
Share on other sites

Hmm....A whole lot of very useful information..I am new to the world of Android and I really want to root my device, an LG optimus Net( its for the net 10 pay as you go plan), does anyone know if the current ROM for the optimus black would work? I am completely new to this and have no idea whatsoever on how to go the process started or even how to root my phone..I am sorry if this post seems to be ill informed and rather stupid but I am a really quick learner

Share this post


Link to post
Share on other sites

hi,

i have a problem. i have upad e72 (i think :D). the cpu: 1ghz, ram: 512 in webshop, but the device system info: cpu 800mhz, ram: 380mb.

and the problem:

the device not finish loading. i turn on, loading screen is in display (and rolling :D), but the menu does not load.

os: same kind of CyanogenMod, 2.3.x android (root).

ClockworkMod not installed.

what can i do? :(

(sorry for bad english :))

this is: http://goo.gl/tlRO9

Edited by gebana
Zorden likes this

Share this post


Link to post
Share on other sites

Hello,

New to this forum stuff...please accept my apology if this is the wrong forum: Can someone point me in the right direction on how to get CM7 onto my Samsung Droid Charge?

Much appreciated!

Thank you,

MrViloria007

Share this post


Link to post
Share on other sites

Question about the ASUS Transformer:

I see mentioned in the blog CM9 update that the ASUS TF may be supported / included with CM9 which would be fantastic -

Also ASUS has confirmed that ICS will begin FOTA for the TF101 tomorrow which is also fantasic, I, most likely like everyone else wants everything now not tomorrow, and have downloaded the already released ICS FOTA dlpkgfile for the Transformer Prime - my question is, how difficult would it be to port this dlpkgfile from the Prime, and make it compatible with the TF101 ?

Would that be possible, and more to the point, would it be done quicker than the official OTA ?

Thanks, Det

Share this post


Link to post
Share on other sites

Is there any chance to get cyanogenmod on my Motorola Charm MB502?

Thanks!

Share this post


Link to post
Share on other sites

can you tell me how this progress with the samsung galaxy w (i8150) in CW9?

because I saw a video a few days showing the Android 4.0 on galaxy w, this video is true? if yes then the CM9 is already about to be released?

http://www.youtube.com/watch?feature=player_embedded&v=BXVW5RA9HZU

sorry my english is horrible I'm Brazilian...

Share this post


Link to post
Share on other sites

Please any news on a port to the Droid Charge?

Share this post


Link to post
Share on other sites

Please any news on a port to the Droid Charge?

JT on rootzwiki is working on it now almost done.

Share this post


Link to post
Share on other sites

Create a CYANOGEN MOD FOR GALAXY Y PLEASE!!!

Share this post


Link to post
Share on other sites

I have STAR A1000 MTK Clone,Android 2.2.1,Skype didn't work,Can somebody help me,Thanks

Share this post


Link to post
Share on other sites

If somebody from the admin group reads this, please, can you make a C-Mod 7 for GT-S5830i (cooperve)???

Share this post


Link to post
Share on other sites

quick question can cm be ported to a non android os i dunno say Symbian or if anyone knows of SE u8i droid fw

Edited by SteveSkitzo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now