2

I was wondering if its possible to get Android application info like (name, version, md5, ...). Is there any API to create a MD5 hash of the application?

Thanks in advance

Martin Solac
  • 856
  • 1
  • 12
  • 21
  • From where do you want to get it? From inside the application itsself ? – Chris Mar 16 '11 at 15:16
  • I would like to get the information of all the applications installed on the device and also de MD5 hash of each application, That's possible? – Martin Solac Mar 16 '11 at 15:22

2 Answers2

1

You can get a list of all Applications by searching for Activities which handle the Main-Intent.

I found that code:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0);

here: How to get a list of installed android applications and pick one to run

So that just gets a list of the Applications. I think the md5 sums you want to make on the .apk files (the installation packages?). If so i don't know how to find this out, because its possible to have an application isntalled but the .apk is not on the phone anymore i think.

Hope that helps.

Community
  • 1
  • 1
Chris
  • 7,675
  • 8
  • 51
  • 101
  • Thank you for the info Chris ;) You can find the APK application in the following folder (if you have root access to it) #cd data/app/ If there's no API for doing that, another option is to get those APK and send them to another computer able to generate md5 fingerprint for example in PHP would be somthing like this: ); ?> – Martin Solac Mar 16 '11 at 16:57