yashsingh1/xdaforums huggingface dataset:
[Android Software Development] ag4751:
An alternative way that I always use is to keep a copy of the original apk ,as a backup then decompile your apk, make the changes you want then compile the apk, once compiled extract the changed xml / png files and copy them to the same folder locations in the original apk then install that to your phone.
[Android Software Development] pepitoff:
I'm talking about system apps
[Android Software Development] Flextrick:
Updated OP,

thanks [MENTION=4440080]LasVegasRomeo[/MENTION]!
[Android Software Development] ag4751:
Makes no difference extract the browser.apk decompile it change the pngs you want to change, compile the changed apk.

Use 7zip to open the apk, go to the folder that has the changed png's in the res/mipmap-hdpi, res/mipmap-mdpi, res/mipmap-xhdpi extract the changed png's from those folders and put them in the original apk in the same folders then put the original apk back on your phone

If you are only changing normal png and not .9png's you don't really need to decompile the apk you can just replace the png's just make sure they are the same size so if the original png is 125x125 replace it with one that is 125x125 and it will work fine.

Also don't sign system apk's
[Android Software Development] Flextrick:
Works too, but why so complicated?

With the other way you just have to copy the META-INF folder and the Manifest.xml. Otherwise you have to copy many files from many directories, can be very a long process.

But it works for sure, your right.
[Android Software Development] ag4751:
Yes but as you probably know some apks appear to compile correctly, Samsung SG3 on 4.3 stock at the moment, there are issues with SystemUI, Contacts, to name 2 and the problem isn't with apktool it is something Samsung are doing if you decompile the contacts it works when you come to compiling it then you get errors. It tells you that certain xml files are not there but when you actually look in the original apk they are not there to start with so apktool can't compile them because they were never there to decompile to start with.

Yes it is a longer process but it prevents any of the crashing issues or the apk not working at all so although its a pain it gets around the issues in the SystemUI and Contacts apks. I have created the missing SystemUI and Contacts xml so I can compile the apk but as I don't know how accurate they are I can't risk using an apk with them in.

In summary, yes longer process but the apps work they don't crash or completely fail as they potentially would. it depends on the brand, HTC and Sony also have some issues with some of the apps as well but again it is not believed to be apktool but the companies and their builds.
[Android Software Development] meangreenie:
is apktool really part of java ?

i'm getting the error 'The system cannot find the path specified.

'apktool' is not recognized as an internal or external command'

installed java jre and jdk, set paths both ways mentioned in the last few pages of this thread... but i still have the apktool error?

whats the real fix ? do i need android sdk? seems more likely to have apktool

wouldn't it be easier to have apktool in the package ?
[Android Software Development] pepitoff:
10x man! :good:
[Android Software Development] soeltz7fold:
Good Evening

Just wanna share my log

Cleaning up unclosed ZipFile for archive C:\Users\Kagebunshin\apktool\framework\1.apk

what this about?

this log turn up after process decompiling

so im tried to decompile systemUi.apk from znxt rom and i dont forget included framework-res.apk from ZNXT rom to. but the finish apk after sign is stuck (not bootloop, just blank ui, but i can login to homescreen afterboot) when im push to hh via adb or rootex is same :(

any solution?

sorry for bad EN

and i like ure tool project

keep support

next log when im recompile

C:\AndroidMultitool\Decompiled_apk\SystemUI\res\drawable\stat_sys_battery.xml:4: error: Error parsing XML: XML or text declaration not at start of entity

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\KAGEBU~1\AppData\Local\Temp\brut_util_Jar_9182510188151460970.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 16, --version-code, 16, --version-name, 4.1.2-JH5_tw, -F, C:\Users\KAGEBU~1\AppData\Local\Temp\APKTOOL4241784912226779418.tmp, -I, C:\Users\Kagebunshin\apktool\framework\1.apk, -S, C:\AndroidMultitool\Decompiled_apk\SystemUI\res, -M, C:\AndroidMultitool\Decompiled_apk\SystemUI\AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)

at brut.androlib.Androlib.buildResources(Androlib.java:363)

at brut.androlib.Androlib.build(Androlib.java:286)

at brut.androlib.Androlib.build(Androlib.java:258)

at brut.apktool.Main.cmdBuild(Main.java:236)

