TUTORIAL - modding lockscreen/framework-res.apk - LG Nitro HD

*I made this before any of these new roms came out and as such it was meant for and has been tested on only the stock Gingerbread rom that comes with the phone. I doubt it will be compatible with the new roms.*
In response to a request, I am posting a tutorial on how to make a couple lockscreen mods.
You may want to read my other tutorials first
Swapping Out PNGs
Editing XML
*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and I am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(
**Messing with the lockscreen/framework-res.apk**
Since modding, to me, is about personalization, I’m going to let you pick and choose whatever particular things you like and leave out the things you don’t like. You can get rid of the carrier, but keep everything else, or just get rid of the dots and emergency button, but keep the carrier cause you just love AT&T so much! Whatever tickles your fancy. Unfortunately, with that flexibility comes a teency bit more work =) So I can’t make a framework-res.apk that you can just put with all the mods for a couple reasons:
1.) I don’t know which mods you want
2.) Any other modifications you’ve made to framework-res.apk before will be wiped out if you install one that I upload
So this way, with a tiny bit more work, you can not only pick and choose what you want, but keep the old changes to framework-res.apk you already love so very much.
So without further adieu, here’s what I did to the lockscreen:
I like using the pattern lockscreen for just the touch of security, but I hate how it looks. To me, it's wildly unnecessarily cluttered. So here's what I've done, before and after =)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I don't like AT&T plastered on it, the divider line is too harsh, the dots are just completely unnecessary to me (I can estimate a third along each axis, thanks =)), and the emergency call button (albeit practical) is ugly, and I'm shallow. So I changed all of them. The dots will still appear, but only after you press them so you can see that beautiful wallpaper of yours while your phone is locked. This included 4 modifications:
1. Removed carrier (edited XML)
2. Lightened divider to almost invisible (I like just a touch of it =)) (edited PNG)
3. Removed dots (edited PNG)
4. Removed emergency call button (edited XML)
Don't worry. The emergency call button (along with the "forgot pattern" button) still returns after you've failed to enter the correct pattern multiple times:
So let’s get started!
**What you’ll need**
1.) Root explorer from the market with root permissions! (I DO NOT suggest an alternative file explorer ESPECIALLY since this mod requires messing with framework-res.apk, the easiest way to brick your phone! And I know other file explorers like ES file explorer will brick your phone if you try to mess with framework-res.apk in this way!)
2.) 7zip or some kind of zip manager for your computer
**What to do**
1.) Using root explorer with root permissions, COPY (don’t MOVE!) framework-res.apk from your phone (in \system\framework\framework-res.apk) to your sd card, and then to your computer. Keep a copy safe somewhere else as a backup in case you want to revert back to your original framework-res.apk!
Decide what mods you want! Here’s the list again:
1. Removed carrier (edited XML)
2. Lightened divider to almost invisible (I like just a touch of it =)) (edited PNG)
3. Removed dots (edited PNG)
4. Removed emergency call button (edited XML)
If you want the invisible dots or the lightened divider, download the attached “PNGS- lockscreen.zip” from the end of this thread.
If you want either the removed carrier or the removed emergency call button, download the ONE XML you want! (If you only want to remove the carrier, only download “XML- no carrier.zip.” If you only want to remove the emergency button, only download “XML- no emergency call button.zip.” If you want both, download “XML- no carrier AND no emergency call button.zip.” You can only use ONE XML. If you try to use more than one, they will just overwrite each other since they’re just different modifications of the same XML file!)
2.) Unzip whichever zips you downloaded onto your computer
3.) Right click on your framework-res.apk from your phone, 7zip-> open archive (do not extract!)
4.) Drag and drop all the unzipped PNGS you downloaded (if any) into \res\drawable-xhdpi in framework-res.apk. Let them overwrite the originals in that folder.
5.) Drag and drop the unzipped XML you downloaded into \res\layout in framework-res.apk, and let it overwrite the original.
6.) Move your newly modified framework-res.apk back onto your sd card
7.) Copy it to \system\
8.) Using root explorer, change permissions for framework-res.apk to owner: read AND write, group: read, others: read! This step is CRITICAL!
9.) Move it into \system\framework and let it overwrite the original framework-res.apk!
10.) Restart your phone!
Upon startup, you should see your new changes! You can also edit the PNGs however you like, if you want to change the dots to something else, or want a big blue divider or whatever. =)
All the XML edits I did were as explained in my editing XML tutorial, but if anyone wants more details or what values in particular I modified, I’d be happy to go through them!
If you need help using root explorer to change permissions, etc, I have more details in my other tutorials listed at the top of this entry.
If you have ANY questions or need more details, before you do anything, PLEASE check my other tutorials or just ask! =)

Worked perfectly! Thanks, it looks so much better than before imo!

Thanks!! Glad you like! I agree, I like using the lock pattern, but I definitely prefer a more minimalist look =)

I like your style. If you got any more mods, don't hesitate to share with the rest of us! Lol.

Can this be used with CM7? I've done things like this already, including taking out the carrier name manually, etc. I used this one xml that you gave and it hosed the phone. Just curious whether or not that xml file is different. Caused a pretty bootloop.

I'm pretty sure this is only for stock roms.

