yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] eduardo_b:
Decompiles, won't recompile

After hours of learning how to make apktool function properly, decompiling and then editing six xml files, nothing I do will recompile. Is the problem that output of decompile was a folder off of root? Apktool created folders and subfolders, and I notice invalid names below include forward slash for last subfolder. Framework and UI have apks in correct user folder for apktool. Files were edited with Notepad++.

I even redid decompile (renamed first folder), copied six edited files over res\layout and then tried to recompile.

Get the same error message:

c:\apk>apktool b c:\mms

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

invalid resource directory name: c:\mms\res/drawable-appliance

invalid resource directory name: c:\mms\res/drawable-appliance-xhdpi

invalid resource directory name: c:\mms\res/layout-appliance

invalid resource directory name: c:\mms\res/mipmap-appliance-hdpi

invalid resource directory name: c:\mms\res/mipmap-appliance-mdpi

invalid resource directory name: c:\mms\res/mipmap-appliance-xhdpi

invalid resource directory name: c:\mms\res/mipmap-appliance-xxhdpi

invalid resource directory name: c:\mms\res/mipmap-xxhdpi

invalid resource directory name: c:\mms\res/values-appliance

invalid resource directory name: c:\mms\res/values-sw600dp

invalid resource directory name: c:\mms\res/values-sw600dp-land

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, 16, -F, C:\Users\Eduardo\AppData\Local\Te

mp\APKTOOL1582156554446401944.tmp, -0, arsc, -I, C:\Users\Eduardo\apktool\framew

ork\1.apk, -S, c:\mms\res, -M, c:\mms\AndroidManifest.xml]

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

at brut.androlib.Androlib.buildResources(Androlib.java: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, 16, -F, C:

\Users\Eduardo\AppData\Local\Temp\APKTOOL1582156554446401944.tmp, -0, arsc, -I,

C:\Users\Eduardo\apktool\framework\1.apk, -S, c:\mms\res, -M, c:\mms\AndroidMani

fest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.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, 16, -F, C:\Users\Eduardo\AppData\Local\Temp

\APKTOOL1582156554446401944.tmp, -0, arsc, -I, C:\Users\Eduardo\apktool\framewor

k\1.apk, -S, c:\mms\res, -M, c:\mms\AndroidManifest.xml]

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

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:355)

... 6 more

This is exhausting and seemingly too complicated.
[Samsung Galaxy Nexus] ÜBER™:
Should be posting in the apktool thread but ill help ya out.

You have apktool setup wrong. Whatever tutorial you followed.. or however you figured it out.. its wrong.

Now then.. start fresh.. delete everything you've downloaded related to apktool.. you're gunna redownload it.. yeah sorry. You'll also what to make sure you delete C:\User\apktool that gets built when you run if name-of-apk blah blah.. delete it. Delete that folder for apktool too.. everything.

Download apktool here: Apktool

(Im assuming your using windows if you are in C:\ so download this as well. Windows Resources

Then create a folder in your C drive named apktool. Extract the two zip files to said folder. It should contain apktool.jar, apktool.bat, and aapt.exe . Or anything else i missed (this is all from my head)

Now go to your Enviroment Variables. (Right click on computer > advanced system settings > enviroment variables )

And add the location of the folder to your PATH$ (Its under system variables). Should look like this ;C:\apktool\

This will allow you to execute apktoo anywhere. Then place your MMS.apk along with the framework-res.apk of the ROM of the MMS your decompiling from on your desktop and open a command prompt on your desktop. (Easiest way is to Shift + Right Click "Open Command Prompt Here" Other wise cd in the location).

apktool if framework-res.apk

Then

apktool d Mms.apk

Make changes and recompile

apktool b Mms

:good:
[Samsung Galaxy Nexus] eduardo_b:
<LOL> Yeah, I'm not surprised. So many apktool how-to threads, but seemingly missing information that explains it all like you just did.

The short version is I posted here because the only reason I'm doing this is to fix a problem with every themeable mms, which do allow all text to be switched from black to white (I have beautiful dark-blue theme I won't give up)...except...contacts at top and text being typed at bottom -- both holo blue on dark blue background. Difficult to see under many conditions. I've discovered I can't fix these apks because apktool won't open themed apks, so I'm using your thread's detailed instructions to fix stock mms.

