Reading android MANIFEST.MF file

前端 未结 2 1189
后悔当初
后悔当初 2021-01-15 09:04

Is there a way to read META-INF\\MANIFEST.MF file of the currently running application using Android API?

I want to read SHA1 for classes.dex file and use it as an e

2条回答
  •  庸人自扰
    2021-01-15 09:34

    Use following way to detect External Jar/SDK MANIFEST.MF Info. We could use this info for detecting Jar version etc. Use http://docs.oracle.com/javase/6/docs/api/java/util/jar/Manifest.html

    public void getSDKInfo() {
    Package package = Manifest.class.getPackage();
    String specTitle = package.getSpecificationTitle();
    String vendor = package.getSpecificationVendor();
    String virsion = package.getSpecificationVersion();
    }
    

提交回复
热议问题