跳到主要內容

發表文章

目前顯示的是 四月, 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


    publicvoid 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 publicvoid 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); }     }     }

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

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可以用了