I am writing a command line tool to get app name by package name, and trying the following ways.
PackageManager in android API provide the function, but mine tool is not an APK, thus there's no Context.
command AAPT can parse app name from apk,
adb shell aapt dump badging /data/app/com.google.android.apps.inbox-1/base.apk
, but my device has no aapt, I downloaded one from here, it complains "error: only position independent executables (PIE) are supported".
any helps?