[Q]how to add lines to xml - Android

in order to get a mod to work in my theme i need to add a couple strings to my public.xml thats found in my framework-res.apk. i used ultracompare to compare 2 different xml files and i know what needs to be added to my xml file. i use notepad ++ to edit values but never added strings.
1. can i use notepad++ to add the strings to my public.xml?
2. does it matter what line they end up on?

I use Open XML Editor, but I am sure you can use whatever works best for you. Notepad would hurt my brain though.
As far as the Public.XML, I don't think you can just remove and add lines to it...
The way it was explained to me was that any extra or new pngs added to a theme will be added into the Public.xml by way of "aapt". So there is no need to add. As far as removing items... well the entries are all coded a specific way so if you remove line 100... then everything from 101 to the end will be off by 1 and cause a lot of problems. An example...
<public type="attr" name="exported" id="0x01010010" />
<public type="attr" name="process" id="0x01010011" />
<public type="attr" name="taskAffinity" id="0x01010012" />
<public type="attr" name="multiprocess" id="0x01010013" />
<public type="attr" name="finishOnTaskLaunch" id="0x01010014" />
So as you can see the id used increases and then is associated with a specific item from within your apk. So as far as I know the best way to modify something (like a theme or etc) is to work with a Public.XML that has less in it so you can add to it... or just keep all those items in there (pngs, etc) and just make them a 1x1 image. Not the best way... but from what I have seen it has been done by many a theme maker and ROM builder.
Hope that answers your question.
** edit **
I just realized that I may had confused you (not knowing your knowledge level) so... The items are added to the Public.XML when you build the APK back together after editing it. This can be done with the apktool, which uses the aapt to do it's job. At least that is how it has all been explained to me so far. I also need to modify a Public.XML for my framework-res.apk and ran into problems here.

You don't need to worry about adding pngs to the public.xml. just put the pngs in place in the decompiled apk along with the xml that's using the pngs. You can't add pngs that aren't being used, which is the only requirement.
Run 'apktool b' to rebuild the apk and the pngs should be added to the public.xml. that data will be in the resources.arsc file in the new apk if you had no errors. Copy that to your original apk and you're set.
You can decompile your recompiled apk if you want to see the newly added entries to the public xml. But that's just for fun.
Note; I found in the framework 21 for backflip that there was no more room for draw9.png images, just regular pngs.
Also, if you copy any1 else draw9.pngs from their apk make sure you copy the png from an unzipped apk and not a decompiled apk. Decompiles adds the 1 pixel ring around the image that wont go away unless recompiled. And you can't replace draw9 images to recompile or apktool will try to add it as a new draw9.png to public xml and error out. Just insert to your original apk.
That should cover all bases.

Im sorry, the second post threw me off. You said strings specifically. I would think the rule should apply the same. Use the string in an xml and the string is declared in another xml in the values folder, I think its strings xml. The compiled string resources will be in the resources.arsc file in the new apk.

djstaid said:
I use Open XML Editor, but I am sure you can use whatever works best for you. Notepad would hurt my brain though.
As far as the Public.XML, I don't think you can just remove and add lines to it...
The way it was explained to me was that any extra or new pngs added to a theme will be added into the Public.xml by way of "aapt". So there is no need to add. As far as removing items... well the entries are all coded a specific way so if you remove line 100... then everything from 101 to the end will be off by 1 and cause a lot of problems. An example...
<public type="attr" name="exported" id="0x01010010" />
<public type="attr" name="process" id="0x01010011" />
<public type="attr" name="taskAffinity" id="0x01010012" />
<public type="attr" name="multiprocess" id="0x01010013" />
<public type="attr" name="finishOnTaskLaunch" id="0x01010014" />
So as you can see the id used increases and then is associated with a specific item from within your apk. So as far as I know the best way to modify something (like a theme or etc) is to work with a Public.XML that has less in it so you can add to it... or just keep all those items in there (pngs, etc) and just make them a 1x1 image. Not the best way... but from what I have seen it has been done by many a theme maker and ROM builder.
Hope that answers your question.
** edit **
I just realized that I may had confused you (not knowing your knowledge level) so... The items are added to the Public.XML when you build the APK back together after editing it. This can be done with the apktool, which uses the aapt to do it's job. At least that is how it has all been explained to me so far. I also need to modify a Public.XML for my framework-res.apk and ran into problems here.
Click to expand...
Click to collapse
I am getting same problem as OP. You said that new PNGs or something are automatically added in public.xml right? But I am not able to see them. Actually, i added 5 more indeterminate progress bars and edited the animator xml for it too. The app compiled with apkmanager, but after decompiling the same, I don't see the new indeterminate PNGs declared in the public.xml.!! Plz. help me! I can't just flash and test immediately!! cause i don't have that phone!!

No they are not added automatically you have to add it yourself.
Only add or change lines don't remove.
For public.xml
Everything is grouped
Each group has an order
Drawable will be
0x7......00
0x7......01
................
0x7......ff
Remember they use letters also
You can add a new item
0x7.......g0
They have to be in order by resource type
String would start with ex...
0x6......00
Find the last string id that was used and add the next id.
Remember they are not always in order so actually use the text search to be sure.
Not sure if you already added the string to the strings.xml
That has to be done also.
For that open strings.xml
Copy the last line
Paste it to next line
Change string name (must match public.xml) and than value (what text is displayed)
Let me know if you need more help.
Sent from my PG86100 using Tapatalk

Here is a write up i was planning on doing for my site
decided to start it now.
Add resources to an android apk
Its just a start but should be able to do it with out problems

wes342 said:
Here is a write up i was planning on doing for my site
decided to start it now.
Add resources to an android apk
Its just a start but should be able to do it with out problems
Click to expand...
Click to collapse
Oh mahhnn!! Thanks a lot for that!! Now I don't need to depend on crappy tools for adding resources any more!!!
Once again, thanks a lot for that!!

So when i understand it right i made it like that.
I wanna add "ab_bottom_solid_dark_holo.9.png" to mms.apk.
I copy it to "drawable-xhdpi". I open "public.xml" and scroll to the end of "<public type="drawable" ". Last string is:
"<public type="drawable" name="stat_notify_sms_9" id="0x7f020254" />"
Click to expand...
Click to collapse
So i make a line under that and that would be that:
<public type="drawable" name="ab_bottom_solid_dark_holo" id="0x7f020255" />
Click to expand...
Click to collapse
In the whole xml is no other "7f020255". So that would be all? No other changes to do?

Basian Mile said:
So when i understand it right i made it like that.
I wanna add "ab_bottom_solid_dark_holo.9.png" to mms.apk.
I copy it to "drawable-xhdpi". I open "public.xml" and scroll to the end of "<public type="drawable" ". Last string is:
So i make a line under that and that would be that:
In the whole xml is no other "7f020255". So that would be all? No other changes to do?
Click to expand...
Click to collapse
Everytime I've added a drawable, or a string, to my apps, I've never had to put them into public.xml
All I do is compile and they're added automatically. The only time I need to touch public.xml is if I want to remove something.

That would be nice. iam on JellyBean on my Galaxy Nexus and use apktool cmd. And it just gave me errors.
What do u use to compile. Maybe its a nice Tool with more Functions.

Related

[Q] edit sms background

how to edit sms background..i use elelinux floyo 2.2..
you download handcent or GoSms XD
i dont like use handcent..how about edit framwork?do you know?
I think that you can't edit background just for sms...it will be global...that happened when I changed background picture in framework.res...
its in the framework-res.apk...
in the folders...
drawable-mdpi
drawable-land-mdpi
just search for the default background... and change that... and all the backgrounds will be change in your phone....
in the land-mdpi, is the same thing... just whit the landscape mode....
grettings...
i can't find default background in the folders
drawable-mdpi and
drawable-land-mdpi
for change background pic can use go sms pro
search for....
semc_bg.png
grettings....
but its more easy and cool if you use
handcent SMS
its verry customizable... colors, backgrounds... etc.
No. Use Go SMS pro. Better and much more simple than handcant
Sent from my X8 using Tapatalk
i use elelinux floyo 2.2 cannot found semc_bg.png
that file not exist
my friend said i must edit the .xml file to edit the background..anyone can edit .xml file?
within AndroidManifest.xml in MIUI and eclairs are the following string
Code:
<activity android:theme="@style/NameTheme" .................
and in string /res/values​​/sytels.xml
Code:
<style name="NameTheme" parent="@android:style/Theme">
<item name="android:windowBackground">@drawable/name_background</item>
</style>
background size 320x480
I've added the script, but still FC, ​​in the chat log there is a warning:
Binary XML file line # 4: You must supply a layout_height attribute
Binary XML file line # 4: You must supply a layout_weight attribute
sorry for bad language

Center Clock mod - Guide up / Flashable .Zip

