Installing an app from Play Store using the command line - Other Tools & General Discussion

Is it possible to install an app from Play Store using the command line and if yes, how?
What I am trying to accomplish is something similar to using adb install file.apk but instead of an apk file the target would be a package name of a Play Store app (for e.g. adb install com.spotify.mobile.android.ui).
Is something like this possible?

Related

how to install an apk that has "com.appname" as file name?

I've tried to install a few apps like the google app that is named "com.googlemusicbeta.apk" and I've noticed that everytime I try and load an app that starts with com.name, I can't install it; I get an error.
Is there something I don't know about this?
They need to be installed as system apps. The do this using either adb or terminal emulator and push the files to system/app.
Sent from my LT15i using XDA Premium App

[Q] Is copying an .apk into /{system, data}/app sufficient to install an Android app?

If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
oldyoungguy said:
If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
Click to expand...
Click to collapse
Some .Apk's can be placed in system/data/app while others can't , make sure the .apk you're trying to place in system/data/app is supported or you may end up restoring your device. if the apk can run from the system /data/app then yes with the right permissions ...
Apk's from the market will give you detailed info from the apk like permission needed , supported devices ect, even the developers contact info ( in other word they are approved by Google.
while "sideloaded" apk or web apk (not coming from Google) are pirates apk,modified apk ect. who knows what permissions it needs or what info you are sharing with whoever modified the apk...
So be careful what you get into your device and where is placed on your device
Sent from my SPH-M930BST using Tapatalk 2
oldyoungguy said:
If not, what else is done under the covers?
Also, what are the differences when installing applications
•From the android market
•sideloaded from web download
•sideloaded using adb install
•sideloaded using adb push
I copied this question from another place (I cannot put link here because I am new here) because I also have the same question and want to know more about this.
Click to expand...
Click to collapse
Simply placing the apk into the correct folder is not enough. You will also need to set the permissions to the same as the other apps in that folder (I can't remember the permissions off the top of my head). This can easily be done using Root explorer, or using an adb shell and the chmod command.
Play Store installs and sideloaded installs achieve the same result, however you will want to be careful where you download apk files from. Apps from the Play Store are less likely to be malicious in nature, and , of course, you should never be pirating paid apps.
Adb push would not be enough as you would still need to set permissions. Unless you are installing a system app, it is better just to use adb install.
rootedVette said:
Adb push would not be enough as you would still need to set permissions. Unless you are installing a system app, it is better just to use adb install.
Click to expand...
Click to collapse
Are you saying the "adb push" will only copy file into the target location but "adb install" will copy the file into the target location AND also set the proper permission for you?
With all of the usual warnings about the source/safety of "side-loaded" apps aside. . .
I simply put the .apk file onto the SD card (anywhere), and then use a file manager like Astro to "open" it (root access not required). You will be prompted to see if you really wanted to install the app. Then let Android do its thing. The app will be installed where it belongs, with all the permissions it needs.
For this to work, you must first tell the device to allow installation of apps from unknown sources. Go to Settings | Security, and check Unknown Sources.

how to find apks on my device

Hi everyone,
There is a way to find the .apk of apps downloaded from playstore. ull need root and root browser, we will use here esfile explorer. open esfile explorer and press top left-->tools enable root explorer and show hidden files, then go to local-->device now go to file data-->app and thats it, to find system apps u can go to device-->system-->app.
Wiked dudes production
Pull Apk in Non-Rooted Device.
There is no need of a rooted device,
you can pull the apk by using following techniques.
//_______________________________________________________
A) Using ADB
1) Determine the package name of the app, e.g. "com.whatsapp" (WhatsApp).
if you don't know the package name, you have 2 options to get the package name
i) Visit play store and search for the desired application, The link of the app contains the package name. "https://play.google.com/store/apps/details?id=com.whatsapp" (WhatsApp) where com.whatsapp is the package name
ii) use command "adb shell pm list packages" , this will list the package name of all application installed.
2) Once you know the package name, get the apk installed path by using command "adb shell pm path com.whatsapp"
it will return the apk path of the application, like this
package:/data/app/com.whatsapp-2/base.apk
3) Now to pull apk, by using command "adb pull /data/app/com.whatsapp-2/base.apk"
Apk will be extracted to the same folder where adb is present
//_______________________________________________________
B) Using ESFileExplorer
1) Open ESFileExplorer and navigate to User Apps either by (swiping left to right twice) or (goto APP under Library in Navigation Drawer)
2) Select App you want to pull, and click on Share.
3) Share the Apk to another device via Bluetooth or to desktop via AirDroid,
shanrais said:
There is no need of a rooted device,
you can pull the apk by using following techniques.
//_______________________________________________________
A) Using ADB
1) Determine the package name of the app, e.g. "com.whatsapp" (WhatsApp).
if you don't know the package name, you have 2 options to get the package name
i) Visit play store and search for the desired application, The link of the app contains the package name. "https://play.google.com/store/apps/details?id=com.whatsapp" (WhatsApp) where com.whatsapp is the package name
ii) use command "adb shell pm list packages" , this will list the package name of all application installed.
2) Once you know the package name, get the apk installed path by using command "adb shell pm path com.whatsapp"
it will return the apk path of the application, like this
package:/data/app/com.whatsapp-2/base.apk
3) Now to pull apk, by using command "adb pull /data/app/com.whatsapp-2/base.apk"
Apk will be extracted to the same folder where adb is present
//_______________________________________________________
B) Using ESFileExplorer
1) Open ESFileExplorer and navigate to User Apps either by (swiping left to right twice) or (goto APP under Library in Navigation Drawer)
2) Select App you want to pull, and click on Share.
3) Share the Apk to another device via Bluetooth or to desktop via AirDroid,
Click to expand...
Click to collapse
ur right however, not all system apps are present using the second way, and first way is complicated for some people and might confuse them. if someone would want to change something he saw on google, that is connected to system apps or other stuff"like systemui" i think rooting and copying the apk from its directory is best. btw thanks for ur concern about this, believe it or not for the first 7 month i posted this it posted in android wear, and no one was commenting, i made it with the xda app, i think it has alot of bugs.
Lord_of_Death said:
ur right however, not all system apps are present using the second way, and first way is complicated for some people and might confuse them. if someone would want to change something he saw on google, that is connected to system apps or other stuff"like systemui" i think rooting and copying the apk from its directory is best. btw thanks for ur concern about this, believe it or not for the first 7 month i posted this it posted in android wear, and no one was commenting, i made it with the xda app, i think it has alot of bugs.
Click to expand...
Click to collapse
IMO, if one is able to root the phone, then he will certainly not find any complication in pulling apk using first way.
shanrais said:
IMO, if one is able to root the phone, then he will certainly not find any complication in pulling apk using first way.
Click to expand...
Click to collapse
u might be right bro but rooting is only downloading a file and flashing it through odin.

