Rice University logo
 
Top blue bar image
 

Archive for August, 2013


Latency Numbers Every Programmer Should Know (Berkely)

August 29th, 2013 by mhyun

Latency Numbers Every Programmer Should Know (Berkely)

Processing Binaries

August 29th, 2013 by mhyun

EEL

Processing Bytecodes

August 29th, 2013 by mhyun

apktool to extract bytecodes
dex2jar to convert Dalvik bytecodes toJava bytecodes
BCEL to modify Java bytecodes

Inject touch events

August 29th, 2013 by mhyun

#!/usr/bin/env python

import os

os.system(‘adb shell sendevent /dev/input/event1 3 57 100’)
os.system(‘adb shell sendevent /dev/input/event1 3 48 15’)
os.system(‘adb shell sendevent /dev/input/event1 3 58a 191’)
os.system(‘adb shell sendevent /dev/input/event1 3 53 347’)
os.system(‘adb shell sendevent /dev/input/event1 3 54 482’)
os.system(‘adb shell sendevent /dev/input/event1 0 0 0’)
os.system(‘adb shell sendevent /dev/input/event1 3 57 0’)
os.system(‘adb shell sendevent /dev/input/event1 0 0 0’)

event1 can be changed. Run getevent

Change loglevel

August 29th, 2013 by mhyun

echo 3 > /proc/sys/kernel/printk
The number, 3, can be changed.

Android cgroup

August 29th, 2013 by mhyun

/dev/cpuctl –> /apps –> /bg_non_interactive

Diable cpu DVFS

August 29th, 2013 by mhyun

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

Disable a CPU core

August 29th, 2013 by mhyun

echo 0 > /sys/devices/system/cpu/cpu1/online

Where, ‘cpu1’ can be replaced with ‘cpu0’.

Make the device writable

August 29th, 2013 by mhyun

mount -o remount -rw -t ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system/
The path may be different from device to device

Or, simply type after rooting
adb remount