I'll get back to you when (not even going for if) I have an issue. Android SDK is installed and assume the PATH$ will make locations a non-issue. I'm one of those individuals who really does need accurate, detailed instructions to avoid wandering off the path of technology. :D
[Samsung Galaxy Nexus] eduardo_b:
Okay, it all works thanks to your detailed directions...except there are errors when compiling because it doesn't like the changes in the files. The problem seems to be that there's no color specified, and when I add the hex for it, that generates a compiling error.

For example, for recipients_editor your example shows:

<com.android.mms.ui.RecipientsEditor android:textColor="#ff33b5e5"

The code in file is actually:

<com.android.mms.ui.RecipientsEditor android:textColor="@color/compose_message_edit_text"

I change it to:

<com.android.mms.ui.RecipientsEditor android:textColor="#ffffffff"@color/compose_message_edit_text"

The compiler doesn't like that, and I need white text for contacts. The same situation is true for color of message text being typed, sent or received text color and so on. No color in code, my changes generate errors. :confused:
[Samsung Galaxy Nexus] ÜBER™:
thats not how its supposed to be.. JUST the color code.. no... @ android

What in the world possesed you to add the color code into the line??? Its just the color code.. my example shows exactly that. LOL
[Samsung Galaxy Nexus] eduardo_b:
I was looking for code in your example that was already in file. Here's what your instructions are:

-----

Next /Res/Layout/recipients_editor.xml

Here you will want to look for this line

Code:

<com.android.mms.ui.RecipientsEditor android:textColor="#ff33b5e5"

The text color will change the color of the text you get when editing what contact you're sending your message to. Since it will be black you will need to change it from #ff000000 to Something else.

-----

The line you show, in the recipients_editor.xml I have after decompiling mms.apk, is what I noted. It's the only one that matches the example.

So, really, that's what possessed me. :)

How else do I change that text to white? :confused:
[Samsung Galaxy Nexus] ÜBER™:
I told you already.. remove the @ part.. so you're left with just two parenthesis. "" Then inside those parenthesis put the color code for white which is #ffffffff. Save and build.. :victory:
[Samsung Galaxy Nexus] eduardo_b:
Ah, remove the other code. Who knew.:o

Okay, made a few changes, compiled, put into your zip, flashed...it's installed (I see it in system/app) but it doesn't appear that Android recognizes it. No icon showing (no, it's not disabled), it's not listed in settings > apps, and when rebooting there's no updating app message. Only changed two xml files (recipients_editor and compose-message-activity) in Notepad++. Sooo...watcha think?
[Samsung Galaxy Nexus] ÜBER™:
Put what into the zip? :\ The mms.apk in the dist folder? I really need to change that.

This is what you need to do. Right click on the original apk and go to 7zip > Open Archive. If you dont have 7zip.. install it.

Then go into the decompiled folder and go to /build/apk and take everything

BUT

(EXCLUDING) the META-INF folder. So it should be the res folder, resources.arsc and classes.dex. Take those and paste them into the arhcive of the original apk. Drag from the folder into the 7zip window and overwrite the files. Then put that apk into the flashable and reflash.
[Samsung Galaxy Nexus] eduardo_b:
Yes!!! It worked, although when I dragged decompiled files to orig apk in 7zip it didn't overwrite anything...or at least there was no notification asking for permission.

So I checked to see how color changes did, and the contacts in messaging now come up as white text, but entering contact text is still holo blue and typing message text is still holo blue. If I want these white, I only change text color, yes, and leave background alone (which is blue theme)?
[Samsung Galaxy Nexus] ÜBER™:
Anything that is color coded #ff33b5e5 is holo blue.. change that to the color code for white and you'll be good to go. Yes dont mess background.. just colorText.
[Samsung Galaxy Nexus] eduardo_b:
So odd. I've "changed" all text colors in /res/layout/compose_message_activity.xml, yet text input color remains holo blue (the original file says nothing about this color either directly or as hex) instead of white. Also white in recipient_list_item.xml and recipients_editor.xml. I note these two files because the font color in box at top for entering contact name is also holo blue, not white. It's like the color is being picked up from somewhere else for both boxes. :eek:

-----

Fixed! As an experiment I changed #ffffffff to android:color/white, compiled and, much to my surprise, the fonts were white in both boxes. So the resource identifier worked, but not color code. Codes, obviously, open up a far greater range of colors.

-----

The issue is in styles.xml where theme has to be basic holo so color codes will work. This requires being able to compile and sign revised apk.
[Samsung Galaxy Nexus] gaetawoo:
they work. seems your just missing something
[Samsung Galaxy Nexus] SOSODU13016:
Hello ya'all.

I'm working on this : http://xdaforums.com/showthread.php?t=2284793

and i need some help : How to replace the contact name & number by directly the contact picture + the name ( without the number ) at the top bar ? i want it to, on click, have the same behaviour of the contact picture on the stock conversations.

thanks for the reply
[Samsung Galaxy Nexus] harryini:
help...me

where i can change color in the contact name list it? black to white ....
[Samsung Galaxy Nexus] ÜBER™:
That's part of where you have to add the three lines in of the XML.
[Samsung Galaxy Nexus] harryini:
help

where i can add it ????

Res/Layout/Conversation_list_item.xml

add a textColor to lines 5, 6, and 9. It doesnt matter where but i put them at the beginning.

Should look like this

Code:

<TextView android:textColor="@android:color/white"

right ??.. but not working:crying:
[Samsung Galaxy Nexus] Zephyr!:
it gives me error :(

rest errors in list item were resolved but I am getting this. Please help me :(

C:\Users\ashu\Desktop\apktool>apktool b Mms

I: Checking whether sources has changed...

I: Checking whether resources has changed...

I: Building resources...

C:\Users\ashu\Desktop\apktool\Mms\res\xml\widget_info.xml:2: error: No resour

ce identifier found for attribute 'widgetCategory' in package 'android'

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce

ption: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-ver

sion, 16, -F, C:\Users\ashu\AppData\Local\Temp\APKTOOL4794362550839636631.tmp

, -I, C:\Users\ashu\apktool\framework\1.apk, -S, C:\Users\ashu\Desktop\apk

tool\Mms\res, -M, C:\Users\ashu\Desktop\apktool\Mms\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:255)

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

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

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

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

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

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

Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd

k-version, 14, --target-sdk-version, 16, -F, C:\Users\ashu\AppData\Local\Temp

\APKTOOL4794362550839636631.tmp, -I, C:\Users\ashu\apktool\framework\1.apk, -

S, C:\Users\ashu\Desktop\apktool\Mms\res, -M, C:\Users\ashu\Desktop\apktoo

l\Mms\AndroidManifest.xml]

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

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:253)

