[Q] Custom language pack android ? - Defy General

Can I change language like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(it is on iPhone)
in android, can I do like it ?

Not really when its not implanted in your ROM. In setting under language or something like this you can look. Job and ICS ROMs have many languages. And its help what for a ROM etc you have. All infod over your handy.
Sent from my MB526

how can I decompile framework-res.apk and compile it ?
I'm using Defy+ cm9

You can, but its difficult and has to be done all by hand
Follow Kayant's guide on compiling CM10, test it to make sure your build environment works. Change CM10 to whatever rom with a repo you wish to work with -- translations are the same for all of them. Since it appears you're trying to do an English-hybrid translation that's what I'll focus on.
After that, navigate to your CM10/android/frameworks/base/core/res/res/values*/strings.xml
values/stings.xml is what will be shown if there isn't a default translation available, otherwise the rom will use values in the language you select -- values/en-rUS for American English. You'll notice that everything is commented out in the en-rUS strings.xml -- meaning if you uncomment them, what ever you put there will supersede what is in values/strings.xml -- making US Engish a good choice to mod since its the default translation in values/strings.xml.
Here's the first few lines of values/strings.xml
Code:
<!-- Suffix added to a number to signify size in bytes. -->
<string name="byteShort">[B]B[/B]</string>
<!-- Suffix added to a number to signify size in kilobytes. -->
<string name="kilobyteShort">[B]KB[/B]</string>
<!-- Suffix added to a number to signify size in megabytes. -->
<string name="megabyteShort">[B]MB[/B]</string>
<!-- Suffix added to a number to signify size in gigabytes. -->
<string name="gigabyteShort">[B]GB[/B]</string>
<!-- Suffix added to a number to signify size in terabytes. -->
<string name="terabyteShort">[B]TB[/B]</string>
<!-- Suffix added to a number to signify size in petabytes. -->
<string name="petabyteShort">[B]PB[/B]</string>
The only thing you need to change is what I bolded -- whatever is between >and</string> -- that's your translation. You have to do that for every string you wish to be changed.
Well, that's basically how you tweak\fix\change translations. So far all we've done is the core of the rom -- you still need to do some more under /CM10/frameworks/base/packages/***/ (the *** is different system apps like SystemUI -- they have their own translations needed to be done)
Once that's done, navigate to CM10/packages/Apps/*** and do their translations as well.
And that's the basics of it. While this can be done without syncing the repos and compiling you're own rom, I highly recommend doing it this way so you can commit your changes and continue with your project at your own speed and not have to use apktool and decompile and recompile every apk from every CM10 you wish to translate -- using apktool is similar to the repo method, only you decompile the apk, translate it, recompile it and repeat for every apk you're translating. You'll also have to fork every app you wish to translate and make sure you keep them up to date -- its not hard, just make sure you don't overwrite your values changes and you won't have to mess with any actual code at all.
I hope this helps. Its a pain in the rear, but its doable.
Also, use a text editor with code\syntax highlighting cause it'll really help -- I use Gedit (Linux) myself. Notepad++ is a great choice to use on Windows
how can I decompile framework-res.apk and compile it ?
I'm using Defy+ cm9
Click to expand...
Click to collapse
This should help

I try some apktool but it can not compile, some apktool can compile but file size is smaller than original file
original file size is 9.1 MB but new compile file size just 5.2 MB
and when I overwrite framework-res.apk, phone is boot loop

