Compiling xdAuto 1.1.6e

I have just compiled xdAuto 1.1.6e for the head unit NR5002 in my car. I was having an error in the cold boot that stops the radio. No problem in manually opening the radio app.

If the car is shut down while the radio is running, in the boot, it starts by the radio automatically. I often experience "Radio stopped unexpectedly" error. I have opened a bug report in here. One of the guys out there came up with a simple fix.

Just by editing the file Radio/src/com/example/radio/RadioActivity.java

by changin the following lines in protected void onPause() {

stopScan();
unbindService(this);
to
if (radioService != null) {
stopScan();
unbindService(this);
}

and compiling the android system solved my problem. 

I compiled the whole android system after the change. The compilation instructions are as follows for the ones who are interested (I am running ubuntu12.04) :

sudo apt-get install gcc
sudo apt-get install bison
sudo apt-get install g++-multilib
sudo apt-get install git
sudo apt-get install gperf
sudo apt-get install libxml2-utils
sudo apt-get install make
sudo apt-get install python-networkx
sudo apt-get install zlib1g-dev:i386
sudo apt-get install zip
sudo apt-get install flex
sudo apt-get install libncurses5-dev
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer

mkdir ~/Nu3001
mkdir ~/Nu3001/bin
PATH=~/Nu3001/bin:$PATH
cd ~/Nu3001
curlhttps://storage.googleapis.com/git-repo-downloads/repo > /Nu3001/bin/repo
chmod a+x ~/Nu3001/bin/repo

git config --global user.email "nu3001@nu3001.com"
git config --global user.name "nu3001"
repo init -u https://github.com/Nu3001/platform_manifest.git -b master
repo sync

cd ~/Nu3001/kernel
export ARCH=arm
exportCROSS_COMPILE=../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
export UTS_RELEASE="3.0.36+"
make amplified_defconfig
make kernel.img
make modules
sudo make modules_install

cd ~/Nu3001
source build/envsetup.sh
lunch rk3188-eng
make otapackage

After these steps, a zip file is created in ~/Nu3001/out/target/product/rk3188. That zip file can be used to update the whole android system usin TWRP. In my case, I just needed BonovoRadio.apk. So I unzipped the zip file and took that file from there. I just replaced the apk in /system/app folder in my head unit and rebooted. The problem just went awayy!!

Here is a pic of my head unit: