0

I have a rooted device and I tried the find / -name "*Play*" command and got some files from com.google.android.gms and a couple of Playlists but nothing like Google Play Services.apk

I wonder if it is possible for an app to not have an .apk file and if this is the case is there any chance of finding the files associated with the app from the app name?

4
  • 1
    Check /data/app/com.google.android.gms- BsVSA3EfHVEHqoT_2Mu_nw==/base.apk Play Services are com.google.android.gms
    – beeshyams
    Oct 11 '20 at 7:15
  • .apk files of all system and user apps are accessible even without root. GMS is usually installed to /system/app and /system/priv-app (or possibly in /product partition). Updates go to /data/app/ like user apps. The string after package name is randomly generated at install time: android.stackexchange.com/a/215904/218526 Oct 11 '20 at 8:22
  • The apk file name usually bases on the package name of an app, not of the localized app name which is defined in the AndroidManifest respectively the app resources.arsc file within the apk.
    – Robert
    Oct 11 '20 at 10:22
  • adb shell pm path com.google.android.gms | awk -F':' '{print $2}' should do the trick. The resulting string can then be used with adb pull $path to grab the APK from the device and store it on your computer. No root needed, as was already pointed out.
    – Izzy
    Oct 11 '20 at 10:58
1

You won't need root for that, but can utilize the pm command either on-device from within a terminal, or via :

adb shell pm path com.google.android.gms | awk -F':' '{print $2}

will give you the full path including the file name, so you could use that to pull the APK from your device to your computer:

adb pull $(adb shell pm path com.google.android.gms | awk -F':' '{print $2})

To answer the other parts from your question:

  • every app has an *.apk file. Some might even have multiple ("split APKs").
  • finding the APK by the (localized) app name is not trivial. You'd have to parse the entire app list to get the package names, use those to get the location of the APK as described above, and then use aapt to extract and match the localized name (I haven't yet found whether and if where Android might store that outside the APK). aapt usually isn't present on-device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.