2010年3月15日 星期一

Android Debug Bridge

adb 叫做 android debug bridge (adb)

http://developer.android.com/guide/developing/tools/adb.html

Querying for Emulator/Device Instances
-- adb devices

Installing an Application
-- adb install

Copying Files to or from an Emulator/Device Instance
-- adb pull
-- adb push foo.txt /sdcard/foo.txt

Other Shell Commands
-- adb shell ls /system/bin

Enabling logcat Logging
--adb logcat

how to enable telnet in windows 7 platform?

W7 把 Telnet 預設是關掉,
所以想要用 Telnet 這個功能就要去把它打開才行!
底下就來說明如何在 W7 中使用 Telnet 功能啦!

1.到『控制台』>『所有控制台項目』>『程式和功能』>『開啟或關閉Windows功能』

找到 tenet client option and enable it !

how to install Sensor Simulator in the android emulator ?

how to enable emulator control
>> goto window > show view > emulator control

===

經過測試. 這個 sensor simulator 只能夠在 1.6 的版本下面work. android 2.1 看起來好像是沒有辦法用的.
http://code.google.com/p/openintents/wiki/SensorSimulator

http://blog.sina.com.cn/s/blog_63be4ef30100gcp1.html


啟動 android emulator (1.6)
1. 先去 c:\nelson  下面找一個 folder
C:\nelson\sensorsimulator-1.0.0-beta1\bin

2. 輸入 adb install SensorSimulatorSettings.apk 就可將apk安裝到 android emulator 中了
3. 啟動程式 (double clik sensorsimulator.jar 檔案).
4. 依照 sendorsimulator 中的 ip address andport number 輸入到 android 程式中. 就可以模擬 g sensor 的活動了

2010年3月13日 星期六

how to operat eclpise android development platform

http://code.google.com/p/androidbmi/wiki/AndroidUI

have you ever get into an error like this ?

project "XXX" is missing required source folder : "gen" .

on eclipse IDE, just right click and delete "gen" folder in your packaged explorer and build project again. it should fix the problem like this.

android SDK 1.5 project is no problem. but android SDK 2.1 project have problem.

==== question 2 about main.xml .
@string means the "real" string located at strings.xml under values folder

< main.xml >

android:text="@string/hello"

==== 要如何 debug/run android app ?
0.android create avd --target 1 --name eclair
1. android list target
2. android list avd (if it did output something means 模擬器已完成建置)
3.  android delete avd --name XXXXX (刪除某個已經建置的 avd)
4. 移除程式 adb shell,
cd data/app
list (should see something here)
rm com.example.android.apis.apk

5. how to run avd ? please goto eclipse android SDK and AVD manager, pick AVD that you create and click start button to run it.

6. how to run android source code in AVD ? open eclipse project. right click project name, choose run as android application menu