at brut.apktool.Main.main(Main.java:88)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\KAGEBU~1\AppData\Local\Temp\brut_util_Jar_9182510188151460970.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 16, --version-code, 16, --version-name, 4.1.2-JH5_tw, -F, C:\Users\KAGEBU~1\AppData\Local\Temp\APKTOOL4241784912226779418.tmp, -I, C:\Users\Kagebunshin\apktool\framework\1.apk, -S, C:\AndroidMultitool\Decompiled_apk\SystemUI\res, -M, C:\AndroidMultitool\Decompiled_apk\SystemUI\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [C:\Users\KAGEBU~1\AppData\Local\Temp\brut_util_Jar_9182510188151460970.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 16, --version-code, 16, --version-name, 4.1.2-JH5_tw, -F, C:\Users\KAGEBU~1\AppData\Local\Temp\APKTOOL4241784912226779418.tmp, -I, C:\Users\Kagebunshin\apktool\framework\1.apk, -S, C:\AndroidMultitool\Decompiled_apk\SystemUI\res, -M, C:\AndroidMultitool\Decompiled_apk\SystemUI\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)

... 6 more

The system cannot find the file specified.

The system cannot find the file specified.

Whats wrong ?_?
[Android Software Development] vonerk:
[MENTION=4642185]Flextrick[/MENTION]

What exactly does installing framework.apk's do? Just curious if you need to do this step every time you want to decompile an apk or jar with multitool. Or is is it just for messing with framework apk's?
[Android Software Development] Flextrick:
You need to install all resources from the framework.

Like an apk uses framework resources (like icons, etc), if you want to decompile it, you need the framework-res.apk where these icons are located.

It's important to install it, but you don't have to install it every time, only once per framework.
[Android Software Development] -CALIBAN666-:
great tool,works perfect for me on windows 8.1 pro 64bit,simple,fast and good working,thanx.
[Android Software Development] pepitoff:
What is difference between png and .9.png files?

Why I can't change .9.png like I changed png files?

Can you explain me, please?
[Android Software Development] dpwguenther:
hello, i am trying to decompile an updated version of the same theme ive been decompiling for a while now with no problems but when i decompile the updated version i get this:

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01060085

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(ResReferenceValue.java:60)

at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResScalarValue.java:57)

at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:65)

at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:553)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:309)

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)

can anyone help?
[Android Software Development] ag4751:
What is difference between png and .9.png files?

Basically a .9.png can be stretched without losing its style so you can set it up the way you want it to look in portrait and landscape mode, if you have a football for example in portrait mode then when you switch to landscape mode without the .9 patch you will have a rugby ball, the .9 patch allows you to maintain the football shape.

Why I can't change .9.png like I changed png files?

For the above reason plus if you don't patch it then you will get errors when you try to compile the apk, it will not work.

To use .9 patch properly you need to have Android SDK installed then go to the Tools folder (not the platform tools) and open a CMD window, type in draw9patch press the return hey and the patch window will open.

Find a .9.png file (preferably a circle) and drag it to the window you will see black lines around the outside of the .9 png and to the right three images of how the png will look in portrait and landscape mode. To change the shape you add or remove the black lines and you will see the shapes to the right change according to whether you make the lines longer or shorter, the lines to the bottom and right are the base lines of what area you want to cover by the image the top and left lines define the shape and appearance of the image.

Just find a .9 pmg and play around with the lines, remove them all then see how the image looks then add line back in to see how you can change the shape and appearance of the png.

To add to the lines put the mouse pointer over the outermost column if the actual image or row or pixels then press and hold the left mouse button and drag the cursor across or down accordingly, do this on each of the 4 sides to manipulate the png, to remove the lines do the same as adding a line but hold down the shift key at the same time.

.9 png’s must be patched otherwise the apk will not compile so you can’t just change the .9.png for a normal png.
[Android Software Development] pepitoff:
Thanks a lot for explanation. But I want to change a 9.png with another 9.png the same resolution. Must it be done in this way?
[Android Software Development] ag4751:
Personally I would put it through the draw9patch process to male sure it was going to look right before I compiled the apk, for the minute it takes to do it its worth making sure.

Just put the .9.png in the folder to replace the one you want to change open the draw9patch process drag the .9.png into it, check the images on the right, if they look ok click on file and save it then compile the apk.
[Android Software Development] pepitoff:
[MENTION=3120411]ag4751[/MENTION], thanks a lot :good:
[Android Software Development] r2dak:
Same Here :(
[Android Software Development] fs71gh:
Error at Re-compile

..\Decompiled_apk\SystemUI\smali\com\lidroid\systemui\quickpanel\BrightnessSettingsView$1.smali[24,4] Error for input '.parameter': Invalid directive

..\Decompiled_apk\SystemUI\smali\com\lidroid\systemui\quickpanel\BrightnessSettingsView$1.smali[39,4] Error for input '.parameter': Invalid directive

..\Decompiled_apk\SystemUI\smali\com\lidroid\systemui\quickpanel\BrightnessSettingsView$1.smali[40,4] Error for input '.parameter': Invalid directive

..\Decompiled_apk\SystemUI\smali\com\lidroid\systemui\quickpanel\BrightnessSettingsView$1.smali[39,15] mismatched input '"context"' expecting END_METHOD_DIRECTIVE

Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/lidroid/systemui/quickpanel/BrightnessSettingsView$1.smali

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)

at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:338)

at brut.androlib.Androlib.buildSources(Androlib.java:299)

at brut.androlib.Androlib.build(Androlib.java:285)

at brut.androlib.Androlib.build(Androlib.java:258)

at brut.apktool.Main.cmdBuild(Main.java:236)

at brut.apktool.Main.main(Main.java:88)

The system cannot find the file specified.

The system cannot find the file specified.

:crying: :crying: :crying: :crying: :crying: :crying:

Please Help. Trying to add brightness slide for my y duos s6102 running Hyperion 8 ported
[Android Software Development] evildog1:
When i select a file from another location. it say that the file is not found. i always have to place the apk file on android/files/ folder. can you fix it?
[Android Software Development] ag4751:
That isn't a fault, the OP states in the guide all apk's go in the files folder don't select files from any other location all the ones you want to mod must go in the AndroidMultitool > files folder
[Android Software Development] jameseytickner:
..\Decompiled_apk\Settings\smali\android\support\v4\content\FileProvider.smali[247,4] Invalid literal value: 4096. Low 16 bits must be zeroed out.

..\Decompiled_apk\Settings\smali\android\support\v4\content\FileProvider.smali[270,4] Invalid literal value: 11264. Low 16 bits must be zeroed out.

..\Decompiled_apk\Settings\smali\android\support\v4\content\FileProvider.smali[283,4] Invalid literal value: 10752. Low 16 bits must be zeroed out.

..\Decompiled_apk\Settings\smali\android\support\v4\content\FileProvider.smali[296,4] Invalid literal value: 14336. Low 16 bits must be zeroed out.

..\Decompiled_apk\Settings\smali\android\support\v4\content\FileProvider.smali[309,4] Invalid literal value: 15360. Low 16 bits must be zeroed out.

Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/support/v4/content/FileProvider.smali

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)

at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:338)

at brut.androlib.Androlib.buildSources(Androlib.java:299)

at brut.androlib.Androlib.build(Androlib.java:285)

at brut.androlib.Androlib.build(Androlib.java:258)

at brut.apktool.Main.cmdBuild(Main.java:236)

at brut.apktool.Main.main(Main.java:88)

The system cannot find the file specified.

The system cannot find the file specified.

I am trying to recompile the Settings.apk as i am rying to remove all holo blue and replace it with white. I get this. Wut
[Android Software Development] Orhan070:
Why my virusscanner takes compile.exe and recompile.exe as a trojan??
[Android Software Development] Flextrick:
Let's see, I'll look in my source and maybe I'll implement that feature.

That's because every Browser will warn you on any exe file to be a virus. Just ignore it, I promise you that this programm is not a trojaner or anything else.
[Android Software Development] Knixson:
Sorry I am very very NEW

..\Decompiled_apk\HtcWiFiWidget\smali\com\htc\htcwifiwidget\WiFiStateTracker.smali[1027,4] Invalid literal value: 4096. Low 16 bits must be zeroed out.
..\Decompiled_apk\HtcWiFiWidget\smali\com\htc\htcwifiwidget\WiFiStateTracker.smali[1068,4] Invalid literal value: 4096. Low 16 bits must be zeroed out.
..\Decompiled_apk\HtcWiFiWidget\smali\com\htc\htcwifiwidget\WiFiStateTracker.smali[1244,4] Invalid literal value: 32520. Low 16 bits must be zeroed out.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/htc/htcwifiwidget/WiFiStateTracker.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:72)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:338)
at brut.androlib.Androlib.buildSources(Androlib.java:299)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
The system cannot find the file specified.
The system cannot find the file specified.

This is the code I get when trying to compile htc wifi apk. Would really appreciate any help anyone can provide. A thank you in advance!!
[Android Software Development] swat4samp:
Forgive me for noob question: How do i know whether this tool is latest version or not? If not, how should i update it? There is no way to update via tool :(
[Android Software Development] lacoursiere18:
Did you edit the smali inside of the apk?

Your error is here

\HtcWiFiWidget\smali\com\htc\htcwifiwidget\WiFiStateTracker.smali[1068,4] Invalid literal value: 4096. Low 16 bits must be zeroed out.

On line 1068 in WifiStateTracker.smali have a bit that looks like this

const/high16 0x800000

Or something similar.. you need to delete the "high" and then it will compile fine..Also using apktool 1.5.2 might solve this issue
[Android Software Development] Flextrick:
Just make a right click on AndroidMultitool.exe, go under Details and check the file version. If it's lower than v3.3, you can update.

How to update: Just download the zip and replace the AndroidMultitool folder with the new one.

You can also check in the changelog which stuff is new and not in your current version of AndroidMultitool.
[Android Software Development] murali:
thank you

Was looking for this :)

Thanks again
[Android Software Development] Flextrick:
Update:

v3.4:

access files from all locations of the pc (you're not limeted to the /Files folder)

add version number to the tool

Download

: https://www.mediafire.com/?w8u0dlmz4dva0a9

Enjoy and cheers
[Android Software Development] swat4samp:
Much awaited update..cheers man :good:
[Android Software Development] Shehzada:
Trying to use version 3.4. I have the latest android sdk, java & .net 4.0 installed.

However, when I try to decompile a framework or an app, I get the following error and can't proceed any further:

"The system cannot find the path specified. 'apktool' is not recognized as an internal or external command, operable program or batch file."

I have placed all of my apk's inside the "files" folder of the program.
[Android Software Development] kermage:
check if apktool is present under "Program_Files" folder...
[Android Software Development] resudo:
Hey guys, I am on 4.4.2 TouvhWiz on the Note 2. This is my first time having a problem with this tool but I cant understand why I get errors. I tried decompiling SecPhone, SecContacts, SecContacts_OSup al of them give me erros regarding framework even though I installed the framework correctly. I get errors only with those 3 apks.

ERROR :

W: Skipping "android" package group
W: Skipping "android" package group
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
Access is denied.

Someone help please.
[Android Software Development] kermage:
You need to have TouchWIz resources installed as framework.. twframework-res.apk :confused:
[Android Software Development] resudo:
Thank you SO much bro:))
[Android Software Development] kermage:
;) does it work now? :confused:
[Android Software Development] Flextrick:
Yes, these framework files are very important.

Do you know what would be awesome? A big database with nearly all framework file they're needed to decompile any apk. Meaning also all touchwiz, sense etc. files.

Flex
[Android Software Development] kermage:
good idea :good: someone should start it out, then invite people to post or upload necessary files to create a library/database of framework.. ;)
[Android Software Development] Flextrick:
I'd like to thank 2 new donators:

[MENTION=426561]scrosler[/MENTION]

One another awesome guy who hasn't got an account on XDA

Many many thanks for your donations, it's awesome.

.. added you to the donators list in the first post and wrote you a PM, both.
[Android Software Development] bovirus:
[MENTION=4642185]Flextrick[/MENTION]

I tested your tool in Windows7 and Windows XP.

It worked under Windows7 but didn't work in Windows XP (I cannot install framework.res).

Miicrosoft Power pack installed.

AndroidMultitool unpacked under C: root folder.

Copy framewors-res-apk in Files sub-folders.

When you run APKMultitool and I tried to load frameworks-res.apk I obrtained "Apktools is not recognized as command..".

I checked system path variable (PATH). It included C:\Programmi\Java\Jdk1.7.0_51\bin.

I also have a system variable JAVAHOME=C:\Programmi\Java\jdk1.7.0_51 (for other tools). Can it create some problems?

I make a test. From dos command line i ran the command JHAT (jhat.exe available in Jdk1.7.0_51\bin) to etst if the jdk path is recognized as system path. It worked. It showed me the parameter for jhat command.

What's the matter? With teh same configuration it worked under Windows 7.
[Android Software Development] ag4751:
The PATH in the environmental variables needs to be set such as C:\AndroidMultitool\Program_Files to identify where apktool.jar and apktool.bat are located
[Android Software Development] bovirus:
I'm so sorry but this spec is not included in first post.

And of course I know it (i chekced apktools.bat&.jar in c:\AndroidMultitool\Program_Files) and also made this add AndroidMultitool report. Same error.

Is not possible to find the specifed path

apktoos is not recognized as recognized as interla/external command

The path is right set because as I explained before if try to launch a command in Java JDK/bin folder it find it.

The same tool with the same configuration works fine in Windows7.
[Android Software Development] Flextrick:
Did you try to decompile the app without my tool and just using the cmd line with the apktool on XP?
[Android Software Development] bovirus:
Hi. Thanks for teh reply.

How can use command line to decompile/recompile the apk?

I'd like to help you to identify the problem.

Note: I added the path C:\Programmi\Progra_Files to the path;

I tested from command line apktool to check the right set for the path. It show the parameters for apktool.

But when I set framework-res show "impossible to find the specifcid path". Could help to show which path...
[Android Software Development] Flextrick:
You know the tool is just giving commands to the Command Line which is docompiling the apk then. So the tool can't be the cause of this problem. It must be the apktool.

So please do the following:

Open the Windows CMD and type in the following:

cd C:\AndroidMultitool\Program_Files

then this:

apktool

Please tell me what the cmd is saying.