Tsimmi
Tsimmi

Reputation: 1868

Push .apk to /system/app/ in HTC HERO

I have an HTC HERO and I need to push my application.apk
to the /system/app/ folder.

I've followed some tuts on rooting the device
and that is fine, but when I try to push my package to the system/app
folder, I get: "permission denied":

$ push /sdcard/myApp.apk /system/app/
push: permission denied

I also try:

$ su
su
# push /sdcard/myApp.apk /system/app/
push: not found

Is this possible in a device that is not a developer intended device?

Thank you all!

Upvotes: 6

Views: 17367

Answers (2)

Glatzial
Glatzial

Reputation: 91

How I do it:

adb shell 
#su
#mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

open a second terminal and use:

adb push myApp.apk /system/app/

in first terminal:

#reboot

What I add more then the others is the reboot - it's a must when doing a remount operation on the Android devices.

Upvotes: 0

Christopher Orr
Christopher Orr

Reputation: 111585

Firstly, running push from the device doesn't work as it's not a built-in command. Ideally you would use the copy command cp, but I don't think it's included by default (I've added it to my device via busybox).

Anyway, your problem is that the /system partition is mounted as read-only when the device boots.

But if you have root access to the device, you can remount the partition as read-write:

host$ adb shell
hero$ su
hero# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
hero# cat /sdcard/myApp.adk > /system/app/myApp.adk
hero# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system

Alternatively, after doing the remount, you can use adb push from the host as normal.

Upvotes: 19

Related Questions