Install Android programs from the Play Store without an account
I currently prefer to install Android programs from F-Droid.
It does not require an account; the source code of the program is scrutinized, and programs are built by those who distribute it. It works like most repositories used in different Linux distributions.
Because of their strict requirements, many programs are not available on F-Droid, in particular closed-source programs.
Some developers provide a download link to their .apk files, but most programs are distributed on the Play Store.
This does not mean that one has to configure Android with a Google account.
It is possible to copy one program from one phone to another after one enables the developer options:
# copy apk from connected phone to current directory
APPID="....";
APKPATH=$(adb shell pm path "$APPID" | awk -F: '{print $2}');
adb pull "$APKPATH" .;
# install apk on connected phone
adb install file.apk;Some programs, unfortunately, verify if they have been installed directly from the Play Store.
I strongly dislike this approach for two reasons.
The first one is that how a program has been installed should be completely irrelevant. It does not change how it works. It does not change what permission it has or can ask for.
The second one is that it makes it harder to backup and restore your phone. In fact, if the application gets removed from the Play Store, it seems it would not be possible to restore the program on a device after a reset in any way!
Fortunately, with adb it is possible to tell the Play Store to install a local apk.
# install apk on connected phone with the Play Store
APKFILE="...";
adb push "$APKFILE" /data/local/tmp/package.apk;
adb shell pm install -i com.android.vending /data/local/tmp/package.apk;or, as I found out later
# install apk on connected phone with the Play Store
APKFILE="...";
adb install -i com.android.vending "$APKFILE";Unfortunately, the process does not work that well for multi-split apks, and obviously, I had to deal lately with such a program, which is what triggered me to search for the correct command and note it here:
#!/bin/sh
# copy split apk to current directory
APPID="....";
for i in $(adb shell pm path "$APPID" | awk -F: '{print $2}'); do :;
adb pull "$i" . ;
done
# install split apk with Play Store (works also for single apk)
adb install-multiple -i com.android.vending base.apk split_config.*.apk;Note 📝 | install-multiple also works for single APKs. |
The main disadvantage of this approach is that it requires the Play Store (com.android.vending) to be installed on the device; at least you do not have to configure it.
The main advantage is that it works on the majority of devices; this process does not require administrative rights.
If you have questions, comments, or found typos, the notes are not clear, or there are some errors; then just contact me.