yashsingh1/xdaforums huggingface dataset:
[XPERIA X10 Themes and Apps] MrRusch:
Hehe, yeah I was thinking about the dBm/ASU as well, I just find myself wondering what my reception is all the time ;) I mean it's cool and it's accurate, but the simplicity of the bars was way more user friendly ;) So yeah, positive numbers would probably be easier :p

About the division by 0, I think it wasn't the problem. I am very confused, I hate math ;) Trying to figure out what the deal is..

EDIT: Ok, think I fixed it.. *fingers crossed*

iconID	%	RSSI
min	max
0	1-4	-100	-97,76
1	5-9	-97,75	-95,51
2	10-14	-95,5	-93,26
3	15-19	-93,25	-91,01
4	20-24	-91	-88,76
5	25-29	-88,75	-86,51
6	30-34	-86,5	-84,26
7	35-39	-84,25	-82,01
8	40-44	-82	-79,76
9	45-49	-79,75	-77,51
10	50-54	-77,5	-75,26
11	55-59	-75,25	-73,01
12	60-64	-73	-70,76
13	65-69	-70,75	-68,51
14	70-74	-68,5	-66,26
15	75-79	-66,25	-64,01
16	80-84	-64	-61,76
17	85-89	-61,75	-59,51
18	90-94	-59,5	-57,26
19	95-99	-57,25	-55,01
20	100	-55

I set this up to clear up what the % of the RSSI actually is.. Unless we wanna extend it to increments of 1%, I had to make this choice: 1-4% is presented as 0%. The alternative was to make it 5%, which seems weird.. The 1% increments would be more accurate, but also require more resources.. Not worth it right?
[XPERIA X10 Themes and Apps] _calum_:
What's with the overlap?

No, probably not worth it - but I'm looking at added a text field now... You could also go for '<5%' :)
[XPERIA X10 Themes and Apps] MrRusch:
What overlap? Am I blind? The RSSI min and max is a range. I.e. within the percentage range 1-4 falls all RSSI values between -100 and -97,74..

@<5%, wow I feel stupid now :o Cheers!
[XPERIA X10 Themes and Apps] QuentinCosta:
how can i apply this without changing my whole framework.apk?

cause i got the framework from Res-Mods and dont want to change everything...

thx in advance
[XPERIA X10 Themes and Apps] _calum_:
1-4 stops at -97,74 and 5-9 starts at -97.75
[XPERIA X10 Themes and Apps] MrRusch:
There is no easy way to do this. You have three options:

1) Use one of the frameworks supplied here, without any theme.

2) Wait for your theme creator to incorporate this into his themes.

3) Follow the logic in this thread and incorporate it by yourself in whatever theme you want.
[XPERIA X10 Themes and Apps] _calum_:
So shouldn't it be

0	1-4	-100	-97,76
1	5-9	-97,75	-95,51
[XPERIA X10 Themes and Apps] MrRusch:
Yes you are right, lol. Sorry.. Either way it's not used by the code in anyway, was just me trying to sort this in my head. Obviously my head is confused ;) Damn negative numbers!

EDIT: Did I mention I hate math? :p Anyway, corrected it..
[XPERIA X10 Themes and Apps] _calum_:
:D

Just a wee message to put me over the 10 character limit :)
[XPERIA X10 Themes and Apps] MrRusch:
WiFi RSSI % + Signal strength dBm + Battery % + Reboot

Installation:

1. Unrar archive.

2. Copy extracted files to /sdcard, and

3. In terminal emulator:

a) make sure you have super user permissions (su)

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

c) replace android.policy.jar (dd if=/sdcard/android.policy.jar of=/system/framework/android.policy.jar)

d) replace services.jar (dd if=/sdcard/services.jar of=/system/framework/services.jar)

e) replace framework.jar (dd if=/sdcard/framework.jar of=/system/framework/framework.jar)

f) replace framework-res.apk (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk)

Reboot will take some time, don't get freaked out. And backup your stuff first, just to make sure.

Note: As this replaces framework-res.apk, so your previous themes and mods will be lost.

