[TUTORIAL] Selectable Browser User Agent - Galaxy Tab 10.1 Android Development

BACKGROUND
If you use an Android tablet to surf the web, you often face the issue that if you visit a web site that has a mobile version, the server checks your User Agent and says "Android, eh? You're a phone!" - and bumps you to mobile.nfl.com instead of www.nfl.com, which sucks because phone optimized web sites tend to look bad on a 10.1" 1280x800. For example, you want this not this.
So, you can handle that quite easily, you ask the browser to present itself as something else.
CAUSE
Default, my tablet presents itself as...
Mozilla/5.0 (Linux; U; Android 3.1; en-gb; GT-P7500 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13
...and that's when all the web sites say "Android, aha! You're a phone!"
But I can instruct the tablet browser to present itself as anything else, for example...
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1
...which is handy because it makes all the web sites say "Aha! You're a Chrome browser running on MacOS X 10.7 Lion!", therefore showing me the proper web sites.
ONE SOLUTION
You can do this by decompiling /system/framework/framework-res.apk
Open /res/values/strings.xml, search for the string "web_user_agent" and you'll see this:
<string name="web_user_agent" formatted="false">Mozilla/5.0 (Linux; U; Android %s) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 %sSafari/534.13</string>
You can change this blue string into whatever you want.
However, if you do this you're stuck without a proper "android" user agent.
That could be a pain in the ass if you've got an app that relies on a hidden browser window to complete a sign-in authentication, checking the user agent in the process...*cough*NFLGamePassForAndroidTablet*cough*
ANOTHER, MORE ELEGANT, SOLUTION
The more elegant version, however is decompiling /system/app/Browser.apk
Open the file /res/xml/advanced_preferences.xml if you want the menu item in Advanced settings
or open the file /res/xml/general_preferences.xml if you want the menu item in General settings
Insert this…
<ListPreference android:entries="@array/pref_development_ua_choices" android:title="@string/pref_development_uastring" android:key="user_agent" android:defaultValue="0" android:entryValues="@array/pref_development_ua_values" />
... somewhere, between/above/below some other node. I've put it over the ...
<com.android.browser.search.SearchEnginePreference …
... node, giving me this new menu item in Advanced...
... opening this menu ...
Compile it back and there you go.
This fix is basically just shortcutting around the about:debug route by moving the option out of the hidden debug menu, but it's quite convenient to have the option easily accessible without entering debug mode, and you're not stuck without an "Android" user agent.
HOW TO DO THIS, STEP BY STEP.
(mirrored from post #25)
Teaching has never been my strong feat but I'll give it a shot.
Please note:
The "Setup to build" part is for Windows, recreated from memory, and may be inaccurate. I love you guys but I'm not gonna wipe my system and start over just to retrace my steps
For the entire guide, I'm pre-supposing basic computer skills, a rudimentary understanding of ADB, folder structures, file management, text editing and "what do you mean command line??!"
== Set up to build:
If you don't have Java installed, download and install Java from java.com
Download APK Manager 5 and remember to thank the guy.
Place it in a folder in C:\ so you have a directory stucture like this:
C:\apkmanager5
C:\apkmanager5\other
C:\apkmanager5\place-apk-here-for-modding
...etc
C:\apkmanager5 is the home dir for our purposes, so from now on assume we're in C:\apkmanager5 unless I say otherwise.
Run Script.bat
Select 24 "Exit"
(this should create any dirs and logfiles that may be missing)
== Get the required files and prepare for editing
Pull the following .APKs from your phone via ADB or extract them from your ROM.zip to /place-apk-here-for-modding in our homedir. You should make a backup of at least Browser.apk, just in case.
/system/app/Browser.apk
/system/framework/framework-res.apk
/system/framework/twframework-res.apk
Run the following commands from a command prompt in our home dir:
java -jar other/apktool.jar if place-apk-here-for-modding/framework-res.apk
java -jar other/apktool.jar if place-apk-here-for-modding/twframework-res.apk
The command line will return:
I: Framework installed to: C:\Users\((username))\apktool\framework\1.apk
I: Framework installed to: C:\Users\((username))\apktool\framework\2.apk
== Decompile and edit
Run Script.bat
(this will open the apkmanager window)
Enter 19 "Select compression level for apk's"
Enter 0 (compression=0)
Enter 22 "Set current project"
{
"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"
}
Select the number for "Browser.apk"
Select 9 "Decompile apk"
It'll say "Decompiling apk" and hang for a while.
Open a file explorer/total commander/whatever on your computer, and go to /projects in our home dir. You'll see that we now have the decompiled Browser.apk in there.
Go to /projects/Browser.apk/res/xml/ and open general_preferences.xml with a text editor. Notepad, Notepad++, Ultraedit or something, not Word
Add the purple code, so the content looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="Indigo"][I][B]<ListPreference android:entries="@array/pref_development_ua_choices" android:title="@string/pref_development_uastring" android:key="user_agent" android:defaultValue="0" android:entryValues="@array/pref_development_ua_values" />[/B][/I][/COLOR]
<com.android.browser.BrowserHomepagePreference android:hint="@string/http" android:maxLength="8192" android:title="@string/pref_content_homepage" android:key="homepage" android:inputType="textMultiLine|textUri" />
<PreferenceCategory android:title="@string/pref_general_sync_title">
<Preference android:title="@string/pref_personal_sync_with_chrome" android:key="sync_with_chrome" android:summary="@string/pref_personal_sync_with_chrome_summary" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_general_autofill_title">
<CheckBoxPreference android:title="@string/pref_autofill_enabled" android:key="autofill_enabled" android:summary="@string/pref_autofill_enabled_summary" android:defaultValue="true" />
<PreferenceScreen android:title="@string/pref_autofill_profile_editor" android:key="autofill_profile" android:summary="@string/pref_autofill_profile_editor_summary" android:fragment="com.android.browser.AutoFillSettingsFragment" />
</PreferenceCategory>
</PreferenceScreen>
The purple code shows the UAstring item in General Preferences just above the "Set homepage" item.
== Compile
Go back to the apkmanager window.
Select 11 "Compile apk"
It'll output "Building Apk" and think about it for a while.
Apkmanager will ask, "Is this a system Apk?"
"y" - yes it is.
Then it will ask, "Aside from the signatures, would you like to copy over any additional files that you didn't modify from the original apk in order to ensure least # of errors?"
"y" - yes, you want to do that.
apkmanager will extract those original files and then present you with this screen:
Read that, then I'll explain it
Right. At this point apkmanager has made a copy of the original, compiled Browser.apk files in C:\apkmanager5\keep
As the name "keep" suggests, whatever is in here will be kept and carried on to your new build, so:
For every file that you have changed in /projects/Browser.apk/, you need to delete the counterpart in /keep/.
That way, apkmanager knows to keep your unchanged files unchanged but grab your changed file(s) from /projects/Browser.apk. It may seem like dumb way of doing it but it makes sense that you don't want your computer to compile more than it has to. Compiling takes time and CPU, and...well...the less is done, the less can go wrong.
In this case you edited /projects/Browser.apk/res/xml/general_preferences.xml
So you have to delete /keep/res/xml/general_preferences.xml
AND you have to delete /keep/resources.arsc as well!
Whenever you have changed any XML in an .apk, you also have to delete /keep/resources.arsc when compiling. The apk's resource table is compiled into resources.arsc, so if you dont delete it from keep/, you're gonna keep that and carry it over into your new, modified Browser.apk, and your changes won't come through
Ok, after deleting those two files, you "Press any key to continue ...", all the resources are compressed, and now you have a modified Browser.apk in place-apk-here-for-modding/
Wrap it in a flashable zip and flash it.
("How" is outside the scope of this guide)
As it turns out, this is actually a rather general guide on decompiling, editing and recompiling stuff for honeycomb. You can use the exact same method to edit other apks like, framework-res.apk and SystemUI.apk.

Flashble zip?

Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.

PhantomHacker said:
Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.
Click to expand...
Click to collapse
lol, i love how you give the credits. Phantom.... you are a posterchild!

task650 said:
lol, i love how you give the credits. Phantom.... you are a posterchild!
Click to expand...
Click to collapse
I try.
Sent from my GT-P7510 using Tapatalk

Can someone tell me how to decompile in win7?
Preferably the very easiest way with the easiest tool.
Thanks.
Sent from my GT-P7500 using Tapatalk

PhantomHacker said:
Credits to the original devs who found these? (DocRambone,alterbridge86) Otherwise nice guide.
Click to expand...
Click to collapse
Thanks.
As for credits, I assure you I've figured this out all by myself, so how about I give myself a pat on the back then?
I know that DocRambone has a thread where he supplies flashable zips of the the fix in framework-res.apk/res/values/strings.xml but as far as I can see, he doesn't share how. I asked him in PM but he didn't answer, and all he writes in his thread seems to be "You have to decompile the apk and change some of the xml's and then recompile it again.".
So I had to figure it out myself, and it wasn't exactly hard. So far so good.
The selectable browser version is a fairly straightforward solution, since I'm simply moving an existing setting out in the open from a hidden debug menu, but I cannot for the life of me see any other published info about it.
So again, I haven't published anything I haven't figured out myself, and as I've been unfortunate enough to see my own original creation in someone else's 2 dollar Market app, I'm slightly sensitive to the issue of copying.
If you were trolling, consider me trolled.

Hooolm said:
doesn't share how
Click to expand...
Click to collapse
ot: Its a bit like that these days... It seems a lot harder to gather needed information than it was in WM6.X times.

pkoper said:
ot: Its a bit like that these days... It seems a lot harder to gather needed information than it was in WM6.X times.
Click to expand...
Click to collapse
Yeah, it's just... I've never stolen anything, and I get really pissed spending a couple of hours figuring out something cool, and sharing it with the community then being told "pretty pictures - now credit those who told you how"

Edit..
All good, but I need to learn to do more search before asking, iam sorry
And here is a little offtopic question. Why does it look like this in rootexplorer when iam about to edit the xml file
Sent from my GT-P7510 using xda premium

Hooolm said:
Yeah, it's just... I've never stolen anything, and I get really pissed spending a couple of hours figuring out something cool, and sharing it with the community then being told "pretty pictures - now credit those who told you how"
Click to expand...
Click to collapse
I didn't see an issue with your original post. It would have been different if you had posted Doc's zips as your own creation, but you didn't. Yours was simply a tutorial to teach and explain how such a thing could be done. It's the difference between you showing me a Ferrari Italia and telling me you built it, versus simply telling me HOW they built it.
In any case, you mention Doc never answered your requests. Does anybody know what the heck happened to him? I stopped following his threads when he went MIA.

bd85 said:
Edit..
All good, but I need to learn to do more search before asking, iam sorry
And here is a little offtopic question. Why does it look like this in rootexplorer when iam about to edit the xml file
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Prob cuz root explorer isnt an xml viewer/editor?

DT3CH said:
Prob cuz root explorer isnt an xml viewer/editor?
Click to expand...
Click to collapse
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium

bd85 said:
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
The resource table is compiled into resources.arsc
You have to decompile the entire .apk to edit the xml and compile again afterwards.
Use something like apkmanager, it's real easy to set up. There's a thread for it in the 10.1 dev forum ;-)