Sounds good. But can you give me a quick rundown on what you edited in terms of the xml file? I can prob go in and do it myself, but I'm unfamiliar with which lines you edited (were the lines for carrier completed deleted? --><TextView android:textAppearance="?textAppearanceMedium" android:ellipsize="marquee" android:gravity="bottom|right|center" android:id="@id/carrier" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="6.0dip" android:layout_marginRight="8.0dip" android:singleLine="true" android:layout_toRightOf="@id/time" android:layout_alignParentTop="true" android:layout_alignParentRight="true" />
^ That line simply removed or did you just remove "@id/carrier" <less the quotes>"
As well as the annoying emergency buttons (this will ensure my wife doesnt get a chance to save me and I can RIP ) - Was the line removed entirely or?
If I know these fine details I can probably wing this. I'll just have to keep my fingers crossed recompiling.
Thanks in advance (don't ya hate that)
ADG

Deleting lines usually made things crash and burn, so I just cheated and changed widths/sizes to 0
To remove carrier (lines 8 and 9), after:
android:id="@id/carrier", changed android:layout_height to "0.0dip"
android:id="@id/carrier_sub2", changed android:layout_height to "0.0dip"
To remove emergency buttons, in the section just above android:id="@id/emergencyCallAlone" (line 24) shown here:
<RelativeLayout android:id="@id/footerNormal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<Button android:textSize="18.0sp" android:textStyle="bold" android:id="@id/emergencyCallAlone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/ic_emergency" android:drawablePadding="8.0dip" android:layout_centerInParent="true" style="@style/Widget.Button.Transparent" />
</RelativeLayout>
Changed the first android:layout_height to "0.0dip"
Hope it helps. And no, I don't hate thanks of any kind. =) You'd be surprised how many just demand

I see (in the xml I downloaded):
android:layout_width="0.0dip" android:layout_height="fill_parent"
for the carrier line. (width, not height) Maybe I'm looking at the wrong file entirely. I apktool'd this xml out from the one I made by adding your xml to the apk.
However, our files differ QUITE alot, so this may be goofier than I imagined. For me, that is. 3 days ago I barely knew what Android was or had ever touched a smartphone. But I'm familiar enough with Linux so I'm comfortable with hosing things to the razors edge of brickdomland. No better way to learn than to tinker with this stuff.
Anyway, I suppose setting width or height to 0 would solve the problem either way, correct? If so, then I'll scan what you've zero'd out and try and find my counterpart. Some of the naming conventions differ a little, but not by much. Attached is my file where you can see the difference if you feel like taking a glance.

I also take it there's something to Relative vs. Linear as it applies to something like this. I'm not sure what the complete difference is, other than Linear is the basic layout Vert x Hor on the page.

I don't know what your lockscreen looks like, so I don't know how the carrier/clock and things are arranged, so I can't say for sure, but I would guess if you changed:
Line 5: after "android:id="@id/carrier"" android:layout_height from "wrap_content" to "0.0dip"
for no carrier
and
Line 21, android:layout_height from "fill_parent" to "0.0dip"
to get rid of emergency call button, that might do the trick...

<grin> I never noticed "page 2" on the bottom right of the web page. Anyyyyway...
My screen looks identical to yours, pretty much per pixel.
And I think I changed exactly what you described. I'm *about* to try it now.
I'm starting to wrap my head around all this, so I'll prob go bananaboats on my phone. And more than I should more than likely.
Testing in 10..9..8...
---------- Post added at 11:59 PM ---------- Previous post was at 11:39 PM ----------
Looks good so far, with exception of the gestures (connect-the-dot security) - Now I can't find where that's enabled. Heyzeus Kristo. Same OS/ROM I was using before and I didn't add anything, so I must be missing it somewhere or I don't know what it's called.
I think I'm on the right path though. Thanks a-million for your help. Truly appreciated. Now I've got to find more things I can change. For no other reason than I simply can.
Update: Found pattern locking. CM7 has its own version as well as Androids native. It was Androids that I was looking for. I'll get all this soon enough.
Update 2: Couple things for people with CM7 for the X2. Setting permissions in /system first, before moving .apk into /system/framework seems to be a must. Otherwise things go bananas. And in every language known to man.
Works perfect, with exception of releasing pattern lock. Little grey directional bars stick around on failed attempt and make screen look bit strange. So make sure (don't know if this was mentioned already, but if it was I apologize) to change the graphic for this (trying to locate it now.)
Update 763: I can't locate the graphic for the grey bar that links the pattern circles. If anyone knows, please feel free UNless it's some kind of java routine or css hoopla.

Yeah, I can't stress that enough. Setting permissions BEFORE replacing the original apk, but after putting into /system/ is absolutely essential! Trying to do it AFTER CAN brick your phone! Not just on the X2, but on the Nitro too! TRUST ME. IT CAN =)

Ya, I thought it was all over for me the first time. Fortunately I remembered the restore-a-thon function. But I did learn some Russian and a few other languages trying to decipher all the app quits in 27 different languages after blind copying the apk into Framework. Ah, happy days.

AAHH! I can't thank you enough for this one. My girlfriend got the phone and pocket dialed 911 8 times in one day. Needless to say the last time they were pretty pissed off. The removing of the emergency button saved her!!!
A couple of questions, I take it if I do a factory reset that the fix will remain in place, but if I were to install a custom rom it would then be removed?
Thanks again

Great! Glad it helped! To answer your questions, yes and yes. It will stay if you do a factory reset, but a custom rom will remove it. But even on a custom rom, it's a simple mod. The framework-res.apk I posted may not work for a custom rom, but if you decide to try one, if you send me the framework-res.apk of that rom, I can edit it really easily to get rid of the button and send you that version of it.
edit* Actually, now that I remember, the mod only requires that one XML edit, so it's actually very possible it will work fine with custom roms, but if you send me that keyguard_screen_unlock_portrait.xml from whatever custom rom you choose, I can always check and edit it really easily. OR, if you're feeling adventurous, you can decompile the XML (as described in my XML editing tutorial), and I can point out what edit you need to do to get rid of the button so you can do it for whatever rom or android phone you get in the future! =)

Okay thanks I forgot to mention, I just rooted on the phone, do you know what would happen if i left this and did a hard reset? Do you see that being a problem now that I have already modified the file? Or would everything go smooth?

I'm not sure what you mean. What would happen to your phone if after you used the mod to get rid of the emergency call button, you did a hard reset? I doubt it would have any effect besides resetting your phone. I think the emergency button would still be absent, but I'm not 110% sure. I can't imagine anything would go wrong, but try not to hold it against me if something bizarro happens (though again, I can't imagine it would...)

divider
No replace images... just edit de xml
go to
"@id/divider"
and define
android:layout_width="0.0dip"
android:layout_height="0.0dip"

adg100 said:
Update 763: I can't locate the graphic for the grey bar that links the pattern circles. If anyone knows, please feel free UNless it's some kind of java routine or css hoopla.
Click to expand...
Click to collapse
I found it!! =) It's in the smali com/android/internal/widget/LockPatternView.smali, .line 266 and .line 835, there are settings for color (in hexadecimal) and alpha/transparency (also hex). I thought I'd touch up my lock pattern lines =)
from
to invisible lines (alpha set to "0x0")

Related

Progress-circle style/color editing

