Can I get APK file on phone of the installed applications

时光总嘲笑我的痴心妄想 提交于 2020-01-14 01:58:31

问题


I am trying to develop a application for backing up the files. I need to extract the APK files of installed applications like the Astro manager does.

If anyone know how to extract please give me the solution.


回答1:


They are stored in /data/app/ but unless your phone is rooted you won't see anything there.

System apk's are stored at /system/app

A better way of getting the exact apk path :

PackageManager  pm = getPackageManager();
List<PackageInfo> pkginfolist = pm.getInstalledPackages(PackageManager.GET_ACTIVITIES);
List<ApplicationInfo> appinfoList = pm.getInstalledApplications(0);
for (int x = 0; x < pkginfolist .size(); x++) {             
  PackageInfo pkginfo = pkginfolist.get(x);
  pkg_path[x] = appinfoList.get(x).publicSourceDir;  
}



回答2:


You need to root your phone first. Then install Android SDK.
run adb or ddms->file explorer, look for your interested-in APK in /system/app




回答3:


The most simplest method would be take backup of application using ASTRO file manager,

Open Astro File Manager> Tool > Application Manager > Backup see hep docs here.

it will backup your selected apps's .apk backup ! drop comment if any problems.



来源:https://stackoverflow.com/questions/7632156/can-i-get-apk-file-on-phone-of-the-installed-applications

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!