i hope phantomhacker can include this in the 3.2 rom don't really want to try this out myself in case i screw this up

Hooolm said:
The resource table is compiled into resources.arsc
You have to decompile the entire .apk to edit the xml and compile again afterwards.
Use something like apkmanager, it's real easy to set up. There's a thread for it in the 10.1 dev forum ;-)
Click to expand...
Click to collapse
Have you actually done this, does it work? I'm interested, and tried with apkmanager, but the recompiled browser wont work. I think its a problem with my install of apkmanager, but I'm not sure.

blulite said:
Have you actually done this, does it work? I'm interested, and tried with apkmanager, but the recompiled browser wont work. I think its a problem with my install of apkmanager, but I'm not sure.
Click to expand...
Click to collapse
Yeah, I've done it several times. For task650 v6.1, stock XWKH7 and XXKI1.
I decompile it with framework-res.apk and twframework-res.apk installed and compile it back as a system app.
Edit:
I've used this ApkManager 4.9 HC edition without problems

bd85 said:
In can open the andrpidmanifest.Xml that is in browser apk just fine, but when I go to the xml res folder and open the xml there it looks like my earlier Screenshots.
This works but not the xml i want to edit, strange
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Ahh, weird indeed

decompile works great on my mac, but compile does not work.
Please make your decision: 10
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
i've also tried this:
http://forum.xda-developers.com/showpost.php?p=7064736&postcount=447
didnt work

My Mac isn't set up to build, I can't help you there.
I'm building on a Windows Server remotely.
How about asking in the apkmanager thread? I'm sure they know more about it

Related

[Themed App]Apollo Music Themes for ICS roms only **DarkICE**RedICE** 6/15

