How to launch a standard application in adb shell

11,133 views
Skip to first unread message

Jaewon

unread,
Apr 27, 2009, 1:31:26 AM4/27/09
to android-porting
Hi all.

I'm using Android Emulator and adb shell.
And I'm very wondering how to launch a standard application such as
browser in adb shell.

I think app_process should be used to do that.
But I don't know the exact way.

Does anyone know about that?

Thx.

Jaewon

unread,
Apr 27, 2009, 1:31:27 AM4/27/09
to android-porting

heyu...@gmail.com

unread,
Apr 27, 2009, 8:21:48 AM4/27/09
to android-porting
u can use this command install ur application on android emulator
# adb install hello.apk

removed ur application
#adb shell rm com.google.anroid.hello.apk

DineshG

unread,
Apr 27, 2009, 10:52:04 AM4/27/09
to android-porting
I think for removing applicxation you have to removce it fro mits
original location
adb install puts the .APK in /data/app

so while removing you should use command

adb shell rm /data/app/com.google.anroid.hello.apk

heyu...@gmail.com

unread,
Apr 27, 2009, 11:19:34 AM4/27/09
to android-porting
Oh yes.DineshG's words reminds me of the APP's original location.I
forgot it.
thk u very much.
> > > Thx.- Hide quoted text -
>
> - Show quoted text -

Dianne Hackborn

unread,
Apr 27, 2009, 1:01:54 PM4/27/09
to android...@googlegroups.com
Use "adb install <local path>" to install, "adb uninstall <package name>" to uninstall.

And use "adb shell am start ..." to launch activities.
--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

heyu...@gmail.com

unread,
Apr 27, 2009, 9:19:16 PM4/27/09
to android-porting
Hi:Thx Dianne Hackborn

i used "adb shell am start my application" to launch activities.
but it's error

The error INFO:

Starting: Intent { action=android.intent.action.VIEW data=hello.apk }
Error: Activity not started, unable to resolve Intent
{ action=android.intent.action.VIEW data=hello.apk flags=0x10000000 }

or

Starting: Intent { action=android.intent.action.VIEW data=/data/app/
com.goodle.android.hello.apk }
Error: Activity not started, unable to resolve Intent
{ action=android.intent.action.VIEW data=/data/app/
com.goodle.android.hello.apk flags=0x10000000 }

i can't how to solution it.

Thx

SmallBox

On Apr 28, 1:01 am, Dianne Hackborn <hack...@android.com> wrote:
> Use "adb install <local path>" to install, "adb uninstall <package name>" to
> uninstall.
>
> And use "adb shell am start ..." to launch activities.
>
> hack...@android.com

heyu...@gmail.com

unread,
Apr 27, 2009, 10:17:19 PM4/27/09
to android-porting
linux:/Android/android-sdk-linux_x86-1.0_r1/tools # adb shell am start
-a android.intent.action.call tel:123456
Starting: Intent { action=android.intent.action.call data=tel:123456 }
Error: Activity not started, unable to resolve Intent
{ action=android.intent.action.call data=tel:123456 flags=0x10000000 }
linux:/Android/android-sdk-linux_x86-1.0_r1/tools # ./adb shell am
start -a android.intent.action.CALL tel:123456
Starting: Intent { action=android.intent.action.CALL data=tel:123456 }

Jaewon

unread,
Apr 27, 2009, 10:36:34 PM4/27/09
to android-porting
Thx.

Someone around me told me how to do that by using am.

You can invoke application by am.
type 'am' in android shell to know the usage.

You may need to look at AndroidManifest.xml to know the each
application invoking path.
This is example.
Settings - am start -a android.intent.action.MAIN -n
com.android.settings/.Settings
Browser - am start -a android.intent.action.MAIN -n
com.android.browser/.BrowserActivity

Thx everyone.

On 4월28일, 오전2시01분, Dianne Hackborn <hack...@android.com> wrote:
> Use "adb install <local path>" to install, "adb uninstall <package name>" to
> uninstall.
>
> And use "adb shell am start ..." to launch activities.
>
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails. All such
> questions should be posted on public forums, where I and others can see and
> answer them.- 따온 텍스트 숨기기 -
>
> - 따온 텍스트 보기 -
Reply all
Reply to author
Forward
0 new messages