Skip to content

Setup for development

Adnan Begovic edited this page Mar 8, 2016 · 9 revisions

1. Download and install Android Studio

Find the Android Studio download for your OS here

2. Figure out what API level your device supports

To retrieve the API level of the framework on your CM device, run

adb shell getprop ro.cm.build.version.plat.sdk

3. Set up the Android studio project to pull in the sdk jar

You can either download from prebuilts hosted on github or pull directly via Gradle.

Building against release artifacts

Our stable releases are mirrored in Maven Central, and you can fetch the current release by setting your build.gradle dependencies to

dependencies {
    compile 'org.cyanogenmod:platform.sdk:4.+'
}

Building against development snapshots

Within build.gradle make sure your repositories list sonatype OSS repos for snapshots

repositories {
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
}

You can target the future or development branch by setting your dependencies for 5.0-SNAPSHOT

dependencies {
    compile 'org.cyanogenmod:platform.sdk:5.0-SNAPSHOT'
}

Setting up a device

  1. Locate your phone on and download a nightly build from the CM download site.. You'll want a CM12+ nightly build from May 20th or later.

  2. On your device's page, follow the installation instructions to flash the ROM downloaded in step 1 to your device (example)

Please note that not all devices currently support CM