Apollo Music Themes​
I use CM9 and absolutely love this music app but it's freaking ugly!!!
I did not make this app, I just themed it!!
I got it to invert but some things rely on the skin to make it complete..until the skin is ready to theme the whole app I made 2 parts to apply the theme. Zip to flash and a skin to complete it!
You apply this at your own risk and I would suggest you backup first!
You may use this in your Rom/Themes but PLEASE give credit on your threads!!!
Screen shots:
{
"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"
}
Instruction to install the zip:
1. Download the zip to your Sdcard
2. BACKUP Your setup!!!!
3. Use Rom manager or boot into your recovery
4. Find the zip and flash it in recovery
5. Boot up and it will be ready for the next step
Instructions to apply the skin to finish the theme:
Note: The skin will not theme the widget!!!
1. Download the APK to your Sdcard
2. use a file manager like "Astro file manager" or Root Explorer" if you don't have one already and install the skin
3. Open Apollo and select Menu/Settings/Themes/Select your theme once selected touch Apply theme
4. Enjoy your fully themed Apollo music app!!!
******If you didn't read those and ask questions covered already I WILL BEAT YOU!!!
Nah but I will make you feel stupid so READ READ READ******​
Oh you might need these...Links:
DarkICE Apollo Music zip:
Flash me in recovery
RedICE Apollo Music zip:
Flash me in recovery
DarkICE Skin:
Install me and apply Apollo settings
RedICE Skin:
Install me and apply Apollo settings
Coming:
Blue
Pink
Orange
Green
Purple
Gold
then I'll take requests once these are done!!!!
To remove the theme just flash the rom again and if that doesn't work use Root explorer to remove Apollo.apk from System/data then wipe all cache in recovery!!!
Hope you all enjoy this and I will be making more colors soon!!!!
DJ
Follow me on twitter @djdarkknight96
Also Check out my site for more great themed apps: My SITE More links in my signature!!!!
Enjoy!!!
Can you please upload short tutorial how to create skins for apollo music thank you
HDD.error said:
Can you please upload short tutorial how to create skins for apollo music thank you
Click to expand...
Click to collapse
The skin or the entire app? Here is the site I got the skin from: http://www.seeingpixels.org/2012/05/apollo.html I just used the template in that page. Hope that helps!
DJ
Sent from my DarkICE Skanky CM9 Gnex using the app!
I don't mean to be a bother, but you seem to be the only person in the whole internet that knows how to do this. Your themes are very well made, but not quite what I'm looking for.
I know where the images are, and I think I know where to change the other colors, but I just can't figure out how to finish it off. I have the project imported in Eclipse, and I can export an APK from there, but it won't install.
Am I way off, or just missing something small? Any help at all would be greatly appreciated!
mvgc3 said:
I don't mean to be a bother, but you seem to be the only person in the whole internet that knows how to do this. Your themes are very well made, but not quite what I'm looking for.
I know where the images are, and I think I know where to change the other colors, but I just can't figure out how to finish it off. I have the project imported in Eclipse, and I can export an APK from there, but it won't install.
Am I way off, or just missing something small? Any help at all would be greatly appreciated!
Click to expand...
Click to collapse
The only thing I see missing is signing it. If your only going to post a thread with it sign it with apktool but if you're going to upload it to the market then you must use a private key to sign it...That's all that I see missing. ;-)
Sent from my DarkICE Skanky CM9 Gnex using the app!
Can u make a black and cyan one because it will match cyanogenmod
Sent from my SGH-T989 with Cyanogenmod 9 Nightly Power.
ArcticFish said:
Can u make a black and cyan one because it will match cyanogenmod
Sent from my SGH-T989 with Cyanogenmod 9 Nightly Power.
Click to expand...
Click to collapse
There is already a skin on the market that works good with my DarkICE version that's black and cyan. If not let me know and I can throw one together tomorrow. Epic blue I believe is the name.
Sent from my DarkICE Skanky CM9 Gnex using the app!
djdarkknight96 said:
The only thing I see missing is signing it. If your only going to post a thread with it sign it with apktool but if you're going to upload it to the market then you must use a private key to sign it...That's all that I see missing. ;-)
Sent from my DarkICE Skanky CM9 Gnex using the app!
Click to expand...
Click to collapse
Wow, such a simple thing. I thought I'd only need to sign it if I was going to put it on the market, but I guess that's only half the story!
Thanks to that great tip I have a nice new theme on my music player It also happens to be exactly what ArcticFish is looking for. I don't want to jack your thread anymore than I already have, so I won't upload it without your permission.
Thanks again!
mvgc3 said:
Wow, such a simple thing. I thought I'd only need to sign it if I was going to put it on the market, but I guess that's only half the story!
Thanks to that great tip I have a nice new theme on my music player It also happens to be exactly what ArcticFish is looking for. I don't want to jack your thread anymore than I already have, so I won't upload it without your permission.
Thanks again!
Click to expand...
Click to collapse
Awesome glad you got it working...No by all means post away! Sharing is caring...Lol
DarkJelly Gnex on JellyBean sent this using the app
It took a little longer than expected cause I forgot to do the other resolutions, my phone is hdpi, but since I'm sharing it with others, I shouldn't make any assumptions.
So, here's the link, ArcticFish, hope it meets your expectations (and remember, this doesn't touch the widget, though I certainly wouldn't mind figuring that out either...)
https://dl.dropbox.com/u/85249960/Apollo ICS Theme.apk
mvgc3 said:
It took a little longer than expected cause I forgot to do the other resolutions, my phone is hdpi, but since I'm sharing it with others, I shouldn't make any assumptions.
So, here's the link, ArcticFish, hope it meets your expectations (and remember, this doesn't touch the widget, though I certainly wouldn't mind figuring that out either...)
https://dl.dropbox.com/u/85249960/Apollo ICS Theme.apk
Click to expand...
Click to collapse
Nice, I themed the full app to theme the widget. Hopefully they will add that to the skin too. Thanks for sharing!
DarkJelly Gnex on JellyBean sent this using the app
If anyone would be willing to help out a noob I would would forever be in your debt. Ive made a few themes for ADW so I know my way around Eclispse a little but I downloaded them template from his site. When I import it into Eclipse I get the following errors.
Code:
Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project GoogleMusicTheme Unknown Java Problem
Code:
Description Resource Path Location Type
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files GoogleMusicThemeActivity.java /GoogleMusicTheme/src/com/andrew/apollo/google/music/theme line 1 Java Problem
Code:
Description Resource Path Location Type
Unable to resolve target 'android-14' GoogleMusicTheme Unknown Android Target Problem
I remember having to change some settings in the ADW templates but I'm drawing a huge blank here.
EDIT: Forgot to mention that I have updated the SDK. I have all the Android versions installed from 1.5 -> 4.1 Eclipse is updated as well.
Tobb555 said:
If anyone would be willing to help out a noob I would would forever be in your debt. Ive made a few themes for ADW so I know my way around Eclispse a little but I downloaded them template from his site. When I import it into Eclipse I get the following errors.
Code:
DescriptionResourcePathLocationType
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this projectGoogleMusicThemeUnknownJava Problem
Code:
DescriptionResourcePathLocationType
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class filesGoogleMusicThemeActivity.java/GoogleMusicTheme/src/com/andrew/apollo/google/music/themeline 1Java Problem
Code:
DescriptionResourcePathLocationType
Unable to resolve target 'android-14'GoogleMusicThemeUnknownAndroid Target Problem
I remember having to change some settings in the ADW templates but I'm drawing a huge blank here.
Click to expand...
Click to collapse
Hmmm, there are no spaces in your folder names? I actually hate eclipse so I just decompiled the apk and changed the source path in smali to mine...edited the smali with notepad and compiled with apk multitool.
Sent from my DarkICE Skanky CM9 Gnex using the app!
Tobb555 said:
If anyone would be willing to help out a noob I would would forever be in your debt. Ive made a few themes for ADW so I know my way around Eclispse a little but I downloaded them template from his site. When I import it into Eclipse I get the following errors.
Code:
Description Resource Path Location Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project GoogleMusicTheme Unknown Java Problem
Code:
Description Resource Path Location Type
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files GoogleMusicThemeActivity.java /GoogleMusicTheme/src/com/andrew/apollo/google/music/theme line 1 Java Problem
Code:
Description Resource Path Location Type
Unable to resolve target 'android-14' GoogleMusicTheme Unknown Android Target Problem
I remember having to change some settings in the ADW templates but I'm drawing a huge blank here.
EDIT: Forgot to mention that I have updated the SDK. I have all the Android versions installed from 1.5 -> 4.1 Eclipse is updated as well.
Click to expand...
Click to collapse
The way I did it, from the very beginning, is:
- File -> Import -> General -> Existing Projects into workspace
- Browse for the folder, and check Copy projects into workspace
- In the package explorer, right click -> Android Tools -> Fix Project Properties
- Project -> Clean
Those steps always seemed to clear up strange little problems like that. Hope that helps!
I downloaded the template from http://goo.gl/EPRiL link taken from http://www.seeingpixels.org/ I extracted it and imported it into Eclipse. The folder has a space in it when I downloaded it. I just tried getting rid of the space and it just gave me a different error this time.
Tobb555 said:
I downloaded the template from http://goo.gl/EPRiL link taken from http://www.seeingpixels.org/ I extracted it and imported it into Eclipse. The folder has a space in it when I downloaded it. I just tried getting rid of the space and it just gave me a different error this time.
Click to expand...
Click to collapse
Post the error please, so we can help.
Sent from my DarkICE Skanky CM9 Gnex using the app!
Sorry to bother you again, but is there any chance you could point me to where I can change the colors of the pop-up menus (like when you tap the three dots, or the little arrow) and the settings screen? I've looked everywhere I can think of, and even compared a bunch of the files from your themes, but I just can't figure it out.
Thanks for all your help!
mvgc3 said:
Sorry to bother you again, but is there any chance you could point me to where I can change the colors of the pop-up menus (like when you tap the three dots, or the little arrow) and the settings screen? I've looked everywhere I can think of, and even compared a bunch of the files from your themes, but I just can't figure it out.
Thanks for all your help!
Click to expand...
Click to collapse
If you're doing the full app they are in styles.xml of the values folder but you will need to decompile it to see that. If you're doing the skin I don't think that's possible.
DarkJelly Gnex on JellyBean sent this using the app
Well, there's something I'm missing. It's correct on the Now Playing tabs, but not in the Library or Settings. This is good enough for now, though.
I really appreciate the help. I never would have come close without your words of wisdom! Thanks again!
mvgc3 said:
Well, there's something I'm missing. It's correct on the Now Playing tabs, but not in the Library or Settings. This is good enough for now, though.
I really appreciate the help. I never would have come close without your words of wisdom! Thanks again!
Click to expand...
Click to collapse
No problem, glad I could help!
DarkJelly Gnex on JellyBean sent this using the app

[GUIDE]Theming your ROM on Phone(Editing framework-res.apk to change icons)

