發表文章

目前顯示的是 四月, 2011的文章

Android filesystem remount

須有root權限才可以重新掛載filesystem 指令如下: #  mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system (Replace  /dev/block/mtdblock3  &  /system  with appropriate device path and mount point, as obtained from  cat /proc/mounts )

Mac Command

直接在桌面存個png檔 1) Command + Shift + 3 Capture Whole Screen 2) Command + Shift + 4 Capture Part of Screen 3) Command + Shift + 4 and press Space Bar Capture Objects (Icon, Dock, Menu, Submenu, etc) 擷取在剪貼簿裡 1) Command + Shift + Control + 3 Capture Whole Screen 2) Command + Shift + Control + 4 Capture Part of Screen 3) Command + Shift + Control + 4 and press Space Bar Capture Objects

手機版網頁檔頭宣告設定

手機版網頁檔頭宣告設定 方法一、加在< html >上方: <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" " http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd "> 方法二、加在< title >~ < /title >之間: <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />

Contact Query

Using Intent for Query Contact     public void onCreate(Bundle savedInstanceState) {         super .onCreate(savedInstanceState);                 setContentView(R.layout. main );         Intent intent = new Intent(Intent. ACTION_PICK , ContactsContract.Contacts. CONTENT_URI );         startActivityForResult(intent, 1);     }          @Override     public void onActivityResult( int reqCode, int resultCode, Intent data) {     super .onActivityResult(reqCode, resultCode, data);     if (resultCode == Activity. RESULT_OK ) {     Uri contactData = data.getData();     Cursor c = managedQuery(contactData, null , null , null , null );     if (c.moveToFirst()) {     String name = c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts. DISPLAY_NAME ));     showToastMessage( "Got..." + name); }     }     }

http://sikuli.org/

SIKULI...一個直覺化的視窗操作程式語言 透過擷取螢幕icon的方式作為操作螢幕的腳本... http://sikuli.org/

Install busybox to Android

1. Remount the /system file system adb shell su mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system exit 2. Copy busybox to /data/local/ adb push busybox /data/local adb shell 3. Create /system/xbin folder /data/local/busybox mkdir /system/xbin 4. Install busybox cd /data/local chmod busybox 755 /data/local/busybox cp /data/local/busybox /system/xbin/busybox cd /system/xbin chmod busybox 755 ./busybox --install -s /system/xbin rm /data/local/busybox

A50 remove storage and use symbolic link

1. Remount / as read-write busybox mount -o rw,remount -t ext3 rootfs / 2. Remove storage mount point busybox rm -rf /storage 3. Making symboic link to /sdcard cd / busybox ln -s /sdcard storage

Busybox compile

尚未測試過...   cd busybox-1.15.1   make menuconfig   設定BusyBox為Static link   BusyBox Settings -> Build Options -> Build BusyBox as a static binary (no shared libs)    設定安裝路徑到Android root file system   BusyBox Settings -> Installation Options -> BusyBox Installation Prefix   ${HOME}/S3C6410/android_cupcake_smdk6410/opensource_cupcake_0424_opencore203/out/target/product/smdk6410/system/busybox   Config functions you need...   make   make install From:  http://tw.myblog.yahoo.com/stevegigijoe/article?mid=212  

A50 storage mount point restore

症狀:突然間 A50 的 /storage mount point 不見了 !! ( 簡單的說是 3G 多的內部儲存空間不能用了,導致 Garmin 地圖無法升級,無法使用 …) 1. 首先,找一台 /storage 可以用的 A50 做 storage filesystem 的備份 dd if=/dev/block//vold/179:1 of=/sdcard/storage 2. 然後將備份檔案 copy 到 sd 卡上,並執行回復 storage mount point 的動作 dd if=/sdcard/storage of=/dev/block//vold/179:1 重開機之後,你就會發現 storage mount point 可以用了

JVM GC Information

JAVA_OPTIONS=" -Xincgc -verbose:gc -XX:+PrintGCDetails" Xincgc : 漸進式GC,可以增加GC的效能 verbose:gc, XX:+PrintGCDetails : 顯示GC資訊 http://java.sun.com/docs/hotspot/gc1.4.2/example.html