yashsingh1/xdaforums huggingface dataset:
[XPERIA X10 Themes and Apps] saltorio:
That'd be great.

Not sure what I was doing wrong, but if I tried to unpack the .apk using WinRAR, all the files would appear, but opening any of the .XML files would show nothing but weird characters. When I decompiled the same .apk with APK-Manager, the XML files came out readable, but then (as I mentioned) I couldn't recompile the .apk without it giving errors.

So I'm not sure how to change the files and put them back onto the X10.
[XPERIA X10 Themes and Apps] saltorio:
When I view stat_sys_battery.xml (copied from my X10's system directory to my PC) directly in either WinRAR or 7Zip, this is what I see:
[XPERIA X10 Themes and Apps] MarylandCookie:
Attached are the decompiled .xml files.
[XPERIA X10 Themes and Apps] _calum_:
Alright, so I extracte the xml's last night, added two batt states just to test and ran a build - pushed the framework to my phone and.... ****, so I reflashed my phone at 1:30 this morning (been meaning to do a clean install anyway :rolleyes: ).

Here's the commands I used, got no errors, warnings etc:

Decompile:

java -jar apktool.jar d framework-res.apk framework-res

Build:

java -jar apktool.jar b framework-res framework-res2.apk

I then renamed framework-res2.apk to framework-res.apk (I didn't want to overwrite the original). Could this be the problem, are these things like .Net assemblies and can you not rename them?
[XPERIA X10 Themes and Apps] MrRusch:
I replaced the original - brick as well.. Will have a closer look, not sure what the dealie is.. ;)
[XPERIA X10 Themes and Apps] saltorio:
Did you get any errors (or would a command like that even report them if there were)? As I said earlier, using APK-Manager, when I tried to simply recompile the .apk, it would return errors, though I wasn't able to figure out how to see exactly what the error was.
[XPERIA X10 Themes and Apps] MarylandCookie:
If you add new drawables and use them in a modified XML file (like in this case), then you can't just compile it and replace it etc, this is because the original resources.arsc does not know about these new drawables.
[XPERIA X10 Themes and Apps] saltorio:
Can the resources.arsc be edited itself?

I'm pretty sure from what my friend said regarding his Galaxy S edit, it didn't originally have 100+ stat_sys_battery drawables either.
[XPERIA X10 Themes and Apps] MarylandCookie:
Its an assumption and i could be wrong.
[XPERIA X10 Themes and Apps] saltorio:
I could be wrong too.
[XPERIA X10 Themes and Apps] MrRusch:
For this process to work as intended, one has to delete resources.arsc during compile time, and APK Manager recreates it to include the new items. I don't think this is the problem. Rather I think it's the compilation itself, perhaps missing some meta-data, or it's the signing process, and I'm thinking the latter knowing this device is SE. I'm not sure what signature this application uses to sign, but a guess would be the Android SDKs debug signature. If someone is in the mood for plausibly bricking their phone once more - try to sign the APK with jarsigner instead, using the SDK's debug.keystore.

Edit: Another, perhaps simpler way, could be to edit the APK as an archive (WinRAR/WinZIP). This way, if you make all replacements (images, xml and arsc) in one process (dont close the archive until you are done) - we may possibly avoid the resigning completely.
[XPERIA X10 Themes and Apps] _calum_:
If I get some time, I'll try to brick my phone tonight or tomorrow :D

This time I might just back everything up first ;)
[XPERIA X10 Themes and Apps] MarylandCookie:
What you could do is, once you have the compiled/modifed .xml files you could just drag and drop them into another untouched framework using winrar and add your images + resource. Should work me thinks.. :)
[XPERIA X10 Themes and Apps] _calum_:
Well I just updated the xml and image files and the phone booted normally, only problem being that the battery icon wasn't there.

So, cunning as I am, I thought, well I probably just need to update the resources.arsc as well and what do you know... I'm still looking at 'Sony Ericsson' waiting for my phone to boot... mmmmm.... I'll have another try later but can anyone tell me if there's a way to update the framework in flash mode?
[XPERIA X10 Themes and Apps] saltorio:
D'oh! Well, you're persistence is greatly appreciated Calum. At least flashing and rooting is very straight-forward and easy.

