Saturday, May 11, 2013

Friday, May 10, 2013

Missing "Developer Option" in CM 10.1

After flashing CM 10.1, find the developer option missing

Solution is here:
Settings -> About phone
click "Build number" for several times, the developer option will appear...

I know it sounds like a joke... but try it, it works...

Thursday, May 9, 2013 remote object does not exist

According to the official Cyanogenmod build guide, there is one step called "Extract Proprietary Blobs", in which you have to connect the device with USB and run "" to get those "blobs" from the device.

However, in running the extract-files, it's very often to see output like
remote object '/system/lib/egl/' does not exist
It didn't say it's an "Error", but actually the script will just stop there, leaving the remaining blobs unextracted.

If you thought, oh, only one file does not exists, maybe not a big deal, so you continue to build the framework, it's highly likely that the framework you build will not work properly, due to lack of blobs.

Download a released Cyanogenmod for that device (the same version with the one you are trying to compiling), unzip it to a folder, suppose the folder is "/home/cm"
Then when running the, instead of connecting your device to USB and extracting from device (which is the default behavior if you don't provide any argument to the, you can simply run
./ /home/cm
(replace /home/cm to the folder where you unzip the Cyanogenmod, of course)
Then the will copy blobs from that folder.

If there is still some file missing (e.g. for Galaxy S3), then google it, download it and put it in the right path -- in general, missing blobs is not a good thing, we should avoid it as much as we can, and that's why I commented out the text below, which is a very bad solution.

When I try to follow the wiki page to build Cyanogenmod from source, there is one step called
Extract Proprietary Blobs
in which I need to go to device/samsung/quincyatt folder and execute to get those "blobs" from the device.

In executing the, the script stops and says
remote object '/system/lib/egl/' does not exist
Well, it's not an error, so I thought it happens to be the last file not exists, but actually it's not.
Go to the device folder, and run
grep -lr "" *
I find it's in samsung/msm8660-com/com-proprietary-files.txt, so open that file, search for "", and comment it out, re-execute the script, the script proceeds to extracting more files.

If similar error happens again, just repeat the same process.

Wednesday, May 8, 2013

Error: selected processor does not support ARM mode smc #0

When compiling kernel for SGH-I717, an error occurs:
Error: selected processor does not support ARM mode smc #0

It happens when
CC   arch/arm/mach-msm/scm.o

So following the post and,

open scm.c (since this is the file where the compilation error occurs, as shown in the error message above. You should replace it with the appropriate file in you case, of course) and search for "asm", add the following line

asm(".arch_extension sec\n\t");

before every asm instruction.
Re-compile, it works.

P.S. if same error occurs again for another file, do the same operation for that file.

Samsung Note Model Number

When I try to get the kernel source code from, there is a full list of SGH-I717 models, like

And I'm not sure which one to get.

Google it and find that:
SGH-I717 = AT&T
SGH-I717R = Rogers
SGH-I717D = Telus
SGH-I717M = Bell

Since I'm in US and using AT&T, I should download the one for SGH-I717

Hope this helps if you have the same question : )

Get standalone ARM Toolchain for Android from NDK

This tutorial shows how to get standalone ARM toolchain for Android.

Actaully... you can get standalone ARM toolchain by
$ sudo apt-get install gcc-arm-linux-gnueabi
That's it.. no need to continue reading..

It used to be very complex procedure to build a toolchain, but luckily in NDK, google already prepare it ready for you. Follow the steps below, you will get your standalone toolchain (cross compiler) for ARM in 10min.

1. Download the Android NDK from
    and untar it

2. There is a "toolchain" folder in the ndk, but I find that if I use that directly, there will be errors like:
    stdio.h:50:23: fatal error: sys/cdefs.h: No such file or directory
    If you go to the "docs" folder in the ndk folder, in STANDALONE-TOOLCHAIN.html, it explains in detail how to get a standalone toolchain from the ndk.
    For your convenience, I post the command here:
    First go to your ndk folder
    $ ./build/tools/ --platform=android-9 --install-dir=~/my-android-toolchain-dir

    The --platform=android-9 specify the Android API level you want to support; --install-dir specifies the directory where you want to put the toolchain, if you omit the --install-dir, it will create a tar.bz2 file for you, and you can untar it anywhere you want -- which is better, i think : )
    If you are using 64bit Linux, you will have to add --system=linux_x86_64 in the command above

3. Try to compile a HelloWorld program using the new toolchain, and enjoy!