yashsingh1/xdaforums huggingface dataset:
[Android Software Development] GRREEN:
Mod CM Mms.apk

I'm trying to mod the CM11 Mms.apk and got stuck when re-compiling (as system apk). I did installed the framework-res.apk but I'm getting these errors:

E:\Tools\APK Mod\APK-Multi-Tool\other>apktool b Mms
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: E:\Tools\APK Mod\APK-Multi-Tool\other\Mms\res/x
ml-mcc450-mnc-1
invalid resource directory name: E:\Tools\APK Mod\APK-Multi-Tool\other\Mms\res/x
ml-mcc604-mnc-1
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 14, --target-sdk-version, 19, -F, C:\Users\Green\AppData\Local\Temp
\APKTOOL3328742978266492084.tmp, -0, arsc, -I, C:\Users\Green\apktool\framework\
1.apk, -S, E:\Tools\APK Mod\APK-Multi-Tool\other\Mms\res, -M, E:\Tools\APK Mod\A
PK-Multi-Tool\other\Mms\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:358)
at brut.androlib.Androlib.buildResources(Androlib.jav a:283)
at brut.androlib.Androlib.build(Androlib.java:206)
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.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 19, -F, C:
\Users\Green\AppData\Local\Temp\APKTOOL33287429782 66492084.tmp, -0, arsc, -I, C:
\Users\Green\apktool\framework\1.apk, -S, E:\Tools\APK Mod\APK-Multi-Tool\other\
Mms\res, -M, E:\Tools\APK Mod\APK-Multi-Tool\other\Mms\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 14, --target-sdk-version, 19, -F, C:\Users\Green\AppData\Local\Temp\A
PKTOOL3328742978266492084.tmp, -0, arsc, -I, C:\Users\Green\apktool\framework\1.
apk, -S, E:\Tools\APK Mod\APK-Multi-Tool\other\Mms\res, -M, E:\Tools\APK Mod\APK
-Multi-Tool\other\Mms\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:355)
... 6 more

So far, based on what I have read in previous posts/threads I have to compile it with dependencies and these posts refers to xx.resources.apk

I don't see a similar apk in CM11, does it mean I have to use the systemUI.apk?

Thank you
[Android Software Development] Nico97:
hi, I have a problem with the tool , I should compile and edit an apk , but I can not because I 'am by mistake ... sorry for my bad English

Java version "1.7.0_67"

Java(TM) SE Runtime Environment (build 1.7.0_67-b01)

Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)

I: Baksmaling...

I: Loading resource table...

W: Config flags size > 36. Exceeding bytes: 0xFFFF.

W: Invalid config flags detected. Dropping resources: drawable-hdpi-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: 0x00000000

at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)

at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:222)

at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)

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)
[Android Software Development] djb77:
Would you say that the 2.0 WIP is at a stable point now? If so I might start using it
[Android Software Development] raziel23x:
The 2.0wip branch been stable for some time now and yes it should be safe
[Android Software Development] djb77:
Cool I'll give it a try, been a long-time user using the experimental build (love the batch compiling / decompiling function on it)

I've been playing with 4.4.x firmware recently so it will be good to update my tools finally.
[Android Software Development] raziel23x:
There has not been much bugs reported and the only reports that have been coming in are from Binary issues not the actual issues with APK Multi-Tools
[Android Software Development] bovirus:
[MENTION=2968938]raziel23x[/MENTION]

Please update the apktool.jar (2.0.RC2)

Please add if yoou want my XP batch to distribution.
[Android Software Development] raziel23x:
That is what the last update was just I complied it myself
[Android Software Development] Phone_Guru:
It would be great if instead of having the frameworks being in the apktool/frameworks folder they could simply be read from the others folder. Some apks need different frameworks to be (de)compiled. Currently, you have to install the required frameworks each time by switching them in the folder or using the setup procedure again. If the script simply read the frameworks from the others folder you could have a different working folder for each set of frameworks that you need to use and just use the appropriate one each time.
[Android Software Development] wileout:
so I searched the thread and couldn't find the answer so ill ask the question. I'm trying to install the apk to the phone and its going to the wrong directory how do I change the directory to /system/priv-app/?
[Android Software Development] bovirus:
This thread is ONLY about this tool and to decompress/recompress apk.

Is not about to develop the APK.

In Android you can decide only THE unit (storage or external memory), not the folder where to install APK.

To change the default installation folder you have to modify the app but is not related to this thread.
[Android Software Development] wileout:
thanks for pointing out this thread is related to this tool. if you had any insight or ability to infer you would have gotten that I was talking about this tool I didn't know I had to point out I was talking about using this tool to do so. next time don't try to be a jackass and point out the obvious try and help someone out.
[Android Software Development] bovirus:
Please read carefully the answer and can image that YOU are wrong.

You are talking about an object that YOU DON'T KNOW.

As I explained the folder/storage unit is not part of this tools.

This tool decompress/recompress/sign the apk. That's all.

All other activities are out of this thread.
[Android Software Development] 3to4:
Sequence of operations?

Hello,

I have been using this excellent tool since some time to customize apk's, like SecPhone.apk, SystemUI.apk,etc, and it works very well.

I have now one question.

According to the instruction in OP, the sequence should be as follows.

- Run script

- Minimize the script

- Edit files inside the project folder

- Maximize the script

Some times, after decompiling an apk, I need a lot of time to modify xml files, png images, and smalis. So, in such an occasion, I would like to close once this script by "00", and work on the files to modify them, which can take few hours and maybe reboots, before doing "11".

Isn't this possible? Should I always do all the modifications while the script is minimized?

I noticed that if I close the script, sometimes modifications are incorporated in the recompiled apk, sometimes they are not.

Can you give me some clarification about this?

Thank you.
[Android Software Development] Kaemo:
The bottom line is that right now, it's impossible to compile any Lollipop APK, right? I can't find anything that supports it.
[Android Software Development] freekizito:
You can close the script and even reboot hundred times and it still works well. If you've edited some PNGs or XMLs and you notice that there's no change in the resulting apk, the only thing you need to do is to delete the "build" folder inside the apk folder you're working on(example: for SystemUI, you delete C:\APKMultiTool\projects\SystemUI.apk\build).. This happens because before the script builds the apk, it verifies if there's been any change and this verification is done using the files in the "build" folder.. if it doesn't notice any change, it will simply rebuild the "build" folder.. so all you have to do is delete the "build" folder and compile the apk again and your changes will show... and if you close(exit) the script and reopen it, don't forget to set your current project again[emoji3]
[Android Software Development] 3to4:
Thank you very much for this very useful advice. I have been using this "technique" since yesterday, and it is working very well. Not having to keep the script minimized to be sure that the modifications will be integrated helps me a lot.
[Android Software Development] freekizito:
Glad I could help[emoji3]
[Android Software Development] Darkfunnyguy:
Problem with signing a regular app.

I have installed you Apk Manager.

When I extracted system apk files and made changes to images then zip as system apk file it worked in smartphone.

But my problem is the when I try to make changes to regular apk, it zip fine but when I try to sign it give me error.

Here the logged error message attached.

What is the problem please?
[Android Software Development] spiderio:
can you tell me

If you have found tools to decompile and recompile lollipop apk

please PM me if you found it..
[Android Software Development] tekowalsky:
Can you put the last Linux version of this software back on the download link? Currently the Linux download link gives the following error:

SSL connection error

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.

Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

I realize you haven't been working on developing the Linux version since version 5.0, but at least being able to download that version would be something.

(Pretty please?)
[Android Software Development] raziel23x:
I will see what I can do I do not know why you are getting that error
[Android Software Development] raziel23x:
Problem Fixed​
[Android Software Development] raziel23x:
Updated Apktool to 1.4.3

2011.12.08

updated builtin framework to SDK API14

fixed some "Multiple substitutions (...)" errors ( Issue 254 )
[Android Software Development] memnoc:
Theming tool works now?
[Android Software Development] raziel23x:
I restructured the tool so yes it fixed as far as I know on my end
[Android Software Development] memnoc:
I'll try and let U know then...
[Android Software Development] baseballfanz:
delete:)>.....................
[Android Software Development] raziel23x:
Work Has began on The LINUX Version and is up on Github only at the moment as There is much work needed to do to the tool before I will be ready for a Live release of the apk multi-tool for Linux
[Android Software Development] Savetheknot:
Trying to decompile Google Music. Keep getting errors. Log attached...
[Android Software Development] raziel23x:
FOR COMPILING ISSUES THERE IS A LINK ON THE ORIGINAL POST AT THE BOTTOM OF THE POST THAT TELLS YOU WHERE TO REPORT COMPILING and DECOMPILING ISSUES
[Android Software Development] metriod:
This is for an HTC evo

I try to modify the apn.xml in framework-res.apk but didn't work for me.

I decompile apk, modify apn.xml, compile apk, it said error, ask me it is system file, I type yes, and next I click yes again, it tells me to delete everything that I modify which is the apn.xml in keep folder.

I did that, and recompile. I extract the new unsign compile apk and the apn.xml is missing!

What am I doing wrong?
[Android Software Development] ciscogee:
Did u delete resources.msc or whatnot from keep folder also?

And when you extract apks it wont show you alot of XMLs that only show up when decompiled
[Android Software Development] metriod:
I delete the resources.arc file and it didn't work.

1) I place my framework-res.apk in the folder place-apk-here-for-modding

2) I decompile

3) I edit the apn.xml file in projects\framework-res.apk\res\xml\apn.xml , save

4) I recompile, yes to system file, yes again

5) delete apn.xml in the keep\framework-res.apk\res\xml\apn.xml,

the script tell me to delete the resources.arsc from the same folder, but there is no such file in the same folder as apn.xml. The resources.arsc is in keep\resources.arsc. So I delete resources.arsc.

6) extract the file unsignframework-res.apk in the place-apk-here-for-modding folder, but the apn.xml is missing.

the new apk is smaller in sizes that the original apk even though I add more lines in apn.xml.
[Android Software Development] ciscogee:
well did u flash the unsigned and edited framework-res.apk on your phone and see if changes were made?

like i stated.

-extracting an .apk is not gonna show you ALOT of folders and files.

-decompiling an .apk will show you resources (more or less what exctracting shows) AND sources (all xmls and smalis)
[Android Software Development] leith51:
You need to delete resource as well it says to do so if you change .xml's

sent from my dhd
[Android Software Development] raziel23x:
There has been some minor and major updates to the application as well as the Linux version I began development but will be on the back-burner as I have to relearn Linux shell scripting as I am way rusty because of not working with it for over a year and a half due to no Linux box as well as I am trying to work on it on a windows machine as I have no cash to get a Linux box yet.

the downloads can be found of the github as always and I Am hoping to have a stable release ready by the beginning of the year
[Android Software Development] metriod:
yeah, I can't get it to work. When I install the rom, it just freezes on bootup.

do I need to decompile apk with dependencies, since it is a htc sense rom?

try to decompile with dependencies, but when I put com.htc.resources.apk, it give me error saying framework.apk already exist.

I just trying to change a constant in apn.xml, I not coding or anything.

is there a way just decompile only the xml and recompile it?
[Android Software Development] raziel23x:
I have updated the origianl post with a FAQ Section which this should clear up many of the questions asked and so Hopefully it will answer many.

I have started working on the linux version and have began first with updating all the binaries to the application and hope to begin soon with more added features and I am looking for a LINUX GURU who can help or even take over porting over windows features to the linux as I have limited knowledge to the linux shell scripts
[Android Software Development] peter_baz:
im trying to edit just an .xml so i decompile,edit and try to compile

but since its a system app-twframework-res.apk i do the keep folder thing an delete the resources.arsc as it says but then in the new apk tha is created that file doesn exist...

any help?

also when i try to compile first get an error:

--------------------------------------------------------------------------

|‘˜™ 17/12/2011 -- 12:21:05,66|

--------------------------------------------------------------------------

java version "1.6.0_29"

Java(TM) SE Runtime Environment (build 1.6.0_29-b11)

Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode, sharing)

Could Not Find C:\Users\peter\Desktop\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/signedtwframework-res.apk

Could Not Find C:\Users\peter\Desktop\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedtwframework-res.apk

I: Loading resource table...

I: Loaded.

I: Loading resource table from file: C:\Users\peter\apktool\framework\1.apk

I: Loaded.

I: Decoding file-resources...

W: Cant find 9patch chunk in file: "drawable-mdpi/tw_button_default_dim_focused.9.png". Renaming it to *.png.

W: Cant find 9patch chunk in file: "drawable-mdpi/status_bar_background.9.png". Renaming it to *.png.

[...]

C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\res\values\public.xml:130: error: Public symbol drawable/tw_unlock_ctr_pr_play declared here is not defined.

C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\res\values\public.xml:131: error: Public symbol drawable/tw_unlock_ctr_pr_rew declared here is not defined.

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\peter\AppData\Local\Temp\APKTOOL7839780537345552825.tmp, -x, -I, C:\Users\peter\apktool\framework\1.apk, -S, C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\res, -M, C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\AndroidManifest.xml]

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

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

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

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

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

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

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

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\peter\AppData\Local\Temp\APKTOOL7839780537345552825.tmp, -x, -I, C:\Users\peter\apktool\framework\1.apk, -S, C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\res, -M, C:\Users\peter\Desktop\Apk_Manager_5.0.2\other\..\projects\twframework-res.apk\AndroidManifest.xml]

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

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

... 6 more

The system cannot find the file specified.
[Android Software Development] raziel23x:
I will have a update soon to the 2.0 WIP with a binary update that will have a fix and will add support for lollipop
[Android Software Development] Kaemo:
You're the man.
[Android Software Development] raziel23x:
added lollipop support to 2.0 wip branch
[Android Software Development] deepu_:
im getting an error java isnt installed,but it is already installed....using windows 7 &how to set the path :confused:
[Android Software Development] raziel23x:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

install this
[Android Software Development] deepu_:
I have java runtime environment 7 ,isnt that enough ?
[Android Software Development] raziel23x:
well i usually just install that as it will automatically set the location of the java environment instead of give long winded instructions on how to manually do it

but here is how to manually fix it

If you get the message Java is not installed try these instructions

How do I set or change the PATH system variable?

This article applies to:

Platform(s): Solaris SPARC, Solaris x86, Red Hat Linux, SUSE Linux, Windows 7, Vista, Windows XP

Browser(s): All Browsers

Java version(s): All JRE Versions

MORE TECHNICAL INFORMATION

The PATH is the system variable that your operating system uses to locate needed executable from the command line or Terminal window.

The PATH system variable can be set using System Utility in control panel on Windows, or in your shell's start-up file on Linux and Solaris.

SOLUTION

Setting Path on Windows

For Windows XP:

1. Start -> Control Panel -> System -> Advanced

2. Click on Environment Variables, under System Variables, find PATH, and click on it.

3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.

4. Close the window.

5. Reopen Command prompt window, and run your java code.

For Windows Vista:

1. Right click “My Computer” icon

2. Choose “Properties” from context menu

3. Click “Advanced” tab (“Advanced system settings” link in Vista)

4. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.

5. Reopen Command prompt window, and run your java code.

Setting Path on Solaris and Linux

To find out if the java executable is in your PATH, execute:

% java -version

This will print the version of the java executable, if it can find it. If you get error java: Command not found. Then path is not properly set.

To find out which java executable the first one found in your PATH, execute:

% which java

Below are the steps to set the PATH permanently,

Note: We are here giving instructions for two most popular Shells on Linux and Solaris.

Please visit link below if you are using any other shells.

Path Setting Tutorial

For bash Shell:

1. Edit the start-up file (~/ .bashrc)

2. Modify PATH variable:

PATH=/usr/local/jdk1.6.0/bin

3. export PATH

4. Save and close the file

5. Open new Terminal window

6. Verify the PATH is set properly

% java -version

For C Shell (csh):

1. Edit startup file (~/ .cshrc)

2. Set Path

set path=(/usr/local/jdk1.6.0/bin )

3. Save and Close the file

4. Open new Terminal window

5. Verify the PATH is set properly

% java -version
[Android Software Development] deepu_:
Ok i installed java development kit and still getting "java not installed" error:crying:
[Android Software Development] PunchUp:
Have you set Java home? If not, follow the instructions here
[Android Software Development] bovirus:
[MENTION=6108834]d33pak_007[/MENTION]

Please edit you previous post and remove the long QUOTE of first post.

Please avoid to quote a long post just to type one line for answer.

Please read carefully the first posts.
[Android Software Development] deepu_:
Sorry
[Android Software Development] Kaemo:
I have a really specific problem. I've been patiently waiting for this update because Twitter's status bar is ridiculously darker than it should be per Material Design guidelines.

The color is located at the colors.xml inside /res/values. However, when I compile it with the "Keep folder" option, the values folder isn't there. So I can't actually delete the colors.xml, therefore making it impossible to change the color of the status bar.

Is this something that has always happened?

EDIT: Fixed it by not using the Keep option. What a dumbass.
[Android Software Development] Dzepar:
[MENTION=4890727]Kaemo[/MENTION]

You need to delete resource file under Android Manifest in keep folder. ?

Sent from my D2303