ADB Push -- Permission Denied

Discussion in 'Android Hacks and Help' started by vpshockwave, Jan 7, 2010.

  1. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    I've been trying to push the new Milestone browser onto my 2.01 droid (see http://www.droidforums.net/forum/droid-applications/13273-milestone-browser-aviable-droid.html). I managed to delete the old Browser.apk, but I am unable to push the new one over.

    First of all, the phone is rooted. Here's what I'm doing:

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

    (at this point I exit out and reopen another command window)

    adb push Browser.apk /system/app/Browser.apk
    Failed to copy: Permission denied.



    What's going on here? How do I get this on?
  2. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    Try the second part there with su access and remounting with -rw access.
  3. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the response.

    Can you put the exact order of commands I should use? I think I tried doing what you're talking about, but I'm not sure.
  4. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    I would suggest that you just push it to the SD card since you will have rw access to it with an adb push

    Code:
    adb push <path to browser.apk>/browser.apk /sdcard/browser.apk
    Then go to Astro move it to /system/app/.

    Essentially using adb you cant access system files (since you aren't root) you would have to use linux commands while logged into the adb shell to push it to your phone. I mean you could chmod the system/app directory to 755 and then push it if you wanted to
  5. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    Alright, I tried pushing both files to my sdcard, then I tried using astro file manager to move them to their corresponding places, but Astro gives me an error deleting the old Browser.apk (I restored it from a backup).

    I then used the rm command to remove the old browser.apk (This worked) but Astro still has an error getting the file in.

    I guess, my problem is this: How do you get a file off your sdcard and into a system folder?

    [EDIT] I tried to chmod the app folder and I get a "Bad Mode" error. This is what I tried:

    chmod -R 755 /system/app/
    Last edited: Jan 7, 2010
  6. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    This is probably what you are looking for since you already deleted the browser (which I wouldnt have done, generally rename things to <app>.bak unless you are really hurting for space)
    Code:
     
    $ adb shell
    # su
    # mount -o remount,rw /dev/null /system
    # mv /sdcard/browser.apk /system/app/browser.apk
    
    Before all of this you could have pushed the new browser to your phone's sdcard then did this:

    Code:
     
    $ adb shell
    # su
    # mount -o remount,rw /dev/null /system
    # mv /system/app/browser.apk /system/app/broswer.bak
    # mv /sdcard/browser.apk /system/app/browser.apk
    
  7. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    Alright tried this. I get a "failed on '/sdcard/browser.apk' - Cross-device link"

    Something to do with the fact that one's an SD card and the other is on the device?

    Thanks for all the help so far.
  8. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    You are correct, sorry its been a long day...
  9. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    adb shell

    $ dd if=/sdcard/browser.apk of=/data/local/browser.apk

    if my linux serves me right
  10. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    Alright, that command executed, but I have no idea what it did. I went to /data/ but there is no local directory. I even tried using su to push it just to the data directory -- I still don't see it though.

    I think we're making progress though : )
  11. IEatCake
    Offline

    IEatCake New Member

    Joined:
    Jan 2, 2010
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pittsburgh, PA
    I shoulda just had you sub in the system/apps dir instead of the data/local and then chmod it to 755
  12. Jebtrix
    Offline

    Jebtrix New Member

    Joined:
    Dec 14, 2009
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    just use
    Code:
    cat /sdcard/browser.apk > /system/app/browser.apk
    mv has issues across filesystems on android :blink: Once its on system (internal mem) mv works fine, or if your managing files on sdcard exclusively it works fine also.
  13. hydrogenman
    Offline

    hydrogenman New Member

    Joined:
    Dec 31, 2009
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    0
    To view the contents of /data with a file manager, you gotta have one that runs with su, like su file manager (assuming you're looking with your file manager)
  14. vpshockwave
    Offline

    vpshockwave New Member

    Joined:
    Dec 15, 2009
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    0
    Alright, I'll try both these things. Thanks guys.
Search tags for this page
adb cross-device link
,
adb failed to copy permission denied
,
adb permission denied
,
adb permission denied push
,
adb push failed to copy
,
adb push failed to copy permission denied
,

adb push permission denied

,
adb push sdcard permission denied
,
adb push su
,
failed on cross-device link
,
failed to copy permission denied
,
failed to push selection: permission denied