Install browser apk

On my previous phone I had installed Cyanogenmod 10.2.1.3-serranoltexx. This ROM contains a built-in browser "com.android.browser" (version 4.3.1.). I like this browser and I also want to install it, or a newer version, on my brand new rooted phone. Unfortunately I couldn't find it in the play store. Does anyone probably know where I can find the browser-APK?
I found the browser-APK in the cyanogenmod 10.2.1.3 zip-file and made a copy on the sdcard. But while installing I got the following error: "App not installed. An existing package by the same name is already installed”. I’ve searched on the root directory but I can’t find a file or app with the same name…
Is it possible to install the APK e.g. by renaming the package name? Or is there another work around to install the browser-APK?
NL_henk said:
On my previous phone I had installed Cyanogenmod 10.2.1.3-serranoltexx. This ROM contains a built-in browser "com.android.browser" (version 4.3.1.). I like this browser and I also want to install it, or a newer version, on my brand new rooted phone. Unfortunately I couldn't find it in the play store. Does anyone probably know where I can find the browser-APK?
I found the browser-APK in the cyanogenmod 10.2.1.3 zip-file and made a copy on the sdcard. But while installing I got the following error: "App not installed. An existing package by the same name is already installed”. I’ve searched on the root directory but I can’t find a file or app with the same name…
Is it possible to install the APK e.g. by renaming the package name? Or is there another work around to install the browser-APK?
Click to expand...
Click to collapse
Yes. You can install these browser apk by changing name and package name of app. You need to sign these apps too.
You can use apk editor app to change package name and it automatically sign your app.
Ashwinrg said:
Yes. You can install these browser apk by changing name and package name of app. You need to sign these apps too.
You can use apk editor app to change package name and it automatically sign your app.
Click to expand...
Click to collapse
Great! Do you also have some tutorial or website with more information?
I renamed the apk and all package names. Now I tried to recompile the APK, but I got an error: "Resource is not public".
How can I fix this?

[RESOLVED] Deleted Stock Files app by mistake, can't get it back

I have a rooted OP6 with Oxygen OS 11.1.1.1 and I accidentally deleted the Stock Files app thinking it was Google Files installed as a system app. How do I get it back. I tried using terminal systemizer to reinstall it but if I choose /system/app it says it already exists and if I choose /system/priv-app it installs but crashes upon launch. I got the APK file from ApkMirror. Both Files version 9 and Files beta version 10 don't work. How can I get it back?
Edit: Figured out how to get it back
Just get Terminal Emulator from the Play Store and enter the following commands.
su
Then
cmd package install-existing com.google.android.documentsui
(It's one command I don't know why it split up)
This works for any other system app too, just replace com.google.android.documentsui with any other package name.

Categories

Resources