APKTool errors / de- recompiling framework-res - Xperia Z5 Q&A, Help & Troubleshooting

I need to de- / recompile framework-res.apk for some modifications. I use APKTool 2.0.3 (http://ibotpeaches.github.io/Apktool/) but I have some serious problems. I tried it with SystemUI.apk before, but it dont work. I want to resize navbar, this thing takes 1/10 on MM of the screen size.
Code:
C:\Users\alphatact1cs\Desktop\apktool>java -jar apktool.jar if framework-res.apk
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Framework installed to: C:\Users\alphatact1cs\apktool\framework\1.apk
C:\Users\alphatact1cs\Desktop\apktool>java -jar apktool.jar d framework-res.apk
I: Using Apktool 2.0.3 on framework-res.apk
I: Loading resource table...
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=somc, name=drawable, value=0x010802e7
W: Could not decode attr value, using undecoded value instead: ns=somc, name=color, value=0x02060002
I: Decoding values */* XMLs...
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
C:\Users\alphatact1cs\Desktop\apktool>java -jar apktool.jar b framework-res
I: Using Apktool 2.0.3
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: 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(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
... 4 more
C:\Users\alphatact1cs\Desktop\apktool>
How can I solve this?
alphatact1cs

You need to install some other frameworks. Why not just install Xposed and use Gravitybox?

Mr_Bartek said:
You need to install some other frameworks. Why not just install Xposed and use Gravitybox?
Click to expand...
Click to collapse
Xposed doesnt work the way it should on Z5 an Android 6.0. I have some problems with the camera app. It was really bad on Lollipop, but now it opens and goes into landscape mode. I can rotate my phone like I want, it doesnt change the orientation.

I use Xposed on MM and have no issues with camera. Rotation works fine too.

Related

[Q] Problem decompiling.. I'm confused.

Hi and first of all sorry for my English, not my native language.
So.... I got problems decompiling .apk. I have my PocketCasts app and I would like to do some theming and text editing on buttons, but it never decompiles, I tried using 7-zip to unzip it and zip it back, never could I install app after zipping it back... Here's how it looks in apktool when I try to decompile:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Emil\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
hardwareAccelerated, value=0xffffffff
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x010102d3
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
5)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:315)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
00)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Press any key to continue . . .
This is not a deadly error. Looks like apktool decompiled the apk. I will suggest you try http://forum.xda-developers.com/showthread.php?t=707189, http://forum.xda-developers.com/showthread.php?t=695701, http://stackoverflow.com/, http://bit.ly/sX8zVV for some help on this issue. There's a lot of info in them links. Cheers!

[Q] Apk Manager SystemUI.apk Compile Problem

Hello my friends.
I installed frameworkres and tw framework resources files. I decompiled SystemUI.apk and changed drawables.xml and status bar smali.
But I can't compile SystemUI.apk Error.
Log is here :
Code:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk BulunamadĀ
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk BulunamadĀ
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\HP\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
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.java:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(CommonTreeNodeStream.java:106)
at org.antlr.runtime.tree.TreeP****r.getSourceName(TreeP****r.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliTreeWalker.java:372)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.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:243)
at brut.androlib.Androlib.buildSources(Androlib.java:200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
up

[Q]Problem recompiling Settings.apk

Im new to android developements so please bare with me
I get this error whenever I try to recompile Settings.apk
--------------------------------------------------------------------------
|Sun 01/12/2014 -- 3:11:40.05|
--------------------------------------------------------------------------
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
The system cannot find the batch label specified - noproj
--------------------------------------------------------------------------
|Sun 01/12/2014 -- 3:12:07.41|
--------------------------------------------------------------------------
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode, sharing)
5207 KB/s (3807923 bytes in 0.714s)
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\jadepaul\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
layout, value=0x7f0400ba
I: Decoding values */* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x7f0400ba
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:50)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:61)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
larValue.java:45)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:4
0)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:351)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD
ecoder.java:87)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:285
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:113)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:116)
at brut.apktool.Main.cmdDecode(Main.java:148)
at brut.apktool.Main.main(Main.java:77)
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:163)
at brut.androlib.Androlib.build(Androlib.java:185)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:159)
... 4 more

Decompiling Settings.apk on Xperia V - Android 4.3

I'm using android 4.3 stock version of framework-res.apk to decompile Settings.apk but Apktool 1.5.2 & Apktool 2.0 beta are giving me this error :
"Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info."
any help ?
Found the Problem & fixed apktool
apparently I needed to install SemcGenericUxpRes.apk before decompiling the Settings.apk file, another problem presented itself at this point..
installing SemcGenericUxpRes.apk using apktool 2.0 beta 7 resulted an error :
Exception in thread "main" brut.androlib.AndrolibException: Multiple types: <emp
ty>
at brut.androlib.res.data.ResPackage.addType(ResPackage.java:168)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
9)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:686)
at brut.androlib.Androlib.installFramework(Androlib.java:640)
at brut.apktool.Main.cmdInstallFramework(Main.java:249)
at brut.apktool.Main.main(Main.java:91)
so I did some research and fixed the 'Multiple types' bug in apktool (I'll attach the fixed version at the end of the post) ,and now every thing worked just fine ^_^
C:\apk>java -jar apktool-fixed.jar if framework-res.apk
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
C:\apk>java -jar apktool-fixed.jar if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\User\apktool\framework\2.apk
C:\apk>java -jar apktool-fixed.jar d Settings.apk
I: Using Apktool 2.0.0-Beta7 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\User\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\User\apktool\framework\2.apk
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\2.apk
I: Loading resource table...
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\1.apk
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
fixed apktool 2.0 beta 7 (remove spaces from the url) : http :// www . mediafire . com /?cnstb97sszm476y
delete as I found the answer, please ignore

[Q&A][LP][5.0.2]Decompile Settings.apk error

Everything works like a charm when I decompile other APKS but when I tried settings.apk it didn't work saying this error.
I have installed everything like deodexed systemui.apk and framework-res.apk.
I dont know weather its with SemcGenericUxpRes or some stuff.
C:\apktool>apktool d settings.apk
I: Using Apktool 2.0.0 on settings.apk
I: Loading resource table...
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\m0rpheus\apktool\framework\1.apk
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
Help anyone!
Its fixed now I installed com.sonyericsson.uxp.apk to framework files and its working now.
Mod please delete this thread
HOW
how can you installer the com.sonyericsson.uxp.apk to framework ?

Categories

Resources