Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I recently rooted my HTC Desire Bravo because I needed read/write access to /system/app in order to be able to copy an APK file there.

I wrote here on stackexchange on the best solution to root the Desire and got pointed to Unrevoked. Everything worked fine and typing "su" in the adb shell gives me nice root access.

I re-mounted /system like

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

That worked. However, trying to copy my APK file using adb push MyApp.apk /system/app/ didn't work and gave me a "permission denied". Alternatively I therefore pushed the app to /sdcard first and wanted to do a

cat /sdcard/MyApp.apk > /system/app/MyApp.apk

That approach has worked just perfectly on my rooted HTC Hero, on the Desire however it gives me

"Cannot create /system/app/MyApp.apk: not enough memory"

Does anyone have a clue on what could be the problem here? How can I push my app to the system folder so that it installs properly?

share|improve this question
add comment

4 Answers

HTC phones have an extra protection of the /system folder, rooting them is not enough to get write access there.

You need to turn off that protection. This is most easily done with the Revolutionary tool. Follow the instructions closely on the site.

share|improve this answer
add comment

I don't know if cat is the best option to copy a file. Why don't you try the cp command. I can imagine that cat reads the whole file into memory an if it's too big this error happens.

share|improve this answer
    
cp won't work within adb shell –  Juri Dec 19 '10 at 22:07
    
are you sure? i recently moved a file to the system/lib folder using clockwordmod recovery and "mv", EDIT: just realized, you didn't specify if you where using recovery...you have to boot into recovery because the system part of the flash is copy protected (called s-on). only in the recovery mode you can write to it –  Hameno Dec 19 '10 at 22:08
    
yep, just recognized it myself and it works now. Should be a way to boot it with "s-off", right? –  Juri Dec 19 '10 at 22:17
    
Yes, but it involves flashing a custom/hacked bootloader which can brick your phone. –  Hameno Dec 19 '10 at 22:51
    
If you're rooted you should be able to replace "cp" with "busybox cp", you can download Busybox if you don't have it already. –  Matthew Read Dec 20 '10 at 2:47
show 1 more comment

Hameno is right. Although adb will appear to work if the phone is booted normally, it actually won't. You need to boot the phone into clockworkmod, then fire up adb, mount /system yourself (something like mount -o rw /dev/block/mtdblock3 /system), and muck around with the filesystem.

share|improve this answer
add comment

Try the app Root Explorer. It's the best file manager in my opinion and you can easily remount /system and copy files with it.

alt text

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.