danhtho said:
I try some apktool but it can not compile, some apktool can compile but file size is smaller than original file
original file size is 9.1 MB but new compile file size just 5.2 MB
and when I overwrite framework-res.apk, phone is boot loop
Click to expand...
Click to collapse
Did you copy the META-INF folder from the original apk to the rebuilt\modified apk? That has to be done by hand. Also, wipe cache\dalvik after pushing modified system apks. The difference in size can be from a number of different factors (one being the META-INF folder), apktool compressing resources.arsc that wasn't compressed already (not sure if ours come compressed or not, I've never bothered checking). Make a copy of the original apk, delete META-INF, and compare sizes -- if they orig - META is close to the size of rebuilt with no META-INF, you should be OK -- "should be" being the key phrase here.
if the apktool you're using still doesn't work, search xda for "apktool ics" or "apktool jb" and try some of the different ones you come across -- when ics first came out, apktool was hit and miss on which version would work or not and there's a few modified apktools around for working with ics\jb apks. I've had to use multiple apktools on the same rom -- apktool is a great program, just make sure you keep multiple copies if you're into decompiling apks.
On my old setup (before I got in a hurry and forgot to back up my $HOME/bin during a distro hop) I had multiple apktools named apktool.gb, apktool.ics, and apktool.jb -- at one time i had *.ics, 2, & 3. All I'd have to do was change my symlink to the apktool version I'd like to use before tweaking away (some android tools\scripts require apktool to be named apktool, so "rm ~/$HOME/bin/apktool && ln -s ~/$HOME/bin/apktool.ics ~/$HOME/bin/apktool"

Related

TUTORIAL - decompiling/editing XML

**This is for system apk's, not for market ones. To modify apps you've downloaded and installed, you will need a program like the fantastic Apk Manager, since non-system apps are signed and have to be resigned after getting messed with**
*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! It's Christmas, after all! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(
***Editing XML's***
So you want to modify something a little more complicated than just a PNG- there's something there you want gone, something too big or small, and you want to modify an XML. Here's what you need for starters:
7zip for your computer
Root explorer for your phone
apktool and apktool-install-windows for your computer from here
-Install it to your computer, as described in the link. (Just unpacking the items into c:/Windows is easiest)
Hex editor for your computer (I really like Notepad++)
For an example, I will be using the HORRIBLE yellow pages infiltration of the LG Nitro, thanks to surely some agreement between AT&T and YP. One example is the contacts list, where AT&T in its infinite wisdom has decided that the most important contact of all is the yellow pages, being the only permanent contact stuck in your list, shrinking your visible actual contacts list:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I don't like it, and I want it gone. I've already uninstalled yellow pages, and the dead button is still there! I will edit an XML to remove it =)
1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer
In this case, I wanted my Contacts.apk, which is in /system/app. Keep a copy safe somewhere, just in case something goes wrong, or you want to revert back to the original apk. The vast majority of system apps are in the /system/app folder, with the major exception of framework-res.apk. This is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.
2.) Decompile your apk
Put the apk in C:\ (I think you can put it in other places, but just for consistency, I'll say put it there =) ). Decompile it by using apktool. You can find more details elsewhere, but to keep it as brief as possible, here's how in a nutshell (there are other ways to do this, where to put files, etc, but for consistency's sake, this is how I do it):
-run cmd.exe
-in the command window, change your directory until you get all the way to C:\ (keep typing "cd.." and hitting enter until you're there)
-in the window type the following and hit enter:
apktool d nameofapk.apk
(In this case, type "apktool d Contacts.apk")
******IF YOU GET A LONG STRING OF "Could not decode attr value..." ENDING WITH "Can't find framework for package of id: 2. You must install proper framework files, see project website for more info." (like you do when decompiling some apk's like SystemUI.apk) SKIP TO THE END FOR SPECIAL INSTRUCTIONS******
-the decompiled apk will now be extracted into a folder of the same name without the .apk extension (here, C:\Contacts)
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
In this XML, lines 14, 15 and 16 refer to that stupid bar in Contacts.apk with the yellow pages and ICE buttons. Included in lines 14, 15 and 16 are: android:layout_height="60.0dip", android:layout_height="51.0dip", and android:layout_height="51.0dip", respectively.
Change all 3 numerical values to 0.0 in all three cases, so now in lines 14, 15 and 16, it shows: android:layout_height="0.0dip", android:layout_height="0.0dip", and android:layout_height="0.0dip", instead.
Save the changes to this file and close! (You should have your original apk backed up somewhere else already!)
4.) Recompile the apk with the newly edited XML in it!
In cmd.exe (still in directory C:\), type:
apktool b nameofapkfolder
*do NOT type nameofapk.apk. Leave off the .apk extension! You're recompiling the decompiled folder, NOT the .apk! For example, here to rebuild Contacts, type
apktool b Contacts
This can take a while. It's okay if you get some "has no default translation" lines popping up. Just ignore them.
Now, in that same decompiled folder, you will have a new "build" folder. Inside are your newly recompiled files for your apk!
5.) Find the recompiled XML from the build folder and move it into a copy of the original .apk!
It will be in the same organization as it was within the .apk. For example, that XML we edited is located here:
C:\Contacts\build\apk\res\layout-finger\contacts_list_item_top_search_att.xml
If you open this recompiled XML, you'll see that it's back to being gibberish. That's because it's been successfully recompiled!
Now, find your original, unedited .apk, right click, 7zip, and open archive. Navigate to the original XML in that apk and drag and drop your newly edited/recompiled XML into that folder, letting it overwrite the original one! This is your newly edited .apk with the changes you want in your XML!
6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.
7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.
In this case, long press on the Contacts.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of Contacts.apk in /system/app
8.) Move the new apk into /system/app, and let it overwrite the original!
9.) Restart your phone!
Voila! The stupid bar is gone, and I have a little more room for my REAL contacts!
******SPECIAL INSTRUCTIONS FOR DECOMPILING ERROR******
Some apk's (like SystemUI.apk) require OTHER (framework) apk's be "installed" in order to decompile properly. To install an apk, put it in C:\, then type the following command in cmd.exe when in directory C:\:
apktool if nameofapk.apk
But which other apk needs to be installed?? The secret is that when you try to decompile your apk and it produces those errors, apktool will actually tell you (in its way) what other apk is needed! For example, decompiling SystemUI.apk results in notifications ending in this:
"Can't find framework for package of id: 2. You must install proper framework files..."
id: 2 is your key. In /system/framework, there are 3 other apk's besides framework-res.apk. These are:
RES_cappuccino.apk
RES_model.apk
RES_sui.apk
If you install framework-res.apk:
apktool if framework-res.apk
you get the following statement:
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
This means that id: 1 = framework-res.apk! If you install the other 3 apk's (RES_cappuccino, model, and sui), you'll find that they are:
RES_cappuccino.apk = id: 2
RES_model.apk = id: 4
RES_sui.apk = id: 3
SO, when you try to decompile SystemUI.apk, and it says "Can't find framework for package of id: 2," it's asking that you first install RES_cappuccino.apk before decompiling SystemUI.apk! So before apktool d SystemUI.apk, type:
apktool if RES_cappuccino.apk
It will say, "Framework installed to C:\Users\User\apktool\framework\2.apk
And now, when you decompile SystemUI.apk, it will work (as will recompiling! =) )
Good luck! Godspeed! =)
This is awesome! Thank you very much.
I've successfully managed use Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux) for SystemUI.apk, but it did create additional useless folders.
One question though, what about resources.arsc file?
According to apk manager that file needs to be recreated when .xml files are changed.
It seems like that's the case when you have significant changes to the xml, like deleting lines or adding code, etc. When I just change values in the xml, it doesn't seem to require rewriting resources (which I'm not super comfortable with), so until we get a recovery mode, I just try to be creative in how I edit xml's to get what I want by just changing values =)
NICE!! Great job sir!
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
itiskonrad said:
Did you ever get rid of the headphones icon, by the way? It shouldn't be too tricky
Click to expand...
Click to collapse
Well, kind of...I do now know how to remove it, unfortunately it will have to wait until apktool get updated to v1.4.4, because current version does not work for our resources-res.apk (we seem to have ICS formatted .apk's). I already twice soft bricked my phone trying recompile this apk
Once we get the proper tool, we might start getting some interesting mods, like more quick settings for instance.
itiskonrad, can you post the actual file for removing yp from contacts. I am on mac with no pc available at the moment.
Sure thing! Here:
Contacts - No Yellow Pages
Be sure to follow steps 6-9, though! Especially the part about changing permissions!
Great thanks. Worked great.
Sent from my LG-P930 using Tapatalk
I couldnt get the new APK Manager which is now called APK Tools to work properly. Since the original link didnt work i decided to search out the old APK Manager to give it a shot, and it worked beautifully! For those that want the old one, you can get it here:
http://www.gamefront.com/files/17870566
i used it to change my contact list to black with white text. Much nicer!
itiskonrad said:
***Editing XML's***
3.) Find and edit the XML you want!
Now that it's been decompiled, the XML will be magically readable with Notepad++ (before decompiling, opening XML's with a hex editor produces gibberish. Now, you can actually read the text of it!). In this case, the XML we want to edit is here:
C:\Contacts\res\layout-finger\contacts_list_item_top_search_att.xml
Click to expand...
Click to collapse
Hi, I have a problem, I can not correctly open the XML files from ROM. I want to edit the file primary_text_dark.xml of framework-res \ res \ I can not see it correctly. Help me please, the XML files from ROM, I can not correctly open and edit in any xml editor. What is the trick?
example
https://lh5.googleusercontent.com/-Mlx3d1--g0E/T7yNMCOcCyI/AAAAAAAAAcE/aIV-2zHN8x8/s720/fotka%2520%252014.jpg
What you are looking at is a non-decompiled xml that is unreadable. You need to first decompile the apk which carries the xml you want to edit in order for it to be readable. You first have to complete steps 1 and 2 and decompile framework-res.apk as described in the guide in order to get a readable primary_text_dark.xml.
Thank you for your advice.
Error...
Hello everyone!
Dude, thanks for the post. It is very clear!
I have a question. I did everything step by step to decompile the framework-res and edit it, but when I try to recompile it, the APK folder created inside the new folder BUILD is empty.
What can have happened?
(translation via Google Translate)
Hmm, not sure. Try decompiling and recompiling immediately after without making any changes, just to make sure the commands are working. If that doesn't work, maybe there's something wrong with the commands? For example, I know it sounds stupid, but make sure to recompile, you're typing
apktool b framework-res
NOT
apktool b framework-res.apk
Thank you Itiskonrad!
Yes, the commands are working. Decompiled and compiled again without changes, and everything went well.
I realized that change depending on what I do when this error occurs. Now I'm changing slowly and has not worked.
The strange thing is that I do not see the changes on the device. My intention is to change the entire text of the notifications in order to use a black theme in my status bar.
I made a theme based on UotKitchen and I'm improving, but notifications such as downloads and ongoing calls persist with the font color black, which makes their visibility.
I will continue testing until something works!
Big hug!
(translation via Google Translate)
itiskonrad,
Do you use an ICS leak? Could you please modify status bar apk and remove carrier from there?
Shouldn't be the final APK zipaligned?
Thanks, great