Now guys, please help me test this so we can iron out the bugs. Then themers can do their thing, the other way around is just a waste of time. It's better we make a solid foundation for them to build on, than them trying to incorporate all the changes we make into their theme.
[XPERIA X10 Themes and Apps] saltorio:
Calum: I installed your modified files according to MrRusch's process (http://xdaforums.com/showthread.php?p=9208038#post9208038). Thought I had actually bricked my phone afterward, as the bootup after making the change took a very long time. It did finally boot though, and the dBm listing is working great.

However, my battery display is now messed up. When the phone rebooted, the battery was at 90% according to Settings > About Phone > Status, but the battery icon in the notification was showing as 63%. I rebooted again, but the icon remained the same. I watched the battery drop percent-for-percent with the actual battery level (90%-88% real level showed 63%-61% on icon), but then it all of a sudden changed to display 6% battery somewhere around 86% actual level. Now that I've plugged the phone in, it's showing 82% on the icon, with the real level at 92%.

Update

Here's the value correlations I've seen so far (real level -> statusbar icon):

90% -> 63%

89% -> 62%

88% -> 61%

86% -> 6%

92% -> 82%

95% -> 83%

96% -> 83%

97% -> 83%

100% -> 100%

Not sure what's going on. I was already running the battery mod before, and installed Dark10 beta 0.0.1 last night and they were working fine.

I'd also like to ask: is there a series of ADB commands I can run on my laptop (with the phone attached) that will do the same as MrRusch's Android terminal commands? I as because typing those commands in the terminal on the phone is more of a pain than copy-pasting them into a terminal on my PC.
[XPERIA X10 Themes and Apps] MrRusch:
Copy the extracted files to your SDCard root and try this in PC terminal:

@adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system

@adb shell dd if=/sdcard/android.policy.jar of=/system/framework/android.policy.jar

@adb shell dd if=/sdcard/services.jar of=/system/framework/services.jar

@adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
[XPERIA X10 Themes and Apps] _calum_:
@saltorio;

I'm on the road at the moment but am seeing the same effects. I'll be looking into it again later on tonight.
[XPERIA X10 Themes and Apps] saltorio:
No problem. I can live with it for now (the charge indicator at the top-left of the lock screen is still accurate), but figured I'd report my experience.
[XPERIA X10 Themes and Apps] _calum_:
I think I've got it figured out. I compiled the framework with just the battery mod and copied the xml's to my framework. This worked fine when I pushed it to my phone. I then compiled the signal strength mod and just copied the resources.arsc to my framework.

I'm pretty sure that after the second run the battery xml's were compiled differently (or the image references in resources.arsc are different), so I should have copied them into the new framework as well (even though there were no changes made to these files). I'm not really 100% sure why this would happen, as the other xml's seem to be the same... but it could be that the stock xml and image files are referenced in apktool.yml and the new ones aren't.

Anyway, I'll test this later tonight and repost.
[XPERIA X10 Themes and Apps] _calum_:
OK, got it sorted now. It seems that it's important to do everything in one step, not sure why... maybe I did miss something before but I have seen the wrong images being loaded multiple times over the last days, but as long as everything was done in one step (up until now it was because there was only one step) everything is displayed correctly.

I had a bit of a play and you can see why I have made a theme of my own ;)

I am displaying the ADU value instead of dBm so the scale is 0-31 with bigger naturally being better :eek:

I think I might use the large font shown in the screenshot below for my battery, just don't know how I'm going to nicely seperate it visually from the clock...

If anyone wants this as is then let me know, otherwise please give me some ideas for the images and I will add the reboot and maybe even the wifi mod (although I'd like to use a text field for the wifi - tried it before andd... oh well - at least this time it was only the system FC'ing on me so I could still save the day with adb :))

Any ideas?
[XPERIA X10 Themes and Apps] AyDee:
I haven't tried anything past the battery mod yet but I thought of some icons for signal strength... 4 bars with 8 steps a piece that can represent either adu or dbm

(it's all just 'signal' to me, hence the images)

I did a color set and a black & white(grey), both w/a white border

The ones attached are named to be used with "RuschIT-WiFi&dBm&BatteryRebootForX10" since that's what I based them on when I made them. Feel free to add numbers or whatever and if they're not quite what you wanted you don't have to use them.
[XPERIA X10 Themes and Apps] _calum_:
nice, thanks :)
[XPERIA X10 Themes and Apps] kafej666:
Hi

