error when trying to compile systemui ! - Android Q&A, Help & Troubleshooting

Hi guys,
so i decompiled SystemUI.apk ... edited some few things, when i tried to compile it, i got an error.
C:\Users\SzQ\Desktop\apktool>apktool b SystemUI
I: Using Apktool 2.0.3
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java: 263)
at brut.androlib.Androlib.build(Androlib.java:275)
at brut.androlib.Androlib.build(Androlib.java:268)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Abst ractDirectory.java:
105)
at brut.androlib.Androlib.readMetaFile(Androlib.java: 258)
... 4 more
please help!

Related

How can i recompile framework-res.apk

Hi
First i searched the forum about the problem i am having and non of the solutions worked with me.
I decompiled with apk manager 4.9 and made my changes and then recompiled but got alot of errors then i tried using apktool 1.4.1 and also the same problem happened i decompile without problems but the recompile is the problem.
here is what i get when i try to recompile:
Code:
Decompile:
C:\Users\DooM\Desktop\andvanced menu mode>java -jar apktool.jar d framework-res.
apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
-------------------
Compile
C:\Users\DooM\Desktop\andvanced menu mode>java -jar apktool.jar b framework-res
W: Could not find sources
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\DooM\AppData\Local\Temp\AP
KTOOL2069251178817473438.tmp, -x, -S, C:\Users\DooM\Desktop\andvanced menu mode\
framework-res\res, -M, C:\Users\DooM\Desktop\andvanced menu mode\framework-res\A
ndroidManifest.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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\DooM\AppData\Local\Temp\APKTOOL2069251178817473438.tmp, -x, -S, C:\Users\Do
oM\Desktop\andvanced menu mode\framework-res\res, -M, C:\Users\DooM\Desktop\andv
anced menu mode\framework-res\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
Anyone can help?
Try to get rid of the spaces in the path. Move it to a folder directly under the c drive or another drive. It doesn't like spaces in the path really. This fixed a problem i was having.
Still getting the error
try finding aapt for windows that should fix ya
??? any news ???
I think the decompiler is not able to find the path to aapt.
Sent from my LG-P500 using XDA Premium App
wrong post...pls delete

Error Compiling SystemUI ?

Hi. I am apptemping to recompile my SystemUI and I am receiving the following error. Can anyone assist ? Thanks
C:\Users\KC\Desktop\apktool HTC>apktool if framework-res.apk
I: Framework installed to: C:\Users\KC\apktool\framework\1.apk
C:\Users\KC\Desktop\apktool HTC>apktool b SystemUI
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
C:\Users\KC\Desktop\apktool HTC>

[Q] [Help] Can't recompile framework.jar

Hi guys i was trying to recompile Framework.jar and im getting this, i searched and didn't find that much on it.
[email protected]:~/apktool$ ./apktool b -f -d out
I: Smaling...
Exception in thread "main" org.jf.dexlib.Util.ExceptionWithContext: method index is too large.
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:54)
at org.jf.dexlib.Item.addExceptionContext(Item.java:177)
at org.jf.dexlib.Item.writeTo(Item.java:120)
at org.jf.dexlib.Section.writeTo(Section.java:119)
at org.jf.dexlib.DexFile.writeTo(DexFile.java:716)
at brut.androlib.src.DexFileBuilder.getAsByteArray(DexFileBuilder.java:75)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:58)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:52)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:37)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:257)
at brut.androlib.Androlib.buildSources(Androlib.java:214)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: java.lang.RuntimeException: method index is too large.
at org.jf.dexlib.Code.Format.Instruction35c.writeInstruction(Instruction35c.java:102)
at org.jf.dexlib.Code.Instruction.write(Instruction.java:57)
at org.jf.dexlib.CodeItem.writeItem(CodeItem.java:258)
at org.jf.dexlib.Item.writeTo(Item.java:117)
... 12 more
code_item @0x1c4fc0 (Lcom/meizu/widget/RoundCornerContactBadge$BorderType;->values()[Lcom/meizu/widget/RoundCornerContactBadge$BorderType
Click to expand...
Click to collapse
How can i fix this?

new dev apktool error

Hi all i keep getting recompile error when building a systemui.apk with apktool can any one tell me what im doing wrong please.
Error log
Code:
[email protected]:~/Desktop$ apktool b SystenUI
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.zip.ZipFile.<init>(ZipFile.java:143)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more
[email protected]:~/Desktop$

Can' t recompiling framework-res

Hi, I searched all internet, but I still don't know why I can't recompile my framework-res.apk
I can decompile it, but only via newest APKTool, other ways getting error.
And recompiling ... I just tried decompile and recompile it, do nothing and it don't work.... I want change language in my phone to polish, it is Kiphone 5s, phone is great, but I can't recompile my translated xml file, because it don' work. It doesn't matter if I use changed files or stock files. Please help me with this.
My log, tried recompiling stock decompiled files ...
[*] framework-res folder
recompiling framework-res.apk...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res/drawable-ldrtl-hdpi
invalid resource directory name: C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res/mipmap-xxhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Adrian\AppData\Local\Temp\APKTOOL1644207117153092899.tmp, -x, -S, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res, -M, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\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\Adrian\AppData\Local\Temp\APKTOOL1644207117153092899.tmp, -x, -S, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\res, -M, C:\Users\Adrian\Desktop\xdaAutoAPKTool_V4.0.0\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Nie moľna odnale«† dysku.
@Amcio
Try to use the GUI APK Tool for decompiling/recompiling APKs
@eduds
Hi, much thanks for reply, but it still not work ... Are yo have any ideas ? Maybe I will send you file ?
It is log:
2013-12-21
17:31:02,45
Decompiling..
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080301 drawable/ic_ab_back_holo_dark, config=-hdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:197)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:390)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:56)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:48)
at brut.androlib.Androlib.getResTable(Androlib.java:48)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:166)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
@Amcio
Try to decompile and recompile right after, without change anything.
Sent from my GT-I9070 using XDA Premium 4 mobile app

Categories

Resources