Tuesday, January 24, 2012

Android - Hotplug Off (Multi-Core enable)

If your device has root permission

adb shell stop mpdecision
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
or
# stop mpdecision
# echo 1 > /sys/devices/system/cpu/cpu1/online
# ...

xda - developers


update 1/31

Support for hot-pluggable CPUs
CONFIG_HOTPLUG_CPU=y
or # CONFIG_HOTPLUG_CPU is not set

Wednesday, January 4, 2012

Enable bootchart in the Android

In the Android source code

STEP 1. ----------
In the device side
1. enable bootchart flag
$ export INIT_BOOTCHART=true
2. and build the Android source code
3. After flashing binary
$ adb shell
$ mkdir /data/bootchart
$ echo 60 > /data/bootchart-start
(It means that bootchart log will be saved until 60 seconds)
$ exit
(exit adb)
4. reboot device
$ adb reboot
You can find some log files in the /data/bootchart/ directory

Tip.
- You can find "bootchart.c & bootchart.h" under the ../init/ directory.
- In the same directory there is a Android.mk file.
INIT_BOOTCHART is used in this make file.


STEP 2. ----------
In the linux system side
install bootchart
$ sudo apt-get install bootchart


STEP 3. ----------
after getting bootchart log files

1. copy log files from the Android device to Linux system
$ adb push /data/bootchart/.
2. compress the all log files
$ tar -czf bootchart.tgt *
3. run bootchart
$ bootchart bootchart.tgz
$ ls
bootchart.png bootchart.tgz


* If you meet the error message,
" ZeroDivisionError: flat division by zero"
Please refer to below site: Error while extracting bootchart.tgz and patch the script files.