Thx a lot for this, but can You add recovery function too ??
[XPERIA X10 Themes and Apps] telmoabff:
20 minutes already. Is it normal?

45...

1 hour...

1,5 hour...

Stuck at "Sony Ericsson" text at boot...

Does it help if I remove the battery and put it back on?
[XPERIA X10 Themes and Apps] telmoabff:
Is it really services.jar or framework.jar?
[XPERIA X10 Themes and Apps] goRt:
like on line d?!?!?
[XPERIA X10 Themes and Apps] _calum_:
that's a typo.
[XPERIA X10 Themes and Apps] MrRusch:
Yeah, oups, thats quite a typo. Sorry
[XPERIA X10 Themes and Apps] telmoabff:
how long does it take to reboot? Usually?
[XPERIA X10 Themes and Apps] MrRusch:
A couple of minutes, just a little longer than a normal reboot.

I really like this one. Makes it much more intuitive..
[XPERIA X10 Themes and Apps] telmoabff:
I'm having the same problem...

My phone just keeps rebooting.

I can't toggle wi-fi off.

I decided to walk away from my wireless router. The wi-fi signal dropped to 95%. The phone didn't reboot.

Any guesses? The division by zero problem?
[XPERIA X10 Themes and Apps] MrRusch:
Surprised nobody else reported this until now. Yeah I have the same problem with Wifi, and I don't have the faintest clue as to why. So my advice at the moment is just to stay off the wifi-mod. Sorry
[XPERIA X10 Themes and Apps] telmoabff:
Also the battery Super Circle (or Cycle) shows a 2% difference.

This morning it was 71%. I had a go at Angry Birds. Played for 5 minutes. Exited. It showed 9%. Restarted. Went back to normal 70%.

Crazy for now.

Is it possible to reinstall one of the previous packs so that I only have the battery Super Circle and Wi-Fi and GSM go back to normal?

EDIT: Sorry there isn't such a pack. The options are: dBm, WiFi+dBm or WiFI+dBm+battery.
[XPERIA X10 Themes and Apps] MrRusch:
Yeah I've noticed some problems with the battery as well, very randomly. I will try and have a look at it tonight, and see if I can sort it out. I will release a dBm+battery version when I can, and then add Wifi when stable.
[XPERIA X10 Themes and Apps] telmoabff:
Thank you very much!
[XPERIA X10 Themes and Apps] MrRusch:
Ok, I reworked the mod. This one includes battery, signal, and reboot modifications. Let's see if the battery is stable now.. Will have another look at Wifi when we know this one is flawless.

EDIT: Signal images courtesy of AyDee.
[XPERIA X10 Themes and Apps] telmoabff:
I'll give it a try and report back later...
[XPERIA X10 Themes and Apps] MrRusch:
Great stuff. Working good here now, hope you are experiencing the same.
[XPERIA X10 Themes and Apps] telmoabff:
Pity I can only push it later at home. At work now. Report soon.
[XPERIA X10 Themes and Apps] telmoabff:
Just pushed it.

Don't know how but the 2% constant difference seems to have vanished. Did you find you the problem?

Seems great. I'll report any problems.

Hope you'll have time to implement the wi-fi signal too.

Thanks!

The bars represent dBm only, right?
[XPERIA X10 Themes and Apps] goRt:
@MrRusch

Using your latest build, I no longer get FCs and it looks very good

Thanks
[XPERIA X10 Themes and Apps] telmoabff:
It's been great so far. Very stable.

Nothing really needed to be reported.

Do you think a more sober version (greyscale) could be released (bars and circle)?

Thanks!
[XPERIA X10 Themes and Apps] MrRusch:
Yes, the bars are for the signal strength. Here is another try at the Wifi. Please help and test for random reboots.

EDIT: Removed. Still not working correct.
[XPERIA X10 Themes and Apps] telmoabff:
When you have it ready send us for test.