[Tutorial] Decompiling-Compiling-Editing APKs

Hello guys. I'm creating a thread with a simple tutorial of how to decompile, compile, edit apks. I've seen some threads about it, but all of them were very complicated to understand. It's a simple tutorial, not designed to really mess with apks, just to edit a bit, like swapping icons, images, etc. When I get some more time, I will also teach how to mess with some CM9 Theme Chooser APKs
First of all, what you are going to get with this?
1. Decompile APKs
2. Decompiling all files, so you will only get XML [easy to edit], images and SMALI files [in most cases]
You need to know...
1. Works only Windows [x86 or x64] [You can try on linux, but you will need to download other files of apktool. But the steps are almost the same]
2. Choose the .bat of your version. [x86 = 32 bits] [x64= 64 bits]
3. You need JRE
4. Attached, the most updated apktool.
Let's go...
STEP 1 - preparing
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1. I've optimized the files to run at D:\apktool [Another partition]. So, extract the .7z, and make sure that there's a apktool folder at the ROOT of D:\ drive. If you want to put this folder at other place, please pay attention: open the Run [x??].bat on the notepad. If you want the folder at the C:\ drive, delete the "D:" line, and swap the directory to the one you choose. [Example: "C:\Users\....user name....\Desktop"] Just make sure you included the cd before the path. If you want the folder at other place on D:\ drive, just change the directory [Example: "D:\Desktop"], and again, with the "cd" command before the path.
STEP 2 - still preparing...
1. Get framework-res.apk from your ROM [if you are on a Samsung ROM, also get twframework]
2. Extract framework-res.apk here
3. Open the correct .bat of your Windows version
4. Run this command: "apktool if framework-res.apk" [if you are on a Samsung ROM, also do with the other framework]
STEP 3 - now decompiling
1. Now, put the apk you want to edit on your apktool folder.
2. Run this command: "apktool d APK-NAME.apk
3. You may get NO errors when it's done.
4. The out put folder is the folder of the decompiled apk.
STEP 4 - now compiling
1. Run this command: "apktool b APK-NAME" [without the .apk]
2. You may get NO errors when it's done.
3. The output APK is located on \[apktoolfolder]\APK-NAME\dist
STEP 5 - optimizing
1. Sign your APK with this
2. Zipalign your APK with this. You can also use zipalign scripts on your ROM to zipalign.
3. Now you may install your apk normally. [user app or system app]
__________________________________________________ __________________________________________________ ___________________________________________
TIPS
1. You can edit .smali files with Notepad ++
2. You can also edit XML files on the Notepad [Windows notepad. I think that with Notepad ++ also works]
3. Soon, I'm going to teach how to edit CM9 Theme Choose APKs. You will be able to: theme non-themed apps, and replace images.
4. I tried to be the most clear and direct as possible. If something is unclear, tell me now. If you have any suggestions to make the tutorial better, please tell me...
reserved...
reserved too...
i reserved it, becouse i was trying it out, and i wanted to be one of the first post here, great tut, lika charm
android_isda_**** said:
RESERVED
Click to expand...
Click to collapse
??
Hi can you help me with this apk? http://forum.xda-developers.com/showthread.php?t=1738252
VasyleTheBest said:
Hi can you help me with this apk? http://forum.xda-developers.com/showthread.php?t=1738252
Click to expand...
Click to collapse
This is a lot harder. Can't do this for you. This isn't playstation2 with it's football games. Sorry. If you still want to try, decompile and search for images to replace.
Hi,
a question here:
I was succefull to theme system apps, but when I try to theme a normal, it never works. all the processes goes fine, but when i eant to install modified apk it gives error. and even when I copy it to /data/app/ it disappear from app drawer.(after restart of course)
sam5154 said:
Hi,
a question here:
I was succefull to theme system apps, but when I try to theme a normal, it never works. all the processes goes fine, but when i eant to install modified apk it gives error. and even when I copy it to /data/app/ it disappear from app drawer.(after restart of course)
Click to expand...
Click to collapse
I think you forgot to sign. Sign, and after you do, go back here and tell what error are you getting
i always got an error compiling systemui, can you help me?
edit:
found a solution using ics apktool here
http://forum.xda-developers.com/showthread.php?t=1558171
marcellocord said:
I think you forgot to sign. Sign, and after you do, go back here and tell what error are you getting
Click to expand...
Click to collapse
Wow, thanks it worked. But why system apps don't need to be signed?
Sent from my GT-I9100 using Tapatalk 2
First: Great Job
Second 2 Questions.
Is it not easyer to editing in .java (with dex2jar tool) then in smali?
For beginners is it not a little bit easyer to use "Apk One Click" for de- and recompile .apk (include the dex2jar Tool) ?
sam5154 said:
Wow, thanks it worked. But why system apps don't need to be signed?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
They can still work.
$wissdroid said:
First: Great Job
Second 2 Questions.
Is it not easyer to editing in .java (with dex2jar tool) then in smali?
For beginners is it not a little bit easyer to use "Apk One Click" for de- and recompile .apk (include the dex2jar Tool) ?
Click to expand...
Click to collapse
Thanks. When you decompile, it will turn a lot of files into .smali files. Those smali files are very easy to modify on Notepad++. But I'm going to study more about dex2jar.
I had write before a Month or Two, A decompile Tutorial for German Users:
When you need some Pictures for your Tutorial, you Can find it: Here
thank you marcellocord
it works very well.
good job

