[Q] [please help]Decompiling apk files - Sony Xperia S, Acro S, Ion

So it seems that when i try to decompile apk files i get a error (scroll down for log) , and no matter what version of apktool i use or what app i use or even website, i still can NOT decompile the Xperia S settings APK successfully
and before you say update your apk tool , ive tried all version of almost everything
so id love you if you could give me a fully decompiled Settings APK or you could tell me how to Decompile without faliour
i love you longtime
here is the error:
[email protected]:~$ cd adt
[email protected]:~/adt$ cd decompile
[email protected]:~/adt/decompile$ apktool if Settings.apk
I: Framework installed to: /home/ubuntu/apktool/framework/127.apk
[email protected]:~/adt/decompile$ apktool d Settings.apk Settings
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ubuntu/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=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010303a6
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:44)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:48)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
[email protected]:~/adt/decompile$

Envious_Data said:
So it seems that when i try to decompile apk files i get a error (scroll down for log) , and no matter what version of apktool i use or what app i use or even website, i still can NOT decompile the Xperia S settings APK successfully
and before you say update your apk tool , ive tried all version of almost everything
so id love you if you could give me a fully decompiled Settings APK or you could tell me how to Decompile without faliour
i love you longtime
here is the error:
[email protected]:~$ cd adt
[email protected]:~/adt$ cd decompile
[email protected]:~/adt/decompile$ apktool if Settings.apk
I: Framework installed to: /home/ubuntu/apktool/framework/127.apk
[email protected]:~/adt/decompile$ apktool d Settings.apk Settings
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ubuntu/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=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
W: Could not decode attr value, using undecoded value instead: ns=android, name=textCursorDrawable, value=0x01080923
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010303a6
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:44)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:48)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
[email protected]:~/adt/decompile$
Click to expand...
Click to collapse
Maybe in here :
apktool if Settings.apk
Search :
framework-res.apk
SemcGenericUxpRes.apk
from you rom..
And try again with :
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
Then decompile again..
Sent from my LT26i using xda premium

thanks
thanks this helps alot
(lol trying to do things without help ,untill i need it... not a good tactic)

Envious_Data said:
thanks this helps alot
(lol trying to do things without help ,untill i need it... not a good tactic)
Click to expand...
Click to collapse
u r welcome.
Sent from my LT26i using xda premium

Related

[Help] decompile error!!

when I try to decompile SystemUI or Settings.apk i have an error.
Code:
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\Luca\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x02050029
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x0205002e
why???
Please help me!!!
In other rom i don't have this problem.
File is of rom InsertCoin CM7
May I suggest that you post this in the 'Desire Android Development' section of the forums?

[Q] Uot Kitchen help

Hello,
I have tried a few times to change the Icons and status bar icons on my Insert Coin rom but it will not work, I can change the battery icon and pop up window stuff with no problems.
I am uploading the com.htc.resources.apk, framework-res.apk and SystemUI.apk and checking the Data++ box.
Can anybody help?
Cheers
Your compatibility UOT kitchen.
longster10 said:
Hello,
I have tried a few times to change the Icons and status bar icons on my Insert Coin rom but it will not work, I can change the battery icon and pop up window stuff with no problems.
I am uploading the com.htc.resources.apk, framework-res.apk and SystemUI.apk and checking the Data++ box.
Can anybody help?
Cheers
Click to expand...
Click to collapse
Try using the kitchen's original files instead. That always work for me.
I tried to use the kitchen's original ROM files, but still ended up with the ff SHTF error:
Decompiling framework-res.apk UOT-07-01-14-12-1
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Decompiling SystemUI.apk UOT-07-01-14-12-1
I: Framework installed to: /home/mendozinas/apktool/framework/1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /home/mendozinas/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x020b001a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x020b001a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x020b001a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x020b001f
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x020b0042
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.
Compiling framework-res.apk UOT-07-01-14-12-1
W: Could not find sources
I: Building resources...
I: Building apk file...
Compiling SystemUI.apk UOT-07-01-14-12-1
I: Framework installed to: /home/mendoza/apktool/framework/1.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: 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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Abst ractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java: 138)
... 4 more
If I do have to upload framework-res.apk, SystemUI.apk and com.htc.resources.apk, which directory do I find them in? Been poking around my ROM and could only find framework-res.apk so far. My ROM details are in my signature
Htc resources is with the framework and systemui is in /system/app. I always upload my files since it always works.
Swyped...
I'm also not able to change these icons with GingerVillain (2.6). I tried to push the system-ui and framework-res per adb, but it didn't work too. It should be possible with insertcoin (it is deodexed)
longster10 said:
Hello,
I have tried a few times to change the Icons and status bar icons on my Insert Coin rom but it will not work, I can change the battery icon and pop up window stuff with no problems.
I am uploading the com.htc.resources.apk, framework-res.apk and SystemUI.apk and checking the Data++ box.
Can anybody help?
Cheers
Click to expand...
Click to collapse
same problem here. IC 1.1.0., with CM 3.x recovery. i used kitchen's files, creating and flashing goes well but no change is visible upon boot up...
ok, adb push did work for me...IC GB 1.1.0. rom...
unable to upload com.htc.resources.apk
Ok...so i've been playing in the kitchen and for some reason, it wont let me click the upload button for com.htc.resources.apk and i'm running NilsP Business Gingersense, so it IS a Gingerbread rom with sense, so i do need to upload that file...anyone else having problems with this? maybe what ever i didnt change uses that file, so the fact that i'm not changing anything to that file, it wouldnt let me upload it? i hope thats it.....
Ok..it was because the kitchen was closed for a bit....

[REQUEST] Please port Lidroid toggles for ZL .244

Can anyone please port the good old lidroid toggles for Xperia ZL 4.2.2 .244 .
The ones that slide sideways like in gingerbread which also redirects to corresponding settings upon long press.
I came across THIS tutorial which was the closest i could find to my requirement.
I tried decompiling the systemui.apk from .244 rom but i was getting the following error
Code:
D:\Android\Tools\APK Tool>java -jar apktool.jar d SystemUI.apk SystemUI
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Windows\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=androidprv, na
me=primaryUserOnly, value=0xffffffff
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080812
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080747
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080813
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080770
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawable, value=0x01080812
W: Could not decode attr value, using undecoded value instead: ns=android, name=
drawableTop, value=0x0108071e
I: Decoding values */* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x01010459
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3
5)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:313)
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:80)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:130)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPull
StreamDecoder.java:144)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode
r.java:131)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:218
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
D:\Android\Tools\APK Tool>
So if anyone could guide me or port it all over it would be greatly appreciated.
Thanks in advance.
post in the z forums ...might get u more help
Can anybody please port 20 Lidroid Toggles For Xperia P to Xperia ZL

Need Help for decompile SystemUI apk from s5

Hello...Is there any way to decompile KitKat SystemIU.apk?
I have framework-res and twframework-res instales....I decompile a lot of apk....but I cant decompile the SystemUI.apk
D:\Administradorrrr\apkt>cmd
Microsoft Windows [Versión 6.3.9600]
(c) 2013 Microsoft Corporation. Todos los derechos reservados.
D:\Administradorrrr\apkt>apktool d -f SystemUI.apk
I: Using Apktool 2.0.0-Beta9 on SystemUI.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Administrador\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawa
ble, value=0x01081093
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawa
ble, value=0x01081093
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawa
ble, value=0x01081094
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010
81093
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceVal
ue.java:60)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReference
Value.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarVa
lue.java:45)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourc
eParser.java:351)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Xml
PullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(St
aticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlS
erializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecode
r.java:87)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder
.java:146)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecode
rContainer.java:33)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:107)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:91)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:304)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:116)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:169)
at brut.apktool.Main.main(Main.java:85)
D:\Administradorrrr\apkt>
Click to expand...
Click to collapse
Any help is wellcome.
Cocolopes said:
I have framework-res and twframework-res instales
Click to expand...
Click to collapse
Are the two from an S5 Rom? I think you need the base frameworks to work.
erljayp said:
Are the two from an S5 Rom? I think you need the base frameworks to work.
Click to expand...
Click to collapse
Thanks...its working now....I have a lot of frameworks and maybe I use the 4.3 one....or something...my bad....
Cocolopes said:
Thanks...its working now....I have a lot of frameworks and maybe I use the 4.3 one....or something...my bad....
Click to expand...
Click to collapse
what i need for decompliler Samsung S5 apk?

[Q] decompile LG system apps from 5.0

APKTool failed to decompile LGAlarmClock.apk:
C:\Users\Yoav\Downloads\android>apktool d LGAlarmClock.apk
I: Using Apktool 2.0.0-RC3 on LGAlarmClock.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070264
W: Could not decode attr value, using undecoded value instead: ns=android, name=
icon, value=0x7f020078
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070264
W: Could not decode attr value, using undecoded value instead: ns=android, name=
resource, value=0x7f020079
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0046
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f07029a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0046
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f07029a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f07029b
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070276
W: Could not decode attr value, using undecoded value instead: ns=android, name=
resource, value=0x7f040003
W: Could not decode attr value, using undecoded value instead: ns=android, name=
resource, value=0x7f040004
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0035
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070329
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070264
W: Could not decode attr value, using undecoded value instead: ns=android, name=
resource, value=0x7f040005
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f070264
W: Could not decode attr value, using undecoded value instead: ns=android, name=
resource, value=0x7f040007
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0044
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f07029b
W: Could not decode attr value, using undecoded value instead: ns=android, name=
icon, value=0x7f050014
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x7f070264
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:60)
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
1)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:369)
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:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPull
StreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode
r.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Click to expand...
Click to collapse
I've attached the right framework-res.apk.
Has anyone successed in decompile system apps from android 5?
yoavst said:
APKTool failed to decompile LGAlarmClock.apk:
I've attached the right framework-res.apk.
Has anyone successed in decompile system apps from android 5?
Click to expand...
Click to collapse
I havent tested with lollipop yet, but you need to add both framework resources on Kitkat. framework-res.apk and lge-res.apk
type in terminal
apktool if framework-res.apk
apktool if lge-res.apk
then you can try to decompile apps... but i warn you that you can't decompile lollipop apps yet because apktool is still buggy on lollipop
manups4e said:
type in terminal
apktool if framework-res.apk
apktool if lge-res.apk
then you can try to decompile apps... but i warn you that you can't decompile lollipop apps yet because apktool is still buggy on lollipop
Click to expand...
Click to collapse
doesn't work...
apktool has an error. if you look at c/user/apktool/framework apktool has an error, you will see that there 0.apk and 1.apk.
should have 1.apk and 2.apk.
This error is accepted from dev.
More info
https://code.google.com/p/android-apktool/issues/list
that's only for lollipop, kitkat apks are working well
ffalete said:
apktool has an error. if you look at c/user/apktool/framework apktool has an error, you will see that there 0.apk and 1.apk.
should have 1.apk and 2.apk.
This error is accepted from dev.
More info
https://code.google.com/p/android-apktool/issues/list
Click to expand...
Click to collapse
tried to play all the combinations: lge res 1, framework res 2; lge res 2 ,framework res 1.
However, it didn't solve the problem, now i got another error:
C:\Users\Yoav\Downloads\android>apktool d LGAlarmClock.apk
I: Using Apktool 2.0.0-RC3 on LGAlarmClock.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
versionCode, value=0x029f65bc
I: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
Cleaning up unclosed ZipFile for archive C:\Users\Yoav\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
versionName, value=0x00000028
I: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
Cleaning up unclosed ZipFile for archive C:\Users\Yoav\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
versionCode, value=0x029f65bc
I: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
Cleaning up unclosed ZipFile for archive C:\Users\Yoav\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
versionName, value=0x00000028
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSeria
lizer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:
673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSer
ializerDelegate.java:106)
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:83)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPull
StreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode
r.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
C:\Users\Yoav\Downloads\android>
Click to expand...
Click to collapse
As others stated, apktool is buggy on Lollipop apps. The only way I've found to decompile Lollipop apps is to do "apktool d -r appfile.apk". That decompiles the classes.dex itself, not the resources, but as I'm not sure what you're trying to do, I thought I'd leave my two cents.
r3pwn said:
As others stated, apktool is buggy on Lollipop apps. The only way I've found to decompile Lollipop apps is to do "apktool d -r appfile.apk". That decompiles the classes.dex itself, not the resources, but as I'm not sure what you're trying to do, I thought I'd leave my two cents.
Click to expand...
Click to collapse
Exception in thread "main" org.jf.dexlib2.dexbacked.DexBackedDexFile$NotADexFile
: Invalid magic value: 01 18 24 61 70 70 6c 69
at org.jf.dexlib2.dexbacked.DexBackedDexFile.verifyMagicAndByteOrder(Dex
BackedDexFile.java:151)
at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.jav
a:70)
at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.jav
a:96)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:84)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:59)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:94)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:46)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:91)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:126)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
you can't use apktool for LOLLIPOP since it's not working yet.. you can do it only on KITKAT
yoavst said:
Exception in thread "main" org.jf.dexlib2.dexbacked.DexBackedDexFile$NotADexFile
: Invalid magic value: 01 18 24 61 70 70 6c 69
at org.jf.dexlib2.dexbacked.DexBackedDexFile.verifyMagicAndByteOrder(Dex
BackedDexFile.java:151)
at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.jav
a:70)
at org.jf.dexlib2.dexbacked.DexBackedDexFile.<init>(DexBackedDexFile.jav
a:96)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:84)
at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:59)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:94)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:46)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:91)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:126)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Click to expand...
Click to collapse
That's odd. Must be the way that LG compiled their apps. It works fine with stock (AOSP) Lollipop apps.
LGCover.apk start with 0x1 + 0x18 + $application/octet-streamre8Z/[email protected]—pEncryption-Method: AES128CBC;padding=RFC2630;plaintextlen=0000378580
all the apks should start with dex\n035\0 (LGSystemUI, LGAlarmClock... all start with dex\n035\0)
that's why you need lge-res.apk to decompile them but right now apktool is not compatible with lollipop lge-res.apk
manups4e said:
that's why you need lge-res.apk to decompile them but right now apktool is not compatible with lollipop lge-res.apk
Click to expand...
Click to collapse
https://code.google.com/p/android-apktool/issues/detail?id=713
https://code.google.com/p/android-apktool/issues/detail?id=738
So you say that the problem is with lge-res? what is this file for?
lge-res.apk is the resource apk for lg framework and is requested to make lg apps to work and to decompile too
manups4e said:
lge-res.apk is the resource apk for lg framework and is requested to make lg apps to work and to decompile too
Click to expand...
Click to collapse
so why there is also framework-res?
because framework-res is the framework for all other android apps
Apktool RC3 should work with Lollipop apps but - as I already reported the issue - it does not work with the LG system apps. See the conversation with iBotPeaches here.
Kickoff said:
Apktool RC3 should work with Lollipop apps but - as I already reported the issue - it does not work with the LG system apps. See the conversation with iBotPeaches here.
Click to expand...
Click to collapse
it workswith the patched code. However see https://code.google.com/p/android-a...tus Priority Milestone Owner Summary Modified
yoavst said:
it workswith the patched code. However see https://code.google.com/p/android-a...tus Priority Milestone Owner Summary Modified
Click to expand...
Click to collapse
What do you mean under patched code?

Categories

Resources