2011年5月16日 星期一

解開.gz檔

不是.tar.gz 是.gz而已

用gzip就可以解壓縮了 (可用gzip -h來查詢用法)

ex:
gzip -d xxx.gz

2011年5月9日 星期一

android dev phone 1 升級到2.2

台灣買的HTC magic可以參考 http://cdroid-aboutandroid.blogspot.com
(強者我學弟寫的東西 XD)

至於從Google買的android dev phone 1
好像就不能用這個方法
(我也不知道為什麼 囧)

後來找到這篇
http://wiki.cyanogenmod.com/index.php?title=Full_Update_Guide_-_Android_Dev_Phone_1

基本上只要按照他的步驟就可以成功了

================以下是備份 XD====================
這邊只講CyanogenMod 6的部份 其他版本請參考原網頁

1. 抓Amon_Ra 1.7.0 for CyanogenMod 6: 這個

2. 按返回鍵開機 進入fastboot mode
(以下fastboot不會使用可以參考強者我學弟的網誌 他有懶人包可以抓)
fastboot flash recovery recovery-RA-dream-v1.x.x.img
fastboot reboot

3. 抓 radio 檔案 2.22.19.26i
存到SD卡的根目錄

4. 按home開機進入recovery mode
選Flash zip from sdcard. 按剛剛那個檔案 弄完之後重開機

5. 抓CyanogenMod 6 (6.1.0-DS) 檔案連結
還有Google app的檔案 (就是market那些) 檔案連結
把這兩個存到SD卡的根目錄

6. 按home開機進入recovery mode
先Wipe -> Wipe data/factory reset & Wipe Dalvik-cache
再選Flash zip from sdcard.

選完update-cm-6.1.0-DS-signed.zip之後
再選gapps-mdpi-tiny-20101020-signed.zip

這樣就刷完了 就變成CyanogenMod 6了 科科

--

只是預設桌布我不是很喜歡 囧

長按桌面就可以去選桌布 XD

2011年5月6日 星期五

查詢資料夾使用空間

du -s -h 資料夾名稱

----

今天用df -h查詢時 發現系統只剩1G而已 囧....

然後用這個指令一個一個查資料夾 好累...orz

最後發現是 /var/cache/logwatch 佔了19G的空間 = =+

2011年4月27日 星期三

查詢開機時間

uptime

--

Fedora, openwrt都可以查 XD

2011年4月25日 星期一

udhcp

後面要記得接-i這個參數

ex: udhcp -i ath0


root@OpenWrt:/etc/wing# udhcpc -h
udhcpc: option requires an argument -- h
BusyBox v1.18.4 (2011-04-23 14:11:18 CST) multi-call binary.

Usage: udhcpc [-fbnqoCR] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE]
[-H HOSTNAME] [-V VENDOR] [-x OPT:VAL]... [-O OPT]...

-i,--interface IFACE Interface to use (default eth0)
-p,--pidfile FILE Create pidfile
-s,--script PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.scr)
-t,--retries N Send up to N discover packets
-T,--timeout N Pause between packets (default 3 seconds)
-A,--tryagain N Wait N seconds after failure (default 20)
-f,--foreground Run in foreground
-b,--background Background if lease is not obtained
-n,--now Exit if lease is not obtained
-q,--quit Exit after obtaining lease
-R,--release Release IP on exit
-S,--syslog Log to syslog too
-O,--request-option OPT Request option OPT from server (cumulative)
-o,--no-default-options Don't request any options (unless -O is given)
-r,--request IP Request this IP address
-x OPT:VAL Include option OPT in sent packets (cumulative)
Examples of string, numeric, and hex byte opts:
-x hostname:bbox - option 12
-x lease:3600 - option 51 (lease time)
-x 0x3d:0100BEEFC0FFEE - option 61 (client id)
-F,--fqdn NAME Ask server to update DNS mapping for NAME
-H,-h,--hostname NAME Send NAME as client hostname (default none)
-V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION')
-C,--clientid-none Don't send MAC as client identifier

2011年4月22日 星期五

turnoff Firefox "Work offine"

enter:
about:config

search in filter:
networkmanager

toggle this:
toolkit.networkmanager.disable

ref:
http://ubuntuforums.org/showthread.php?t=851542

--

Fedora 10

2011年4月19日 星期二

打指令設定時間

先用date這個指令

date 月日時分年

ex: date 070811592010 = 設定時間為 7/8 11:59 2010

設定完之後再打 hwclock -w 寫入bios


ref:
http://linux.vbird.org/linux_server/0440ntp.php#date

2011年4月17日 星期日

科科

裝wing時看到這個錯誤訊息

Your C++ compiler (g++) is not a GNU C++ compiler!
Either set the 'CXX' environment variable to tell me where
a GNU C++ compiler is, or compile at your own risk.
(This code uses a few GCC extensions and GCC-specific compiler options,
and Linux header files are GCC-specific.)


configure: error: C++ preprocessor "/lib/cpp" fails sanity check

--------------------

解決方法是:

apt-get install g++

--

沒裝g++ = ="

2011年4月12日 星期二

奇怪的Fedora

剛剛裝了Fedora 13 結果網卡怪怪的 開機時無法自動啟用 (我明明都設定好了 = =")

之前lab好像也有人遇到這類問題 都是開機時網路無法自動啟用 要本機登入設定網路才行

剛剛想到一個土法煉鋼的方式解決 科科科


編輯 /etc/rc.local

然後加上這幾個
ifconfig eth0 192.168.0.5 netmask 255.255.255.0
route add default gw 192.168.0.1
ifconfig eth0 up

以後開機就會自動執行這幾行指令 然後網路就設定好了 XD

更改android 1.6版的 market登入用帳號密碼 (for 1.6)

這個是很舊的版本, 1.6的 (HTC magic)

現在的android應該不能用這個方法了 XD

----------------------------------------------------------

之前拿lab手機 要登入market時叫我輸入密碼

密碼又不是我的 最好我會知道啊 XD

大部分查到的資訊都是要回覆出廠設定


後來照著這篇的步驟就成功變更帳號了
http://www.shekhargovindarajan.com/google/android-how-to-change-the-google-account-without-a-hard-reset/

不用回覆出廠設定 XD


簡單說:
1. 去setting
2. Applications -> Manage Applications -> 進入Google Apps, 選Clear data
3. 進入Data synchronization, 選Clear data

然後就可以換帳號了 XD