How to extract android apk using PHP




It is the time of android world and we (developer ) curious to make an android apps but due to lack knowledge of native idea. So we want an alternative ways by which we can easily make an android apk. Here i’m telling you how to extract android apk apps.

And we use PHP for extract android apk which made any PHP or Android developer such a curious.

This package can extract application package files in APK format used by devices running on Android OS.
It can open an APK file and extract the contained manifest file to parse it and retrieve the meta-information it contains like the application name, description, device feature access permission it requires, etc..
ApkExtractor.php
<?php
include '../ApkParser.php';
$apk = new ApkParser('EBHS.apk');
$extractFolder = 'TechDilute';
if(is_dir($extractFolder) || mkdir($extractFolder))
{
$apk->extractTo($extractFolder);
}?>
 ApkInfo.php
<?php
include '../ApkParser.php';
$apk = new ApkParser('EBHS.apk');
$manifest = $apk->getManifest();
$permissions = $manifest->getPermissions();
echo '<pre>';
echo "Package Name      : " . $manifest->getPackageName()  . "\r\n";
echo "Vesrion           : " . $manifest->getVersionName()  . " (" . $manifest->getVersionCode() . ")\r\n";
echo "Min Sdk Level     : " . $manifest->getMinSdkLevel()  . "\r\n";
echo "Min Sdk Platfrom  : " . $manifest->getMinSdk()->platform['name'] ."\r\n";
echo "------------- Permssions List -------------\r\n";
foreach($permissions as $perm => $description)
{
echo $perm . "\t=> " . $description ." \r\n";
}
?>
PrinManifestXml.php
<?php
include '../ApkParser.php';
$apk = new ApkParser('EBHS.apk');
header("Content-Type:text/xml;Charset=UTF-8");
echo $apk->getManifest()->getXmlString();
?> 
First of all go download the package and go to example folder and change the EBHS.apk to your apps which you want to extract android apk and open above these three php file and replace apk name with your apps name.

Thats all.

Happy coding and have any queries please comment me .

0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment