Compiling Decompiling apk problem

Search This thread

George Jetson

Senior Member
Feb 27, 2011
889
627
36
Ankara
Hi everyone
I have a problem compiling and decompiling apks.
Firstly im using zeus v2.1 rom and i take framework-res.apk and systemui.apk.
Then I put this apks to apk manager 5.0 file and decompile with apk manager.And I dont touch and dont modify any files and I open again apk manager and choose compile option.Than apk manager gives error.Why it giving error i dont touching or modifying any files.Also Im opening apk files with winrar and want to put any files to inside winrar gives error broken archive.But these same apk's when i put them in the phone it works normally.Where is the wrong?:confused:
 

timvdhoorn

Senior Member
Dec 8, 2011
916
366
Gorinchem
Hi everyone
I have a problem compiling and decompiling apks.
Firstly im using zeus v2.1 rom and i take framework-res.apk and systemui.apk.
Then I put this apks to apk manager 5.0 file and decompile with apk manager.And I dont touch and dont modify any files and I open again apk manager and choose compile option.Than apk manager gives error.Why it giving error i dont touching or modifying any files.Also Im opening apk files with winrar and want to put any files to inside winrar gives error broken archive.But these same apk's when i put them in the phone it works normally.Where is the wrong?:confused:

it is a little easyer if you post the LOG...:cool:
 

George Jetson

Senior Member
Feb 27, 2011
889
627
36
Ankara
here is the latest log

Code:
|29.01.2012 -- 21:57:25,15| 
-------------------------------------------------------------------------- 
--2012-01-29 21:57:25--  http://dl.dropbox.com/u/14513610/apkver.txt
Resolving dl.dropbox.com... 107.20.134.231, 107.20.132.92, 107.20.234.233, ...
Connecting to dl.dropbox.com|107.20.134.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31 [text/plain]
Saving to: `apkver.txt'

     0K                                                       100%  692K=0s

2012-01-29 21:57:25 (692 KB/s) - `apkver.txt' saved [31/31]

projects alt dizini ya da dosyas halen var.
place-apk-here-for-modding alt dizini ya da dosyas halen var.
place-ogg-here alt dizini ya da dosyas halen var.
place-apk-here-to-batch-optimize alt dizini ya da dosyas halen var.
place-apk-here-for-signing alt dizini ya da dosyas halen var.
projects alt dizini ya da dosyas halen var.
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
'adb' i‡ ya da dŸ komut, ‡alŸtrlabilir
program ya da toplu iŸ dosyas olarak tannmyor.
I: Checking whether sources has changed...
I: Smaling...
C:\Users\cd555obx\Desktop\Apk Manager\other\..\projects\SystemUI.apk\smali\com\android\systemui\statusbar\AnimatedImageView.smali[0,0] No enum constant org.jf.dexlib.AnnotationVisibility.RUNTİME
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@de6570
	at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
	at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
	at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
	at brut.androlib.src.SmaliBuilder.build(Unknown Source)
	at brut.androlib.src.SmaliBuilder.build(Unknown Source)
	at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
	at brut.androlib.Androlib.buildSources(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)
 
Last edited:

gabwerkz

Senior Member
Aug 16, 2011
1,557
1,539
Three Stars and a Sun
here is the latest log

Code:
|29.01.2012 -- 21:57:25,15| 
-------------------------------------------------------------------------- 
--2012-01-29 21:57:25--  http://dl.dropbox.com/u/14513610/apkver.txt
Resolving dl.dropbox.com... 107.20.134.231, 107.20.132.92, 107.20.234.233, ...
Connecting to dl.dropbox.com|107.20.134.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31 [text/plain]
Saving to: `apkver.txt'

     0K                                                       100%  692K=0s

2012-01-29 21:57:25 (692 KB/s) - `apkver.txt' saved [31/31]

