{"id":90,"date":"2010-04-26T19:48:23","date_gmt":"2010-04-27T00:48:23","guid":{"rendered":"http:\/\/fw.hardijzer.nl\/?p=90"},"modified":"2010-04-26T19:48:23","modified_gmt":"2010-04-27T00:48:23","slug":"cyanogenmod-modded","status":"publish","type":"post","link":"https:\/\/fw.hardijzer.nl\/?p=90","title":{"rendered":"CyanogenMod modded"},"content":{"rendered":"<p>For my Nexus One, I&#8217;ve been trying a few new ROMs. One that is supposedly very good is CyanogenMod, and I personally kinda like it.<br \/>\nOne downside however, is that the power widget colors for features turned on have been changed to an ugly light blue-ish color, that completely mismatches with any other android user interface parts. So I did what any respectable tinkerer would do, and changed them back to green. Here&#8217;s how I did it, hoping these instructions might help other people with the same or related problems. Note that all the tools I uesd should be easy to find using google \ud83d\ude42<\/p>\n<p>Apparently, the power widget is in Settings.apk. This file also contains a lot of other stuff, and not suprisingly the settings dialogs are among those. Seeing as CyanogenMod adds quite a bit to the settings dialogs, simply putting back a stock Settings.apk is not an option.<br \/>\nSo instead, we should change something inside of Settings.apk. This is what I did to get the Settings.apk (and back it up) using the Android SDK:<br \/>\n<code><br \/>\nadb remount<br \/>\nadb shell<br \/>\ncd \/system\/app<br \/>\ncp Settings.apk Settings.bak<br \/>\nexit<br \/>\nadb pull \/system\/app\/Settings.apk Settings.zip<br \/>\n<\/code><br \/>\nThen I opened Settings.zip with winrar, and browsed around. I found the files needed in res\/drawable-hdpi under filenames appwidget_settings_ind_on_?.9.png and appwidget_settings_ind_mid_?.9.png (where ? is c, r and l).<br \/>\nMy first attempt was simply to change the colors using GIMP, but that messed up the scaling of the pictures.<br \/>\nTo fix that, I used a program called tweakpng, and removed all PNG chunks not in the original file, and copied the one chunk that the new file didn&#8217;t have from the old file.<br \/>\nThis targets the scaling issues, but somehow I still had some weird blue lines through the images.<br \/>\nInstead of turning it to white as I wanted, I figured the normal Android green would be sufficient too. So I set out to get it from a stock ROM.<br \/>\nI found the stock Nexus ROM, and found the system.img. Apparently it&#8217;s a YAFFS2 filesystem, and after some googling, I found a tool unyaffs (needed to compile that on a linux box) to extract it. As said before I couldn&#8217;t just take the Settings.apk from there, so instead I renamed it to Settings_orig.zip, and with winrar moved the files I found earlier from the original into the modified zip file.<br \/>\nThen I used<br \/>\n<code><br \/>\nadb push Settings.zip \/system\/app\/Settings.apk<br \/>\n<\/code><br \/>\nto push it back onto my device.<br \/>\nAfter re-adding the widget, the colors were green again \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my Nexus One, I&#8217;ve been trying a few new ROMs. One that is supposedly very good is CyanogenMod, and I personally kinda like it. One downside however, is that the power widget colors for features turned on have been changed to an ugly light blue-ish color, that completely mismatches with any other android user &hellip; <a href=\"https:\/\/fw.hardijzer.nl\/?p=90\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">CyanogenMod modded<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[75],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-android","tag-android"],"_links":{"self":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":2,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":92,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/92"}],"wp:attachment":[{"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fw.hardijzer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}