I PMed Chewitt the other day to see if he might be able to lend a hand (with all the framework editing he's done for his Dark theme), but I have yet to hear back.
[XPERIA X10 Themes and Apps] MrRusch:
Yeah, something is funky with resources.arsc. Replacing all the resources (images and xml) doesn't affect the APK's filesize much (mine goes from 10 237 KB to 10 341 KB). But as soon as I swap the resources.arsc file (original 6 204 KB, regenerated 6 223 KB) the APK plummits to almost half in size (5 357 KB). Something is definitly fishy here..
[XPERIA X10 Themes and Apps] _calum_:
So, here we go again, SEUS is running as we speak :rolleyes:

I've attached the apk generated with apktool. This is the generated file, I just pulled the images, stat_sys_battery.xml and resources.arsc out of this and using 7zip dumped them in the standard framework-res (well, the dark10 one, which is standard enough).

I'm gonna give it one more try without the resources file, although I'm pretty sure that won't work, but at least it boots if I do that... :o

Anyway, back on the case tomorrow.
[XPERIA X10 Themes and Apps] MarylandCookie:
How is everyone compiling their directory?

Ive tried all sorts to try & get the damn thing to compile but it keeps complaining about public.xml blah blah, maybe the extra files need to be added to that im not quite sure.

@Calum, you can reflash without losing your data, just make sure theres no userdata.sin file present ;)
[XPERIA X10 Themes and Apps] _calum_:
Cheers, might try that next time. I've been meaning to do a clean install for a while though and last night gave me the opportunity... todays little adventure just meant I had to enter my mail info in Moxier again - forgot the system apps in titanium, doh!

I'm using the following to build my framework-res folder:

java -jar apktool.jar b framework-res framework-res.apk
[XPERIA X10 Themes and Apps] _calum_:
I had another look and checked the file properties in 7zip (see attachment). The 'Host-OS' and compression method stuck out... Any way we can influence these?
[XPERIA X10 Themes and Apps] vrs2610:
here is a much easier way :D

http://myxperiax10.blogspot.com/2010/10/circle-battery-indicator.html?utm_source=BP_recent
[XPERIA X10 Themes and Apps] MarylandCookie:
Thats the command i use but i still get a whole load of public.xml errors :confused:
[XPERIA X10 Themes and Apps] MarylandCookie:
Thats an aditional indicator whereas we are trying to mod the stock indicator.
[XPERIA X10 Themes and Apps] MarylandCookie:
@Calum have you compared the sammy resources file with the stock one?
[XPERIA X10 Themes and Apps] Chewitt:
Just got a PM asking me to pop in here and see what i can do.

I will play tomorrow and see what i can get going.
[XPERIA X10 Themes and Apps] saltorio:
Thanks Chewitt!
[XPERIA X10 Themes and Apps] MarylandCookie:
Done it!

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

*edit*

Almost done lol... got over excited! Pffft!
[XPERIA X10 Themes and Apps] _calum_:
'sammy'?? Sorry man, you're gonna have to help me out here....

oops, too slow, I guess I don't need to worry now :)
[XPERIA X10 Themes and Apps] saltorio:
Wonderful! I look forward to giving it a try.

I have updated the OP to point people to the new thread.
[XPERIA X10 Themes and Apps] _calum_:
It sounds like we need to keep looking into this if we want 1% increments...

I looked at the resources file again and noticed that if I extracted the original (drag and drop) and then just add it straight back to the framework apk (drag and drop again) then I see the same effect with the apk size dropping and the original untouched resources file is now archived differently...

I did this with 7zip. If someone else wants to try this I have attatched the required files. In the meantime I'll keep looking...
[XPERIA X10 Themes and Apps] _calum_:
Done

SWEEEET!! :D

So I risked reflashing again and it paid off :)

I've attached the apk, personally I don't think much of the icons and I had to use the original status bar cause I couldn't see the black numbers against chewitts black status bar :rolleyes: (you can still only just make out the 46) but now you've got a framework with the necessary resources and xmls.

The trick was to rename the apk to .zip and then used the 'add to archive' context menu entry for 7zip on the resources file. In the dialog set the compression to store and select the framework-res.zip. Then just rename it back to apk and Robert's your fathers brother :D

Edit: I had to repack the apk so it didn't blow the attachment limit. Just unzip it - the apk's inside.

Edit: Updated to use Chewitts framework and the 'E-Version' icons from here
[XPERIA X10 Themes and Apps] saltorio:
I tried the same with WinRAR, and got the same results. Removed resources.arsc from the apk, and then added it back (all drag-and-drop). File size went from 10,482,629 bytes to 5,379,043 bytes.

