0

I have a path of apk file in sd-card and i need to get the package name of that file.

Is there any way to get application package name from the apk file in android?

dodojoe
  • 85
  • 1
  • 7

2 Answers2

1

Use the Android Asset Packaging Tool (aapt)

aapt dump badging /path/to/app.apk | grep package:\ name

Oss
  • 4,232
  • 2
  • 20
  • 35
0

The apk is just a zip container - so you could unzip the apk and extract the manifest and parse the packagename from it. There might be a more convenient way to do this - but I am not aware of it

ligi
  • 39,001
  • 44
  • 144
  • 244