[MOD] [GUIDE] Add Custom Font(s) To Any App - Galaxy Note 3 General

Hello XDA,
This guide will show you how to add a custom font to any string of text, in any app. When done right, it can really enhance the look of any theme. For the purposes of this guide, I'm going to assume you already have the tools and basic knowledge required to decompile, modify, and recompile apk files. If not, there are plenty of threads on XDA that will teach you how.
**** Before proceeding, MAKE A BACKUP ****
**** I am not responsible for any loss of data, bricked devices, ***
*** your wife leaving you, or any other consequences that ***
*** may arise as a result of this mod. ****​
First, download and extract the attached zip file. The included .ttf is for example purposes, and can be replaced with any font you choose.
Next, decompile whatever apk you want to use your font in. For this guide, I will be using SystemUI.
In your decompiled apk folder, place your .ttf file in the 'assets' folder. If there is no 'assets' folder, create one.
Move the included .smali file into you app's 'smali' folder. The exact location shouldn't really matter, just make a note of what that location is. In my SystemUI example, I have placed it in com/android/systemui/.
*** NOTE: The .smali file I've included is named 'WurlyTextView' because the font it uses is called 'Wurly Fool'. ***
*** While not necessary, I would highly recommend renaming the smali file to something more indicative ***
*** of the font you are using, just to keep things less confusing for yourself. ***​
After you have moved and renamed the .smali file, open it in Notepad++ and look at the first line:
Code:
.class public Lcom/android/systemui/WurlyTextView;
If you are using this mod in any apk other than SystemUI, you will need to change the path. For instance, if you were working in SecMms, the path would be:
Code:
.class public Lcom/android/mms/WurlyTextView;
In Notepad++, open the find dialogue (ctrl+f), and search for "Lcom/android/systemui/" and replace every instance with the path from your apk.
Next, assuming you renamed the .smali to something more descriptive of your font, search for:
Code:
WurlyTextView
And again, replace every instance with whatever you renamed the .smali to. Be sure to watch the capitalization, as it is important.
Now, search again, this time for:
Code:
wurly.ttf
There should be three instances of it. Change all three to the file name of the font you placed in the 'assets' folder.
*** NOTE: If there is a space in the file name of your font, be sure to right-click it, ***
*** look at it's properties, and see what the file name is there, as it will probably not ***
*** include the space, or anything after it. This is the file name you want to use. ***​
Search the .smali file one more time, this time for:
Code:
wurly_fool
Replace every instance with something descriptive of your font. Note that whatever you change it to must be all lowercase.
*** NOTE: This step is only necessary if you are adding more than one custom font. ***
*** If you are only using one font, this may be left as "wurly_fool", regardless of your font's name. ***​
Close your .smali file, saving changes, and navigate to your decompiled apk's res/layout folder.
Locate and open the layout that points to the string you want your new font to be used on. For example, if you want to change the text that says "No Recent Apps" when you long-press the Home button, you would open /res/layout/tw_status_bar_no_recent_apps.
Within that layout file, locate the line pointing to the string you want to change, and replace the <TextView> tag with the path to the smali file. For example, if you left the smali with the name WurlyTextView, and put it in settings, the correct tag might look like this:
Code:
<com.android.settings.WurlyTextView>
.
And that's it....Hopefully part of this post doesn't disappear again...Not quite sure how that happened...

Thanks @Morningstar.. Great tutorial. Will give it a try when I have some time.
Sent from my SM-N910P using XDA Free mobile app

kevinoliva113 said:
Thanks @Morningstar.. Great tutorial. Will give it a try when I have some time.
Sent from my SM-N910P using XDA Free mobile app
Click to expand...
Click to collapse
Thank you, and let me know how it goes! I tried making the tutorial as idiot proof as possible, so while it may seem somewhat complicated, it's really quite simple to implement, and only takes a couple of minutes.

Morningstar said:
Thank you, and let me know how it goes! I tried making the tutorial as idiot proof as possible, so while it may seem somewhat complicated, it's really quite simple to implement, and only takes a couple of minutes.
Click to expand...
Click to collapse
I'm just the idiot to see if you succeed.
Sent from my SM-N910P using XDA Free mobile app

.. Right after I did the mod, my wife left me.. But the mod worked great, so I'm calling it a win!!!!
Being lazy like I am, I group edited several .xmls to replace <Textview and did my mms in seconds.
Great work @Morningstar

kevinoliva113 said:
.. Right after I did the mod, my wife left me..
Click to expand...
Click to collapse
Sorry to hear that, but that's what the disclaimer is for lol. [emoji14]
kevinoliva113 said:
Being lazy like I am, I group edited several .xmls to replace <Textview and did my mms in seconds.
Great work @Morningstar
Click to expand...
Click to collapse
Looks great!
[emoji106]

How to add it to <textview in xml ?? last code missing here .. I need it
Sent from my GT-S6102 using Tapatalk 2

thotupala said:
How to add it to <textview in xml ?? last code missing here .. I need it
Sent from my GT-S6102 using Tapatalk 2
Click to expand...
Click to collapse
That's the weirdest thing.. I know for a fact that the rest of the instructions used to be in the OP, and it says I haven't edited it since January, but sure enough, the last bit is missing....Weird.
Anyway, I just updated the OP with the rest of it....

who can share the zip file from the tutorial?

Related

[Reg Edit] Right click ApkTool

First things first, credit and thanks to Brut.all for his awesome tool.
Now then, i couldn't find anything like this so i've created a very simple little reg edit to enable right click de-compiling on apks and right click builds on folders.
I've been using it for a couple of weeks with no problems and it's great for those quick .9 or xml edits.
DISCLAIMER:
This was made for the Windows XP operating system! .so im not sure if it will work on other Window OS, feel free to try but im not responsible for your computers well being so use at your own risk.
EDIT:After a little research it seems the registry tree is the same for "Vista" and "7" so it should work on them also
To use this you must have apktool working correctly.
Only works if your path variable is set to C:\sdk\tools\
If your Path variable is set differently you have 2 options:
1-let me know where and i'll attatch appropiate reg-edit.
2-Easy option, create a folder on your C:\ named "sdk", inside the sdk folder create another folder named "tools,
now copy the contents from your original tools folder into your newly created tools and add the path in enviromental variables. Simple.
RECOMMENDED:
It is highly recommended to backup your registry prior to installing, just follow the simple instructions included in the download zip.
To install:
Simply extract .reg file from the folder, double click and answer yes.That's it
Now your ready to become a de-compiling/building whirlwind.
Useage
-I simply right click an apk, "empty.apk" for example, choose decompile (you recieve a folder with the apk's name), navigate into the res\drawable* folder and drop in my .9.png's.
-Backout of folder, right click "empty" folder and choose build.
-The built images are in are located in "empty\build\apk\res\drawable*".
-The built apk is located in "empty\dist".
I've included an empty.apk for quick .9.png edits, this saves hunting through endless amounts of images for your newly created .9.
If the tool fails it could be something simple-
Problem: solution:
-Folder already exits -Delete or rename
-.9.png's not properley edited -Fix using draw 9 tool
-Required framework not installed -Open cmd and type "apktool if FILE LOCATION\framework-res.apk"
Remember this is a simple tool, for more advanced useage and logs use apk-manager
Final Note:
If Brut.all has any reason for me to remove this please let me know and it will disappear ASAP.
Thank you.
Link and Contents::
ApkTool_reg_edit.zip(contianing reg-edit)
reg_backup_restore.txt
empty.apk
>>>Windows Reg Edit<<<
The above reg edit removes the ability to create folders on Widows 7, use the file below insead!!
>>>Windows 7 Reg Edit<<<
If for some reason you lose the ability to create new folders here is a fix:
>>Here<<
Just extract and double click, it might say "cannot import all data", just ignore it, it will restore your create new folder option.
updated first post with attachments.
dully79 said:
updated first post with attachments.
Click to expand...
Click to collapse
Thank you very much! Gonna try this out
Sent from my HTC Vision using Tapatalk
crevis24 said:
Thank you very much! Gonna try this out
Click to expand...
Click to collapse
Your welcome
Let me know how you get on!.
99 downloads, who's going to make it 100?? Lol
Don't mind if I do!
Swyped from my infected synergized kingdom ported evo!
Haha, you win a prize of getting a thanks.
You have no idea how much I love those! When I get back to my computer I will give you one for this awesome little tool because I have never used apktool because of the command line. I always used apkmanager.
Swyped from my Infected Synergized Kingdom ported Evo!
As requested by fergie716:
Will apply to C:\android-sdk-windows\tools\
Any problems let me know and remember to backup.
dully79 said:
As requested by fergie716:
Will apply to C:\android-sdk-windows\tools\
Any problems let me know and remember to backup.
Click to expand...
Click to collapse
Thank you sir!
Sent from my PC36100 using Tapatalk
Fixed the link and updated info in OP.
Added new link for Windows 7 that shouldn't remove the ability to create folders. Tried and tested.

Themeing and CWM FLashable File

Hey guys/girls. I'm creating a theme for Andromeda 3 and one thing I cannot fifure out is how to make my theme CWM flashable to test it.
I opened the zip from a different flashable theme, replaced the framework-res.apk and twframework-res.apk with the modified ones from Andromeda and repackaged them using Winrar. I have followed the guides to resign the APK's and ZIP but no mater what I do, after a reboot I get a solid black screen and the phone vibrates.
Im not sure what I am doing wrong because I thought that was all that went into creating a CWM file.
Thanks in advance......
7 posts under this one
http://forum.xda-developers.com/showthread.php?t=1037842
the meta info is alot more specific than just swap any other files...
Thanks, I found that one about 5 mins ago but couldn't seem to find it when I searched the forum before posting. Must have missed it
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Actually, I'm just opening the apk's with winrar. I make the changes to the folders/files and rezip them with Winrar with Store mode (no compression?) Then I resign them with testsign.jar.
I have read the themeing guides but they are really lacking in the small details dept.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
Click to expand...
Click to collapse
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
Click to expand...
Click to collapse
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
modest_mandroid said:
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
Click to expand...
Click to collapse
He doesn't need to use apktool, because he isn't edited any code.
timbrendelaz said:
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
Click to expand...
Click to collapse
No, you don't have to sign CWM zips because Clockwork doesn't check for a signature.
You could use another updater-script, but the problem with that is if it tries to perform an action on a file or folder that isn't inside your zip it will crash while flashing. You'll be left with a bricked phone and have to ODIN back to restore.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
If you're editing code, I recommend using apk manager since it will automatically recompile the resources.asrc for you. Just make sure to downgrade the apktool that comes with it to 1.3.1, 1.3.2 is known to cause problems with xml edits.
1. Set new project apk.
2. Decompile apk, if it's a system apk use the option for dependency apk and use twframework-res.apk as the dependency apk.
3. Edit your xml files.
4. Recompile, when asked use yes twice. It will tell you to delete files in the Keep folder.
5. Delete the resources.asrc if you edited any xml/added new files. Delete the files that you added/edited.
6. Once you're done it will automatically copy over the signature and use the compression that you set (default level 9, I recommend level 0).
Don't worry that it says "unsignedFramework-res.apk", it will work since it's a system apk because system apk signatures get copied over to the new file. Just rename it to Framework-res.apk or whatever you need it to be called.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
Hence the 'if' in my original statement, you know, 'if' he ever chose to in the future.

[TUTORIAL] Speed up notification pullup and dropdown (SystemUI.apk) all devices :)