Do you think the wi-fi signal strength will be shown as percentage again?
[XPERIA X10 Themes and Apps] Gergith:
I still have troubles installing this. it always freezes at the sony ericson screen right at the beginning. Perhaps it just wont work on my version? (10a generic?)
[XPERIA X10 Themes and Apps] telmoabff:
First time I installed it had the same problem. Probably I typed something wrong. Be very very careful and you'll get it right.

So far, the only problem identified was the Wi-Fi signal strength. When it was 100%, it kept rebooting the phone. However, the latest version by MrRusch (only SuperCircle and GSM signal strength) is working fine.
[XPERIA X10 Themes and Apps] Gergith:
I've just been using root file explorer and been copying the files over with the same permissions in the same order, but it fails.

I used this method successfully for replacing the boot animation.

If I have to use terminal, whats a good free terminal app?
[XPERIA X10 Themes and Apps] telmoabff:
I used Terminal Emulator. It worked fine.
[XPERIA X10 Themes and Apps] MrRusch:
Try X10 Mod Tool.
[XPERIA X10 Themes and Apps] Gergith:
Still no luck with either; I just get reboot loop of death :p I'm going to try leaving it for 20-30 minutes this time to see if THAT will work :p
[XPERIA X10 Themes and Apps] Gergith:
I've had to flash soo much; I've fully automated the process :p

Is there anyway to get you some sort of log?

EVERYTHING works fine till the reboot, files replace ok.
[XPERIA X10 Themes and Apps] MrRusch:
@Log: You can try connecting USB and running adb logcat from terminal (during boots).

Seems very odd. Perhaps someone else in here can say whether they have gotten this to work on an X10a Generic?
[XPERIA X10 Themes and Apps] Gergith:
Do I have to be in flash mode when booting my phone?

It sucks because I'd REALLY love the battery tweak in here... I KNOW! FIRST I'll test out the battery tweak. Is yours based off of that?
[XPERIA X10 Themes and Apps] Gergith:
I have attached the log from logcat when booting

By line 328 its starts looping

I think the error is previously when things fail :p I just don't know what or why.

It may be because this time i have removed apps, but I doubt it as I have tried this before ANY other tweaking a few of the flashes i've done today.

EDIT:

Tried this for JUST the battery mod, and it worked.

http://xdaforums.com/showpost.php?p=9143233&postcount=92

Tried this one for battery and reboot menu. works but without showing the battery icon on the normal bar on top right when charging. Charging screen saver shows updated icon though.. when unplugged it shows normally.

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

I think I'm going to try one last time to get this to work on my own :)

EDIT:

FINALLY works.. I think :p Everything is showing up fine, reboot menu is there and the signal strength is showing with the new colourful icon :)

My only guess is I wasn't doing it properly before :p Did everything in Android Terminal Emulator line for line and it worked just perfect.

Looking forward to wifi signal strength :)

Trying your latest
[XPERIA X10 Themes and Apps] MrRusch:
Having another look at the Wifi problem. Here is the SE version of the calculateSignalStrength function.

.method public static calculateSignalLevel(II)I
.registers 6
.parameter "rssi"	ref p0
.parameter "numLevels"	ref p1

.prologue
const/4 v2, 0x1	v2 = 1

const/16 v3, -0x64	v3 = -100 (MIN_RSSI)

.line 660
if-gt p0, v3, :cond_7	if rssi >= MIN_RSSI

.line 661
const/4 v1, 0x0	v1 = 0

.line 666
:goto_6
return v1	return v1

.line 662
:cond_7
const/16 v1, -0x37	v1 = -55 (MAX_RSSI)

if-lt p0, v1, :cond_e	if rssi <= MAX_RSSI

.line 663
sub-int v1, p1, v2	v1 = numberOfLevels - 1

goto :goto_6	return v1

.line 665
:cond_e
const/16 v1, 0x2d	v1 = 45

sub-int v2, p1, v2	v2 = numberOfLevels - 1

div-int v0, v1, v2	v0 = 45 / v2

.line 666
.local v0, partitionSize:I
sub-int v1, p0, v3	v1 = rssi - MIN_RSSI

div-int/2addr v1, v0	v1 = v1 / v0

goto :goto_6	return v1
.end method