projects alt dizini ya da dosyas halen var.
place-apk-here-for-modding alt dizini ya da dosyas halen var.
place-ogg-here alt dizini ya da dosyas halen var.
place-apk-here-to-batch-optimize alt dizini ya da dosyas halen var.
place-apk-here-for-signing alt dizini ya da dosyas halen var.
projects alt dizini ya da dosyas halen var.
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
'adb' i‡ ya da dŸ komut, ‡alŸtrlabilir
program ya da toplu iŸ dosyas olarak tannmyor.
I: Checking whether sources has changed...
I: Smaling...
C:\Users\cd555obx\Desktop\Apk Manager\other\..\projects\SystemUI.apk\smali\com\android\systemui\statusbar\AnimatedImageView.smali[0,0] No enum constant org.jf.dexlib.AnnotationVisibility.RUNTİME
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@de6570
	at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
	at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
	at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
	at brut.androlib.src.SmaliBuilder.build(Unknown Source)
	at brut.androlib.src.SmaliBuilder.build(Unknown Source)
	at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
	at brut.androlib.Androlib.buildSources(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)


"projects\SystemUI.apk\smali\com\android\systemui\statusbar\AnimatedImageView.smali"

and

"C:\Users\cd555obx\Desktop\Apk Manager\other"

Why in OTHER folder? I think I'ved used apk manager once and it wasn't far from what i use now. normaly, we put the apk in "place-apk-here-for-modding" folder.

Also this lines, why does it has dropbox in it?

Code:
|29.01.2012 -- 21:57:25,15| 
-------------------------------------------------------------------------- 
--2012-01-29 21:57:25--  http://dl.dropbox.com/u/14513610/apkver.txt
Resolving dl.dropbox.com... 107.20.134.231, 107.20.132.92, 107.20.234.233, ...
Connecting to dl.dropbox.com|107.20.134.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31 [text/plain]
Saving to: `apkver.txt'

Try the one/link I posted earlier, easy to use.

EDIT:
Saw your post in my thread. You touched the SMALI and wanted to remove time?
 
Last edited:

George Jetson

Senior Member
Feb 27, 2011
889
627
36
Ankara
I deleted all apk manager files on my computer and install new apk manager than I clean my temp and users file.Now I try decompile framework apk its ok decompiled success.But I compile framework(do not touch or modify anything) that gives error here is new log.

Code:
-------------------------------------------------------------------------- 
|01.02.2012 -- 16:31:47,27| 
-------------------------------------------------------------------------- 
--2012-02-01 16:31:47--  http://update.apkmultitool.com/apkver.txt
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'

     0K                                                       100% 1,81M=0s

2012-02-01 16:31:47 (1,81 MB/s) - `apkver.txt' saved [152/152]

projects alt dizini ya da dosyas halen var.
place-apk-here-for-modding alt dizini ya da dosyas halen var.
place-ogg-here alt dizini ya da dosyas halen var.
place-apk-here-to-batch-optimize alt dizini ya da dosyas halen var.
place-apk-here-for-signing alt dizini ya da dosyas halen var.
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
Sistem belirtilen yolu bulamyor.
Sistem belirtilen yolu bulamyor.
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
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, C:\Users\cd555obx\AppData\Local\Temp\APKTOOL3621473068753514816.tmp, -x, -S, C:\apkman\projects\framework-res.apk\res, -M, C:\apkman\projects\framework-res.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java: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:\Users\cd555obx\AppData\Local\Temp\APKTOOL3621473068753514816.tmp, -x, -S, C:\apkman\projects\framework-res.apk\res, -M, C:\apkman\projects\framework-res.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:87)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, Sistem belirtilen dosyay? bulam?yor
	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, Sistem belirtilen dosyay? bulam?yor
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 11 more
 

gabwerkz

Senior Member
Aug 16, 2011
1,557
1,539
Three Stars and a Sun
I never had errors like that. Only if I made a mistake editing xml's, and it logs clearly where i've gone wrong. it must be the tool you use to decompile. What version is it? And is the APk you are trying to decompile deodexed?

I have Android SDK and Java installed. I will upload the one i use to decompile, try it.

I will attach as well a compiled but untouched framework-res from Zeus v2.1. See if you can compile/decompile it as I do. If not, you're missing something. The tool itself, java, or ASDK.
 