Ok - so lots of searches have brought together a good amount of information regarding this, but I'm still having a bit of trouble - and would love some help from the people who seem to know how to customize this. This could also be a good reference for the future.
I would really like to be able to edit the colors of the various progress bars/circles around the Android. But I cannot seem to figure this out.
So, the files are in the framework-res.apk/res/drawable/ folder, and are apparently the following files:
progress_horizontal.xml
progress_large.xml
progress_medium.xml
progress_small.xml
progress_small_titlebar.xml
So, here is a sample of what is in progress_horizontal.xml:
Code:
<!--
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
−
<layer-list>
−
<item android:id="@android:id/background">
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#ff9d9e9d" android:centerColor="#ff5a5d5a" android:centerY="0.75" android:endColor="#ff747674" android:angle="270"/>
</shape>
</item>
−
<item android:id="@android:id/secondaryProgress">
−
<clip>
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#80ffd300" android:centerColor="#80ffb600" android:centerY="0.75" android:endColor="#a0ffcb00" android:angle="270"/>
</shape>
</clip>
</item>
−
<item android:id="@android:id/progress">
−
<clip>
−
<shape>
<corners android:radius="5dip"/>
<gradient android:startColor="#ffffd300" android:centerColor="#ffffb600" android:centerY="0.75" android:endColor="#ffffcb00" android:angle="270"/>
</shape>
</clip>
</item>
</layer-list>
I've dabbled in web-design, so colors like "#80ffd300" look familiar...except that they seem to have too many characters. I'm used to hex colors only having 6 characters.
So - question is...how would I go about customizing the colors? I want to change them all to a light-bluish color. I just don't know where to start.
i believe those are eight-digit hexadecimal color codes use google to search for them codes
Check out my modified kspec theme I have them set to a bluish color. When I edit the .xml files I use HxD. Look for the instances of 08 00 00 1C I think (or 80 00 00 1C) I think the first is correct but can't recall right now and am at work using my g1 to post. The next 8 digits after that string control color. Its also backwards so instead of AARRGGBB is typed in as BBGGRRAA the last 2 hex values controlling transparency. Also I think you are correct in all the files you can edit that are posted. In progress_horizontal there are 9 instances of 08 00 00 1C the first 3 controlling the graybackground and the next 6 controlling loading/progress color in the browser and volume and in the music app plus whatever has a horizontal bar lol. In the large medium small and small titlebar there are 3 instances of 08 00 00 1C with the middle one controlling loading color and the first and last being the gray scale. I found all this out by expirimenting with the .xml files, so I figured I would share my finding for all to use. Also if you use the Windows standard built in calculator you can enter in part of the RGB code under Dec and click hex and it will show the hexidecimal binary code that corresponds to it. That's an easy way to figure out any color you would want to use in the .xml I hope my long winded rant helps. I put so much explanation into this so someone that has no clue what to do can still modify the files they want to, not trying to imply the OP doesn't know what to do. Cheers happy editing
namsir said:
i believe those are eight-digit hexadecimal color codes use google to search for them codes
Click to expand...
Click to collapse
Ahhh...indeed. As posted right above me, the first 2 digits control opacity. From xbox-scene forums:
Ok... I have recently been messing with skinning my UnleashX dash. I could not find ONE single tutorial on how to skin so I figured it all out on my own. I learned quite a bit about just looking at the XML files of other skins... but I just couldn't figure out why the hex codes were 8-digit instead of 6. After much experimenting and comparing skins and thinking about it... I realized that the first two digits are OPACITY (transparency). The lower those first two hex digits amount to, the more transparent it is. FF is 100% opacity... and obviously 00 is 0%. The six after that are the hex color codes we all know and love. I thought I'd just contribute to anyone who is struggling to figure out what to do.
Click to expand...
Click to collapse
I am definitely following this. Sorry I can't be of more help
cal3thousand said:
I am definitely following this. Sorry I can't be of more help
Click to expand...
Click to collapse
its really not that hard to edit an .xml for color once you figure out what you are looking for and what you want to change. a week ago i knew absolutely positively nothing about how to edit an .xml, now classes.dex files........ i can use oshaka's colorChange.jar thats it. i can take apart the files but have no clue what i am looking at once i do
This would be a good add on to the colorChange.jar application... I posted the source to it already. You can see how it programatically hex-edits an XML file...
david1171 said:
its really not that hard to edit an .xml for color once you figure out what you are looking for and what you want to change. a week ago i knew absolutely positively nothing about how to edit an .xml, now classes.dex files........ i can use oshaka's colorChange.jar thats it. i can take apart the files but have no clue what i am looking at once i do
Click to expand...
Click to collapse
Pretty much a ditto there on all accounts. I would love to change the circles to either a turquoise or just white so it looks like an Oreo. lol
The files above can be edited just like any other xml.
There is only one reference on the small/medium/large to color that is yellow'ish, and a couple in the horizontal.xml.
These are very few of "all" of the xmls that will need to be edited in order to cover all of the progress bars though.
It looks like some of the actual applications will need to be touched as well (most spefically the browser/market/framework)...
...I think a longer list would be in the works if people wanted to really completely do this.
mianosm said:
The files above can be edited just like any other xml.
There is only one reference on the small/medium/large to color that is yellow'ish, and a couple in the horizontal.xml.
These are very few of "all" of the xmls that will need to be edited in order to cover all of the progress bars though.
It looks like some of the actual applications will need to be touched as well (most spefically the browser/market/framework)...
...I think a longer list would be in the works if people wanted to really completely do this.
Click to expand...
Click to collapse
I have only edited the files above for loading bars ,circles, etc., and from I have not encountered an instance where the bar was a different color. The market, browser, music, volume adjustments, in twidroid.... have all had the changed color. Has anyone found an app where it isn't the changed color?
david1171 said:
I have only edited the files above for loading bars ,circles, etc., and from I have not encountered an instance where the bar was a different color. The market, browser, music, volume adjustments, in twidroid.... have all had the changed color. Has anyone found an app where it isn't the changed color?
Click to expand...
Click to collapse
You were right:
In progress_horizontal there are 9 instances of 08 00 00 1C the first 3 controlling the graybackground and the next 6 controlling loading/progress color in the browser and volume and in the music app plus whatever has a horizontal bar lol.
Click to expand...
Click to collapse
A paragraph would have made that brick a little more readable maybe. I missed the other references in _horizontal. : (
mianosm said:
You were right:
A paragraph would have made that brick a little more readable maybe. I missed the other references in _horizontal. : (
Click to expand...
Click to collapse
Sorry I was typing that from my G1 at work, and once I got started I didn't think about the way it looked.
So, perhaps it is an Ubuntu thing - but I can't seem to open any of the XML files without getting this jarbled block (which I take to mean that it doesn't recognize the encoding):
{
"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"
}
What am I supposed to do about this? I just want to edit the file, and I seem to remember being able to in certain themes. I've tried using XML editors and they say they don't recognize the encoding. The screenshot is from one of the stock CM 3.9.1 Theme Template XMLs.
How do I fix this?
I always use HxD to edit .xml files and it has never given any problems. Sorry I use Windows or I would be of more help, but if no one else can help you try HxD
erissiva said:
So, perhaps it is an Ubuntu thing - but I can't seem to open any of the XML files without getting this jarbled block (which I take to mean that it doesn't recognize the encoding):
What am I supposed to do about this? I just want to edit the file, and I seem to remember being able to in certain themes. I've tried using XML editors and they say they don't recognize the encoding. The screenshot is from one of the stock CM 3.9.1 Theme Template XMLs.
How do I fix this?
Click to expand...
Click to collapse
Ghex for Gnome.
Khex for KDE.
If you are using a better window manager like xfce or xlde, dunno, check the repository for your distribution. ; )
mianosm said:
Ghex for Gnome.
Khex for KDE.
If you are using a better window manager like xfce or xlde, dunno, check the repository for your distribution. ; )
Click to expand...
Click to collapse
I've used GHex extensively. It just seems to give me a fragmented file. Perhaps I have the wrong settings?
Installed HxD to see if that fixes it. Is this what it's supposed to look like?
Yes. that is Hex.
0-9, and A-F.
Ok this needs to be elaborated on. Im not a hex genius or even a hex n00b. I have no idea what any of that means. I know the basic 0-9 A-F. But im not sure where to start changing numbers. Is each 4 digit string one part of the 8 digit code? If its hex with 6 and 2 for opac why am i looking at 32 digits when its 8, crap numbers suck ass.
Honestly77 said:
Ok this needs to be elaborated on. Im not a hex genius or even a hex n00b. I have no idea what any of that means. I know the basic 0-9 A-F. But im not sure where to start changing numbers. Is each 4 digit string one part of the 8 digit code? If its hex with 6 and 2 for opac why am i looking at 32 digits when its 8, crap numbers suck ass.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=479019
I've been reading up on this, but wasn't sure exactly what to modify for Cyanogen's 4.1.11.1. I would like the progress bar to be blue to match my theme, but haven't been successful. Any help would be great, I have read this thread, and am familiar with HxD and RGB color codes. But I don't know what the corresponding codes are that I need to replace, I tried searching through for ones that would match the original orange (I even hex compared some 4.0.4 files that had been modified against the original, but there were so many changes, I didn't know which was which).... any help?
Thanks.

What is the best method of replacing a button with an image [VB.Net CF]

What the title says really. Seeing as .Net CF doesn't support the VB's BackgroundImage button property i'm looking for an alternative method. I've had a quick read of this page but it makes it seem really complicated to do and i was hoping that you guys would be able to suggest something a bit simpler.
Let me know if you have any ideas.
Hi M3PH,
Have a look at post #3 in this thread
http://forum.xda-developers.com/showthread.php?t=499621
It is from a couple of years ago, regarding a query of how to improve buttons, but not much has changed. The code is in C# but as it only dealing with events, there is very little difference from the equivalent VB code. Any problems let me know. As the post mentions, it is not perfect but it does not look too bad. Click on the button and it switches to its 'button depressed' image.
To try it out, extract the TestDevApp.exe from the zip file and run it in a WinMo 6.0 or later emulator image.
stephj.
One question, Does that method allow for the button to be effectively "skinned"? For example, if Swiss420 was to send me some images for several different buttons could i create a different image list for each button?
Sorry if that question seems stupid. got a teeny tiny hangover and the brain aint working right yet. Anyway thanks and let me know what you think.
Yes, it should work, but how you decide to implement it is up to you.
Either:
1.) Have a separate imagelist for each button, or
2.) Load all the images into one globally accessed imagelist and refer to that from wherever you need it. Just make sure the event for each 'button' uses the correct imagelist index. If you add or delete an image from the 'middle' of the list, you will have to refactor all the code that refers to images with an index greater than the one you have added/deleted.
Good luck!
Cool thanks. I think i'm gonna go for option one coz it seems like less of a pita.
Thanks for all the help