Tutorial about speeding up notification center drop down/pull up
1.First of all you need to get SystemUI.apk of yur actual rom
The ne im using is open root explorer and copy SystemUI.apk to your sdcard
2.Connect the phone to the computer and copy the SystemUI.apk to the extracted APKTOOL directory (download apktoolApktool.zip)
3.There is a guide on how to use apktool here :Guide apktool
4.Decompile SystemUI.apk
5.Navigate \SystemUI\res\values and open dimens.xml (use notepad ++)
6. Find self_expand_velocity, self collapse velocity. and change the values from the defalut +2000 per each.
7.You can change other values too, they are pretty much selfexplanatory.
8.After the necessary changes save the file and recompile systemui.apk
9.After recmpiling you can push it to system using ADB or i made a .zip to flash it in recovery.(Just put SystemUI.apk in system/app and you are ok) Just whatch out for the name as it should be exactly the ssame as it was before.
10.Flash the zip wipe cache/dalvik and enjoy your new fast dropdown and pullup
DONT FORGET THANX BUTTON
EDIT: It was pointed out that in newer versions of android (dip=dp) its the same thing so don't change it.
Mr.Nigma... said:
Tutorial about speeding up notification center drop down/pull up
1.First of all you need to get SystemUI.apk of yur actual rom
The ne im using is open root explorer and copy SystemUI.apk to your sdcard
2.Connect the phone to the computer and copy the SystemUI.apk to the extracted APKTOOL directory (download apktoolApktool.zip)
3.There is a guide on how to use apktool here :Guide apktool
4.Decompile SystemUI.apk
5.Navigate \SystemUI\res\values and open dimens.xml (use notepad ++)
6. Find self_expand_velocity, self collapse velocity. and change the values from the defalut +2000 per each.
7.You can change other values too, they are pretty much selfexplanatory.
8.After the necessary changes save the file and recompile systemui.apk
9.After recmpiling you can push it to system using ADB or i made a .zip to flash it in recovery.(Just put SystemUI.apk in system/app and you are ok) Just whatch out for the name as it should be exactly the ssame as it was before.
10.Flash the zip wipe cache/dalvik and enjoy your new fast dropdown and pullup
DONT FORGET THANX BUTTON
Click to expand...
Click to collapse
I decompiled systemui.apk but i can/t find \SystemUI\res\values
I have the same question. maybe your decompilation have some problems.
Sent from my lenovo A789 using xda app-developers app
Got it working... FINALLY
OK first of all thanks for this, makes a huge difference on the notification pullup and dropdown speed.
I couldn't apply the path with just the regular apktool, tried different revisions and none worked until I found apktoolsjb on this forum
http://forum.xda-developers.com/showthread.php?t=1809649
Thanks again
yonutz said:
I decompiled systemui.apk but i can/t find \SystemUI\res\values
Click to expand...
Click to collapse
it is in that folder for sure. have followed the guide step by step? maybe u havent decompiled just extracted the apk.
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
.field public static final self_collapse_velocity:I = 0x7f0c001c
.field public static final self_expand_velocity:I = 0x7f0c001b
Click to expand...
Click to collapse
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
matejdro said:
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
Click to expand...
Click to collapse
Looks more like a reference to resources to me.
matejdro said:
On Note 2 (and probably other Samsung devices) there is no layout.xml, but values are inside smali file (SystemUI\smali\com\android\systemui\R$layout.smali). However those are in hex format which I cannot decode.
Above value translates to 2131492892 as integer, which makes zero sense. Probably some kind of float value?
Click to expand...
Click to collapse
Try to check for that id (0x7f0c001c and/or 0x7f0c001b) in res/values/ids.xml. It could point to any value in any of the xml inside res/ folder.
No xml file contains those values (I ran search over whole folder). Only before mentioned R$layout.smali and com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Linux
Any way I con do this in Linux, ubuntu to be specific.
I figured it out, Ijust hope I can put back into .apk format.
Be careful:
"dp" was actually called "dip" in early versions of the SDK. They changed it to "dp" shortly after.
Click to expand...
Click to collapse
That screenshot isn't from a 4.1/4.2 rom - So anyone who wants to try this and has 4.2 (I'm having 4.2.2), change only the values. leave the "dp" as is, don't change it into "dip".
OP - you might as well write this down!
Great, some developer with Xposed skills to do that through an Xposed module .... (You know that would be great)
I used your MOD as an Add On for my ROM. I hope thats ok credit was given (see bottom of OP). Thanks for the Info..
http://forum.xda-developers.com/showpost.php?p=37148754&postcount=1
Thanks. I already hitted it.
Sent from my C6603 using xda app-developers app
Great tut, I would suggest turning off animations entierly in developers options for the best UI smoothness.
self_expand_velocity, self collapse velocity NOT FOUND
I dint find anything like that in \SystemUI\res\values\dimens.xml
Samsung galaxy ace GT-S5830i
I can't find a values folder in my SystemUI
riteshpanjwani said:
I dint find anything like that in \SystemUI\res\values\dimens.xml
Samsung galaxy ace GT-S5830i
Click to expand...
Click to collapse
As some people replied these values are in another file. But i'll look again and edit the op with SAMSUNG specific files
Hmmm
JDogg1329 said:
I can't find a values folder in my SystemUI
Click to expand...
Click to collapse
Check your ROM if it is odex, check /system/app/ if there is SystemUI.odex. You need to deodexed if first so you can edit. However you can also di it using baksmali you just need the SystemUI.odex.
I have this, dont have this what you say.What do now?.Custom ROM - CM7

[Guide:] The Definitive APK Modding and Theming Thread...

