Results 1 to 7 of 7
  1. Thread Author  Thread Author    #1  
    Tsudeily's Avatar

    Posts
    82 Posts
    Global Posts
    773 Global Posts
    ROM
    My own ROM / Stock kernel

    Default [SOLVED] Trying, and failing, to compile edited and stock APKs

    Okay, I have been all over XDA reading about hacks, roms, tweaks and what not. I have been following a guide on editing the SystemUI.apk but I ran into trouble compiling it. I read somewhere that one can not decompile and recompile an already edited/themed APK. However someone else tested the APKs I was working on and confirmed it worked for him. So I have no idea what I am missing.

    It decompiles flawlessly. The problem arrises when I move to compile them again. This happens on stock and themed APKs... Here is my command log for the most recent attempt

    Code:
    J:\apktools>apktool if framework-res.apk
    I: Framework installed to: C:\Users\Jimie\apktool\framework\1.apk
    
    J:\apktools>apktool d SystemUI.apk
    I: Baksmaling...
    I: Loading resource table...
    I: Loaded.
    I: Loading resource table from file: C:\Users\Jimie\apktool\framework\1.apk
    I: Loaded.
    I: Decoding file-resources...
    I: Decoding values*/* XMLs...
    I: Done.
    I: Copying assets and libs...
    
    J:\apktools>apktool b SystemUI
    I: Checking whether sources has changed...
    I: Smaling...
    I: Checking whether resources has changed...
    I: Building resources...
    Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
    ption: could not exec command: [aapt, p, -F, C:\Users\Jimie\AppData\Local\Temp\A
    PKTOOL8713681568342440015.tmp, -I, C:\Users\Jimie\apktool\framework\1.apk, -S, J
    :\apktools\SystemUI\res, -M, J:\apktools\SystemUI\AndroidManifest.xml]
            at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
    a:193)
            at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
            at brut.androlib.Androlib.buildResources(Androlib.java:248)
            at brut.androlib.Androlib.build(Androlib.java:171)
            at brut.androlib.Androlib.build(Androlib.java:154)
            at brut.apktool.Main.cmdBuild(Main.java:182)
            at brut.apktool.Main.main(Main.java:67)
    Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
    sers\Jimie\AppData\Local\Temp\APKTOOL8713681568342440015.tmp, -I, C:\Users\Jimie
    \apktool\framework\1.apk, -S, J:\apktools\SystemUI\res, -M, J:\apktools\SystemUI
    \AndroidManifest.xml]
            at brut.util.OS.exec(OS.java:87)
            at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
    a:191)
            ... 6 more
    Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2
    , The system cannot find the file specified
            at java.lang.ProcessBuilder.start(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at brut.util.OS.exec(OS.java:78)
            ... 7 more
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
    e file specified
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(Unknown Source)
            at java.lang.ProcessImpl.start(Unknown Source)
            ... 11 more
    
    J:\apktools>
    The people I've spoken to at XDA are stumped. I had wondered if it was something else I had installed that was conflicting with something, so I just did a factory restore. Installed Chrome, and Java. No dice.


    UPDATE: it was a stupid mistake on my part. A bit of time away from the project and I saw my mistake.
    Last edited by Tsudeily; 07-22-2012 at 06:10 PM. Reason: solved my problem
  2. #2  

    Default

    try these




    Thank Paul if it works


    Sent from my SPH-L710 using Tapatalk 2
    Thanked by:
    ypypy 
  3. Thread Author  Thread Author    #3  
    Tsudeily's Avatar

    Posts
    82 Posts
    Global Posts
    773 Global Posts
    ROM
    My own ROM / Stock kernel

    Default Re: Trying, and failing, to compile edited and stock APKs

    Oh, I forgot I made this thread. Thank you, but I have gotten it sorted out.
  4. #4  

    Default

    Quote Originally Posted by Tsudeily View Post
    Oh, I forgot I made this thread. Thank you, but I have gotten it sorted out.
    Share your solution with the world

    Sent from my SPH-L710 using Tapatalk 2
  5. Thread Author  Thread Author    #5  
    Tsudeily's Avatar

    Posts
    82 Posts
    Global Posts
    773 Global Posts
    ROM
    My own ROM / Stock kernel

    Default Re: [SOLVED] Trying, and failing, to compile edited and stock APK

    It was a dump mistake. I was trying to edit the ICS Domination theme for Sprint .There are a few corrupted .9.png images in the theme. Apktool would keep the corrupted ones and make a copy renamed to .png

    I was just replacing the corrupted ones.. NOT removing the renamed .png ones. After I got rid of them, it was all good.
  6. #6  
    Paul627g's Avatar

    Posts
    13,574 Posts
    Global Posts
    14,045 Global Posts
    ROM
    Milestone 1/Lean Kernel

    Default Re: [SOLVED] Trying, and failing, to compile edited and stock APK

    Quote Originally Posted by Tsudeily View Post
    It was a dump mistake. I was trying to edit the ICS Domination theme for Sprint .There are a few corrupted .9.png images in the theme. Apktool would keep the corrupted ones and make a copy renamed to .png

    I was just replacing the corrupted ones.. NOT removing the renamed .png ones. After I got rid of them, it was all good.
    First thing to always check when you have a failed recompile of a previously modified apk is corrupted .9.png's

    That will blow the recompile every time Most common signs or warning flags of a problem previously modified apk is when someone has slipped in modified .9.pngs into the "apk" or zip file without decompiling and recompiling the apks with the new .9.pngs in place.. I call this a "dirty mod" just like the term "dirty flash".

    We learned this didn't we Ziggy?
  7. #7  

    Default

    Quote Originally Posted by Paul627g View Post
    First thing to always check when you have a failed recompile of a previously modified apk is corrupted .9.png's

    That will blow the recompile every time Most common signs or warning flags of a problem previously modified apk is when someone has slipped in modified .9.pngs into the "apk" or zip file without decompiling and recompiling the apks with the new .9.pngs in place.. I call this a "dirty mod" just like the term "dirty flash".

    We learned this didn't we Ziggy?
    Yes yes we did. Always double check your work and triple check someone else lol

    Sent from my SGH-I747 using Tapatalk 2

Posting Permissions