[Tutorial][Linux]Themer's Portal and Guide

"If you can't explain something simply, you don't know it well enough" -Albert Einstein
There are a ton of guides available for theming, but I have always found most to be either a) erroneous b) way over complicated or c) out of date. I'll try to keep this simple, easy to understand, and up to date.
Introduction
There are 2 main ways to theme. You can choose the more powerful “zip” style that gives you complete control but is more difficult and time consuming to maintain, or you can choose the “theme chooser” method that is much easier to maintain, but is more limited. A lot of themers will do a theme chooser apk and supplement it with an additional zip file that finishes things the theme chooser cannot. That’s what i do. I recommend Linux for theming since more of the advanced concepts are best done on linux. (Git, source building, etc) For the purpose of this guide, I’ll use my Elegant Dusk as a reference and Ubuntu 12.04 as my distribution of Linux.
Decompiling
Without building directly from source, you'll need apktool to decompile apps. We'll use Apkmultitool for this, since it will sign your apps with a debug key so you can actually install them to your device.
Download this ApkMultiTool, (Choose the "Linux Version 1.0" at the bottom) then extract it to your desktop, then rename the folder ApkMultiTool.
Once extracted, open a terminal and go to that directory by typing
cd /Desktop/ApkMultiTool
Click to expand...
Click to collapse
Now, we need to make the script executable. From the open terminal, type
chmod 755 Script.sh
Click to expand...
Click to collapse
then type ./Script.sh to execute it.
If you got an error about optipng and sox are not in your path, simply open another terminal and run this:
sudo apt-get install optipng p7zip-full sox
Click to expand...
Click to collapse
You should get a menu like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now, we need to patch the aapt to the newest version. In your Android SDK folder, look in the platform-tools folder and grab the aapt file from there and place it in the /other folder in ApkMultiTool. This ensures you have the latest aapt (Android Assets Packaging Tool)
Minimize that and place ElegantDusk.apk into the place-here-for-modding folder. Then maximize the script and choose option 9 to decompile. You should now have a /out folder with several things in it. This is our project folder to begin theming. Navigate to /out/res and let's begin.
Working with Images
First, you'll need an image editor. Since we're using Linux, i recommend the GIMP. Open a terminal (Ctrl + Alt + T) and run this:
apt-get install gimp
Click to expand...
Click to collapse
Once that's done, launch gimp (either from the dash or by typing gimp into a terminal) and we're ready to theme. I can't get into a full GIMP tutorial here, but that will get it installed, and you can either play with it or find some of the zillion gimp tutorials.
Ok, you've edited an image and are ready to test it on your phone. Let's say you want to change the settings background. That's controlled by frameworks_res_background_holo_dark.png in the drawable-nodpi folder of my theme. Change it however you want. If you're done and ready to compile, refer back to the recompile section above. Or, continue on for more tips.
What the heck is a .9.png file?
Android has devised a method of special metadata that can stretch an image in certain ways so it doesn't have to store tons of large image files in it's resources. In other words, it's an optimization technique. We can edit these easily within GIMP, or we can redraw them with a tool that comes with the AndroidSDK called draw9patch.bat. It's in the /tools folder. Let's look at one.
See the 1 pixel black lines around it? The position of that tells android how and where to stretch the image, as well as where content (ie text) can be displayed inside it. The top and left sides tell android where to stretch and the bottom/right tell it where content can be displayed. As we see, content can be displayed everywhere, and the image is stretched in only a small part. For theming, you NEVER want to touch the black lines, so when you change something inside (the gray area), make extremely sure to never alter them in any way. It will cause literally dozens of compile errors with no warning as to which file caused it (a huge pain).
Working with XML
XML (eXtensible Markup Language) is the primary code language we'll be dealing with in theming. There are a TON of programs that can edit xml, but since we deal with it a lot, it's good to get one that looks nice and has syntax correction. I recommend Sublime Text 2. Let's install it with these 3 commands. Run them seperate.
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2
Now let's look at a simple XML. Go to /res/values/colors.xml and open it with sublime text. (Right click>open with) You'll see this:
The values are on the right side listed as #ffffffff or similar. These are hexadecimal ARGB color codes. Each set of 2 letters/numbers represent something. The first two (Alpha) are the transparency. FF means fully opaque and 00 means fully transparent. 50 would be 50% transparent. The next set of two (R) represent the red value, or how much red is in the color shade. Again, FF is fully saturated pure red and 00 is no red at all. The same applies to the next two sets. (Green and Blue) This makes up ARGB, so the example of #ffffffff would be fully opaque and full colors of red, green, and blue, which make white. So the hex for white is #FFFFFFFF.
ICS Blue is #ff33b5e5, just in case you are wondering.
Change any values you like, and then simply hit save at the top menu.
Ok, so what about changing more than just colors that were already there? Read on:
Let's say you wanted to change an entire style. I'll use MMS as an example. There are tons of "inverted MMS" apps out there, mainly because it is one of the easiest apps to invert. We want to change the light style to a dark style, so how do we do that? There are a handful of edits we need to do, but since we are concentrating on styles, let's start there. Open /res/values/styles.xml and search for theme.holo.light.darkactionbar. Found it? Change it to theme.holo (so, delete the .light.darkactionbar part) we've just told MMS to use the android "holo" style, which is dark with white text. There's a lot more to it, but this is a simple example of redirecting styles within an app.
Compiling
This is where it gets fun. There can be a lot of errors at this point so be patient. After you've edited your images and .pngs you need to pack it all up again. Maximize your script.sh again and choose option 10 for compile. If you need, scroll up when it's done to see if it built ok. It should look like this:
Odds are you might get some errors at this stage, so copy the log and post it in a pastebin or similar and i'll try to help as time permits. If no errors, you now need to sign it. If you look in the place-here-for-modding folder, there will now be an unsigned apk waiting. After choosing option 11 to sign, it will change to a signed apk, and you can rename it whatever you like and install like a regular app.
that's why i'm trying to set up a build environment to compile directly from source (without success for now hehe).
apktool is powerful but not enough, it causes many FCs with some APKs (deskclock, camera, contacts, etc..)
Not yet. I've even figured out how to make the dialer transparent. Too bad there is no easy way to compile it other than from the source.
Is there a tutorial somewhere on how to build contacts from source? I'd really really really like to have it in my theme
Sent from my Galaxy Nexus using xda premium
i don't know exactly. you have to use linux for sure, then update jdk, download android sdk and so on..then sync with aokp github and compile. but in fact it's a little harder than i explained lol. there's a lot of guides but no one is complete and updated, i tried many of them but every one has some missing part and i can't proceed somehow.
we should find some dev that spends a little time to explain the fundamentals of compiling from source, then we can help each other with it.
artvandelay440 said:
Is there a tutorial somewhere on how to build contacts from source? I'd really really really like to have it in my theme
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
The only way to build one apk is, you need to make a full rom build first and then you can do a command for one apk. I was in the same boat and trav posted his contacts source and I told someone what xml's I wanted edited (to get rid of blue text) so that person built me the apk and I handled the images on my end cause I'm able to decompile/recompile contacts without errors (but yes phone F's me) so after compile of apk and my images I just 7zip them into the built one. You guys are more than welcome to kang the contacts/phone apk's (un holo'd) from my themes if it'll help (link in sig).
good day.
I am content with the way things are until the Theme Chooser gets updated for ICS. Theming will get so much easier then .
I would also be interested in a guide for compiling apps from source
chopper the dog said:
The only way to build one apk is, you need to make a full rom build first and then you can do a command for one apk. I was in the same boat and trav posted his contacts source and I told someone what xml's I wanted edited (to get rid of blue text) so that person built me the apk and I handled the images on my end cause I'm able to decompile/recompile contacts without errors (but yes phone F's me) so after compile of apk and my images I just 7zip them into the built one. You guys are more than welcome to kang the contacts/phone apk's (un holo'd) from my themes if it'll help (link in sig).
good day.
Click to expand...
Click to collapse
Thanks, i think i'll do that. Your theme colors are more fitting than what i have now. I'll be compiling a full rom on a spare virtual machine today, and if by some miracle, it works, then i can post source to it as well.
artvandelay440 said:
Thanks, i think i'll do that. Your theme colors are more fitting than what i have now. I'll be compiling a full rom on a spare virtual machine today, and if by some miracle, it works, then i can post source to it as well.
Click to expand...
Click to collapse
Any of the colors in those is handled all with images. I had the apk built with all the blue.holo text changed to 9a9a9a so that it could be a neutral theme. I just edit .9's and other images for multiple themes and use same apk base.
good day.
chopper the dog said:
Any of the colors in those is handled all with images. I had the apk built with all the blue.holo text changed to 9a9a9a so that it could be a neutral theme. I just edit .9's and other images for multiple themes and use same apk base.
good day.
Click to expand...
Click to collapse
Ah, so technically, i could use 7zip to simply replace the images i want. Wouldn't that cause issues with .9 images, since they need to be compiled again to be drawn correctly?
artvandelay440 said:
Ah, so technically, i could use 7zip to simply replace the images i want. Wouldn't that cause issues with .9 images, since they need to be compiled again to be drawn correctly?
Click to expand...
Click to collapse
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
chopper the dog said:
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
Click to expand...
Click to collapse
Just tried your apk and it's perfect for minimalist themes .
Can you also please get rid of the blue strip on the top of the call screen or is that in Phone.apk?
chopper the dog said:
That's were I was saying I have no problems de/recompiling contacts so I use a sacrificial apk to decompile make all image edits compile and 7zip image folders into working apk.
good day.
Click to expand...
Click to collapse
That worked perfectly- thank you.
sonnysekhon said:
Just tried your apk and it's perfect for minimalist themes .
Can you also please get rid of the blue strip on the top of the call screen or is that in Phone.apk?
Click to expand...
Click to collapse
I need to figure out where that edit is at and have my smarter than me friend build me an apk. It has annoyed me but laziness has prevailed.
good day.
chopper the dog said:
I need to figure out where that edit is at and have my smarter than me friend build me an apk. It has annoyed me but laziness has prevailed.
good day.
Click to expand...
Click to collapse
It's in wither framework or systemui, that i know. (i'm thinking systemui) Here's how it turned out. And i can build phone.apk just fine if you need as well.
i'd love a contacts.apk without that bastard dividers between contacts..
got rid of all of them in framework and phone.apk but that one is in values\colors.xml and can't be removed (yet)
artvandelay440 said:
It's in wither framework or systemui, that i know. (i'm thinking systemui) Here's how it turned out. And i can build phone.apk just fine if you need as well.
Click to expand...
Click to collapse
Sonny was referring to the blue strip at the top when you place a call. But that cap looks sweet.
good day.
chopper the dog said:
Sonny was referring to the blue strip at the top when you place a call. But that cap looks sweet.
good day.
Click to expand...
Click to collapse
oh- this one? if so, look in phone apk /res/values/styles/<color name="incall_call_state_label_background">#80fd9000</color>
Yup. Yay laziness paid off. Thanks
good day.

[HOWTO][INFO]Editing the CSC file on your phone.

All samsung "touchwiz" based devices contain files in /system/csc that set variables dictating how certain parts of the phone act, what is pre-configured, etc. In the case of the AT&T variants, the contents of these files are often dictated by AT&T.
This post is an attempt to try and catalog some of the more useful values that can be changed (and the result of changing them.) Not all the variables seem to do much, and only by trial and error can we really know what will happen... So far, I've only played around with items I found interesting, but will continue to expand in this and if people reply to this post with actual experience changing other variables, I'll add the information to this thread.
PLEASE TEST THINGS AND CONTRIBUTE TO THIS THREAD.
Please don't reply with guesses as to what things may or may not do or with requests about specific variables. I'm hoping that eventually document every CSC variable available and "requests" won't make it go faster. If you want to know what a not-yet-documented variable does, try it out (and post your results.)
First, in order to play with the csc files, your phone should be rooted. This isn't optional, as you'll need the ability to overwrite files in the phone's /system partition (the firmware - sometimes improperly called the "ROM")
I'd strongly suggest making a nandroid (or backup via CWM Recovery or TWRP) before making changes. It's possible to mess things up badly enough that the phone won't boot properly.
It's possible to edit the CSC files directly on the phone, but I'd strongly suggest not doing that. Therefore, you should have a good text editor on your computer that's able to properly deal with unix/linux style line endings (notepad isn't good enough.) Notepad++ is a very good editor and freely available. Google "notepad++" For a linux box, plain "gedit" is fine.
In order to edit the files, you'll need to be able to mount the /system partition as read-write, and to move files from /system/csc to your PC or other location for editing. You have several options for this including root explorer, ES File Explorer, or just using adb. I prefer adb myself, but I'm a commandline type of person.
I won't be spending time describing how to get the CSC files off your phone to your PC, nor will I tell you how to overwrite the existing ones with your edits. This isn't because I'm elitist, an a**hole, or anything like that. (I _am_ some of those things, but that isn't my reason here.) My purpose for leaving out the information is to force inexperienced users to learn these things before editing system files. If I give you all the information, you become dependent on me for more information, and I don't want that (and trust me - neither do you.) As well, if I spoon-feed this, you won't have any idea what do to when something goes wrong.
Find this post helpful? If so, please make it MORE helpful by testing one of the other CSC features and replying to this thread telling us what result you had. ​
First up... feature.xml...
feature.xml
The CSC "feature.xml" file is in XML format. This means that everything "variable" has a start and end tag. Both contain the name of the variable,
but the end tag has a slash in it. The value of the variable is between the start and end tags. For example: <VariableName>value</VariableName>. So, if this message describes changing "CscFeature_SamsungSucks" from "false" to "true", you'd search in the xml file for "CscFeature_SamsungSucks" and might find this:
Code:
<CscFeature_SamsungSucks>false</CscFeature_SamsungSucks>
You'd change the "false" to "true" (no quotes!) and be done. In some cases, the entire line can be deleted (as noted.)
This file has a LOT of variables in it and this post will concentrate on that particular file. Almost all tinkering will occur in this file, and it's also the easiest to edit (as there aren't any complex xml structures.)
CscFeature_Common_DisableMenu4GalSearch: setting this to false didn't seem to bring up any new global address list options on my device (I'm connected to an exchange server) in the email app or contacts/dialer app.
CscFeature_Settings_DisableMenuFindMyMobile: (see next line)
CscFeature_Settings_FindMyMobile: setting "DisableMenuFindMyMobile" to false and this entry to true will enable the "find my mobile" entries in the Settings->Security menu. I'm unable to get these items to function properly, however. (They worked with my international note2, so it might be that there are other support files missing on the AT&T variant I'm using now.)
CscFeature_FMRadio*: editing these seem to have no effect (I don't think any of the LTE capable NoteII phones are capable of FM Radio.)
CscFeature_NFC_StatusBarIconType: If you delete this line, it will get rid of the "N" statusbar icon when NFC is turned on.
CscFeature_Message*: Be warned that editing some of these may break SMS/MMS messaging on your device. There appears to be many carrier specific settings in here that have dependencies on the specific carrier. For example, I don't think that AT&T's network supports proper SMS Delivery reports, so even setting the corresponding variable to "true" would be futile.
CscFeature_Email_UseFixedBgColorAsWhite: if changed from true to false, the email app will appear inverted (with a black background and white/gray text.)
CscFeature_Sip_DisableAutoCorrection: doesn't seem to have any impact on the samsung keyboard
CscFeature_Sip_DisableSpaceSuggestion: doesn't seem to have any impact on the samsung keyboard
CscFeature_Sip_DefaultOff4AutoSubstitution: doesn't seem to have any impact on the samsung keyboard
CscFeature_Launcher_*: all these seem to be for setting defaults for the touchwiz launcher, so no sense in changing them.
language.xml
(coming soon)
This appears to control what languages are available to the system. Canadian users might want to play with this file to see if adding en_US to the "Display" and/or "SupportList" tags will allow them to choose US English (and perhaps get google's TTS to talk to them in google now.)
others.xml
(coming soon)
This appears to set some carrier defaults, including the APN information and the carrier built-in dialer contacts (such as "AT&T Customer Care")
customer.xml
(coming soon)
I've only glanced at this file so far, but it appears to be carrier specified network information, some carrier specified settings defaults, and even some carrier specified browser bookmarks. There also appears to be some APN related information in here, but I'm not certain what it's in here for.
Nice how to guide man its very informative, im going to play around with this later when I get home...do you mind if I add it to my reference thread so it doesnt get lost when this thread begins to get bigger?
Sent from my SAMSUNG-SGH-I317 using xda premium
mjwhirly said:
Nice how to guide man its very informative, im going to play around with this later when I get home...do you mind if I add it to my reference thread so it doesnt get lost when this thread begins to get bigger?
Click to expand...
Click to collapse
This isn't mine to control. This "belongs" to the community, and I hope that the community contributes to it in a meaningful way. Please feel free to reference it elsewhere - perhaps with (contributions welcome) noted. My ONLY demand is that no one profits from effort I've given freely.
My secret motive is to nudge people out of the "MyRom" mentality and more into the "lets all work together to learn, develop and share" mentality often seen with kernels and open source projects.
Take care
Gary
Gary, have you seen the CSC feature web, set user agent?
Possibly an option to set "Desktop" as default user agent in browser, I for one despise mobile sites.
antiochasylum said:
Possibly an option to set "Desktop" as default user agent in browser, I for one despise mobile sites.
Click to expand...
Click to collapse
Not sure if this is what you are looking for or not: Start the browser, tap the "menu" button. Turn on the "desktop view" checkbox.
There are some UAgent related entries in the feature.xml file. Please play with them and post your results:
CscFeature_Web_SetUserAgent // currently empty
CscFeature_Web_SetUAProfile
CscFeature_Web_Bool_EnableUAProfile // currently false
Thanks so much for this. Sorry for the noob question but I haven't done much with xml files. What is the character to just comment out a line?
Sent from my SAMSUNG-SGH-I317 using xda premium
Romee74 said:
Thanks so much for this. Sorry for the noob question but I haven't done much with xml files. What is the character to just comment out a line?
Click to expand...
Click to collapse
In XML, in order to comment out a line (instead of completely deleting it), it has to be surrounded by special tags:
On the left of the commented out area, you need "<!--" (no quotes) and on the right, you need "-->"
See the below code block for an example.
Code:
<Is_This_Commented> false </Is_This_Commented>
<!-- <Is_This_Commented> true </Is_This_Commented> -->
Take care
Gary
On my Galaxy S III, the file /system/etc/feature_default.xml appears to contain default settings, and feature.xml can override those defaults. I'm not sure how comprehensive the list of settings in feature_default.xml are, but I would imagine that many of the available ones are covered there.
Thundersnuz said:
On my Galaxy S III, the file /system/etc/feature_default.xml appears to contain default settings, and feature.xml can override those defaults. I'm not sure how comprehensive the list of settings in feature_default.xml are, but I would imagine that many of the available ones are covered there.
Click to expand...
Click to collapse
That's interesting. Which variant of sgs3 do you have? Would you be willing to attach the two files to a reply in this thread (or point me to someplace I can find the firmware your using to investigate?)
Thank you
Gary
It would be amazing if we could somehow enable auto-replace on the samsung keyboard. I ended up switching to swiftkey because of how many mistakes I've been making with the stock keyboard, but now I don't get to take advantage of swipe, stylus writing, or the one-handed features...
UCLAKoolman said:
It would be amazing if we could somehow enable auto-replace on the samsung keyboard. I ended up switching to swiftkey because of how many mistakes I've been making with the stock keyboard, but now I don't get to take advantage of swipe, stylus writing, or the one-handed features...
Click to expand...
Click to collapse
I completely agree, but I wasn't able to get it working when tinkering with the CSC values (as noted in the corresponding post.) Perhaps there's some other combination of values that might get it going.
Please give it a try and let us know how it works out.
Take care
Gary
Removing the NFC icon from the staus bar is awesome but has anyone tried switching this line;
<CscFeature_NFC_DefaultCardModeConfig>DISABLE</CscFeature_NFC_DefaultCardModeConfig>
To enable? Im not sure why att would "block" this feature, especially with google wallet getting more support for non-nfc devices.
Sent from my SAMSUNG-SGH-I317 using xda app-developers app
MonsterBandit said:
...but has anyone tried switching this line...
Click to expand...
Click to collapse
I'm not sure why people keep asking if other people have done this, that, or the other thing. TRY IT and let us know what happens.
garyd9 said:
I'm not sure why people keep asking if other people have done this, that, or the other thing. TRY IT and let us know what happens.
Click to expand...
Click to collapse
fair enough...thanks btw...im slowly growing the courage to make changes and explore deeper into these devices...changed the value to "ENABLE" (minus the quotes) and seemingly nothing changed. Google Wallet app still says Not supported. That might be on Google Wallet's end tho. I guess the better question might be has anyone with a Note 2 gotten Google Wallet to work?
When I first got my GN2 running stock, carrier billing worked. I then flashed Jedi 3.3, and it disappeared. I remember that on my HOXL, someone mentioned a fix on the build.prop. Is there anything I can do on the GN2's build.prop to get my carrier billing back?
I'm on AT&T by the way.
silentecho13 said:
When I first got my GN2 running stock, carrier billing worked. I then flashed Jedi 3.3, and it disappeared. I remember that on my HOXL, someone mentioned a fix on the build.prop. Is there anything I can do on the GN2's build.prop to get my carrier billing back?
I'm on AT&T by the way.
Click to expand...
Click to collapse
this is pretty much a how to thread ..
you seem to be having issues with a rom , you should post in there ..
here is how I fixed it in previous roms ..
compare your build.prop form your att rom to the one you are using ..
and add / replace with the att stuff .

ROM Building: The Basics Part II

Welcome to Part II of the basics of ROM building.
If you have not had a chance yet, please check out this link. This should be followed after all of the "files" are gotten from the first part of this Trilogy of tutorials. Okay enough Lord of the Rings, the true trilogy (nerd reference may be criticized below, I preferred the matrix until the third one lol) I digress.
So, we have the files we downloaded them, Red bull/Rockstar/Monster/Bawls, whatever your legal poison. Let's set up working directories.
Organization is critical to the development process. I mean, I only realized this after I started modifying. I mean wow, it was so much easier once I started to record notes and logs.
To begin, always go to a root of a hard drive
Create a folder called
Rom
Tools and then create a new folder called Smali and APKTOOL
Multimedia and then create a new folder called Pictures and Sounds
So we have created 5 folders, do you need 5? No. Do you need 20? It doesn't matter, do what you are comfortable with. It is about staying organized.
Take the ROM you have selected from the first Basics Rom Tutorial. I assume for (hint hint) simplicities sake you chose a DeOdexed rom version of the Sprint S3 MD4 rom. Freeza Thank you. It will be in a zip file
Called: MD4_update_FULL_DeOdex.zip
Rename it to MD4.zip, feel free to call it whatever you want (remember feel comfortable). I will refer to it as MD4 from now on for simplicities sake.
So you have 7-zip installed right? Uh Oh, check, make sure that is ready to go before we start.
I cannot go into that tutorial because....well come onnnnnnn is it really that hard to press next 10 times or less ?
Extract all the files to MD4_Version_1
Oh yeah, we will be making hundreds of versions if you want. Trust me later down the line, after each mod is good, you can just continue naming them in increments. But version control should always be implemented in case you mess something up. So the logic is:
Make 1 mod or set of mods, try mod, if it works keep using that version as your base version and keep going until you are ready to try it again. Mind you it is time consuming but the only way you truly learn this backwards art of reverse engineering.
So lets look at this disaster. I mean it's overwhelming so do not think you are King of the Hill or Any hill. Maybe a mole hill because this a very complicated system in front of us.
Let's analyze the anatomy, BTW, I do not even know what everything does or is, but by all means, ask questions and we will find out. A forum is meant to voice opinions and feedback to those opinions.
The root folder has 2 folders and 2 files
META-INF
system
boot.img
installbusybox
The META-INF folder is extremely important. It contains useful information about signatures and is very necessary for android to" say its official software" remember the idea of this folder, not its contents. I do not mess with this META-INF but there are so many all over the place down the road that we will need to know it plays an important role.
The system folder has every file that we are going to modify, we will hit this folder harder than a head crab being hit by another "delay" at Valve.
The boot.img is an important file for booting up android. We will not be touching that right now. Can you? Sure but hell, don't bother with it for this tutorial. If you know all about ROM mods like some of our bad-ass developers ( yes Cyanogen all of you are badass), Stop reading get to better pastures.
The installbusybox should be there for tools for ROM modifications. It is basically a set of functions that makes Android have teeth. I will not be using it right now but we can keep going. The best tools collected into one so do not delete or modify
Lets get to the meat, the big shabang, the wholy mole(for my Latin friends), the kabosh(for whoever knows what that is)
System
The sub folders are:
app: Contains all the apps that come with the ROM. Remember android operates by utilizing apps for different functions. Modify the files in here can be good and bad, we can make the best tweaks ever here or ruin everything. Be very careful, I have had boot hangs happen to these files
bin: This folder appears mysterious but it contains important files, the binary files. Complexity gets checked right here. This folder is extremely sensitive, I have not modified this folder just yet but when I feel like bricking my phone like a gravity gun dropping combine soldiers, I will get to this asap.
cameradata: Contains important files for camera raw data to JPEG conversion, I do not mod this folder.
csc: This is a jewel, it contains Consumer Software Customization. It has multiple XML files that can be edited and modified critical settings for various functions. Very nice to start your ROM customization here, but not the easiest, lets ease in with another folder first.
etc: This folder contains critical data storage. It has things like the hosts file which will allows you to block ads(cough cough, youtube) and many other files. This folder can brick your phone. Lets not get crazy here...yet
fonts: Pretty obvious, fonts for the ROM, oh and it requires True Type Fonts so contact your local free repository for those.
framework: This folder is an important folder, almost just as important as the app folder
hdic: Language files they are based off the first 2 initials of the language. Not affecting anyone if we are not trying to pinch each ROM's size down to the bare minimum
lib: Library folder, this has files with extension .SO, they will contain libraries of information for different functions. For example, how to take a "Best Pose" picture mode would have functions in this folder as well as other areas of the rom.
media: Contains the most obvious of sounds and a prime location for android universal sounds and bootimages. The bootimages is a touchy subject, the files are Samsung proprietary which makes them useless to us for modification, but we can make the puppet dance one way or another. The sounds, however, are key as we can isolate sounds when the phone starts up, or mute certain camera functions here, we can even make it sound like all of your favorite games(Yes I did, Mechwarrior boot sounds are acceptable, F.E.A.R. sound effects and some DOOM noises added for ambiance and of course Half life 2 noises for complete nerdgasm)
T9DB: This folder contains T9 predictive text in I believe 3 languages: English, Spanish and Korean, can you get rid of 2 of these sure, but expect problems if you decide later you need them. I mean they are not that large in size but at the same time, everyone has their own way of doing things
tts: This folder houses the Text to Speech programs. They suck. I am sorry but they do, SVOX is better, I love IVONA personally. I always like a british women to wake me up and tell me I am late. But that's me.
usr: This folder is not really meant for us to modify as it has to do with the keyboard layout, grammar recognition and customization. Realistically though, I use Swiftkey and call it a day. So do not hate me if I do not bother with mucking around here. It is useful to some I am sure but nothing I want to dabble in. But by all means, it can be useful for setting well Settings.
vendor: Contains library and binary files for certain features from the vendor, I would say camera related but I do not care for this folder just like people really hated the HEV suit announcing all of its amazing features, are you kidding me that was the best part. Yes I fell 100 feet, please let me know about my fracture and how this suit somehow repaired it. It might have well said "Oww". Nothing wrong with that.
voicebargeindata: From my understanding, Svoice related. No need to bother, that feature is about as useful as a Crowbar in a Gun Fight.
vsc: Version Software Control
wakeupdata: Acoustic and Grammar models contains several languages as well
xbin: Has busy box and Super User, a useful tool to become well super.
build.prop: Very sensitive file that is magical and detrimental. There is a lot of false promises on performance with this one. We will dig through this one carefully.
CSCVersion.txt: Should have the model number of your phone
SW_Configuration.xml XML file with more model number configuration
Please feel free to let me know what is understood or not.
This run down allows us to attack the appropriate folders for the next parts
Before we even begin with the complicated mods, let's attack the basic mods first.
The media Folder then go to audio, there is 4 folders
alarms
notifications
ringtones
ui
The first 3 folders you can place anything you want inside. They each correspond to the default ringtones you would like in the phone. I recommend using .ogg files or .mp3 files, you can use Audacity to modify your sounds. Sometimes the length of the sound plays an important role. Short sounds should be kept short for a reason. If you play a noise and its barely half a second, do not make it 4 seconds long because it will sound ridiculous longer than what is meant to sound. Taking a picture while hearing Puff Daddy's Come with Me can be quite awkward but hey its all about your ROM, your choice, your likes. Who the hell is going to tell you that you cannot have a sound of a crowbar whacking a headcrab while in the middle of a busy subway.....besides the police. This works similarly to the situation of ringtones, keep them full blown songs and I have noticed some lag. Do not be discouraged, but most modern phones end the call after about 30 seconds. This time limit has to do with how long the phone is takes to find the phone and ping it. Of course, I safely recommend 45 seconds of your song to cover yourself.
Take note that there are 3 files in these folders that are set to default (ringtone, alarm and notification). We can change that with the build.prop but that's after we mess with the ui folder that contains the User Interface Sounds.
Alert_on_call.ogg: An Alert when you are on call. This should be subtle noise
Auto_focus.ogg: Tricky one, I modified this, still makes an auto focus noise. Clearly a trick has been devised
Auto_focus_error.ogg: Same as above
Call_Connect.ogg: When the call first connects
Cam_Start.ogg: Video Recorder start noise
Cam_Stop.ogg: Video Recorder stops noise
camera_click.ogg: Camera Click noise
Camera_click_short.ogg: Camera Click noise
Camera_empty.ogg: Camera related
camera_focus.ogg: Tricksie this one is, mute and still makes noise, will discuss where noise is coming from
Camera_Timer.ogg: Timer for camera countdown
Camera_Timer_2sec.ogg: 2 Second timer
Charger_Connection.ogg: When you plug in your phone to charging port
Dialer_new.ogg: Tricky one will get to later
Dock.ogg: When you put the phone on dock, useful to distinguish from charger_connection.ogg
Effect_Tick.ogg: I have heard it whilst changing pictures but not sure
Highlight.ogg: I Silenced it, and "I dont know whhhyyy"( Can you guess which comedian said this line and if you know it say it in his voice)
HoverPointer.ogg: I Silenced it, and "I dont know whhhyyy"( Can you guess which comedian said this line and, if you know it, say it in his voice)
Insert.ogg: Google Voice Noise
KeypressDelete.ogg: Default keyboard, I do not use this
KeypressReturn.ogg: Default keyboard, I do not use this
KeypressSpacebar.ogg: Default keyboard, I do not use this
KeypressStandard.ogg: Default keyboard, I do not use this
Lock.ogg: When you press the power button and it instantly locks. This noise will play. Mechwarrior noise here
LowBattery.ogg: Doom low amm noise here to indicate I should have brought a charger becuase my battery is low
New_chat.ogg: Chat software related, I got rid of that junk but thats for another tutorial
PowerOff.ogg: Most people silence this as it is the noise that powers off the phone, I got creative here but you do not have to.
PowerOn.ogg: Most people silence this as it is the noise that powers on the phone, I got creative here but you do not have to.
S_HW_Touch.ogg: The HW indicates Hardware touch, basically the buttons and any touch screen action
S_SIP_Backspace.ogg: Backspace stuff
Sent_chat.ogg: See New_chat.ogg
Shutter.ogg: Silence this for sure if you do not want noise but really silence everything camera related here and it wont be 100%. So just do it
Shutter_multiple.ogg: Burst shot related
TW_Battery_caution.ogg: Any TW has to do with TouchWiz related actions. This one is for battery
TW_Call_Disconnect.ogg: The tricky thing is, some of these are controlled by another piece of software, this one is one of them
TW_Error.ogg:
TW_Silent_mode_off.ogg:
TW_SIP.ogg: Sounds like the default tapping sound for the rom's built in keyboard
TW_Touch.ogg: The default TouchWiz touch noise. Tricky little one this was as I had to verify there was no other location for the droplet noise, it turns out there is, so stay tuned as we dig into the apps and locate where the rest of the sounds are
TW_Unlock_Glass.ogg: Gallery Noises for file management
TW_Unlock_Puzzle.ogg: Gallery Noises for file management, not sure why I heard these exact noises in the gallery app other than they are linked
TW_Volume_control.ogg: The volume rocker button on the side, i mean logically there is only one choice, the Half Life 1 Medical Bay MedShot sound, okay maybe too annoying sure, but bada$$
Undock.ogg: Removing the phone from the dock that so few of us get because you know it doesn't fit my big case, or expanded battery or whatever. You know what, custom solutions are too expensive but trust me people do make the docks that accommodate bigger cases
Unlock.ogg: When you type in your Pin/Password/Pattern, the sound that it makes to unlock
VideoRecord.ogg: Camera video start recording noise, of course, I silenced this one as well
So this takes care of some of the noises, the problem is, Samsung software actually hides the rest of the noises. They are actually hidden away in the APK files in the system/app folder. Do not worry, in future parts of this Discovery channel special on Black Mesa, we will be investigating why they detonated a nuke in the first place if it didnt do anything to stop the invasion. I mean future parts of this series
So where do we go now? Well modify the sounds you want or add the ringtones you want. But something that I felt was important was that certain noises be set when I reboot my rom by default. No I do not want that stupid Samsung whistle! NO ONE DOES SAMSUNG!.
Lets set the default sounds on ROM start up, we will need to modify the build.prop file
This file contains an amazingly large set of instructions for the start-up of the phone and features in the phone. it is therefore, very sensitive to screw-ups. Hopefully, notepad++ was installed.
Navigate in Windows to the working directory of your ROM in our case MD4/system/ there is a file there that says build.prop
Let's open that up in notepad++, we should see some intimidating pieces of code or more like lines of text that tell the phone what and when to do something.
A caution to all, the build.prop has been synonymous with words like "increase performance", "maximize battery life" and other claims that are unfortunately sometimes not always true, for every mod someone makes to this file, someone traces the code to a Gingerbread rom that is useless on Jelly Bean, or an old reference to ICS(Ice Cream Sandwich),
I would highly suggest we not dabble too much on this. XDA has some great people who have found great information about the build.prop file. This link, user Chris_84 has put a great Wikipedia together on this so I will not try and explain each one. But there are so many other links that can show a post of good tweaks and bad tweaks and useless tweaks that I will not go into. Let's instead focus on our start-up sounds
The build.prop code we will scroll to with the ctrl+f button should be enough for us to get started is
Code:
ro.config.alarm_alert=
ro.config.ringtone=
ro.config.notification_sound=
Each of these do have a word after the equal sign, which means if you configure the correct file in the correct folder(hint hint) alarm, ringtone,notification folders we talked about earlier, all you have to do is add the name of the file exactly as it appears, please only use .ogg files here. MP3 files also work but you know just do it okay. I don't ask Alex why she never made a move on me, I just know she cant have a meaningful relationship with a guy who doesn't even say hi, that's a little creepy but you know and I know she loves Freeman alright.
As an example, just in case my rant did not make any sense,
let's say you put the following sound in the system/media/audio/ringtones folder kick_push_lupe.ogg
you would put in the code the following
Code:
ro.config.alarm_alert=
ro.config.ringtone=
ro.config.notification_sound=[B]kick_push_lupe.ogg[/B]
And that's how simple that is.
So you say you have ranted on too long. Sure I have, but that's not going to be the end here. We will be modifying the rest of this rom business in the more difficult lesson which is part III, that will take the longest because we want to have fun. And I still have some Freduian issues with my role model Gordon Freeman that I need to bring out. Anyway
Also, before I go, you might ask, how do you execute TEST BATCH ALPHA-TRON!.
Go Back to your Home Folder MD4_Version_1/. You should see the folders we discussed earlier
META-INF
system
boot.img
installbusybox
Select all of those files and right click the mouse button to get a context menu from 7-zip or WinRAR and click Add to archive. Make a ZIP FILE ONLY. You can choose to compress the file if you want, I just click fastest compression options available and proceed.
When the zip file is in hand, I take the file and put it on the SD Card root directory. When it transfers(in about 5 minutes), you can open the CWM (clockworkmod) recovery or the TWRP recovery and install the ROM. Sure I did skip some steps here on how you get these recoveries and the like but this tutorial is about ROM modification and the sort not the super basics, you need those to even be reading these. If you need to get those going, let me know in the comments and we can spool that up in part III.
I do not know how many parts this will take, but it is time consuming, i have to research this stuff and recall my notes. I know the spirit of the guide is in the right place but please be patient. I will not fail you Krypton(YES I LIKED MAN OF STEEL, let the downvotes begin, oh wait not imgur).
I appreciate all feedback, do not get me wrong, and I will work whenever I am free to add as many of these parts as I can. I do want to help anyone out who has their own twist on what they want their ROM to do. It is the least I can do to payback this great community and assist one person or inspire one idea. That is all it took for me to get going, the next part will also have a very heavy hand in taking code from other people for examples of mods. I want to say from now, I did not do any of these codes, I used common sense to implement somehow into my own rom mods. They deserve all credit as they are amazing coders/crackers/hackers/whackers/ whatever you name it they truly deserve the praise. I am just compiling their logic into our ROM that we are building together. And has anyone seen the YouTube channel Vsauce, that channel is AWESOME.
Again, thank you. Very, very helpful.
-------------------------
Sprint Galaxy S3
Need Help? PM
Hit the "Thanks" button if I helped you!
This is great. Man u really put this down in a way that is really understandable!
Sent from my SPH-L710 using xda app-developers app
Appreciate it
Thanks guys, seems you are tracking my every word, I posted the other ones it seems you hit those up as well. Appreciate it and everyone, please let me know if something did not make sense, we got a great pool of people that can help out.

Categories

Resources