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?
Use the Android Asset Packaging Tool (aapt)
aapt dump badging /path/to/app.apk | grep package:\ name
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