Hi ! 🙂 Once you have completed downloading cyangenmod mainline source code, next you should get the device specific configuration and kernel source. You are a lucky chap if your device is listed under the available github repositories of cyanogenmod at GitHub (https://github.com/CyanogenMod) . Then you can simply use following commands.
Run the envsetup.sh script at android/system/build folder
Command:$ source build/envsetup.sh
Command:$ breakfast [device_name]
For an example if your device is a Samsung Galaxy S3;
Command:$ source build/envsetup.sh
Command:$ breakfast i9300
In my case things became little bit different. My device here is a Samsung Galaxy W (GT-I8150). Currently CyangenMod GitHub does not contain any repository for this device. So I had to look a different way to proceed from here. With reference to the wiki page of cynaogenmod ( http://wiki.cyanogenmod.org/ ) an alternative to the breakfast command is to build an own local_manifest.xml.
Here at https://github.com/arco I found some git repositories holding device,vendor and kernel files for GT-I8150.
Step 1: Create the local_manifest.xml file inside .repo/localmanifests
- Goto android/system –> Press (Ctrl + H) to view hidden files —> .repo folder will appear
- Go inside the .repo –> you will see two folders called mainfests and local_manifests.
manifests folder—> contains the default.xml
default.xml : “The master list of all the git repositories that together comprise the CyanogenMod source code are defined in CyanogenMod’s default.xml manifest.” Do not change this file.
- Create a new xml file called local_mainfest.xml inside local manifests folder
local_manifest.xml: Add all the new device specific dependencies to this file. This local manifest allows you to customize the list of repositories used in the copy of the source code by overriding or supplementing the default manifest. Thereby you can extend or change the repository without editing the default.xml.
Step 2: Add the new dependencies to the local_manifest.xml file
<?xml version="1.0" encoding="UTF-8"?> <manifest> <remote name="arco" fetch="https://github.com/arco" /> <project path="device/samsung/ancora" name="android_device_samsung_ancora" remote="arco" revision="cm-10.1"/> <project path="vendor/samsung/ancora" name="android_vendor_samsung_ancora" remote="arco" revision="cm-10.1"/> <project path="kernel/samsung/samsung-kernel-msm7x30" name="samsung-kernel-msm7x30" remote="arco" revision="cm-10.1"/> </manifest>
Step 3: Execute repo sync
Command: $ repo sync -j4
- Fetching each new repository included in the local_manifest.xml
Fetching android_device_samsung_ancora
Fetching android_vendor_samsung_ancora
Fetching samsung-kernel-msm7x30
- Completed fetching and syncing repository
Completed syncing… See what you have got ! 🙂
Now lets have a look on what we have got new 🙂
system/device/samsung/ancora
system/vendor/samsung/ancora
system/kernel/samsung
Note: (Possible Errors)
When you run the envsetup.sh script at build folder and follow up breakfast command, if your device does not present in the cyanogenmod github repository you will get an error like following;
So,,,,,,,,,,,,,,,,,,,,
Go ahead create your own local_mainfest.xml file (Y)
Cheers !! 🙂