0

In order to get a specific visa, I need to verify my ɪᴅ using a government official app. I went on the play store and it first showed as not being compatible because it requires ɴꜰᴄ which my phone doesn’t have.

So I manually downloaded the app and obtained an xapk because the single app consists of several .apk. So far no problems using adb install-multiple. I then launched that app to verify my ɪᴅ and then the app complained it wasn’t installed from the Google’s play store.

The solution to this situation is normally to simply install the apk using pm -i com.android.vending apk.

But how do that when the same app ɪᴅ consist of several .apk ?
Please also note it uses com.android.vending.CHECK_LICENSE for the same purpose so that setting the installer after isn’t enough.

user2284570
  • 459
  • 1
  • 9
  • 26
  • https://raccoon.onyxbits.de/blog/install-split-apk-adb/ – Robert Jun 10 '23 at 19:48
  • @Robert but unlike stock’s android pm, adb doesn’t have a full way to fake the installer. This means the app complains I should only download it for free from Google Play for my security… – user2284570 Jun 10 '23 at 20:07
  • I'm afraid this looks like an XY problem where X is "How to make apps that use CHECK_LICENSE work when installed from APK?" while Y is "How to install multiple APK using pm?" since there's a possibility that Play Store sets something on the server when installing from Play Store, thus pm may be irrelevant since it will just do the same installation process like from ADB (which you have successfully done). Your follow-up question is perhaps a more reasonable way to solve this issue. – Andrew T. Jun 11 '23 at 00:55
  • However, the question about installing multiple APK using pm itself is certainly on-topic, which @Robert 's comment has answered (the link mentioned ADB only for adb shell, but the main topic is using pm). Thus, consider trying that guide and let us know the result, or post it as a proper answer! – Andrew T. Jun 11 '23 at 01:33
  • @AndrewT. I told in my question adb install-multiple is how I got the app to complain it wasn’t installed from the Google’s Play Store. The pm/cmd package tool can fake the installer, but I don’t see how to use them on split ᴀᴘᴋs… App is supposed to be started off‑line so without accessing Google’s servers… – user2284570 Jun 12 '23 at 01:09
  • @user2284570 according to the official Android Developers guide, CHECK_LICENSE fetches the result of the license online from Google Play, so I'm not sure if the method to install the APK is still relevant... – Andrew T. Jun 12 '23 at 01:40
  • @AndrewT. just start the app using the airplane mode ! As a government app, getting it is free. – user2284570 Jun 12 '23 at 02:49
  • Have you tried the simple command pm set-installer "PACKAGE" "com.android.vending"? Or just read the pm help text then you will see that pm install-create also has the -i option. – Robert Jun 12 '23 at 07:21
  • @Robert it wouldn’t modify all files unlike a clean install, and set-installer can’t be used as root and thus can’t be used at all (ᴜɪᴅ 0 unsupported error message). – user2284570 Jun 12 '23 at 10:32

0 Answers0