Tried APK Manager (http://xdaforums.com/showthread.php?t=695701) too. I simply decompiled it, and then recompiled it again (specifying it was not a system file). No errors, but the file size dropped from 10,482,629 bytes to 5,245,774 bytes. I re-decompiled it to check, and everything was there.

Something weird.
[XPERIA X10 Themes and Apps] saltorio:
Was just looking at your attached .apk, and I noticed something odd: within \res\drawable-hdpi\ there is a second complete drawable-hdp directory.

The main directory contains all the new icons, but the inner directory (\res\drawable-hdpi\drawable-hdp\) still contains the original icons (0%, 10%, 20%, 40%, 60%, 80%, and 100%).

If it works, that's fine. I just find it odd.

On that note:

Can you detail exactly the process? I know you described it, but step-by-step would be wonderful.

The icons I originally provided (and you used) may not work great on the default bar, but the thread I linked in the OP has a large selection of downloadable icon packs available (just look at the bottom of post #2 here, all the previews are in the first post if you scroll up). The icon sets cbm_B_white_number.zip or scbm_D_white_number.zip are probably the best options for the default X10 bar and the most common (ie: darker) themes.
[XPERIA X10 Themes and Apps] _calum_:
oops :) I was wondering why I still had a black status bar after I updated the framework... That -hdp folder must have got renamed somehow :rolleyes: and I just dragged it into the apk and updated. After I noticed the framework was still black I updated the images directly. So that's where the folder came from...

I'm updating the download now. I'll get onto a guide tomorrow, should I post it here or start a new thread? not really sure.
[XPERIA X10 Themes and Apps] saltorio:
It's up to you. If you post it here, I can copy it to the OP. Otherwise feel free to start your own topic.
[XPERIA X10 Themes and Apps] saltorio:
I impatiently await it. :D

BTW: What are those widgets you have at the top of your homescreen (the text time+date and battery status)?
[XPERIA X10 Themes and Apps] _calum_:
I've updated the framework now - used the E-Version from the post you linked with 20 charging animations.

I'll make a vid of the whole process tomorrow. I'll just post it here and you can link it on the first post.
[XPERIA X10 Themes and Apps] AyDee:
Awesome! I had already downloaded "E" version too- they are perfect for a theme I'm making :D

Also impatiently awaiting... I may try before the video makes it:p

Maybe a dumb question but can I just drag & drop the xmls and pngs or should I follow the same steps used for the resources file?

Big thanks to all who put this in motion! (& especially calum!)
[XPERIA X10 Themes and Apps] _calum_:
:)

Sorry, I should have probably put this in my last post, got caught up in some other stuff though. If you use the framework posted here then just drag7drop the resources and xmls in. If you need to add images that aren't there (the posted framework has all 100 batt images and 20 charging animation frames) then you'll need to recreate the resources file - see the as yet non-existent video ;)

I'll get onto the vid at work tomorrow (can't now, going to bed :rolleyes:) so it should be up in about 9-10 hours.

@saltorio: can you please link the post with the framework in the opening post so it's easier to find.
[XPERIA X10 Themes and Apps] saltorio:
I can tell you what NOT to do.

Don't

be a noob like myself and try to overwrite your framework-res.apk using Root Explorer. :rolleyes: I tried that, and as soon as I pressed "Paste" my phone turned off. It then would not get past the Sony Ericsson splash screen.

So I'm now in the process of re-flashing my phone, and have learned my lesson!
[XPERIA X10 Themes and Apps] _calum_:
LOL - welcome to the club :p except I did it with ninjamorph :rolleyes:
[XPERIA X10 Themes and Apps] Inebriatef:
Ive tried installing this framework you posted calum, but all i ended up with was a phone that didnt even load bootscreen.

What i did was i took the framework apk and pasted it into chewitts installer for X10 res mods by XperiaX10user. And then ran the installer from there.
[XPERIA X10 Themes and Apps] AyDee:
Yeah, I've had to re-flash a few times messing with Root Explorer- I've already learned that harsh lesson...

Headed to work now; I'll most likely try this when I get off (a few hours before the video hits..) seems pretty straight-forward...

Cheers guys.
[XPERIA X10 Themes and Apps] _calum_:
Yeah, installing the attached framework is fine, the video will just be for the whole process of updating resources.arsc and editing the xml.

Did you unzip framework-res.7z or just rename it? I had to zip it again so it was small enough to attach, but I installed it the same way (using the dark10 installer) and it was fine...

Do you have 2.1 running? It's a 2.1 framework.
[XPERIA X10 Themes and Apps] Inebriatef:
I unzipped the downloaded file and found the .apk file. That apk file i pasted into the installer.

Yeah i have 2.1 up and running.