... 6 more

C:\Users\ashu\Desktop\apktool>apktool b mms.apk
[Samsung Galaxy Nexus] F4M0U569:
Which file do I need to edit to change the background of the first screen mms opens to? Where you have all your convos of your friends? On JB 4.2.2 I have managed to change the background of the second screen but I'm having difficulties with the first background
[Samsung Galaxy Nexus] ZKK007:
What does your Mms\res\xml\widget_info.xml file say? specifically line 2 (widget_info.xml:2).
[Samsung Galaxy Nexus] Zephyr!:
I had not edited widget_info.xml

Press thanks if you like my work/advice
[Samsung Galaxy Nexus] ZKK007:
Ok, well that is what that error is pointing to.

On another note, does anyone know where the contact name colors are? (See the red boxes in the attachment)
[Samsung Galaxy Nexus] Zephyr!:
So what should I do exactly? I have not made any changes in that file.

Press thanks if you like my work/advice
[Samsung Galaxy Nexus] ZKK007:
Open it and see if there is anything that stands out to you in line 2. I would probably decompile the apk again, then recompile it to see if it will recomplie without any changes being made.

I would post my widget_info.xml for you to compare, but xda isn't letting me due to not having 10 posts and it thinks the code is a link.
[Samsung Galaxy Nexus] Zephyr!:
I will post when I get to my pc in the morning, it's 02:33am here

Press thanks if you like my work/advice
[Samsung Galaxy Nexus] Zephyr!:
here is the link for widget_info.xml

https://www.dropbox.com/s/dnvch7zlhce2ty1/widget_info.xml?m

please someone help me out. please
[Samsung Galaxy Nexus] dedoro:
Hi,

I need to adjust the textsize when I write an sms. Not a list (conversation) of sent item. It's the font size when writing a message prior to send.

I did read this thread but couldn't fine the parameter of xml i need to adjust.

Thanking you in advance.

______________________________________

Found it. It's a little bit different with the one posted by OP on page 1. But found it a way. I use mms.apk from stock ROM JB 4.1.1 . The original missing android:textSize="16.0sp"

Res/Layout/Compose_message_activity.xml

