Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

General CyanogenMod Porting Discussion


  • Please log in to reply
94 replies to this topic

#1 ErVidic

ErVidic
  • Members
  • 13 posts
  • Twitter:N/A
  • Country:
    ru - Russian Federation
  • Device Model:
    Huawe U8150 IDEOS
  • CM Version:
    The Queen of Spades (2.2.1 Froyo)
  • Recovery Image:
    Amon_RA

Posted 08 February 2011 - 08:58 PM

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, 19 March 2011 - 07:47 PM.


#2 AlanMN

AlanMN
  • Members
  • 1 posts
  • Device Model:
    LY777 Samsung tablet
  • CM Version:
    No mods
  • Recovery Image:
    Stock

Posted 09 February 2011 - 10:16 AM

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, 09 February 2011 - 10:20 AM.


#3 martyg

martyg
  • Members
  • 4 posts
  • Device Model:
    Samsung Intercept
  • CM Version:
    Stock
  • Recovery Image:
    Stock

Posted 11 February 2011 - 11:58 PM

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.

#4 martyg

martyg
  • Members
  • 4 posts
  • Device Model:
    Samsung Intercept
  • CM Version:
    Stock
  • Recovery Image:
    Stock

Posted 12 February 2011 - 03:28 PM

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, 12 February 2011 - 03:32 PM.


#5 ErVidic

ErVidic
  • Members
  • 13 posts
  • Twitter:N/A
  • Country:
    ru - Russian Federation
  • Device Model:
    Huawe U8150 IDEOS
  • CM Version:
    The Queen of Spades (2.2.1 Froyo)
  • Recovery Image:
    Amon_RA

Posted 12 February 2011 - 08:03 PM

First Post

Edited by ErVidic, 11 March 2011 - 01:23 AM.


#6 Scotty_T

Scotty_T
  • Members
  • 1 posts
  • Twitter:scotttyrrell
  • Device Model:
    LG Optimus S
  • CM Version:
    Ported Cyanogenmod 7
  • Recovery Image:
    Cyanogen

Posted 26 February 2011 - 04:53 PM

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.

#7 cbstryker

cbstryker
  • Members
  • 6 posts
  • Device Model:
    Motorola Milestone
  • CM Version:
    CM7 rc1
  • Recovery Image:
    Stock

Posted 05 March 2011 - 09:10 PM

View PostScotty_T, on 26 February 2011 - 04:53 PM, said:

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.

#8 ErVidic

ErVidic
  • Members
  • 13 posts
  • Twitter:N/A
  • Country:
    ru - Russian Federation
  • Device Model:
    Huawe U8150 IDEOS
  • CM Version:
    The Queen of Spades (2.2.1 Froyo)
  • Recovery Image:
    Amon_RA

Posted 19 March 2011 - 07:58 PM

View Postcbstryker, on 05 March 2011 - 09:10 PM, said:

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, 19 March 2011 - 09:00 PM.


#9 graffixnyc

graffixnyc
  • Donators
  • 17 posts
  • Country:
    us - United States
  • Location:
    New York City
  • Device Model:
    HTC Glacier
  • CM Version:
    CM 7
  • Recovery Image:
    ClockworkMod

Posted 19 March 2011 - 09:28 PM

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.de...s/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?

#10 graffixnyc

graffixnyc
  • Donators
  • 17 posts
  • Country:
    us - United States
  • Location:
    New York City
  • Device Model:
    HTC Glacier
  • CM Version:
    CM 7
  • Recovery Image:
    ClockworkMod

Posted 20 March 2011 - 01:42 AM

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

#11 zachtib

zachtib
  • Members
  • 17 posts
  • Twitter:zachtib
  • Country:
    us - United States
  • Device Model:
    Evo 4G
  • CM Version:
    CyanogenMod 7 RC2
  • Recovery Image:
    ClockworkMod

Posted 22 March 2011 - 02:04 AM

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

#12 RasMouSein

RasMouSein
  • Members
  • 2 posts
  • Twitter:Rasmousein
  • Country:
    ca - Canada
  • Location:
    New-Brunswick
  • Device Model:
    MB200
  • CM Version:
    CM7
  • Recovery Image:
    ClockworkMod

Posted 08 December 2011 - 02:33 AM

Most of the question above are pretty good.
The answer would be awesomw :)

#13 Everett Parker

Everett Parker
  • Members
  • 3 posts

Posted 10 December 2011 - 02:02 AM

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

#14 gebana

gebana
  • Members
  • 1 posts
  • Country:
    hu - Hungary
  • Device Model:
    UPAD E72
  • CM Version:
    ??
  • Recovery Image:
    Cyanogen

Posted 20 December 2011 - 10:49 PM

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 :))




Spoiler

Edited by gebana, 20 December 2011 - 10:50 PM.


#15 MrViloria007

MrViloria007
  • Members
  • 1 posts
  • Device Model:
    SCH-I510
  • CM Version:
    2.3
  • Recovery Image:
    TWRP

Posted 21 December 2011 - 04:11 PM

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

#16 Detection

Detection
  • Members
  • 5 posts
  • Country:
    us - United States
  • Device Model:
    ASUS Transformer TF101
  • CM Version:
    Eagerly awaiting CM9
  • Recovery Image:
    TWRP

Posted 10 January 2012 - 01:54 PM

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

#17 dodles

dodles
  • Members
  • 2 posts
  • Device Model:
    Motorola Charm MB502
  • CM Version:
    2.1
  • Recovery Image:
    TWRP

Posted 14 February 2012 - 02:29 PM

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

#18 Kelley2011

Kelley2011
  • Members
  • 14 posts
  • Device Model:
    32324
  • CM Version:
    13313
  • Recovery Image:
    ClockworkMod

Posted 14 February 2012 - 03:25 PM

Posted ImageGood thinking..

#19 petty45

petty45
  • Members
  • 6 posts
  • Twitter:_petty45
  • Country:
    br - Brazil
  • Device Model:
    Samsung Galaxy W GT-I8150
  • CM Version:
    Stock
  • Recovery Image:
    Cyanogen

Posted 28 February 2012 - 05:06 PM

can you tell mehow thisprogress with thesamsunggalaxyw (i8150) in CW9?
because I sawavideoa fewdaysshowing theAndroid4.0 ongalaxyw, thisvideois true?if yesthentheCM9is alreadyabout to bereleased?


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

#20 warsphinx

warsphinx
  • Donators
  • 7 posts
  • Country:
    us - United States
  • Device Model:
    Droid Charge
  • CM Version:
    EP4D TweakStock 1.4
  • Recovery Image:
    ClockworkMod

Posted 19 March 2012 - 05:21 PM

Please any news on a port to the Droid Charge?