1. Go to this page and download the library: Download evozi/apk-parser-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
foreach ($apk->getClasses() as $className) {
echo $className . PHP_EOL; // e.g. com.example.app.MainActivity
}
// Resolve resource references from the manifest, e.g. the app label and icon
$label = $apk->getResources($manifest->getApplication()->getLabel());
echo $label[0];
$icons = $apk->getResources($manifest->getApplication()->getIcon());
foreach ($icons as $icon) {
file_put_contents(basename($icon), stream_get_contents($apk->getStream($icon)));
}
// Resources can also be looked up by symbolic name instead of hex id —
// "string/app_name" and "@string/app_name" both work:
$appName = $apk->getResources('@string/app_name');
// Or fetch the entire resource table at once, indexed by hex resource id:
$all = $apk->getAllResources();
$apk->extractTo('/path/to/output'); // everything
$apk->extractTo('/path/to/output', $entries); // or only specific entries