adb command
摘要:adb forward:adb forward tcp:6100 tcp:7100 //表示在PC的HOST端创建一个server监听6100端口,pc上的其它应用程序,比如:A,可以以client身份和6100端口server建立连接,之后A发送的所有数据将透明传递到手机端监听7100端口的一个应用程序附录:adb push <local> <remote> - copy file/dir to deviceadb pull <remote> [<local>] - copy file/dir from deviceadb sync [ <
阅读全文
posted @
2012-11-07 16:15
half-acre
阅读(1165)
推荐(0) 编辑
从Ant调用系统命令或外部程序
摘要:最近用到了Ant,发现还是有许多功能是Ant没有提供相应Task支持,而操作系统提供了相应的系统命令。Ant说明书上说了,用<exec>可以调用系统命令,实际操作起来才发现陷阱可不少,一不小心就会掉下去。下面以按日期倒序列举当前目录下文件为例说明。注意我使用的是Ant 1.5.4。对于Windows平台,命令是:dir /o:-d对于Unix(包括Linux,下同)平台,命令是 ls –ltr陷阱1:调用谁?这在Ant文档中已经提到了,在Windows下,不能直接调用dir、del(因为没有这个程序!)等,必须通过cmd.exe来调用:<?xml version="
阅读全文
posted @
2012-11-07 15:08
half-acre
阅读(9864)
推荐(0) 编辑
Android之AndroidManifest.xml文件解析
摘要:一、关于AndroidManifest.xmlAndroidManifest.xml 是每个android程序中必须的文件。它位于整个项目的根目录,描述了package中暴露的组件(activities, services, 等等),他们各自的实现类,各种能被处理的数据和启动位置。 除了能声明程序中的Activities, ContentProviders, Services, 和Intent Receivers,还能指定permissions和instrumentation(安全控制和测试)二、AndroidManifest.xml结构<?xmlversion="1.0&qu
阅读全文
posted @
2012-11-05 17:49
half-acre
阅读(261)
推荐(0) 编辑
如何用Android InstrumentationTestRunner 执行单个case
摘要:命令行demo如下:adb shell am instrument -e class com.autonavi.MinimapAutomationTool#testLayerCancelButton -w com.autonavi/android.test.InstrumentationTestRunner命令解析:start an Instrumentation: am instrument [flags] <COMPONENT> -r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT) -e <NAM
阅读全文
posted @
2012-11-05 16:39
half-acre
阅读(3456)
推荐(0) 编辑
ant condition
摘要:basic elements: istrue isfalse not and or xor available isset equals filesmatch 1、istrue isfalse:断言 真 假<project name="testCondition"> <target name="test"> <condition property="scondition"> <istrue value="true"/> </condition> <a
阅读全文
posted @
2012-11-05 16:05
half-acre
阅读(1885)
推荐(0) 编辑