cucumber
robitium
bitbar
aapt
monkey
AAPT - Android Asset Packaging Tool
- Usage:
- aapt l[ist] [-v] [-a] file.{zip,jar,apk}
- List contents of Zip-compatible archive.
- aapt d[ump] WHAT file.{apk} [asset [asset ...]]
- permissions Print the permissions from the APK.
- resources Print the resource table from the APK.
- configurations Print the configurations in the APK.
- xmltree Print the compiled xmls in the given assets.
- xmlstrings Print the strings of the given compiled xml assets.
- aapt p[ackage] [-f][-u][-m][-v][-x][-M AndroidManifest.xml] \
- [-I base-package [-I base-package ...]] \
- [-A asset-source-dir] [-P public-definitions-file] \
- [-S resource-sources] [-F apk-file] [-J R-file-dir] \
- [raw-files-dir [raw-files-dir] ...]
- Package the android resources. It will read assets and resources that are
- supplied with the -M -A -S or raw-files-dir arguments. The -J -P -F and -R
- options control which files are output.
- aapt r[emove] [-v] file.{zip,jar,apk} file1 [file2 ...]
- Delete specified files from Zip-compatible archive.
- aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
- Add specified files to Zip-compatible archive.
- aapt v[ersion]
- Print program version.
- Modifiers:
- -a print Android-specific data (resources, manifest) when listing
- -c specify which configurations to include. The default is all
- configurations. The value of the parameter should be a comma
- separated list of configuration values. Locales should be specified
- as either a language or language-region pair. Some examples:
- en
- port,en
- port,land,en_US
- If you put the special locale, zz_ZZ on the list, it will perform
- pseudolocalization on the default locale, modifying all of the
- strings so you can look for strings that missed the
- internationalization process. For example:
- port,land,zz_ZZ
- -d one or more device assets to include, separated by commas
- -f force overwrite of existing files
- -j specify a jar or zip file containing classes to include
- -m make package directories under location specified by -J
- -u update existing packages (add new, replace older, remove deleted files)
- -v verbose output
- -x create extending (non-application) resource IDs
- -z require localization of resource attributes marked with
- localization="suggested"
- -A additional directory in which to find raw asset files
- -F specify the apk file to output
- -I add an existing package to base include set
- -J specify where to output R.java resource constant definitions
- -M specify full path to AndroidManifest.xml to include in zip
- -P specify where to output public resource definitions
- -S directory in which to find resources
- -0 don't compress files we're adding
Android instruction and Android Emulator parameter
在android-sdk-windows-1.1\tools執行emulator以執行模擬器
加上-skin參數,指定顯示模式為HVGA-L,則可轉為橫向
emulator - skin HVGA-L (480*320,水平顯示)
emulator - skin HVGA-L (320*480,垂直顯示,模擬器預設模式)
emulator - skin HVGA-L (320*240,水平顯示)
emulator - skin HVGA-L (240*320,垂直顯示)
mksdcard 1024M sacard.img
emulator - sdcard sdcard.img
adb push 001.jpg /sdcard (複製檔案到 /sdcard 目錄下)
adb push pictures /sdcard (複製 picture 照片目錄到 /sdcard 目錄下)
adb push mp3 /sdcard (複製 mp3 音樂目錄到 /sdcard 目錄下)
adb shell (Android 模擬器啟動命令列模式)
#cd /sdcard (進入 /sdcard 目錄)
#ls (查看 SD 記憶卡中的檔案)
adb pull /sdcard/001.jpg . (下載 /sdcard 目錄下的檔案)
adb pull /sdcard/pictures . (下載 sdcard 目錄下的 pictures 目錄)
adb shell
#ced /sdcard
#rm 001.jpg (刪除 SD 記憶卡裡的檔案)
#rm -r * (刪除 SD 記憶卡裡所有檔案與目錄)
mksdcard 4096M video.img (製作一個影像檔的 SD 記憶卡)
adb push video.avi /sdcard (從電腦複製影像檔到 SD 卡中)
emulator -sdcard video.img (啟動模擬器並載入 SD 卡)
下載免費的影片播放軟體,ex: Meridian Video Player (iiivpa.apk)
http://sites.google.com/site/eternalsandbox/Home/meridian-video-player
adb install iiivpa.apk (安裝Meridian Video Player)
接下來就可以用裝上去的player播放.mp4、3gp與.wmv三種檔案格式
adb install filename.apk (安裝filename.apk)
adb install -r filename.apk (保留已設定資料,重新安裝filename.apk)
adb -s emulator-5554 install filename.apk (指定安裝 APK 套件在 5554 的 Android 模擬器中)
adb uninstall package
adb uninstall -k package (移除程式時,保留資料)
此package名稱不是安裝APK套裝時的檔名或顯示在模擬器中的應用程式名稱
可以先到/data/data或data/app目錄下,查詢想移除的package名稱
adb shell
ls /data/data 或 /data/app (查詢 Package 名稱)
exit
adb uninstall package (移除查詢到的 Package)
$adb devices (顯示目前有多少個模擬器正在執行)
$adb -s (指定模擬器來操作)
adb -s emulator-5554 install email.apk
$adb install apkfile (安裝 APK 應用程式套件)
adb install email.apk
$adb uninstall package (移除 APK 應用程式套件)
adb uninstall com.android.email
$adb shell (進入 Android 系統指令列模式)
$ls
$dmesg (查看 Android Linux Kernel 運作訊息)
ls - 顯示檔案目錄
cd - 進入目錄
rm - 刪除檔案
mv - 移動檔案
mkdir - 產生目錄
rmdir - 刪除目錄
$adb push (複製檔案到 SD 卡)
adb push mp3 /sdcard
$adb pull . (從 Android 系統下載檔案)
adb pull /data/app/com.android.email
$adb logcat (監控模擬器運作紀錄,以Ctrl + c 離開監控模式)
$adb bugreport (產生 adb 除錯報告)
$adb get-state (獲得 adb 伺服器運作狀態)
$adb start-server (啟動 adb 伺服器)
$adb kill-server (關掉 adb 伺服器)
$adb forward tcp:6100 tcp:7100 (更改模擬器網路 TCP 通訊埠)
$adb shell ps -x (顯示 Android 上所有正在執行的行程)
$adb version (顯示 adb 版本)
$adb help (顯示 adb 指令參數)
emulator -timezone Asia/Taipei (指定時區)
emulator -no-boo-anim (省略開機小機器人動畫畫面)
emulator -scale auto (調整模擬器視窗大小)
emulator - scale factor (factor: 0.1-3.0)
emulator -dpi-device 300 (更改模擬器的解析度,default為 165dpi)
emulator -skin (更改模擬器顯示模式)
emulator -help-keys (顯示鍵盤快速鍵說明)
emulator -shell (相當於adb shell 功能)
emulator -data data.img (使 /data 目錄使用 data.img 的檔案空間)
emulator -sdcard sdcard.img (使 /sdcard 目錄使用 sdcard.img 的檔案空間)
emulator -cache cache.img (瀏覽器暫存檔儲存空間)
emulator -wipe-data (使模擬器恢復到原廠設定)
emulator -help (顯示 emulator 指令參數)
使用 cscope + ctags + taglist 來閱讀sourcecode
ctags + taglist
1) Install ctags$ sudo apt-get install exuberant-ctags
2)Download and install taglist
https://sourceforge.net/projects/ctags/files/
http://vim-taglist.sourceforge.net/
$ unzip taglist_45.zip
#it will generate plugin and doc
$ mv plugin/ ~/.vim
$ mv doc/ ~/.vim
3)turn on/off the taglist in vim
$ sudo vim /etc/vim/vimrc
Add the following line:
map <f9> :Tlist<CR>
4)check the target directory and create the tags
$ ctags -R *.c *.h
OR
$ find 'pwd' -type f -name "*.[ch]" -o -name "*.cc" -o -name "*.[sS]" | sed -e 's/^/"/' -e 's/$/"/' | xargs /usr/bin/ctags -a
5)Open the vim and press F9
#The window will divide by two part, use the Ctrl-W-W to switch the window
#The left window: Jump to the correspond function or definition
#The right window:
Ctrl+]:Jump to function implement position, the cursor should be the function name's front
Ctrl+t:return to the original position
cite:http://stenlyho.blogspot.com/2008/11/ubuntuvim-plugin-ctagstaglist.html
Cscope
Call Graph
CCTree: http://www.vim.org/scripts/script.php?script_id=2368
Subscribe to:
Posts (Atom)