Has anyone tried/managed to get the clock on the CM7.1 rom to display in centre
Iv followed instuction from here:
http://forum.xda-developers.com/showthread.php?t=1174202 By Taine0
And also from here
http://forum.xda-developers.com/showthread.php?t=1202866 By ZduneX25
But run into Error whilst decompiling the SystemUI.apk
Anyone had any luck with this, or advice/help
Iv added a Flash-able .zip which is at the bottom of this post,
This works on my CM7.1.0 - FXP041 so should work with yours.
Please do a back-up in case it messes things up.
If is does mess things up and you didnt back up, just reflash the CM7.1.0 - FXP041.Zip over the top you retain all data.
EDIT:
Ok im getting better at learning XML editing, its been a long night.
but iv been using this guide here with some good effects.
Still a few problems that i need to work out.
Big thanks to member: K Dotty for helping me out.
&
TheGrammarFreak - for guide below.
TheGrammarFreak said:
Hokay, I'll explain the way I make the edits.
I use APKTool to manage decompiling and rebuilding the apk, simply because I like it. I'm also on Linux and apkmanager doesn't work too well.
So I have apktool in my path, so I can be anywhere on my system and use it.
Code:
cd Android
mkdir StatusBarMOD
cd StatusBarMOD
Copy the SystemUI.apk there, then
Code:
apktool d SystemUI.apk
APK Tool does its thing, then I go to the status_bar.xml and open it up in gedit.
Editing status_bar.xml
Centre the clock
For the clock you need to find this line:
So CTRL+F, search for "clock" then select the whole line. Your text editor might break it into 2 lines, make sure you get the whole XML tag (between ").
Delete that, then copy this line to your clipboard:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="bold" android:textColor="#ff000000" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
If you're using an HDPI phone change this bit
Code:
android:paddingTop="2.0px"
to
Code:
android:paddingTop="3.0px"
and if you're using an LDPI phone change it to
Code:
android:paddingTop="1.0px"
If you're as cool as me, you'll have an MDPI phone, so you can leave it as it is.
So, line copied to clipboard you need to past it to just BELOW this line:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
Clock = centred.
Centre the date
Find this line (it's right at the bottom):
Now, for this MOD I won't give you a premade version, but I'll tell you what to change (that way we learn ).
To centre the clock you need to change the android:gravity property. At the moment it's set to "left|center". All you need to do is change it to "center". If you have a semi transparent status bar and you want to avoid it looking ugly you may also want to extend the date's background across the whole status bar. To do that you need to change the "android:layout_width" property. Instead of "wrap_content" it should say "fill_parent"
Date = centred
Flip the status bar icons around
Ok, so this one is a little weird. You need to change the alignment, the gravity and the order of 2 elements. Each XML tag has an ID, which we'll use to identify the bits we need to move. The ID can be found next to the property "android:id". The battery, signal and 3G icons are part of
Code:
android:id="@id/statusIcons"
So find the tag with that in it (CTRL+F is your friend) then select the whole tag. It's between the bit that says "" The whole thing will look something like this:
You need to cut it out (CTRL+X), and move it to just BELOW the LinearLayout with the ID
Code:
android:id="@id/icons"
So once moved, we need to change the alignment and the gravity. Near the end of the line you just moved it has this property:
Code:
android:layout_alignParentRight="true"
You need to change it to
Code:
android:layout_alignParentLeft="true"
You also need to change the android:gravity to
Code:
android:gravity="left"
Part one sorted.
To move the notifications over to the right you need to do this:
In the tag ID'd
Code:
android:id="@id/icons"
you need to change the alignment to right (alignParentLeft to alignParentRight) and change the gravity to "right"
Rebuilding the apk
Go back to your command line and issue this:
Code:
apktool b SystemUI
In the folder you decompiled in you will see a folder named SystemUI. Once you rebuild your apk using apktool you'll notice that 2 new folders are in that folder (the SystemUI one): build and dist. Go into the build folder, then apk --> res --> layout. Also, make a backup of your original SystemUI.apk, then open the original using 7zip, winrar or the archive manager on linux. DO NOT EXTRACT THE ARCHIVE, JUST OPEN IT! Now, within the archive, navigate to res --> layout. Go back to the folder you just opened, and drag the status_bar.xml found there into the archive window, overwriting the status_bar.xml already there. Close everything, then push the now modified SystemUI.apk to your phone using ADB and reboot. Job done!
I may edit this post after I publish it, to fix typos and the like.
Hope this helps y'all!
I might also add that, as an Englishman, spelling "centre" as "center" is a nightmare. Oh so often my compile fails because I spelt centre correctly.
Click to expand...
Click to collapse
Added a zip for people on CM7.1.0 - FXP041 to try out !!
It worked! Thanks for this!
Hi mate
Worked for me
Thanx
Sent from my LT15i using xda premium
but the font should be bold hours!
can u make the same for .283 also?
muzontnt said:
but the font should be bold hours!
Click to expand...
Click to collapse
Iv changed all system fonts on my phone, might be why it's not bold., can't remember.
Sent from my Arc to your eyes.
punkmonkey1984 said:
Added a zip for people on CM7.1.0 - FXP041 to try out !!
Click to expand...
Click to collapse
It's only a few days ago since you were asking how to change images, and now you've posted this.
Life's about learning, so i ask people for advice and work things out.
I really want to try getting in to coding then hopefully making roms like miui.
Sent from my Arc to your eyes.
punkmonkey1984 said:
changed all system fonts on my phone
Click to expand...
Click to collapse
: D but the date is displayed in bold
muzontnt said:
: D but the date is displayed in bold
Click to expand...
Click to collapse
Very true.
try this
Decompile your systemUI.apk
go to
SystemUI.apk\res\layout
Open status_bar.xml
Find
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
change to
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="bold" android:textStyle="bold" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
Re-compile
over write original systemUI.apk in /system/app
reboot.
should working, not tested.
Can I flash the zip file if I'm using CM7.1.0-Ba2tF-Olympus? If so, how do I do that? Can I just use ROM Manager?
Sorry. I just unlocked bootloader and installed CM7 a few days ago so I'm still getting used to all of this. Thanks for your patience!
Will this working on stock ROM?? 42 fw
Sent from my Anzu using xda premium
punkmonkey1984 said:
Has anyone tried/managed to get the clock on the CM7.1 rom to display in centre
Iv followed instuction from here:
http://forum.xda-developers.com/showthread.php?t=1174202 By Taine0
And also from here
http://forum.xda-developers.com/showthread.php?t=1202866 By ZduneX25
But run into Error whilst decompiling the SystemUI.apk
Anyone had any luck with this, or advice/help
Iv added a Flash-able .zip which is at the bottom of this post,
This works on my CM7.1.0 - FXP041 so should work with yours.
Please do a back-up in case it messes things up.
If is does mess things up and you didnt back up, just reflash the CM7.1.0 - FXP041.Zip over the top you retain all data.
EDIT:
Ok im getting better at learning XML editing, its been a long night.
but iv been using this guide here with some good effects.
Still a few problems that i need to work out.
Big thanks to member: K Dotty for helping me out.
&
TheGrammarFreak - for guide below.
Click to expand...
Click to collapse
how to center clock in lockscreen?

[RESOURCES] - Theming the TF201: tools, processes, locations, etc.

Ok, so we have a couple of threads in the Atrix Forums, that have helped us themers along, and with the custom Roms coming along for the Prime, I have started to see a need for this type of thread here.
The goal of this thread is to have a place for us to discus themeing questions, locations, problems, etc.; that way we are not cluttering up the individual theme or rom threads with questions or problems.
As we are unable to let successively recompile the stock Asus TF201 SystemUI.apk, this thread is primarily intended for custom roms like AOKP, CM9, etc.
If you are looking to theme your stock SyetemUI, you can simply copy the apk to your computer, open the .apk file with a zip program (like Winrar) pull out the following folder: /res/drawable-mdpi
Look through the folder, find .png files that you would like to replace, and then add your new .png files to the .apk (using Winrar or other) in the same location the original one is at. ---> Read the following rules first! <---
- Make sure to select "store" for the compression method, when replacing/adding the .png files.
- The new .png file you are using should roughly be the same dimensions as the original you are replacing.
- Leave .9.png files alone. .9.png files have to be decompiled/recompiled for them to work properly. Since, you can not successfully recompile the stock Asus systemui.apk, you can not replace .9.pngs!!!!
All that being said, lets move on to the Roms we can actually theme...
Below, I have quoted the OP from two Atrix threads that have always helped me.
*Note: These locations are for Gingerbread, however, there is some continuity between Gingerbread & ICS; although it seems a lot of the stuff that was in the framework-res for Gingerbread, it now in the systemui for ICS.
Also, if you change something in a xml file and it doesn't change, you may want to see if the same xml line is in the same file & folder in both the framework-res & systemui, and change both.
Things you should know before you get started:
- If you are replacing a 9.png or editing a xml, you will have to deompile your apk, edit, and then recompile it.
- Recompiling the camera.apk seems to break the camcorder function, and will result in a FC.
Besides the Post Below this one, here is another up-to-date guide on using APK Tools, specifically for ICS:
http://forum.xda-developers.com/showthread.php?t=1511752
Use this web page to get your custom Hex Colors:
http://www.colorpicker.com/
Main XDA General Theme Thread (get more exposure/help for your question):
http://forum.xda-developers.com/showthread.php?t=468254
***If you have any other helpful guides, webpages, etc. that you think will help us, post them, and I'll add them to the OP.***
(This quote is from: http://forum.xda-developers.com/showthread.php?t=1060199 and thanks should go to that OP).
jimbush3 said:
I know that there are a good number of Atrix users who are new to android, new to theming with android, or like me - both. It can take hours to find the right information to make the changes that you want to make, only to find out that those types of changes are phone specific and that guide that you finally found after hours of searching doesn't even apply. I ask that all Atrix themers contribute to this thread with their knowledge, processes, and best practices for theming the Atrix. This way, we can share knowledge amongst each other as well as set up some accurate guide for other Atrix themers just getting started.
Contents:
Post 1 of this thread:
apk Manager Guide
Framework Assistant - tool to push/pull framework-res.apk
Editing OR removing the status bar clock color in services.jar
Post 2 of this thread:
Setting the notification dropdown shade to transparent
I'll start off with a post that I made yesterday in response to someone's question about apk Manager.
1. apk Manager Atrix Guide
The file I am going to discuss here is /system/framework/framework-res.apk. This file contains most of the elements involved in theming your phone. There are many other smaller locations to edit, but this file contains the bulk.
Before we get started on using apk Manager, we should understand a few things about framework-res apk. This file consists of a few important elements:
regular png image files - these are standard png images and can be edited with your image editing program and saved without any problems.
draw-9 png image files - these are special types of png images denoted by a .9.png in the filename. The android system reads these filenames and recognizes the image as a stretchable image. The system knows how to stretch the image based on a 1px wide border that the image has. This border contains black dots/lines along each of the four edges that tell the system how to stretch it - if you mess with this border then the way the image stretches will changes and you may not be able to decompile/recompile the apk. The following link provides info on editing draw-9s, but I found it easiest to extract them with apk Manager, edit in gimp without touching the border, and then recompiling with apk M. More info on draw-9 pngs
xml files - these files are in binary code in the framework-res.apk. The apk needs to be decompiled in order to return these to human readable code. Also, many of your xml files are hidden within the resources.arsc file in the framework-res.apk and cannot be accessed unless you decompile.
In order to make any changes to the xml files or the draw-9 pngs within framework-res.apk you need to decompile it rather than extract it. Extracting the framework-res.apk with a program like winzip simply unzips the file and does not break the code back down to an editable format. Decompiling the framework-res.apk with a program like apk Manager will actually break down the resources.arsc file into the sepereate xmls folders (values, etc.) and also restore the instructions border to draw-9 pngs.
Draw-9 images not edited correctly will not stretch properly in the system and may cause decompilation/recompilation errors. XML files not edited correctly may also cause recompilation errors. It is very important to pay attention to the log.txt file for any errors that may be occurring during your decompilation/recompilation process.
Download apk Manager
Now here is what I've learned about apk Manager:
put framework-res.apk in the place-apk-here-for-modding folder
run the script
enter 22 to select an apk, then 1 to select your apk
press 9 to decompile the apk
go into the projects/framework-res.apk/res/drawable-hdpi folder and edit your pngs or xmls (maintain the border)
go back to the script once your done editing and enter 11 to compile
when asked if it is a system apk enter y
when asked if you want to extract other files too enter y Do not skip this step, apk Manager will seem to produce a working framework-res.apk if you skip this step but when I did it soft bricked my phone
go into the keep folder that was created and delete any pngs that you changed in the projects folder
if you change any xml files, you will also need to delete the resources.arsc file from the keep folder (this is because mane of the xml files are compiled into this resources.arsc, so to tell apk manager to rebuild it with the new xml, we need to delete the original)
go back to the script and press any key to continue
your recompiled framework-res will be in the place-apk-here-for-modding as unsigned-framework-res.apk
extract unsigned-framework-res.apk using winzip, or similar program (this is being it is compressed incorrectly)
go into the folder where you just unzipped the framework and zip it up with the compression mode set to Store - call it framework-res.apk
you are ready to go with a properly editing framework-res.apk, put it on your phone any way you like
Make sure that you have no errors when de-compiling or re-compiling. It might seem like everything is going ok, but you could end up soft bricking your phone if you don't check the log.txt in the apk Manager main folder. Check the log.txt after every decompile and recompile to ensure that you don't have a damaged framework-res.apk.
The output in log.txt should like like this for a proper decompile:
Code:
--------------------------------------------------------------------------
|Sun 05/01/2011 -- 20:11:47.57|
--------------------------------------------------------------------------
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
Could Not Find C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
And like this for a proper recompile:
Code:
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\images\Thumbs.db')
(skipping index file 'C:\Users\jbush\Documents\Custom Atrix\Programs\apk_manager_4.9\other\..\projects\framework-res.apk\assets\webkit\Thumbs.db')
The system cannot find the file specified.
If you get any errors about your images or xml then you need to fix them before you can recompile.
#framework-assistant2. Framework-res.apk Assistant
Here is a tool which I use regularly to pull the current framework-res.apk from my phone, as well as to push any updated framework-res.apk to my phone. To use this batch program you need to:
Download the View attachment 584667
Extract the zip to whereever you want the program to reside
To pull your current framework-res.apk - run the Framework-Assistant.bat and tell it to pull
To push an updated framework-res.apk - place the updated framework-res.apk in the bin/push folder, run the Framework-Assistant.bat and tell it to push the updated framework-res.apk
It is always a good idea to tell it to back up the current before pushing a new
As with any and all framework-res.apk pushes, this has the ability to soft brick your phone depending on the framework-res.apk you push, or anything else for that matter. Use at your own risk.
Here are my steps to edit framework-res.apk from start to finish which might help those unfamiliar with the process:
Run Framework-Assistant.bat and answer y to pull the current framework-res.apk from the phone, but n to push the latest version (this will simply retrieve the current framework-res.apk from your phone)
Copy that framework-res.apk from the Framework Assistant/bin/pull fodler into the place-apk-here-for-modding folder of apk Manager
rename framework-res.apk to something distinguishable, I add the current time (ex: framework-res-1016.apk). Trust me, things can get messy if you end up making a few passes with different edits, you need to keep your stuff straight.
Run Script.bat in the apk Manager folder, 22 to select which apk to use, then 9 to decompile
Go into the projects/framework-res-1016.apk folder and make any changes you wish. Most png changes will be in drawable-hdpi, xmls are pimarily located in the values and layout folders.
Once I've finished making updates, run Script.bat again, 22 to select the proper apk, then compile with 11 - follow all compilation steps above all the way through zipping it as store.
Place the new framework-res.apk in the Framework Assistant/bin/push folder and run Framework-Assistant.bat
Choose y to both pull and push the framework-res.apk (I find its always a good idea to pull your latest working framework-res.apk from the phone before dropping a new one in)
If you anticipate more edits, go back to apk Manager and paste the new framework-res.apk in the place-apk-here-for-modding fodler of apk Manager and rename it with the current time attached (ex: framework-res-1023.apk)
Delete the unsignedframework-res-1016.apk and the unsignedframework-res.apk fodler (just to keep things clean)
You now have an edited framework-res.apk on your phone and are set to fix this little issues you missed on this pass, just run the apk Manager Script.bat again, enter 22 to access your latest framework-res.apk (framework-res-1023.apk) and repeat the process.
#framework-assistant3. Editing OR removing the status bar clock in services.jar
You will need:
Some zip program, I use winrar
JDK - Java Development Kit Get the JDK
baksmali to decompile and recompile the classes.dex file - View attachment 587999
Notepad++ free editor for code editing (I recommend this program for any/all code editing, apart from hex)
Here is how to change the status bar clock color:
Install the JDK
Extract baksmali to your computer
Retrieve services.jar from the /system/framework folder
Extract services.jar using your zip program (right click on the file and choose to extract)
One of the extracted files is classes.dex, copy it into the baksmali folder
Run decompile.bat in the baksmali folder - this will decompile classes.dex and place the contents in a new folder called classout
Navigate to classout\com\android\server\status
The next step involves changing clock color:
open StatusBarIcon.smali with Notepadd++ and find this entry
Code:
.line 61
const v6, -0x1
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
const v6, -0x1 identifies the color of the status bar clock. I changed this value to "const v6, -0xff000000 to set my clock to black. Essentially the last 6 digits of this entry will determine the color of the clock. Set the last six to any html color code (google it) to set your clock color. I have only tried black here as it is all I needed, so I can't personally guarantee that anything else will work.
The next step involves removing the clock:
open StatusBarPolicy.smali with Notepadd++ and find this entry
Code:
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
It should be under ".line 592", now add this line underneath the line just mentioned:
Code:
invoke-virtual {p2, v3, v6}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
Once your done editing, save the file
Navigate back to the baksmali folder and run recompile.bat - this will rename the original classes.dex file to orig-classes.dex, and the recompiled file is saved as classes.dex
Zip up the new classes.dex along with the META-INF folder that was extracted from services.jar as, you guessed it, services.jar Leave the compression setting on Normal
Put services.jar back in your system/framework folder
This is all that I know how to do with servies.jar right now, if anyone has some additional good info please post it to this thread and I will add it on.
Can't believe I forgot to thank all those who have contributed both directly and indirectly to my knowledge thus far: Nottach, NyugenHuu, KennethPenn, riral, tonecreationz, gera4eva, HFHimself, and many random threads I found on the wonderful xda forums.
Click to expand...
Click to collapse
(This quote is from: http://forum.xda-developers.com/newreply.php?do=newreply&p=16008460 and thanks should go to that OP).
*Again, these are from Gingerbread, but may be in the same xml/location as ICS (haven't checked them all yet).
Nottach said:
Editing the status bar.
Now that you can see what needs fixing in the status bar we will decompile your original (backup) systemui.apk and edit the xmls. I will assume you have apkmanager and know how to use it. There are other guides for that so I won't go to deep into it. Look here for a video tutorial on apkmanager.
1. Decompile systemui.apk
2. Make edits to XMLs.
These are the edits I make most often.
/res/layout/status_bar.xml -
Code:
<TextView android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="0" /> ///HIDES CARRIER TEXT
/res/layout/status_bar_expanded.xml -
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="?android:textAppearanceLarge" android:textColor="[color="Red"]#ffffffff[/color]" android:layout_gravity="center_vertical" android:id="@id/dateLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" /> [color="red"]///DATE TEXT COLOR[/color]
/res/values/drawable.xml -
Code:
<item type="drawable" name="shade_bgcolor">[color="Red"]#ff162939[/color]</item> [color="red"]///NOTIFICATION TITLE BACKGROUND (eg. Ongoing)[/color]
/res/values/style.xml -
Code:
<style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
<item name="android:textAppearance">?android:textAppearanceSmall</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///NOTIFICATION TITLE TEXT (eg. No Notifications)[/color]
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Once recompiled you will have unsignedSystemUI.apk in your place_here_for_modding folder. Open it in winRAR along with your previous version of SystemUI.apk from the first draft and drag the images from the first draft drawable-hdpi folder into the new unsignedSysemUI.apk's corresponding folder, overwriting the images there. Now rename unsignedSystemUI.apk to SystemUI.apk and overwrite your first draft version. This is your second draft SystemUI.apk and we will create a second draft framework-res.apk in the next step using these same steps.
Click to expand...
Click to collapse
Nottach said:
Editing the framework.
We will now decompile your original (backup) framework-res.apk and edit the xmls. Again using apkmanager.
1. Decompile systemui.apk
2. Make edits to XMLs.
These are the edits I make most often.
/res/drawable/progress_horizontal.xml -
Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff262223" android:endColor="#ff414042" android:angle="270.0" android:centerY="0.13" android:centerColor="#ff262223" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80[color="red"]547f8c[/color]" android:endColor="#a0[color="red"]87cce2[/color]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#80[color="red"]547f8c[/color]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff[color="red"]547f8c[/color]" android:endColor="#ff[color="red"]87cce2[/color]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#ff[color="Red"]547f8c[/color]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
</layer-list>
/res/values/styles.xml - text colors
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[color="red"]#ff555555[/color]</item> [color="red"]///POP UP MENU TEXT COLOR[/color]
</style>
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="textColor">[color="red"]#ff555555[/color]</item> [color="red"]///SECONDARY MENU TEXT COLOR[/color]
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
[color="red"]///DELETED LINE[/color]
</style>
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
<item name="textSize">14.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[color="Red">#ffffffff[/color]</item> [color="red"]///WINDOW TITLE TEXT (App Title Bar)[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.Title" parent="@style/TextAppearance.StatusBar">
<item name="textStyle">bold</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///STATUS BAR TITLE (May be same as SystemUI?)[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">16.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///FIRST LINE OF NOTIFICATION[/color]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar">
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///2ND LINE OF NOTIFICATION[/color]
</style>
Code:
<style name="Widget.Button" parent="@style/Widget">
<item name="textAppearance">?textAppearanceSmallInverse</item>
<item name="textColor">[color="red"]#ffffffff[/color]</item> [color="red"]///BUTTON TEXT COLOR[/color]
<item name="gravity">center</item>
<item name="background">@drawable/btn_default</item>
<item name="focusable">true</item>
<item name="clickable">true</item>
</style>
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Now following the same steps as we did for SystemUI we will overwrite the images in the new unsignedframework-res.apk with those from the first draft framework-res.apk. By dragging from one winRAR window to the other. Once you've done that rename the new apk and overwrite the first draft version. Create a new update zip, using "store" or "none" and flash it. You should now see the text edits you just made.
Click to expand...
Click to collapse
Nottach said:
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Click to expand...
Click to collapse
Reserved!!
Awesome. Thanks!
Great guides for the noobies Swiftks =) Also i think i might have a work around for the patch9 pngs, Ill msg you on GChat
great stuff, thanks for sharing mate.
Sent from my TF201

[DEV][MOD][HOW TO] Galaxy S4 Mods- TW Launcher, Framework, Contacts & More

Hey Galaxy S4 Community! Thought I would post some How-To guides on some features found in my roms and how to enable some features in your rom or on your phone.These would probably benefit rom developers the most, but hopefully they will help everyone to learn a bit! These mods are written for the Galaxy s4 on Android 4.2.2 but most will probably work on other Samsung Galaxy Devices as Samsungs has pretty similar software.
For these Mods you will need basic knowledge about the following tools and skills, i won't go over the processes.
notepad++
apktool
smali/baksmali
How to Enable Camera Shutter Sound Menu
Navigate to system/csc/feature.xml
Find this line:
Code:
<CscFeature_Camera_ShutterSoundMenu>false</CscFeature_Camera_ShutterSoundMenu>
Change false to true
Done!
How to Disable the Backup Assitant Popup in Contacts
Navigate to system/csc/feature.xml
Find this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_EnableBackupAssistance>true</CscFeature_Contact_EnableBackupAssistance>
Change True to false
Done!
Enable (Almost) Unlimited Contact Linking
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_SetLinkCountMaxAs>10</CscFeature_Contact_SetLinkCountMaxAs>
Change 10 value to whatever you want (like 100000 or whatever) that value is the number of linkable contacts
Done!
Enable (Almost) Unlimited Contact Name Length
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_LimitNameLength>1</CscFeature_Contact_LimitNameLength>
Change 1 value to whatever you want (like 100000 or whatever) that value is the max name length
Done!
How to Enable the Exit an Terminate Options in Browser
Navigate to system/csc/feature.xml
Add these lines to the <!-- WEB --> Section:
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
<CscFeature_Web_EnablePromptToExit>true</CscFeature_Web_EnablePromptToExit>
Done!
How to Enable Almost Unlimited Tabs in Browser
Navigate to system/csc/feature.xml
Add this line to the <!-- WEB --> Section:
Code:
<CscFeature_Web_EnableMaxTabs>10000</CscFeature_Web_EnableMaxTabs>
Done!
How to Enable Full Page Looping in launcher
Navigate to system/csc/feature.xml
Find this line :
Code:
<CscFeature_Launcher_DisablePageRotation>true</CscFeature_Launcher_DisablePageRotation>
Change True to false
Done!
How to Hide an App from the App Drawer
Decompile your apk you want to hide
Navigate to AndroidManifest.xml
Find this line:
Code:
<category android:name="android.intent.category.LAUNCHER" />
Change to:
Code:
<category android:name="android.intent.category.GADGET" />
Now recompile your app, and you have to do one other thing. Whenever editing the AndroidManifest you must resign your app or it will force close. You can use a program like APK-Multi Tool to do this if you want!
How to Enable Full 4 Way (360) Device Rotation
Decompile framework-res.apk with apktool
Navigate to res/values/bools.xml
Find:
Code:
<bool name="config_allowAllRotations">false</bool>
Change To:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Save, Compile and You're done
How to make your Rom/Phone Multilanguage
This will enabled about 20-30 extra languages to choose from in settings
Add in the lines so your file looks like this:
Navigae to system/csc/language.xml
Code:
<SamsungMobileLanguage>
<Country>USA</Country>
<CountryISO>en</CountryISO>
<SalesCode>VZW</SalesCode>
<LanguageSet>
<Display>
en_US;en_GB;en_AU;en_IE;en_NZ;en_ZA;ko_KR;de_AT;de_DE;de_CH;fr_FR;fr_CH;
bg_BG;cs_CZ;da_DK;el_GR;es_ES;et_EE;fi_FI;ga_IE;hr_HR;hu_HU;is_IS;it_IT;
lt_LT;lv_LV;mk_MK;nb_NO;nl_NL;nl_BE;pl_PL;pt_PT;ro_RO;sr_RS;sv_SE;tr_TR;
ca_ES;eu_ES;gl_ES;kk_KZ;ru_RU; sk_SK; sl_SI; uk_UA;
az_AZ;hy_AM; ka_GE;
ja_JP;en_PH;in_ID;ms_MY;th_TH;vi_VN;
es_US;pt_BR;
en_CA;fr_CA;zh_CN;
</Display>
<Input>
<SupportList>
en_US;en_GB;az;ca;cs;da;de;et;es;eu;el;fr;gl;ka;hr;it;is;kk;lv;lt;hu;nb;nl;pl;pt;ru;ro;fi;sr;sk;sl;sv;tr;uk;ko;hy;bg;ja;in;ms;th;vi;zh_CN;
</SupportList>
<EnableList>
</EnableList>
</Input>
</LanguageSet>
</SamsungMobileLanguage>
And you're done
How to disable Signature Check
This will disable Signature checking on System Apps
Decompile Services.jar with smali/baksmali
Navigate to: /smali/com/android/server/pm/PackageManagerService.smali
Search For:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the whole method with this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "SBreen:"
const-string p1, "Skip signature check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
Save, Recompile and You're done!
How to disable Unplug from USB Turns on Screen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>
Save, Recompile and you're done
Permantly Disable Help Text on Lockscreen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_isHelpOverlayEnabled">true</bool>
Change to:
Code:
<bool name="config_isHelpOverlayEnabled">false</bool>
Save, Recompile and you're done
Change Low Battery Values
Decompile framework-res.apk
Navigate to res/values/integers.xml
Find:
Code:
<integer name="config_criticalBatteryWarningLevel">5</integer>
<integer name="config_lowBatteryWarningLevel">15</integer>
<integer name="config_lowBatteryCloseWarningLevel">20</integer>
Change To:
Code:
<integer name="config_criticalBatteryWarningLevel">1</integer>
<integer name="config_lowBatteryWarningLevel">5</integer>
<integer name="config_lowBatteryCloseWarningLevel">10</integer>
You can change these to whatever you want but this is what i have.
Save, Recompile and you're done
Add a Custom Help Text to the Lockscreen
Navigate to res/values/strings.xml
Find:
Code:
<string name="lockscreen_unlock_guide_text">Swipe Screen to Unlock.</string>
Change To:
Code:
<string name="lockscreen_unlock_guide_text">HYPERDRIVE</string>
You can change this text to have it say whatever you want on the lockscreen
Save, Recompile and you're done
Hit Thanks if you like these Guides!
Credits/Thanks
DSA
How to Hack Touchwiz Launcher for Insane Speed
This Will greatly increase the Speed of the page swiping and animations on the Stock Samsung Launcher
Decompile SecLauncher3.apk
Navigate to res/values-sw359dp-xxhdpi/integers.xml
Find
Code:
<integer name="page_snap_animation_duration">550</integer>
Change to:
Code:
<integer name="page_snap_animation_duration">320</integer>
The Value in the the integer here refers to the speed that the launcher animates at. The value above is what i use and is very good in my opinion. Feel free to decide what value you like best. You have to be careful not to go to low as it will get very jerky and not smooth. Enjoy!
Save, Recompile and you're done. Enjoy the Super Snappy Launcher
Hopefully More mods to come!
This Post is for Science! Enjoy people
Thank you very much, :good:
sbreen94 said:
This Post is for Science! Enjoy people
Click to expand...
Click to collapse
All in ONE place
Thanx a Lot !!!
Love seeing great devs like sbreen94 sharing and educating devs and new devs alike
Awesome job.
Thanks
sbreen94 said:
Hopefully More mods to come!
Click to expand...
Click to collapse
Dude.......you rock. Pure and simple.
sbreen94 said:
Hey Galaxy S4 Community! Thought I would post some How-To guides on some features found in my roms and how to enable some features in your rom or on your phone.These would probably benefit rom developers the most, but hopefully they will help everyone to learn a bit!
For these Mods you will need basic knowledge about the following tools and skills, i won't go over the processes.
notepad++
apktool
smali/baksmali
How to Enable Camera Shutter Sound Menu
Navigate to system/csc/feature.xml
Find this line:
Code:
<CscFeature_Camera_ShutterSoundMenu>false</CscFeature_Camera_ShutterSoundMenu>
Change false to true
Done!
How to Disable the Backup Assitant Popup in Contacts
Navigate to system/csc/feature.xml
Find this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_EnableBackupAssistance>true</CscFeature_Contact_EnableBackupAssistance>
Change True to false
Done!
Enable (Almost) Unlimited Contact Linking
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_SetLinkCountMaxAs>10</CscFeature_Contact_SetLinkCountMaxAs>
Change 10 value to whatever you want (like 100000 or whatever) that value is the number of linkable contacts
Done!
Enable (Almost) Unlimited Contact Name Length
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_LimitNameLength>1</CscFeature_Contact_LimitNameLength>
Change 1 value to whatever you want (like 100000 or whatever) that value is the max name length
Done!
How to Enable the Exit an Terminate Options in Browser
Navigate to system/csc/feature.xml
Add these lines to the <!-- WEB --> Section:
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
<CscFeature_Web_EnablePromptToExit>true</CscFeature_Web_EnablePromptToExit>
Done!
How to Enable Almost Unlimited Tabs in Browser
Navigate to system/csc/feature.xml
Add this line to the <!-- WEB --> Section:
Code:
<CscFeature_Web_EnableMaxTabs>10000</CscFeature_Web_EnableMaxTabs>
Done!
How to Enable Full Page Looping in launcher
Navigate to system/csc/feature.xml
Find this line :
Code:
<CscFeature_Launcher_DisablePageRotation>true</CscFeature_Launcher_DisablePageRotation>
Change True to false
Done!
How to Hide an App from the App Drawer
Decompile your apk you want to hide
Navigate to AndroidManifest.xml
Find this line:
Code:
<category android:name="android.intent.category.LAUNCHER" />
Change to:
Code:
<category android:name="android.intent.category.GADGET" />
Now recompile your app, and you have to do one other thing. Whenever editing the AndroidManifest you must resign your app or it will force close. You can use a program like APK-Multi Tool to do this if you want!
How to Enable Full 360 Degree Rotation
Decompile framework-res.apk with apktool
Navigate to res/values/bools.xml
Find:
Code:
<bool name="config_allowAllRotations">false</bool>
Change To:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Save, Compile and You're done
How to make your Rom/Phone Multilanguage
This will enabled about 20-30 extra languages to choose from in settings
Add in the lines so your file looks like this:
Navigae to system/csc/language.xml
Code:
<SamsungMobileLanguage>
<Country>USA</Country>
<CountryISO>en</CountryISO>
<SalesCode>VZW</SalesCode>
<LanguageSet>
<Display>
en_US;en_GB;en_AU;en_IE;en_NZ;en_ZA;ko_KR;de_AT;de_DE;de_CH;fr_FR;fr_CH;
bg_BG;cs_CZ;da_DK;el_GR;es_ES;et_EE;fi_FI;ga_IE;hr_HR;hu_HU;is_IS;it_IT;
lt_LT;lv_LV;mk_MK;nb_NO;nl_NL;nl_BE;pl_PL;pt_PT;ro_RO;sr_RS;sv_SE;tr_TR;
ca_ES;eu_ES;gl_ES;kk_KZ;ru_RU; sk_SK; sl_SI; uk_UA;
az_AZ;hy_AM; ka_GE;
ja_JP;en_PH;in_ID;ms_MY;th_TH;vi_VN;
es_US;pt_BR;
en_CA;fr_CA;zh_CN;
</Display>
<Input>
<SupportList>
en_US;en_GB;az;ca;cs;da;de;et;es;eu;el;fr;gl;ka;hr;it;is;kk;lv;lt;hu;nb;nl;pl;pt;ru;ro;fi;sr;sk;sl;sv;tr;uk;ko;hy;bg;ja;in;ms;th;vi;zh_CN;
</SupportList>
<EnableList>
</EnableList>
</Input>
</LanguageSet>
</SamsungMobileLanguage>
And you're done
How to disable Signature Check
This will disable Signature checking on System Apps
Decompile Services.jar with smali/baksmali
Navigate to: /smali/com/android/server/pm/PackageManagerService.smali
Search For:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the whole method with this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "SBreen:"
const-string p1, "Skip signature check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
Save, Recompile and You're done!
How to disable Unplug from USB Turns on Screen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>
Save, Recompile and you're done
Credits/Thanks
DSA
Click to expand...
Click to collapse
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
upndwn4par said:
[/HIDE]
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
Click to expand...
Click to collapse
Great! Doesn't mean that i didn't figure them out myself or that others would find them. I posted this thread as something that up and coming s4 developers could find easily, use and know would work
Disabling signature checks is pretty foolish, and completely negates Android's security model
upndwn4par said:
[/HIDE]
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
Click to expand...
Click to collapse
Thanks man this is great
Awesome as usual. Request, anyway to mod an apk to break its market link to avoid updates showing up?? Thanks again
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Awesome as usual. Request, anyway to mod an apk to break its market link to avoid updates showing up?? Thanks again
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
Yes just resign it with a different signature and you wont get any updates
Awesome, thank you sir!
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Awesome, thank you sir!
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
You're welcome, thats what this thread is for!
I got one more question. Slightly off topic. Once an apk is decompiled and you have editied your xmls, do they have to be recompiled or can you use 7 zip to drop them into a copy of the original built apk? Similar to what you can do with png's. Drag an drop.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
I got one more question. Slightly off topic. Once an apk is decompiled and you have editied your xmls, do they have to be recompiled or can you use 7 zip to drop them into a copy of the original built apk? Similar to what you can do with png's. Drag an drop.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
It depends which xml you are talking about. Certain ones can and certain ones cant
sbreen94 said:
It depends which xml you are talking about. Certain ones can and certain ones cant
Click to expand...
Click to collapse
Styles/Colors.XML is the one I think. basically the xmls pertaining to changing color.
I'll probly just try it both ways.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Styles/Colors.XML is the one I think. basically the xmls pertaining to changing color.
I'll probly just try it both ways.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
You probably need to compile. theres only a few xmls you can do without compiling. The xml file at the bottom and the layout folder come to mind off hand. Anything in a values folder you have to compile

[Q] Theming .xml (<TextView/>)

Hello, I'm trying to mod this line, in order to change the text colour.
Code:
<TextView android:layout_gravity="center_horizontal" android:id="@id/due_date" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@android:style/TextAppearance.Material.Caption" />
Is it possible to override the text color of style="@android:style/TextAppearance.Material.Caption" to a custom one, without editing neither the framework-res.apk, nor styles.xml of the app itself? I have tried to add the needed line (android:textColor="#ffffffff") in a variety of positions, but I'm not sure if this is the problem. Can you help me?
NFS_FM said:
Hello, I'm trying to mod this line, in order to change the text colour.
Code:
<TextView android:layout_gravity="center_horizontal" android:id="@id/due_date" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@android:style/TextAppearance.Material.Caption" />
Is it possible to override the text color of style="@android:style/TextAppearance.Material.Caption" to a custom one, without editing neither the framework-res.apk, nor styles.xml of the app itself? I have tried to add the needed line (android:textColor="#ffffffff") in a variety of positions, but I'm not sure if this is the problem. Can you help me?
Click to expand...
Click to collapse
Is that a xml from layout folder or? if so post the full xml so I can see or just pm me I will help you
SICKMADE said:
Is that a xml from layout folder or? if so post the full xml so I can see or just pm me I will help you
Click to expand...
Click to collapse
The line is from an .xml from the layout folder. You may download the full .xml from here, and the lines I am interested in are 8, 12 and 13. Thank you.

Categories

Resources