FORUMS

[FTF] Sony Xperia Z Lollipop Release

Sony rolled out a Lollipop update for Xperia Z just yesterday. If you still haven’t gotten … more

Original Moto G Receives Lollipop, OTA Captured

The original Moto G was released almost two years ago. Motorola still continues to … more

Device Review: No.1 X1 Rugged Smartphone

We are almost at the end of Q2 for 2015, and we have seen most of the flagship phones for the … more

When a Friend or Family Member Asks for a Phone Recommendation, What Do You Tell Them?

The majority of us here at XDA would consider … more
Post Reply Subscribe to Thread Email Thread

[Q] Install and run apk.file

31st August 2014, 04:17 AM |#1  
OP Member
Thanks Meter: 1
 
More
Is there any command on cmd.exe that would allow me to run apk.file after installing it .. like

adb install myapp.apk

This command will only install myapp onto the emulator and I have to manually run this application from the emulator (by performing single click on its icon).

What I want to do is use a command which not only installs the application but also run it or open it in the device after installation.
 
 
31st August 2014, 11:11 PM |#2  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 406
 
Donate to Me
More
Quote:
Originally Posted by stiphen

Is there any command on cmd.exe that would allow me to run apk.file after installing it .. like

adb install myapp.apk

This command will only install myapp onto the emulator and I have to manually run this application from the emulator (by performing single click on its icon).

What I want to do is use a command which not only installs the application but also run it or open it in the device after installation.

http://delphi.org/2013/11/installing...-command-line/
I think that is what you are looking for
1st September 2014, 03:33 AM |#3  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by quentin330

http://delphi.org/2013/11/installing...-command-line/
I think that is what you are looking for

after installing Myfile.apk

adb install Myfile.apk

and then try to run it in the device

adb shell am start -n com.other.Myfile.apk/.MainActivity


I get the error

Starting: Intent { cmp=com.other.Myfile.apk/ .MainActivity }
Error type 3
Error: Activity class {com.other.Myfile.apk/com.other.Myfile.apk.MainActivity} does not exist.


whereas Myfile.apk is installed
Last edited by stiphen; 1st September 2014 at 03:36 AM.
1st September 2014, 06:07 AM |#4  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 406
 
Donate to Me
More
Quote:
Originally Posted by stiphen

after installing Myfile.apk

adb install Myfile.apk

and then try to run it in the device

adb shell am start -n com.other.Myfile.apk/.MainActivity


I get the error

Starting: Intent { cmp=com.other.Myfile.apk/ .MainActivity }
Error type 3
Error: Activity class {com.other.Myfile.apk/com.other.Myfile.apk.MainActivity} does not exist.


whereas Myfile.apk is installed

You have to remplace com.other by the name of the package and MainActivity by the name of the activity you want to open
1st September 2014, 08:32 AM |#5  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by quentin330

You have to remplace com.other by the name of the package and MainActivity by the name of the activity you want to open

As in my first post .. I said I install apk file into my device by

adb install myfile.apk

OK it is installed into my device .. Now with command I want to open/run installed apk in my device .. I know i can normally run it by touching its icon .. but i want to do the same through the command ..
1st September 2014, 08:37 AM |#6  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 406
 
Donate to Me
More
Quote:
Originally Posted by stiphen

As in my first post .. I said I install apk file into my device by

adb install myfile.apk

OK it is installed into my device .. Now with command I want to open/run installed apk in my device .. I know i can normally run it by touching its icon .. but i want to do the same through the command ..

That's what you can do with the commands but you have to know which activity to open and in which package it is
1st September 2014, 01:48 PM |#7  
OP Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by quentin330

That's what you can do with the commands but you have to know which activity to open and in which package it is

as i am new .. i only know that i have installed an apk and is installed . now hoe come i know which package is this in and how can i run it
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes