[Tips] Some tips for theming some S4 apps - Verizon Samsung Galaxy S 4

This is just a small thread i thought i would start and offer a few tips for theming apps on the S4.​
Q: How can i change backgrounds without having to modify the image inside of framework?
A: This is something i call "untying things from framework", which essentially means making the background pull locally (from the particular app you're working on) rather than getting it from framework. The way this is done is searching for backgrounds that have "android:background="@*android" Searching for this should help you find where the background is being pulled from.
Q: How can i untie everything from framework to have a standalone app theme that doesn't rely on including the 30mb+ of the framework?
A: The above can also be used in this situation. For a text color, you can search the same thing as above but replace the "background" with "textcolor". For an image, it's usually called by "android:background="@*android:drawable/". To get them called locally, remove the "@*android:" so that it becomes just "android:background="drawable/"
Q: When compiling, i get a list of errors so long that i can't see the top.
A: You're probably using the traditional apktool which can't display long enough errors to be able to see the original. When you have a long list of errors, don't fret. Usually if you just have one error, it will produce a crap ton of them. Just use a tool like apk-multi-tool and go to the very first error, fix it, then try compiling again. It can sometimes takes a few fixes to make it compile correctly.
Q: I get an error of a 9-patch image. What does that mean?
A: A 9-patch is a type of image that android uses to draw something on the screen, pretty much. It works by using a 1 pixel border of either pure black or transparent pixels/lines. If even on pixel on the border is messed up, it will throw out an error. The log will tell you which image it was and where to fix it. Just be careful when editing any image with a .9 in it.
I hope these general tips help some of you out I will add more tips to this if i think of any. If you would like to contribute any of your ideas, feel free to message me and i will include you ​

Thanks for this.
Sent from my SCH-I545 using Tapatalk 4 Beta

Related

[Q] Samsung 9 Patches

Has anyone else noticed all of the .9 files in Samsung's APKs that are _not_ valid 9patch images? box_launcher_bottom.9 or box_launcher_top_normal.9 for example.
If you try to replace them, they stop working as 9patches, causing busted images in the UI. If you put the _exact_ same file back in, they are fine.
Anyone know what might be causing this? I am going to create proper 9patch files for a few and see if those work...
BitVenom said:
Has anyone else noticed all of the .9 files in Samsung's APKs that are _not_ valid 9patch images? box_launcher_bottom.9 or box_launcher_top_normal.9 for example.
If you try to replace them, they stop working as 9patches, causing busted images in the UI. If you put the _exact_ same file back in, they are fine.
Anyone know what might be causing this? I am going to create proper 9patch files for a few and see if those work...
Click to expand...
Click to collapse
I havent had a problem replacing them, its editing the image that gives me trouble... I have to use a totally different image..
I am not sure what you mean? Replacing? As in, with something similar? And you have an image issue... as in you want an entirely different style of skin? What have you replaced them with that worked?
If I replace the .9.png with an image of similar size it is fine... If I take the .9.png and lets say, make it more opaque/transparent or change the rgb ratios, then the image breaks and shows up funny...
junkdruggler said:
If I replace the .9.png with an image of similar size it is fine... If I take the .9.png and lets say, make it more opaque/transparent or change the rgb ratios, then the image breaks and shows up funny...
Click to expand...
Click to collapse
Still confused. Do you create your own .9.png's from scratch? Do you just use a regular png of the same size? I've been reading up on these .9's and I know that I can now make some morphs but it is going to be a lot more work than I thought unless there is some trick you know to create them.
yeah ive just used regular pngs... whatever I could find lying around my 16gb of theming stuff on my sdcard...
Not everything just works, Ive found problems along the way... I use ninja morph to test out my stuff before flashing with MM so I have less trouble finding out what doesnt work...
Making .9 files is not hard, at all. But then again I do Android dev as part of my job I am just curious if anyone knows how Samsung is able to use _bad_ .9 files (no marked-up edges) and still have them show up correctly. No big deal, I can figure it out myself I guess.
BitVenom said:
Making .9 files is not hard, at all. But then again I do Android dev as part of my job I am just curious if anyone knows how Samsung is able to use _bad_ .9 files (no marked-up edges) and still have them show up correctly. No big deal, I can figure it out myself I guess.
Click to expand...
Click to collapse
Could you explain how to make them? I tried using regular png's with no luck. The file names don't match so they won't get replaced properly. I can't edit existing ones and make them work. I guess I have to make my own from scratch but I don't really get how. If I can figure this out I'll be theming like crazy. (which may not be a good thing for all the other things I need to get done)
There are a few places online that explain them. I will let you google for that info/guides (I am at work right now). I will say however that there's a tool in the SDK (if you build it) called draw9patch that creates a little tool to show you how they look stretched different ways, and lets you edit them, very handy.
As for the 'rules'. It's easy. The left & top edges of a .9 file (1 pixel) define where the image will stretch. If you place a black dot in the left-x, center-y pixel of the image, it will stretch that row if the image needs to be bigger. The rest of the image will not be stretched. The same goes for the top. You can place extra pixels to expand the area stretched, or even make more than 1 area that stretches (my notification bar skin will show how that's done).
The right/bottom edges use the same mechanism (1 pixel row/column) but they define a box on the image that _content_ inside the image will fit into. You can see this if you go find some 'edit box' skins. The black dots on the bottom/right are placed where the edit box's internals are relative. Unlike left/top, you _can't_ have more than 1 section per side.
Using draw9patch it is _very_ easy to play with. If I get some time I will upload some examples, maybe with my next morph (an extension of the diamond-plated steel look I did for the launcher in some other threads).
BitVenom said:
Making .9 files is not hard, at all. But then again I do Android dev as part of my job I am just curious if anyone knows how Samsung is able to use _bad_ .9 files (no marked-up edges) and still have them show up correctly. No big deal, I can figure it out myself I guess.
Click to expand...
Click to collapse
I'm not really sure what your getting at by "_bad_ .9" but if an image is sized correctly, it doesn't need guidelines.
Perfect example is this image:
which has no guidelines whatsoever
maybe you could upload an example?
Yeah I've just renamed regular .png files with no prob 90 percent of the time..
Sent from my SGH-T959 using XDA App
one thing you could also try doing is using apktool and decompiling the apk with the 9.png's you are trying to replace. apktool decodes them and shows the patches.
Well I tried using the draw9 tool. Very simple and easy to see what is happening. I modified a bunch of the Mms .9.pngs (on a mac?) with photoshop, saved, opened with draw9 to add the stretching, saved them and made a morph. When applied it only changed some of my images and the ones that changed won't stretch properly so the text extends outside the image.
I ONLY replaced images but something got screwed up. My text messages started showing coming from the wrong people, and I would reply to one person and the text would go to someone else. Not good. Tried to use the revert I had created and it fixed the graphics but not the other sending/receiving problem. Lucky I had a backup so I'm flashing back to that now.
I'm sure I'm making some stupid error, oh well I'll figure it out eventually.
Gahhhh!!!
Well, after digging around, and not being able to determine why my own changes to .9 files were causing issues, I found it: If I use _apktool_, I get a proper .9.png, and it looks great. If I just unzip the apk, I get the old png, still valid, but without it's outer-edges that are used for .9 markup. What-The-F? Really. So does the damned thing have 2 versions of the file in it? A PNG is compressed, it shouldn't be possible to create a version minus the outline without tons of trouble. Where is that data being hidden? If I put mine in place, will it just blow it all up?
I am going to give it a shot, see what happens.
Putting the 'proper' .9 that apktool created back into the morph and loading it results in something that is _better_, but still rather broken. Somehow the 'patches' from the .9 file are being applied over the .9 itself. There must be something about .apk that encoded extra data in a side-channel of some sort. I wonder if anyone here knows who to ask? I am a very capable programmer, and happy to write/transplant code to get a reliable .9 path for odd .apk variants (as I understand Samsung's is new/custom)... ?
Info I just found: http://code.google.com/p/android-apktool/issues/detail?id=2
So apktool will decode from binary to source. Now I just need to get a path back to binary, and I think it'll fly...
Hrm, I found the Froyo code that de-serializes a PNG and checks for 9patch, as well as the code to save one back out with 9patch info. I need to determine why the 'source' 9patch minus hidden binary data is not acceptable to the Vibrant. It should be, all of this code reinforces that. I feel like I am _suuuuuuper_ close to having this work.
Well, I need to write a tool (maybe after next week) to do the heavy lifting... but hand pushing the 'custom' PNG chunk from a valid .9 onto a processed one results in a valid .9. You have to know the PNG format (and be handy with a Hex editor), and since you are stealing data from another image, hopefully didn't edit the size/split areas too much. I know google's format too, so hand-editing the custom chunk data to move around the black-bars (virtually) isn't too bad. But again, a tool that just takes .9.pngs with visible borders and encodes them (and removes the _massive_ waste of RAM that is the Photoshop chunks.. wow), and is able to do the opposite will likely help all theme modders out there. I will update the head of this post once the tool is complete.
As an aside, even after getting a working file (my folders now have black, not grey backgrounds) - I still have a grey box in the center... and that is _not_ in the image. Very, very odd. I will track that down too... probably just some layout courtesy of Samsung.
Noon Sunday - Ah, got the grey-box too. I _think_ a simple 'encode 9patch' tool already exists, will test the process and report back. But I have fully custom graphics now that look excellent.
Just added: https://code.google.com/p/android-apktool/issues/detail?id=92
Also I'll add wiki page about 9patch images, cause many people don't understand them and they don't know, what to do. They're WTFing, as you did above ;-)
Thanks!
Brut sir Being a long time hobby-hacker... the chase was as valuable for me as the catch... but I definitely appreciate somebody else making it work first
9Patches are easy now, and one of the most powerful elements that Android UI utilizes too!
Ok, I think you understand 9patch images already, but I wrote an art with explanation:
https://code.google.com/p/android-apktool/wiki/9PatchImages
Brut.all said:
Ok, I think you understand 9patch images already, but I wrote an art with explanation:
https://code.google.com/p/android-apktool/wiki/9PatchImages
Click to expand...
Click to collapse
Thanks for that. I'm going to be giving these 9patches another try.