First of all, you don't actually need to be a "developer" as such to be able to theme and you don't need to know or have to learn lots of code either.
Secondly, EVERYTHING you need to know and need to use to modify an .apk is in this thread!
{
"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"
}
The greatest thing about Android is that you can change just about every element of the U.I and it’s really easy to do too. I wrote this guide to share the experience and knowledge I've gained since joining xda to debrand my SonyEricsson XPERIA X10i that was running Gingerbread. In 2017 there are a few different ways you can theme a ROM.
Apktool, which can decompile an .apk allowing you to modify your own .xmls and .9png images, which is what this thread will focus on.
RRO, Xposed essentially overlay themes or mods.
There is a variety of programs that use a GUI to do the work of Apktool for you, some good, some bad but at the end of the day they all ultimately do what you can easily do yourself in a faster, cleaner and more efficient manner in my opinion.
Overlaying doesn't cover every element so falls short of a one stop solution for being able to fully theme a ROM and is a bit more complex and/or restrictive in it's approach.
Tools you're going to need:
Java - Do this first if you don't have it installed already.
Apktool - The main tool for decompiling and recompiling apks.
Notepad++ - An essential program for xml editing!
Photoshop or Gimp - You'll need one of these for image editing.
7-Zip or WinRar - Required for working with apks.
We also need the ADB files from the SDK Platform and a sign.jar but to simplify this as much as possible I've made a zip for you to download which contains Apktool and everything else you need that you haven't got from the list above.
Download APKTool_2.2.4.zip to a location of your choice, preferably the C:\ drive which will give you a folder to work from. To keep the folder updated you can download the updated files from the retrospective thread/sites and simply replace them in the folder.​
This thread will cover the following in an easy to follow and straight forward manner that will have you theming your own apks in no time.
Getting apks from a ROM
Deodexing
.apk De-compiling
.apk Recompiling
.apk Signing
.apk Zipaligning
Pushing Files to your Phone
.9 images
Vector Drawable
.xmls
+More
Quick Tips;
.apk files can be browsed like .zip files so set your zip program as the default for handling apks which will makes things much easier.
If all you want to do is edit images then you don't need to decompile, you can just drag and drop images in to an apk to replace a stock image so long as they have the same file name.
Restoring files if you mess up is easier and quicker with a CWM.zip, especially if you're modifying framework apks! Just because an apk might build with no errors doesn't mean it won't give you any when installed to the Phone.
​
Getting apks from a ROM:
Once your Apktool folder is setup you need to get the apks you want to theme out of a ROM or off of your Phone and there are a couple of ways to do this.
1. The simplest method is to extract your phones whole system from an unofficial update file from xda, whatever format that may be in depends on your device. I extract the whole system with every new update before doing anything because it gives me a backup of stock files which I can also copy and deodex to be themed.
2. Use adb commands to pull files to your computer, to do that we need to open a command prompt window (hold the shift key then right click your mouse in the Apktool folder and select "open command window here").
The command to pull your whole system is...
Code:
[B]adb pull /system/ XC_206[/B]
...you can choose something other than XC_206 as your folder name but it will create that folder in your Apktool folder. Alternatively, you can just download individual folders and the commands to do that are…
Code:
[B]adb pull /system/app/ XC_206 app
adb pull /system/priv-app/ XC_206 priv-app
adb pull /system/framework/ XC_206 framework[/B]
...or to pull individual files...
Code:
[B]adb pull /system/framework/framework-res.apk[/B]
3. Use a root explorer on your phone to copy files to your SD and then to your PC.​
Depending on your method you should now have a ApkTool_2.2.4 folder with another folder named 206_system for example in it. The only folders we need at this point are app, priv-app and framework which we need for the next step.
Deodexing:
“Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.” – What Is Odex And Deodex In Android​The tool I use is this - [Tool/Utility] JoelDroid Lollipop Batch Deodexer. To save a lot of time I only deodex the apps I'm going to use because it removes the process of having to mess about with smali and baksmali, plus YOU DON'T NEED TO DEODEX YOUR WHOLE FW!, depending on the apk and/or the mod you want to make you don't even need to deodex.
So now you should have a folder named system full of deodexed apks that are ready for playing with.
Decompiling:
Decompiling is the process of deconstructing an apk which gives us workable source code so to speak and we need to do this to be able to edit xmls in Notepad++ or .9 images in an image editor. As said above if you don't want or need to decompile because you just want to change an image here or there you can just drag and drop your res folder out of the apk, find the image I wanted to replace or modify, drag and drop it back in to the apk and push it back to your phone.
Before proceeding you need to install your framework-res.apk and depending on your FW possibly another apk if there is one in the framework folder, which will put one (or two) apks at C:\Users\your-pc-name\AppData\Local\apktool\framework The two commands to install your apks are...
Code:
[b]apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk[/b]
The command for decompiling always begins the same, apktool d then simply change it for the name of the next apk you want to modify. To decompile the framework-res.apk the command is...
Code:
[B][U]apktool[/U] [U]d[/U][/B] framework-res.apk
...this will create a folder named framework-res and it’s at this stage that you can now begin to modify .9 images and xmls to create the desired look or mod you’re after. In this folder you'll find a couple of folders but the one we want is the res folder. First glance of a decompiled res folder can be overwhelming, 1541 folders in my framework but we only need to focus on a handful and it's generally the same in every apk...
drawable
drawable-xhdpi-v4 (depending on your device)
layout
values
​...you may need to delve into others sometimes but it's very rare that I've had to.
Quick Tip;
Once you've entered a few commands so long as you leave the cmd window open you can quickly scroll back through them using your arrow keys.
Recompiling:
Once you've finished making your mods you need to recompile your apk using the following command...
Code:
[B][U]apktool[/U] [U]b[/U][/B] framework-res
...notice you only use the folder name here. If you get any errors here due to a bad edit apktool will usually tell you, in a roundabout way, you just need to read the code it throws up then retrace your steps, correct any bad edit and try again. If all goes smoothly you'll now have a new folder called dist, which contains your newly modified apk, but you can't use that just yet.
Signing:
To sign stock system .apks we need to extract from the original apk the Android.Manifest.xml and META-INF folder, into the dist folder, then from the new apk extract the resources.arsc also into the dist folder, then drag and drop all three files back into the new apk, but NOTE, it's important that you choose store as the compression method, any other will break the apk, and if you replace a broken framework-res.apk you will BOOTLOOP!. And signing is as simple as that.
For 3rd party apps you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] Chrome.apk ChromeS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called ChromeS.apk, just remember to rename it back to the original before using it on your Phone.
[TOOL] pySignare - Quickly Sign APKs [Windows]​
Signing For The Play Store
If you plan on Publishing a Theme or any other app/apk to the Play Store then using the above method to sign your apks just wont work because you need to give it an individual signature that is unique to you, thankfully @AndroidGraphix has written a great guide that will show you how, it's a bit more fidgety than the above method but simple enough to follow...
AndroidGraphix said:
What you'll need to sign an APK.
Click to expand...
Click to collapse
- Noobs guide to signing an APK with a Private Key​
Zipaligning:
DISADVANTAGES OF UNALIGNED APKs; Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain. - SOURCE​Move your new signed apk into your APKTool folder, you can overwrite your original if you want, and use the following command...
Code:
[B][U]zipalign -f -v 4[/U][/B] framework-res.apk ZAframework-res.apk
...notice the ZA, zipaligning creates a new apk which has to be named different from the original, but use what you want, it'll need renaming back to the original again before you use it.
Pushing Files to your Phone:
So now we need to transfer your apk back to your Phone, you can do it by copying to your SD, then to your system, change permissions, then copy to the right folder, but that's not only time consuming but highly tedious too, so a simpler method is to use adb using the push command as this allows us to push to the SD Card then install it to the system overwriting the original with the correct permissions too. If you do this with the framework-res or SystemUI apks you will need to reboot but generally all other apps will just refresh with the changes applied. The command to push to the SD Card is...
Code:
[b]adb push SystemUI.apk /sdcard/SystemUI.apk
[/b]​...then we need to mount the system before we can install our modified apk and the commands for that are...
Code:
[b]adb shell
[/b]​
Code:
[b]su
[/b]​The prefix will then change to the $ sign
Code:
[b]mount -o rw,remount /system
[/b]​...then to install your apk...
Code:
[b]dd if=/sdcard/SystemUI.apk of=/system/priv-app/SystemUI/SystemUI.apk
[/b]​If any of that fails you could try an unsecure kernel and/or Chainfires adbd Insecure app. Try the app first but if you still can't mount and push files read this thread - [HOW TO]Make your favorite kernel adbd insecure to run ADB as root on /system and try again.
.9 pngs:
I hope after reading this explanation you're not still left wondering what all the fuss is about as it really is quite simple. I'll use the following two images, btn_default_pressed_holo.9 & status_bar_close_off.9 to illustrate the basic point of the borders...
Decompiled .9pngs:
Recompiled .9pngs:
Those borders control which part of the image is stretched (Left & Top) and where on the image content will be displayed (Right & Bottom). We'll use Draw 9-patch which is for editing the borders of decompiled .9pngs and lets you see how the image, when stretched, will be displayed on the Phone. Notice that the borders are different sizes, well that's because I only want/need a certain part of the image to stretch to get the desired look on the Phone.
...in the image below the left side shows the stretched image and desired effect should look on the Phone and the right side shows how it would look if I had edited the borders incorrectly or used none at all...
You can get away by not using a border but you would need to edit your image to specific dimensions to accommodate for the stretching, for example it might look fine for a simple OK button but it might not look right if you used the same .9png for a screen press which stretches the whole length of the screen, so you're better off just using them to begin with, plus you'll more than likely get errors down the line while decompiling or recompiling your apk.
The use of the border is made even more clear when you add text to an image. For my status_bar_close_off.9 I've filled all four sides of the image (except for an empty pixel in all four corners as that is the max amount of border you can use) as I need it to stretch the image just how I've edited it...
...but if I used the same sized left side border as the btn_default_pressed_holo.9 then this is how it would look on the Phone...
...which is obviously not the look I'm trying to achieve, as the left side border is causing the image to stretch incorrectly.
So that's basically it, depending on the image you're editing you can usually leave the borders alone but if you create one from scratch then you might need to play about with them if your images doesn't look quite right when used on the Phone. Here's a few links that will assist you further, especially the batch editing...
How to edit .9.pngs
[TUTO] Create your 9.png !
[UTILITY][TOOL] 9patchPngSuite [Windows&Linux]
How to draw NinePatch images with Photoshop - .9.PNG
[TOOL][Multi-Platform][.9.png][ALL DPIs] Android Resizer Tool
[Tutorial][Commentary] How To Batch Edit .9PNG/PNG Images
9compiler - batch process for themers android
Vector Drawable:
A VectorDrawable is a vector graphic defined in an XML file as a set of points, lines, and curves along with its associated color information. The major advantage of using a vector drawable is image scalability. It can be scaled without loss of display quality, which means the same file is resized for different screen densities without loss of image quality. This results in smaller APK files and less developer maintenance. You can also use vector images for animation by using multiple XML files instead of multiple images for each display resolution.​- developer.android.com/guide/topics/graphics/vector-drawable-resources
Vector drawables obviously serve a purpose but are a pita imo for themers as they are a lot more difficult to edit and achieve the look you want.
Using my power menu to illustrate the issue, Power off, Restart and Take screenshot icons are vector drawables but the Record screen icon is a png...
...as you can see the Record screen icon is significantly bigger and ruins the look of my power menu, to over come this I have two options.
1. Learn how to edit vector drawables and create a new icon.
2. Replace the vector drawables and use pngs.
The latter to me is preferable because I already have images that I've been using for the last few years and want to continue using, to do so I need to replace the code in the relevant xmls to point at images...
framework-res/drawable/ic_lock_power_off.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:tint="?colorControlNormal" android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ff000000" android:pathData="M13.0,3.0l-2.0,0.0l0.0,10.0l2.0,0.0L13.0,3.0zm4.83,2.17l-1.42,1.42C17.99,7.86 19.0,9.81 19.0,12.0c0.0,3.87 -3.13,7.0 -7.0,7.0s-7.0,-3.13 -7.0,-7.0c0.0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3.0,9.26 3.0,12.0c0.0,4.97 4.03,9.0 9.0,9.0s9.0,-4.03 9.0,-9.0c0.0,-2.74 -1.23,-5.18 -3.17,-6.83z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/ic_lock_power_off_alpha"
xmlns:android="http://schemas.android.com/apk/res/android" />
framework-res/drawable/ic_restart.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:tint="?colorControlNormal" android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ff000000" android:pathData="M12.0,4.0L12.0,1.0L8.0,5.0l4.0,4.0L12.0,6.0c3.9,0.0 7.0,3.1 7.0,7.0c0.0,3.9 -3.1,7.0 -7.0,7.0l0.0,2.0c5.0,0.0 9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0z" />
<path android:fillColor="#ff000000" android:pathData="M5.0,12.9C5.0,11.0 5.8,9.2 7.2,7.9L5.8,6.4C4.0,8.1 3.0,10.5 3.0,12.9c0.0,4.0 2.7,7.6 6.5,8.7l0.5,-1.9C7.1,18.8 5.0,16.1 5.0,12.9z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/ic_lock_restart"
xmlns:android="http://schemas.android.com/apk/res/android" />
framework-res/drawable/ic_semc_ic_dialog_screenshot.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#8a000000" android:pathData="M5,5l4,0l0,-2l-4,0l-2,0l0,2l0,4l2,0l0,-4z" />
<path android:fillColor="#8a000000" android:pathData="M19,3l-4,0l0,2l4,0l0,4l2,0l0,-4l0,-2l-2,0z" />
<path android:fillColor="#8a000000" android:pathData="M5,15l-2,0l0,4l0,2l2,0l4,0l0,-2l-4,0l0,-4z" />
<path android:fillColor="#8a000000" android:pathData="M19,19l-4,0l0,2l4,0l2,0l0,-2l0,-4l-2,0l0,4z" />
<path android:fillColor="#8a000000" android:pathData="M16,13l0,-2l-3,0l0,-3l-2,0l0,3l-3,0l0,2l3,0l0,3l2,0l0,-3l3,0z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/semc_ic_dialog_screenshot"
xmlns:android="http://schemas.android.com/apk/res/android" />
...and the result as you can see here provides a much more unified look...
...and finally my desired end result...
.xmls:
Modifying .xmls is easy and pretty simply to understand, a massive clue in finding the ones you need to edit is the file names. You're not going to find a better guide than the one by Ticklefish so I'll just post a snippet here and you can head over and give the main thread a read and and a thanks.
Ticklefish said:
XML 101 - XML Modding Made Easy!
If you're modding Android, eventually you're going to have to edit some XML.
Want to center the clock in your statusbar? Rearrange the icons in your navbar? Change the layout of your notification screen? Get rid of a carrier label? Change the colour of some text?
Then you need to edit some XML files.
And you might not have any idea how...
Well, don't worry. The purpose of this thread is to show you just easy XML-editing can be. Once you've read it, you'll be one step closer to being an XML expert!
This guide is meant for noobs, experienced modders and everyone in between. Hopefully everybody can learn something..
Here's what this thread has to offer so far:
- Introduction (This Post)
- How To Delete A Line (Yes, Really)
- Some Useful Codes To Know
- How To Change The Colour Of The Status Bar Clock
- How To Put An Invisible Softkey In The Status Bar
- How To Center The Clock In The Status Bar...Part 1
- How To Center The Clock In The Status Bar...Part 2
- Centering The Clock In Xperia KitKat
- android:layout_gravity, android:gravity AND android:layout_weight
- Do NOT Edit "public.xml"!!​I also encourage others to post guides as well:
- How To Remove "am/pm" From The Clock On Pre-4.2 Roms (by @KronicSkillz)
- How To Swap The Notification And Status Bar Icons (by @Anmol0022)
- How To Hide A Centered Status Bar Clock When A Lollipop Device Is Locked (by @S0bes)​
Click to expand...
Click to collapse
Use Linux or a Mac? See the following threads for more information on using apktool on other Operating Systems...
[WIN/LINUX][Decompile/Compile] Quick Mod Tool 4.0 [decompile and compile with speed]
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
​
The following programs are some of the better programs you can use to automate Apktool for you...
@Diamondbacks - Virtuous Ten Studio
@Ticklefishs - Tickle My Android
@BDFreaks - Advanced ApkTool
@mDroidds - StudioAndroid # Automize everything!
...there are many others but these are a couple of what I've tried, still use or are popular on xda.
Quick Tip; Use VTS to edit certain xmls because it gives you a preview of any hex colour code and has a built in editor too which makes finding and changing colours a breeze.
And that's pretty much it, the only way you're really going to learn is by reading then putting into practice what you've read and picking stuff up along the way. I've posted a few links to different tutorials in the next post that you can use as a reference to theme your own phone, while the versions of Android change the methods and code are pretty consistent but you will have to adapt from time to time, but that's how you learn, refine your skills and become able to pass on your knowledge back to the xda community in the form of guides themes and mods.​
Notable credits and thanks to @iBotPeaches, @Brut.all, @jairomeo, @manup456, @armyranger251, @Stericson, @brandenk, @beagz
ClockworkMod Recovery:
ClockworkMod Recovery zips are used for flashing individual files to whole ROMS and can be a life saver if you push a badly edited apk to your Phone that results in a bootloop. There's also a few programs that can assist you with that too, but if all you're doing is replacing a few files all you really need is a template, then it's just a matter of creating the Phones folder setup in the zip which is simply creating folders: system\app - system\media\audio etc then dragging and dropping your files into it. A basic understanding of the updater script is essential, a ROM.zip will more than likely wipe your Phone whereas a Theme.zip may just replace files but it might delete some also.​
ERRORS encountered in CWM Recovery
[Tool]easy flasher v4 (ur own update.zip)
[Tool][Windows/Linux] Android Flashable Zip Creator
How to edit updater-script and make recovery flashable zips and updates
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
In the Apktool_2.4.4.zip is my CWM_backup.zip which is set up so you can add your own files to the framework and apps folders in the main system location, but you can easily add other folders to it if you want to add things like fonts, tones or anything else, just remember to add folders within folders if that's where the files you want to include are such as tones, media\audio\alarms for example. When adding files to your zip add them using Normal as the Compression Method and remember to remove any example files I've added otherwise they will be flashed to your phone too.
Links:
The following liks are what I've bookmarked over the years and posted them here for you to use as a reference, some of these may not apply for your device directly but that doesn't mean you can't learn from or adapt them to.
Locating hidden values, random dialogs and hardcodes
Theme Apps To Dark Theme | Theme Whole System | Newbies Here!
Theming 3rd Party Apps
Interactive Phone Modification
Theme Debugger - Test your themes
Rom Porter / System Extractor
9-Patch-Resizer
Android Drawable Resizer Tool
HOW TO THEME SystemUI.apk for TOTALLY newbie!
How to theme Lollipop and Marshmallow ROMs!
Theming Lollipop w/ Picture References
How to theme TW SystemUI
Where to find the colors for making a theme
Create Your Own Themed apk & Become a Themer
Power menu light><dark
Rom Logo In Settings/About
Theming Settings Heavily
Integrating/Adding applications to the settings menu
Quick Panel with Lidroid Toggles & Volume Sliders
Add Quickpanel Button In Statusbar To Switch Layouts
Increase QuickSettings Maximum number
How to add 0.00k/s meter on statusbar ICS/JB
How to add/ Change Clocks to Analog/ Digital with Seconds
Centre clock and icon switch. Update: bottom power control widget!
Xposed:
Advantages:
No need to modify any APKs. This means:
No need to decompile, change things in smali, compile, sign, ...
It will work for odexed and deodexed ROMs.
Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Many modules work for a wide range of ROMs from different vendors.
Multiple mods can be installed at the same time, even if they modify the same app. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
Click to expand...
Click to collapse
- Xposed
Porting XTheme themes
CM Theme to XThemeEngine Converter / Porter
Port CM Themes to Xtheme Engine in One Click!
List of APPs & MODs that use XPOSED Module
Xposed Framework/TabletUI (Noob-Friendly)
XThemeEngine beta5 - Theme engine for any rooted phone
ResXploit : Theming your android the easiest way! No decompiling APKs!
hello XperienceD,
first i want to say thank you, finally i can make some modifiaction of my rom, i am managed to get 3-wa-power on my stock rom, show full option in developer setting, change color and icon, etc (still far from my target though).
for now im trying to make my phone running holo dark themes (default is light), at first it looks fine, background change from light to dark, text black to white.
but now i found some color problem, can you help me locate color setting for this :
and for setting color, i want to change text color to holo_blue
for now, i am doing bruteforce, line per line, hope can fix this tonight, but if anyone know the where should i change the color setting, i am more than happy to accept it
thanks,
jacknb1ack
jacknb1ack said:
but now i found some color problem, can you help me locate color setting for this :
Click to expand...
Click to collapse
Check the links above "where to find colors" and "changing system text".
great, i think i've clicked all the link in ur post ... but looks like i've missde some link xD ...
thanks again.
jacknb1ack said:
great, i think i've clicked all the link in ur post ... but looks like i've missde some link xD
Click to expand...
Click to collapse
Did you find it in the end?
nice tutorial
XperienceD said:
Did you find it in the end?
Click to expand...
Click to collapse
yes .. thanks to you and all developers and themer here, i can finish my own customizing rom xD
and lately i've found that its need to resign all system apps to do better in what i want, and here is my last work xD
https://picasaweb.google.com/117267626749690688218/Halo2?authuser=0&feat=directlink
jacknb1ack said:
yes .. thanks to you and all developers and themer here, i can finish my own customizing rom xD
Click to expand...
Click to collapse
Nice 1.
jacknb1ack said:
https://picasaweb.google.com/117267626749690688218/Halo2?authuser=0&feat=directlink
Click to expand...
Click to collapse
Colourful.
Thread updated.
Awesome job on this man!
ssojyeti2 said:
Awesome job on this man!
Click to expand...
Click to collapse
Thank You, just trying to do my bit.
Can we get a linux version?
</end_troll>
thanks for the guide. really appreciated it. sharing knowledge is priceless.
im trying to re compile a APK which i have edited. but always it gives error. even if i de compile it and without touching anyting and try to re compile same result.
apk is a keyboard. i was trying to edit the layout. so is there any other way to do to modify 3rd party apks??
i do without any issue with systemui's framework etc
thanks again
EDIT - is that cos i have installed framework ????
Thank you for the post.
One thing that i have been trying to do is make a theme for "Floating Notifications" i was able to edit the apk and the xml files. everything works great on the phone and everything.
my issue is once if edited an app for theming how do i sign it so i can upload my theme to the playstore?
when i upload it to the dev console it says that my apk is not signed correctly or something like that.
can you please show me how to sign an apk after editing it for the playstore
thank you
That's exactly what i was looking for! Great post mate! Thank you!
Holy [email protected] dude this is monstrous! Thanks for your dedicated work!
Man I have seen tutorials but none as comprehensive as this. I mostly know all of whats here, but you have some invaluable links to all sorts of resources. This would have taken you a long time, I hope XDA members are appreciative!
Jarmezrocks said:
Holy [email protected] dude this is monstrous! Thanks for your dedicated work!
Man I have seen tutorials but none as comprehensive as this. I mostly know all of whats here, but you have some invaluable links to all sorts of resources. This would have taken you a long time, I hope XDA members are appreciative!
Click to expand...
Click to collapse
Thanks for your comments.
Sent from my C6603 using xda premium
Roladriz said:
Can we get a linux version?
Click to expand...
Click to collapse
These links should help...
XperienceD said:
Use Linux or a Mac?
See the following threads for more information on using apktool on other Operating Systems...
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
How to install and use Apktool with Ubuntu
Click to expand...
Click to collapse
Dilesh Perera said:
EDIT - is that cos i have installed framework ????
Click to expand...
Click to collapse
I don't think it will be, it is either a protected apk or from a brand of Phone that isn't that common would be my guess, but you'd need to list the error logs?
amadovi43 said:
can you please show me how to sign an apk after editing it for the playstore
Click to expand...
Click to collapse
This is the only link I have bookmarked in regards to this - Noobs guide to signing an APK with a Private Key which is the one I used for my IceGreen theme.

