查看 AndroidManifest.xml文件

1.Manifest Explorer

装在Android手机中,用此apk看系统中已安装应用的AndroidManifest.xml文件:

View Codeprotected boolean configForPackage(String packageName) {
		if (packageName == null || packageName == "")
			packageName = "android";
		AssetManager initAM = mCurAm;
		Resources initRes = mCurResources;
		try {
			mCurAm = createPackageContext(packageName, 0).getAssets();
			mCurResources = new Resources(mCurAm, getResources()
					.getDisplayMetrics(), null);
		} catch (NameNotFoundException name) {
			Toast.makeText(this, "Error, couldn't create package context: "
					+ name.getLocalizedMessage(), Toast.LENGTH_LONG);
			mCurAm = initAM;
			mCurResources = initRes;
			return false;
		} catch (RuntimeException unexpected) {
			Log.e(MANIFEST_TAG, "error configuring for package: " + packageName
					+ "" + unexpected.getMessage());
			mCurAm = initAM;
			mCurResources = initRes;
			return false;
		}
		return true;
	}

	protected void updateView() {
		this.mOut.setText("");
		try {
			XmlResourceParser xml = null;
			xml = mCurAm.openXmlResourceParser("AndroidManifest.xml");
			this.mInput.setText("/sdcard/" + getPkgName() + ".txt");
			this.mOut.append(getXMLText(xml, mCurResources));
		} catch (IOException ioe) {
			this.showError("Reading XML", ioe);
		}
	}

 

2.android-apktool

把apk放在PC中,配置好jdk环境后输入:

java –jar apktool.jar file_path.apk

嫌麻烦的可用第三方集成界面工具:APK改之理

3.aapt

aapt d[ump] [--values] WHAT file.{apk} [asset [asset ...]]

   badging          Print the label and icon for the app declared in APK.

   permissions      Print the permissions from the APK.

   resources        Print the resource table from the APK.

   configurations   Print the configurations in the APK.

   xmltree          Print the compiled xmls in the given assets.

   xmlstrings       Print the strings of the given compiled xml assets

 

查看apk包的packageName、versionCode、applicationLabel、launcherActivity、permission等各种详细信息

aapt dump badging <file_path.apk>

 

查看权限

aapt dump permissions <file_path.apk>

 

查看资源列表

aapt dump resources <file_path.apk>

 

查看apk配置信息

aapt dump configurations <file_path.apk>

 

查看指定apk的指定xml文件。

a.以树形结构输出的xml信息。

aapt dump xmltree <file_path.apk> res/***.xml

如:aapt dump xmltree <file_path.apk> AndroidManifest.xml可查看应用的该文件

b. 输出xml文件中所有的字符串信息。

aapt dump xmlstrings <file_path.apk> res/***.xml

4.xml-apk-parser  下载

java -jar APKParser.jar <file_path.apk> 可输出格式化后的该应用的AndroidManifest.xml文件

转载于:https://www.cnblogs.com/fanfeng/p/3236209.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值