[Tutorial][Linux]Themer's Portal and Guide - Samsung Galaxy Nexus

"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.

Related

[REQ] App to compare 2 similar archives (find differences)

The title kinda sums it up. I'm looking for an app (not necessarily for android) that will compare 2 archives, say apk files, and show the files that are "different".
My ideal use would be to compare modified apk's, e.g. a stock apk and a modded, to show which files, in compiled state obviously, have been modified, added, or removed.. just to facilitate learning. Another use case: I have a ton of apks I've modded and it would be helpful to scan them, and return a report saying, "these 2 apks are identical except for those 2 pngs in the blabla folder."
Anyone feelin me here? Or does anyone use a different method? (Besides just being really organized)
this is all i can find if you find anything better please let me know
http://www.softpedia.com/get/Programming/Debuggers-Decompilers-Dissasemblers/Compare-Archives.shtml
http://www.extradata.com/products/jarc/
http://www.tothepc.com/archives/compare-jar-zip-files-jarcomp-comparison-tool/
thanks man! checking them out
decalex said:
thanks man! checking them out
Click to expand...
Click to collapse
i hope they work i have not got to try them yet and been looking for the same thing. let me know how it goes
There is a midnight commander port to android. I'm not sure if it supports archives or not but it sounds like it'd be exactly what you need if it does.
Sent from my SPH-D700 using Tapatalk
schnowdapowda said:
There is a midnight commander port to android. I'm not sure if it supports archives or not but it sounds like it'd be exactly what you need if it does.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
where can we find this
decalex said:
The title kinda sums it up. I'm looking for an app (not necessarily for android) that will compare 2 archives, say apk files, and show the files that are "different".
My ideal use would be to compare modified apk's, e.g. a stock apk and a modded, to show which files, in compiled state obviously, have been modified, added, or removed.. just to facilitate learning. Another use case: I have a ton of apks I've modded and it would be helpful to scan them, and return a report saying, "these 2 apks are identical except for those 2 pngs in the blabla folder."
Anyone feelin me here? Or does anyone use a different method? (Besides just being really organized)
Click to expand...
Click to collapse
If they are yours
Well this is how i do it.
I decompile first apk using Apk tool
Open project folder and copy the nameofapkhere.apk folder and paste into folder call it say version 1.
decompile second apk using Apk tool
Open project folder and copy the nameofapkhere.apk folder and paste into folder call it say version 2.
Open FolderMatch available here -> http://www.foldermatch.com/fmwindiff1.htm
setup all dependencies and then run the and it can even do md5 check, and line by line check.
Use filter of as many kind as you like date time, size, etc what ever
I have notepad++ installed with some add ons, and you can open the simali from within the folder compare and they display as seperate tabs within the same notepad ++ application. You can then run a line by line compare of the simali code with the compare add-on.
Back in FolderMatch you can synch certain files or even parts of files or you can cut n paste code of your choice to your second apk.
You can repackage again then afterwards....but we are saying that you're comparing two of your own apks
If your comparing R...zip files then side by side visually within 7zip you can se date stamps alone and usually the file system type i.e. FAT and so on.
James
Thanks James! I really like this for comparing, for example, the new Google voice update with the previous ver , both for theming and to get a real change log.
I'll check that out.
•°NS4G • ICS°•

[TOOL] [01/23/11] Android Customization Suite 1.0 - devs read me!

