6

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!

Tsimmi
  • 1,828
  • 6
  • 23
  • 35

2 Answers2

19

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.

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
  • I've tried to do that and when reach the cat command, I get:"Cannot create /system/app/: is a directory". I also tried mv, and I got:"failed on '/sdcard/myApk.apk' - Cross-device link". Is there still some hope? Thaks :) – Tsimmi Jan 12 '10 at 11:51
  • Ooops, I originally was using `cp` rather than `cat`. I've fixed the `cat` command line now. – Christopher Orr Jan 12 '10 at 12:02
0

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.

Glatzial
  • 91
  • 7