[Guide][MOD] Make your own multi-dpi stock dialer

How to create a dialer for stock Samsung roms:
Requirements:
- Modded APKTool for ICS
(http://forum.xda-developers.com/showthread.php?t=1558171)
- Java JDK
- Windows 7 (I used it in a VM)
- A rooted phone
- Root Explorer
- Notepad++
- 7zip
Setting up:
- Install Java JDK, once that is done extract the contents of APK tools. Place them as close to the root folder as possible, I had them in C:\Android.
- Go to your phone, open up Root Explorer and navigate to /System/Framework and copy framework-res.apk to your SD Card
- Plug your phone in via mass storage mode/mtp and pull the app to the folder you created earlier (C:\Android).
- Open up CMD (command prompt) and type the following:
cd..
cd..
cd Android/
Making sure you use the ".."!
Next type the following command:
apktool if framework-res.apk
This will not decompile the framework-res apk, it is installing the current framework of your rom as they're all different. You will need to repeat this step every time you flash a new rom.
- Back on your phone, navigate to /System/app and copy Contacts.app to your SD Card
- Plug your phone in again and move it to the folder (C:\Android)
Decompiling:
Open terminal up again and type the following:
apktool d Contacts.apk
I'm guessing the d stands for decompile :good:
Editing:
Seeing as we're only editing XML's this isn't going to be that hard, I learnt how to do this in about 10 minutes. In the root folder you should now see a folder called "Contacts". Open that and navigate to /res/layout/ and scroller down to D. There will be several XML's starting with the word dialpad- we want all of those. Open those up in Notepad++.
The Maths:
You'll notice most of the figures are measured in DIP, this stands for density independent pixels, so we need to work out how much to multiply the values by so they look the same on your chosen DPI.
Take the stock density that the dialer works correctly at - 240dpi and divide it by your new density (for me it was 180).
240 / 180 = 1.3
The tedious bit:
Unfortunately you need to change every figure in the XML's starting with the word dialpad, this took me about and hour to do this but it was well worth it. This includes values not ending in DIP such as pp and px. To work out the new figure you need to do the following:
Take the value in the XML, for example 50
Multiply it by the value you got from dividing the old density by the new, mine was 1.3 to get the new value
50 * 1.3 = 65
*EVERY VALUE IN THESE XML's NEEDS TO BE CHANGED!*
Several hours later....:
Once you've done that we need to recompile everything.
- Open up CMD again and type in apktool b Contacts ContactsNew.apk
The b might stand for build, I have no idea, but depending on the speed of your computer/laptop this may take a few seconds/minutes. It took my macbook around 15 seconds to do it. You may get some small error messages, you can also use this to find any problems you made whilst editing.
Assuming it all went well you will see the new apk underneath your old one in the root folder. We can't use this as it doesn't have the proper signature that is needed for it to work. Therefore we will use 7zip to take the new files and drop them into the old apk.
- Open up 7zip and locate ContactsNew.apk (the one we just recompiled)
- Navigate to res/layout/ and drag all the files starting with dialler to a safe location, such as the desktop
- Go back to and open up Contacts.apk (the old one you pulled from your phone)
- Navigate to res/layout/ and drop all the files you just removed in here
- Close down everything as we don't really need it anymore
Installing:
Copy Contacts.apk to your SD Card overwriting the old one if it's still there and disconnect your phone safely. Open up root explorer and navigate to your SD card, copy Contacts.apk to /System/
*DO NOT COPY IT INTO SYSTEM/APP JUST YET*
Long press the apk and select permissions, they need to look like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Once you've done that long press and move it to /System/app overwriting the old one.
Reboot!
The dialer should now be the correct size, hoped this helped!
Awesome
Thank You very much,
Would u please be kind enough to make S3 dailer for S2? (because I'm a noob)
thanks to share this !
As you says, changing every dpi values is a big job, so I mad a little tool to do it :
http://www.mediafire.com/?39olh233z2gj9n2
It's a Windows application that take all xml file of a directory and change all xml values with 'px' at the end and change the value using a given ration. Two checkbox options : replace existing files (or create new ones in a 'Done' subdirectory) and subdirectory (recursive dir process).
If it can be useful for someone ...
dont work, u can send themodified file? for example 200 dpi whathever
nmeuret said:
thanks to share this !
As you says, changing every dpi values is a big job, so I mad a little tool to do it :
It's a Windows application that take all xml file of a directory and change all xml values with 'px' at the end and change the value using a given ration. Two checkbox options : replace existing files (or create new ones in a 'Done' subdirectory) and subdirectory (recursive dir process).
If it can be useful for someone ...
Click to expand...
Click to collapse
Hi bro, I try use yours program for change dpi values in my directory with xml, but when I push Go, file has change but when I open it by Notepad++ i see nothing happen. Any issu or some tutorial how to use your program? Thank you
thank you..

How to enable usb mass storage and on-screen buttons in Android 4.x

How to enable usb mass storage and on-screen buttons in Android 4.x (Windows Users Only)
====================================================
UPDATE:
My new tool is out! Check it out, it does the work for you
http://forum.xda-developers.com/showthread.php?p=40031460#post40031460
A) How:
======
It consists of editing some lines in framework-res.apk which you can extract from your ROM zip (/system/framework) or by using this command with adb (With phone connected via USB)
Code:
> adb pull /system/framework/framework-res.apk framework-res.apk
B) Tools:
=======
- Framework Toolkit by Themike10452 ( Me ) ==> http://www.mediafire.com/?j6ndniep6h8iwch
- XML Editor. I recommend FirstObject XML Editor (Freeware) ==> http://www.firstobject.com/dn_editor.htm
- Java Development Kit ==> http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
C) Steps:
=======
Video Tutorial: http://www.youtube.com/watch?v=9V-Ukles6w0
1 - Download and extract Framework Toolkit, then place your framework-res.apk inside [place-apk-here-for-modding] folder.
2 - Run Apk-Multi-Tool.bat as administrator, press any key to enter options menu, then use option (9) to decompile the apk
3 - Head to [projects] folder > res
4 -
a) Enabling USB Mass Storage:
- Now you are in [res] folder, go to [xml] folder, open [storage_list.xml] with an xml editor
- The 4th line looks like this:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:maxFileSize="4096" />
Replace it with the following line:
Code:
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="true" android:allowMassStorage="true" android:maxFileSize="4096" />
- Save and go back to [res] folder
b) Enabling On-screen Buttons:
- Now you are in [res] folder, go to [values] folder
- Open bools.xml and look for the following line:
Code:
<bool name="config_showNavigationBar">[COLOR=Red]false[/COLOR]</bool>
Replace false with true, the new line should look like this:
Code:
<bool name="config_showNavigationBar">[COLOR=Green]true[/COLOR]</bool>
;; ;; Now navigation bar is enabled, we can change the bar size by editing [dimens.xml] in the same folder ;; ;;
- To do so, edit lines 14 and 16, set the dip to whatever you like
Example (17 dip):
14. <dimen name="navigation_bar_height">17.0dip</dimen>
15. <dimen name="navigation_bar_height_landscape">48.0dip</dimen>
16. <dimen name="navigation_bar_width">17.0dip</dimen>
Click to expand...
Click to collapse
You can skip line 15, it does not matter
Click to expand...
Click to collapse
5 - Save and exit, go back to main folder, re-open Apk-Multi-Tool.bat, this time use option 11 to compile the edited apk
6 - After it's done compiling it will ask you if you want to add some more files, reply with n
7 - Close Apk-Multi-Tool, run Create_zip.bat as administrator, read on-screen instructions it's very simple
8 - After it's done successfully you can collect your flash-able zip from [final-zip-here] folder
9 - Move the zip to your sd card and flash it via CWM Recovery, reboot, if you enabled USB Mass Storage make sure to change connection
method from MTP to Mass Storage in System Settings
10 - Use ##Cleanup.bat to cleanup all folders (Important if you want to use it again)
Important Do NOT use this toolkit with any other apk, just framework apk
#####################################################################################################################
////////////
Credits:
\\\\\\\\\\\\
My Toolkit includes Apk-Multi-Tool written by raziel23x ==> http://forum.xda-developers.com/showthread.php?t=1310151
Zip creator script was written by me
Does this work on CM9/10? Of course it does!
Leave your comments below and hit thanks if I helped you :good: :cyclops:
i have error
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Zizo950 said:
i have error
Click to expand...
Click to collapse
You have to insall Java Development Kit on your machine
Here: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
Update: Don't forget to add Java to PATH variable
Here's how to: http://www.youtube.com/watch?v=58ZO_NaAOfU
Themike_10452 said:
You have to insall Java Development Kit on your machine
Here: http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html
Update: Don't forget to add Java to PATH variable
Here's how to: http://www.youtube.com/watch?v=58ZO_NaAOfU
Click to expand...
Click to collapse
Thank You Is Work Good
Zizo950 said:
Thank You Is Work Good
Click to expand...
Click to collapse
I'm glad to hear it
Solved
Saingpor said:
I got bootloops after flashing update_CWM.zip !
Do i need to sign that apk before make a flashable.zip ?
Or can you give some idea ?
I only try to enable OSB ! ( Stock ICS 4.0.4 ) ( 4.1.B.631)
Click to expand...
Click to collapse
Just follow the video instructions (link in post) and you shouldn't face any problems, the steps include signing the APK and everything,
I use this script myself and no problems. If you have any further problems or questions just let me know, I'll be happy to help.
You can send me your framework-res.apk if you want me to mod it for you.
Well I've released an automated tool to do the job a while ago please check it out
http://forum.xda-developers.com/showthread.php?t=2224784
it supports android 4.0 4.1 & 4.2
Sent from my LT18i using xda premium
auto rotate lockscreen
i try this method to change my xperia sola JB A.1.100 framework-res.apk
to make auto rotate lockscreen like this http://forum.xda-developers.com/showthread.php?t=1525045
after compiling (step 6), i got system_framework-res.apk and the size is same with the original,about 13Mb
but after i run Create_zip.bat, the flashable zip size only 6Mb.
after i flash from CWM, my phone stuck at bootscreen
is it normal that the file size change?
i try alot of method to decompile/compile framework-rest.apk and always stuck at bootscreen
deyanti01 said:
i try this method to change my xperia sola JB A.1.100 framework-res.apk
to make auto rotate lockscreen like this http://forum.xda-developers.com/showthread.php?t=1525045
after compiling (step 6), i got system_framework-res.apk and the size is same with the original,about 13Mb
but after i run Create_zip.bat, the flashable zip size only 6Mb.
after i flash from CWM, my phone stuck at bootscreen
is it normal that the file size change?
i try alot of method to decompile/compile framework-rest.apk and always stuck at bootscreen
Click to expand...
Click to collapse
the file size of the apk should become smaller yes
Sent from my Xperia Arc S using xda premium
deyanti01 said:
i try this method to change my xperia sola JB A.1.100 framework-res.apk
to make auto rotate lockscreen like this http://forum.xda-developers.com/showthread.php?t=1525045
after compiling (step 6), i got system_framework-res.apk and the size is same with the original,about 13Mb
but after i run Create_zip.bat, the flashable zip size only 6Mb.
after i flash from CWM, my phone stuck at bootscreen
is it normal that the file size change?
i try alot of method to decompile/compile framework-rest.apk and always stuck at bootscreen
Click to expand...
Click to collapse
if your ROM is odexed this won't work because the apk needs to be signed with the original build key. so this method only works for deodexed ROMs.
Sent from my Xperia Arc S using xda premium

