78 lines
2.1 KiB
TypeScript
78 lines
2.1 KiB
TypeScript
/*
|
|
{
|
|
"manifest": [
|
|
{
|
|
"@package": "com.example.android.snake",
|
|
"uses-permission": [
|
|
{
|
|
"@android:name": "android.permission.INTERNET"
|
|
}
|
|
],
|
|
"application": [
|
|
{
|
|
"@android:label": "Snake on a Phone",
|
|
"activity": [
|
|
{
|
|
"@android:theme": "@0x1030006",
|
|
"@android:name": "Snake",
|
|
"@android:screenOrientation": 1,
|
|
"@android:configChanges": "(type 0x11)0xa0",
|
|
"intent-filter": [
|
|
{
|
|
"action": [
|
|
{
|
|
"@android:name": "android.intent.action.MAIN"
|
|
}
|
|
],
|
|
"category": [
|
|
{
|
|
"@android:name": "android.intent.category.LAUNCHER"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
*/
|
|
|
|
declare module "apk-parser" {
|
|
export interface ApkParser {
|
|
parseApk(filePath: string): Promise<ApkInfo>;
|
|
}
|
|
|
|
export interface AdoidManifest {
|
|
"@package": string;
|
|
"uses-permission": Array<{
|
|
"@android:name": string;
|
|
}>;
|
|
application: Array<{
|
|
"@android:label": string;
|
|
activity: Array<{
|
|
"@android:theme": string;
|
|
"@android:name": string;
|
|
"@android:screenOrientation": number;
|
|
"@android:configChanges": string;
|
|
"intent-filter": Array<{
|
|
action: Array<{
|
|
"@android:name": string;
|
|
}>;
|
|
category: Array<{
|
|
"@android:name": string;
|
|
}>;
|
|
}>;
|
|
}>;
|
|
}>;
|
|
}
|
|
|
|
export interface ApkInfo {
|
|
manifest: AdoidManifest;
|
|
}
|
|
|
|
const apkParser: ApkParser;
|
|
export default apkParser;
|
|
}
|