Been toying with the icons myself, but never overcome the fact that i couldnt get the files compiled after editing :(

Ill give it a try with the Dark10 installer and come back to you.

EDIT: Works like a charm now :P great work dude

Now all we need is to make some sort of kitchen app for it, so we can make any framework into featuring the nice battery addon stuff :)
[XPERIA X10 Themes and Apps] urs74:
So calcum is it safe to add our other icons to the framework just don't change the battery icons?
[XPERIA X10 Themes and Apps] saltorio:
That sucks. I feel for you... I know what the brick is like. I'm so looking forward to when the dev team gets the bootloader hacked so we can get full NAND backups.

So I got it installed (finally) along with Chewitt's Dark10 theme (quite sexy BTW). I ran into a long and ardous problem that after bricking my phone just before leaving work, I re-flashed and rooted, but didn't get to installing JIT until I got to my parents place. At that point I couldn't get Shell Root for some reason, and after an hour trying, I gave up and started over again from flash.

Anyhow, here's my step-by-step process, which I performed immediately following a fresh flash, root, and JIT install:

Download Calum's modified framework: framework-res.7z (from post #57).

Use 7-Zip to unzip it as: framework-res.apk

Download and unzip Chewitt's Dark10 Download Link For 2.1 Alpha v3.0.0 theme.

Copy framework-res.apk to \Dark10 for 2.1 Alpha v3.0.0\Content\content\, overwriting the existing file.

Plug X10 into my PC's USB, ensuring USB debugging is enabled (Settings > Applications > Development > USB Debugging)

Run \Dark10 for 2.1 Alpha v3.0.0\Content\Dark10 Series Installer.cmd.

Select: #1 - Pre Install Check, and follow the on-screen prompts.

Once everything is verified OK, select: #5 - Install Framework.

Upon notice of success, phone will reboot with the beautiful Dark10 theme and (most importantly here), an animated percentage battery icon (visible on both the notification bar as well as the lock screen).

Hopefully, this helps anyone looking to try themselves... at least until Calum puts out a tutorial of some sort.

--- EDIT 1 ---

...and now I've lost JIT, and in attempting to fix it (which I was able to do), I lost root and can't get it back. If it's not one f*#king thing, it's another.

--- EDIT 2 ---

I re-flashed (again), and this time I used ttxdragon's 2.1 Customizer v0.2 to get JIT without needing Shell Root. Seems to have worked fine (knock on wood). Theme+battery now working well.
[XPERIA X10 Themes and Apps] AyDee:
Did you add the resources using the method calum described in this thread?

Ah, well- I guess I can wait until tomorrow since it's late and I have work again in the am.
[XPERIA X10 Themes and Apps] saltorio:
No problem.

I should also note that I've modified the thread title and the OP with my preliminary instructions and credits.
[XPERIA X10 Themes and Apps] AyDee:
I did it! Using calum's instructions I managed to get it installed on my own theme.

Pulled the resources.arsc from calum's framework then used this tip:

Then just drag in the pngs & the 2 xmls from calum's framework.

All with 7-zip, no compiling, and and Bob's your freakin' Uncle!

Installed with DarkBar installer since I haven't tried the new Dark10 yet but I'm pretty sure it's the same..

Now, calum- you'll have to tell me how you got the charge icon on the left side of your lock screen too- did I miss an icon? (see 1st attached pic)

I actually kind of like the stock icon better there anyway if it's just a static icon but I just don't want to miss anything...

Thanks again.:)
[XPERIA X10 Themes and Apps] _calum_:
How many bricks does it take to build a house, lol :D

I had to stare at that 'Sony Ericcson' waiting for the boot screen more than a couple of times ;) (c'mon, boot, aww c'mon... OK, go and get a coffee, come back later, has it booted.... **** :p )

yeah, no problem, just don't try to use the resources file anywhere else without adding it to the apk as I described. You can just treat the posted framework like the stock one, drag and drop pngs to your hearts content.

No worries. Just getting a post together now to describe the process.

:) at least you can spell my name :p

That image is ic_lock_idle_charging.png
[XPERIA X10 Themes and Apps] MarylandCookie:
Future tip: For anyone who needs to reflash due to a bad upload of an app i would recommend just flashing the system.sin file (ive done this on a number of occasions!!)...

Your phone will boot up (will take a little longer than usual) and the only difference will be is that you will have all your system apps back but you will need to re-root. Everything else will be the same ;)

Even better if you have the One Click Root app found here:

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

Im not sure if this warrants a new post but believe me it is a life/time saver tip!
[XPERIA X10 Themes and Apps] _calum_:
hey man, nice tip. Could've used that a few days back :)

I'm just working on this thread http://xdaforums.com/showthread.php?t=834806 I'll add it to that if the thread sticks. I'm working on the xml section now.
[XPERIA X10 Themes and Apps] _calum_:
OK guys, there's a tutorial here

