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..
Related
**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
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
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"
@wali01x i tried decompiling twframework.apk for adding the crt animation in my gt i9082. i refered to the post that u have written here. But its not getting extracted. It is showing few errors!!(screenshot attached for ur ready referrence). So will u plz edit it for me as i wanted the horizontal crt animation in a new rom which i m making.
n will u please also tell me that where i m going rong! n yes...i have java installed. @balliboxer @chotu222 @kk9999gada and other xda members if u know the solution then i nedd ur help too!!!
(Please open the images by right clicking on the thumbnail and then opening it in a new tab. Thankyou.)
{
"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"
}
- Error
- Log
Thanking u all in anticipation!:fingers-crossed:
adityab721 said:
@wali01x i tried decompiling twframework.apk for adding the crt animation in my gt i9082. i refered to the post that u have written here. But its not getting extracted. It is showing few errors!!(screenshot attached for ur ready referrence). So will u plz edit it for me as i wanted the horizontal crt animation in a new rom which i m making.
n will u please also tell me that where i m going rong! n yes...i have java installed. @balliboxer @chotu222 @kk9999gada and other xda members if u know the solution then i nedd ur help too!!!
(Please open the images by right clicking on the thumbnail and then opening it in a new tab. Thankyou.)
- Error
- Log
Thanking u all in anticipation!:fingers-crossed:
Click to expand...
Click to collapse
First of all I recommend you to use apktool for decompiling apks.
Tools Required:
Apktool (Download)
7-zip (Don't use WinRAR) (Download from Here)
Notepad++ (Download from Here)
Installing Apktool:
Download it from the attachment.(Apktool.zip)
Now Extract 3 files present inside zip to "C:\Windows" without any folder.
You have now installed apktool.
Installing frameworks:
Create a folder named "Apktool" here "C:\Apktool" or on any location with any name you want.
Copy "framework-res.apk" and "twframework-res.apk" (without quotes) to that folder you created.
Now hold Shift key and right click anywhere on the empty area in explorer. (See Image)
Select "Open Command Window Here" (See Image)
Now you will get a command window (See Image).
Now type "apktool if framework-res.apk" (without quotes). It will be installed. (See Image)
Now type "apktool if twframework-res.apk" (without quotes). (See Image)
Now both the frameworks are installed.
Compiling & Decompiling Apks:
To decompile the Apk place desired the apk inside the folder you created.
Once again hold Shift key and right click anywhere on the empty area in explorer.
Now type "apktool d framework-res.apk" or any **.apk you want to decompile (without quotes).
Similarly you can also decompile "twframework-res.apk" (See Image)
Now to compile back type "apktool b framework-res" (without quores and without .apk extension). (See Image)
Now you have successfully compiled apk.
Lockscreen CRT-OFF Animation:
Decompile framework-res.apk using the above tutorial.
Now navigate to \framework-res\res\values\bools.xml
Now edit bools.xml using Notepad++ (Don't use the inbuilt notepad of windows it will corrupt the file as it is not linux based)
Find "<bool name="config_animateScreenLights">true</bool>"
Now change "true" to "false" and save the file and exit Notepad++
Now compile back the apk using the above tutorial.
Now open the decompiled folder you will see two new folders "build" and "dist"
Go inside "build\apk" folder you will find a file named "resources.arsc"
Now open the original apk say, "framework-res.apk" that is inside C:\Apktool using 7-zip
Drag the "resources.arsc" from framework-res\build\apk\ to the original apk
Now you have successfully applied CRT-OFF Animation.
You can now replace the apk inside the phone with the modded one using root explorer.
Don't forget to keep a Nandroid Backup and a separate backup of original framework-res.apk just in case something goes wrong
kk9999gada said:
First of all I recommend you to use apktool for decompiling apks.
Tools Required:
Apktool (Download)
7-zip (Don't use WinRAR) (Download from Here)
Notepad++ (Download from Here)
Installing Apktool:
Download it from the attachment.(Apktool.zip)
Now Extract 3 files present inside zip to "C:\Windows" without any folder.
You have now installed apktool.
Installing frameworks:
Create a folder named "Apktool" here "C:\Apktool" or on any location with any name you want.
Copy "framework-res.apk" and "twframework-res.apk" (without quotes) to that folder you created.
Now hold Shift key and right click anywhere on the empty area in explorer. (See Image)
Select "Open Command Window Here" (See Image)
Now you will get a command window (See Image).
Now type "apktool if framework-res.apk" (without quotes). It will be installed. (See Image)
Now type "apktool if twframework-res.apk" (without quotes). (See Image)
Now both the frameworks are installed.
Compiling & Decompiling Apks:
To decompile the Apk place desired the apk inside the folder you created.
Once again hold Shift key and right click anywhere on the empty area in explorer.
Now type "apktool d framework-res.apk" or any **.apk you want to decompile (without quotes).
Similarly you can also decompile "twframework-res.apk" (See Image)
Now to compile back type "apktool b framework-res" (without quores and without .apk extension). (See Image)
Now you have successfully compiled apk.
Lockscreen CRT-OFF Animation:
Decompile framework-res.apk using the above tutorial.
Now navigate to \framework-res\res\values\bools.xml
Now edit bools.xml using Notepad++ (Don't use the inbuilt notepad of windows it will corrupt the file as it is not linux based)
Find "<bool name="config_animateScreenLights">true</bool>"
Now change "true" to "false" and save the file and exit Notepad++
Now compile back the apk using the above tutorial.
Now open the decompiled folder you will see two new folders "build" and "dist"
Go inside "build\apk" folder you will find a file named "resources.arsc"
Now open the original apk say, "framework-res.apk" that is inside C:\Apktool using 7-zip
Drag the "resources.arsc" from framework-res\build\apk\ to the original apk
Now you have successfully applied CRT-OFF Animation.
You can now replace the apk inside the phone with the modded one using root explorer.
Don't forget to keep a Nandroid Backup and a separate backup of original framework-res.apk just in case something goes wrong
Click to expand...
Click to collapse
Ok! Thanku! I have decompiled my frawework successfully! Bt that animateScreenLights in my bools is already false! So waht should I do? Should I make it true? Or should I compile the apk without making any changes?
Sent from my GT-I9082 using XDA Premium 4 mobile app
adityab721 said:
Ok! Thanku! I have decompiled my frawework successfully! Bt that animateScreenLights in my bools is already false! So waht should I do? Should I make it true? Or should I compile the apk without making any changes?
Sent from my GT-I9082 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Looks like Samsung is trying to block developers from editing the apks by removing some features. Sorry bro but I know this much only about crt off animation.
However you can try this app from play store as it has CRT-OFF ANIMATION
https://play.google.com/store/apps/details?id=com.katecca.screenofflock&hl=en
kk9999gada said:
Looks like Samsung is trying to block developers from editing the apks by removing some features. Sorry bro but I know this much only about crt off animation.
However you can try this app from play store as it has CRT-OFF ANIMATION
https://play.google.com/store/apps/details?id=com.katecca.screenofflock&hl=en
Click to expand...
Click to collapse
Yes I know about that app..bt I wanted the animation as integrated in ur inspiration rom! Unlucky Me! :crying: Anywayz...thanks a ton for ur concern!
Sent from my GT-I9082 using XDA Premium 4 mobile app
Hey guys, another week calls for another NOOB FRIENDLY guide. This time is for how to add a banner in the about phone tab in the settings. We have seen this many times in various roms but today you will get a step by step tutorial on how to do it. This tutorial works on all android devices and jellybean (4.1, 4.2, 4.3).
REQUIREMENTS:
1. Java
2. SDK tools and JDK already installed with paths set on your computer. (look it up if you don't know about this)
3. PC/laptop
4. Advanced apktool: http://d-h.st/5vj
5.auto-sign: http://www.mediafire.com/?rt059vr1di2e0ao
6. A brain (no download link... Lol)
7. A bit of time
8. A fully rooted device.
9. Root explorer ( any root enabled file manager)
10. Notepad++
BEFORE WE START:
You must choose what banner you want in the about phone section. This can be any picture or any xda signature you like. Really, any picture ever.
1. Open your image through paint.
2. Click the resize button
3. Click on the pixels box instead of percentage.
4. untick maintain aspect ratio.
5. In horizontal, put 700
6. In vertical, put 215
7. Save the image and rename it to logo.png
8. It must be a png and must be called logo, please don't ignore step 7
THE GUIDE:
1. On phone, open root explorer
2. Navigate to /system/app
3. Scroll down until you see setting.apk
4. Copy it to your internal memory
5. Navigate to /system/framework
6. Copy both files framework-res.apk and semcgenericuxpres.apk also to internal sd card
7. Connect phone to computer through MTP.
8. Copy the three apks you just copied to the internal sdcard to your computer's desktop.
9. Extract the advanced apktool (link in requirements)
10. Place the three apks in the "2-In" folder of the advanced apktool.
11. Run advanced apktool
12. Hit 1 (install framework)
13. Pick framework-res.apk, let it install
14. Now pick semcgenericuxpres.apk, let it install
15. Go back and select option 2 (decompile)
16. Select settings.apk
16.1. Wait
17. When done open the "3-out" folder in the advanced apktool folder
18. Open the settings.apk folder
19. Open "res"
20. open "layout".
21. Download this file and insert it into the layout folder: http://www.mediafire.com/?8q9f09x77he93xf
22. Go back and open the "drawable" folder in "res".
23. Paste your logo.png that you made and resized before we start.
24. Go back and open the "xml" folder
25. open device_info_settings.xml using notepad++
26. Press ctrl+F at the same time on your keyboard.
27. Input this line:
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
28. Press find next
29. Close the find window
30. Look at the hilighted line
31. Press on the end of it
32. Hit enter
33. Hit tab on your keyboard.
34. Paste this:
<PreferenceScreen android:layout="@layout/logo" android:key="od_logo" />
35. Press the save button at the top.
36. Close notepad++
37. Run advanced apktool again.
38. Select option 3 (recompile)
39. Select settings.apk
40. Wait
41. When done close advanced apktool
42. Open "4-done" in the advanced apktool folder.
43. Move settings.apk in this folder to your desktop.
44. Extract the auto-sign zip to desktop
45. Move the settings.apk you just move to the desktop into the auto-sign folder
46. Run the sign.bat file in the auto-sign folder
47. Follow on screen instructions
48. When done, you will get a your_app_signed.apk in the auto-sign folder.
49. Move it to your desktop
50. Rename it to settings.apk
51. Connect your phone to PC.
52. Copy your new settings.apk to your internal memory.
53. On phone, open root explorer
54. Navigate to where you copied the settings.apk to your internal sd card.
55. Move it to /system/app overwrite the old settings.apk (MAKE A BACKUP)
56. Set permissions to rw-r--r--
57. Reboot phone.
ENJOY YOUR NEW BANNER!!
This is what mine looks like:
{
"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"
}
Please share what your's looks like in the comments and don't forget to hit that thanks button!!!!
Credits: @paper13579 for making this awesome a§§ Guide @abo hani , i used his guide as a base for mine @BDFreak for making the awesome advanced apktool.
Thank you
Press Thanks If I Helped!!
Reserved for future
Should i keep making these noob friendly guides? Does it really help? What do you think?
Press Thanks If I Helped!!
paper13579 said:
Should i keep making these noob friendly guides? Does it really help? What do you think?
Press Thanks If I Helped!!
Click to expand...
Click to collapse
think will help atleast some people...but there is no need for auto sign..bcoz advanced apktool has inbuilt sign option
ansebovi said:
think will help atleast some people...but there is no need for auto sign..bcoz advanced apktool has inbuilt sign option
Click to expand...
Click to collapse
When i used the sign option in advanced apktool, it didn't work but when i used auto sign, it worked very well. By the way, did you try it? And if you did, are there any problems?
Thanks
Press Thanks If I Helped!!
paper13579 said:
When i used the sign option in advanced apktool, it didn't work but when i used auto sign, it worked very well. By the way, did you try it? And if you did, are there any problems?
Thanks
Press Thanks If I Helped!!
Click to expand...
Click to collapse
i m using only advanced apktool...no problem...if you meant the guide...sry i already know and have logo in my phone..
Did this Mod work on KitKat??
BohArie said:
Did this Mod work on KitKat??
Click to expand...
Click to collapse
Give it a go. Im 99.99%sure it will work. Just make a backup of you original settings.apk. If the new one that you make doesn't work, you can just replace it with the original one. There is no risk involved here.
Press Thanks If I Helped!!
Nice tuts bro, one question though... what image format supported for the banner? Also, can we put animated gif image on it?
Thanks,
madper said:
Nice tuts bro, one question though... what image format supported for the banner? Also, can we put animated gif image on it?
Thanks,
Click to expand...
Click to collapse
As step 8 in the before we start section says, the image must be a png and not any other format. I really doubt a gif would work. But if you are willing to experiment, you can go ahead and try, there is no risk involved, just make a backup of your original settings.apk and you are good to go.
By the way, i noticed the step 34 was not complete, so i edited it.
Press Thanks If I Helped!!