yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z General] lainvalenajr:
S

Okay my friend you have a bad download. Redownload. anyways I have been using it for a day or so and I have no real issue. Gps seems to work fine, wifi, etc. Just like the nightlys without adw. Works good man.
[G2 and Desire Z General] ctraywick1:
Yea I meant to edit that post.. Downloading from the phone gave me bad downloads twice but when I got it from the pc and transfered it, it flashed without problems.. And has been running pretty smoothly

*I'm just sayin...
[G2 and Desire Z General] rp1783:
Thanks for the feedback, gonna work on implementing some additional elements.
[Trophy Windows Phone 7 Development] ansar.ath.gr:
Hi,

A new ROM for the hTC_Asia operator:

RUU_Spark_hTC_Asia_WWE_1.10.707.04_Radio_5.52.09.16_22.33a.50.10U_by_ansar

see also thread: Windows Phone 7 Branded ROMs for Spark

Till next version enjoy!!!

Regards, ansar.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
So, it seems that more people are taking an interest in making custom frameworks. This isn't really a full tutorial, but I thought it would be helpful to just post some tips on how to go about making your own framework-res.apk, save others a bit of time retreading old ground, since the methods are scattered around the site a bit!

Thanks to wdl1908 for prompting me to do this - should really have done this sooner!

Okay, so basic requirements:

Rooted Gen 8 (Uruk or chulri method)

Original Archos framework-res.apk

zip editor

image editing software

.png's to replace the stock ones with

That's about it! I've been using GIMP on Ubuntu for the image editing, and Phatch for batch resizing, but Photoshop will work just as well on Windows.

Edit: Thanks to wdl1908, have found that Gwenview gives much better results when resizing, compared to Phatch or GIMP. Works on both Ubuntu and KDE.

Use your preferred zip editor to unzip the contents of framework-res.apk to your chosen folder. The main folder of interest is "drawable-mdpi".

The Gen 8's use MDPI resolution images (well, A70 and A101 to at any rate. I think someone mentioned the A32 or A43 used HDPI images). Depending on your .png source, you may need to resize the images. I took my images from themes made for the Desire, which is an HDPI device, so I used GIMP/Phatch to resize them.

In terms of resizing, I compared the size of each new png with the original one, and resized. I know p0rkburn just resizes the images to 66%, but I've had problems with some images not coming out the right size that way. The other thing to watch out for is that not all the images need resizing. Also, some of the textfield and tab_select images are different proportions to their phone equivalents, so again watch out for that.

Once you've replaced the images you want to, they need to be put back into the .apk. I used to copy and paste into the framework-res.apk, but that doesn't work for 9patch files. Also, wdl1908's FrameWorkBuilder makes the compile process so ridiculously easy, there is no reason not to use that instead.

To put the new framework-res.apk on the device, I use this method via ADB wireless, which works fine.

Happy theming!

EDIT: 9patch files

These can be a PITA, until you understand how they work. I used the following two sources to finally crack it :

http://developer.android.com/guide/developing/tools/draw9patch.html

http://xdaforums.com/showthread.php?t=580351

If you are changing 9patch files, you have to decompile and recompile using the FrameWorkBuilder.

I prefer using the draw9patch tool, as it lets you check that the 9patch works as expected.

Spent enough time bashing my head against a brick wall trying to sort out 9patch files, so if I can spare anyone else that, feel free to post/PM..
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
I'll leave this post here for my recommendations that will be more complex when you need to modify xml files.

In short the procedure is a follows (this needs to be expanded)

unpack the apk to framework-res-UNPACKED dir

decompile the apk to framework-res-DECOMPILED (with apktools)

copy framework-res-MOD to framework-res-DECOMPILED

compile framework-res-COMPILED (with apktools)

unpack the compiled apk to framework-res-COMPILED (with 7za)

remove all the files that are present in framework-res-MOD from the framework-res-UNPACKED dir

remove the file resources.arsc from framework-res-UNPACKED

copy all files from framework-res-UNPACKED to framework-res-COMPILED

zip all files in framework-res-COMPILED to the new framework-res.apk

remove the resources.arsc from that apk file

readd the resources.arsc file without compression to the new apk file

Done

The reason this is so complex is that their are bugs in apktools and the signature needs to be preserved.

FrameWorkBuilder v0.3

README.txt

-------------------------------------------------------------------------------------------------------

Place the script FrameWorkBuilder.sh in a directory and execute.

The script will download all the needed tools.

Place framework-res.apk in the dir framework-res-STOCK

Place mods in framework-res-MOD follow the usual directory structure.

Example:

framework-res-MOD

framework-res-MOD/res

framework-res-MOD/res/drawable-hdpi

framework-res-MOD/res/drawable-mdpi

