How to install APK programmatically without user prompt

2,198 views
Skip to first unread message

Pratik Prajapati

unread,
Sep 16, 2011, 1:32:05 PM9/16/11
to android-d...@googlegroups.com, android-...@googlegroups.com

I need to install some non market place APK programmatically without user prompt. I found some links on stackoverflow, but all those mechanism will prompt the user.
Is there any way to do it with some APIs or I should use 'pm install <apk name>' command (doing with system() api)?

--
Regards,
Pratik Prajapati



Jean-Baptiste Queru

unread,
Sep 16, 2011, 1:38:30 PM9/16/11
to android-...@googlegroups.com
That's possible. There's an API that Market uses for that. It's
protected by a permission that's only accessible to applications
installed in the system partition.

JBQ

> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To post to this group, send email to android-...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platfo...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?hl=en.
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Chris

unread,
Sep 16, 2011, 1:45:52 PM9/16/11
to android-d...@googlegroups.com, android-...@googlegroups.com, pratik.p...@gmail.com
You can't install apks silently.

Dianne Hackborn

unread,
Sep 16, 2011, 6:53:10 PM9/16/11
to android-...@googlegroups.com, android-d...@googlegroups.com
On Fri, Sep 16, 2011 at 10:32 AM, Pratik Prajapati <pratik.p...@gmail.com> wrote:
Is there any way to do it with some APIs or I should use 'pm install <apk name>' command (doing with system() api)?

(a) Running the pm command doesn't give you any extra privileges.
(b) NO shell commands are part of the SDK; using them will risk your application breaking.

--
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.

Bahar Ali

unread,
Sep 19, 2011, 1:15:36 AM9/19/11
to android-...@googlegroups.com, android-d...@googlegroups.com
adb install /path/to/apk


Best Regards

Bahar Ali

Developer
Security Engineering Research Group
Institute of Management Sciences
Phase-VII, Hayatabad, Peshawar


Reply all
Reply to author
Forward
0 new messages