得到一个.apk文件的主包名称 [英] Get the Main Package Name of an .apk File

查看:226
本文介绍了得到一个.apk文件的主包名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用命令line.for,我知道有一个由亚行命令的方法来启动Android模拟器的应用;

I have to launch an application on android emulator using command line.for that I have knew that there is a method by adb command;

adb shell am start -a android.intent.action.MAIN -n com.example.myApplication

但我不得不执行此命令之前找到应用程序包的名字,所以任何人都帮我找包名称,或上运行模拟器APK任何替代的解决方案。

but I have to find the application package name before executing this command, so anybody help me to find the package name, or any alternate solution for running apk on emulator

推荐答案

提取apk文件,并重建了清单文件,然后通过解析XML清单文件,你可以找到的主要活动包名。
参照<一个href=\"http://stackoverflow.com/questions/2097813/how-to-parse-the-androidmanifest-xml-file-inside-an-apk-package\">this链接解析,并参阅此链接提取apk文件。

extract the apk file and rebuilt the manifest file, then by parsing the xml manifest file you can find the main activity package name. refer this link for parsing, and refer this link for extracting apk file.

这篇关于得到一个.apk文件的主包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