[Wildfire Android Development] vimjam:
1.EDIT .9 IMAGES

DESCREPTION:

.9 images are basically PNG images , but are modified to specify a few extra expandable instrustions such as HEIGHT , WIDTH . These images are compiled in draw9patch of sdk & are encrypted via eclipse software

REQUIRED SOFTWARE:

1.WinRar(or any other zip tool)

2.Android sdk manager (draw9patch)

3.eclipse IDE for java developers(download it from www.eclipse.org)

4.image editor(i use paint.net tool)

PROCEDURE:

As an example i am using cm7 nightly & i am editing a .9 image in systemui.apk(theme related file) which is in System>app folder

EDIT : now you can download the attachment or can directly see my example images in post itself

__________Extracting Image__________

1.open the cm7 zip via winrar , navigate to app folder which is in system folder

**cm7nightly 170.zip

2. double click on the systemui.apk & a new window pops up with the contents in the syatemui.apk

**cm7nightly 170.zip>systemui.apk

3.all images are in res folder(common for any app) go to res folder

**cm7nightly 170.zip>systemui.apk>res

4. now you have to keep in mind that all the images used by that particular apk are in RES folder & are kept in sub folders named starting with 'drawable' as

drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable

**cm7nightly 170.zip>systemui.apk>res>drawable-ldpi , ref image step2

5.go to drawable-ldpi and extract those image to any folder in your pc

**c:/vimjam/desktop/myfolder , ref image step3

6. rename that image which you want to edit by removing the .9 in the name(original image name : header.9 edit it to header)

**c:/vimjam/desktop/myfolder/header.png , ref image step4

7.edit that image as you wish & save it in .png file only

**c:/vimjam/desktop/myfolder/header.png

8.now open draw9patch.jar which will be in the following folder x1:/x2/Android\android-sdk\tools\lib (x1 refers to your C drive or D drive or whatever partition where you installed your sdk)(x2 refers to program files folder or program files(x86) in few windows versions)

**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar

9.drag your edited image on the draw9patch window , then it will show as the screen shot given below

**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar , ref image step5

__________.9 Image Editing__________

10.this is the part where you encode .9 script on your image

11.basically what draw9patch does is it gives a black lining at the ends of the image(which are to be specified by us)which are later encrypted as instructions in eclipse software)

12.in draw9patch first tick the show patches option

13.now you have to experiment a little bit to understand this procedure , when you left click at the edges of the image a black spot appears that black spot is the .9 code

**right click on that black spot to erase it

14. for now see the screen shots and do the black lining just as what i did(type 1) (do not use the black line at round edges(only at rectangular edges)(refer type 2 image for more details)**after you've completed the procedure use the lining as done in type2 screenshot provided below , ref image type1

15. save that image with the same name as the original file (see screen shot named savetype)(you can see that the image still contains these black dots , dont worry its natural)

**c:/vimjam/desktop/myfolder/header.9.png , ref image header.9

__________Eclipse Encryption__________

16.this is the part where you complete the encryption using ECLIPSE

17. now open eclipse , click new>project>android>android project , ref image step6

18.a new window opens fill the details (refer my pic named demo)(i use the word demo in the details you can use any other) & click finish , ref image step7

19. now expand the demo project , you can see a couple of things like src , gen... ignore them except res folder , ref image step8

20.expand res folder , drag the .9 patched image(which you edited using draw9patch.jar) in drawable-xxx

(xxx refers to ldpi or hdpi or mdpi )

**NOTE: if your edited image is from drawable-ldpi place it in drawable-ldpi only similarly hdpi to hdpi , mdpi to mdpi only , ref image step8

21. right click on the demo folder project & click on android tools , and then on

EXPORT UNSIGNED APPLICATION PACKAGE.... & save your file

**your saved file will be demo.apk , ref image step8

22.now drag that saved file into any zip file(don use the cm7 nightly zip) or you can create a zip archive of that demo.apk which is generated by eclipse

** compress demo.apk to demo.zip

23. open the demo.zip archive, double click on demo.apk , navigate to res , drawable-ldpi and extract the header.9.png image

24. now open cm7nightly170.zip , navigate to systemui.apk , double click on it , click res,drawable-ldpi & now drag the previous image which you extracted from the demo.zip archive ,then the winrar will ask for confirmation click ok

** cm7nightly170.zip>systemui.apk>res>drawable-ldpi , ref image step9

25.dont close the cm7 nightly zip yet , after you clicked ok the winrar will ask for a save confirmation to save changes in parent folder click yes and close it .done

(this confirmation will be small & will be hidden behing other open windows/applications so check carefully & do not miss this confirmation) , ref image step10

now you can flash that nightly file via recovery,same procedure can be applied to any .9 images of any apk

==========================================

EDIT2: UPDATED IMAGE SCREENSHOTS , PLACED ALL IMAGE EXAMPLES IN ".9 IMAGE EXAMPLES.RAR" FILE

**RAR FILE CONTAINS ALL THE IMAGES WITH LITTLE EXPLANATION IN THE IMAGES ITSELF TO UNDERSTAND THIS PROCEDURE DOWNLOAD THAT RAR FILE(contains no virus its my word)