Installing modified version of PackageInstaller

41 views
Skip to first unread message

Ash

unread,
Nov 27, 2011, 9:35:21 PM11/27/11
to android-...@googlegroups.com
Hi All,

I have downloaded Android Source and made some changes to the PackageInstaller source code. I have compiled Android source and it has generated a new PackageInstaller.apk file.
Note that I have a rooted device and we are customizing the hardware to our needs.

How do I get this to install on my device?

I have tried adb install PackateInstaller_modified.apk however the installation failed Failure [INSTALL_FAILED_ALREADY_EXISTS]

I have also tried adb uninstall com.android.packageinstaller however android will not let me uninstall it.

Any advice on how I can replace my version of PackageInstaller?

Many thanks

Dianne Hackborn

unread,
Nov 28, 2011, 6:44:54 PM11/28/11
to android-...@googlegroups.com
Use adb install -r <package_name>

Note that this installs this as a system app update -- the new .apk is in the /data partition, so if the user factory resets their device it will revert back to the original .apk.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/NGpfHOqIV4cJ.
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.



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

Ash

unread,
Nov 28, 2011, 6:49:06 PM11/28/11
to android-...@googlegroups.com
Hi Dianne,

Thanks for the info.

Are you able to advice on the following:
1. How can we stop apps such as DeskClock, Contacts, Camera, Email, Gallery, etc. from starting. Although it is not a a big deal if they are running, it would be nice if I can stop these applications from starting up. We are basically using Android to run our application in Kisok mode and hence all other applications are redundant for our use. If it easy for me to stop them at boot up that is great otherwise no issues.

2. How can we get Android applications to execute shell scripts?

Many thanks for your help.

Cheers

Dianne Hackborn

unread,
Nov 28, 2011, 6:52:51 PM11/28/11
to android-...@googlegroups.com
If you don't want the app, don't included it in your system image.  If you do want it, then if it is starting during boot then it is doing that because it wants to do so for some reason and there should be no reason for you to stop it from doing that.

Android applications don't execute shell scripts.

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/HK4x-mhsgPIJ.

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.

Ash

unread,
Nov 28, 2011, 7:00:08 PM11/28/11
to android-...@googlegroups.com
1. I removed apps such as Contacts, Email from /system/app directory. However after doing so, Android would not boot up. I understand that Android needs them for basic running operation however when compiling Android can we indicate anywhere that we would not like to have these apps?

2. I have a script that keeps running forever in the background making sure that our application is running. If for any reason our application dies, then the script will re-execute it. The problem is that during software update I would like my application to pause/stop this script so that it does not execute our application during software update. Hence the need to be able to run scrips from application level. 

3. What about creating new files on the filesystem (e.g. /myapp_storage). We don't have sdcard and from Android application I am unable to create a new file. Is this correct?

Ash

unread,
Nov 28, 2011, 7:32:02 PM11/28/11
to android-...@googlegroups.com
Point 3 has been solved. It seems Android will not allow you to create files in any location expect for /sdcard and /data/data/your_app/files

Reply all
Reply to author
Forward
0 new messages