<EditText android:textSize="20.0sp" android:layout_gravity="bottom" android:id="@id/embedded_text_editor" android:nextFocusRight="@id/send_button" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:minHeight="@dimen/input_text_height" android:hint="@string/type_to_compose_text_enter_to_send" android:maxLines="7" android:capitalize="sentences" android:autoText="true" android:layout_weight="1.0" android:inputType="textCapSentences|textAutoCorrect|textMultiLine|textShortMessage" android:imeOptions="actionDone|flagNoEnterAction" />
[Samsung Galaxy Nexus] Zephyr!:
*bump*

No one to help?

Make.Believe
[Samsung Galaxy Nexus] eduardo_b:
Unfortunately, this is a widget issue and can't be fixed. It's a system widget that's called by code. Spent a lot of time on this with experienced themer and we couldn't do more than make the background ever so slightly lighter. Colors cannot be changed. This is specific to JB, apparently.

I know, not helping solve the issue, but better to know it can't be fixed than spend many hours and then know it can't be fixed. :laugh:

If my reply helped you, please click on thanks to let me know.
[Samsung Galaxy Nexus] ZKK007:
Thanks, you definitely saved me many hours of digging!

---------- Post added at 11:10 AM ---------- Previous post was at 11:01 AM ----------

Just saw your post.

The only difference I can see between your xml and mine is the end of my line 2 reads:

android:widgetCategory="home_screen|keyguard"

.

This is from a CM10.1 MMS.apk though. I'm not sure what you're working with, but you can try to put that in and see if it recompiles. If it does, hopefully your functionality is still there.
[Samsung Galaxy Nexus] Zephyr!:
I am working in aosp mms, I will add and see

Make.Believe
[Samsung Galaxy Nexus] amir-kia:
please someone change white background in my lovely mms to black or blacked themed background :(

very tanx :)
[Samsung Galaxy Nexus] adroidser:
thank u
[Samsung Galaxy Nexus] Mundo Hackz:
where do i edit to make the searched contacts a different color???
[Samsung Galaxy Nexus] ÜBER™:
I believe that is the recipients editor, unless you mean in the drop down that comes down that shows the list of "results" of your search. In which case its in drawable, there is primary and secondary. Primary being the contact name, and secondary being the number.
[Samsung Galaxy Nexus] fernandezhjr:
Edit: I found my answer. Wonderful tutorial. Many thanks.
[Samsung Galaxy Nexus] Mundo Hackz:
Ohhh okay
[Samsung Galaxy Nexus] ÜBER™:
Which is the drop down... So follow what I said. :)
[Samsung Galaxy Nexus] Mundo Hackz:
d o you know the name of the xml??

---------- Post added at 02:40 AM ---------- Previous post was at 02:07 AM ----------

got the names it was in the res>values>color.xml on the note 2 but now i can't find the number -__-
[Samsung Galaxy Nexus] Mundo Hackz:
if anyone can help me out https://www.dropbox.com/sh/6gnkqe0238rh03d/LsRjQHBsXR thank you and it will appreciate it :D
[Samsung Galaxy Nexus] sudharshancr7:
Can you just tell me how to add settings like "Personalized Notification" for each person i.e; assigning different ringtones to different people,assigning message limit to everyone individually etc
[Samsung Galaxy Nexus] ÜBER™:
This is purely themeing, not modifying. I have no idea about that stuff.
[Samsung Galaxy Nexus] gunawanyuli:
dizzy