So friends, here is a quick and easy guide for changing the status bar icons of your s5830i(Actually any phone )
For those who don't know how to do it(for anyone actually :highfive
Theory
Android is the awesome platform which is easily configurable and is able of being edited very easily
The icons used in every app and Android framework are located as png images in apk of those respective apps in location:-
*.apk/res/drawable-mdpi (in our case, as our phone is mdpi)
So, we can change any icon of our status bar like battery, signal, (not clock[clock is to be configures in SystemUI.apk{will post how to change it shortly}]), etc by editing png's in framework-res.apk
Not even that, you can edit images of any app as I told you
There are several ways to decompile and compile apk in which we have made change
If we want full access of apk and want to change every thing like the xml's in it and smali content in jar files, then we would have to do it on computer by apktool or apkmanager
But, we are here to only change image, so we would not go in detail of apktool or apkmanager. For changing images, that can be very easily done even on the phone by an app NinjaMorph that is made for developers by our senior head and DEVELOPING LEGEND Stephen(Stericson)
But be careful as backing up the original file if you do something wrong
And as you all know any developer or even a newbie posting something interesting that you want to try WILL NOT BE RESPONSIBLE for your mobile blowing up, resting in peace, sleeping like a dead, behaving like a non-living BRICK, or anything whatsoever that may or may not happen to phone in this universe or any other universe known or unknown​
What to do if anything happened to my mobile
We have had a backup of your original file so we can restore it
But if while editing the system files like framework-res.apk
If you deleted some un-backed up apk's
Well you can always have backup of your ROM and that is why Koushik Datta has made clockworkmod Recovery
You can restore your ROM from there
Pre-Requisites
Patience
Mind
A GT-S5830i (A spare one if you brick your phone, just kidding)
Root access(to change the apk)
NinjaMorph(http://bit.ly/ninjamorph)
Root Explorer(Optional)(http://bit.ly/stericson)
GUIDE
So Let's Start
Download NinjaMorph. Install it and give it root access. It will prompt for starting checks. Click on start checks.
Now you would have three options, namely, New Project, Finish Project, Existing Project
Click on new project. Go to system/framework/ and click on framework-res.apk. It will start extracting files
Once it has extracted all the files, it will open to show you what is inside framework-res.apk.
Exit it and go to your file explorer.
Go to /sdcard/AndroidThemes/workspace/framework-resapk
This is what is inside apk. Go to res/drawable-mdpi folder
There you will see hundreds of icons of your menu, lockscreen, battery, signal, and everything
You can edit them and replace them as you want. But the name of the file you are replacing and size and dimension must be equal to the file you are replacing with(I recommend Googling and finding icons of battery, signal, and other things)[I have even used hdpi icons, there was no problem]
If you download a theme file which is to be flashed in recovery that is not for your phone, no problem, extract the zip and place its framework-res.apk in your sdcard and extract the apk with Ninjamorph. Replace your icons with its icons and TADA
After you have done replacing the icons and you are satisfied(I am never)
Go to NinjaMorph. Click on Fininsh Projects. Click on framework-resapk. It will recompile and ask to replace the original apk with modded one. Click OK
Then it will ask if you want to remove the completed project, Say No(As you would need it if something gets wrong)
Reboot your phone
Maximum chances are that your icons will be replaced. Rare cases have their status bar gone or no change, if so:-
Download(Buy) Root Explorer. Go to /sdcard/AndroidThemes/workspace,
There you will see framework-res.apk. Copy it and go to /system/framework
Mount as R/W
Paste the apk. If it asks that file already exists, overwrite it.
SET PERMISSIONS
Long click on framework-res.apk and click on permissions
You will see three columns
Read Write Execute
You have to set them in the following way
x means you have to tick it
blank means uncheck
Read Write Execute
.....x........x.................
.....x...........................
.....x...........................
Click OK
You will see it as rw-r--r--
Reboot
Do it over again if nothing happens
Enjoy
This way you can edit not only framework-res.apk but any apk
Treat
This section is different from the thread topic
I: Faking Up
Want to make your device show Jelly Bean in About Phone
Go to Root Explorer
Go to /system
Long click on build.prop
Click on Open in a Text Editor
Change the files as
ro.build.display.id=Jelly Bean
ro.build.version.release=4.1.4
Save Changes
Reboot
II: Easter Egg
You all must know that an image of GingerBread Zombie comes up when you repeatedly click on Android Version in Setting>About Phone
Wanna change it to look like Jelly Bean?
{
"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"
}
Extract framework-res.apk
Go to res/drawable-nodpi
You will see platlogo.jpg
Replace it with the file in attachment
Recompile
Reboot
Troubleshooting
Will find and update it
Tell me what problems are you having
How to make your status bar transparent
Quick Guide
Detailed one afterwards
Open SystemUI.apk/res/layout/status_bar.xml
Change android:background code from ff000000 to 7f000000 for 50% Transparency
For 100% code is 00000000
You forget about this http://www.java2s.com/Open-Source/A...ndroid/internal/app/PlatLogoActivity.java.htm
To change 'zombie art by Jack Larson' to yours text for example 'Android KING !!' to have a Fully changed Ginger Bread Easter Egg a'la Jelly Bean
How to:
-Decompile framework.jar
-Find PlatLogoActivity.xml in com/android/internal/app/
-Open with notepad++(Windows) or gedit(Linux)
-Find this line "Zombie art by Jack Larson"
-Change this text to yours
-Save and close file
-Recompile your framework.jar file
-Make an CWM package and install it
-Or replace it with Root Explorer or other app like MiFile and change permissions to 644(rw-r--r--) and restart your phone
-Enjoy
Ty 4 ur work but can u give me root explorer on media fire coz my own one from black mart is chinies n I really use it very hard
Sent from my GT-S5830i using xda premium
whisper_ said:
Ty 4 ur work but can u give me root explorer on media fire coz my own one from black mart is chinies n I really use it very hard
Sent from my GT-S5830i using xda premium
Click to expand...
Click to collapse
Try 4Shared, Don't Post Links.. Warez Not Allowed..
:laugh:
whisper_ said:
Ty 4 ur work but can u give me root explorer on media fire coz my own one from black mart is chinies n I really use it very hard
Sent from my GT-S5830i using xda premium
Click to expand...
Click to collapse
If you don't want to pay, get a free file explorer (Solid Explorer, FX File Explorer, ES File Explorer).
Boudz78 said:
Try 4Shared, Don't Post Links.. Warez Not Allowed..
:laugh:
Click to expand...
Click to collapse
I get it, you're lebanese, and we here pretty much never pay for any software. But warez discussion isn't allowed as well, so you broke the rules as well.
whisper_ said:
Ty 4 ur work but can u give me root explorer on media fire coz my own one from black mart is chinies n I really use it very hard
Sent from my GT-S5830i using xda premium
Click to expand...
Click to collapse
It is not allowed to post warez on xda forum
And I don't know why people don't Thank for useful posts but thank more on useless post
GermainZ said:
If you don't want to pay, get a free file explorer (Solid Explorer, FX File Explorer, ES File Explorer).
I get it, you're lebanese, and we here pretty much never pay for any software. But warez discussion isn't allowed as well, so you broke the rules as well.
Click to expand...
Click to collapse
Yeah lolllz
I ever want to know how to edit the icons...but i have two questions
1.-What is the name of the image that appears of background in the messages?..i want to changue the color of the messages that i send and received
2.-The room that i have installed has 6 toggles on screen and only want to appearss 5..what line of code i should to edit?
ErickBG said:
I ever want to know how to edit the icons...but i have two questions
1.-What is the name of the image that appears of background in the messages?..i want to changue the color of the messages that i send and received
2.-The room that i have installed has 6 toggles on screen and only want to appearss 5..what line of code i should to edit?
Click to expand...
Click to collapse
You should edit Mms.apk
I don't know as I never edited Mms.apk
For colour you should edit xml files
Which won't be accessed by this method
And the code you are asking for
You won't get the xml from this method
So you won't be able to edit it
I don't know why my thread was moved
Modifying ROM is in development section by XDA rules
iamareebjamal said:
I don't know why my thread was moved
Modifying ROM is in development section by XDA rules
Click to expand...
Click to collapse
Modifying - yes. Instructing how to modify - no.
Added
How to make your status bar transparent
I followed this guide for change the icons' color in lidroid's toggles. I descompile the lidroid-res.apk, replaced some png, then recompile. I made everything. But when I rebooted my fone, no change. This guide is to it? Help me, please.
Thanks....sorry my bad english.
Humberto.Ortega said:
I followed this guide for change the icons' color in lidroid's toggles. I descompile the lidroid-res.apk, replaced some png, then recompile. I made everything. But when I rebooted my fone, no change. This guide is to it? Help me, please.
Thanks....sorry my bad english.
Click to expand...
Click to collapse
Decompile systemui.apk and try to change icons there
And don't forget that icons should of same name as you are replacing
iamareebjamal said:
Decompile systemui.apk and try to change icons there
And don't forget that icons should of same name as you are replacing
Click to expand...
Click to collapse
But in the systemUI.apk don´t have the lidroid's icon. I only found them in lindroid-res.apk.
I tried change the color with ninjamorph, and it´s work. But if I replace an icon, it doesn´t work.
thanks
Edited: I was trying replace the png's with the ninjamorph. It was the problem.
Now I replaced the png's with root explorer and all work fine.
Thanks so much....sorry my bad english
iamareebjamal said:
Added
How to make your status bar transparent
Click to expand...
Click to collapse
where is guide on making status bar transperent ?
please provide the link
thanks in advance
Sent from my GT-S5830i using xda app-developers app
srt99 said:
where is guide on making status bar transperent ?
please provide the link
thanks in advance
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
See 2nd post
Ok I am trying to edit my status bar to 50% transparent but when i open the file in root explorer all i get is a bunch of ?[]??????????? etc etc
Im running MincCr rom on a galaxy ace s5830i
PhaseCoder said:
Ok I am trying to edit my status bar to 50% transparent but when i open the file in root explorer all i get is a bunch of ?[]??????????? etc etc
Im running MincCr rom on a galaxy ace s5830i
Click to expand...
Click to collapse
You will not be able to do that until you read the first post CAREFULLLY

[Guide] Porting CM10/.1 themes to XTheme

{
"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"
}
Want to port CM11 themes? Go here:
CMX- Port CM11 themes in one click.
I will update the information whenever time allows.
Please feel free to contribute or discuss.
In this first post I'm going to try and explain what XTheme and the theme apk's are and how they work. Why? Because you'll have a better understanding of the workings, this will hopefully enable better self sufficiency.
In the second post i'll describe how to set up an environment to port themes and the process of how to port CM 10 themes to XTheme.
I'm going to assume you know nothing about anything to try and cover everything. I myself don't know everything, but what i do know I will try to share.
I'm going to try and keep this as basic as possible so anyone with no knowledge can follow along.
There are already some brilliant guides out there that will help if you read them, so i will link to them instead of regurgitating info from them.
[Guide]T-mobile theme engine.
[Tool]XML generator.
[Guide]How to theme CM10.1.
CM 10 theme mega thread.
[How to] XMLGenerator and .bat script
Knowledge is power!
Click to expand...
Click to collapse
You can find the XTheme thread here containing install instructions, compatible devices and more.
Basically it performs in a similar manner to the theme chooser engine for CM based ROM's... but for ROM bases other than just CM. Until now-18/04/13, the theme chooser engine was restricted to CM based ROM's. XTheme makes it possible to theme stock ROM's.
Click to expand...
Click to collapse
The theme chooser engine allows you to choose a theme and apply it whilst your device is turned on without overwriting your stock images (requires a reboot to see full changes).
This is opposed to a different method of theming, zip flashing or Metamorphing. These methods overwrites either whole apk's or just the relevant images depending on the method you use.
The beauty of the theme chooser is if you decide to change theme or remove it, there is no fallout from the theme that was applied, so all the images are returned back to stock. This isn't really possible through Metamorph or zip flashing unless you use VRTheme or the Universal theme zip which creates a backup. Even so i've found this doesn't work 100%. And restoring your original images through Metamorph and zip flashing can be a painful and tiresome task.
The theme chooser works by redirecting images from inside a theme apk, provided that the relevant images and redirection are present.
If the images or redirections are not present for battery icons for example, then the battery icons will not be themed.
A simple and clean method to theme.
Click to expand...
Click to collapse
Now you know how the engine works we'll talk about the theme apk.
Within the apk is a folder named "res", this contains all the images and xml files that is used within the theme.
Inside the "res" directory are a number folders. Depending on the theme you are porting/creating, some folders will not be used. The folders are mainly self explanatory and these include:
anim ~Controls animations, e.g. screen fades, rotations etc.
color ~xmls control colors used in the theme.
drawable ~Contains xmls that control drawables.
drawable-*dpi ~Contains theme images and possibly xml's.
layout ~Contains xml's that controls the layout values of elements in the theme.
mipmap-*dpi ~Houses "ic_launcher" icons.
values ~Contains xmls including strings, styles, drawables which we will discuss later.
xml ~Contains the redirection xmls. This is where the magic happens.
You can find more in depth details here:
http://developer.android.com/guide/topics/resources/providing-resources.html
If you are unsure where to house elements when adding to your theme, simply look inside the original apk.
For example if i want to theme the icon of Gmail, i would extract the Gmail apk and search for the location of the launcher icon. This is located in mipmap-*dpi, so i would add it to the mipmap-*dpi directory in my theme with the relevant redirections.
Click to expand...
Click to collapse
The redirections xml diverts the original package resources to the theme resources.
Here's a little workflow for changing the Gmail launcher icon.
This is achieved by adding the relevant syntax to the redirection.xml like so:
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
[COLOR=Red]<package-redirections android:name="[COLOR=RoyalBlue]com.google.android.gm[/COLOR]" android:resource="@xml/[COLOR=SeaGreen]com_google_android_gm[/COLOR]" android:minSdkVersion="16" />[/COLOR]
</theme-redirections>
I have highlighted the package redirection above to break it down.
Red= Package redirection syntax.
Blue= Original package name. Found in the "AndroidManifest"
Green= Redirection package name. you can call this anything but i strongly suggest you stick with the original and change "." to "_" as above.
This has told the engine to divert "com.google.android.gm" (Gmail.apk) to use the resources defined in "com_google_android_gm".xml in the theme xml folder.
Now we need to create an xml inside the xml folder named "com_google_android_gm".
Within this xml we add the correct syntax for the resources to be used:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
[COLOR=Red]<item name="[COLOR=Blue]mipmap/ic_launcher_mail[/COLOR]">@[COLOR=SeaGreen]mipmap/com_google_android_gm_ic_launcher_mail[/COLOR]</item>[/COLOR]
</resources>
Red= Resource redirection syntax.
Blue= Original directory and resource
Green= Redirection directory and resource
This is telling the engine to display "com_google_android_gm_ic_launcher_mail".png located in the mipmap-*dpi directory within the theme apk.
Now we add the "com_google_android_gm_ic_launcher_mail".png into the mipmap-*dpi directory to complete the redirection process.
You can see why i suggest to keep the redirection package name the same. it keeps a consistency that's easy to follow.
Click to expand...
Click to collapse
Time Taken:
Setting up 10 minutes
Porting 10 minutes
Difficulty:
Xtheme Engine themes. Most themes in this thread are for Sony devices. To enable these to work fully on other OEM devices, they require proper redirections.
[THEMES]Xposed theme Engine.
[PORT]CM to XThemeEngine.
[[XTHEMES]] THEMES PLANET [4.3 supported].
Port CM Themes to Xtheme Engine in One Click!
Post any other threads here and i will add them to the above list.
Click to expand...
Click to collapse
Now we know the basics of how the engine and redirections work we can start creating/porting some themes.
We need to gather some tools for the process:
Java Link
ApkManager/Multitool Link
CM10 theme to port Take your pick.
SampleTheme.apk Link at bottom of the page.
Notepad++ Link
7zip Link
Weapon of choice- i chose a beverage with alcoholic content. Link
Java.
Download, install and add bin path to your environment variables.
Windows 7.
Select Computer from the Start menu
Choose System Properties from the context menu
Click Advanced system settings > Advanced tab
Click on Environment Variables, under System Variables, click "new".
In the "variable name" field enter JAVA_HOME
In the "variable value" field enter the "bin" location from the java folder.
My location is "C:\Program Files\Java\jre7\bin"
Reboot.
Open a cmd window and type java. If you added the path correctly you will receive an help menu. If not try to add the path again.
For more help see below or use Google.
http://www.java.com/en/download/help/path.xml
ApkManager/Multitool.
Extract and read the "README"
You can also follow instructions here:
http://forum.xda-developers.com/showthread.php?t=1310151
Click to expand...
Click to collapse
Alternative method. Thanks pier10.
Firstly let me say. If you do not have a redirections.xml in the CM theme xml folder you will need to create one.
See this post for details.
Once we have our environment setup we can get started.
XTheme creator ruqqq has described how to port CM themes in his thread but ill try to expand it.
http://forum.xda-developers.com/showpost.php?p=40428425&postcount=2
1 .Run the setup.bat and select option 3 to create directories.
2. Place your CM10 and SampleTheme.apk's in "place-apk-here-for-modding". Sample theme link. CM10 theme link.
3. Run script.bat and choose option 24 to set project.
4. Select your CM 10 theme apk and choose option 9 to decompile.
5. Repeat the process with the sample theme
6. Your now presented with 2 output folders in "projects" with the same name as the apk.
7. Enter "projects/SampleTheme.apk" and delete the "res" folder.
8. Goto the CM10 theme in projects and copy the "res" folder across into the SampleTheme.apk folder.
9. Open both "AndroidManifest.xml" with notepad++
10. In the SampleTheme AndroidManifest change
Code:
package="[COLOR=Red]sg.ruqqq.theme.SampleTheme[/COLOR]"
with the package name from the CM10 AndroidManifest. Add an X or Xtheme to the end of the package name to differentiate it from the original.
Code:
package="sg.ruqqq.theme.SampleTheme"
Becomes
Code:
package="com.vicino.theme.honeycombl.xtheme"
Or
Code:
package="com.vicino.theme.honeycomb.x"
We can also reflect the change in res/values/strings.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">HoneycombTheme</string>
<string name="theme_name">HoneycombTheme</string>
<string name="style_appearance_name">HoneycombTheme</string>
<string name="author">vicino</string>
<string name="copyright">vicino</string>
</resources>
Becomes
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">HoneycombTheme X</string>
<string name="theme_name">HoneycombTheme X</string>
<string name="style_appearance_name">HoneycombTheme</string>
<string name="author">vicino</string>
<string name="copyright">vicino</string>
</resources>
11. Check If the theme contains a redirections.xml (res/xml/redirections.xml), if it doesn't you must create one. See the post above headed "redirections.xml" orsee this post for details on editing. You should have a line of code for each package xml file in the xml folder.
This applies to every ROM. If the theme does not contain a redirections.xml it will not redirect resources.
Delete any unused lines of code.
If you are using a "stock" ROM, example TouchWiz(Samsung), Sense(HTC), Semc(Sony), open up "android.xml" in res/xml and add redirections for your OEM images.
For Sony based ROM's you can find my redirections below. For other ROM's you will have to create them or find them
http://forum.xda-developers.com/showpost.php?p=40024969&postcount=5
TIP:
My redirections syntax refer to framework images as "framework_res", if the theme you are porting uses "frameworks_res" for example follow this:
Open up the android xml with NotePad ++.
Click the search tab at the top and select replace.
In the field "Find what" enter @drawable/framework_res.
In the field "Replace with" enter @drawable/frameworks_res.
Click replace all, save and close.
12. Compile the project by selecting 12. When prompted select option 2.
13. You will recieve a "unsignedSampleTheme.apk" in the "place-apk-here-for-modding" folder. Select option 13 to sign the apk.
14. You now have a "signedSampleTheme.apk" in "place-apk-here-for-modding", you can rename this to the CM10 theme name.
15. Place the apk on your device, install, apply and reboot.
Click to expand...
Click to collapse
@ruqqq for the XTheme engine.
CM team for the Theme chooser engine.
All the authors of the guides and posts.
@MrDSL for helping me out with Theme Chooser.
@mcsqwizzys98, @Rycon33, @josephnero, @peetr_ and many others over on the Xperia T forum (sorry if i forgot anyone).
@Brut.all, @iBotPeaches, @JesusFreke, @Daneshm90, and @raziel23x for apktool, smali/ baksmali, apkManager/multiTool,
@rovo89 and @Tungstwenty for making this possible with Xposed framework.
@vicino for using Honeycomb theme as an example.
Everyone else who they credited.
Click to expand...
Click to collapse
Q.Why does the ported theme not look 100% as the original theme?
A.
ruqqq said:
There are 2 reason for this. Firstly, as stated in the previous post, styles.xml is not working for XThemeEngine. Hence, the ported themes would not work 100%. For better success, port a theme which is closer to Holo styles (dark background, bright text). Second reason, which is the most common reason, is that the theme is made for CM10. CM10 is very close to AOSP while your device which is running stock rom only retain some parts of AOSP. The theme need to be properly ported (analyze your stock rom frameworks and redirect the proper files in your ported theme etc.) to fully support your device.
Click to expand...
Click to collapse
Q. My theme is not recognized.
A. Make sure you have permissions in the android.manifest.xml.
Code:
<uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
Q. Nothing is themed!?.
A. You must have a "redirections.xml" and package.xml's in the "res/xml" folder
If you plan on releasing any ported themes then ask the author of the theme for permission and give credits and link back to their thread. Not only is this good community manners, it's XDA rules.
XDA rule 12:
12. Using the work of others.
If you are developing something that is based on the work of another Member, you MUST first seek their permission, and you must give credit to the member whose work you used. If a dispute occurs about who developed / created a piece of work, first try to settle the matter by private message and NOT in open forum. If this fails then you may contact a moderator with clear evidence that the work was created by you.
Convincing evidence will result in copied work being removed. If there is no clear evidence you created the work then in the spirit of sharing all work will remain posted on the forums.
As an addition, developers have the right to hold exclusivity over their work for as long as it is deemed necessary by the dev or freely share it. However, if the work is claimed as exclusive, it must remain as such. No selective sharing will be allowed (ie allowing certain people to use it and not others). Should the dev decide to start sharing the work with others, the work automatically becomes fair game for all to use.
In regards to permissions, same rules remain for this but if permission was already given, unless there is a very valid reason, it cannot be revoked (same applies to major updates on the work). Under that same premise, permissions cannot be denied unless the work is exclusive or under severe circumstances.
In plain English: If you want to keep your work exclusive, go for it. However, if you are going to share your work, do it fairly.
These rules apply to all software posted on XDA (including but not limited to ROMs, RUUs, apps, games, kernels, themes, icons, etc) unless that software comes with a license that waives these rules.
Click to expand...
Click to collapse
Thanks to @vicino, as i used his "Honeycomb Lite Theme" as an example.
Awesome guide it will help many people!!!
Sent from my LT30p using Tapatalk 4 Beta
you never fail to amaze mate.thank you
very nice guide dully:good:
it's very comprehensible
i'd like to add some redirections for Xperia(coz Sony always do some funny funny things )
at android.xml:
- for screenshot dialog image
Code:
<item name="drawable/semc_ic_dialog_screenshot">@drawable/frameworks_res_ic_lock_screenshot</item>
at com_android_systemui.xml:
- for data H+
Code:
<item name="drawable/stat_sys_data_connected_h_plus">@drawable/com_android_systemui_stat_sys_data_connected_hp</item>
<item name="drawable/stat_sys_data_fully_connected_h_plus">@drawable/com_android_systemui_stat_sys_data_fully_connected_hp</item>
Rycon and his hplus icon
Sent from my LT30p using Tapatalk 4 Beta
mcsqwizzys98 said:
Rycon and his hplus icon
Sent from my LT30p using Tapatalk 4 Beta
Click to expand...
Click to collapse
hahaha, true mate, as you know i'm mostly on mobile
i'll add some more later, those i can remember
EDIT: Another option for ApkManager is TickleMyAndroid tool for de/recompiling, signing apks.
EDIT2: If you want to have a nice Sony accent theme that can blend well to any ported themes, try to mod an existing Sony accent theme. I personally used white accent(ccffffff) so the default toggles, panel clock, etc won't look out of place when using any ported XTheme theme.
Cheers fellas.:good: I've updated the guide to use the SampleTheme method as described in the XTheme thread. It seems to be less temperamental.
i port a theme flowing your guide
Bt when i click apply its shows failed please help
i m using xtheme engine beta5
only i skip step 10 is it mandatory?
Drockk_Xm said:
i port a theme flowing your guide
Bt when i click apply its shows failed please help
i m using xtheme engine beta5
only i skip step 10 is it mandatory?
Click to expand...
Click to collapse
Only if your using an OEM ROM and want the theme to work fully on your device.
Can you post your AndroidManifest.xml or post the contents and wrap code tags around it, thanks.
dully79 said:
Only if your using an OEM ROM and want the theme to work fully on your device.
Can you post your AndroidManifest.xml or post the contents and wrap code tags around it, thanks.
Click to expand...
Click to collapse
AndroidManifest.xml
PHP:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:hasCode="false" package="com.gekn.theme.Sense5.xtheme"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
<application android:label="@string/app_name" android:icon="@drawable/icon" />
</manifest>
Drockk_Xm said:
AndroidManifest.xml
PHP:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:hasCode="false" package="com.gekn.theme.Sense5.xtheme"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<uses-permission android:name="sg.ruqqq.XThemeEngine.permission.SYSTEM_THEME" />
<application android:label="@string/app_name" android:icon="@drawable/icon" />
</manifest>
Click to expand...
Click to collapse
Ok your manifest is fine, can you send me your apk or link to the original?
dully79 said:
Ok your manifest is fine, can you send me your apk or link to the original?
Click to expand...
Click to collapse
apk link
https://www.dropbox.com/s/jvd5sill84i8ga8/Sense 5 CM10.1 signed.apk
apk signed via ZipSigner
and got .zip format
then rename the extension zip to apk
Drockk_Xm said:
apk link
https://www.dropbox.com/s/jvd5sill84i8ga8/Sense%205%20CM10.1%20signed.apk
apk signed via ZipSigner
and got .zip format
then rename the extension zip to apk
Click to expand...
Click to collapse
There is no redirections.xml in res/xml.
Edit: After looking at it more that theme isnt very well constructed.
None of the images have package names designated to them, so it's a bit of a free for all inside res/drawable-*dpi.
Now that I have my Optimus pro g and have been working with this more I gotta say its more frustrating then anything..
Metamorph using zipthemer from the market seems like a better alternative.
Stuff that should work and clearly works in other areas just randomly doesn't work for no known reason.
Very fustrating..
MrDSL said:
Now that I have my Optimus pro g and have been working with this more I gotta say its more frustrating then anything..
Metamorph using zipthemer from the market seems like a better alternative.
Stuff that should work and clearly works in other areas just randomly doesn't work for no known reason.
Very fustrating..
Click to expand...
Click to collapse
Without a doubt. Now you know why I feel like I'm banging my head against a wall.
You definitely need to hide anything that is fragile and within arms reach when messing with xtheme.
dully79 said:
There is no redirections.xml in res/xml.
Edit: After looking at it more that theme isnt very well constructed.
None of the images have package names designated to them, so it's a bit of a free for all inside res/drawable-*dpi.
Click to expand...
Click to collapse
here is my apk link bro
http://d-h.st/9fQ
I have added redirections. Xml as well n added permissions as well then wat is d problem
Sent from my Galaxy GT-I9500 using xda premium
harisaduelite said:
here is my apk link bro
http://d-h.st/9fQ
I have added redirections. Xml as well n added permissions as well then wat is d problem
Sent from my Galaxy GT-I9500 using xda premium
Click to expand...
Click to collapse
Why don't you read the quide and figure it out like most people this honestly isn't really that hard at all you make redirections delete the public file and make sure yo add device specific redirections in android XML and your done-_-
Sent from my LT30p using Tapatalk 4 Beta
harisaduelite said:
here is my apk link bro
http://d-h.st/9fQ
I have added redirections. Xml as well n added permissions as well then wat is d problem
Sent from my Galaxy GT-I9500 using xda premium
Click to expand...
Click to collapse
You've quoted a post that WASN'T directed at you. It was for Drockk. And ive told you, your AndroidManifest is messed up. Use the one from the SampleTheme.apk just like the guide describes and i guarantee it will work.

[GUIDE]GUI - SignApk Jar File Tutorial to Sign and Align APKs

Hello guys,
I am here with an easy to use application about creating your own keystore to sign APKs and align them.
Requirements:
JDK - Download from www.java.com
sign.jar - Download HERE - APK-Signer 1.8.3 by Hai Bison - working link as of 05/03/2016
Please note that you need to have JDK installed in system for jar files to work.
INITIAL SETUPS
Assuming that you have JDK installed, download sign.jar and extract in anywhere you can navigate easy.
I have it in "C:/apktool"
Open Command Prompt (click Start > type cmd in search box and press enter)
Navigate to folder where you extracted jar file, in my case "c:\>cd apktool".
Type, "java -jar sign.jar"
The writing things ends here and you will see application opened in GUI - as follows
{
"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"
}
CREATE KEYSTORE
Now, we will need to first create a keystore file,
Click on "Save As" in Target Tab and name the file anything, i named it "signedOne"
Click on Save Button
Now We will need to fill the form a little,
In Password, type any password you may remember
in Alias, type any name, usually that should be similar to your UNSIGNED apk file name
Give an Alias Password (for ease, keep it same as password above)
In Name field, Type your first and last name,
This is the minimum required in form, if you want to fill full form, thats upto you.
Click on Button "Generate Keyfile"
Wait until message appears, "Keyfile Generated Successfully". Press OK
SIGN APK
Now its time to sign the APK. - Click on "Signer" Tab.
First, Click on button "Load Keyfile"
Browse for the same keystore file you created, in our case, if you kept the name same as mine, that will be "signedOne.keystore"
Type the password you gave while creating the keystore file.
You will see alias name appearing automatically below if password was correct.
type the alias password you gave earlier.
Click on "Load Target File" and browse for the APK file you want to sign. In my case "whatsapp.apk"
Click on "Sign" button
Wait until the dialog appears, "File Signed"
You will see a new file whatsapp_SIGNED_UNALIGNED.apk in the same folder where whatsapp.apk was already present
ALIGN APK
Click on APK Alignment Tab
Click on "Load APK file" button
Browse for "whatsapp_SIGNED_UNALIGNED.apk
Click on "Align" button
Wait until the message appears "Alignment done, output file: "whatsapp_SIGNED_ALIGNED.apk"
Optional - If you want to verify the alignment, click on "whatsapp_SIGNED_UNALIGNED" button - note that after the alignment, the button name remained same
browse for "whatsapp_SIGNED_ALIGNED.apk
Click on button verify
it will give you a message, "Verification succesful"
TROUBLESHOOTING​
If you get java,util exception error, you need to use JDK-6 or lower and give its path in JDK target adress bar
JDK-7 and plus have changed something for which APK signer doesnt sign APKs
Plz click Thanks buttong if it helped u
???
Hey you wouldn't happen to know what im doing wrong in resigning the latest flash player ics.apk from http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html im trying to change the user agent and version with a hex editor. So I thought that editing the lib file was goofing it up so I just tried to simple extract the apk and resign it and it still wont work.
Any ideas what wrong?
delete
seraphim5 said:
Hey you wouldn't happen to know what im doing wrong in resigning the latest flash player ics.apk from http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html im trying to change the user agent and version with a hex editor. So I thought that editing the lib file was goofing it up so I just tried to simple extract the apk and resign it and it still wont work.
Any ideas what wrong?
Click to expand...
Click to collapse
Its better to compile the apk back using apktool.
If you are first time using this tutorial above, maybe youare are not creating the keystore file. Can you post the apk here for me to look at it?
Sent from my GT-I9100 using xda app-developers app
Download Zipsigner from playstore . It will help you to sign your app through your mob. device .
Sent from my GT-S7562 using XDA Premium 4 mobile app
hello
broken apk signer link fixed.
thanks
Error while signing file. Details:
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date(2040-04-01) or after and future revocation date.
End of line
No signed apk is created. Any ideas?
bwarrington85 said:
Error while signing file. Details:
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date(2040-04-01) or after and future revocation date.
End of line
No signed apk is created. Any ideas?
Click to expand...
Click to collapse
Its because you need to create a key first, before signing the apk
Sent from my TURBO DG2014 using XDA Free mobile app
munnibhai said:
Its because you need to create a key first, before signing the apk
Sent from my TURBO DG2014 using XDA Free mobile app
Click to expand...
Click to collapse
Well I followed the directions above.. Hmm
bwar85 said:
Well I followed the directions above.. Hmm
Click to expand...
Click to collapse
Were you able to resolve the issue? Or else please attach your apk and i have a look on it
Sent from my TURBO DG2014 using XDA Free mobile app
munnibhai said:
Were you able to resolve the issue? Or else please attach your apk and i have a look on it
Sent from my TURBO DG2014 using XDA Free mobile app
Click to expand...
Click to collapse
No, I am trying to mod a cm12 theme from the playstore. I am simply trying to replace images in the apk. I am NOT trying to release the modded apk, it is for my enjoyment only. Isnt that what your jar does?
bwar85 said:
No, I am trying to mod a cm12 theme from the playstore. I am simply trying to replace images in the apk. I am NOT trying to release the modded apk, it is for my enjoyment only. Isnt that what your jar does?
Click to expand...
Click to collapse
jar file is working perfectly, there is some problem with your theme, keystore file most probably. how did you extraxt the apk? with 7zip or apktool?
munnibhai said:
jar file is working perfectly, there is some problem with your theme, keystore file most probably. how did you extraxt the apk? with 7zip or apktool?
Click to expand...
Click to collapse
I used apktool. I give up on trying to edit apks. There are no tutorials that work.
bwar85 said:
No, I am trying to mod a cm12 theme from the playstore. I am simply trying to replace images in the apk. I am NOT trying to release the modded apk, it is for my enjoyment only. Isnt that what your jar does?
Click to expand...
Click to collapse
bwar85 said:
I used apktool. I give up on trying to edit apks. There are no tutorials that work.
Click to expand...
Click to collapse
I am sorry to hear about that, well, apk editing isnt diffictult, apart from decoding java files and then actually coding them again (lets leave it to java programmers)
About editing graphics and XMLs in apk, its easy, ask me anything you want.
bwar85 said:
No, I am trying to mod a cm12 theme from the playstore. I am simply trying to replace images in the apk. I am NOT trying to release the modded apk, it is for my enjoyment only. Isnt that what your jar does?
Click to expand...
Click to collapse
ok, I got to the root of error.
The problem is JDK8 and 7 too probably. The jarsigner provided with these 2 versions, is timestamped now and while we try to sign an apk using the sign.jar, jarsogner isnt finding any timestamp on it.
So you will either need to downgrade to JDK6 (just install as additional and give path to it in sign.jar) and it will work
munnibhai said:
ok, I got to the root of error.
The problem is JDK8 and 7 too probably. The jarsigner provided with these 2 versions, is timestamped now and while we try to sign an apk using the sign.jar, jarsogner isnt finding any timestamp on it.
So you will either need to downgrade to JDK6 (just install as additional and give path to it in sign.jar) and it will work
Click to expand...
Click to collapse
I was using either 8 or 7.
I will try 6 and post results
bwar85 said:
I was using either 8 or 7.
I will try 6 and post results
Click to expand...
Click to collapse
Well your sign.jar completed all tasks with no errors and the app installs but is then rejected by the cm12 theme engine and automatically uninstalls.
So I took the original cm12 theme apk, removed the Meta-inf folder, used sign.jar, and it works.
My error must be in editing the .pngs images within the theme I'm guessing. Im using photoshop 7 to invert colors on the .pngs and saving. Why does changing the .pngs affect the apk from installing I wonder?
So I'll give thanks, your sign.jar does infact work with JDK 6
*edit: Cant give thanks? Hmm no thanks button...
bwar85 said:
Well your sign.jar completed all tasks with no errors and the app installs but is then rejected by the cm12 theme engine and automatically uninstalls.
So I took the original cm12 theme apk, removed the Meta-inf folder, used sign.jar, and it works.
My error must be in editing the .pngs images within the theme I'm guessing. Im using photoshop 7 to invert colors on the .pngs and saving. Why does changing the .pngs affect the apk from installing I wonder?
So I'll give thanks, your sign.jar does infact work with JDK 6
*edit: Cant give thanks? Hmm no thanks button...
Click to expand...
Click to collapse
I am glad that it worked afterall.
1. About the PNGs, there are some with .9 extension in them, if you noticed, they have those black lines around them which must not be touched, they have to be with #000 color. This could be one of problems while you just changed colors.
2. Another issue maybe RGB profile (I am not sure if this setting is available in Ph.7) of photoshop, so goto Edit : Color Settings : RGB : <select "Monitor RGB">. Save and Restart.
Let me know if it worked.
munnibhai said:
I am glad that it worked afterall.
1. About the PNGs, there are some with .9 extension in them, if you noticed, they have those black lines around them which must not be touched, they have to be with #000 color. This could be one of problems while you just changed colors.
2. Another issue maybe RGB profile (I am not sure if this setting is available in Ph.7) of photoshop, so goto Edit : Color Settings : RGB : <select "Monitor RGB">. Save and Restart.
Let me know if it worked.
Click to expand...
Click to collapse
It was the .9.pngs. Messed up the black lines... Fixed and it all works! Thanks for the cool jar!
Please help "FileNotFoundException: .x509.pem"
Thank you, your method works well good for all app.
But for this application "Advanced Permission Manager" by steelworks on google playstore.
Signed process working well, app initially runs good but app main function not working after repacking apk and signed.
It will throw exception "FileNotFoundException: .x509.pem"
What is that exception? I tried every method, I searched whole internet no single solution.

[GUIDE[CM11] How to create themes for the new Theme Chooser

{
"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"
}
- Section One -
Hey guys! I'm back again with another contribution to the community, this time I'm posting a guide on behalf of my theme, Svelte UI.
I have noticed there is a very few amount of theme's available for the new CyanogenMod Theme Chooser out there. And hopefully I can change this.
This guide will cover everything needed to create a Theme, from creating the initial project to theming itself. And some tips on how I theme.
And to make all you lovely people even happier. I will provide all code and even a sample .apk
And also I don't want to add screenshots of my desktop to this thread, because the resolution will be way to big. Instead I'll have links. So let's get started shall we?
VIDEO TUTORIALS
[x] One - Create Project
[x] Two - Initial Setup
More coming.
- Section One -
This section is vital for you to accomplish your theme, so please do not skim through it.
For the requirements, you need an IDE. Yes I will be showing you how build the theme from scratch and not a template.
Use an IDE that you're comfortable with, I wont be showing yo how to use it. I will be using Eclipse for this tutorial.
You will need an image editing program, I am going to use Paint.NET. It's free, advanced, and does the job as good as Photoshop.
We are also going to need patience. Yeap. Theming takes allot of time and patience, it is frustrating especially if you're doing precise editing but it's worth it at the end.
One more thing we are going to need is, an APK decompiler. So download one you like, install the required .apk's for it to work properly.
Then get hold of the SystemUI.apk and Framework-res.apk, we're going to use this later.
- Section One -
Okay, now go ahead and open up your IDE, and create a new Project, give it a name and an appropriate package name.
For example mine is "Svelte UI" and "com.ascendapps.sui". [View Screenshot]
Now click next till you end the project setup. Once your project has been created.
- Section Two -
Go ahead and delete the following folders.
[src, layout, menu, values-sw600dp, and values-sw720dp-land also delete drawable-ldpi if you want] [View Screenshot]
Now in the values folder, create a new xml and call it "public.xml" and make sure to delete the "dimens.xml" file.
Inside the xml file (public.xml) add the following code - [View Screenshot]
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<public type="drawable" name="ic_launcher" id="0x7f020000" />
<public type="string" name="app_name" id="0x7f030000" />
<public type="style" name="AppBaseTheme" id="0x7f040000" />
<public type="style" name="AppTheme" id="0x7f040001" />
</resources>
- Section Three -
Now go ahead and save it. Make you save things when working throughout your project, better be safe than sorry.
Open up AndroidManifest.xml, and add the following code and do what it tells you - [View Screenshot]
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="7" android:versionName="1.0" package="com.ascendapps.sui" <!-- Enter the package name of your project that you had done in the setup earlier -->
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="org.cyanogenmod.theme" android:required="true" />
<application android:label="Svelte" android:icon="@drawable/ic_launcher" android:hasCode="false" /> <!-- Change label to theme name -->
<meta-data android:name="org.cyanogenmod.theme.name" android:value="Svelte" /> <!-- Name of Theme -->
<meta-data android:name="org.cyanogenmod.theme.author" android:value="Krish Gounder" /> <!-- Your Name -->
</manifest>
.
Please make sure to delete the Info statements once you've finished editing the xml.
For example delete the lines in green. Which is the following -
Code:
<!-- Your Name -->
<!-- Name of Theme -->
<!-- Change label to theme name -->
<!-- Enter the package name of your project that you had done in the setup earlier -->
- Section Four -
Now save your project, and close everything. Once closed, navigate to your project workspace. In there you should see your projects name.
Like this . [View Screenshot]
Open the the project then inside the work folder open the "Assets" folder. This is where everything comes to life.
Go ahead, and create the things you want to be included in your theme.
- fonts - If you wish to use different fonts in your theme.
- images - The images that are displayed when applying the theme.
- overlays - You must create this folder, this is where all the theming images are kept.
- wallpapers - If you want to add a wallpaper to your theme. Use .jpg
- bootanimation- Add a .zip file of your bootanimation in here.
- alarms - If you want to add alarm sounds to your theme.
- lockscreen - Add a lockscreen wallpaper. Use .jpg
- notifications - If you want notification sounds.
- ringtones - If you want to have ringtone sounds.
I will be using images, overlays and wallpapers.
So inside the images folder you will need -
lockscreen_preview.jpg if you are having a lockscreen wallpaper.
styles_preview.jpg just add your wallpaper.
wallpaper_preview.jpg Just use the wallpaper and add an icon in the middle of the image.
Add your wallpaper in the wallpapers folder and name it - wallpaper1.jpg
[Screenshot One] - [Screenshot Two] Now we've completed this section.
- Section One -
For theming you'll need a reasonable image editing software, Paint.NET works quite well.
So you want to know how to theme apps and components? Let's start with the framework-res.apk.
Earlier, I had stated that you'll need an APK Decompiler. So using the decompiler, decompile the framework-res.apk.
Open up to decompiled project and navigate to the folder you wish to work on. for example, drawable-xxhdpi.
Now in your theme work folder, go into "overlays" and create a folder called "android"
Inside there, create a folder called "res" and inside "res" create drawable-xxhdpi or the folder you chose.
Now go back to the project you decompiled earlier, and copy in all the .png files that you know you'll theme.
- Section Two -
How to them other apps and get it to work. the way the theme chooser knows what to them is by package names.
So if you want to theme an app you''l need to find out it's package name. For example Instagram is - com.android.instagram
If you make a folder with that name, and inside you have to create the res folder, it's basically the same layout but the initial name is the package name.
- Section Three -
It's often weird to work with .9.png's when you come face to face with it the first time. The best way to edit them is by working with the image inside the borders.
By this I mean, when you open the image in an editor it has these black lines around the edges, using a selecting tool. select everything inside the border, and do not select the border.
These borders help the Android system with stretching the image.
CREDITS -
[x] Me for preparing this guide.
[x] CyanogenMod Team for the Theme Chooser.
[x] Imgur
[x] XDA
[x] Eclipse
[x] QuickMod Dev
[x] And curiosity.
RESERVED
This section is user based, so if you need help with theming something.
Let me know and I'll update this thread post and I'll directly link you to the info.
When theming a specific application, whether it's a system app or a normal app.
You will need to give the folder the package name so the system knows what to theme.
So if you want to theme the settings app you'll have to name the folder "com.android.settings".
Thanks to @Vincentmrl He requested me to add these so people have a better idea and don't get confused.
The names on the left correspond to the app to right.
android (framework-res.apk)
com.android.dialer (Dialer.apk)
com.android.email (Email.apk)
com.android.keyguard (Keyguard.apk , lockscreen theming)
com.android.settings (Settings.apk)
com.android.systemui (SystemUI.apk)
I will be adding more to these. And easy way of finding the apps package name is by looking at its PlayStore url.
Or by checking in android app manager.
- Section One - Add your own custom background
First of all, you'll need to create or find your own image.
Make sure it's a reasonable size, this is basically a common sense statement.
Don't use a really small image. Okay once you've gotten your image.
Change the name of the image to the following - background_holo_dark.png
Place this image in the following folder - /overlays/android/res/drawable-nodpi
Once done, you need a way for the system to find the image, you can do this by creating a new styles.xml in the values folder.
So go ahead and create a file named styles.xml in the values folder.
The next thing you have to do is add this code inside your xml file.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Black" parent="@*android:style/Theme">
<item name="android:colorBackground">@color/transparent</item>
<item name="android:windowBackground">@drawable/background_holo_dark</item>
</style>
</resources>
Save the file and you're done.
Thank you guy, I love it, maybe I'll do one
GæxD said:
Thank you guy, I love it, maybe I'll do one
Click to expand...
Click to collapse
Goodluck! let me know when you make it. I'll be glad to check it out. :]
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
Goodluck! let me know when you make it. I'll be glad to check it out. :]
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Thanks again
I have one question, how to change this colors? Example, I marked the colors in red:
The switch button can be change in the framework-res.apk.
And the text can be changed in colors.xml. it should be displayed as "primary_text" and "secondary_text".
Edit - You may need to look in Settings.apk for the text colors. If they don't work, then look for it in framework-res.apk.
It will be a trial and error thing, so you'll have to test many times.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
The switch button can be change in the framework-res.apk.
And the text can be changed in colors.xml. it should be displayed as "primary_text" and "secondary_text".
Edit - You may need to look in Settings.apk for the text colors. If they don't work, then look for it in framework-res.apk.
It will be a trial and error thing, so you'll have to test many times.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Okay
You can make a tutorial explaining better this part of colors and others things to put in OP. Other peoples may also have the same doubt =)
GæxD said:
Okay
You can make a tutorial explaining better this part of colors and others things to put in OP. Other peoples may also have the same doubt =)
Click to expand...
Click to collapse
Thanks, I will be sure to add more info about this when I prepare it later.
I look forward
I have a theme in the works. ?
HI thank you for the guide but i keep getting 'Errorublic symbol style/AppBaseTheme declared here is not defined.' while using android studio. how do i solve this? it wont let me compile my apk.
RealiableCandy4 said:
HI thank you for the guide but i keep getting 'Errorublic symbol style/AppBaseTheme declared here is not defined.' while using android studio. how do i solve this? it wont let me compile my apk.
Click to expand...
Click to collapse
Use eclipse dude, with one click you install your apk on device and test the theme
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting an error whenever I try to create the public.xml file. Any ideas?
torresfelipe said:
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting a error whenever I try to create the public.xml file. Any ideas?
Click to expand...
Click to collapse
Eclipse Kepler, is the current one. I don't think you need a specific version.
Sent from my Nexus 5 using Tapatalk
torresfelipe said:
What version of Eclipse are you guys using? I downloaded the Standard version and it keeps me prompting an error whenever I try to create the public.xml file. Any ideas?
Click to expand...
Click to collapse
Eclipse Standard/SDK
Version: Kepler Service Release 2
Build id: 20140224-0627
Thanks guys. I might have done something wrong, but it's working now. I'm using the latest release, 4.4 Luna.
GæxD said:
Use eclipse dude, with one click you install your apk on device and test the theme
Click to expand...
Click to collapse
Thanks for the reply i fixed it by adding
Code:
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"></style>
in the styles.xml file
I used Generator to generate png/9.png files of my theme. Problem is that all of files look like this themename_background.png, themename_tab.png etc. (you know what i mean). How to make theme work with that named images? I need to edit some code to audo add this or how? Its not so easy to rename all pngs (takes alot of time)
I just cant do it.Downloaded eclipse with android SDK and aplication wizzard isnt that easy: next, next, next. Also i dont have folders what you said to delete... For me (newbie) its useless guide.. Just trying and still cant do anything because dont know how...
And finally when i will make any project how to build it to be ready to install?
@baciany Check your Pm
@TheArc;
Which APK Decompiler do you use? Do you think that something simple as http://www.decompileandroid.com/ would work?

Categories

Resources