Contents
- 1 I’ve built CM Successfully. What’s Next?
- 2 Enable Developer Options
- 3 Try out submitted, but as-yet unmerged code
- 4 Build with other toolchains
- 5 Mix-and-match git repositories
- 6 Add a translation
- 7 Make Other Original Modifications…
- 8 Submit your changes back to CyanogenMod
- 9 Start a port to a new device!
I’ve built CM Successfully. What’s Next?
In several forums, people have been asking what to do AFTER they’ve completed their builds successfully. What’s next? Once you go from source code to .zip
file, how to make improvements, test code, and create your own modifications?
This page is dedicated to this “What’s Next?” question for new developers.
Note:
Note: This page is very much a WORK IN PROGRESS. Feel free to add to this page
Enable Developer Options
Once you boot your shiny new image, as a developer, you may want to have some more information then a regular user. As of Android 4.2.x the DeveloperSettings are now hidden and are required to be enabled again. This is done by Going into Settings -> About Phone/Tablet Scroll down to the build number tag and tap 7 times on it. That reveals the developer settings once more and allows you to start the development tools from the developer settings.
Try out submitted, but as-yet unmerged code
Here’s a quick walkthrough to pulling and trying out code submissions from Gerrit, the source-review system used by CyanogenMod.org.
After you’ve re-built CM with these experimental changes, you can sign up for Gerrit and offer your comments and any coding improvements.
Build with other toolchains
A toolchain refers to the compiler, linker, and other build tools which together are used to compile Android. There are alleged improvements in file size and/or performance from building with non-standard toolchains.
Mix-and-match git repositories
If you, say, have source code for an app that you want to automatically add to the build, or maybe you’d like to try a different kernel. You can add/remove or swap out the source code so that repo sync
automatically updates from YOUR custom repositories rather than the official one.
You can learn more about adding your own apps here. Or find more info about using a local_manifest to adjust which source code repositories are synced on your computer.
Add a translation
If you are multi-lingual, you can help the project by translating commands and other verbiage into other languages.
You can find a complete guide about translations here: Doc: Translation Guide
Make Other Original Modifications…
First, familiarize yourself with the various directories in the source code. If you are a programmer (or even if you’re just learning), you can look at the files and experiment, changing files and recompiling to see what happens.
If you make a change to a file, you can generally “revert” by issuing the following command from within the directory of the file you changed:
git reset --hard
This should reset all the file change back to the last time you did a repo sync
.
To rebuild only the module which you are changing (ie, the stuff in your current directory), you can usually do this:
mm -B
to rebuild all the files for this module and send the results to $OUT
.
Helpful Tip
Be sure to read Building Basics for a list of must-know commands that will save you hours when playing with the source code.
Submit your changes back to CyanogenMod
Once you’ve made some changes that you think will improve the code, you can submit your code back to CM for inclusion in the next version(s). To do so, check out these instructions on submitting code back via Gerrit.
Start a port to a new device!
One of the best way to learn about Android is to get CM running on a new device that has never run CM before. It’s pretty satisfying to see the CM logo boot up on a new device. If you like, you may find it easier to start with a device that has an older version of Android (CM or otherwise) that hasn’t yet been upgraded to the latest. You might be the one to get the newest version working!
See here for a basic outline of how to get a new port started!
Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.