Archive for category Android

Android debug bridge ADB and Ubuntu permission problem

When adb fails in Ubuntu and start to ask some permissions…

vi /etc/udev/rules.d/51-android.rules and add:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE:="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE:="0666"

hamilton@austin:~$ sudo restart udev
hamilton@austin:~$ adb kill-server
hamilton@austin:~$ adb devices*

Remember to unplug USB cable



Leave a comment

Android ppp script to NXP Modem


# An unforunate wrapper script # so that the exit code of pppd may be retrieved

# this is a workaround for issue

#651747#trap “/system/bin/sleep 1;exit 0” TERM

/system/bin/setprop “net.gprs.ppp-exit” “”
/system/bin/log -t pppd “Starting pppd”
#/system/xbin/pppd $*

# pppd was put into /system/bin instead of /system/xbin after SDK1.6#/system/bin/pppd /dev/ttyACM0 115200 mru 1280 mtu 1280 nodetach debug dump defaultroute usepeerdns novj novjccomp noipdefault ipcp-accept-local ipcp-accept-remote connect-delay 5000 linkname ppp0

/system/bin/pppd user claro password claro defaultroute /dev/ttyACM0 debug ipcp-no-addresses noipdefault noauth novj noccp usepeerdns asyncmap 0 hide-password lcp-echo-failure 4 lcp-echo-interval 30 modem noauth proxyarp linkname ppp0


/system/bin/log -t pppd “pppd exited with $PPPD_EXIT”

/system/bin/setprop “net.gprs.ppp-exit” “$PPPD_EXIT”

Leave a comment

Slackware 13 64 bits and PHP 5.2.x

Sometimes php complains about a missing mysql lib even if your mysql is perfectly installed, to solve this in slackware proceed this way:

Install the following packages:


tar xvfj php-5.x.x.tar.bz2

cd php-5.x.x

#Change the paths if you need

./configure  –with-apxs2=/usr/local/etc/httpd/bin/apxs –with-config-file-path=/usr/local/etc/httpd/conf –with-mysql=/usr/local  –with-openssl –enable-calendar –enable-ftp –with-mcrypt –enable-gd-native-ttf –with-jpeg-dir –with-gd=/usr/local –with-png-dir=/usr/local –with-zlib-dir=/usr/local –enable-mbstring –with-curl=/usr/local/bin/curl –enable-sockets –with-pdo-mysql=shared


make install


Leave a comment

Step by step to create/modify ramdisk.img

Benno’s blog has an article to change the ramdisk image, I tried it and give more details here.

ramdisk.img is included in the google android sdk, it exists in folder $SDK_ROOT/tools/lib/images/ramdisk.img. The ramdisk.img included in the google android sdk is a gzipped ramdisk.cpio file.

Here is the steps:

  1. Upload the ramdisk.img to your linux machine
  2. Change the ramdisk.img name to ramdisk.cpio.gz, and extract it by: # gzip -d ramdisk.cpio.gz
  3. Create a temporary folder, say tmp, copy ramdisk.cpio to tmp folder
  4. Extract the ramdisk.cpio in the tmp folder with command: # cpio -i -F ramdisk.cpio
  5. Remove the ramdisk.cpio in the tmp folder, and make any changes you want to the extracted ramdisk.cpio in tmp folder
  6. Recreate the ramdisk.cpio with command: # cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpio

Some notes:

  1. I change ramdisk.img to ramdisk.cpio.gz, and unzip it. It is because I find the -z parameter is not supported with my cpio. I tried the latest cpio (2.9), it doesn’t work too.
  2. Check cpio version by # cpio –version. I’m using cpio version 2.4.
  3. Find the latest cpio (v 2.9) on site: gnu cpio
  4. Notice that in step 6, the command includes two O’s. First o is lower-case, second is up-case.
  5. Notice in step 6, please remain ramdisk.cpio in up folder of tmp folder. The command need it there.

Read the original at :