Attachments

  • Apk_Multi-Tool_Alpha_02.zip
    6.1 MB · Views: 395
  • framework-res.apk
    3.9 MB · Views: 197
Last edited:

timvdhoorn

Senior Member
Dec 8, 2011
916
366
Gorinchem
I never had errors like that. Only if I made a mistake editing xml's, and it logs clearly where i've gone wrong. it must be the tool you use to decompile. What version is it? And is the APk you are trying to decompile deodexed?

I have Android SDK and Java installed. I will upload the one i use to decompile, try it.

I will attach as well a compiled but untouched framework-res from Zeus v2.1. See if you can compile/decompile it as I do. If not, you're missing something. The tool itself, java, or ASDK.

how do i install that android sdk? i think thats the problem why its not compiling :D
 

spykedsystem

Senior Member
Nov 23, 2011
83
8
I had those errors even when I had everything installed.However I noticed it doesn't happen with untouched APKs...so if you try to decompile and compile the framework-res.apk from Redy's v20N package it will work but if you try to do that with the Zeus framework it will give those errors even if you don't modify it,just my 2 cents on what I experienced

EDIT: Also tried the manual version using CMD with apktool..same errors
 

gabwerkz

Senior Member
Aug 16, 2011
1,557
1,539
Three Stars and a Sun
Nope, the one attached is untouched from Zeus v2.1. Just now I decompiled/compiled it and had no errors and uploaded (See date modified on properties). it must be the tool you both use.

See his logs? says "cannot load aapt" aapt.exe is the problem inside the tool. will post the link of the issue.
 
Last edited:
  • Like
Reactions: spykedsystem

gabwerkz

Senior Member
Aug 16, 2011
1,557
1,539
Three Stars and a Sun
how do i install that android sdk? i think thats the problem why its not compiling :D

Thanks for the tool Gabwerkz it works now

See. :) I think I posted the download link of it somewhere in Zeus thread when he posted. George must have missed it. I trold him to try it, APK Multi Tool.

I think timvdhoorn doesn't have problems compiling. :) As he compiled a theme before. Only mistakes in modifying xml's, smali's or images he'll have errors or will not decompile.

Happy theming.. :)
 
Last edited:

spykedsystem

Senior Member
Nov 23, 2011
83
8
Yeah pretty much the smallest mistake in editing XML's can cause errors in compiling the apk..just trial and error
 

agritux

Senior Member
Apr 11, 2012
2,538
787
Ankara
i have searched on forum. and it brings me here. :) my old phone section :)


i am trying to decompile and compile stock deodexed systemui.apk

i can decompile but cant compile (without any changes)

it gives error. i tried it on many tool, win7 and linux.

-if i dont change anything in decompiled systemui, it gives same error. it is not about changing xmls or smalis-

error like this

SoH7MOA.png


i am using latest tools

any idea?
 
Last edited:

SmiLeToLife

Senior Member
Jul 21, 2012
101
28
Eskişehir
i have searched on forum. and it brings me here. :) my old phone section :)


i am trying to decompile and compile stock deodexed systemui.apk

i can decompile but cant compile (without any changes)

it gives error. i tried it on many tool, win7 and linux.

-if i dont change anything in decompiled systemui, it gives same error. it is not about changing xmls or smalis-

error like this

SoH7MOA.png


i am using latest tools

any idea?

i have the same error even i dont touch the decompiled file and try to recompile it, but getting that error. did you get any succes to handle with that? :eek:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I never had errors like that. Only if I made a mistake editing xml's, and it logs clearly where i've gone wrong. it must be the tool you use to decompile. What version is it? And is the APk you are trying to decompile deodexed?

    I have Android SDK and Java installed. I will upload the one i use to decompile, try it.

    I will attach as well a compiled but untouched framework-res from Zeus v2.1. See if you can compile/decompile it as I do. If not, you're missing something. The tool itself, java, or ASDK.
    1
    Nope, the one attached is untouched from Zeus v2.1. Just now I decompiled/compiled it and had no errors and uploaded (See date modified on properties). it must be the tool you both use.

    See his logs? says "cannot load aapt" aapt.exe is the problem inside the tool. will post the link of the issue.