Please post any feedback in that thread so I can update it if need be
[XPERIA X10 Themes and Apps] MrRusch:
Good job guys! So it was the compression of resources.arsc ;)

EDIT: Here's a clean version of framework-res.apk (2.1 original, no theme) with 1% battery mod (grey colored version).

1. unrar archive

2. copy APK to /sdcard

3. in terminal,

- make sure you have super user permissions (su),

- remount filesystem as read-write (mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system), and

- replace framework (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk)
[XPERIA X10 Themes and Apps] DaveHTC200:
Awesome!!

Thanks :D
[XPERIA X10 Themes and Apps] iridaki:
Been waiting for this!!! :) :) :)
[XPERIA X10 Themes and Apps] saltorio:
Great job, MrRusch. I'll post it as part of the guide in the OP.
[XPERIA X10 Themes and Apps] HunteronX:
Thanks for this. :)
[XPERIA X10 Themes and Apps] tiggerbcn:
Great work, looking how to do this from the battery and see that is done, I have a problem because it happens not wish to change in the Framework-res.apk that you have put the icons for a color Battery carrying some themes of Samsung GalaxyS, but the change and I do not see the battery icon, why not appear? They have the same name, same resolution, anyone know why they do not work these icons?

thanks
[XPERIA X10 Themes and Apps] MrRusch:
Sounds like you didn't encrypt the XMLs before compilation.
[XPERIA X10 Themes and Apps] RobHunt:
Holy crap, this was my first time working with anything like this. The entire SU, framework-res and terminal thing was a mysterious black hole. I managed to get the Global version of 2.1 on my phone and now I managed to pull this battery icon thing off so I am positive that will give me the courage to screw something else over sooooo hard later!!!

Really though, thanks for all your work and research guys, much appreciated.
[XPERIA X10 Themes and Apps] MrRusch:
Here are all the Super Circle Battery modifications ported to X10. Use the same procedure described before and enjoy! All props to Fightspit (original post here)

A Black

A White

B Black

B White

C Grey

D Black

D White

E Grey

Note: These are based on 2.1_2.0.A.0.504_GENERIC firmware.
[XPERIA X10 Themes and Apps] urs74:
so since all the dirty work with the icons have been done can we replace the other icons in drawable-hdpi with what we have(our own custom icons not the battery ones) or would we have to recompile and yadda yadda yadda the framework again?
[XPERIA X10 Themes and Apps] AyDee:
Yes, it's fine just to drag-drop replace icons afterward.

(_calum_ answered Here)

Now that the xmls and the resources.arsc have been edited and recompiled properly you can extract everything for the battery mod from one of the apks and insert it onto your own (instead of moving everything in from your theme to one of these)

See my post Here and pay close attention to _calum_'s tip I quoted.

The xmls are in res/drawable and are named stat_sys_battery.xml and stat_sys_battery_charge.xml and all of the pngs are in drawable-hdpi and start with stat_sys_battery (127 of them). resources.arsc is in the root of the archive

On that note, it may be a good idea to post just the resources.arsc,xmls,and pngs in similar packages with a nice 'readme' so we don't have to dig them out each time...
[XPERIA X10 Themes and Apps] tiggerbcn:
The XML's are the same, just change the png's icons o, I have always done so, all the other icons that I changed out well, but the battery icons are not.
[XPERIA X10 Themes and Apps] _calum_:
Good idea, done :)
[XPERIA X10 Themes and Apps] MrRusch:
Hmm.. well, if you've only replaced the images that are in there, and they don't show up at all.. A guess would be that the format of your images is different. But really, the icons not showing up at all is characteristic of corrupted XMLs. Not sure mate sorry.
[XPERIA X10 Themes and Apps] urs74:
Thanks for you the info! worked like a charm!
[XPERIA X10 Themes and Apps] saltorio:
MrRusch:

Just for clarity of the tutorial - when you say "in terminal" (step 3), do you mean ADB, or using a terminal client on the X10?
[XPERIA X10 Themes and Apps] MrRusch:
I meant a terminal emulator client on the device. The process can be adapted to use ADB as well (which is essentially what Chewitt's Installer is).
[XPERIA X10 Themes and Apps] saltorio:
Cool. That's what I though, but I figured I'd make sure so the guide is clear.

On a side note:

I have started a new thread trying to begin an effort to modify our X10s to display accurate signal strength (dbm) in the statusbar, rather than just showing bars. Please come and help out if you can:

http://xdaforums.com/showthread.php?p=9152651