资源简介
解析apk/ipa图标/名称/包名/版本号等信息,图标百分百解析出来,如果大家不需要解析图标,请移步到这篇博客:http://blog.csdn.net/moyanxuan_1993_2_24/article/details/51330060
代码片段和文件信息
package com.app;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.sinaapp.msdxblog.apkUtil.entity.ApkInfo;
import com.sinaapp.msdxblog.apkUtil.utils.ApkUtil;
import com.sinaapp.msdxblog.apkUtil.utils.IconUtil;
import com.sinaapp.msdxblog.apkUtil.utils.IpaUtil;
/**
* Servlet implementation class ReadAppUtil
*/
public class ReadAppUtil extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public ReadAppUtil() {
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
doPost(requestresponse);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
PrintWriter pw = response.getWriter();
ApkInfo apkInfo = null;
String serverPath = request.getRealPath(File.separator);
System.out.println(“============================serverPath:“ + serverPath);
try {
// String apkpath = “E:/tomcat/apache-tomcat-7.0.55-windows-x64/apache-tomcat-7.0.55/webapps/ReadApp/WEB-INF/classes/shenmiaotaowang_966.apk“;
//放一个apk文件到tomcat/webapps
String apkpath = “/usr/local/apache-tomcat-7.0.29/webapps/shenmiaotaowang_966.apk“;
apkInfo = new ApkUtil().getApkInfo(apkpath);
System.out.println(apkInfo);
//把图片解析到路径/usr/local/python/img/下面,且命名图片名称为apk.png
IconUtil.extractFileFromApk(apkpath apkInfo.getApplicationIcon()“/usr/local/python/img/apk.png“);
} catch (Exception e) {
e.printStackTrace();
}
try {
// Mapject> mapIpa = IpaUtil.readIPA(“E:/tomcat/apache-tomcat-7.0.55-windows-x64/apache-tomcat-7.0.55/webapps/ReadApp/WEB-INF/classes/拳皇97风云再起OL.ipa“);
//放一个ipa文件到tomcat/webapps
Mapject> mapIpa = IpaUtil.readIPA(“/usr/local/apache-tomcat-7.0.29/webapps/quanhuang.ipa“);
System.out.println(“======ipa==========“);
pw.println(“================================ipa begin==================================“);
for (String key : mapIpa.keySet()) {
System.out.println(key + “:“ + mapIpa.get(key));
pw.println(key + “:“ + mapIpa.get(key));
}
// Process process= Runtime.getRuntime().exec(“cmd.exe /c start E:\\python\\img\\serilizeImg.bat“);
//执行脚本文件,解析ipa文件图标 ,ipin.sh文件和ipin.py文件都放在python目录下
Process process= Runtime.getRuntime().exec(“sh /usr/local/python/ipin.sh“);
BufferedReade
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-10-26 19:26 ReadApp\
文件 744 2016-10-26 19:51 ReadApp\.classpath
文件 1040 2016-10-26 17:36 ReadApp\.project
目录 0 2016-10-26 18:13 ReadApp\.settings\
文件 567 2016-10-26 17:36 ReadApp\.settings\.jsdtscope
文件 95 2016-12-19 10:10 ReadApp\.settings\org.eclipse.core.resources.prefs
文件 364 2016-10-26 17:36 ReadApp\.settings\org.eclipse.jdt.core.prefs
文件 473 2016-10-26 17:36 ReadApp\.settings\org.eclipse.wst.common.component
文件 305 2016-10-26 17:36 ReadApp\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-10-26 17:36 ReadApp\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-10-26 17:36 ReadApp\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2016-10-26 19:23 ReadApp\build\
目录 0 2016-12-13 15:58 ReadApp\build\classes\
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\app\
文件 4363 2016-12-19 11:25 ReadApp\build\classes\com\app\ReadAppUtil.class
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\entity\
文件 5970 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\entity\ApkInfo.class
文件 1204 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\entity\ImpliedFeature.class
目录 0 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\utils\
文件 6273 2016-12-19 15:48 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\utils\ApkUtil.class
文件 3080 2016-12-13 15:58 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\utils\IconUtil.class
文件 4490 2016-12-19 11:25 ReadApp\build\classes\com\sinaapp\msdxblog\apkUtil\utils\IpaUtil.class
目录 0 2016-12-13 15:58 ReadApp\src\
目录 0 2016-10-26 19:07 ReadApp\src\com\
目录 0 2016-10-26 17:37 ReadApp\src\com\app\
文件 3623 2016-12-19 11:25 ReadApp\src\com\app\ReadAppUtil.java
目录 0 2016-10-26 19:07 ReadApp\src\com\sinaapp\
............此处省略74个文件信息
相关资源
- UniPatcher_v2017.6.exe和谐Unity2017.2
- Altium Designer16.06支持导入LOGO图标的脚
- 一键隐藏(或显示)桌面所有图标的
- 支付宝授权和支付相关文件
- oled0.96屏 电量图标 BMP
- 提取exe和dll中的图标
- 非常精美的几千个LabVIEW按钮图标
- 网络拓扑图图标
- PANO2VR 的皮肤,带地图导航,三种热点
- 中文版AutoCAD 2004工程绘图标准教程源
- Qt Creator应用程序发布及修改应用程序
- arcgis样式,部分林业样式按照制图标
- 智慧志汇同城小程序模板,图标,素
- 各种菜单图标和样式图标
- TRNSYS的Tess模型的图标文件
- ipa在线安装、plist实现
- 云龙国际音标输入法3.2版ipaInst
- element ui 离线压缩版 js css 含图标
- ztree整合bootstrap图标完整版本,所有功
- 易语言文件捆绑源码支持多种图标
- dtree插件bootstrap风格图标
- HIPAA3-6章课程中英文对比自动翻译,非
- 在combobox控件中添加图标
- ARX实现屏幕菜单(CAdUiPaletteSet)
- 隐藏VNC托盘图标.reg
- UniPatcher_v2017.6及以下可用.zip
- 记事本图标
- ArcGIS银火虫图标
- Axure元件库,84个白色图标
- 全球国家和国旗图标数据资料.zip
评论
共有 条评论