android - Get .apk by another application -



android - Get .apk by another application -

is there way installed application .apk file of one? i'm writing analysis app need send .apk remote server investigate it. not sure if possible @ all.

i don't want .apk file adb, because not help me.

thanks

yes, can done. here's how:

first, must list of installed applications. can done using snippet this question:

final intent mainintent = new intent(intent.action_main, null); mainintent.addcategory(intent.category_launcher); final list pkgappslist = getpackagemanager().queryintentactivities( mainintent, 0); (object object : pkgappslist) { resolveinfo info = (resolveinfo) object; file file =new file( info.activityinfo.applicationinfo.publicsourcedir); // re-create .apk file wherever }

this allows file reference apk installed on device. 1 time have file, can write external storage or upload server.

android android-package-managers

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -