I've been trying all ****ing day to get it to work and this is as far as I have gotten. The only reason I changed to it from apk manager was that apk manager wouldn't let me recompile a jellybean app. Any ideas? The main thing tripping me up I think is that I'm using the stupid adt bundle but I can't seem to find SDK without out so it's all wonky and I have no idea what I'm doing anymore. It's been 7 hours and a lot of problems.
Code:
--------------------------------------------------------------------------
|Mon 12/17/2012 -- 17:16:35.71|
--------------------------------------------------------------------------
--2012-12-17 17:16:35-- http://update.apkmultitool.com/apkver.txt
Resolving update.apkmultitool.com (update.apkmultitool.com)... 199.59.62.20
Connecting to update.apkmultitool.com (update.apkmultitool.com)|199.59.62.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 152 [text/plain]
Saving to: `apkver.txt'
0K 100% 5.35M=0s
2012-12-17 17:16:35 (5.35 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
'""platform-tools"\adb.exe"' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Nate\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferByte.<init>(Unknown Source)
at java.awt.image.Raster.createInterleavedRaster(Unknown Source)
at java.awt.image.BufferedImage.<init>(Unknown Source)
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:39)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:68)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Related
Ok Sony doesn't have the 1% step in battery icons and charging icons.
I want to personally mod the SystemUI.apk to have that 1% percent icon steps.
So, I already put more than 200 icons in res/drawable-xhdpi named stat_sys_battery_xx and stat_sys_battery_charge_anim_xx both from 0 to 100.
Edited the stat_sys_battery and stat_sys_battery_charge xml files.
I also edited the public.xml to declare the drawable icons there but I still have compiling error that the drawable path is not specified.
Any inputs guys?
Tapatalked from my TX
What exactly have you done?
Here's what i do using apkmanager:
Decompile systemui.apk
Add pngs
Edit stat_sys_battery.xml and stat_sys_battery_charge.xml
Delete public.xml, it will regenerate like Dr Who
Compile choosing system apk and answer yes and yes
Check log for errors
Install
:good:
Edit: BTW i bet if you delete public.xml and try again it works.
@dully79,
1.decompile
2.placed the icons in /drawable-xhdpi, edit stat_sys_battery and stat_sys_battery_charge xml's
3.delete public.xml in /res/values folder
4.compile,
5.answer, yes, and on the "keep" folder i deleted resources.arsc, the stat_sys_battery and stat_sys_battery_charge xml's (just curious why no values folder there
6.enter
--------------------------------
--------------------------------------------------------------------------
|Sat 04/13/2013 -- 11:22:45.26|
--------------------------------------------------------------------------
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
--------------------------------------------------------------------------
|Sat 04/13/2013 -- 11:25:20.95|
--------------------------------------------------------------------------
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
^C--------------------------------------------------------------------------
|Sat 04/13/2013 -- 11:26:43.90|
--------------------------------------------------------------------------
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Ry\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.
The directory is not empty.
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
'EVHO' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
Seems no error but when I tried to decompile it to make sure it is really ok, a lot of errors came out:
...........................................
...........................................
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x7f020135
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x7f020135
I: Decoding values */* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x7f0200fc
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(ResReferenceValue.java:61)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:351)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:87)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.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:285)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:113)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:116)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Press any key to continue . . .
Values gets compiled into resources.arsc. And vice versa.
Did the new SystemUI work?
Have you installed SystemUI?
You could use tickle my Android, the main man Timin8r told me about that.
dully79 said:
Values gets compiled into resources.arsc. And vice versa.
Did the new SystemUI work?
Have you installed SystemUI?
You could use tickle my Android, the main man Timin8r told me about that.
Click to expand...
Click to collapse
I haven't.
I'll try when I get home.
Tapatalked from my TX
use these XMLs which i edited today for reference
it works on my odex TX
When descompilo a file, for example SystemUI to make changes as I appear more PNG files damaged.
I would like you to tell me exact steps and easy to understand information about:
- Start decompilation of apps (although I know)
- Once the modifications have been made preferred, how to proceed to repair the PNG files that descompilaron and were wrong.
- And Back to compile (also know).
Thanks at all!
Hi,
a bit more information is needed.
How did you decompile ?
Program used for decompile ?
Did you install Framework ?
Which File ?
Which ROM ?
Did you get errors on .9.png Files ?
regards
Michael
If you're only changing pngs you don't have to decompile!
As mkruseonline said, give us some additional info and we'll help you
responde
Thank you very much for the response!, Here the information:
Errors Files "PNG", when I start decompilation:
C:\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\CrashOverride93\apktool\framework\1.apk
C:\apktool>apktool if twframework-res.apk
I: Framework installed to: C:\Users\CrashOverride93\apktool\framework\2.apk
C:\apktool>apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\CrashOverride93\apktool\framework\
1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_p.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_quick_setting_button_bg_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/notification_header_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_n.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_plnm_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_ab_bottom_transparent_dark_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_notification_panel_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/notification_panel_bg.9.png".Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_dim.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_f.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_off.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_donot_show_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_notification_panel_divider_1.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_on.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>
Applications used for decompiling/compiling apps:
- apktool-install-windows-r05-ibot.tar
-- apktool.bat
-- aapt.exe
- apktool1.5.2.tar
-- apktool.jar
Commands used for decompiling/compiling apps:
- apktool if framework-res.apk
- apktool if twframework-res.apk
- apktool d xxxxxx.apk
- apktool b xxxxxx.apk
ROM used:
- enox reVenge v4.0
¿What changes will make apps?
- Replace battery icons, etc., included in the SystemUI original custom ones.
- Modify files, ".xml".
- And other possible modifications requiring extra decompilation of these apps.
mkruseonline said:
Hi,
a bit more information is needed.
How did you decompile ?
Program used for decompile ?
Did you install Framework ?
Which File ?
Which ROM ?
Did you get errors on .9.png Files ?
regards
Michael
Click to expand...
Click to collapse
dariolob said:
If you're only changing pngs you don't have to decompile!
As mkruseonline said, give us some additional info and we'll help you
Click to expand...
Click to collapse
CrashOverride93 said:
Thank you very much for the response!, Here the information:
Errors Files "PNG", when I start decompilation:
C:\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\CrashOverride93\apktool\framework\1.apk
C:\apktool>apktool if twframework-res.apk
I: Framework installed to: C:\Users\CrashOverride93\apktool\framework\2.apk
C:\apktool>apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\CrashOverride93\apktool\framework\
1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_p.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_quick_setting_button_bg_normal.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/notification_header_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_n.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_plnm_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_ab_bottom_transparent_dark_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_notification_panel_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/notification_panel_bg.9.png".Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_dim.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_list_bg_f.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_off.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_donot_show_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_notification_panel_divider_1.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_quick_panel_on.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>
Applications used for decompiling/compiling apps:
- apktool-install-windows-r05-ibot.tar
-- apktool.bat
-- aapt.exe
- apktool1.5.2.tar
-- apktool.jar
Commands used for decompiling/compiling apps:
- apktool if framework-res.apk
- apktool if twframework-res.apk
- apktool d xxxxxx.apk
- apktool b xxxxxx.apk
ROM used:
- enox reVenge v4.0
¿What changes will make apps?
- Replace battery icons, etc., included in the SystemUI original custom ones.
- Modify files, ".xml".
- And other possible modifications requiring extra decompilation of these apps.
Click to expand...
Click to collapse
Try this:
- Decompile
- Make only the xml changes you wanna do
- Recompile your apk
- Now open with WinRAR/7zip the two SystemUI.apks (the old one and the new) - only open them,do not extract
- Paste you new resources.arsc in the old SystemUI.apk, then you can close the new one and focus on the old one with modified resources.arsc
- Navigate to drawable-hdpi and simply paste all your pngs and .9.pngs
- Close the apk, push it to your phone/ROM and you should be done
Hi CrashOverride93,
ENOX apk's can not be decompiled so easy, trust me.
I used APK Multitool Point 9 for decompiling (without dependencies)
But dariolob Way may work also.
regards
Michael
responde
And since I know the areas marked on each side of the figures with "draw9patch"?
So, I tried to use UOT kitchen to add battery percentage to my phone. I have StockRom evolution because it's the fastest ROM and it my battery last longer with it but I'd like to be able to modify it with UOT kitchen. I tried to upload framework-res.apk, SystemUI.apk and twframework-res.apk from the phone to the Kitchen but then, when I try to pick up the completed file, it tells me that it failed because of an SHTF error...
Here's the error log:
Decompiling framework-res.apk UOT-10-17-20-12-1
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ByteInterleavedRaster.setDataElements(ByteInterleavedRaster.java:546)
at java.awt.image.BufferedImage.setRGB(BufferedImage.java:988)
at brut.androlib.res.decoder.Res9patchStreamDecoder.drawHLine(Res9patchStreamDecoder.java:93)
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:53)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:107)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:73)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238)
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)
Decompiling SystemUI.apk UOT-10-17-20-12-1
I: Framework installed to: /root/apktool/framework/1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-mdpi/status_bar_close_on.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-mdpi/status_bar_close_off.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Compiling framework-res.apk UOT-10-17-20-12-1
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
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.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
Click to expand...
Click to collapse
Nico3d3 said:
So, I tried to use UOT kitchen to add battery percentage to my phone. I have StockRom evolution because it's the fastest ROM and it my battery last longer with it but I'd like to be able to modify it with UOT kitchen. I tried to upload framework-res.apk, SystemUI.apk and twframework-res.apk from the phone to the Kitchen but then, when I try to pick up the completed file, it tells me that it failed because of an SHTF error...
Here's the error log:
Click to expand...
Click to collapse
Looks lie that you have two errors, the first is that in:
W: Cant find 9patch chunk in file: "drawable-mdpi/status_bar_close_on.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-mdpi/status_bar_close_off.9.png". Renaming it to *.png.
You have to change the extension to png image and second, you have added java to the Path environment variable.
Toyerd24 said:
You have to change the extension to png image and second, you have added java to the Path environment variable.
Click to expand...
Click to collapse
I solved the 9patch chunk error using xUltimate-9patch, now I just have to solve the Java error. I'm still trying to find out how to add the path environment variable...
How do I restore the original statusbar from a modified ROM?
Hello all. I need a help with decompile apks especially framework-res.apk I deodexed stock apps successfully but when I tried to decompile it, I wasn't able. I searched for a few hours and tried many method and different apktool with no success. I've found only one way how is possible to do it but I can't verify it because it must be done on Linux. I'm on Windows 7 x64.
Can any of you help me?
Nobody knows?
Lucki_X said:
Nobody knows?
Click to expand...
Click to collapse
I only use linux for android development, but it should be the same. What error do u get? Because i can decompile it just fine on linux.
Hazou said:
I only use linux for android development, but it should be the same. What error do u get? Because i can decompile it just fine on linux.
Click to expand...
Click to collapse
This is a log. FYI i tried it on two different PC with no succes even though I'm able to decompile all other apks except this one from KK stock 4.4.2
|st 18.03.2015 -- 21:02:33,21|
--------------------------------------------------------------------------
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
I: Loading resource table...
W: Config flags size > 36. Exceeding bytes: 0xFFFF.
W: Invalid config flags detected. Dropping resources: style-v17-ERR0
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000103
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
I also have the same problem with framework-res.apk from 4.4.2 stock rom. Decomplie works but recompile brings up a java error ... (on Windows with APK Tools)
Lucki_X said:
This is a log. FYI i tried it on two different PC with no succes even though I'm able to decompile all other apks except this one from KK stock 4.4.2
|st 18.03.2015 -- 21:02:33,21|
--------------------------------------------------------------------------
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
I: Loading resource table...
W: Config flags size > 36. Exceeding bytes: 0xFFFF.
W: Invalid config flags detected. Dropping resources: style-v17-ERR0
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000103
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
Click to expand...
Click to collapse
For android-4.4 system apps to decompile u need Java 7 and apktools 2.0. Java 8 is not supported in android and afaik apktools lower than 2.0 don't work.
Hazou said:
For android-4.4 system apps to decompile u need Java 7 and apktools 2.0. Java 8 is not supported in android and afaik apktools lower than 2.0 don't work.
Click to expand...
Click to collapse
Thank you for your advice. I didn't know it. It works for me now.
I was little bit confused because I was able to decompile the framework from your CM11 without problems and framework from stock ROM don't.
Hello,
I'm currently trying to run apktool using dalvikvm in the customize.sh script:
Bash:
apktool_d() {
#ANDROID_DATA=$TMPDIR_JCD ANDROID_ROOT=/system LD_LIBRARY_PATH=/system/lib dalvikvm -Xbootclasspath:/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/apache-xml.jar -classpath $BIN/apktool_*-dexed.jar brut.apktool.Main d --frame-path $TMPDIR_JCD/framework --no-src -o $TMPDIR_JCD/resout $1
dalvikvm -classpath $BIN/apktool_*-dexed.jar brut.apktool.Main d --no-src -o $TMPDIR_JCD/resout $1
test $? != 0 && abort "Decoding APK resources failed. Aborting..."
}
I've tried to port that code from an outdated template: https://github.com/djb77/magisk-module-template-apkpatcher
When using the commented out method the command aborts with "Decoding APK resources failed" and logcat *:E is telling me the following:
Code:
04-17 21:11:53.649 11641 11641 E dalvikvm: Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unexpected component count in /system/framework/arm/boot.art, received 11, expected non-zero and <= 3
04-17 21:11:53.677 11641 11641 E dalvikvm: Could not initialize without image: Boot classpath is empty.
When trying the second approach without -Xbootclasspath and so on I'm getting a NullPointerException directly in the magisk log (saved file):
Code:
I: Using Apktool 2.3.4 on Bluetooth.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
Exception in thread "main" java.lang.ExceptionInInitializerError
at brut.util.OSDetection.isMacOSX(OSDetection.java:28)
at brut.androlib.res.AndrolibResources.getFrameworkDir(AndrolibResources.java:913)
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:754)
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:116)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:84)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:67)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:63)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:39)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:385)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:97)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:155)
at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:204)
at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:136)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:122)
at brut.apktool.Main.cmdDecode(Main.java:164)
at brut.apktool.Main.main(Main.java:73)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
at brut.util.OSDetection.<clinit>(OSDetection.java:21)
... 20 more
Decoding APK resources failed. Aborting...
! Installation failed
After some research I tried to find out if the customize.sh is running as root because some posts telling that setting LD_LIBRARY_PATH setting as root fixed those "Could not create image space" dalvikvm errors but can't find any info about that. see https://github.com/termux/termux-packages/issues/900#issuecomment-322207233
I'm out of ideas and happy for any help.
Thanks in advance
Danny.