How to build cm13 on i9515 (Samsung s4 Value Edition) [UPDATED]

XDA user “sombree” has ported CM 13.0 on Samsung Galaxy S4 Value Edition (i9515)

In order to build a working rom you need to add a local manifest with the right device configuration and kernel

mkdir .repo/local_manifests
vim .repo/local_manifests/roomservice.xml

Edit the file and add the following XML

<?xml version="1.0" encoding="UTF-8"?>
  <project name="jfvelte-dev/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
  <project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
  <project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
  <project name="jfvelte-dev/android_device_samsung_jfvelte" path="device/samsung/jfvelte" remote="github" />
  <project name="jfvelte-dev/android_device_samsung_jf-common" path="device/samsung/jf-common" remote="github" />
  <project name="jfvelte-dev/android_kernel_samsung_jf" path="kernel/samsung/jf" remote="github" />

Then do a simply

brunch jfvelte

Thanks to Sombree for the hints about roomservice.xml and for the porting, of course 🙂

Source: XDA Forum

A simple Android <-> Arduino Bluetooth project

This is a simple project that use a bluetooth channel in order to connect an Android application with an Arduino.
The aim of this sample is:

  • Learn how Bluetooth serial channel works
  • Learn how to configure a bluetooth device on Android
  • Send a string from Arduino to Android (in this example the value of light sensor)
  • Send a byte from Android to Arduino (in this example the LED ON-OFF status)

The Arduino schema is very simple



I’ve used an HC-06 bluetooth adapter, the cheapest (and slower) available on ebay. You can find the source code of the android application and Arduino Sketch file on my GITHUB repositories.

Now I’m ready to add bluetooth feature on my “HomeTemp” project.


HOWTO – Debug an AOSP – CM java application

Just a little reminder for the future

Run DDMS and select the process that you want to debug (for example,

Now, in eclipse, you can attach to the emulator or device:

  1. Run > Open Debug Dialog…
  2. Right-click “Remote Java Application”, select “New”.
  3. Pick a name, i.e. “android-debug” or anything you like.
  4. Set the “Project” to your project name.
  5. Keep the Host set to “localhost”, but change Port to 8700.
  6. Click the “Debug” button and you should be all set.

Note that port 8700 is attached to whatever process is currently selected in the DDMS console, so you need to sure that DDMS has selected the process you want to debug

Start android AOSP – CyanogenMod development : the firsts steps

I’m still waiting for my 9$ Arduino…some mistake in Hong Kong customs procedure has generated a huge delay in shipment.

But finally I found an “idea” for some Cyanogen development, and I want to share here the steps that I’m doing.

The Goal

At work I’m working on a feature that requires frequent “Force stop” and “Clear data” during the debug and development phase. I want to improve the “Application info” popup menu on the notification area (long click on the app notification) in order to add two new item: “Force Stop” and “Clear data”.

The Player

    • At the moment the Nexus S is not available, so I will use the ugliest android phone ever seen: the Motorola Defy (MB 526), aka “Jordan” – specs (From GSM arena)


    • I will use the CyanogenMod fork by Quarx2k, based on Android JB 4.1.2 – XDA forum post
    • My old development machine @ work – a Dell studio XPS with Ubuntu 12.04 LTS


Step 0 : setup the development environment

Simply follow the post on XDA forum. After a few hours you should have your standard build from JB sources

Step 1 : setup a new github repo

I need to modify the “frameworks/base” project, because the notification area sources are in “frameworks/base/packages/SystemUI” folder.  Simply go to “” and fork this repository. My forked repo location is “

Now you need to add a “local_manifest.xml” in your .repo/local_manifests folder, in which you must define the new repository:

<?xml version="1.0" encoding="UTF-8"?>
   <remove-project name="Quarx2k/android_frameworks/base"/>
   <project remote="github" path="frameworks/base" name="sarbyn/android_frameworks_base_jordan" revision="jellybean"/>

A simple explanation (from CM wiki)

  • remote — the name of the remote. this can be one that was defined in either the regular manifest or local_manifest.xml.
  • name — the name of the git project– for github it has the format account_name/project_name.
  • path — where the git repository should go in your local copy of the source code.
  • revision — (OPTIONAL) which branch or tag to use in the repository.

Now you are ready to “repo sync” your source tree.

Step 2 : start editing

Before you change anything you need to start a new git branch. Go into the main project folder and do a “repo start banchname frameworks/base“. Now you are ready to modify the code in a new git branch.

Step 3 : build

When all the development is done, do a full build with the standard procedure

source build/ && brunch mb526
make -j# bacon

# represents double the cores you have on your computer

Step 4 : commit and push on github repo

Enter in frameworks/base and check the repo status with git status. Add all the modified files with the standard git add FILENAME and commit the changes with git commit -m ‘message’. Now you are ready to upload the new git branch on server git push -u github branch_name

Step 5 : backup & install

The last step is very simple: go into recovery mode and do a full Nandroid backup. After that you can flash your build and try if it works 🙂