8

How to pre-install an Android application?

Because I have a specific device, and I wanted to make my application pre-installed.

4
  • Could you please elaborate the "pre-installed" term?. Are you shipping your own Android powered hardware and want a certain application to be installed by default? Do you want your application to be pre-installed on devices from a specific vendor? Commented Jun 6, 2011 at 8:40
  • good day sir. to give you an example all devices has their own default application like for example browser, calendar, camera, etc. Now since I'm dealing with my own device I wanted my application to be pre-installed like my given example. Why do I need to do that? Cause I wanted my application not to be erase even if the device will be formated. Thanks Commented Jun 7, 2011 at 0:29
  • Ok, thank you for clarifying. Then I would also try as Quipeace suggested. Commented Jun 7, 2011 at 6:00
  • related: stackoverflow.com/questions/44893953/… Commented Jan 31, 2019 at 9:45

2 Answers 2

4

I'm assuming you're talking about a rom here.

If you want the user to be able to delete the application you should put the .apk file in "/data/app" If you want to have the app behave like a system app (like e-mail or calendar) you can put the .apk in "/system/app"

Sign up to request clarification or add additional context in comments.

9 Comments

Maybe this is the answer I was looking for! I'm gonna try this thank you very much sir!
I already tried to push my .apk inside the "/system/app" but its failed to push item. here is the message "Failed to push sample.apk on 1000e9f764e6: Read-only file system".
Did you issue the adb root and adb remount commands before trying to push your apk?
Okay I will do this. Maybe I don't have the superuser/root permission to execute mount remount to make the system folder rewritable.
it works but I needed to do some research to apply your solution. Thanks
|
2

First we need all the pre-requisites needed.

  1. We need to root our device to have super user capability, In my case I root my nexus one

    • Im not responsible if your device brick so be careful. (http://forum.xda-developers.com/showthread.php?t=611829)
  2. install superuser (http://www.appbrain.com/app/superuser/com.noshufou.android.su)

  3. Install BusyBox (to do shell command "cp") -- available in android market (http://www.appbrain.com/app/busybox/stericson.busybox)

  4. Execute the following commands in the terminal emulator to remount the /system directory as read/write and to install the application into the /system/app directory (http://www.nexusforum.net/nexus-one-application-day/524-nexus-one-app-day-2-8-10-powermanager.html):

    • adb shell
    • su
    • mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
    • cp /sdcard/sample.apk /system/app

Thanks for all those who helped me.

1 Comment

Thanks! and how back to default?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.