[Q] How to change Phone Defaults except build.prop?

I have installed a ROM.When i go to settings,it shows at the end 'Custom build by Rocky" This really sucks.
I tried to change it by build.prop but i couldn't do that as 'Custom build by Rocky';this text was even not present there. I searched a lot for this.Now can anyone tell me how to change this..I am sure this specific text is not present in build.prop,is there any other file to do that?
I've had my fair share in rom development a year or so ago. And I can tell you that the name there is just a way of marking the rom.
But if you're really bothered by it, I can tell you how to find the string, edit it or completely remove it. To find the string - Custom build by Rocky, you can't just change it in build.prop. For this, you must go into /system/app and then copy Settings.apk file to your desktop. From there, go ahead and decompile Settings.apk with a preferred decompiler. When decompiled, head into the project, and navigate to the following folder - res/values and open strings.xml with a text editor. Search for Custom build by Rocky in the text file, once found. You may change it to whatever you wish. But if you want to remove it, you have to remember the ID of the string. For example, in - example text - which is the string, the text to the right. The ID is text the ID is found in the left hand side, it's after the word name . So remember that, now go back to the res directory and scroll down to the xml folder, open it and look for about.xml. In there search for text which is the ID. And remove the line completely. Also make sure to remove the header line too. As this will stop the layout from having an invisible section.
Now compile the Settings.apk and push it to your device - adb push desktop/path/to/Settings.apk /system/app or just copy Settings.apk to device and do it from there.
I do not encourage you to do this. And you can do this at your own risk. I will not take any responsibility if you mess up your phone.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
I've had my fair share in rom development a year or so ago. And I can tell you that the name there is just a way of marking the rom.
But if you're really bothered by it, I can tell you how to find the string, edit it or completely remove it. To find the string - Custom build by Rocky, you can't just change it in build.prop. For this, you must go into /system/app and then copy Settings.apk file to your desktop. From there, go ahead and decompile Settings.apk with a preferred decompiler. When decompiled, head into the project, and navigate to the following folder - res/values and open strings.xml with a text editor. Search for Custom build by Rocky in the text file, once found. You may change it to whatever you wish. But if you want to remove it, you have to remember the ID of the string. For example, in - example text - which is the string, the text to the right. The ID is text the ID is found in the left hand side, it's after the word name . So remember that, now go back to the res directory and scroll down to the xml folder, open it and look for about.xml. In there search for text which is the ID. And remove the line completely. Also make sure to remove the header line too. As this will stop the layout from having an invisible section.
Now compile the Settings.apk and push it to your device - adb push desktop/path/to/Settings.apk /system/app or just copy Settings.apk to device and do it from there.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Can u suggest me some apk decompilers?
Try "APKTool" just search for it on the search part of this site, it should come up.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
Try "APKTool" just search for it on the search part of this site, it should come up.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Hey bro! This method worked..
But,now i am in a more big problem.
By the way that test was 'Custom build by Jatin' not Rocky.
The new settings.apk which i recompiled after editing that line successfully was not directly installing on my phone.
So,i replaced that new apk with the settings.apk in my ROM which contains 'Custom Build by Jatin' text..
Now,when i installed that ROM again,everthing went right ..but when i cheked the apps ...My settings option was no more..It was not installed during the ROM installation..I manually also tried to install that but nothing was achieved!
Now ,how to fix this? Hey bro,I am also attaching that settings.apk ,see if you can edit that line yourself and then again attach here for my use.Its line 176 in res/strings ,,just replace that line from 'Custom Build' only...
Please help me bro.
This happens sometimes. Its best to push the .apk to your device rather than moving it
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
This happens sometimes. Its best to push the .apk to your device rather than moving it
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Now,the settings.apk is crashing..Bro,there is somewhere error between the app..I have attached that apk in this forum before..Can't u yourself rename that line and attach here..Please bro
Problem fixed
The unsigned settings.apk worked now....
Sorry, I just saw your post. Oh and I'm glad it works now. With system apps, you mustn't sign them. They don't work properly.
Sent from my Nexus 5 using Tapatalk

Categories

Resources