DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: apktool.jar help!!!

  1. Beta Team
    thebowers's Avatar
    Member #
    8519
    Join Date
    Nov 2009
    Location
    Iowa
    Posts
    2,548
    Twitter
    dabowerman
    Phone
    Rooted Droid, OC @ 1.1 Ghz
    DroidForums.net Theme Developer
    Premium Member
    #1

    apktool.jar help!!!

    I would really like to get this to work. It opens so many things (hate having to use HxD and axmlprinter.jar, when I could just use this with plain xml).

    Anyway I can decompile the .apk just fine but can never get it to recompile. I get these errors below.

    Code:
     
    D:\>java -jar apktool.jar b twitter
    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.BrutException: could not exec command: [aapt, p, -F, D:\Users\THEBOW~1\AppData\Local\Temp\APKTOOL6666141519779796787.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_7251183562717733225.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_5111289146222151494.tmp, -S, D:\\twitter\res, -M, D:\\twitter\AndroidManifest.xml, D:\\twitter\9patch]
            at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
            at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
            at brut.androlib.Androlib.buildResources(Unknown Source)
            at brut.androlib.Androlib.build(Unknown Source)
            at brut.androlib.Androlib.build(Unknown Source)
            at brut.apktool.Main.cmdBuild(Unknown Source)
            at brut.apktool.Main.main(Unknown Source)
    Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, D:\Users\THEBOW~1\AppData\Local\Temp\APKTOOL6666141519779796787.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_7251183562717733225.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_5111289146222151494.tmp, -S, D:\\twitter\res, -M, D:\\twitter\AndroidManifest.xml, D:\\twitter\9patch]
            at brut.util.OS.exec(Unknown Source)
            ... 7 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)
            ... 8 more
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the 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
    D:\>
    I get this even if I just simply decompile and recompile. So, anyone know what the errors mean and how to fix it. I am on Vista 32-bit. I have tried this on two different hard drives with the same result.
    If you like what I do, thanks



    Your can follow me as follows

    @dabowerman - Twitter
    Derek Bower - G+ - this is where I will be @ the most and where stuff gets released first.

    Theming Guides that might come in handy
    Theming Guide for Progress Bar
    Notification Text Color Change (How to)
    Theming Guide for System Text
  2. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #2
    Quote Originally Posted by thebowers View Post
    I would really like to get this to work. It opens so many things (hate having to use HxD and axmlprinter.jar, when I could just use this with plain xml).

    Anyway I can decompile the .apk just fine but can never get it to recompile. I get these errors below.

    Code:
     
    D:\>java -jar apktool.jar b twitter
    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.BrutException: could not exec command: [aapt, p, -F, D:\Users\THEBOW~1\AppData\Local\Temp\APKTOOL6666141519779796787.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_7251183562717733225.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_5111289146222151494.tmp, -S, D:\\twitter\res, -M, D:\\twitter\AndroidManifest.xml, D:\\twitter\9patch]
            at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
            at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
            at brut.androlib.Androlib.buildResources(Unknown Source)
            at brut.androlib.Androlib.build(Unknown Source)
            at brut.androlib.Androlib.build(Unknown Source)
            at brut.apktool.Main.cmdBuild(Unknown Source)
            at brut.apktool.Main.main(Unknown Source)
    Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, D:\Users\THEBOW~1\AppData\Local\Temp\APKTOOL6666141519779796787.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_7251183562717733225.tmp, -I, D:\Users\THEBOW~1\AppData\Local\Temp\brut_util_Jar_5111289146222151494.tmp, -S, D:\\twitter\res, -M, D:\\twitter\AndroidManifest.xml, D:\\twitter\9patch]
            at brut.util.OS.exec(Unknown Source)
            ... 7 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)
            ... 8 more
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the 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
    D:\>
    I get this even if I just simply decompile and recompile. So, anyone know what the errors mean and how to fix it. I am on Vista 32-bit. I have tried this on two different hard drives with the same result.
    do you have the version of aapt.exe that came with apktoo..jar in your path?

    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
  3. Beta Team
    thebowers's Avatar
    Member #
    8519
    Join Date
    Nov 2009
    Location
    Iowa
    Posts
    2,548
    Twitter
    dabowerman
    Phone
    Rooted Droid, OC @ 1.1 Ghz
    DroidForums.net Theme Developer
    Premium Member
    #3
    Don't know that I follow what you are saying. I only do two commands with apktool.jar

    java -jar apktool.jar d <whatever.apk> <whatever>
    java -jar apktool.jar b <whatever>
    If you like what I do, thanks



    Your can follow me as follows

    @dabowerman - Twitter
    Derek Bower - G+ - this is where I will be @ the most and where stuff gets released first.

    Theming Guides that might come in handy
    Theming Guide for Progress Bar
    Notification Text Color Change (How to)
    Theming Guide for System Text
  4. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #4
    Quote Originally Posted by thebowers View Post
    Don't know that I follow what you are saying. I only do two commands with apktool.jar

    java -jar apktool.jar d <whatever.apk> <whatever>
    java -jar apktool.jar b <whatever>

    it relies on aapt.exe, put it in a dir in your PATH environment variable in windows.

    I prefer the batch file... android-apktool - Project Hosting on Google Code

    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
  5. Beta Team
    thebowers's Avatar
    Member #
    8519
    Join Date
    Nov 2009
    Location
    Iowa
    Posts
    2,548
    Twitter
    dabowerman
    Phone
    Rooted Droid, OC @ 1.1 Ghz
    DroidForums.net Theme Developer
    Premium Member
    #5
    Ok I got the apktool.bat and aapt.exe files what else do I need to do from here? Can you explain the process as if I don't know a clue...lol
    If you like what I do, thanks



    Your can follow me as follows

    @dabowerman - Twitter
    Derek Bower - G+ - this is where I will be @ the most and where stuff gets released first.

    Theming Guides that might come in handy
    Theming Guide for Progress Bar
    Notification Text Color Change (How to)
    Theming Guide for System Text
  6. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #6
    Quote Originally Posted by thebowers View Post
    Ok I got the apktool.bat and aapt.exe files what else do I need to do from here? Can you explain the process as if I don't know a clue...lol
    if you have the android sdk installed (adb) then the android-sdk-windows\tools directory may already be in your path. if that is the case simply drop the apktool stuff and aapt into the android-sdk-windows\tools directory, overwriting the current aapt.exe

    that way you can run apktool globally.. I put all my android tools in that directory for simplicity's sake
    Code:
    c:\anywhere\apk> apktool d something.apk something_decompiled
    long story short, just put the jar, the bat, and aapt.exe in the sdk tools directory

    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
  7. Beta Team
    thebowers's Avatar
    Member #
    8519
    Join Date
    Nov 2009
    Location
    Iowa
    Posts
    2,548
    Twitter
    dabowerman
    Phone
    Rooted Droid, OC @ 1.1 Ghz
    DroidForums.net Theme Developer
    Premium Member
    #7
    I get that, can you tell me where you add PATH enviroment variables. I can't remember that process.

    Edit: I didn't have an aapt.exe in the tools directory before
    Last edited by thebowers; 07-09-2010 at 08:01 PM.
    If you like what I do, thanks



    Your can follow me as follows

    @dabowerman - Twitter
    Derek Bower - G+ - this is where I will be @ the most and where stuff gets released first.

    Theming Guides that might come in handy
    Theming Guide for Progress Bar
    Notification Text Color Change (How to)
    Theming Guide for System Text
  8. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #8
    Quote Originally Posted by thebowers View Post
    I get that, can you tell me where you add PATH enviroment variables. I can't remember that process.
    start>right click computer>properties>advanced system settings>advanced>environment variables

    heres mine:


    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
  9. Beta Team
    thebowers's Avatar
    Member #
    8519
    Join Date
    Nov 2009
    Location
    Iowa
    Posts
    2,548
    Twitter
    dabowerman
    Phone
    Rooted Droid, OC @ 1.1 Ghz
    DroidForums.net Theme Developer
    Premium Member
    #9
    Just to make sure you full path would be to the aapt.exe file, correct?

    :%path%:\android\tools\aapt.exe would be my example.
    Last edited by thebowers; 07-09-2010 at 08:10 PM.
    If you like what I do, thanks



    Your can follow me as follows

    @dabowerman - Twitter
    Derek Bower - G+ - this is where I will be @ the most and where stuff gets released first.

    Theming Guides that might come in handy
    Theming Guide for Progress Bar
    Notification Text Color Change (How to)
    Theming Guide for System Text
  10. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #10
    Quote Originally Posted by thebowers View Post
    Just to make sure you full path would be to the aapt.exe file, correct?

    :%path%:\android\tools\aapt.exe would be my example.
    no, just :%path%:\android\tools

    the path is a list of locations that the system looks for when commands are given. By adding this location, windows knows where to look for the executables when it doesnt find then in the rest of its normal places (c:\windows, c:\windows\system32, etc)

    add directories to the path to put executables in them that you want to access from any location.

    if you wanted to be real unclean you could just put aapt, apktool.jar and apktool.bat in c:\windows\system32

    but its better IMO to keep your apps in their own directory, just makes for a cleaner environment.

    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
Page 1 of 2 1 2 LastLast

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

aapt command in a path

,
aapt command in a path windows
,
aapt path
,
apktool java.util.zip.zipexception: error in opening zip fil
,

apktool.jar

,

can't find apktool.jar

,

cannot run program aapt

,
cannot run program aapt: createprocess error=2
,

exception in thread main brut.androlib.androlibexception: br

,
?aapt command in a path
Click on a term to search our site for related topics.
Find us on Google+