1. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

Can Anyone Help Me Figure Out What I Am Doing Wrong With ADB Commands

Discussion in 'Android Themes' started by skylordusa1, Oct 7, 2010.

  1. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    I am new to using ADB and need a little help. Im trying to figure out the pushing and pulling of files. I connect my device and and turn on usb debugging and then reboot to recovery. I do the adb devices command and it shows my phones serial number connected. So just to practice I attempted to pull and then push my framework-res.apk file from my phone and back to my phone. Thought I was doing everything right but doesnt seem that way. After I pushed the file back I rebooted the phone and when the phone comes back up I get a crazy amount of errors/force closes for a ton of things. I restored my back up and was hoping maybe someone can let me know where I went wrong. I appreciate any help. Thank you.

    First off I rebooted to recovery

    C:\androidsdk\tools>adb reboot recovery <--- This command worked
    Then once in recovery I tried the remount command

    C:\androidsdk\tools>adb remount <--- This did not work I got the below error
    remount failed: Unknown error: 0

    I then found another way to mount the phone and ran it it seemed to work ok.

    C:\androidsdk\tools>adb shell mount /system

    C:\androidsdk\tools>adb shell ls /system
    app build.prop fonts lib media usr
    bin etc framework lost+found tts xbin

    C:\androidsdk\tools>adb shell ls /system/framework
    am.jar framework.jar
    android.policy.jar ime.jar
    android.test.runner.jar input.jar
    bmgr.jar javax.obex.jar
    com.google.android.maps.jar monkey.jar
    core.jar pm.jar
    ext.jar services.jar
    framework-res.apk svc.jar
    framework-tests.jar

    C:\androidsdk\tools>adb pull /system/framework/framework-res.apk
    567 KB/s (0 bytes in 5224198.008s)

    C:\androidsdk\tools>adb push framework-res.apk /system/framework/framework-res.apk
    354 KB/s (0 bytes in 5224198.014s)

    Im seeing 0 bytes in how ever many seconds so im sure im doing something wrong. But when I did the pull I saw the framework-res.apk file show up in my tools folder on my pc. I was able to open it and everything. I didnt make any changes to it though cause I was just trying this to see how it worked. So after i opened it I just closed it out and then proceeded to do the push. Then since I was in recovery I just selected reboot phone now. Phone came back up with a ton of errors and force closes. If anyone has had this problem or sees anything Im doing wrong. I would really appreciate you pointing me in the right direction as I really like the idea of adb and being able to pull edit and push files. Thank you in advance for all your help.
  2. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    What did you open the file with? What rom are you running?

    Sent from my Droid using Tapatalk
  3. frozty
    Offline

    frozty New Member

    Joined:
    Nov 27, 2009
    Messages:
    115
    Likes Received:
    0
    Trophy Points:
    0
    I'm having a similar problem using the zipalign it keeps telling me that the file cant be found.
  4. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Hello Shocka,

    I am running ShadowRom v.0.0.1. I use 7zip to open the file. But that was mostly in the beginning. Now im just pulling the file seeing it pop up on my PC in my tools directory and then pushing it back to the phone without even opening it.
  5. forkup
    Offline

    forkup New Member

    Joined:
    Oct 31, 2009
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    You must give it a path to save the file TO. Use adb pull /system/framework/framework-res.apk c:\ or wherever you want to save it to. Use the same thing to push it back.
  6. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    I have to give it a path even if within cmd I navigate to the directory where adb is and then do the pull command and see the framework file pop up in that directory?
  7. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Mine looks like this cd c:/android/tools adb pull /system/app/whatever.apk whatever.apk. adb push whatever.apk /system/app/whatever.apk

    Sent from my Droid using Tapatalk
  8. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    I appreciate you trying to help but thats what I have been doing and I still get the same errors/force closes when I boot back up after pushing the file to the phone. The file pulls fine and ends up on my compooter and I can open it and change it and do whatever to it. But after I push it back it doesnt boot up correctly. I could see if I was actually making changes to the framework-res.apk and then pushing it back and having the problems. Cause maybe I screwed the file up while changing it. But Im not even editing or opening the file. Im just pulling it and then pushing it straight back. Im at a complete dead end. Not sure where I am going wrong.
    Last edited: Oct 8, 2010
  9. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Are you mounting system while in recovery? On 2.2 I've always had to mount when I pushed or I got force closes.

    Sent from my Droid using Tapatalk
  10. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Try my fix there, it should work, I can bout gurantee it. If your paths are set correctly.

    Sent from my Droid using Tapatalk
  11. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Yup thats what I am doing. I have the phone on and connected to my compooter. I have USB debuggin on and run the adb devices command in cmd.
    My phone serial number shows up with device.

    I then cd c:\androidsdk\tools

    then i have the below

    C:\androidsdk\tools>

    then I pull the file from the phone.

    C:\androidsdk\tools> adb pull /system/framework/framework-res.apk framework-res.apk
    1813 KB/s (0 bytes in 5224198.002s)

    I then reboot to recovery

    c:\androidsdk\tools> adb reboot recovery

    Once my phone is in recovery I then try to mount from my compooter and I get the below

    c:\androidsdk\tools>adb remount
    remount failed: Unknown error: 0

    Since that remount fails I then mount /system from clockwork recovery on my phone.

    Once mounted I then try to push the file back to the phone.

    C:\androidsdk\tools> adb push framework-res.apk /system/framework/framework-res.apk
    354 kb/s (0 bytes in 5224198.014s)

    I then reboot my phone and once it comes up I get tons of errors/force closes for everything running on my phone.

    Im still not sure if when pulling and pushing I should be seeing 0 bytes count in xxxxxx seconds which i am. And also the KB count is different when I push and pull.
  12. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    After you mount system in clockwork also do adb remount and see if that works

    Sent from my Droid using Tapatalk
  13. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Ok I was in recovery and mounted /system via clockwork. I then ran the adb remount command and it succeeded so I pushed the file again. But I still received the errors/force closes after reboot. I see your commands you are typing are for /system/app/whatever.apk. I am trying to pull the framework.apk from /system/framework/framework.apk. Is there a difference between pulling a regular app from /system/app and pulling the framework.apk from /system/framework? Maybe there is a step I am missing.
  14. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    Not really much different just adb push framework-res.apk /system/framework/framework-res.apk. The framework is just more finiky then the apks. You could put that framework in a zip if you wanted and do it that way.

    Sent from my Droid using Tapatalk
  15. skylordusa1
    Offline

    skylordusa1 New Member

    Joined:
    Aug 19, 2010
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    0
    Ok thank you for all your help. Normally I just take the ROM or Theme zip file and edit the framework.apk and then re package it and flash it on to my phone. I wanted to try ADB cause it seemed a little bit easier/faster. Thanks for the help though I really appreciate it been getting so frustrated over this whole thing.
  16. forkup
    Offline

    forkup New Member

    Joined:
    Oct 31, 2009
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    You have to give it a path like I said when doing a pull, did you even try it?
  17. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    If he cds to something he is setting the path where it saves.

    Sent from my Droid using Tapatalk
  18. forkup
    Offline

    forkup New Member

    Joined:
    Oct 31, 2009
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    I've always had to give it a path when doing a pull.
  19. shocka2430
    Offline

    shocka2430 New Member

    Joined:
    Mar 20, 2010
    Messages:
    530
    Likes Received:
    0
    Trophy Points:
    0
    That's weird, when I open up my cmd I always do cd c:/android/tools. Then anything I do after is set to my tools folder. So when I adb pull I just type adb pull /system/app/whatever.apk whatever.apk. that saves it to my tools folder
    Try it and see if it works forkup, you might be doing to much lol.

    Sent from my Droid using Tapatalk
Search tags for this page
adb linux unknown error 0 remount
,
adb pull 0 files pulled s3 clockwork
,
adb push error closed
,
adb remount unknow error : 0
,
adb usb error:closed help
,
adb+remount+failed+unknown+error 0
,
android remount failed unknown error 0
,
error closed cmd adb
,
remount failed unknown error
,

remount failed unknown error 0

,
remount failed unknown error 0 android