[REQ] All black based apps

I am now using the awesome all black mod and was wondering how hard would it be to "all black" the gmail and gtalk apps to match. Black background and white/grey text perhaps. I would think in my case this would save a lot on battery as well as I check email frequently.
I would love this as well though I am just a user, not a programmer or the like. However I don't think this would be too hard. It could be as simple as implementing maybe a high contrast which pretty much almost flips the colors. No idea though
If their layouts, styles, etc are defined in accessible XML files it could probably be done.
yeah add me! this would be an awesome mod. can totally see 2+ days with something like this.
Anyone able to actually do this I poked around some and was unable to make it work.
I'll take a look...
That would be awesome. If you would be willling to share your findings that would be icing on the cake as I would love to learn how to do this myself.I tired to change the background colors by changing color values in the chat_view.xml but that seemed to have no effect. I am sure its just a matter of changing color values in a few key xml files but just dont know where to look.
Thanks again
Check out the thread called "tiles by ardchoille" in the section I think it may be what your looking for
Sent from my SGH-T959 using XDA App
Wykedx said:
Check out the thread called "tiles by ardchoille" in the section I think it may be what your looking for
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Thanks for the link but no that is not what I am looking for. What I want is for the background screen inside the apps to be black background with white text. The default for gmail and gtalk is a white background with black text on it.
adm1jtg said:
Thanks for the link but no that is not what I am looking for. What I want is for the background screen inside the apps to be black background with white text. The default for gmail and gtalk is a white background with black text on it.
Click to expand...
Click to collapse
Almost positive framework for google apps (gapps) is closed source and not to be modded or distributed. that is why CM got the cease and desist letter.
You could create a metamorph to do this but it would take quite a lot of hunting to find all the .xml files needed, as well as all the .png's used. The easy part would be editing the basic framework files. Editing all the apps you've installed is a whole new story.
Snoop around in framework.res and twframework.res if you like. That's what the AllBlack mm changes.
FYI, Cyanogen got a C&D for the _distribution_ of Google apps. I strongly doubt Google would care if you change the graphics of gapps for yourself, so long as you're not making the apps themselves available for download.
Bump (Throws up a shield to avoid tomatoes)
Any new way to accomplish this?
nakagusukumike said:
Bump (Throws up a shield to avoid tomatoes)
Any new way to accomplish this?
Click to expand...
Click to collapse
Same here. I would love to get a blacked out Gmail.
I had found one on a droid x forum recently. Someone has done it.
Scarinzi said:
Same here. I would love to get a blacked out Gmail.
I had found one on a droid x forum recently. Someone has done it.
Click to expand...
Click to collapse
Hi,
Blacking out apps is a royal pain to do it right. I've been working on this for my newest (still unreleased) honeycomb theme, and its slow, and tedious. I can spend hours changing one color value, or one line of code, re-compiling, push to phone, test, only for it to not work properly, and then I have to undo the change, and start over.
https://picasaweb.google.com/113127051130934911253/HoneycombTheme?feat=directlink
Gmail for instance, uses XML layouts, colors coded into the java directly, and then custom CSS for the message view.
I've been tweaking and debugging for days, and still can't override enough of the font colors to black out the message view to a level I'm happy with.
Anyway, I've done gmail, gtalk, googlevoice (well, like 90%, can't blackout the setup process properly no matter how I try) AOSP 2.2 calendar (I hate touchwiz) CM6/AOSP Mms (just touchups), google quick-search-box, twitter 2.0.1, android market, and the ABSOLUTE worst of them all, google maps (only like 85-90%, I can't decompile the resources, so some parts will never be inverted properly.) And then there were also tweaks to Contacts, Browser, Beautiful widgets, Voodoo control app, and the frameworks themselves.
And I still need to blackout facebook, google reader, google books, and a few more.
I had planned on releasing eventually, but in order to blackout maps, the framework-res.apk has to invert every call for a "light" theme to "black" instead, so it WILL break other apps that use custom display styles, but rely on default android text colors (or vice-versa.) And of course, if anyone starts asking for a release-date, I'll likely just abandon it entirely. This was all done for my own personal enjoyment and use, not anyone else's.
Blah, sorry for sounding *****y, I'm tired of people causing drama in the android world, its supposed to be FUN, not high-school.
Cheers, =)
s0niqu3 said:
Hi,
Blacking out apps is a royal pain to do it right. I've been working on this for my newest (still unreleased) honeycomb theme, and its slow, and tedious. I can spend hours changing one color value, or one line of code, re-compiling, push to phone, test, only for it to not work properly, and then I have to undo the change, and start over.
https://picasaweb.google.com/113127051130934911253/HoneycombTheme?feat=directlink
Gmail for instance, uses XML layouts, colors coded into the java directly, and then custom CSS for the message view.
I've been tweaking and debugging for days, and still can't override enough of the font colors to black out the message view to a level I'm happy with.
Anyway, I've done gmail, gtalk, googlevoice (well, like 90%, can't blackout the setup process properly no matter how I try) AOSP 2.2 calendar (I hate touchwiz) CM6/AOSP Mms (just touchups), google quick-search-box, twitter 2.0.1, android market, and the ABSOLUTE worst of them all, google maps (only like 85-90%, I can't decompile the resources, so some parts will never be inverted properly.) And then there were also tweaks to Contacts, Browser, Beautiful widgets, Voodoo control app, and the frameworks themselves.
And I still need to blackout facebook, google reader, google books, and a few more.
I had planned on releasing eventually, but in order to blackout maps, the framework-res.apk has to invert every call for a "light" theme to "black" instead, so it WILL break other apps that use custom display styles, but rely on default android text colors (or vice-versa.) And of course, if anyone starts asking for a release-date, I'll likely just abandon it entirely. This was all done for my own personal enjoyment and use, not anyone else's.
Blah, sorry for sounding *****y, I'm tired of people causing drama in the android world, its supposed to be FUN, not high-school.
Cheers, =)
Click to expand...
Click to collapse
I don't blame you at all.
If you decide to make this available to everybody, it will be awesome. Good work.
I couldn't find it on XDA but a quick Google search found one on a droid x forum in zip form.
I flashed it with CWM and it worked.
Not as nice looking throughout as s0niqu3's but looks alot better than the regular version.
http://www.droidforums.net/forum/blacked-out/128296-release-gmail-2-3-4-1-blacked-out.html