framework-res-MOD/res/drawable

Execute FrameWorkBuilder.sh to apply the mod.

Modded framework-res.apk will be stored in the directory framework-res-MODDED.

-------------------------------------------------------------------------------------------------------

Changelog

-------------------------------------------------------------------------------------------------------

v0.3 Added xml png duplication check to avoid that animations don't work. .9.png support

v0.2 Added mod checks Added compile failure test

v0.1a BUGFIX cp dirs

v0.1 Initial version

-------------------------------------------------------------------------------------------------------

Have fun modding.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
I have no idea about editing XML files, but that was the next thing on my "To learn" list. I would be very happy for you to add your knowledge to this thread. :)

Also, if anyone has info to add/corrections to make, please feel free.
[Gen8, Gen9, Gen10 Themes and Apps] p0rk burn:
Good stuff, guys. At the very least we can make this a three man party. :)
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
The more the merrier!

Guys, can I ask what device you're both using?
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
A101IT with archangel root

A70IT with chulri's root
[Gen8, Gen9, Gen10 Themes and Apps] woti23:
well, if i can do something, i'm here ;-)
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Cool, thanks. Also, can I ask how you're viewing the XML files? Every program I've tried won't open them - keep getting error messages about invalid character content.

Welcome...
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
You have to decompile the framework-res.apk with the apktools then all is revealed.
[Gen8, Gen9, Gen10 Themes and Apps] daveid:
I have an A43it, and I find it to use a mixture of the hdpi and mdpi drawables, it is quite odd how they have it. I am drawing this conclusion because I only changed the hdpi drawables, and some things (status bar pull down for one) stayed original. I am going to work some more on it later today and will update here. My method for pushing to the device uses adb like such:

adb push framework-res.apk /sdcard/framework-res.apk
adb shell
su
stop
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk (only needs to be done the first time, as the permissions will adopt those when replacing in the future)
start

This causes the device to do a little soft-reboot (does not perform a proper full shutdown/reboot) that is pretty quick, and avoids any f/c situations you may encounter replacing the file while the system is live.

Edit 2 - ok, I just plain old missed the drawables earlier, they are all in hdpi for the A43. Posting screenshots of what I have put together shortly.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Great I was looking for that.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Getting stuck on the above step. Have got a folder called framework-res-DECOMPILED. When I try to compile it, the first message I get is:

w:Could not find sources.

It then runs through the process throwing up multiple error messages, and at the end I am left with an empty Build folder. Any ideas? I read on the Apktool thread that you need to add a classes.dex file to apk that don't already have one?

Thought I'd try your method as my primitive version keeps resulting in faulty apk's the last day or two!
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
No problem there thats only a warning.

What error messages?

What version of apktools do you have?

never needed any classes.dex in framework-res.apk

I'll try to cleanup my script and post it soon.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
I just found out we can have custom boot animations on our gen 8 devices.

search for some bootanimation.zip on the web or go to UOT Kitchen and download one from the kitchen. place it in the directory /data/customization/ and reboot. This works even for the stock firmwares with archangel root.

Enjoy
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
I've added the first version of my FramWorkBuilder script in the second post.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Thanks for the hard work!

Gave it a run through but get the following error messages:

