I've seen it asked quite a few times now, so I thought I would share how I've been creating my own themes for the Nook. This is a quick and dirty guide as I've almost got it down to a science for quick, keyboard shortcut, theming.
Things you'll need
Photoshop or The Gimp for editing files
Android SDK so you can push and pull files to/from the Nook.
draw9patch app in the Android SDK /tools folder for creating 9.png files
APK Manager (http://forum.xda-developers.com/showpost.php?p=6703735&postcount=1)
Notepad++ or some other text editor for editing XML files. After using Notepad++ on this, I'd highly recommend it though
An attention span
Some restraint
This is a rather good guide that helped me get started. My only complaint is that it is almost to complicated and includes more information than what is needed for a basic theme.
http://forum.xda-developers.com/showthread.php?t=916814
Getting Started:
Download the Android SDK and get it installed.
Download APK Manager
ADB pull /system/framework/framework-res.apk
Make a copy of the framework-res.apk files as a back-up in case you need to revert
Copy the framework-res.apk file to the /place-apk-here-for-modding folder under the APK Manager folder
Launch the APK Manager Script.bat file
Type in 22 to select the default project
Type in the number next to framework-res.apk in the list to select it as your project
Select 1 to extract the files
Select 9 to decompile (this is what makes the XML files readable)
Go to the /projects/framework-res/res folder under the APK Manager folder to view all the files from the theme
Images are located in the /drawable-mdpi folder. XML files are located throughout, but the files specific to layout are under the /layout folder. To change global settings, such as color codes and strings, edit the XML files under the /values folder.
Creating custom PNG files: If you are using Photoshop, use the Save For Web feature when saving. Save the image as PNG-24. Select None under the Matte option. Select None under Metadata.
A word on 9.png files: 9.png files are files that can be stretched by the OS. There is a 1 pixel border all the way around the image. In that 1 pixel border, you'll notice solid black lines here and there. The black pixels indicate which portions of the image are to be stretched. You can add this border and the black pixels in Gimp or Photoshop, or you can open the file the draw9patch app under the Android SDK /tools folder. The draw9patch app will actually display how the image will look when stretched as you add the black pixels around the border, so it can come in handy and it's what I prefer to use. You can open and edit .9.png files in draw9patch and edit the border even after you save the file.
Once you have all your files edited, recompile the APK package with APK Manager
Option 11
y
y
It will tell you to delete the files under the /keep folder that you have edited. Delete any images and XML files, from the /keep folder, you edited under the /projects folder. If you edited XML files, delete the /keep/res/resources.arsc file as well
Press any key to continue and let the script finish
In a separate command line window, mount your Nook's /system folder (adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system)
back in APK Manager, select 8
/system/framework/framework-res.apk
Reboot your Nook
Boot Loop: If you messed something up and are stuck in a boot loop, most of the time you can still mount your Nook, push the original framework-res.apk to it and reboot. Or, you can use an unedited version of the CWM flashable zip file from the link below.
NOTE: it is not smart to push your framework-res.apk file to the Nook. I've learned the hard way that you can only do this about 10 times before you run out of memory and can no longer boot your Nook until you reflash Froyo again.
I'd recommend only a few flashes on a bare bones copy of Froyo until you feel comfortable with working on the framework theme. After that, I'm attaching a base, flashable zip for you to use in CWM so you can flash the theme instead of pushing. This will prevent you from getting stuck in a boot loop (unless you do something wrong yourself).
To add your framework-res.apk file to the zip, just open the zip and replace the /system/framework/framework-res.apk file (I'd recommend 7zip).
A Few Goodies
I'm including all of the PSD files I use to edit and create themes. If you want to create your own, custom theme, these will get you started. The only downside to these PSD files is that they are at the MDPI scale. If you want to create an HDPI theme, you'll need to increase the sizes.
Link to PSD files for creating your own theme, plus the flashable CWM zip file:
http://jjis.me/android-theme-templates
Hey man, I know you theme the froyo roms, but Im attempting a theme for the Phiremod CM7 and I cant seem to get anything but splash hangs and bootloops. I theme CM7 for the hero so I know my way around that, but Im wondering if theres something about the Nook that I have to do differently. For instance what is the mount.sh file you have in the tools folder on your themes? Is that only for froyo? Any help you could give me would be appreciated.
PMDColeslaw said:
Hey man, I know you theme the froyo roms, but Im attempting a theme for the Phiremod CM7 and I cant seem to get anything but splash hangs and bootloops. I theme CM7 for the hero so I know my way around that, but Im wondering if theres something about the Nook that I have to do differently. For instance what is the mount.sh file you have in the tools folder on your themes? Is that only for froyo? Any help you could give me would be appreciated.
Click to expand...
Click to collapse
CM7 is a little different than the stock builds of Froyo and others. They use the theme manager for it. If you are looking to theme for CM7, I'd suggest learning what it is needed to package it for the theme manager. I spent about an hour one day trying to find documentation, but couldn't. If can, or have it, please let me know where to find it so I can link to it and use it myself.
With that said, it appears that CWM does not flash, or at least mount, the same on the Nook. I'm assuming it's because it's on the external SD card and not internal. The mount.sh file was borrowed from samuelhaff's flashable ROMs. It actually tells CWM to mount the internal memory and flash to it.
If you are flashing without the mount.sh, it could be why you're getting the boot loops.
CWM uses edify language instead of amend. Again, it took me forever to find little to no documentation on it.
If you are using the mount.sh file and you are still getting stuck in a boot loop, I did discover a little issue with it yesterday. I was trying to use it to flash my new theme without the Vending.apk mod and I kept getting stuck in a black screen during start up. I forgot my edify code deletes the Vending.apk file so that was causing my problem. If you know how to edit the file, go for it. If not, I'm planning on updating it to correct this. If you need to, for now, just copy the Vending.apk to your flashable zip file.
It deletes the services.jar file as well. This was a requirement on Froyo since the status bar text is black by default. The services.jar file has to be edited to change the status bar text to white. Since CM7 does not need that change, try pushing just the framework-res.apk file, reboot and see if you boot successfully. If so, that is more than likely your problem.
wretchedlocket said:
CM7 is a little different than the stock builds of Froyo and others. They use the theme manager for it. If you are looking to theme for CM7, I'd suggest learning what it is needed to package it for the theme manager. I spent about an hour one day trying to find documentation, but couldn't. If can, or have it, please let me know where to find it so I can link to it and use it myself.
With that said, it appears that CWM does not flash, or at least mount, the same on the Nook. I'm assuming it's because it's on the external SD card and not internal. The mount.sh file was borrowed from samuelhaff's flashable ROMs. It actually tells CWM to mount the internal memory and flash to it.
If you are flashing without the mount.sh, it could be why you're getting the boot loops.
CWM uses edify language instead of amend. Again, it took me forever to find little to no documentation on it.
If you are using the mount.sh file and you are still getting stuck in a boot loop, I did discover a little issue with it yesterday. I was trying to use it to flash my new theme without the Vending.apk mod and I kept getting stuck in a black screen during start up. I forgot my edify code deletes the Vending.apk file so that was causing my problem. If you know how to edit the file, go for it. If not, I'm planning on updating it to correct this. If you need to, for now, just copy the Vending.apk to your flashable zip file.
It deletes the services.jar file as well. This was a requirement on Froyo since the status bar text is black by default. The services.jar file has to be edited to change the status bar text to white. Since CM7 does not need that change, try pushing just the framework-res.apk file, reboot and see if you boot successfully. If so, that is more than likely your problem.
Click to expand...
Click to collapse
Thanks for the reply! I actually took yours apart and was able to correct my script and I noticed that the delete services.jar line was causing issues as well. If you can I'd like you to take a look at the updater script after I edited it and see if you see any errors. It's attached below. I have gotten the framework and other themed apps to flash fine, but for some reason the themed market will not install. After flash it is in the /system/app folder as vending.apk. but it doesn't actually replace the stock market anywhere else. I actually spent several hours today trying to get the market back because I got frustrated and went all delete happy in root explorer, lol.
As far as Theme Chooser goes, here is a decent tutorial, but I haven't taken the time to really try and change my whole MO to use it. I theme the aospCMod for the heroc without using the chooser app. You can also get some good tips on building themes for the chooser in the #aospbot irc channel. A few of the guys in there build themes for it.
View attachment updater-script.zip
PMDColeslaw said:
Thanks for the reply! I actually took yours apart and was able to correct my script and I noticed that the delete services.jar line was causing issues as well. If you can I'd like you to take a look at the updater script after I edited it and see if you see any errors. It's attached below. I have gotten the framework and other themed apps to flash fine, but for some reason the themed market will not install. After flash it is in the /system/app folder as vending.apk. but it doesn't actually replace the stock market anywhere else. I actually spent several hours today trying to get the market back because I got frustrated and went all delete happy in root explorer, lol.
As far as Theme Chooser goes, here is a decent tutorial, but I haven't taken the time to really try and change my whole MO to use it. I theme the aospCMod for the heroc without using the chooser app. You can also get some good tips on building themes for the chooser in the #aospbot irc channel. A few of the guys in there build themes for it.
View attachment 546902
Click to expand...
Click to collapse
Stupid question, but you are copying the vending file as Vending.apk and not vending.apk, correct?
Also, if you're using my themed market, there are only two icons that are customized. The rest looks stock.
Sent from my SAMSUNG-SGH-I897 using Tapatalk
wretchedlocket said:
Stupid question, but you are copying the vending file as Vending.apk and not vending.apk, correct?
Also, if you're using my themed market, there are only two icons that are customized. The rest looks stock.
Sent from my SAMSUNG-SGH-I897 using Tapatalk
Click to expand...
Click to collapse
Yeah the file is Vending.apk but its my themed market.
Sent from my NookColor using Tapatalk
PMDColeslaw said:
Yeah the file is Vending.apk but its my themed market.
Sent from my NookColor using Tapatalk
Click to expand...
Click to collapse
Sorry for the delay in response. I had too many things to do with the family yesterday.
If you haven't got this working yet, I'd suggest trying to start with removing just the /system/app/Vendind.apk file via the updater-script. If it works, then go back in and add each additional line until you run into problems again. At that point, you'll know what your problem is.
Since everything else (framework-res.apk, services.jar, etc.) gets replaced successfully, leave those lines alone. I'd just start with the basics of replacing the Vending.apk first and then work your way back up from there.
Just achieved root using azuzu's method and the fist thing I attempted was to get rid of the dull-dark backgrounds on the Stock ROM and use the bright blue backgrounds from the Xperia 1.6 days, which was also ported to 2.1
I modified the framework-res.apk on PC and used RootExplorer to overwrite the existing framework-res.apk but still I dont see any changes in the backgrounds. Any idea what's amiss? Here is a strp-by-step writ of what i did:
1. Use root explorer to copy the existing framework-res.zpk to /SDCARD/
2. Transferred the apk to PC, replaced the existing semc_bg.png and semc_general_bg in the archive.
3. Transferred the modified apk to sdcard.
4. Using root Explorer on the phone, copied the modified apk to /system/
5. Changed the permissions to match the original apk
6. Copied the modified apk from /system/ to /system/framework/ and overwritten the original apk
7. The file gets overwritten successfully - but there is no change in the system background images
Whare am i going wrong? AFAIK there is nothing wrong with the apk (I have learnt that an incorrect framework-res.apk can brick the phone!)
You also need to edit system/framework/SemcGeneralUxpRes.apk
Locate SemcGenericUxpRes.apk (system/framework) and SystemUI.apk (system/app).
They will also need to be modded for a full theme on GB.
*Edit- Lol, M_I ya beat me to it
Thanks @My_Immortal and AyDee.
I had checked the SystemUI.apk and there was nothing to edit in the package. Checking the SemcGenericUxpRes.apk now, will let y'all know soon!
It worked!!! Thanks guys...my UI looks much lore alive now! http://media.xda-developers.com/images/smilies/biggrin.gif
Also don't forget to replace the image for landscape mode too
here is something I wrote earlier:
http://forum.xda-developers.com/showpost.php?p=16201956&postcount=12
riginal said:
Also don't forget to replace the image for landscape mode too
here is something I wrote earlier:
http://forum.xda-developers.com/showpost.php?p=16201956&postcount=12
Click to expand...
Click to collapse
@riginal : I worked out that bit myself, but thanks all the same.
I tried to decompile, modify 1 xml file and recompile the framework-res.apk.
But everytime I do it, I either get into a boot loop, or when In succeed it displays glitches (like notification bar, and messed up lock screen, and settings)
This is for AURORA ICS 4.0.3 and I do have the latest aapt.exe file .. so I don't know what is wrong!
I tried to use the original framework-res but replace the resources file inside, stored and compressed methods.
Tried to get the compiled framework-res but add the META-INF and Manifest file (again, both with compressed and stored resources file) and always.. it just glitches or bootloops.. and the mod that I tried (ICS on screen buttons or the CRT effect when you switch off the screen, mainly used in Oxygen roms, but it's available in all ROMs).. it never works.. only glitches the lock screen, notification bar etc..
Any help?
Thanks.
I might know the answer to this..
Which files are you modifying in framework-res? And how are you pushing it back to your phone?
Sent from my U20i using xda premium
Would be great
I am modifying some files in the values folder, bools.xml, arrays.xml .. but even if I edit bools.xml alone, it still glitches.
To push it back: I go to recovery mode on my phone, plug it into my linux machine (the system partition mounts), paste the new framework-res.apk to replace the old one, fix permissions (otherwise it boot loops), and restart the phone. This method works for other files and never had any problems, like the android.policy.jar
Would be great if you can help me. Thanks
Well, the XML files you're editing are all part of resources.arsc so it's something to do with that which is causing the problem. I used to get all sorts of annoying bugs when I edited anything in resources.arsc and I eventually found out that I was pushing the final apk back to the phone incorrectly.
I use a Windows PC, not Linux, so I might not be that helpful but this is what I do to modify and replace framework-res.apk. Hopefully it'll help. What I do is..
Decompile framework-res.apk
Make my changes
Recompile the file
Use a program like 7zip to open the old and the new files
Drag and drop the "res" folder from the new file into the old
Extract resources.arsc from the new framework-res.apk and add it to the old one in "STORE" mode, so it's not actually compressed
Go into recovery, mount the system partition and push the old file
..and that's it. Works a charm every time.
I would have thought that you would need to do the same thing on Linux but with the additional step of correcting the permissions. If you do all that and it still doesn't work, then there has to be a problem with the actual mod you're trying to do.
Thank you very much, I actually tried that method. It sort of worked, but everytime it breaks the notification bar. It becomes like double the size and I'm not sure why.
Thanks.
Then the issue must be with the modification itself. What exactly are you changing to what?
Sent from my U20i using xda premium
I tried different ones.. but even a simple one.. enable CRT animation.. which is pretty much open bools.xml and edit one true to false.. it breaks it :/
Hi. I just wanted to write a guide on modifying apks. You probably have seen my rom in the ported section.
(I'll make the guide look better when I get home)
Well lets get started.
1.
First. An introduction to what an apk is. An apk is (believe it or not) a zip of files.
2.
So how do you go about editing a zip? I suggest using 7z on your computer or root explorer on your phone.
Second: there are a lot of apks you can edit but for this guide I'll be using the systemui.apk that you find in any rom in the system/app folder.
3.
Ok. So assuming you start with the system ui apk your going to need to extract the apk with 7z on your computer. (or root explorer on your phone. Es file should work also)
4.
Now you should have a new folder where you chose to extract your apk. Open that folder. Your going to see a bunch of files. What your probably going to be interested in is the res folder. Go into that folder and find the drawable hdpi folder. Open it.
Your going to see a lot of icons. Here is where you can change things like wifi icons. You can add 4g icons and so much more. Even edit what your contacts look like.
5.
This is an important step. Make sure your using the system ui apk from the rom your currently on or make sure its compatible with yoir rom.
Ok so now we get to the things like icon changes. Download a theme you've been dying for but couldn't get because it was either for another rom or phone. And the only thing you wanted was a few things from the theme.
Now extract that zip. Then extract the systemui.apk again from the zip you want your icons to look like. MAKE SURE YOU RENAME THE THE SYSTEM UI TO SOMETHING DIFFERENT SO YOU DON'T MIX THEM UP.
6.
So now that you got the system ui apk with whatever you want to use all you need to do is go into the drawable hdpi of the one with the icons you want in it. Copy them and bring them to your roms stock system ui and replace them.
7.
Thats about it. Now zip your roms stock system ui back up and change the ending to .apk. Then put it in system/apps and replace it. Reboot. And boom. Your modded apk is ready.
Hit thanks if I helped.
for step three rename the. apk to .zip its easier
This can only be used for replacing regular images in the APK. There are many images that are .9 images which require decompiling.
There are MANY guides across xda that go into detail and show you the proper way to modify APK's..... There is much more then images.
This one is even in this forum: http://forum.xda-developers.com/showthread.php?t=1388459
Ok finally did it, after posting more than one request and hoped senior members would answer, which they never did. So finally with some hiccups and couple of hours or work i got rid of the annyoing black cursor removed from the aokp 4.4.2 rom which by default has no option to turn of or change the cursor.
A tweak in a file albeit remove it, however completely remove the palm rejection function ! so that is even worse...
Anyways long story short....
the pointer cursor could be found inside system/ framework/ framework-res.apk ... now wait... you cant simply open up the framework-res.apk ! Only way to do so, is to get it pulled by adb , or with root explorer in a rooted phone. I used Es file explorer, mounted System as RW and copied the frame-res.apk to the desktop.
Then with win rar, i opened the frame-res.apk, located the pointer icons inside , res/drawable xxhdpi folder and res/drawable xhdpi folder. the name of the files are pointer_arrow.png. I made a pointer in photoshop with only 10 *16 pixel maybe and just a dot . then renamed the file as pointed_arrow.png and replaced the original .
Now close win rar... and copy it to phone system folder.
Now the important part... dont directly copy the modified framework-res.apk in system/framework directory. doing so will cause bootloop !!
Just selet the modified file , check properties and change permission . Like this
Rw-r-r ...
.. now copy and replace the original framework-res.apk with this one . Reboot your device and pull out your spen and draw near the screen.
Congratulations...you are black arrow BUG free