title: Given an APK file, is it possible to know if it's a part of a split APK files, or a stand-alone?
body: <h2>Background</h2>
  
  <p>Sometimes when you backup some APK file of an app, you'd notice that they consist of multiple APK files, meaning split APK files (AKA app-bundle).</p>
  
  <h2>The problem</h2>
  
  <p>I want to know, when someone sends the user an APK file, if indeed it's a standalone one, or is a part of split APK files. The reason is a different procedure and even a warning of such a thing, because split APK files are not really meant to be installed as normal ones.</p>
  
  <h2>What I've tried</h2>
  
  <p>Given <code>PackageManager</code> class (<a href="https://developer.android.com/reference/android/content/pm/PackageManager" rel="noreferrer"><strong>here</strong></a>), I couldn't find a way for <a href="https://developer.android.com/reference/android/content/pm/PackageManager.html#getPackageArchiveInfo(java.lang.String,%20int)" rel="noreferrer"><strong>getPackageArchiveInfo</strong></a> to get this kind of information.</p>
  
  <p>There is <code>splitNames</code> and <code>splitRevisionCodes</code> , but both are just null.</p>
  
  <h2>My question</h2>
  
  <p>Is it possible, given a single APK file, to check if it's a part of multiple split APK files?</p>
  
  <hr>
  
  <p>EDIT: so thanks to <a href="https://stackoverflow.com/a/56093643/878126"><strong>here</strong></a>, I've found how to do it for the main APK of the split APK files ("base.APK") :</p>
  
  <pre><code>    val packageInfo = pm.getPackageArchiveInfo(apkPath, PackageManager.GET_META_DATA)
      val isSplit = packageInfo.applicationInfo.metaData.getBoolean("com.android.vending.splits.required", false)
  </code></pre>
  
  <p>But, as for the rest of the split apk files, using <code>getPackageArchiveInfo</code> on them will just return null. I can't find how to parse the manifest of them to find the "split" attribute.</p>
  
  <p>So my question now is:</p>
  
  <p>Given the rest of the split APK files, how can I parse them to check they are indeed split APK files , which belong to the base.APK file?</p>