[Q]] Apktool/manager etc problem! Really bored ! - Xperia Arc Q&A, Help & Troubleshooting

Guys i really got bored this apktool compile errors!
I tried a lot of apktool manager .jar aapt versions but result is same!
1.apk referred to my framework-res.apk on Xperia ARC!
I can decompile but can not compile..
Im searching xda and google for a result but theres not any chances..
JDK SDK(full from 4.1 to 1.5/6) JDR JAVA latest versions..
All I want to edit xml's from SystemUI.apk but with no changes cant compile too..
heres the log
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java :44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFle xLexer.java:2569)
at org.antlr.runtime.CommonTokenStream.getSourceName( CommonTokenStream.java:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSou rceName(CommonTreeNodeStream.java:106)
at org.antlr.runtime.tree.TreeParser.getSourceName(Tr eeParser.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliT reeWalker.java:349)
at org.antlr.runtime.BaseRecognizer.displayRecognitio nError(BaseRecognizer.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseR ecognizer.java:186)
at org.jf.smali.smaliTreeWalker.smali_file(smaliTreeW alker.java:428)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(Smali Mod.java:85)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexF ileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuil der.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder. java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib. java:222)
at brut.androlib.Androlib.buildSources(Androlib.java: 179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
I tried decompilin with original apktool and compile back ICSapktool too. no success..
Im on GB but havng same errors on ICS too!

Update aapt.exe, grab it from your android sdk folder and place inside apktool dir, old aapt.exe has known bugs that prevent it from recompiling.
Sent from my LT18i using xda app-developers app

Related

how do i compile a cm9 apk

i am having trouble compiling apk's from a cm9 rom. i can decompile just fine with apktool. can anyone point me in the right direction
Did you set the framework-res?
EDIT: apktool if framework-res.apk --I was kind of vague
yes i did setup the framework this is the errors im getting
c:\apktools>apktool b mms.apk
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:\apktools>
I remember with APKTool I always had to rename it.
By that I mean, apktool b MMS MMS2.apk
So apktool b FolderName NameOfAPK.apk
Try that. If not someone else will have to step in. A last resort would be to try APKManager or APK Multi-tool.
Update apktool and put it in the sdk platform tools folder then update the sdk with 4.0 stuff then run this command and keep an ics framework-res.apk in the same platform-tools folder.
apktool if framework-res.apk
Then proceed with
apktool d whateverapp.apk
This was the only way I could get it to work.
Sent from my SPH-D700 using Tapatalk
You might also want to try the version before the latest. I read that somewhere.
You can also try decompiling with the one version old one and compiling with the new one.
Sent from my SPH-D700 using Tapatalk
Did this work for you?
In Soviet Epic forum, clockworkmod root you!

Unable to recompile SystemUI.apk using apktool

I have been using apktool 1.4.3 to decompile and recompile framework-res.apk without any problem.
However while I can decompile SystemUI.apk without problem, I cannot recompile it. The error is shown below.
I have done searching in this forum but still can't find the solution.
Please kindly help thanks.
Code:
C:\apktool>apktool b systemui.apk
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:\apktool>
Sorry if I posted on wrong sub-forum
Have you tried recompiling with version 1.4.2?
who_mike_d said:
Have you tried recompiling with version 1.4.2?
Click to expand...
Click to collapse
The error still exists thanks
nighos said:
The error still exists thanks
Click to expand...
Click to collapse
Check if you set the right path for java
Its sometimes in program files or programs x86
Check the portal news. There was an article of an modded apktool version specially for ics
I had the same errors like you
Had these path settings wrong
Leave off the .apk. To compile the SystemUI folder type 'apktool b SystemUI'. Its also case sensitive
Sent from my Galaxy Nexus using xda premium
nbeebe24 said:
Leave off the .apk. To compile the SystemUI folder type 'apktool b SystemUI'. Its also case sensitive
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
You are right! Such a stupid mistake
Thanks
nbeebe24 said:
Leave off the .apk. To compile the SystemUI folder type 'apktool b SystemUI'. Its also case sensitive
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I didn't even notice he did that, that should fix the problem
Sent from my Galaxy Nexus using XDA
nighos said:
You are right! Such a stupid mistake
Thanks
Click to expand...
Click to collapse
No problem
Sent from my Galaxy Nexus using xda premium
i got the same error however i did not write ".apk" at the end of line.
Code:
C:\Users\x\Desktop\Apktool>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.j
ava:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(CommonTreeN
odeStream.java:106)
at org.antlr.runtime.tree.TreeParser.getSourceName(TreeParser.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliTreeWalker.java:372)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecogniz
er.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
at org.jf.smali.smaliTreeWalker.smali_file(smaliTreeWalker.java:451)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:85)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
C:\Users\x\Desktop\Apktool>
just changed an icon inside drawable-hdpi
try using this set of apk tools. this works great for me with ICS & Jelly Bean. And also make sure your SDK's are up to date. extract the folder from the zip file and use normally.
jase33 said:
try using this set of apk tools. this works great for me with ICS & Jelly Bean. And also make sure your SDK's are up to date. extract the folder from the zip file and use normally.
Click to expand...
Click to collapse
same problem
i uploaded apk,
i decompile, change an icon from drawable, but cannot recompile.
Actually, You don't need to decompile/recompile to change the images, brother. Just change SystemUI.apk to SystemUI.zip. Extract it. Edit the images you want to change. Drag the edit images into the .zip and in compression level select store. It will replace the files in .zip. Change .zip back to .apk. Try it now, it should work.
PS: Selecting store means it doesn't compress the images, Dragging the edited images into the .zip, selecting store and stuff isn't necessary, but it helps sometimes is it makes mimimal changes to the apk.
Your also going to want to get the sources from your framework-res.apk, by this command.
apktool if framework-res.apk
This should/might clear up your recompiling errors.
Sent from my Galaxy Nexus using xda premium