And when sending 20 levels to the function, this is basically the return schema.

RSSI	RETURN VALUE	INT ID
<=-100	0
-99	0,444444444	0
-98	0,888888889	0
-97	1,333333333	1
-96	1,777777778	1
-95	2,222222222	2
-94	2,666666667	2
-93	3,111111111	3
-92	3,555555556	3
-91	4	4
-90	4,444444444	4
-89	4,888888889	4
-88	5,333333333	5
-87	5,777777778	5
-86	6,222222222	6
-85	6,666666667	6
-84	7,111111111	7
-83	7,555555556	7
-82	8	8
-81	8,444444444	8
-80	8,888888889	8
-79	9,333333333	9
-78	9,777777778	9
-77	10,22222222	10
-76	10,66666667	10
-75	11,11111111	11
-74	11,55555556	11
-73	12	12
-72	12,44444444	12
-71	12,88888889	12
-70	13,33333333	13
-69	13,77777778	13
-68	14,22222222	14
-67	14,66666667	14
-66	15,11111111	15
-65	15,55555556	15
-64	16	16
-63	16,44444444	16
-62	16,88888889	16
-61	17,33333333	17
-60	17,77777778	17
-59	18,22222222	18
-58	18,66666667	18
-57	19,11111111	19
-56	19,55555556	19
>=-55	19

The only conclusion I can draw from this is that nothing is wrong here.. And that I'm very confused. ;)

The only other thing which needs to be changed in this mod is to extend the array to include all other possible images. One thing that stands out to me in the code though is how the array originally doesn't include the first image. So, if RSSI <= -100, it will return 0, meaning the first image in the array, which in original case is stat_sys_wifi_1. Which is kind of odd. However, the original array includes 4 images, which gives nice numbers when calculating the range (45 / 4 = 11,25 point levels). Originally, I have been using 20 images in the array, excluding stat_sys_wifi_0 as SE did.. However this gives for weird numbers when calculating the range (45 / 19 = 2,3684210526315789473684210526316 !). And, returning 5% instead of <5% image when signallevel is crap, is very weird in my oppinion. So, to even out the numbers, I have added the first image as well, so that the calculation becomes 45 / 20 = 2,25. Which seems a lot less prone to create errors.

Note: For the images to be properly referenced in the smali, they of course need to be added in the public.xml in framework-res.apk.
[XPERIA X10 Themes and Apps] telmoabff:
Have you tried the possibility of showing the value of RSSI?

If so, any problems?

I was thinking that if it showed the value of RSSI correctly then the conversion would be the problem.
[XPERIA X10 Themes and Apps] MrRusch:
Perhaps calum can assist with this, but I'm not quite sure how to change the present image holder to a textfield. I can remake the function to return the RSSI, but I need somewhere to output it.

Will try to catch the logcat error as it reboots, BRB.

EDIT: Ok it

IS

an ArrayIndexOutBoundsException! What the monkey....

W/dalvikvm( 1138): threadid=15: thread exiting with uncaught exception (group=0x
4001b160)
E/AndroidRuntime( 1138): Uncaught handler: thread android.server.ServerThread ex
iting due to uncaught exception
E/AndroidRuntime( 1138): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
E/AndroidRuntime( 1138): java.lang.RuntimeException: Error receiving broadcast I
ntent { act=android.net.wifi.RSSI_CHANGED (has extras) } in com.android.server.s
tatus.StatusBarPolicy$1@4585db58
E/AndroidRuntime( 1138): at android.app.ActivityThread$PackageInfo$Receiv
erDispatcher$Args.run(ActivityThread.java:769)
E/AndroidRuntime( 1138): at android.os.Handler.handleCallback(Handler.jav
a:587)
E/AndroidRuntime( 1138): at android.os.Handler.dispatchMessage(Handler.ja
va:92)
E/AndroidRuntime( 1138): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1138): at com.android.server.ServerThread.run(SystemSer
ver.java:437)
[B]E/AndroidRuntime( 1138): Caused by: java.lang.ArrayIndexOutOfBoundsException[/B]
E/AndroidRuntime( 1138): at com.android.server.status.StatusBarPolicy.upd
ateWifi(StatusBarPolicy.java:1173)
E/AndroidRuntime( 1138): at com.android.server.status.StatusBarPolicy.acc
ess$900(StatusBarPolicy.java:77)
E/AndroidRuntime( 1138): at com.android.server.status.StatusBarPolicy$1.o
nReceive(StatusBarPolicy.java:378)
E/AndroidRuntime( 1138): at android.app.ActivityThread$PackageInfo$Receiv
erDispatcher$Args.run(ActivityThread.java:758)
E/AndroidRuntime( 1138): ... 4 more
[XPERIA X10 Themes and Apps] telmoabff:
Don't know much about this but you could try to change "<=" to "<" and ">=" to ">". Don't know if it helps...
[XPERIA X10 Themes and Apps] MrRusch:
Ok here's a new version to try. Think I might have gotten it to work now. It's not the prettiest solution code-wise, but it seems to work really good.
[XPERIA X10 Themes and Apps] Gergith:
I'm going to test now :D

