Theming apps

Discussion in 'Android Themes' started by czerdrill, May 24, 2010.

  1. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    When you theme an app, and you move it from /data/app to /system/app how do you have it so that you're still notified of updates to the app? When I do this and I go to the market, I'm told that the app is no longer installed. Any workaround to this or do you have to manually check and then retheme everytime there's an update?
     
  2. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    anyone have any idea?
     
  3. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Denver, CO
    Ratings:
    +3
    when there is an update you will have to remove the one in system, install the update and then move it to system and theme away. It is a pain and this is why I have chosen to let my updates pile up..

    The other way is just edit the APKs directly and then re sign them and they can stay in /data that way, and when there is an update you just have to edit them and re sign again.
     
  4. 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
    Much better to re-sign them, yes...
     
  5. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Thanks, can you point me in the direction of how to resign an apk if you're using Ubuntu and not Windows?
     
  6. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Denver, CO
    Ratings:
    +3
  7. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Ok figured out how to edit and resign but then do I just overwrite the thing that's in /data/app or install the apk? When I tried to install the apk with the edited files it appeared to work but the changes I made didn't stick. I didn't get any errors in resigning or in installing.
     
  8. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    Tried overwriting as well, and still nothing. The app disappears from the app drawer, and the market shows as if it's not installed...
     
  9. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    man i don't get this at all haha...why is it that if i install something from the market it shows up in /data/app as com.something.something.apk, but the apk for example in the luna theme is just called Pandora.apk. Do you just rename the apk after it's signed or what is the deal? If I edit the file in the archive directly, then the archive asks me if I want to update after I save.. If I drag a file into to replace, the archive doesn't ask me this, and the apk doesn't install. Just totally confused about this.

    Moving to /system/app never has a problem and always works for me, but I would like to learn how to edit the files within the apk and how they are named Pandora.apk, Facebook.apk etc when in /data/app they are not named that...
     
  10. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Denver, CO
    Ratings:
    +3
    you do not need to rename the APK's. just overwrite the apk in /data after they have been edited and re-signed. you will need to remove the old copy of the apk otherwise you will end up with two or things may break. only keep one copy of the apk on the device at once.
     
  11. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    hey thanks for your patience, i'm usually not this bad i promise haha :icon_eek:...but it's still not working, so here are the exact steps i'm doing...maybe you can figure out what i'm doing wrong...i'm trying to edit pandora

    1] copy com.pandora.android.apk to my sdcard
    2] copy com.pandora.android.apk from sdcard to computer
    3] edit files, making sure i hit "update archive" when prompted after saving files
    4] resigning the apk
    5] move the new com.pandora.android.apk to my sdcard
    6] navigate to /data/app and delete the existing com.pandora.android.apk
    7] paste the newly resigned com.pandora.android.apk from sdcard root to /data/app
    8] change permissions to rw-r-r and reboot

    The app disappears from the app drawer, and in the market it shows that it isn't installed. I can't figure out what i'm doing wrong here...do i have to uninstall pandora? do i have to install the new apk?
     
  12. raidzero
    Offline

    raidzero n00b. Theme Developer Premium Member Developer

    Joined:
    Apr 15, 2010
    Messages:
    1,054
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Denver, CO
    Ratings:
    +3
    Here is what I would do:

    Mount system: adb remount
    get the apk onto my PC: adb pull /data/app/Pandora.apk
    decompile the apk: apktool d Pandora.apk Pandora
    (make my edits)
    recompile the apk: apktool b Pandora
    (sign the out.apk)
    put the edited apk back onto the phone: adb push c:\path\to\your_signed_app.apk /data/app/pandora.apk

    my method requires the android sdk, well at least adb from it.
    You don;t need to decompile and recompile unless yuo plan to make xml or smali edits. make sure you use 7zip to do the apk editing and saving.
     
  13. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    still no go...tried it with adb as well...same deal...everything seems to work fine with no errors but then it disappears from the app drawer and the market shows that its not installed...just don't get it
     
  14. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    easily one of the most frustrating things ever haha...tried everyhting imagineable..adb, root explorer, windows, ubuntu, and nothing works. I know I can take the easy way out and just put it in /system/app but I hate not being able to figure out why it's not working. I've gotta assume it's some issue with resigning because the pushing and pulling work fine and obviously work since moving the apks to /system/app never gives me any problems.

    anyone else have any idea what i could be doing wrong here?
     
  15. czerdrill
    Offline

    czerdrill Silver Member

    Joined:
    Jan 2, 2010
    Messages:
    4,825
    Likes Received:
    12
    Trophy Points:
    153
    Ratings:
    +12
    ok some progress(if you want to call it that...i wouldn't haha)...

    I installed Pandora from the market, copied the apk to my sdcard and then uninstalled Pandora through the market

    I then adb installed the apk that I had copied and all was well. The app installed, it shows up in my app drawer, and shows in the market as installed

    soooo....

    the error is happening after I edit the files. I've tried not resigning, I've tried resigning, I've tried adb, I've tried root explorer. I've tried it all, and whenever I edit a file I get the Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION] or parse error. Anyone can give me any tips on how to resign this apk correctly? I have ubuntu, but i can also use Windows if necessary. I know it can be done, just gotta figure out how haha
     
Similar Threads
  1. gszeman
    Replies:
    3
    Views:
    2,680
  2. sqldroidx
    Replies:
    0
    Views:
    1,386
  3. Es0ter1c
    Replies:
    4
    Views:
    1,078
  4. pshaw92
    Replies:
    0
    Views:
    608
  5. dopeskwyd
    Replies:
    7
    Views:
    1,183
Loading...