Decompile framework-res.apk error

Hi... has anyone tried decompiling the framework-res.apk with success ?? I tried decompiling the apk and got the following error....
PHP:
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.
One thing to note tho is i was able to successfully decompile a 2.3 GB framework-res.apk without any issues. Tried almost all apktool.jar files available on the forums.
Load semcgenericuxp.apk as the 2nd framework
Sent from my LT28h using xda premium
follow this thread
http://forum.xda-developers.com/showthread.php?t=1823223
You need to use SemcGenericUxpRes.apk also. But you will need to deodex it first as it has a odex file also. Infact you will need to deodex all the apks and frameworks if you want to use any mods.
Try using the latest ROM Kitchen to deodex the files. I had done the deodexing, but when I flashed the files into the phone I got a boot loop.
So if you find out any other method, let us all know.
Had installed the SemcGenericUxpRes.apk as well, but was still not working. Downloaded the latest apktool released y'day and was able to decompile the framework-res.apk.
Ganesh - As you said after installing the apk back in the phone i also get the boot loop. So no luck as of now. Will update in case i get anything thru.
Thanks.
Im new to this modifying apk files and whenever I try to decompile and recompile an apk (not a system apk) i was able to install it but when trying to use that apk I have a force close error. So those that happen normally or I am just doing something wrong?
deodexing ICS Ion Rom
Has any one successfully deodexed the ION Ics rom?
kapil4wm said:
Hi... has anyone tried decompiling the framework-res.apk with success ?? I tried decompiling the apk and got the following error....
PHP:
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
Can't find framework resources for package of id: 2. You must install proper fra
mework files, see project website for more info.
One thing to note tho is i was able to successfully decompile a 2.3 GB framework-res.apk without any issues. Tried almost all apktool.jar files available on the forums.
Click to expand...
Click to collapse
Just install all frameworks
Like
apktool if framework-res.apk
apktool if mediatek-res.apk
apktool if systemui.apk
anis_mulla said:
Just install all frameworks
Like
apktool if framework-res.apk
apktool if mediatek-res.apk
apktool if systemui.apk
Click to expand...
Click to collapse
You just bumped a 3 year old thread.

[Help!!! ] Need help compiling apks...

I have tried multiple guides and apktools with no luck....Please someone point me in the correct direction--->…I have been able to decompile, but no luck on recompile...
What errors are you getting? What OS do you have? Is this on a TW Stock based ROM or AOSP? Which apktool.jar/aapt.exe are you using?
Sent from my SPH-L710 using Tapatalk 2
Sry...windows 7....tw....systemUI.....upon recompile doesn't create new apk in apktool folder....caused by Java.io.File not found exception:....using the apktool found hereandroidforums.com/esteem-all-things...properly-decompile-recompile-aps-apktool.html
Use this apktool and aapt.exe
http://forum.xda-developers.com/showthread.php?t=1755243
Make sure you rename that jar to apktool.jar and place both the jar and exe in your apktool folder
Next, go to C:\User\Owner\apktool\framework and delete whatever resource apk's are in there
Next, get the framework-res.apk and twframework-res.apk from whatever ROM your working on and place them in your apktool folder
CD that apktool folder, after you cd type
apktool if framework-res.apk
apktool if twframework-res.apk
Decompile your SystemUI.apk again, make edits, recompile
Sent from my SPH-L710 using Tapatalk 2
Yes!!!!! :thumbup::thumbup::thumbup:

ApkTool Re-Compile systemUI.apk issue!!

I am trying to take some images and suck from a CM10 ROM and transfer to my ROM (stock touchwiz). I can decompile just fine and edit the files. (drawable-xdpi). But when i re-compile it, i get this really long error.
I've tried the following:
*Installing Both Touchwiz Framework and Framework (From my ROM)
*using the command:
Code:
apktool b -s systemui systemui.apk
(It wont let me use that code)
*Reinstalling the framework multiple times
*I even tried recompiling a non-edited version. That doesnt even work.
Any Suggestions?
I am needing to edit this for my ROM. v7 update needs to be released soon...
Droid Premium said:
I am trying to take some images and suck from a CM10 ROM and transfer to my ROM (stock touchwiz). I can decompile just fine and edit the files. (drawable-xdpi). But when i re-compile it, i get this really long error.
I've tried the following:
*Installing Both Touchwiz Framework and Framework (From my ROM)
*using the command:
Code:
apktool b -s systemui systemui.apk
(It wont let me use that code)
*Reinstalling the framework multiple times
*I even tried recompiling a non-edited version. That doesnt even work.
Any Suggestions?
I am needing to edit this for my ROM. v7 update needs to be released soon...
Click to expand...
Click to collapse
Take out the "-s"
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
I got the problem like this can any one tell what is it?
:\Users\the'e_000\Deskto.\apktool>apktool b -f -d app-debu-unali_ned.apk
Ixception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
.t xist: ap too .ym
at brut.androlib.Androlib.readMetaFile(Androlib.jaua:164)
at brut.androlib.Androlib.build(Androlib.jaua:183)
at brut.androlib.Androlib.build(indrolib.jaua:176)
at brut.apktool.Main.cmdBuild(Main.jaua:228)
at brut.apktool.Main.main(Main.jaua:79)
aused by: brut.directory.PathNotExist: apktool.yml
at .rut..irectory...stractlirectory.get'i e nput '.stractPlrectory.java:
RaE
at brut.androlib.Androlib.readMetaFileandrolib.jaua:160>
4 more

Categories

Resources