Applying MOD...cp: cannot stat `/home/sarju/FWB/framework-res-MOD/*': No such file or directory

and

Copy files from UNPACKED to COMPILED that are not modified...cp: cannot stat `/home/sarju/FWB/WorkSpace/framework-res-UNPACKED/*': No such file or directory

The script is located in the "FWB" folder.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
yeah download the 0.1a version and try again.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Ok, think I'm just being stoopid here. Ran the v0.1a, no error messages BUT

If I use the folder structure "framework-res-MOD>drawable-mdpi", the resulting apk just has the original contents of drawable-mdpi. If I use "framework-res-MOD>res>drawable-mdpi", the resulting pak has an empty drawable-mdpi folder.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
the structure should look like this.

framework-res-MOD
framework-res-MOD/res
framework-res-MOD/res/drawable-hdpi
framework-res-MOD/res/drawable-ldpi
framework-res-MOD/res/drawable-mdpi
framework-res-MOD/res/drawable

but make sure you remove empty dirs.

I suspect it has to do with empty dirs I'll check that....
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Nope tthats not it.

can you zip up the files files-to-remove.txt and log.txt in the WorkSpace dir and post them or via pm if thats possible.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
here you go..

the resulting apk has an empty drawable-mdpi
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
You get a lot of errors on the screen correct? You should not have any errors.

the output on the screen should look something like this.

Checking environment...Done.
Checking programs...Done.
Checking apktools...Done.
Clearing environment...Done.
Unpacking framework-res.apk...Done.
Uncompiling framework-res.apk...
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
Done.
Applying MOD...Done.
Compiling framework-res.apk...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Done.
Unpacking compiled framework-res.apk...Done.
Copy files from UNPACKED to COMPILED that are not modified...Done.
Repackaging COMPILED to framework-res.apk...Done.

Those are all the .9.png that are bad and can't be compiled.

The compile failed.... need to test for that.

you might want to read up on the .9.png problem it's nasty. I'v not yet found a good solution for that.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Yep, I do get a lot of errors related to .9.png files. Was hoping that wasn't important!
[Gen8, Gen9, Gen10 Themes and Apps] blazingwolf:
I was actually looking in to this but hadn't found it yet. Thanks for posting about it. :)
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Added v0.2 of FrameWorkBuilder in second post.

Some tests added some optimizations added.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
You got the images from other framework-res.apk's right?

You should DECOMPILE those with apktools and then copy the images.

If you do that and then recompile your new framework-res everything should be fine.

The decompile add stuff to the .9.png files.

I just did some testes with status_bar_item_background_normal.9.png and when I EXTRACT it from an apk it does not work when I decompile the apk first and then use that image it works fine.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Posted version v0.3 of FrameWorkBuilder in the second post.

Fixes some stuff with duplicate names and animations.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Finally got around to trying v0.2 this morning, and already a new version!

I did as you suggested and this time the script ran perfectly, with a working framework-res.apk. Sadly, this didn't fix the issue I was hoping to address, but that's nothing to do with the script.

Also, the decompiled .9.pngs all had black lines added to the images, which required editing out again. Not sure if you found that?
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Yeah well i'm trying different things. ANd trying to solve some problems I encounter with different kind of mods. It seems it's possible to replace any png with an animation I did that already for the wifi signal stuff. Not ready for prime time yet but I'm getting there.

What issue do you have maybe I can help.

Don't edit them out they are important. They give the apktools compiler information how the png can be scaled. so they need to be in there.

Read about those funny black lines here and you will understand.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Haha, looks like I didn't do enough homework!! The issue I'm having is getting the .9.png's to work properly. I've taken some from a Desire theme, used your v0.2 to decompile the .9.pngs. This time around, I left the "funny black lines" in (;) thanks for the reading material), but the images still don't resize properly on the device. Plus, the black lines are visible on the images on the device. I understood from that article that the lines are for resizing info, so shouldn't be visible right?

Yeah, I've seen this is in one of the Desire themes, with the cell signal bar. Each bar gradually fills, rather than just appearing. You may want to take a look - it's the Carbon Ara theme.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Did you compile the framework-res or just replace the png's. If you have .9.png you NEED to recompile framework-res and not just replace the images.

i'll look into it.
[Gen8, Gen9, Gen10 Themes and Apps] cajl:
it is very great but i have problem

the adb do not work with seven x64...

if you have a solution !
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
http://lmgtfy.com/?q=adb+windows+7+x64
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Using your 0.2 script, I decompiled my source Desire (HPDI) theme apk. I then took the .9.png's out of the DECOMPILED folder, and resized using Phatch. I then put these files into the MOD folder, put my custom framework apk into STOCK, then reran the script. I flashed the resulting apk from the MODDED folder.

I also tried using the .9.png without resizing, but they were obviously too big. The scaling did work a bit better though, which suggests that the resizing may be the cause of the issue? The resized images did have the black markers in the right places though. Think the next step is to load the resized .pngs into the Draw 9-patch tool and take a closer look at them..
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Yes the problem is the resizing. it changes the 1 pixel border around the image the 1 pixel border should contain only black or transparent pixels the resizing will make them fuzzy and then the compile will not work correctly. You could take the resized .9.png in an editor like gimp and touch up the 1 pixel border to make them all black or all transparent and then use that. I told you it was nasty.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Yeah, you did warn me! Unfortunately, I'm a bit of a perfectionist which means there's no turning back now...
[Gen8, Gen9, Gen10 Themes and Apps] p0rk burn:
Hey guys, glad to see you are turning this into a serious project. I've returned after going AWOL for a few weeks.

Fisha - I use an A101.

Has anybody figured out how to disable the battery percentage? I'm eyeing another theme to port and the battery icons probably won't play nice with the Archos overlay.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Yes a change is needed in the services.jar you can download the corrected one from here http://xdaforums.com/showthread.php?t=982529 it is included with the framework-res.apk for the battery mod v0.3 and above.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
So, think there may be an issue in the compile process with the 9patch files. Tried the following:

1. Decompile the Desire framework to get the hdpi 9patch files

2. open these in GIMP, resize to mdpi resolution, remove the black pixel border and save as .png

3. open the png using the Draw9 editor in Android SDK, which automatically inserts the 1-pixel transparent border to any png

4. read the black pixel markers, and confirm that there are no bad patches.

5. put these mdpi 9patch files into the MOD folder in framework builder

6. put my framework apk into STOCK folder

7. run the script again to compile a new framework, and flash that via ADB

However, the resulting icons are still distorted and the black pixel borders are visible in the image. Not sure what is going wrong, but I have confirmed that the 9patch files are configured correctly...
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Could you post one of the .9.png so I can test this out and maybe find the correct procedure to scale them? Maybe we're both missing something here.....
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Here you go...
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Hmm the top black pixel does not fall within the range of bottom black pixels. From what I understood the top and left must at least fall within the range of the right and bottom.

If you move the top black pixel 2 pixels to the left it should be fine.

Probalby not important but why is the image 1 pixel bigger in both dimensions than the original?
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Well, I just copied the placement from the original hdpi version taken from the Desire theme. Will try changing it and see (although with the scrollbar 9patches, the single dots do fall within the range of the right and bottom, and still doesn't resize properly). Also, the Draw9 tool allows you to check for any bad patches that might affect resizing, and the tool seemed happy enough with the placement of the dots..

I guess that's the extra pixel border added by the Draw9 tool. Maybe I should remove a 1pixel border from the png, before converting it to 9patch...
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Strange when make a mod with only the image you uploaded (I put the image you uploaded into the drawable-mdpi) and apply the framework-res.apk and reboot then go to calendar and edit an event I see the dropdown with the modified arrow and the modified shadings but I don't see any distortions. Can you maybe post a screenshot of the distortions?

This is on an A70 with chulri's root.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
I just decompiled the dropdown images from that blue theme and rescaled them to 82x50 then touched them up with gimp to fix the black pixels and applied them as a MOD with FrameworkBuilder. They seem to work ok. Attached are the png's.

What application do you use to view the modifications? I used calendar events to view the dropdowns.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
I was using SetCPU to check, but this screenshot shows the distortion using the calendar edit event screen. This dropdown 9.png was created using the method I described above ie starting with a plain .png and converting to 9patch using Google's tool.

Running on A101, with Urukdroid 0.7. I took the image sizes from the stock Archos A101 framework.
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Strange this is what I get see attached images

It seems your recompile did not work or you just replaced the files in the apk. for .9.png a recompile is needed.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Ok, I have no idea what's going on! I did put the files in the MOD folder and rerun the FWB script, so that to my mind is a recompile?

However, I just extracted the contents of my mdpi folder from the MODDED framework-res.apk, and noticed that all the other 9.png show up as icons without black bars. However, my modded icons show the black bars (see screenshot).

This suggests that the recompile process is just seeing these as png's with the black bars as part of the image, rather than recognising them as 9patch files, with pixel border markers. So the basic problem is that my modded files are ending up in apk as pngs with black bars, not 9patch files??

Since I made the 9.png using the draw9patch tool, I assume they must be ok in format, so the error must lie in the recompile? But then why is it working for you?
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Can you check the log.txt in the WorkSpace folder and see if the recompile spit out some errors. I'v seen it happen sometimes that the compile includes the .9.png without stripping the border and it always spit out some error message that indicated the problem. Have you tried the zip file i attached in post 45? I almost suspect it' has something to do with the size of the images.
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Ok, so no errors in log.txt, but I can't actually see anything in the log that suggests the files from the MOD folder have been included. Have attached it, perhaps you can tell me what I'm missing.

Will try the files you posted...
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
What version of FWB are you using? it looks like from the log file that you're using an old version you should use the latest and start it in an empty directory.

Never mind I just saw the name of the directory you're using 0.2 and that did not handle .9.png file correctly. You should use v0.3
[Gen8, Gen9, Gen10 Themes and Apps] fisha21:
Ok, so I manually edited a couple of 9patch using the draw9patch tool, then tried them out using FWB0.3. The 9.png images I had edited worked properly, resizing as they were meant to. So great, finally figured it out, working perfectly!

Spent the last few days resizing and manually editing about 200 9patch images, loaded them up into FWB 0.3, and the resulting framework has the same problem of the 9patch images being stretched and showing up the black pixel markers!! Also, the battery image not showing up and multiple programs force close on launch. The last time that happened, it was a faulty framework file, but I have checked the log, and no hint of any errors.

Thought I finally had the blasted thing sorted, but back to square 1! :mad::mad:
[Gen8, Gen9, Gen10 Themes and Apps] wdl1908:
Could you post the framework-res-MOD directory according to the log files there was no compile run so the FWB0.3 did not detect it needed a compile. But I need the original mod to verify why it did not.