Failing at adb

Discussion in 'Android Hacks and Help' started by jtydroid, Apr 28, 2010.

  1. jtydroid
    Offline

    jtydroid Member

    Joined:
    Apr 25, 2010
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Milwaukee, WI
    Ratings:
    +0
    Hello all,

    I'm trying to do something that, I think, should be rather easy. Use adb to reskin the powercontrol widget.

    I pulled the /system directory and unpacked the Settings.apk package. I did this by changing the name to .zip and unzipping on windows.

    I then edited several of the images and rezipped the folder. I renamed the folder to be Settings.apk and then (because windows loves me), gave User permissions on the file so it wasn't 'locked'

    Then I used adb to push the file back to the phone and rebooted it.

    When the phone came back up, the widget was broken and trying to open the widgets menu from a long-press FC'd helixlauncher.

    Not sure what I did wrong, any thoughts would be valued.

    If I'm a complete numbskull and have done something ridiculously wrong, I shall endure your lashings.
     
  2. icculusX
    Offline

    icculusX Premium Member Theme Developer Premium Member

    Joined:
    Feb 10, 2010
    Messages:
    2,534
    Likes Received:
    0
    Trophy Points:
    101
    Location:
    The Moon
    Ratings:
    +0
    Hey again man, try to push the files back while in recovery mode. Youll want to go to 'partitions' or something like that in clockwork to mount the /system so you can write to it... also I highly suggest you download 7zip to edit the APKs cause then you dont have to change them to ZIP - sometimes this brings issues....
     
  3. jtydroid
    Offline

    jtydroid Member

    Joined:
    Apr 25, 2010
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Milwaukee, WI
    Ratings:
    +0
    Oh yeah, I did forget to mention that I mounted the fs before pushing, and then again after.

    I will get 7zip for editing the apk's, but I'm a bit confused by the 'partitions' portion of your directions. Are you just reminding me to mount, because I used adb mount to do it....

    And, just to confirm, I should first adb reboot recovery before trying to push back onto the phone?
     
  4. ashkev843
    Offline

    ashkev843 Member

    Joined:
    Nov 22, 2009
    Messages:
    321
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    No your phone has to be in recovery mode. Power it off and then hold the x button on the keyboard and the power button until the M logo comes up. Then if you are in clockwork go under the partitions menu and chose mount system. Then connect your phone to your cpu and run the adb push command. then click on your phone again to unmount the system and the reboot the phone and see if that works.....if not you probably have the wrong compression on the .apk
     
  5. 928Droid
    Offline

    928Droid Premium Member Theme Developer Premium Member

    Joined:
    Nov 24, 2009
    Messages:
    3,753
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Western North Carolina Mountains
    Ratings:
    +0
    Moving to Hacking Help area for better assistance..

    HANG ON!!
     
  6. jtydroid
    Offline

    jtydroid Member

    Joined:
    Apr 25, 2010
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Milwaukee, WI
    Ratings:
    +0
    Ok, well... progress of a sort.

    I was able to push my updated Settings.apk to the droid and reboot without error... but no changes showed.

    When I use 7zip to recompress the apk, I can name it apk but I have to choose 7zip, zip or bzip as the compression format. Does that part matter?
     
  7. jtydroid
    Offline

    jtydroid Member

    Joined:
    Apr 25, 2010
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Milwaukee, WI
    Ratings:
    +0
    This is just plain baffling, I know I must be doing SOMETHING wrong because even if I just pull the apk, decompress it, recompress it, then push it back I still get FC's on the launcher.

    Does anyone have any inkling what I might be doing wrong?

    Sorry to be so dense, I'd just really like to further customize the look and feel like I've hit a dead end.
     
    Last edited: Apr 29, 2010
  8. cupfulloflol
    Offline

    cupfulloflol Senior Member

    Joined:
    Dec 5, 2009
    Messages:
    1,898
    Likes Received:
    22
    Trophy Points:
    68
    Ratings:
    +23
    I never actually decompress the apk. If you open it with 7zip, you can open the .png files or whatever from within it, then push the modified ones back. Meaning you never actually decompress it, technically. You then can push it back and it should work.

    I assume that is your problem you are trying to recompress the files. The files actually aren't compressed. They use zero, or nearly zero, compression (store in 7zip). Using anything higher than that may have confused the phone, and caused the errors you experienced.
     
  9. jtydroid
    Offline

    jtydroid Member

    Joined:
    Apr 25, 2010
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Milwaukee, WI
    Ratings:
    +0
    This is fantastic news... except that I can't seem to save files back into the apk. I open them just fine, but when I try to save, it says the location can't be found. Is it a problem with Windows 7?

    If I did have to decompress/recompress should I use 7z format then? I can select the compression rate, but the names don't really mean much.

    EDIT: Never mind, i found a way! Thanks so much, this works and I am a happy camper. Now to learn about signing.
     
    Last edited: Apr 29, 2010
  10. cupfulloflol
    Offline

    cupfulloflol Senior Member

    Joined:
    Dec 5, 2009
    Messages:
    1,898
    Likes Received:
    22
    Trophy Points:
    68
    Ratings:
    +23
    Glad you got it working. I don't use 7zip on my W7 PC, so I can't comment on if would be the problem. I would assume it is something simple like that.

    Signing apps is pretty easy, http://www.droidforums.net/forum/droid-hacks/27387-how-resign-apk-files-after-modding-them.html <-- that thread just got bumped recently. I use the first method, actually if you go to that full post [HOW TO] Manuals for creating a theme - xda-developers <-- there, there is much more information.

    Anyhow, good luck, and if you get stuck I am sure someone here can set you straight.
     
Search tags for this page

hacking win usb fie for nexus 7 adb on w7 pc