Development Discussion: Modification of PDF Viewer

Taking notes over PDF slides with the scribe pen has really saved me a lot of hassle. I love this function of the flyer. There's really only one way it could be better: Fullscreen support, or at least "more screen" support.
Not only does the HC bar take up space, but the menu/title bar on top is even bigger. The pdf viewer has the screen real estate of a 5inch phone.
PDF editing seems like only a moderately used feature, so I don't see this getting done on it's own. I'm offering a very modest reward for a fix.
I would be willing to donate for the removal of the huge uppermost Title/menu bar in PDF viewer, so that a double-tapped fitted pdf page will fill the new space. See the attached image. You can leave the small menu button in the corner if possible, or just get rid of it if it's too difficult.
I'm hoping this is as simple as modifying a few variables in the apk. I could be very wrong.
I can live with just the HC bar at the bottom.
Note: I have tried apps like repligo and ezpdf which do offer fullscreen support. However, annotating and changing annotation options takes many more steps than the HTC pdf viewer.
Secondary goal:
Apps like honeybar and honey hide widget cause all pen written annotations to be shifted up.
I believe the solution to the first problem would also allow an easy fix of the shifting pen annotations. I would like the PDF viewer to accept pen strokes properly with a hidden HC bar.
No one's willing to give it a shot? Ah well.
This will be my only bump.
I've attached the (unmodified, I think) HTCPDFViewer.apk from /system/app from LeeDroid's 4.1.0 rom.
I was the guy who removed the obnoxiously large language bar from Sony Ericsson's keyboard back when I was still using my u20i phone... unless HTC is particularly irritating about how it structures its resources, you're right that it is a matter of decompiling the APK, adjusting numbers, and recompiling it. Merely hiding is not difficult (making the Menu button semi-transparent is probably too difficult, though, but you can pick a ROM with the hardware buttons enabled).
Unfortunately it is also incredibly tedious to decompile and recompile everything right, from my experience of the keyboard hack. I'm not really up to it at the moment. Hope you can do it.
I've poked around in the archive. I wonder if I could just delete the ti.tle bar png or layout file. There doesn't seem to be a definitive title bar png
I'm also experimenting with apk multitool.
Since it's a stock rom app, is this venture going to be a lot more complicated than editing an xml line and then recompiling?
Here's where I'm at. Everything I know about android programming I've learned tonight, so this may be confusing and stupid sounding:
The decompiled apk has several things which could refer to the title bar.
dimens.xml has lines like
<dimen name="global_title_height">35.0dip</dimen>
<dimen name="editing_panel_header_height">56.0px</dimen>
<dimen name="editing_panel_header_margin">47.0px</dimen>
<dimen name="editing_panel_no_footer_header_margin">35.0px</dimen>
However there are also thousands of header and title lines from other xmls.
Can I just use a theme line in the manifest?
It uses the ActPDFReaderTheme whose parent is the HtcActionBar.FullScreen from the com.htc.resources.apk
These link to the common_mainnav xmls and pngs in the resources.
Do I need to find an HTC theme from the com.htc.resources.apk that doesn't have a title bar? Could I edit the com.htc.resources.apk and edit the pngs or delete the referencing lines in the styles.xml?
Thanks. I'll keep digging.
And btw, the bounty's still out if anyone can do it faster. I don't have much free time.
I think I've got this. I'm real close
I figured out how to decompile, edit xmls, recompile, copy original meta-infs and androidmanifest, and adb push.
The dimens.xml in the viewer apk has no effect on the bar. It's a standard template htcactionbar.fullscreen
I could direct the apk to a new theme, but I've decided just to try deleting or shrinking the bar from the com resources apk.
Good luck! Remember the apk you push back must be a signed one, probably via hacking the modified xml files back into the original signed apk.
Now I've run into a snag.
No matter how many margin and layout dimension variables in the com resource I set to 1.0px, I still have a black bar above the pdf.
Then I tried changing the theme reference in the pdfviewer.apk. It loads the file picker without an action bar, but as soon as I click a file it crashes. It seems (I think) that the program has too many calls for the action bar. I'm not a programmer. Do you know how I can get the program to simply ignore any lines referencing the "actionbar"?
Lines such as: "invoke-virtual {v3}, Lcom/htc/pdfviewer/ActPDFReader;->getActionBarHeight()I"
I also tried <item name="android:windowNoTitle">true</item> after the theme and I have the same effect of no title bar but a forceclose after selecting a file
Could you post the entirety of the relevant xml layout file?
porcupineadvocate said:
Could you post the entirety of the relevant xml layout file?
Click to expand...
Click to collapse
Unfortunately there is no simple relevant layout file. I can't go any further with this project because I don't know programming. Here's my progress if anyone would like to give it a shot:
In the decompiled HTCPDFViewer is a \res\values\styles.xml
There is the line:
<style name="ActPDFReaderTheme" parent="@com.htc:style/HtcActionBar.FullScreen">
This tells the program to use the HTCactionbar.fullscreen template style in com.htc.resources.apk
Now there are two paths to take from here:
1) Changing the style template to @android:style/Theme.NoTitleBar.Fullscreen
or adding the requestWindowFeature(Window.FEATURE_NO_TITLE) line
Issue: This causes the file picker to load without a title fine, but as soon as a pdf loads, the program crashes.
How far I got: I simply deleted 2 lines referring to the actionbar in the PdfLoadingPage$LOADING_PAGE_Handler.smali and the pdf loads. However there is a now a black empty bar on the bottom, and any pen writing is being moved upwards.
I suspect this is because of the ActionBarMenuAdapter.smali that controls how the pen annotations are moved in relation to the actionbar. There are also 100 more lines referring the actionbar in the other smalis. You can find them all by searching the apk for "actionbar". A proper programmer could remove these lines, or more easily make every m_iActionBarHeight:I line refer to zero.
If someone can fix the programming, I suspect that this would also solve the hidden HC bar issue, allowing true fullscreen support!
2) Editing the com.htc.resources.apk
The styles.xml in this file has a NoTitleBar.Fullscreen theme that redirects to other xmls redirecting to different layout files and pngs.
I've looked through every dimens.xml and other xmls that may be even loosely linked to the actionbar. I even tried haphazardly changing every possibly connected dimension to 1.0px.
I then tried shrinking all of the related PNGs to 1x1 pixel.
The end result was just a funking looking grey and black bar at the top.
I have no idea where to find the dimensions controlling the size of the actionbar.
Thanks for any help! Warning: Recovery backup before pushing a new com.htc apk, if you don't do it correctly, things can get messy with the OS.
porcupineadvocate said:
Could you post the entirety of the relevant xml layout file?
Click to expand...
Click to collapse
Ok I may have lied. There are one or two files I wasn't sure about.
These are from the xmls in layout folders of com.htc apk.
Can you take a look and see if there are simple line(s) to change here? notepad++ is great.
I already attempted to edit all of the dimens.xml dimensions. I can't remember if I got all of the dimensions in these files too.
The bar seems to be about 56 pixels. I gathered that from reduced editing view dimensions but I could be wrong.
Not that it is a big deal for a minor issue like this in a low traffic forum like EVO View but "bounty threads" are strictly prohibited by xda.
I doubt the mods will hassle you since this isn't a heavily travelled thread but they might shut you down at any second. Good idea to get some PM's going with anyone who is helping you.
Good luck.
Sent from my PG41200 using Tapatalk
Post the decompiled HTPDFViewer, please. I particularly want to see the contents of res/layout/*.xml files.
As a tip, don't delete any elements; just resize them to zero height/width if possible. Deleting will cause crashes when the program tries to reference them.
porcupineadvocate said:
Post the decompiled HTPDFViewer, please. I particularly want to see the contents of res/layout/*.xml files.
As a tip, don't delete any elements; just resize them to zero height/width if possible. Deleting will cause crashes when the program tries to reference them.
Click to expand...
Click to collapse
Here it is.
Woops I didn't realize bounties were prohibited, especially with so many developers asking for "donations"
Delete this if you'd like. I didn't mean to break the rules.
Donations and bounties are different. Donations are thanks for work done, bounties are offer of compensation to do work. If they allowed bounty threads xda would be overrun with them.
No big deal. I doubt the mods even visit this thread. Just wanted to give you heads up to establish pm conversations in case they did
Sent from my PG41200 using Tapatalk
No progress since my last update on the programming front. However I have been playing with the lcd density changer.
Setting it to 170 from 160 and enabling the GB like bar on top has interesting results. The pdfviewer only edits properly when I use Honeyhide or Honeybar. So we know that disabling the notification bar and having a working pdfviewer is possible.
However, I found I have the best pdf editing real estate when I set the lcd density to very low, like 120. In fact, not only are the title and HC bars smaller, but the pen seems to be more accurate too!
Maybe this information will help with our goal.
EDIT: at 120 and below, the scribe color wheel pops up on the wrong side. Still works though. Other tablet functions are much slower and there's some screen corruption too. It's not a permanent solution, but works for annotating pdfs.

Modify Settings menu

OK... so I'm running this Froyo Rom and I want to remove a couple of options from my/the settings menu (it's a bit cluttered for my tastes).
I think that I remember that there was just such a way to modify a rom so that it can show less settings options, but I don't seem to find it. If anyone can help on this front it would be really appreciated...
(In two words can I modify the "settings .apk" so that it shows less?)
Thanks for your attention.
Stevethegreat said:
OK... so I'm running this Froyo Rom and I want to remove a couple of options from my/the settings menu (it's a bit cluttered for my tastes).
I think that I remember that there was just such a way to modify a rom so that it can show less settings options, but I don't seem to find it. If anyone can help on this front it would be really appreciated...
(In two words can I modify the "settings .apk" so that it shows less?)
Thanks for your attention.
Click to expand...
Click to collapse
Of course you can, but you run a very real risk of breaking your rom, you would have to decompile the apk and poke around in the xml and smali files to find the option you wanted to remove. you would also probably have to make some adjustments in your framework.apk but like i said you run a very real risk of breaking the rom you are using.
shreddintyres said:
Of course you can, but you run a very real risk of breaking your rom, you would have to decompile the apk and poke around in the xml and smali files to find the option you wanted to remove. you would also probably have to make some adjustments in your framework.apk but like i said you run a very real risk of breaking the rom you are using.
Click to expand...
Click to collapse
Yeah, I know, but I'm a total noob to those.
I did find this: http://forums.androidcentral.com/op...-how-edit-settings-apk-solved.html#post905109 but decompiling throws me an error.
Even when I put the framework-res file in the right directory apart from taking ages to decompile it still throws an error towards the end of the process (I've lost about a day trying to decomile the settings.apk but it was to no avail as -in the end- it threw an error again).
In fact that must be quite easy for someone with experience in this if I could post (to him) my settings.apk and framework.apk I may have had results in a few minutes (instead of having to learn sth from scracth in my limited time). But I guess it's a bit hard to find someone around here who would voluneer, no?
Anyhow thanks for your reply .
edit: OK I was able to clear out the errors. So I decompiled, made the appropiate changes and then recompiled (as per the instructions), but all I got was an apk half its original size which would FC whenever I was trying to run it (upon placing it on the system/app folder and rebooting).
What makes things even weirder is that merely the act of decompiling are recompiling (the apk) without making any changes at all rendered the -new- apk useless. So it seems recompiling in general ruins the apk -period- (no matter whether I've made changes or not). That is very troubling indeed... like I said I am a noob at these, any help at all would had been greatly appreciated...
When you placed it in the system/app folder, did you set permissions?
It is not as easy as decompiling the settings.apk picking out what you don't want and then recompiling it. Think of it as a web. The Settings.apk uses bits and pieces from Framework-res.apk, services.jar, androidpolicy.jar,...
We understand that you are a self-proclaimed noob, but you have to realize that it just isn't that simple to just delete something that you don't use. I mean, just because YOU don't use it, your ROM probably does. Are you always in the Settings page anyways? I doubt it.
It is good though that you took the initiative to somewhat learn how to de/recompile apks as that is a fantastic basis to start from. You can also learn smali and baksmali to modify apps as well.
Here is a good thread about theming and using APKtool to change things in an apk (such as /framework/framework-res.apk/res/drawable-hdpi where you can change the icons images for custom icons---but you can also do this by installingADWex or LPP and an icon pack).
Long story short, no need to change your settings.apk as it will bork your ROM and your next thread will be, "I think I bricked my phone...Halp!!!"
To clear some things up: I regard myself an enthusiast user. That is to say that I have considerable experience with modding my devices, what I am a "noob" at is actually creating or reverse engineering the code *which* mods my devices (I have little experience with C but that's about it). So do not be worried I am not going to brick my device and if I do I would know how to "debrick" it ( as I have done numerous times to my devices)...
With that out of the way I have to say that I want to modify my settings APk not for aesthetic but for practical purposes. See I have written a basic script on tasker that doesn't play well with froyos settings.aPk (but it does in ICS or GB), I've tried to rewrite the script but i found a dead end which was what lead me to wish to modify the settings APk....
All I wanna do is -basically- to hide some options not actually *delete* them (i am aware what havoc that may cause...). So if there is any advice relevant to my case I would welcome it very much...

Themed SMS [APP]

Consolidating my previous post, here are two simple, modified blur sms apks. we have:
a) Messagingwhite.apk: same as stock, except grey text in conversation list is white rather than transparent/grey. easier to read i think
b) Messagingicsblack.apk: the background of both read and unread texts is black, with unread text being displayed in ICS blue while read texts are in white. black background looks better with the ICS text
For both, the incoming sms box in actual conversations has been darkened. just my fancy.
Next step; blackout the background of conversation list entirely. pretty sure that'll entail diving into the framework. I know its done routinely, but im learning by experimentation as i go (more fun that way!).
Instructions:
1) Must be rooted
2) Download desired Messaging______.apk
3) Rename to Messaging.apk
4) With a file explorer or via adb, navigate to /system/app/ and copy your current Messaging.apk and corresponding odex file (if you're rom is odexed) to somewhere safe (just for a backup) and then delete them from /system/app/
5) Move the renamed Messaging.apk to /system/app/, change permissions to rw-r--r--, and reboot.
And thats it! The changes aren't big, but unlike my attempts yesterday, I think they're much more aesthetically pleasing. Particularly the one with ICS color incorporated.
Hope you enjoy! If you like hit the thanks!
*USUAL DISCLAIMER; tinkering with your phone is YOUR choice; should anything happen to your phone I am in no way responsible. Not like this is serious stuff here, but just in case i guess
screenies
Sent from my DROID RAZR HD using Tapatalk 2
btw is there any interest whatsoever in this? im just having fun learning and hoping to eventually get full themes going
Sent from my DROID RAZR HD using Tapatalk 2
Anyway to do the people (contacts) the same
illb1u2 said:
Anyway to do the people (contacts) the same
Click to expand...
Click to collapse
im about to go watch the dark knight rises, but afterwards i'll start messing with it! it will depend on if the app draws from a specific line of code that gives a hex value, or from a .png inside the framework-res.apk. if its the latter, the rom needs to be deodexed and to be universal id have to learn how to make it a flashable zip blah blah blah. BUT if its the former, shouldn't really be that hard.
edit: yes first attempt was a big giant fail. pretty sure contacts.apk and phone.apk are intertwined in some way, I can't even decompile and recompile contacts.apk without errors when i haven't changed a single thing. and theres some images in contacts.apk that only appear in the phone app. so yea. but ill take a stab at it! just might be beyond my grasp atm
eris72 said:
im about to go watch the dark knight rises, but afterwards i'll start messing with it! it will depend on if the app draws from a specific line of code that gives a hex value, or from a .png inside the framework-res.apk. if its the latter, the rom needs to be deodexed and to be universal id have to learn how to make it a flashable zip blah blah blah. BUT if its the former, shouldn't really be that hard.
edit: yes first attempt was a big giant fail. pretty sure contacts.apk and phone.apk are intertwined in some way, I can't even decompile and recompile contacts.apk without errors when i haven't changed a single thing. and theres some images in contacts.apk that only appear in the phone app. so yea. but ill take a stab at it! just might be beyond my grasp atm
Click to expand...
Click to collapse
That suxs I was really hoping the people app could be blacked out to match the phone good try though. Thanks
DizzyFox said:
That suxs I was really hoping the people app could be blacked out to match the phone good try though. Thanks
Click to expand...
Click to collapse
I'm sure it can be, I just need to figure out how
Sent from my DROID RAZR HD using Tapatalk 2
eris72 said:
I'm sure it can be, I just need to figure out how
Sent from my DROID RAZR HD using Tapatalk 2
Click to expand...
Click to collapse
Have you ever thought about trying the calendar app change the white background to black?
DizzyFox said:
Have you ever thought about trying the calendar app change the white background to black?
Click to expand...
Click to collapse
I'm actually a fan of the white, but I'll look into it. Ideally I want to figure out how to make a flashable zip that will black out framework/some selected apps, but I'm not anywhere near that yet. Got my rom of choice (batakang) deodexed, but i can't even change the gradient background to black without problems. Should be a simple edit. Still much to learn obviously!
I have to get a lot of research done in the next week, hoping to get a paper published in the next 6 months, but as soon as Christmas break rolls around, this will be my pet project until grad school starts up again
Right now doing the contacts app is my priority, just figured out a key step that I was missing. still getting mad errors but making progress!
Sent from my DROID RAZR HD using Tapatalk 2
I am interested in all black themes in apps... willing to donate for such...
Notrega said:
I am interested in all black themes in apps... willing to donate for such...
Click to expand...
Click to collapse
No donations necessary. I've gotten a lot from the android community and am just trying to give back since there isn't much dev support for the razr hd.
So far, contacts and phone are not looking good. I've tried all possible routes; most of the time the modded apk won't even compile and when it does, it isn't recognized upon boot. Best I've gotten is the phone to recognize it, but when the phone app is opened it's just all FC all the time. System apps are a tricky *****.
That being said, the messaging app I have pretty solid control over and can alter most of those colors, baring the background. That's tied into framework, which I was able to get blacked out! I can explain the process (moderately difficult) or more likely I'll look into making a flashable zip. So with that in mind, if anyone would like some basic color altering to their sms, I can prolly do so with the limitation that the background is the JB gradient or black. Texts, contact names, text box backgrounds (not the main background!) and such can be changed.
I'm giving up on contacts for now, unless I can find/think of a new way to get it working. phone is tied directly into it to, so that sucks. I can look at the calendar, but since its third party now (on g play where it'll get updates vs the built in one, which I deleted), I have to imagine someone's done that already. If anyone has any requests ill look into it, I'm not sure what other apps there are that someone else hasn't put a theme to that can't be put on our phones.
What I think I'm gonna do is look into how to get aosp apps working, contacts was on some rom on rzr forums but I couldn't get it on my rom (batakang). Maybe if I decompile it and recompile it with my framework...
Sent from my DROID RAZR HD using Tapatalk 2
working on making this a flashable zip: blacked out framework and black outgoing sms box. looks quite sexy i think
if you can't tell we're animal lovers. thats my cat sleeping on my quantum book
hey eris just wanted to say i'm very interested in this and am about to give it a try! screen shots look great! thanks so much
EDIT: got it working. looks nice! any word on updating the incoming/outgoing to black?

Categories

Resources