Need some ADB help please


Last Updated:

  1. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    I am trying to push a /system to my droid on a Mac. I have gotten into the sdk/tools folder successfully and i can run adb commands like "./adb devices" to get my serial number so im pretty close i am just stuck

    MacBook-Pro:tools Kirch$ ./adb -s 040364F919021012 /push Desktop/system /system

    is what i did but its not doing anything

    any ideas of what i may be doing wrong?

    thanks, kirch
     

    Advertisement
  2. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    no slash in front of push

    Also, the items you need to push need to be in the same directory as the adb executable itself. So, if the tools folder has a sub folder called Desktop, and that has a subfolder called system, then the command will work. If not, then you're better off copying that /system folder to the /tools folder under the SDK, and perhaps calling is something like /mysystem (just in case having a folde rnamed /system under /tools creates a problem).

    Then your command would be
    Code (Text):
    1. adb push /mysystem /system
    which should then work.

    I had to use a similar method to push the correct folder for the AdamZ Nandroid backup onto my phone, b/c the Zip contained everything in a folder, and I didn't know that, so I used WinRAR to extract it to a folder using the .ZIP name, and then deleted all the old Nandroid backups I had, and tried to restore, and it errored out with a code 25....

    Luckily, I understood enough of how to do it that moving the *correct* folder to /sdcard/nandroid worked perfectly fine the first time I tried it.

    (Theoretically, it *should* be able to provide you the ability to copy directly from where the folder is stored, but you'd have to go through some hoops, as adb runs from that particular folder, so it may get tricky as you used several /../../.. commands followed by the full path to your folder as it resides on the Desktop - i.e. in Windows 7 the path is c:/users/{your username}/Desktop....)
     
  3. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    Ok i placed the /system folder into the tools folder in the SDK. I renamed it to /mysystem and ran
    Code (Text):
    1. Jason-Kirchmans-MacBook-Pro:tools Kirch$ ./adb devices
    2. List of devices attached
    3. 040364F919021012    device
    4.  
    5. Jason-Kirchmans-MacBook-Pro:tools Kirch$ ./adb -s 040364F919021012 push /mysystem /system
    6. cannot stat '/mysystem': No such file or directory
    7. Jason-Kirchmans-MacBook-Pro:tools Kirch$
    8.  
    what am i doing wrong now? thanks for the help
     
  4. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Not sure why you did the -s and the number after it - perhaps the -s is needed, but looking at the command reference when typing out just adb in the commandline, I don't see a reference to -s....

    Did you try typing in just what I typed?
     
  5. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Oh, and I think you need to mount the /System partition first, now that I think about it - I am assuming you're booted into recovery, so do that before typing the command in CMD...

    Assuming, of course, that you really *do* want to copy a folder of stuff from your computer to the /SYSTEM folder on the DROID....

    If not, let's back up to what you are trying to do again.... :D
     
  6. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    Ok so i need to boot into recovery first and mount /system? doing that now
     
  7. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    Code (Text):
    1. Jason-Kirchmans-MacBook-Pro:tools Kirch$ ./adb remount
    2. remount succeeded
    3. Jason-Kirchmans-MacBook-Pro:tools Kirch$ ./adb push /mysystem /system
    4. cannot stat '/mysystem': No such file or directory
    5. Jason-Kirchmans-MacBook-Pro:tools Kirch$
    hmm im in recovery, and mounted /system through revovery and through adb remount

    any other ideas?
     
  8. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    And you have /mysystem located in {your Android SDK folder}/tools/_____, so that it is a subdirectory of tools where adb is?

    That is *exactly* how I copied the folder extract from AdamZ's Smoked Glass 4.5 to my sdcard....

    I would say it is something on the hone, but the fact is that it is not finding that directory where it is looking....

    Give me a screen capture of your cmd window
     
    Kirch21 likes this.
  9. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    the /system was a .zip folder i unzipped, renamed to /mysystem and placed in Desktop/SDK/tools/

    here is a screenshot of my CMD window
    [​IMG]
     
  10. NeuroNY

    NeuroNY Active Member

    Joined:
    Dec 10, 2009
    Messages:
    28
    Likes Received:
    1
    I have a Macbook Pro too, and I don't know why we have to do this extra step (I'm sure others do) but I think you have to do the following command:

    "./adb push ./mysystem /system"

    where you add the "./" in front of the subdirectory within your Tools directory.
     
    Kirch21 likes this.
  11. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    Success! Thank you both for your help!! Much appreciated!
     
  12. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    weird - didn't think about the ./ reference to a directory in the current directory. I should have, in retrospect.

    Glad you got it working.
     
  13. Kirch21

    Kirch21 Well-Known Member This Topic's Starter

    Joined:
    Dec 9, 2009
    Messages:
    293
    Likes Received:
    18
    Thanks for helping me out im trying to get this ADB stuff more and mroe everday

    BTW i "Thanked" you haha
     
  14. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Heh, kewl, my first!
     

Share This Page

Loading...