how do i compile a cm9 apk - Epic 4G Q&A, Help & Troubleshooting

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!

Related

[Q] Problems recompiling cm9 (themed) framework-res.apk

Attempting to toggle on the soft buttons in Nashdogg's CM9 b1 Blue Mist theme.
No problems decompiling and editing the appropriate xmls.
But I keep getting errors when I go to recompile the changes to the theme's framework.framework-res.apk. (apkmultitool and aapt).
Any suggestions?
Thx!
make sure you have the ics apktool.jar
Sent from a phone with kNOw CiQ k0nane...
Okay but that's not nashdoggs theme that's gooch's theme. Also try using apkmanager... let me get a link with my apk manager.
http://db.tt/EKvaxWIc
Once you unzip everything is in the folder in the other folder run the framework-if batch file then place the framework.apk in the place for modding. Open the script batch file choose the framework-res as your 0project [22] then decompile [9] edit it recompile [11] and it should work. Oh and the folder for editing appears in the project folder and the recompiled will appear in the modding folder name "unsignedFramework.apk". Oh and if it asks if its a system app hit n its not.
Sent from my SPH-D700 using xda premium
You can't recompile a themed framework. You need a clean framework
Sent from my Nexus S 4G using Tapatalk
GituSum said:
You can't recompile a themed framework. You need a clean framework
Sent from my Nexus S 4G using Tapatalk
Click to expand...
Click to collapse
you can compile themed frameworks with apktool, I didnt think so at first either.
Sent from a phone with kNOw CiQ k0nane...
Big Goron said:
Okay but that's not nashdoggs theme that's gooch's theme.
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
Totally meant gooch. Knew there was a g and an o in the name ;-)
Ton of fires today. Hope to test this out tomorrow.
Thanks alla yous for your suggestions!
sent from my fully armed and operational space phone
I can decompile/recompile the soft buttons modded apk, but get compile error (specified file is missing) when I decompile/recompile gooch's theme. (Not altering anything - just getting a control test)
Tomorrow, time permitting, ill take the apk from the rom and move each of the two modded apks' changes over.
Thanks for the download, Big G
sent from my fully armed and operational space phone
Is the error in red? What is the file its saying is missing? If its signedframework or unsignedframework.. ignore that its nothing.
Sent from my SPH-D700 using xda premium
Big Goron said:
Is the error in red? What is the file its saying is missing? If its signedframework or unsignedframework.. ignore that its nothing.
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
Heh -- wrote my message whilst walking the dog -- didn't want to misquote myself without specific examples.
But, yep -- all red
c:\android\apkmanager\other\..\projects\sb_framework-res.apk\res\values\public.xml:4536: error: Public symbol drawable/zoom_plate declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ASCHIL~1\AppData\Local\Temp\APKTOOL8847823845691568917.tmp, -x, -S, c:\android\apkmanager\other\..\projects\sb_framework-res.apk\res, -M, c:\android\apkmanager\other\..\projects\sb_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\ASCHIL~1\AppData\Local\Temp\APKTOOL8847823845691568917.tmp, -x, -S, c:\android\apkmanager\other\..\projects\sb_framework-res.apk\res, -M, c:\android\apkmanager\other\..\projects\sb_framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Click to expand...
Click to collapse
Looks to be the pngs in the themed app. I ran #2 to optimize images, but that didn't do diddly.
Gonna look at Draw-9 patch later.

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

[Q]] Apktool/manager etc problem! Really bored !

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

[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