Android Customization Suite 1.0
This is a program to complement your ROM. It is able to produce a CWM flashable zip with apps your ROM might be missing (T-Mob ones, launchers, utilities, etc). It also has other tools available for you. It can produce an empty flashable zip for you (read more about it here). And now, it has "repositories." Developers can upkeep their own repos with whatever files they wish. Roms, themes, mods, etc.
need i9000 Devs to talk to me to get their work added on here!
in the mean time, you guys can mess with the Utilities in the Vibrant section just to get a feel for it
Screenshots
{
"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"
}
Older Screenshots:
Repo Tab 0.999
Repo Tab
Utilities Tab
Launchers & Misc Tab
Vibrant Apps Tab
System Tab
Instructions
Download. Note: you must have Java installed to run this app
WHILE YOU ARE DOWNLOADING MAKE A NANDROID BACKUP
Unzip the folder. Please keep it intact. Moving files around in there will probably break the functionality.
Run ACS.jar.
Choose desired apps.
Wiping Dalvik cache is recommended, but it will take you about 5 minutes to boot
Copy flash.zip to your internal sd card
Flash with CWM
Linux users: if you are running Linux I advise you to use the run.sh file to run the program, otherwise it may use your home directory to store files
Mac users: you need to have java 1.6 installed for this to work. i tested this on a friend's mac (running 10.5.8 & java 1.5) and it wasn't working. also i was not able to update her java to 1.6 either. so i'm assuming you need to have snow leopard installed for this to work...
Devs:
Check out this reference guide for more info on setting up a repo list. Feel free to contact me for any clarification. It's really not hard to do it, just have to understand how the app works a little. The guide should give insight and instruction. Contact me to add your repo to the list.
Options Note
If you want to change the location of system apps, please make your selections first THEN change the location
Change Log
v1.0
-finished gui changes, no more tabs
-added menu bar with options option
-couple bug fixes from .9999999
v0.999
-redesigned gui
-everything is in form of a repo now (or will be at v1, too lazy to do launchers tonight)
-added functionality for different phones
-changed the way the app checks files against the server, should be much more efficient & faster
-need a new name!
v0.86
-bug fixes
-location of system apps (in the options tab) now works
v0.85
-repo functionality added
--any devs, feel free to contact me to add a section for your rom/mods/whatever
--the "repo" is maintained by you and is updated automatically when you update it, no need to recompile the app
-options tab
--new option to specify where you'd like to store apps that would originally go in /system/app currently may not work, need some script help from a dev to fix this D:
-download percent for convenience and downloading large files
-did i mention there's a repo?
v0.7 Beta
-couple GUI changes to make it prettier
-new feature to create blank CWM zips for your use, read more about it here
v0.6 Beta
-improved code to download from online server & error checking
-added modems
v0.5 Burly Beta
-Basically rewrote program...
--should be more efficient now, too
-Initial online implementation
--hopefully my web host can handle the traffic
-icon is missing, after 8 hours of working on 0.5 i'm not going to fix it right now
-file size down to less than 150k
v0.4 ALPHA
-KERNELS & MODEMS NOT INCLUDED IN THIS UPDATE, SORRY
-TouchWiz Launcher Widgets will not be added along with the launcher
-added progress bar (along with rewriting some code to make it more efficient)
-added a rename box, you can now name your .zip whatever you like
-added more tmobile bloat (sigh)
-the application will not recognize APKs and files outside of itself, so for instance if you have an APK that you want to add just put it in the corresponding folders.
-- for instance my VCK.jar is in folder /vck/, i want to add hi.apk. I could move it to /vck/data/app/hi.apk and when you click generate zip, the program should include it. please contact me if this is unclear or you have questions, this is only a minor feature
v0.3 ALHPA
-Renamed to Vibrant Customization Kitchen (thanks BruceElliot)
-re-organized tabs a little
-fixed bug where program would not work properly after generating a zip (thanks jdanisevich)
-Launchers & Misc tab should work
v0.2 ALPHA
-Most Vibrant Apps added (missing TMO TV & Media Hub for now)
-Misc Tab works now (minus GB keyboard, didn't work for me for some reason)
v0.1 ALPHA
-Initial Release
Current Known Bugs
-Please report any bugs you may have!
-If you do encounter a bug, restarting the program and trying again may help.
If you like this Tool, hit the Thank you button!
github - I don't really know what I'm doing with git, but here's my attempt at publishing it
Credits
-Scrizz - doing the hard work on the modems
-Heathen - script help
-Morfic, Eugene, Supercurio for their work (and allowing me to use their kernels)
-all ROM devs
-everyone else in this community who always help
Media Mentions
XDA Front Page (v0.3)
Android Spin (v0.4)
Sure, a universal kitchen is a great idea
+1
sounds like a good idea
I'm interested! This might be the tool that can enable noobs to cook their custom roms, if I understand it correctly.
A few questions though:
Where does the tool obtain the apps? From the web, or from your own computer?
Does it include the capability of de-odexing the /system/app and /system/framework? Would that be too much to add?
Optimize and zipalign capability? Can that be done too?
Is this an alternative to the online kitchen, like paulobrien, leshak or others, but in this case, the tool resides in your comp, and not from the web?
If you don't mind, please elaborate a little more.
There are many budding chefs here and I'm quite certain a number of people would be interested.
Very much obliged.
Sent from my GT-I9000 using XDA App
g00ndu said:
I'm interested! This might be the tool that can enable noobs to cook their custom roms, if I understand it correctly.
A few questions though:
Where does the tool obtain the apps? From the web, or from your own computer?
Click to expand...
Click to collapse
From the web. Most of the stuff is hosted on my web host, couple of guys have their stuff linked on their hosting.
Does it include the capability of de-odexing the /system/app and /system/framework? Would that be too much to add?
Click to expand...
Click to collapse
It doesn't. It depends, I'm not so great at developing ROMs and such. Just trying to help where I can.
There are already tools to do this though, right?
Optimize and zipalign capability? Can that be done too?
Click to expand...
Click to collapse
Again depends what is involved in the process, I don't know much about either.
Is this an alternative to the online kitchen, like paulobrien, leshak or others, but in this case, the tool resides in your comp, and not from the web?
If you don't mind, please elaborate a little more.
There are many budding chefs here and I'm quite certain a number of people would be interested.
Very much obliged.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Not so much an alternative, but it's more of a ROM-complement.
It has the ability to eventually cook ROMs, but I'd have to code another module that would handle this. It might get pretty code intensive and not so efficient in Java as it is probably on these online kitchens.
birgertime said:
....
Not so much an alternative, but it's more of a ROM-complement.
It has the ability to eventually cook ROMs, but I'd have to code another module that would handle this. It might get pretty code intensive and not so efficient in Java as it is probably on these online kitchens.
Click to expand...
Click to collapse
Thanks for taking the time to answer this. Appreciate your help in extending this to the international i9000 users.
I look forward to testing your tool.
Sent from my GT-I9000 using XDA App
birgertime said:
From the web. Most of the stuff is hosted on my web host, couple of guys have their stuff linked on their hosting.
It doesn't. It depends, I'm not so great at developing ROMs and such. Just trying to help where I can.
There are already tools to do this though, right?
Again depends what is involved in the process, I don't know much about either.
Not so much an alternative, but it's more of a ROM-complement.
It has the ability to eventually cook ROMs, but I'd have to code another module that would handle this. It might get pretty code intensive and not so efficient in Java as it is probably on these online kitchens.
Click to expand...
Click to collapse
Yeah, there are already tools which are able to cook custom ROMs, deodex them, zipalign them, and otherwise perform modifications on them. I think this sounds like a great idea; however I'd just keep it as a complement to a ROM, not an entire replacement for a kitchen.
Good work.
Windows Only?
Edit: Sorry. Didn't read. Java. Allrighty then
seeARMS said:
Yeah, there are already tools which are able to cook custom ROMs, deodex them, zipalign them, and otherwise perform modifications on them. I think this sounds like a great idea; however I'd just keep it as a complement to a ROM, not an entire replacement for a kitchen.
Good work.
Click to expand...
Click to collapse
Of course there are tools available to do those, but currently, these tools are fragmented and spread all over, thus making it difficult for budding chefs.
While an online kitchen is good, I have my reservation as well. It does limits the rom choices. Everyone is dictated by the developer on which rom he will put in, and lesser known roms will be left out.
Perhaps at this point of time, an integrated approach might be too premature.
I really look forward to the day when such a kitchen exists for users who can have the freedom to choose what rom they want to put in.
Sent from my GT-I9000 using XDA App
Nice one. I'd love to give it a go
g00ndu said:
Of course there are tools available to do those, but currently, these tools are fragmented and spread all over, thus making it difficult for budding chefs.
While an online kitchen is good, I have my reservation as well. It does limits the rom choices. Everyone is dictated by the developer on which rom he will put in, and lesser known roms will be left out.
Perhaps at this point of time, an integrated approach might be too premature.
I really look forward to the day when such a kitchen exists for users who can have the freedom to choose what rom they want to put in.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Not really. Check out dsixda's HTC Kitchen: http://forum.xda-developers.com/showthread.php?t=633246
It's a single, cross platform tool which can do everything from deodexing and zipaligning to adding root, to signing an APK, etc. It's an extremely powerful (and I believe user-friendly) tool which budding chefs are able to use in order to learn more about ROMs and Android in general. Personally I think it'd be a good idea to just keep these two applications separate (kitchens + this ROM complement) and just focus on providing as much functionality within this tool as possible as opposed to focusing on both.
Users are able to choose any ROM they want, add any applications / themes they want, etc. Essentially the user has total freedom.
Also, if you need any help with this application birgertime, I'd be glad to provide a hand.
seeARMS said:
Not really. Check out dsixda's HTC Kitchen: http://forum.xda-developers.com/showthread.php?t=633246
It's a single, cross platform tool which can do everything from deodexing and zipaligning to adding root, to signing an APK, etc. It's an extremely powerful (and I believe user-friendly) tool which budding chefs are able to use in order to learn more about ROMs and Android in general. Personally I think it'd be a good idea to just keep these two applications separate (kitchens + this ROM complement) and just focus on providing as much functionality within this tool as possible as opposed to focusing on both.
Users are able to choose any ROM they want, add any applications / themes they want, etc. Essentially the user has total freedom.
Also, if you need any help with this application birgertime, I'd be glad to provide a hand.
Click to expand...
Click to collapse
Yes, I know about this kitchen. Thanks, but also take a look at the video guide thread, so many were complaining about problems, and that makes me wonder if it is fit for use in the first place.
Anyway, I shall check up the kitchen further, thanks.
Sent from my GT-I9000 using XDA App
g00ndu said:
Yes, I know about this kitchen. Thanks, but also take a look at the video guide thread, so many were complaining about problems, and that makes me wonder if it is fit for use in the first place.
Anyway, I shall check up the kitchen further, thanks.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
I guess users with a good amount of knowledge of Android should be using that kitchen. A lot of problems in that video thread are pretty basic and able to be solved quite easily (ie not signed, symlinking problems in the update-script, etc).
It works quite well if used correctly. I guess it's just difficult for the average user to pick it up and start creating a ROM (however, I think it was intended for advanced users in the first place).
OP updated, need i9k devs to give this a go!
Looking good. Gonna test it out in a few,

TUTORIAL - modding lockscreen/framework-res.apk

*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")

noob apk decode/build tools?

hello,
just wondering if anyone can point me in the right direction?
I'm interested in doing a little bit of editing on some apk's to improve the JoyOS port. It's just little things like removing chinese characters and making some slightly better translations.
From what I can gather, most of what I want to do can be achieved by editing the "strings.xml" within some of the system apk's....like JOYsettings.apk etc.
Only trouble is, I can't find any apk editing tools that work on my windows machine. Most of the ones i've seen are java based, and tend to crash whenever the file you're working on is bigger than say 100kb :s
obviously, not good for editing main system apk's....or....pretty much any apk's.
can someone point me in the right direction for what I can use to siply decode and then rebuild the edited apk's?
Gloris said:
hello,
just wondering if anyone can point me in the right direction?
I'm interested in doing a little bit of editing on some apk's to improve the JoyOS port. It's just little things like removing chinese characters and making some slightly better translations.
From what I can gather, most of what I want to do can be achieved by editing the "strings.xml" within some of the system apk's....like JOYsettings.apk etc.
Only trouble is, I can't find any apk editing tools that work on my windows machine. Most of the ones i've seen are java based, and tend to crash whenever the file you're working on is bigger than say 100kb :s
obviously, not good for editing main system apk's....or....pretty much any apk's.
can someone point me in the right direction for what I can use to siply decode and then rebuild the edited apk's?
Click to expand...
Click to collapse
Here you go...study that in the link..and tool you specificly need is apk tool or its alternatives...just read the tut carefully...ill add youtube links if needed later
http://forum.xda-developers.com/showthread.php?t=1661770
Hope i helped....
many thanks, i'll give that a good read tomorrow...when i'm a bit less sleepy
Gloris said:
many thanks, i'll give that a good read tomorrow...when i'm a bit less sleepy
Click to expand...
Click to collapse
you can change these two lines in build.prop of your rom with winrar or 7zip to make it boot in English
ro.product.locale.language=en
ro.product.locale.region=US
Then save the changes
If you want to remove chineese apps just open system folder,then app folder and simply remove what you dont like...save the changes and flash the ROM
Hope this save you some time,cause editing apk is time and nerve consuming job...
thanks. i did remove all the things like chinese app store etc...it's just a little tweaking basically of the settings.apk and some other apps that have some pretty iffy translations. my favourite so far is that instead of "low battery warning" it says "low electrical quantities"
::EDIT::
think i'm gonna give up lol.
i have apktool working, it decompiles fine, but as soon as i go to recompile (even if i make no changes) it gives at brut.androlib errors all the time.

touchwiz hooks?

Hey
Im a comp sci student just trying to widen my programming experience. And since im out of ideas/bored of writing stuff that has no use I want to try out some Android development, since I already know Java.
Just creating apps does not appeal to me, so I want to write xposed modules.
I started this journey today so dont judge.
I followed this guide: https://github.com/rovo89/XposedBridge/wiki/Development-tutorial and tried
to do the clock example on my Samsung s7 edge. I get to the point where I can activate the module in xposed and all that, but the clock does not change.
My thought was, since touchwiz is as far from stock as possible, is "com.android.systemui.statusbar.policy.Clock" - "updateClock" the wrong method to hook?
Is there any "easy" way to see touchwiz methods, like AOSP?
Also... Question number two:
How do I find methods to hook in other apps, say Twitter for example?
Thanks!
bump?
20 views no answers... Howe the **** do u learn xposed i there is no proper in-depth teaching site? This forum is dead...
If you want to find out how system on your device works (in case it's different from AOSP) the only way is to do some reverse engineering. Which means taking and decompiling system framework related files and then go through the code which when decompiled is in form of "smali" files. (SystemUI in case of status bar). There are guides for decompiling so you'll have to go through some research.
The same applies to 3rd party apps like Twitter (or better to say all those that don't have source code publicly available).
Thank you so much for the answer!
So I have to decompile all of touchwiz?
Seems like I should just start with android apps since this is such of a large process.
I have APK studio, and understand the smali files, can I hook the methods in these? Would really like a more explanitory tutorial.. (im not telling u to write one )
Thanks again for answering!
Referring to your original post about trying to hook status bar clock. You have to decompile SystemUI apk which contains all status bar related code and logic. From decompiled source you can find out how status bar clock is implemented to be able to decide what method and in what class you need to hook to achieve desired functionality.
How do I find the SystemUI apk? I found an incredible tool online that decompiles apks to pure Java.
Does anyone know if samsung uses the same SystemUI as in AOSP github project? In that case I would'nt even need the tool.
Again, thanks for all your replies, you have been a BIG help.
http://stackoverflow.com/questions/...work-hooking-samsung-s7-edge-system-processes
Posted this on stack, but no replies so far, they tend to be super quick otherwise..
Kewkpad said:
How do I find the SystemUI apk? I found an incredible tool online that decompiles apks to pure Java.
Does anyone know if samsung uses the same SystemUI as in AOSP github project? In that case I would'nt even need the tool.
Again, thanks for all your replies, you have been a BIG help.
http://stackoverflow.com/questions/...work-hooking-samsung-s7-edge-system-processes
Posted this on stack, but no replies so far, they tend to be super quick otherwise..
Click to expand...
Click to collapse
Maybe try logging package name eveytime handleLoadPackage is called. You will get a list of all packages that system loaded from which you might be able to determine which one is SystemUI.
Code:
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
XposedBridge.log("Loading package: " + lpparam.packageName);
}

Categories

Resources