Nvidia and Robotics w/ Barrett Williams – XDA:DevCon 2014

Robotics continues to dominate our videos from this years XDA:DevCon 2014 in … more

Speed Up Deodexing with JoelDroid Batch Deodexer

Android 5.0 Lollipop brings many under-the-hood changes like changing the default compiler … more

Top 5 Apps for 2014 + Top Xposed Mod of 2014 – XDA TV

Its that time of year where you look back and remember the things that happened … more

NVIDIA SHIELD Tablet Gets Android 5.0.1, OTA Available

The NVIDIA SHIELD Tablet is the latest Android-powered device released by famed GPU … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Install and run apk.file

OP stiphen

31st August 2014, 05:17 AM   |  #1  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Mar 2014
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.
1st September 2014, 12:11 AM   |  #2  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 405
 
452 posts
Join Date:Joined: Feb 2012
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, 04:33 AM   |  #3  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Mar 2014
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 04:36 AM.
1st September 2014, 07:07 AM   |  #4  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 405
 
452 posts
Join Date:Joined: Feb 2012
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, 09:32 AM   |  #5  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Mar 2014
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, 09:37 AM   |  #6  
quentin330's Avatar
Senior Member
Flag Bordeaux
Thanks Meter: 405
 
452 posts
Join Date:Joined: Feb 2012
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, 02:48 PM   |  #7  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Mar 2014
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