:( I just can edit like this. I have not been able to change the white color.

Someone who is willing to edit my apk, please.

Thanks before

Sorry for my bad english.
[Samsung Galaxy Nexus] gunawanyuli:
picked anicter

I've almost succeeded :fingers-crossed:. Anyone know how to change the white color? Please help me.
[Samsung Galaxy Nexus] ÜBER™:
Tutorial is here for a reason.... And its not to get someone to do the work for you.

Sent from my Nexus 7 Flo with Tapatalk 4
[Samsung Galaxy Nexus] hardstyle86:
Thanks! Maybe I will try this guide.
[Samsung Galaxy Nexus] hotdog125:
I've applied Vicino's MotoTheme V5 on CM10 on my Motorola Defy+. It's a great theme, but the text in the received text bubble (which is black) is also black, making it unreadable.

The project was stopped by Vicino (mostly because he was busy), so I tried to fix it myself using your guide (really helpful by the way).

I managed to change the text bubbles and make the text readable again. But, the text colour in the received and sent bubbles are different. I've tried a lot to fix it (LOL, I wasted 3 whole days trying). I've tried integrating XML files from the stock mms.apk in this theme, but I can't change the received text colour no matter what I do. Can someone tell me what I can try to fix this?

The link - http://xdaforums.com/showthread.php?t=1829784.

BTW, if you need my modified apk, i'll be glad to send it through PM.

Check out the screenshot for what i'm talking about.
[Samsung Galaxy Nexus] ÜBER™:
Look at message_list_item_recv.xml. you probably skipped over this one since send is changed fine. Its the same name and all that like send just in another xml.
[Samsung Galaxy Nexus] hotdog125:
I've done that as well. Earlier the timestamp below the conversation was only a black box. I managed to fix it by making necessary changes in message_list_item_recv.xml, message_list_item_send.xml and putting them in my theme.

The changes I made in message_list_item_send.xml stuck (like text and timestamp colour), but the changes I made to message_list_item_recv.xml don't stick for some reason:confused:. Is there a way to make the changes in message_list_item_recv.xml (of my theme) stick without making changes to mms.apk?

EDIT - Nevermind, I modded the theme a bit more and managed to make it work.
[Samsung Galaxy Nexus] just87:
Slightly off topic but can someone tell me where the background image/color is set/stored in Phone for 4.3?

Previously it was in drawable-nodpi/background_dial_holo_dark.png but no longer seems to be the case.
[Samsung Galaxy Nexus] hotdog125:
Download the zip. Instructions in the zip file.

EDIT - Sorry, I misread your post. But I guess it's the same method.
[Samsung Galaxy Nexus] winamp26:
message_list_item_send.xml in my mms.apk doesnt this line

android:id="@id/message_block" android:background="@drawable/listitem_background" android:layout_width="wrap_content"

where in message_list_item_send.xml copy that?
[Samsung Galaxy Nexus] ÜBER™:
Its there if its an aoap messaging app... Look harder is all i can say.
[Samsung Galaxy Nexus] winamp26:
hi

When I want to compile a file error occurs.

please help me
[Samsung Galaxy Nexus] ÜBER™:
An error with whatever you're using to compile and decompile with. Use apktool and do it manually, dont use a batch system.
[Samsung Galaxy Nexus] xnk:
can you tell me how to change chat/bubble text size ?

i tried to change textsize at message_list_item_xxx.xml but the size doesn't change
[Samsung Galaxy Nexus] fernandezhjr:
Try message_list_item_recv.xml and message_list_item_send.xml, TextView under @id/message block.
[Samsung Galaxy Nexus] xnk:
as i mentioned before, it didn't work,.... do you have another idea ?
[Samsung Galaxy Nexus] fernandezhjr:
Ok, you weren't specific to the line you tried. I haven't tried changing font size, but I would have thought that would be it since that is were the font is located within the xmls. I have to make an edit to my Mms tomorrow, so I will have a closer look at it myself.
[Samsung Galaxy Nexus] xnk:
waiting for your good news...
[Samsung Galaxy Nexus] fernandezhjr:
I edited the exact location I suggested. I only edited the recv.xml so there would be a on screen comparison to the send.xml. I then sent myself a test text and found I was successful with my Mms.apk.
[Samsung Galaxy Nexus] fernandezhjr:
This is what my line in the xml looks like:

<TextView android:textAppearance="?android:textAppearanceSmall" android:textSize="16.0sp"

I edited the 16.0sp to 24.0sp in order to achieve the result I did. Also, you may want to look in res\xml\mms_config.xml, to see if you hav a line like so and what it might have for a value:

<int name="maxMessageTextSize"
[Samsung Galaxy Nexus] xnk:
yeah.. i edited that line to 8.0sp but the font size didn;t change.. don't know why,

for your information, my phone is not nexus (sorry i did not mentioned it before)

i just googled 'theme mms.apk'' and found this thread (i think maybe i could find some clues here...)

anyway, thanx for your help, i'll try to edit another xml that contain 'textsize' line..
[Samsung Galaxy Nexus] jl154:
Noob question, sorry...When i compile my modified files i get a bulit folder in my decompiled mms folder. When I open the built folder all i find is a apk folder with a dex file in it. Is that file i need to put a flashable zip. if not how to i turn my compiled files into a apk file.
[Samsung Galaxy Nexus] :
If you compiled back tour MMS...you should find the .apk in dist folder inside decompiled mms folder (:
[Samsung Galaxy Nexus] jl154:
That is what I've read but all I have is a build folder.