public abstract class AbstractApkFile extends Object implements Closeable
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
AbstractApkFile.CertificateFile |
| 构造器和说明 |
|---|
AbstractApkFile() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected abstract ByteBuffer |
fileData()
return the whole apk file as ByteBuffer
|
protected ByteBuffer |
findApkSignBlock()
Create ApkSignBlockParser for this apk file.
|
protected abstract List<AbstractApkFile.CertificateFile> |
getAllCertificateData() |
Map<String,List<CertificateMeta>> |
getAllCertificateMetas()
已过时。
use {
getApkSingers()} instead |
List<IconFace> |
getAllIcons()
This method return icons specified in android manifest file, application.
|
ApkMeta |
getApkMeta()
return decoded AndroidManifest.xml
|
List<ApkSigner> |
getApkSingers()
Get the apk's all cert file info, of apk v1 signing.
|
List<ApkV2Signer> |
getApkV2Singers()
Get the apk's all signer in apk sign block, using apk singing v2 scheme.
|
List<CertificateMeta> |
getCertificateMetaList()
已过时。
use {
getApkSingers()} instead |
DexClass[] |
getDexClasses()
get class infos form dex file. currently only class name
|
abstract byte[] |
getFileData(String path)
read file in apk into bytes
|
Icon |
getIconFile()
已过时。
use
getAllIcons() |
List<Icon> |
getIconFiles()
已过时。
using
getAllIcons() instead |
List<IconPath> |
getIconPaths()
已过时。
using
getAllIcons() instead |
Set<Locale> |
getLocales()
get locales supported from resource file
|
String |
getManifestXml()
return decoded AndroidManifest.xml
|
Locale |
getPreferredLocale()
The local used to parse apk
|
void |
setPreferredLocale(Locale preferredLocale)
The locale preferred.
|
String |
transBinaryXml(String path)
trans binary xml file to text xml file.
|
abstract ApkSignStatus |
verifyApk()
已过时。
using google official ApkVerifier of apksig lib instead.
|
public String getManifestXml() throws IOException
IOExceptionpublic ApkMeta getApkMeta() throws IOException
IOExceptionpublic Set<Locale> getLocales() throws IOException
IOException@Deprecated public List<CertificateMeta> getCertificateMetaList() throws IOException, CertificateException
getApkSingers()} instead@Deprecated public Map<String,List<CertificateMeta>> getAllCertificateMetas() throws IOException, CertificateException
getApkSingers()} insteadpublic List<ApkSigner> getApkSingers() throws IOException, CertificateException
public List<ApkV2Signer> getApkV2Singers() throws IOException, CertificateException
protected abstract List<AbstractApkFile.CertificateFile> getAllCertificateData() throws IOException
IOExceptionpublic abstract byte[] getFileData(String path) throws IOException
IOExceptionprotected abstract ByteBuffer fileData() throws IOException
IOExceptionpublic String transBinaryXml(String path) throws IOException
path - the xml file path in apk fileIOExceptionpublic List<IconFace> getAllIcons() throws IOException
IOException@Deprecated public Icon getIconFile() throws IOException
getAllIcons()IOException@Deprecated public List<IconPath> getIconPaths() throws IOException
getAllIcons() insteadIOException@Deprecated public List<Icon> getIconFiles() throws IOException
getAllIcons() insteadIOExceptionpublic DexClass[] getDexClasses() throws IOException
IOException@Deprecated public abstract ApkSignStatus verifyApk() throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic Locale getPreferredLocale()
public void setPreferredLocale(Locale preferredLocale)
protected ByteBuffer findApkSignBlock() throws IOException
IOExceptionCopyright © 2019. All rights reserved.