I have flashed SOOO many times, I hacked together a single batch to flash, install some apks, run a post install cleanup, and put all my setting back :D complete with a shell script to replace my boot screen and framework pkg's :D

I'll drop these into it and test it out now :D

EDIT:

And I need to flash.... :p I'll flash and load these onto a clean boot though. see if that makes the difference
[XPERIA X10 Themes and Apps] MrRusch:
Well, just make sure you apply these files LAST.
[XPERIA X10 Themes and Apps] Gergith:
Why last? Specifically after what?

I have multiple reboots in my process.

Basically:

I flash onto it (reboot) (Using Bin4ry's non gui X10 flash tool)

I then install gscriptlite and z4root, Root it (reboot)

Then run a shell script that copies the android boot screen and then the four files from your package (reboot)

Then I run ttxdragon's post root package (v2), to remove stock apps and install a few of my own (reboot)

then I push back my missing Titanium Backup installs and restore them.

It seems to work fine with your other package soo far further up on this thread.
[XPERIA X10 Themes and Apps] MrRusch:
Ok, well then go for it. The risk is that some of the files in this mod are replaced by other mods you are installing, rendering this and that mod corrupt. But from the list you provided, it doesn't seem to be an issue.

EDIT: Yes, themes and other mods which may replace the files in this modification (android.policy.jar, framework.jar, framework-res.apk, and services.jar).
[XPERIA X10 Themes and Apps] Gergith:
Oh like themes and such?

PS, keep up the great work :D

EDIT:

I dont have time to test why, but your latest package freezes up my phone at boot again, reverting back.
[XPERIA X10 Themes and Apps] MrRusch:
Wow, you seem to have a lot of problems installing modifications.

Perhaps someone else can try the new version. Curious to hear how it works for ya'll. I've had no problems for a few hours now, so I think this is the one.

If the reboots are completely gone, I will rewrite the logic a bit more efficiently.
[XPERIA X10 Themes and Apps] Gergith:
now I can't install the previous mod... weird... Just going without one for now, have to go to work. I'm just using a shell script to install these things... perhaps I'm mishandling my 4 files on my machine between winrar and windows xp? :p
[XPERIA X10 Themes and Apps] telmoabff:
Just installed it. Looks fine. Percentage. Report any problems later.
[XPERIA X10 Themes and Apps] Gergith:
Just installed the previous one fine again. Will attempt the new one again for fun :) I mean testing... Yeah! Testing... :p
[XPERIA X10 Themes and Apps] MrRusch:
Again, easiest way is to use X10 Mod Tool. Just shove the extracted files into its files/ -directory, and push all to /system/framework. It does all the work for you.
[XPERIA X10 Themes and Apps] Gergith:
All I'm doing is using a batch file and ADB to push a folder to the sdcard

Then I run a .sh file as SU that does all the moving..

Just added the new mods!!! IT WORKED!! :D Hurrah!

EDIT:

My main suggestion would be to try and make it as cohesive as possible in terms of design.

Like make sure its the same colours throughout

I also find it weird that I have a percent, a bar graph, a dial gauge with percent in it.

I'm still going to use it :) I just think it would be best if it were all the same. Perhaps one with all percents, and one with all like the phone signal.