<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iT人 -  theiter &#187; Android</title>
	<atom:link href="http://www.theiter.com/category/mobile-tech/android/feed" rel="self" type="application/rss+xml" />
	<link>http://www.theiter.com</link>
	<description>关注IT技术，研究移动开发技术，记录IT人的生活</description>
	<lastBuildDate>Sun, 04 Dec 2011 14:28:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>上亿手机预装间谍软件曝光</title>
		<link>http://www.theiter.com/2011/12/%e4%b8%8a%e4%ba%bf%e6%89%8b%e6%9c%ba%e9%a2%84%e8%a3%85%e9%97%b4%e8%b0%8d%e8%bd%af%e4%bb%b6%e6%9b%9d%e5%85%89.html</link>
		<comments>http://www.theiter.com/2011/12/%e4%b8%8a%e4%ba%bf%e6%89%8b%e6%9c%ba%e9%a2%84%e8%a3%85%e9%97%b4%e8%b0%8d%e8%bd%af%e4%bb%b6%e6%9b%9d%e5%85%89.html#comments</comments>
		<pubDate>Sun, 04 Dec 2011 14:25:43 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[手机资讯]]></category>
		<category><![CDATA[智能手机]]></category>

		<guid isPermaLink="false">http://www.theiter.com/?p=766</guid>
		<description><![CDATA[一款名为Carrier IQ的间谍软件被曝光。该软件暗中收集用户隐私信息，甚至用户每按下一个键盘都会被秘密地记录在案。该软件已被预装在全球约1.41亿部手机中，其中包括国内大量的水货手机。 据了解，CIQ原本是一款用来监测手机使用情况的应用程序，它会根据手机使用情况提供具体数据，以指导手机用户，方便手机生产商提高产品质量和服务水平。包括苹果、HTC、三星在内的手机制造商，以及AT&#38;T、T-Mobile 等运营商都在手机上预装CIQ软件，目前已被预装在全球约1.41亿部手机中。但是，不久前CIQ被曝光存在收集用户隐私数据行为，包括用户所处的位置、键盘录入情况，以及手机运行的程序等都被上传到软件服务器上。苹果也发表声明称，已经在大多数iOS5设备中停止支持CIQ，并会在未来的软件升级时将其完全删除。国内的水货用户应当提高警惕。 目前，针对Android系统已经有一款名为Carrier IQ Detector 的App可以简单方便的监测手机是否安装了该间谍软件。对该软件的介绍如下：“Determine whether or not your phone contains Carrier IQ mobile diagnostic software.Security researchers have recently determined that a number of consumer mobile devices contain pre-installed software from Carrier IQ. While this software appears to be designed to help mobile network operators improve coverage through metrics tracking, it does [...]]]></description>
			<content:encoded><![CDATA[<p>一款名为Carrier IQ的间谍软件被曝光。该软件暗中收集用户隐私信息，甚至用户每按下一个键盘都会被秘密地记录在案。该软件已被预装在全球约1.41亿部手机中，其中包括国内大量的水货手机。</p>
<p>据了解，CIQ原本是一款用来监测手机使用情况的应用程序，它会根据手机使用情况提供具体数据，以指导手机用户，方便手机生产商提高产品质量和服务水平。包括苹果、HTC、三星在内的手机制造商，以及AT&amp;T、T-Mobile 等运营商都在手机上预装CIQ软件，目前已被预装在全球约1.41亿部手机中。但是，不久前CIQ被曝光存在收集用户隐私数据行为，包括用户所处的位置、键盘录入情况，以及手机运行的程序等都被上传到软件服务器上。苹果也发表声明称，已经在大多数iOS5设备中停止支持CIQ，并会在未来的软件升级时将其完全删除。国内的水货用户应当提高警惕。</p>
<p>目前，针对Android系统已经有一款名为Carrier IQ Detector 的App可以简单方便的监测手机是否安装了该间谍软件。对该软件的介绍如下：“Determine whether or not your phone contains Carrier IQ mobile diagnostic software.Security researchers have recently determined that a number of consumer mobile devices contain pre-installed software from Carrier IQ. While this software appears to be designed to help mobile network operators improve coverage through metrics tracking, it does not provide a clear opt-out path for users. Additionally, it can be difficult for non-technical users to determine whether or not their handset is affected. We&#8217;ve developed the Carrier IQ Detector to aid in this process in an effort to keep mobile users fully informed about what their phone is doing.”</p>
<p>由于CIQ软件安装在手机固件中，所以Carrier IQ Detector只能监测，不能卸载CIQ间谍软件。<a href="https://market.android.com/details?id=com.lookout.carrieriqdetector&amp;feature=search_result" target="_blank">点击安装 Carrier IQ Detector</a>。
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2011/12/%e4%b8%8a%e4%ba%bf%e6%89%8b%e6%9c%ba%e9%a2%84%e8%a3%85%e9%97%b4%e8%b0%8d%e8%bd%af%e4%bb%b6%e6%9b%9d%e5%85%89.html">上亿手机预装间谍软件曝光</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2011/12/%e4%b8%8a%e4%ba%bf%e6%89%8b%e6%9c%ba%e9%a2%84%e8%a3%85%e9%97%b4%e8%b0%8d%e8%bd%af%e4%bb%b6%e6%9b%9d%e5%85%89.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>常用Android资料网站</title>
		<link>http://www.theiter.com/2011/04/%e5%b8%b8%e7%94%a8android%e8%b5%84%e6%96%99%e7%bd%91%e7%ab%99.html</link>
		<comments>http://www.theiter.com/2011/04/%e5%b8%b8%e7%94%a8android%e8%b5%84%e6%96%99%e7%bd%91%e7%ab%99.html#comments</comments>
		<pubDate>Sun, 03 Apr 2011 09:49:40 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android，移动开发]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2011/04/%e5%b8%b8%e7%94%a8android%e8%b5%84%e6%96%99%e7%bd%91%e7%ab%99.html</guid>
		<description><![CDATA[Android相关的一些网站，有些可能需要翻墙。欢迎大家补充。 名称 网址 eoe·Android开发社区 http://www.eoeandroid.com 机锋网 http://www.androidin.com 安卓网 http://www.hiapk.com 谷安 http://android.google.org.cn OphoneDev&#160;&#160;&#160;&#160; http://www.ophonesdn.com 爱迪机 http://aidiji.com Anddev http://www.anddev.org Android http://www.android.com Android Tail&#160;&#160;&#160;&#160; http://androidtail.com Android 代理1&#160; http://androidappdocs.appspot.com/index.html Android 代理2 http://www.ideasandroid.com/android/sdk/docs Android 实验室&#160;&#160;&#160;&#160; http://www.androidlab.cn Android for x86&#160;&#160;&#160;&#160; http://www.androidx86.org Android for mips&#160;&#160;&#160;&#160; http://www.mipsandroid.com&#160; Android Res&#160;&#160;&#160; http://www.androidres.com&#160; Android snippets&#160;&#160;&#160;&#160; http://www.androidsnippets.org android git&#160;&#160;&#160;&#160; http://android.git.kernel.org mo-Android&#160;&#160;&#160;&#160; http://www.moandroid.com&#160; Android-x86&#160;&#160;&#160;&#160; http://www.android-x86.org 0xdroid&#160;&#160;&#160;&#160; http://gitorious.org/0xdroid&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Android相关的一些网站，有些可能需要翻墙。欢迎大家补充。</p>
<table border="0" cellspacing="0" cellpadding="2" width="560">
<tbody>
<tr>
<td valign="top" width="170"><strong>名称</strong></td>
<td valign="top" width="388"><strong>网址</strong></td>
</tr>
<tr>
<td valign="top" width="170">eoe·Android开发社区</td>
<td valign="top" width="388"><a href="http://www.eoeandroid.com">http://www.eoeandroid.com</a></td>
</tr>
<tr>
<td valign="top" width="170">机锋网</td>
<td valign="top" width="388"><a href="http://www.androidin.com">http://www.androidin.com</a></td>
</tr>
<tr>
<td valign="top" width="170">安卓网</td>
<td valign="top" width="388"><a href="http://www.hiapk.com">http://www.hiapk.com</a></td>
</tr>
<tr>
<td valign="top" width="170">谷安</td>
<td valign="top" width="388"><a href="http://android.google.org.cn">http://android.google.org.cn</a></td>
</tr>
<tr>
<td valign="top" width="170">OphoneDev&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.ophonesdn.com">http://www.ophonesdn.com</a></td>
</tr>
<tr>
<td valign="top" width="170">爱迪机</td>
<td valign="top" width="388"><a href="http://aidiji.com">http://aidiji.com</a></td>
</tr>
<tr>
<td valign="top" width="170">Anddev</td>
<td valign="top" width="388"><a href="http://www.anddev.org">http://www.anddev.org</a></td>
</tr>
<tr>
<td valign="top" width="170">Android</td>
<td valign="top" width="388"><a href="http://www.android.com">http://www.android.com</a></td>
</tr>
<tr>
<td valign="top" width="170">Android Tail&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://androidtail.com/">http://androidtail.com</a></td>
</tr>
<tr>
<td valign="top" width="170">Android 代理1&#160; </td>
<td valign="top" width="388"><a href="http://androidappdocs.appspot.com/index.html">http://androidappdocs.appspot.com/index.html</a></td>
</tr>
<tr>
<td valign="top" width="170">Android 代理2</td>
<td valign="top" width="388"><a href="http://www.ideasandroid.com/android/sdk/docs">http://www.ideasandroid.com/android/sdk/docs</a></td>
</tr>
<tr>
<td valign="top" width="170">Android 实验室&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.androidlab.cn">http://www.androidlab.cn</a></td>
</tr>
<tr>
<td valign="top" width="170">Android for x86&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.androidx86.org">http://www.androidx86.org</a></td>
</tr>
<tr>
<td valign="top" width="170">Android for mips&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.mipsandroid.com">http://www.mipsandroid.com</a>&#160;</td>
</tr>
<tr>
<td valign="top" width="170">Android Res&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.androidres.com">http://www.androidres.com</a>&#160;</td>
</tr>
<tr>
<td valign="top" width="170">Android snippets&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.androidsnippets.org">http://www.androidsnippets.org</a></td>
</tr>
<tr>
<td valign="top" width="170">android git&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://android.git.kernel.org">http://android.git.kernel.org</a></td>
</tr>
<tr>
<td valign="top" width="170">mo-Android&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.moandroid.com">http://www.moandroid.com</a>&#160;</td>
</tr>
<tr>
<td valign="top" width="170">Android-x86&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://www.android-x86.org">http://www.android-x86.org</a></td>
</tr>
<tr>
<td valign="top" width="170">0xdroid&#160;&#160;&#160;&#160; </td>
<td valign="top" width="388"><a href="http://gitorious.org/0xdroid">http://gitorious.org/0xdroid</a>&#160;</td>
</tr>
<tr>
<td valign="top" width="170">&nbsp;</td>
<td valign="top" width="388">&nbsp;</td>
</tr>
</tbody>
</table>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2011/04/%e5%b8%b8%e7%94%a8android%e8%b5%84%e6%96%99%e7%bd%91%e7%ab%99.html">常用Android资料网站</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2011/04/%e5%b8%b8%e7%94%a8android%e8%b5%84%e6%96%99%e7%bd%91%e7%ab%99.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mysearch:Android快速搜索客户端&#8212;版本更新</title>
		<link>http://www.theiter.com/2011/03/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af%e7%89%88%e6%9c%ac%e6%9b%b4%e6%96%b0.html</link>
		<comments>http://www.theiter.com/2011/03/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af%e7%89%88%e6%9c%ac%e6%9b%b4%e6%96%b0.html#comments</comments>
		<pubDate>Tue, 15 Mar 2011 16:35:38 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android，移动开发]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2011/03/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af%e7%89%88%e6%9c%ac%e6%9b%b4%e6%96%b0.html</guid>
		<description><![CDATA[功能改进： 添加了软件更新功能 修复更新搜索引擎联网出错的问题 下载MySearch V1.0.1： 更多关于“Mysearch”的介绍 转载请注明： 转载自iT人 &#8211; theiter 本文链接地址: Mysearch:Android快速搜索客户端&#8212;版本更新]]></description>
			<content:encoded><![CDATA[<p>功能改进：</p>
<ol>
<li>添加了软件更新功能</li>
<li>修复更新搜索引擎联网出错的问题</li>
</ol>
<p>下载MySearch V1.0.1：<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=mysearch_1.0.1.apk" title="Version1.0.1 downloaded 202 times" >Mysearch_1.0.1 (202)</a></p>
<p><a href="http://www.theiter.com/2010/06/mysearchandroid快速搜索客户端.html"><strong><span style="color: #0000ff;">更多关于“Mysearch”的介绍</span></strong></a>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2011/03/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af%e7%89%88%e6%9c%ac%e6%9b%b4%e6%96%b0.html">Mysearch:Android快速搜索客户端&mdash;版本更新</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2011/03/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af%e7%89%88%e6%9c%ac%e6%9b%b4%e6%96%b0.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android 反编译</title>
		<link>http://www.theiter.com/2010/09/android-%e5%8f%8d%e7%bc%96%e8%af%91.html</link>
		<comments>http://www.theiter.com/2010/09/android-%e5%8f%8d%e7%bc%96%e8%af%91.html#comments</comments>
		<pubDate>Mon, 13 Sep 2010 05:12:00 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[反编译]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/09/android-%e5%8f%8d%e7%bc%96%e8%af%91.html</guid>
		<description><![CDATA[干嘛要反编译，呵呵！目的就不说了… 先说些预备知识：classes.dex是java源码编译后生成的java字节码文件。但由于Android使用的dalvik虚拟机与标准的java虚拟机是不兼容的，dex文件与class文件相比，不论是文件结构还是opcode都不一样。目前常见的java反编译工具都不能处理dex文件。 一般使用dexdump和Dedexer可以反dex，但是用过的人都知道这样反出来的结果可读性极差。在这个时候大家一定要相信互联网的力量，所谓只要你能想到的或许就已经有人已经做到了。瞧瞧吧，我下面要介绍的就是别人已经给我们做好的几个工具。 dex2jar，这个别人写的一个把.dex files转换成Java .class的小工具，很不错。基本使用方法如下：在apk中提取classes.dex文件 -&#62; 利用dex2jar把dex转换成java jar（classes.dex2jar.jar）。 到这里了，我们用普通的java反编译工具就可以看到代码了。我使用的是JD-GUI，这是一个有界面的java（.class） 代码浏览器，简单实用！另外还提供了一个Eclipse plugin（JD-Eclipse），可以吧JD-GUI的功能集成到Eclipse里面。 最后，在提供一个与Layout相关的工具，AXMLPrinter2.jar，该工具能吧apk中的xml文件转换成文本格式，这样就就可以直接欣赏别人程序中界面布局的实现方式啦。当然Android SDK也提供了一个类似的工具（hierarchyviewer.bat），个人感觉还不入AXMLPrinter2.jar转成xml后直接看来得痛快。 文中提到的所有工具都是开源或免费的，感谢这些无私奉献的人们，附工具的链接： dex2jar JD-GUI AXMLPrinter2 Dedexer 转载请注明： 转载自iT人 &#8211; theiter 本文链接地址: Android 反编译]]></description>
			<content:encoded><![CDATA[<p>干嘛要反编译，呵呵！目的就不说了…</p>
<p>先说些预备知识：classes.dex是java源码编译后生成的java字节码文件。但由于Android使用的dalvik虚拟机与标准的java虚拟机是不兼容的，dex文件与class文件相比，不论是文件结构还是opcode都不一样。目前常见的java反编译工具都不能处理dex文件。 </p>
<p>一般使用dexdump和Dedexer可以反dex，但是用过的人都知道这样反出来的结果可读性极差。在这个时候大家一定要相信互联网的力量，所谓只要你能想到的或许就已经有人已经做到了。瞧瞧吧，我下面要介绍的就是别人已经给我们做好的几个工具。</p>
<p>dex2jar，这个别人写的一个把.dex files转换成Java .class的小工具，很不错。基本使用方法如下：<strong><font color="#ff0000">在apk中提取classes.dex文件 -&gt; 利用dex2jar把dex转换成java jar（classes.dex2jar.jar）。</font></strong></p>
<p>到这里了，我们用普通的java反编译工具就可以看到代码了。我使用的是JD-GUI，这是一个有界面的java（.class） 代码浏览器，简单实用！另外还提供了一个Eclipse plugin（JD-Eclipse），可以吧JD-GUI的功能集成到Eclipse里面。</p>
<p>最后，在提供一个与Layout相关的工具，AXMLPrinter2.jar，该工具能吧apk中的xml文件转换成文本格式，这样就就可以直接欣赏别人程序中界面布局的实现方式啦。当然Android SDK也提供了一个类似的工具（hierarchyviewer.bat），个人感觉还不入AXMLPrinter2.jar转成xml后直接看来得痛快。</p>
<p>文中提到的所有工具都是开源或免费的，感谢这些无私奉献的人们，附工具的链接：</p>
<ul>
<li><a href="http://code.google.com/p/dex2jar/" target="_blank">dex2jar</a></li>
<li><a href="http://java.decompiler.free.fr/" target="_blank">JD-GUI</a></li>
<li><a href="http://code.google.com/p/android4me/" target="_blank">AXMLPrinter2</a></li>
<li><a href="http://sourceforge.net/projects/dedexer/" target="_blank">Dedexer</a></li>
</ul>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/09/android-%e5%8f%8d%e7%bc%96%e8%af%91.html">Android 反编译</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/09/android-%e5%8f%8d%e7%bc%96%e8%af%91.html/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Mysearch:Android快速搜索客户端</title>
		<link>http://www.theiter.com/2010/06/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af.html</link>
		<comments>http://www.theiter.com/2010/06/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af.html#comments</comments>
		<pubDate>Thu, 03 Jun 2010 16:20:23 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/06/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af.html</guid>
		<description><![CDATA[最近正在研究Android开发，为了自己使用HTC hero上网搜索方便写了这个程序&#8212;-MySearch。首先简单介绍下功能：MySearch 是一个快速搜索客户端程序，可以直接输入文本进行搜索，也可以扫描条码对扫描结果进行搜索；并且用户可以选择自己喜欢的搜索引擎。 功能列表： 文本搜索 一维条码条码扫描搜索（商品条码） 二维条码扫描搜索（Qr码） 扫描结果复制到剪切板 选择搜索引擎 更新搜索引擎列表 下载MySearch： 以下是MySearch程序截图： 主界面 设置界面 选择搜索引擎 下载MySearch： 转载请注明： 转载自iT人 &#8211; theiter 本文链接地址: Mysearch:Android快速搜索客户端]]></description>
			<content:encoded><![CDATA[<p>最近正在研究Android开发，为了自己使用<a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=htc+hero&amp;rlz=1R2GZAZ_zh-CNCN370&amp;aq=0&amp;aqi=g10&amp;aql=&amp;oq=HTC+hero&amp;gs_rfai=" target="_blank">HTC hero</a>上网搜索方便写了这个程序&#8212;-MySearch。首先简单介绍下功能：MySearch 是一个快速搜索客户端程序，可以直接输入文本进行搜索，也可以扫描条码对扫描结果进行搜索；并且用户可以选择自己喜欢的搜索引擎。</p>
<p><span style="color: #ff0000;"><strong>功能列表：</strong></span></p>
<ul>
<li><span style="color: #0000ff;">文本搜索</span></li>
<li><span style="color: #0000ff;">一维条码条码扫描搜索（</span><a href="http://www.google.com.hk/search?hl=zh-CN&amp;newwindow=1&amp;safe=strict&amp;rlz=1R2GZAZ_zh-CNCN370&amp;q=%E5%95%86%E5%93%81%E6%9D%A1%E7%A0%81&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=" target="_blank"><span style="color: #0000ff;">商品条码</span></a><span style="color: #0000ff;">）</span></li>
<li><span style="color: #0000ff;">二维条码扫描搜索（</span><a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=qr%E7%A0%81&amp;rlz=1R2GZAZ_zh-CNCN370&amp;aq=0&amp;aqi=g1g-g2g2g-g3g2&amp;aql=&amp;oq=Qr%E7%A0%81&amp;gs_rfai=" target="_blank"><span style="color: #0000ff;">Qr码</span></a><span style="color: #0000ff;">）</span></li>
<li><span style="color: #0000ff;">扫描结果复制到剪切板</span></li>
<li><span style="color: #0000ff;">选择搜索引擎</span></li>
<li><span style="color: #0000ff;">更新搜索引擎列表</span></li>
</ul>
<p>下载MySearch：<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=mysearch.zip" title="Version1.0 downloaded 304 times" >MySearch (304)</a></p>
<p>以下是MySearch程序截图：</p>
<p><span id="more-592"></span></p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="snap20100603_235001" src="http://www.theiter.com/wp-content/uploads/2010/06/snap20100603_235001.png" border="0" alt="snap20100603_235001" width="324" height="484" /></p>
<p style="text-align: center;">主界面</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="snap20100603_235012" src="http://www.theiter.com/wp-content/uploads/2010/06/snap20100603_235012.png" border="0" alt="snap20100603_235012" width="324" height="484" /></p>
<p style="text-align: center;">设置界面</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="snap20100603_235019" src="http://www.theiter.com/wp-content/uploads/2010/06/snap20100603_235019.png" border="0" alt="snap20100603_235019" width="324" height="484" /></p>
<p style="text-align: center;">选择搜索引擎</p>
<p style="text-align: left;">下载MySearch：<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=mysearch.zip" title="Version1.0 downloaded 304 times" >MySearch (304)</a></p>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/06/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af.html">Mysearch:Android快速搜索客户端</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/06/mysearchandroid%e5%bf%ab%e9%80%9f%e6%90%9c%e7%b4%a2%e5%ae%a2%e6%88%b7%e7%ab%af.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>logcat: Android日志系统</title>
		<link>http://www.theiter.com/2010/06/logcat-android%e6%97%a5%e5%bf%97%e7%b3%bb%e7%bb%9f.html</link>
		<comments>http://www.theiter.com/2010/06/logcat-android%e6%97%a5%e5%bf%97%e7%b3%bb%e7%bb%9f.html#comments</comments>
		<pubDate>Wed, 02 Jun 2010 09:12:45 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/06/logcat-android%e6%97%a5%e5%bf%97%e7%b3%bb%e7%bb%9f.html</guid>
		<description><![CDATA[移动开发的过程中，在程序中打印日志是最有效的调试手段。Android系统提供了一套很好用日志API（android.util.Log），可以在代码中添加不同级别的日志。 在开发过程中logcat可以通过adb使用也可以在设备上直接使用，先看下帮助内容： Usage: logcat [options] [filterspecs] options include: -s Set default filter to silent. Like specifying filterspec '*:s' -f Log to file. Default to stdout -r [] Rotate log every kbytes. (16 if unspecified). Requires -f -n Sets max number of rotated logs to , default 4 -v Sets the log print format, where is [...]]]></description>
			<content:encoded><![CDATA[<p>移动开发的过程中，在程序中打印日志是最有效的调试手段。Android系统提供了一套很好用日志API（android.util.Log），可以在代码中添加不同级别的日志。</p>
<p>在开发过程中<a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=logcat&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=" target="_blank">logcat</a>可以通过adb使用也可以在设备上直接使用，先看下帮助内容：</p>
<pre class="c++" title="code">Usage: logcat [options] [filterspecs]
options include:
  -s              Set default filter to silent.
                  Like specifying filterspec '*:s'
  -f    Log to file. Default to stdout
  -r []   Rotate log every kbytes. (16 if unspecified). Requires -f
  -n       Sets max number of rotated logs to , default 4
  -v
     Sets the log print format, where

 is one of:

                  brief process tag thread raw time threadtime long

  -c              clear (flush) the entire log and exit
  -d              dump the log and then exit (don't block)
  -g              get the size of the log's ring buffer and exit
  -b      request alternate ring buffer
                  ('main' (default), 'radio', 'events')
  -B              output the log in binary
filterspecs are a series of
  [:priority]

where  is a log component tag (or * for all) and priority is:
  V    Verbose
  D    Debug
  I    Info
  W    Warn
  E    Error
  F    Fatal
  S    Silent (supress all output)

'*' means '*:d' and  by itself means :v

If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'

If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"</pre>
<p><span id="more-585"></span></p>
<p>很简单，只要仔细看下就会使用。有几个小的使用心得分享下：</p>
<p><span style="color: #0000ff;"><strong>可以输出到文件（-f），个人认为在文件中看比较舒服点；</strong></span></p>
<p><span style="color: #0000ff;"><strong>日志分为不同等级，当设置一个等级后，输出结果为高于该等级的所有日志；</strong></span></p>
<p><span style="color: #0000ff;"><strong>配合“YouApp:X”在命令行最后加上“*:S”可以只输出YouApp相关的日志；</strong></span><strong><span style="color: #0000ff;"> </span></strong></p>
<pre class="c++" title="code">eg: logcat -f /data/test.log -v time :I *:S</pre>
<p>另外，在NDK开发过程中也可以把日志写到<a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=logcat&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=" target="_blank">logcat</a>日志系统中，在NDK的&lt;android/log.h&gt;头文件中定义的：</p>
<pre class="c++" title="code">
/*
 * A variant of __android_log_print() that takes a va_list to list
 * additional parameters.
 */
int __android_log_vprint(int prio, const char *tag,
                         const char *fmt, va_list ap);
</pre>
<p>OK！尽情使用<a href="http://www.google.com.hk/search?hl=zh-CN&amp;source=hp&amp;q=logcat&amp;aq=f&amp;aqi=g10&amp;aql=&amp;oq=&amp;gs_rfai=" target="_blank">logcat</a>吧！最后附一段自己封装的Util。</p>
<pre class="java" title="code">
package com.theiter.androiddemologcat;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import android.util.Log;

public class Util {
	private static final String LOG_TAG = "THEITER-DEMOLOG";

	public static void debug( String msg )
	{
		Log.d( LOG_TAG, msg );
	}

	public static void debug( String msg, Throwable throwable )
	{
		Log.d( LOG_TAG, msg, throwable );
	}

	public static void info( String msg )
	{
		Log.i( LOG_TAG, msg );
	}

	public static void info( String msg, Throwable throwable )
	{
		Log.i( LOG_TAG, msg, throwable );
	}

	public static void warn( String msg )
	{
		Log.w( LOG_TAG, msg );
	}

	public static void warn( String msg, Throwable throwable )
	{
		Log.w( LOG_TAG, msg, throwable );
	}

	public static void error( String msg )
	{
		Log.e( LOG_TAG, msg );
	}

	public static void error( String msg, Throwable throwable )
	{
		Log.e( LOG_TAG, msg, throwable );
	}

	public static void printLog( int priority, String msg )
	{
		Log.println( priority, LOG_TAG, msg );
	}

	public static void writeLine(OutputStream os, PrintWriter logWriter, String value) throws IOException
	{
		String line = value + "\n";
		os.write( line.getBytes() );
		if( logWriter != null )
		{
			logWriter.println(value);
		}
	}

	public static void savelogtofile(String logtype,String logfmt,String filename,boolean alllog){

		try
		{
			String cmd = "logcat -f " + filename + " -v "+ logfmt+ " " + LOG_TAG + ":" + logtype;
			if(!alllog){
				cmd += " *:S";
			}

			Process process = Runtime.getRuntime().exec("su -c sh");
			OutputStream os = process.getOutputStream();
			Util.writeLine( os, null, cmd);

		}catch (Exception e) {
			throw new RuntimeException("Write log file error!");
		}

	}

}
</pre>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/06/logcat-android%e6%97%a5%e5%bf%97%e7%b3%bb%e7%bb%9f.html">logcat: Android日志系统</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/06/logcat-android%e6%97%a5%e5%bf%97%e7%b3%bb%e7%bb%9f.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>谷歌发布Android 2.2手机操作平台</title>
		<link>http://www.theiter.com/2010/05/%e8%b0%b7%e6%ad%8c%e5%8f%91%e5%b8%83android-2-2%e6%89%8b%e6%9c%ba%e6%93%8d%e4%bd%9c%e5%b9%b3%e5%8f%b0.html</link>
		<comments>http://www.theiter.com/2010/05/%e8%b0%b7%e6%ad%8c%e5%8f%91%e5%b8%83android-2-2%e6%89%8b%e6%9c%ba%e6%93%8d%e4%bd%9c%e5%b9%b3%e5%8f%b0.html#comments</comments>
		<pubDate>Fri, 21 May 2010 02:00:59 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/05/%e8%b0%b7%e6%ad%8c%e5%8f%91%e5%b8%83android-2-2%e6%89%8b%e6%9c%ba%e6%93%8d%e4%bd%9c%e5%b9%b3%e5%8f%b0.html</guid>
		<description><![CDATA[谷歌在Google I/O大会上发布了名称代码为“Froyo”（英文“冻酸奶”的缩写）的Android 2.2系统。 谷歌表示，Android 2.2系统新增了许多功能，比如便携式热点功能、在Android Browser中增加了对Adobe Flash的支持、以及对Android Market进行了一些完善。 谷歌表示，除了新增加许多企业功能之外，Android 2.2在性能和速度上均有提高，给Android浏览器增加了V8 Java脚本引擎，另外还增加了许多新的API和服务。 谷歌在周四还预展了即将推出的网络版Android Market以及对本地Music App的更新内容，用户将可以通过Android手机访问Music App。 谷歌工程副总裁Andy Rubin表示：“Android生态系统的成长超出了我们的预期。 现在，每天都会有10万人加入到Android手机用户的大家庭中来。为Android Market开发应用软件的活跃Android开发员总数已经超过18万人，他们已经开发出5万多个应用软件。 Froyo是我们向前迈出的新的一步，它将让Android成为一个更好的平台，为开发商、企业和消费者所用。” 开发商们现在已经可以从Android开发商网站下载Android 2.2SDK和Android NDK，Revision 4。谷歌将在未来几周内将Froyo提供给OEM厂商和开源社区。 新版本Android 2.2操作系统相比，主要有以下6大提升: Flash 10.1功能 谷歌Android 2.2将会增加Flash功能，这一消息也得到了谷歌的工程副总裁Andy Rubin的证实，在加入Flash功能之后，Android手机将为用户提供更好的互联网以及游戏体验。 网络共享功能 谷歌2.2版Android操作系统将支持USB tethering(网络共享功能)，从而实现手机与笔记本电脑共享网络连接。另外2.2版本还将支持Wi-Fi hotspot功能，这意味着新系统可以让用户的Android手机变成一个移动的Wi-Fi热点，进而对附近设备进行Wi-Fi网络分享。从这两项新功能特征来看，Android 2.2版本不仅注重手机本身的网络应用，同时还将其网络资源扩大到其设备商，能够给用户带来更多方便和实惠。 应用程序自动更新功能 升级之后的Android 2.2版本将支持程序自动更新功能。考虑到用户总是希望能够使用最新版本的应用软件，以及Android系统能够在后台运行任何任务，因此能够推断出2.2版本支持后台自动更新软件并不是件难事。 对于用户来说，经常会发现手机中有很多应用程序正等待更新，如果手动点击并等待每一个应用程序，无疑会让用户产生厌烦心理，并且要花费很多时间。而2.2版本将能够完全解决这一问题。 系统性能大幅提升 除了上述功能特征之外，Android在系统运行速度方面也将提升不少，按照国外媒体的表示，Android 2.2版操作系统将是运行最快的系统。2.2版本在内核中增加了新的JIT编译器，它能够让用户的手机更有效地处理代码。经过浮点运算的测试，在Android 2.1版本的Nexus One手机为6-7 MFLOPS，而将Nexus One更新至Android 2.2版后，测试结果高达23-40 MFLOPS，效能提高了5倍之多。另外，新一代谷歌Android 2.2系统的Linux内核也将实现升级，至最新的2.6.32版本。新一个内核将对Android系统的稳定性和性能方面都有很好的改善作用。 允许应运程序存储至SD卡 此前Android系统的内部存储有限，直到现在也没有得到解决，只有少数Android手机具有合理的存储。谷歌一直表示公司将修复这一问题，其很有可能就在2.2版本上得到解决。即将到来的2.2版本将允许在SD卡中存储应用程序，这能够在很大程度上改善手机的内部存储过小问题。不过相应的，谷歌也许会做出一个方法来加密其Android应用，以防止用户调换SD卡安装应用程序。 其他人性化改善 在其他方面，2.2版本的Android操作系统还将增加了轨迹球LED指示灯变色，增加了对3D性能的优化，FM收音机功能更也将在新系统中全面支持。可以看出，2.2版本在人性化操作方面以及细节功能方面的提升还是非常明显的。 转载请注明： [...]]]></description>
			<content:encoded><![CDATA[<p>谷歌在Google I/O大会上发布了名称代码为<font color="#ff0000"><strong>“Froyo”（英文“冻酸奶”的缩写）</strong></font>的Android 2.2系统。</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.theiter.com/wp-content/uploads/2010/05/image3.png" width="504" height="379" /> </p>
<p>谷歌表示，Android 2.2系统新增了许多功能，比如便携式热点功能、在Android Browser中增加了对Adobe Flash的支持、以及对Android Market进行了一些完善。 </p>
<p>谷歌表示，除了新增加许多企业功能之外，Android 2.2在性能和速度上均有提高，给Android浏览器增加了V8 Java脚本引擎，另外还增加了许多新的API和服务。 </p>
<p>谷歌在周四还预展了即将推出的网络版Android Market以及对本地Music App的更新内容，用户将可以通过Android手机访问Music App。 </p>
<p>谷歌工程副总裁Andy Rubin表示：“Android生态系统的成长超出了我们的预期。 现在，每天都会有10万人加入到Android手机用户的大家庭中来。为Android Market开发应用软件的活跃Android开发员总数已经超过18万人，他们已经开发出5万多个应用软件。 Froyo是我们向前迈出的新的一步，它将让Android成为一个更好的平台，为开发商、企业和消费者所用。” </p>
<p>开发商们现在已经可以从<a href="http://androidappdocs.appspot.com/sdk/index.html" target="_blank">Android开发商网站</a>下载<a href="http://androidappdocs.appspot.com/sdk/android-2.2.html" target="_blank">Android 2.2SDK</a>和<a href="http://androidappdocs.appspot.com/sdk/ndk/index.html" target="_blank">Android NDK，Revision 4</a>。谷歌将在未来几周内将Froyo提供给OEM厂商和开源社区。</p>
<p> <span id="more-584"></span>
<p><strong><font color="#ff0000">新版本Android 2.2操作系统相比，主要有以下6大提升:</font></strong></p>
<ul>
<li><font color="#0000ff">Flash 10.1功能</font> </li>
<p> 谷歌Android 2.2将会增加Flash功能，这一消息也得到了谷歌的工程副总裁Andy Rubin的证实，在加入Flash功能之后，Android手机将为用户提供更好的互联网以及游戏体验。
<li><font color="#0000ff">网络共享功能</font> </li>
<p> 谷歌2.2版Android操作系统将支持USB tethering(网络共享功能)，从而实现手机与笔记本电脑共享网络连接。另外2.2版本还将支持Wi-Fi hotspot功能，这意味着新系统可以让用户的Android手机变成一个移动的Wi-Fi热点，进而对附近设备进行Wi-Fi网络分享。从这两项新功能特征来看，Android 2.2版本不仅注重手机本身的网络应用，同时还将其网络资源扩大到其设备商，能够给用户带来更多方便和实惠。
<li><font color="#0000ff">应用程序自动更新功能</font> </li>
<p> 升级之后的Android 2.2版本将支持程序自动更新功能。考虑到用户总是希望能够使用最新版本的应用软件，以及Android系统能够在后台运行任何任务，因此能够推断出2.2版本支持后台自动更新软件并不是件难事。 对于用户来说，经常会发现手机中有很多应用程序正等待更新，如果手动点击并等待每一个应用程序，无疑会让用户产生厌烦心理，并且要花费很多时间。而2.2版本将能够完全解决这一问题。
<li><font color="#0000ff">系统性能大幅提升</font> </li>
<p> 除了上述功能特征之外，Android在系统运行速度方面也将提升不少，按照国外媒体的表示，Android 2.2版操作系统将是运行最快的系统。2.2版本在内核中增加了新的JIT编译器，它能够让用户的手机更有效地处理代码。经过浮点运算的测试，在Android 2.1版本的Nexus One手机为6-7 MFLOPS，而将Nexus One更新至Android 2.2版后，测试结果高达23-40 MFLOPS，效能提高了5倍之多。另外，新一代谷歌Android 2.2系统的Linux内核也将实现升级，至最新的2.6.32版本。新一个内核将对Android系统的稳定性和性能方面都有很好的改善作用。
<li><font color="#0000ff">允许应运程序存储至SD卡</font> </li>
<p> 此前Android系统的内部存储有限，直到现在也没有得到解决，只有少数Android手机具有合理的存储。谷歌一直表示公司将修复这一问题，其很有可能就在2.2版本上得到解决。即将到来的2.2版本将允许在SD卡中存储应用程序，这能够在很大程度上改善手机的内部存储过小问题。不过相应的，谷歌也许会做出一个方法来加密其Android应用，以防止用户调换SD卡安装应用程序。
<li><font color="#0000ff">其他人性化改善</font> </li>
<p> 在其他方面，2.2版本的Android操作系统还将增加了轨迹球LED指示灯变色，增加了对3D性能的优化，FM收音机功能更也将在新系统中全面支持。可以看出，2.2版本在人性化操作方面以及细节功能方面的提升还是非常明显的。 </ul>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/05/%e8%b0%b7%e6%ad%8c%e5%8f%91%e5%b8%83android-2-2%e6%89%8b%e6%9c%ba%e6%93%8d%e4%bd%9c%e5%b9%b3%e5%8f%b0.html">谷歌发布Android 2.2手机操作平台</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/05/%e8%b0%b7%e6%ad%8c%e5%8f%91%e5%b8%83android-2-2%e6%89%8b%e6%9c%ba%e6%93%8d%e4%bd%9c%e5%b9%b3%e5%8f%b0.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>在Android上运行native可执行程序</title>
		<link>http://www.theiter.com/2010/05/%e5%9c%a8android%e4%b8%8a%e8%bf%90%e8%a1%8cnative%e5%8f%af%e6%89%a7%e8%a1%8c%e7%a8%8b%e5%ba%8f.html</link>
		<comments>http://www.theiter.com/2010/05/%e5%9c%a8android%e4%b8%8a%e8%bf%90%e8%a1%8cnative%e5%8f%af%e6%89%a7%e8%a1%8c%e7%a8%8b%e5%ba%8f.html#comments</comments>
		<pubDate>Wed, 19 May 2010 05:10:48 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[executable]]></category>
		<category><![CDATA[Native]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/05/%e5%9c%a8android%e4%b8%8a%e8%bf%90%e8%a1%8cnative%e5%8f%af%e6%89%a7%e8%a1%8c%e7%a8%8b%e5%ba%8f.html</guid>
		<description><![CDATA[最近做了一些关于Android Native 编程相关的东西，在这篇文章中我将介绍如何在Android application中调用Native executable。至于如何编写Native executable和如何打包native到apk中，之前我都有文章介绍这里就不再重复了。 我写了一个Demo程序，演示如何在Android Application中调用Native executable。该示例中： 可以调用系统自带的executable，例如“/system/bin/ls”； 可以调用自己编写的Native executable，放置在apk的assets目录下； 可以调用从远程服务器下载的Native executable； 接下来详细介绍代码的实现，在这里我们主要用到了android.os.Exec，但是android.os.Exec不被包含在android.jar中，因此只能通过java反射机制来实现。 以下代码实现了一个通用的exec函数： private String exec(String arg0, String arg1, String arg2) { try { // android.os.Exec is not included in android.jar so we need to use reflection. Class execClass = Class.forName("android.os.Exec"); Method createSubprocess = execClass.getMethod("createSubprocess", String.class, String.class, String.class, int[].class); Method waitFor = [...]]]></description>
			<content:encoded><![CDATA[<p>最近做了一些关于Android Native 编程相关的东西，在这篇文章中我将介绍如何在Android application中调用Native executable。至于<a href="http://www.theiter.com/2010/03/用android-ndk编写一个可执行程序.html" target="_blank">如何编写Native executable</a>和<a href="http://www.theiter.com/2010/04/androidapk文件结构及打包技巧.html" target="_blank">如何打包native到apk中</a>，之前我都有文章介绍这里就不再重复了。</p>
<p>我写了一个Demo程序，演示如何在Android Application中调用Native executable。该示例中：</p>
<ul>
<li>可以调用系统自带的executable，例如“/system/bin/ls”； </li>
<li>可以调用自己编写的Native executable，放置在apk的assets目录下； </li>
<li>可以调用从远程服务器下载的Native executable； </li>
</ul>
<p> <span id="more-560"></span></p>
<p>接下来详细介绍代码的实现，在这里我们主要用到了android.os.Exec，但是android.os.Exec不被包含在android.jar中，因此只能通过java反射机制来实现。</p>
<p>以下代码实现了一个通用的exec函数：</p>
<pre class="Java" title="code">
private String exec(String arg0, String arg1, String arg2) {
		try {
			// android.os.Exec is not included in android.jar so we need to use reflection.
			Class<?> execClass = Class.forName("android.os.Exec");
	        Method createSubprocess = execClass.getMethod("createSubprocess",
	        		String.class, String.class, String.class, int[].class);
	        Method waitFor = execClass.getMethod("waitFor", int.class);

	        // Executes the command.
	        // NOTE: createSubprocess() is asynchronous.
	        int[] pid = new int[1];
	        FileDescriptor fd = (FileDescriptor)createSubprocess.invoke(
	        		null, arg0, arg1, arg2, pid);

	        // Reads stdout.
	        // NOTE: You can write to stdin of the command using new FileOutputStream(fd).
	        FileInputStream in = new FileInputStream(fd);
	        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
	        String output = "";
	        try {
		        String line;
				while ((line = reader.readLine()) != null) {
					output += line + "\n";
				}
			} catch (IOException e) {
				// It seems IOException is thrown when it reaches EOF.
			}

			// Waits for the command to finish.
			waitFor.invoke(null, pid[0]);

			return output;
		} catch (ClassNotFoundException e) {
			throw new RuntimeException(e.getMessage());
		} catch (SecurityException e) {
			throw new RuntimeException(e.getMessage());
		} catch (NoSuchMethodException e) {
			throw new RuntimeException(e.getMessage());
		} catch (IllegalArgumentException e) {
			throw new RuntimeException(e.getMessage());
		} catch (IllegalAccessException e) {
			throw new RuntimeException(e.getMessage());
		} catch (InvocationTargetException e) {
			throw new RuntimeException(e.getMessage());
		}
    }
</pre>
<p>以下代码实现如何执行assets中的Native executable程序：</p>
<pre class="Java" title="code">
private int getassetsfile(String fileName, String tagFile) {
    	int retVal = 0;
    	try {

    		File dir = new File(tagFile);
			if (dir.exists()) {
				dir.delete();
			}

    		InputStream in = this.getAssets().open(fileName);
    		if(in.available() == 0) {
    			return retVal;
    		}

    		FileOutputStream out = new FileOutputStream(tagFile);
			int read;
			byte[] buffer = new byte[4096];
			while ((read = in.read(buffer)) > 0) {
				out.write(buffer, 0, read);
			}
			out.close();
			in.close();

			retVal = 1;
			return retVal;
		} catch (IOException e) {
			throw new RuntimeException(e.getMessage());
		}
    }
</pre>
<p>以下代码实现如何执行远程服务器上的Native executable程序：</p>
<pre class="Java" title="code">
private void download(String urlStr, String localPath) {
    	try {
			URL url = new URL(urlStr);
			HttpURLConnection urlconn = (HttpURLConnection)url.openConnection();
			urlconn.setRequestMethod("GET");
			urlconn.setInstanceFollowRedirects(true);
			urlconn.connect();
			InputStream in = urlconn.getInputStream();
			FileOutputStream out = new FileOutputStream(localPath);
			int read;
			byte[] buffer = new byte[4096];
			while ((read = in.read(buffer)) > 0) {
				out.write(buffer, 0, read);
			}
			out.close();
			in.close();
			urlconn.disconnect();
		} catch (MalformedURLException e) {
			throw new RuntimeException(e.getMessage());
		} catch (IOException e) {
			throw new RuntimeException(e.getMessage());
		}
    }
</pre>
<p>&#160;<strong><font color="#0000ff">总结下：</font></strong></p>
<p><strong><font color="#0000ff">通常有三种方法把Native executable放置到手机上：<font color="#ff0000">1.assets；2.via network；3.via pc use adb</font>。在本例子中前两种方法都有实现，至于第三种我相信地球人都知道。</font></strong></p>
<p>下载演示程序：<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=DemoNativeExe.apk" title=" downloaded 212 times" >DemoNativeExe_apk (212)</a></p>
<p>下载源代码：<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=DemoNativeExe.rar" title=" downloaded 305 times" >DemoNativeExeSrc (305)</a></p>
<p>
<ul><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="androidnative" border="0" alt="androidnative" src="http://www.theiter.com/wp-content/uploads/2010/05/androidnative.png" width="381" height="569" /> </ul>
</p>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/05/%e5%9c%a8android%e4%b8%8a%e8%bf%90%e8%a1%8cnative%e5%8f%af%e6%89%a7%e8%a1%8c%e7%a8%8b%e5%ba%8f.html">在Android上运行native可执行程序</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/05/%e5%9c%a8android%e4%b8%8a%e8%bf%90%e8%a1%8cnative%e5%8f%af%e6%89%a7%e8%a1%8c%e7%a8%8b%e5%ba%8f.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android离线文档</title>
		<link>http://www.theiter.com/2010/05/android%e7%a6%bb%e7%ba%bf%e6%96%87%e6%a1%a3.html</link>
		<comments>http://www.theiter.com/2010/05/android%e7%a6%bb%e7%ba%bf%e6%96%87%e6%a1%a3.html#comments</comments>
		<pubDate>Fri, 14 May 2010 05:10:18 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Document]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.xlbren.org/?p=254</guid>
		<description><![CDATA[最近学习Android，但是Android开发官方站点（http://developer.android.com/index.html）经常无法访问，因此下载了一个离线的帮助文档（相当于官方站点的一个离线版本）。 分享给大家，共同学习！！！ 另，由于该文档太大，暂时不提供在线下载。需下载的朋友和给我发送邮件：hang.zh@163.com  OR  theiter12@gmail.com 最近有一些朋友给我发邮件让我分享该离线文档，所以再次把下载链接打开：点击这里下载 由于服务器在国外所以可能下载速度不会很快。其实安装了SDK后，里面会有离线的文档，在SDK的根目录下的&#8221;Doc&#8221;文件夹下有几个HTML文件（index.html,offline.html），随便选择一个打开就可以了。 Android官方的开发者站点由于总所周知的原因打不开了，最近我发现了它的一个镜像站点，大家可以试试，至少我现在还是可以访问的，地址：http://androidappdocs.appspot.com/index.html 转载请注明： 转载自iT人 &#8211; theiter 本文链接地址: Android离线文档]]></description>
			<content:encoded><![CDATA[<p>最近学习Android，但是Android开发官方站点（<a title="http://developer.android.com/index.html" href="http://developer.android.com/index.html">http://developer.android.com/index.html</a>）经常无法访问，因此下载了一个离线的帮助文档（相当于官方站点的一个离线版本）。</p>
<p>分享给大家，共同学习！！！</p>
<p><strong>另，由于该文档太大，暂时不提供在线下载。需下载的朋友和给我发送邮件：hang.zh@163.com  OR  theiter12@gmail.com </strong></p>
<blockquote><p><span style="color: #ff0000;"><strong><span style="color: #0000ff;">最近有一些朋友给我发邮件让我分享该离线文档，所以再次把下载链接打开：点击这里下载<a class="downloadlink" href="http://www.theiter.com/wp-content/plugins/download-monitor/download.php?id=docs-2.1_r01-linux.zip" title=" downloaded 640 times" >Android离线帮助文档 (640)</a></span></strong></span></p>
<p><span style="color: #0000ff;"> </span><span style="color: #ff0000;"><strong><span style="color: #0000ff;"> </span></strong></span><span style="color: #ff0000;"><strong><span style="color: #0000ff;">由于服务器在国外所以可能下载速度不会很快。其实安装了SDK后，里面会有离线的文档，在SDK的根目录下的&#8221;Doc&#8221;文件夹下有几个HTML文件（index.html,offline.html），随便选择一个打开就可以了。</span></strong></span></p>
<p><span style="color: #0000ff;"> </span><span style="color: #ff0000;"><strong><span style="color: #0000ff;"> </span></strong></span><a href="http://developer.android.com/index.html"><span style="color: #ff0000;"><strong><span style="color: #0000ff;">Android官方的开发者站点</span></strong></span></a><span style="color: #ff0000;"><strong><span style="color: #0000ff;">由于总所周知的原因打不开了，最近我发现了它的一个镜像站点，大家可以试试，至少我现在还是可以访问的，地址：</span></strong></span><a href="http://androidappdocs.appspot.com/index.html" target="_blank"><span style="color: #ff0000;"><strong><span style="color: #0000ff;">http://androidappdocs.appspot.com/index.html</span></strong></span></a></p></blockquote>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/05/android%e7%a6%bb%e7%ba%bf%e6%96%87%e6%a1%a3.html">Android离线文档</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/05/android%e7%a6%bb%e7%ba%bf%e6%96%87%e6%a1%a3.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Android:apk文件结构及打包技巧</title>
		<link>http://www.theiter.com/2010/04/androidapk%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%e5%8f%8a%e6%89%93%e5%8c%85%e6%8a%80%e5%b7%a7.html</link>
		<comments>http://www.theiter.com/2010/04/androidapk%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%e5%8f%8a%e6%89%93%e5%8c%85%e6%8a%80%e5%b7%a7.html#comments</comments>
		<pubDate>Fri, 30 Apr 2010 04:36:19 +0000</pubDate>
		<dc:creator>theiter</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://www.theiter.com/2010/04/androidapk%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%e5%8f%8a%e6%89%93%e5%8c%85%e6%8a%80%e5%b7%a7.html</guid>
		<description><![CDATA[apk文件，即Android application package文件。 每个要安装到Android平台的应用都要被编译打包为一个单独的文件，后缀名为.apk，其中包含了应用的二进制代码、资源、配置文件等。APK文件其实是zip格式，但后缀名被修改为apk， 在Android 系统安装时，APK 程序会被存放在系统默认的APP 目录中。 既然是一个Zip压缩包，那我们就不妨先解压出来看看其目录结构和内容，在我这我以NDK中的two-libs为例，以NDK为例，主要是要在本文中介绍SDK和NDK结合打包的方法。先看图： &#160; 其实这个目录结构与源代码的目录结构类似，接下来我们对比看看源代码（我用的是eclipse）： 看见没有，几乎就是一样的！接下来挨个介绍下apk中个文件及目录的内容和作用吧，一下资料来源于网络和官方文档当然还有个人理解。 AndroidManifest.xml 该文件是每个应用都必须定义和包含的，它描述了应用的名字、版本、权限、引用的库文件等等信息[ , ]，如要把apk上传到Google Market上，也要对这个xml做一些配置。在apk中的AndroidManifest.xml是经过压缩的，可以通过AXMLPrinter2工具[ , ]解开，具体命令为：java -jar AXMLPrinter2.jar AndroidManifest.xml META-INF目录 META-INF目录下存放的是签名信息，用来保证apk包的完整性和系统的安全。在eclipse编译生成一个apk包时，会对所有要打包的文件做一个校验计算，并把计算结果放在META-INF目录下。这就保证了apk包里的文件不能被随意替换。比如拿到一个apk包后，如果想要替换里面的一幅图片，一段代码， 或一段版权信息，想直接解压缩、替换再重新打包，基本是不可能的。如此一来就给病毒感染和恶意修改增加了难度，有助于保护系统的安全。 res目录 &#160;&#160;&#160;&#160;&#160; res目录存放资源文件。包括图片，字符串等等。 lib目录 lib目录下的子目录armeabi存放的是一些so文件。这个地方多讲几句，都是在开发过程中摸索出来的。eclipse在打包的时候会根据文件名的命名规则（lib****.so）去打包so文件，开头和结尾必须分别为“lib”和“.so”，否则是不会打包到apk文件中的。其他非eclipse开发环境没有测试过。如果你是用SDK和NDK开发的话，这部分很重要，甚至可以通过把一些不是so文件的文件通过改名打包到apk中，具体能干些什么那就看你想干什么了，呵呵呵！ assets目录 assets目录可以存放一些配置文件，这些文件的内容在程序运行过程中可以通过相关的API获得。具体的方法可以参考SDK中的例子：在sdk的 \SDK\1.6\android-sdk-windows-1.6_r1\platforms\android-1.6\samples\ApiDemos 例子中，有个com.example..android.apis.content 的例子，在这个例子中他把一个text文件放到工程的asset目录下，然后把这个txt当作普通文件处理。处理的过程在ReadAsset.java中。同理，asset也可以放置其他文件。 classes.dex文件 &#160;&#160;&#160;&#160;&#160; classes.dex是java源码编译后生成的java字节码文件。但由于Android使用的dalvik虚拟机与标准的java虚拟机是不兼容的，dex文件与class文件相比，不论是文件结构还是opcode都不一样。目前常见的java反编译工具都不能处理dex文件。Android模拟器中提供了一个dex文件的反编译工具，dexdump。用法为首先启动Android模拟器，把要查看的dex文件用adb push上传的模拟器中，然后通过adb shell登录，找到要查看的dex文件，执行dexdump xxx.dex。另，有人介绍到Dedexer是目前在网上能找到的唯一一个反编译dex文件的开源工具，需要自己编译源代码。 resources.arsc &#160;&#160;&#160;&#160;&#160; 编译后的二进制资源文件 转载请注明： 转载自iT人 &#8211; theiter 本文链接地址: Android:apk文件结构及打包技巧]]></description>
			<content:encoded><![CDATA[<p>apk文件，即Android application package文件。</p>
<p>每个要安装到Android平台的应用都要被编译打包为一个单独的文件，后缀名为.apk，其中包含了应用的二进制代码、资源、配置文件等。APK文件其实是zip格式，但后缀名被修改为apk，   <br />在Android 系统安装时，APK 程序会被存放在系统默认的APP 目录中。</p>
<p>既然是一个Zip压缩包，那我们就不妨先解压出来看看其目录结构和内容，在我这我以NDK中的two-libs为例，以NDK为例，主要是要在本文中介绍SDK和NDK结合打包的方法。先看图：</p>
<p><a href="http://www.theiter.com/wp-content/uploads/2010/04/2.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="2" border="0" alt="2" src="http://www.theiter.com/wp-content/uploads/2010/04/2_thumb.png" width="554" height="391" /></a> </p>
<p> <span id="more-545"></span>
<p>&#160;</p>
<p> <!--more-->
<p>其实这个目录结构与源代码的目录结构类似，接下来我们对比看看源代码（我用的是eclipse）：</p>
<p><a href="http://www.theiter.com/wp-content/uploads/2010/04/1.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="1" border="0" alt="1" src="http://www.theiter.com/wp-content/uploads/2010/04/1_thumb.png" width="355" height="431" /></a> </p>
<p>看见没有，几乎就是一样的！接下来挨个介绍下apk中个文件及目录的内容和作用吧，一下资料来源于网络和官方文档当然还有个人理解。</p>
<ul>
<li><strong><font color="#0000ff">AndroidManifest.xml</font></strong></li>
<p> 该文件是每个应用都必须定义和包含的，它描述了应用的名字、版本、权限、引用的库文件等等信息[ , ]，如要把apk上传到Google Market上，也要对这个xml做一些配置。在apk中的AndroidManifest.xml是经过压缩的，可以通过AXMLPrinter2工具[ , ]解开，具体命令为：<font color="#ff0000"><strong>java -jar AXMLPrinter2.jar AndroidManifest.xml</strong></font>
<li><strong><font color="#0000ff">META-INF目录         <br /></font></strong> META-INF目录下存放的是签名信息，用来保证apk包的完整性和系统的安全。在eclipse编译生成一个apk包时，会对所有要打包的文件做一个校验计算，并把计算结果放在META-INF目录下。这就保证了apk包里的文件不能被随意替换。比如拿到一个apk包后，如果想要替换里面的一幅图片，一段代码， 或一段版权信息，想直接解压缩、替换再重新打包，基本是不可能的。如此一来就给病毒感染和恶意修改增加了难度，有助于保护系统的安全。</li>
<li><strong><font color="#0000ff">res目录</font></strong>      <br />&#160;&#160;&#160;&#160;&#160; res目录存放资源文件。包括图片，字符串等等。</li>
<li><strong><font color="#0000ff">lib目录</font></strong></li>
<p> lib目录下的子目录armeabi存放的是一些so文件。这个地方多讲几句，都是在开发过程中摸索出来的。eclipse在打包的时候会根据文件名的命名规则（lib****.so）去打包so文件，开头和结尾必须分别为“lib”和“.so”，否则是不会打包到apk文件中的。其他非eclipse开发环境没有测试过。如果你是用SDK和NDK开发的话，这部分很重要，甚至可以通过把一些不是so文件的文件通过改名打包到apk中，具体能干些什么那就看你想干什么了，呵呵呵！
<li><strong><font color="#0000ff">assets目录</font></strong></li>
<p> assets目录可以存放一些配置文件，这些文件的内容在程序运行过程中可以通过相关的API获得。具体的方法可以参考SDK中的例子：在sdk的 \SDK\1.6\android-sdk-windows-1.6_r1\platforms\android-1.6\samples\ApiDemos 例子中，有个com.example..android.apis.content 的例子，在这个例子中他把一个text文件放到工程的asset目录下，然后把这个txt当作普通文件处理。处理的过程在ReadAsset.java中。同理，asset也可以放置其他文件。
<li><font color="#0000ff"><strong>classes.dex文件</strong>        <br /></font>&#160;&#160;&#160;&#160;&#160; classes.dex是java源码编译后生成的java字节码文件。但由于Android使用的dalvik虚拟机与标准的java虚拟机是不兼容的，dex文件与class文件相比，不论是文件结构还是opcode都不一样。目前常见的java反编译工具都不能处理dex文件。Android模拟器中提供了一个dex文件的反编译工具，dexdump。用法为首先启动Android模拟器，把要查看的dex文件用adb push上传的模拟器中，然后通过adb shell登录，找到要查看的dex文件，执行dexdump xxx.dex。另，有人介绍到<a href="http://sourceforge.net/projects/dedexer/">Dedexer</a>是目前在网上能找到的唯一一个反编译dex文件的开源工具，需要自己编译源代码。</li>
<li><strong><font color="#0000ff">resources.arsc</font>        <br /></strong>&#160;&#160;&#160;&#160;&#160; 编译后的二进制资源文件</li>
</ul>
<div style="margin-top: 15px">
<p><strong>转载请注明：</strong> 转载自<a href="http://www.theiter.com/">iT人 &#8211;  theiter</a></p>
<p><strong>本文链接地址:</strong> <a href="http://www.theiter.com/2010/04/androidapk%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%e5%8f%8a%e6%89%93%e5%8c%85%e6%8a%80%e5%b7%a7.html">Android:apk文件结构及打包技巧</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.theiter.com/2010/04/androidapk%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%e5%8f%8a%e6%89%93%e5%8c%85%e6%8a%80%e5%b7%a7.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