[TUTORIAL][SAMMY][JB] Theme Your Statusbar On Your Own

CREDITS ARE NECESSARY
A GUIDE TO THEME STATUSBAR IN A REALLY GOOD WAY (FOR SAMSUNG PHONES)
NOTE I WONT PROVIDE ANY SCREENIES FOR EVERY LINE!! -IT WOULD BE A GOOD CHALLENGE TO THEMERS
FIRSTLY BEFORE ANYTHING REMEMBER THIS IS AN ARGB FORMATTING FOR HEX CODING OF COLOURS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I won’t show you HOW to do it I’ll just navigate WHAT files BELONG to WHAT
A Simple Example What I have themed
LET'S START
So List of Things you need
- SystemUI.apk (of your desired ROM)
- Framework-res.apk (of your desired ROM)
- Creativity (of your OWN MIND)
- APKTOOL (Apkmanager, ApkMulti-tool etc)
- Patience and Understanding
Copy your framework-res.apk and SystemUI.apk to your APKTOOL folder
Open cmd change directory (CD) to APKTOOL folder
Write this in cmd now
Code:
apktool if framework-res.apk
Decompile SystemUI.apk
Code:
apktool d SystemUI.apk
Navigate yourself to the Folder in APKTOOL folder … i.e. SystemUI
Go to /res/drawable-hdpi
We’ll start with editing the PULLDOWN BAR – NORMAL and PRESSED
This belongs to
tw_status_bar_close_off (NORMAL)
and
tw_status_bar_close_on” (PRESSED)
Click to expand...
Click to collapse
Then if you have a dual-Sim phone (just like my Grand)
You may change the SIM Switcher Backgrounds
“quick_panel_btn_default_normal.9.png”
and
“quick_panel_btn_default_press.9.png”
Click to expand...
Click to collapse
Now let’s come to Notification Expanded Background
There’s a notification_panel_bg.9.png IMG… just delete it and paste the image you want to put in background
AS
notification_panel_bg.png (Height and width should be by your phone’s resolution)
Click to expand...
Click to collapse
Now moving on to the BRIGHTNESS SLIDER ICON & BACKGROUND
This is the icon name
ic_sysbar_brightness.png
Click to expand...
Click to collapse
CONTINUED ON NEXT POST ​
For Background Navigate to – /res/layout
Open this file with notepad++
tw_status_bar_expanded.xml
Click to expand...
Click to collapse
(For dual phones)
tw_status_bar_expanded_dual.xml
Click to expand...
Click to collapse
Find (ctrl+f)
Code:
android:id="@id/brightness_controller"
Now you have to options … you can use directly COLOR (#argb)
USE HEX COLOR CODE TO SIMPLY CHANGE the BACKGROUND COLOUR
Edit
Code:
android:background=”#FF1e1e1e”
to ANY HEX COLOR CODE YOU WANT
OR Redirect it to an image by changing the HEX COLOR code to
Code:
android:background="@drawable/brightness_slider"
and paste your brightness_slider background of 480x56px (varies on different resolution – divide 480 by 1.5 and 56 by 1.5 for MDPI)
To drawable-hdpi
NEXT IS HEADER of the NOTIFICATION BAR (Might be the most wanted Editing)
Navigate to res/layout
tw_statusbar_expanded_header.xml
Click to expand...
Click to collapse
Probably the SECOND line of the XML would be for background (MAY VARY TO OTHER XMLS)
Change the
Code:
android:background="#ff000000"
to a color code of your choice or simply redirect it to an image
by changing the HEX code to
Code:
android:background="@drawable/notification_header_bg_exp"
and put your image file of 407x52 with the name
notification_header_bg_exp.png in drawable-hdpi
Now LETS move on to Some Small Changes
Navigate to res/Values
Open Colors.xml
Change HEX CODE for CLEAR BUTTON TEXT
Code:
<color name="tw_status_bar_clear_btn_text">#ff000000</color>
Open drawables.xml
Change the HEX CODE for HEADER OF STATUSBAR BACKGROUND
Code:
<item type="drawable" name="status_bar_background">#ffffffff</item>
Change the HEX CODE for NOTIFICATIONs BACKGROUND
Code:
<item type="drawable" name="tw_notification_background_null">#ffffffff</item>
<item type="drawable" name="tw_notification_background_pressed">#ff6b6b6b</item>
THAT'S ALL FOR SYSTEMUI.APK
Compile SystemUI.apk
Code:
apktool b SystemUI
then
Copy the META-INF folder and AndroidManifest.xml from original to the new APK using WINRAR/7-zip
​​Lets go to framework ... CONT on NEXT POST
Decompile framework-res.apk
Code:
apktool d framework-res.apk
Navigate to res/values/styles.xml
FIND
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar.EventContent">
Change the HEX code of <item name="android:textColor">#ffffffff</item> to your CHOICE Color
Probably the next line would be
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent.Title">
Change the HEX code of <item name="android:textColor">#ffffffff to your CHOICE Color
Okay so, let’s move on the Notification bar COMMON icons ( missed calls etc)
you would find some files related
Code:
stat_notify_*.png
change them for their respective icons
Recompile the framework-res.apk
Code:
apktool b framework-res
Copy the META-INF folder and AndroidManifest.xml from original to the new APK using WINRAR/7-zip
So That's It for now .... Thanks and Regards ​
Great guide bro, but should be in themes n apps section
Chotudevil says
chotu222 said:
Great guide bro, but should be in themes n apps section
Chotudevil says
Click to expand...
Click to collapse
Oops my mistake. .. let the MOD Move the Thread
This is preety good concept
But I am confused with how should I start... I hav downloaded apkmultitool
Sent from my GT-I9082 using Tapatalk 2
awesome tutorial.
Resonance28295 said:
This is preety good concept
But I am confused with how should I start... I hav downloaded apkmultitool
Sent from my GT-I9082 using Tapatalk 2
Click to expand...
Click to collapse
Open multi tool ... install framework-res.apk
decompile system ui.apk
decompile framework-res.apk
start your work
very very good tutorial ...
Sent from my GT-I9082 using xda premium
Can anyone make a sony xperia theme for galaxy grand (I mean original same as xperia z or sl) Thnx in advance!
:fingers-crossed:
Thanks !

Categories

Resources