yashsingh1/xdaforums huggingface dataset:
[HD2 Android SD Development] memin1857:
I think instant changes work on sense based roms.

Also I'm sure this would work with Core Droid too, but it has folder permission / root problems.

You may try hot reboot app. It is difficult to find (I can't post link) but it restarts android without going through winmo or linux kernel.

If you could try and see if hot reboot also makes changes to get reflected, it would save you and some other people a lot of time.

Hot reboot app is called com.beansoft.quick_reboot.v1.1.apk BTW but don't ask for link, google it please.
[HD2 Android SD Development] pyckvi:
post 11 works perfectly for me with bangsters 1.4/froyostone 3.1/mccm 2.0 but the problem i keep having is killing me!!! everytime the phone goes into sleep mode it always resets the values. i tried to to set permissions to read only from root explorer but nothing works!!!

anybody have any suggestions?
[HD2 Android SD Development] hendr1k:
sorry can some one help me,

after I use this script

Enable:

mv /system/bin/akmd2 /system/bin/akmd

/system/bin/akmd

do I need to reboot my android?

I try it b4 but after I kill akmd service and start using using above method my gsensor still does not work. or it take take to make gsensor work again tx
[HD2 Android SD Development] memin1857:
That script was provided as a reference for somebody who asked for it. This thread does NOT advise using it. (don't autocalibrate) You don't need to stop your g-sensor to accomplish what is written in this thread.

BTW your answer is: You don't need to reboot.
[HD2 Android SD Development] alik713:
Found "hot reboot", no luck.

The file is simply not there.

Have root access through EStrong & droid explorer, but, no file in /data/misc

Suggestions, please?

Sent from HD2 via XDA
[HD2 Android SD Development] memin1857:
It didn't work with someone else but you can try too: (Backup Android folder in winmo first)

1) Install newest superuser app from market

2) Update su binary through superuser app settings TWICE

3) In terminal emulator

su

chmod 777 /data

chmod 777 /data/misc

chmod 777 /data/misc/AK8973Prms.txt

chown 0:0 /data

chown 0:0 /data/misc

chown 0:0 /data/misc/AK8973Prms.txt

4) Try rootexplorer

5) Try Droid Explorer through pc
[HD2 Android SD Development] hcnsoft:
Hello all,

I tried to read entired thread, but I do not know which way to go and so complicated for me. Now m using Mdeejay FroYo HD v.3.4.1, G-senser works fine except I shake the phone and it freezes for a few seconds.

Could any one guide me to the easy way, please? I think post#11 is working but perhaps I missed some step.

Thanks in advanced,

hcnsoft,
[HD2 Android SD Development] m1167:
Can you tell me how to stop the txt file keep on changing right after the second I type the value in
[HD2 Android SD Development] memin1857:
The solution to that is unknown yet, unfortunately. Changing permissions doesn't work.

AFAIK the file gets updated when any app accesses the sensors in sense bulilds. It doesn't seem to be making large changes. If you were able to eliminate or it least lowered the freezes it may stay that way even with different but similar values. Feedback is welcome.
[HD2 Android SD Development] alik713:
Yep.

Have gone through terminal, "adb shell", Droid Explorer, changed permissions...

No such file in this particular distro. :(
[HD2 Android SD Development] memin1857:
Z axis calibration effects?

My sensors seem to be working perfectly since I also calibrated the z-axis. I need confirmation on this. (Check: Post 61 on page 7)
[HD2 Android SD Development] circusoctopus:
Thank god for this thread.

I calibrated in Android, was having a TON of lag, used the instructions on the #10 and problem solved.

;)
[HD2 Android SD Development] aussiebum:
Hmm, I've been fiddling around with the AOFFSETS and have managed to get x and y close to 0 on a level table using the instructions on post 1 as suggested, and have also adjusted Z with -8 to get approx 9.8 in Phone Tester with phone facing up on a level surface.

However, when I flip the phone over, I still get -10.3 in Phone Tester. I have a feeling if I adjust the Z value to be larger, I would probably could get -9.8 with the phone flipped over, but that would probably mean I'd get > 10 with the phone facing up. Do you actually have Z measuring between +- 9.81 after your Z calibration?

This is without attempting to shoehorn in the values from post #11 (since they get overwritten all the time anyways).

EDIT: I can confirm that using the values provided on post #11 and forcing the file to be read-only "fixes" the gsensor freeze... until next reboot anyways.

So yeah, calibrating the z-axis doesn't appear to fix the freeze.
[HD2 Android SD Development] memin1857:
As stated in the post, you don't need to get dead perfect 9.8 Just try to make the positive and the opposite orientation's negative values as same as possible (disregarding the negative sign)

Or you can set to phone straight up to a known 90 degree wall and set z-axis to 0.

Out of the box the calibration is too off. It doesn't have to be perfect, but with a little fiddeling it becomes almost perfect and it does the job.

I usually don't get instant freeze fix in my tests. I absolutely get much less freezes the first time I set, then over time the file gets updated several times and it gets better. It sometimes completely gets rid of freezes, and sometimes makes them much less, still good. I have tested with several hd2s. From feedback, it seems it worked with many people, just not all of them. So this is just a lucky workaround I guess, but if it works, it works. It definitely does something.
[HD2 Android SD Development] santroph:
Still freezing, but with different lines

Hi, I was testing this for myself the best I could, since my settings are way different from the other ones here, but now I need some help.

I am using the FRG83 rom (Froyo 2.2.1) from Tytung which is a Nexus One default ROM.

Radio 2.15 (changing to 2.14 now to see if it's best, since I've found that 2.15 wi-fi is trash)

VBN windows ROM.

And the file content is way different. I have read that you said some Nexus roms don't have some lines, but the names are really apart here, please compare below.

Since I don't have slider open/close lines, I really don't know which value I should use. OPEN or CLOSE in my lines?

Another thing is that I have changed the values (as you can see) and my readings in SensorDebug are almost 0 in both X and Y and +9.8 in Z when laid in a table (not -9.8 as said in the Z calibration POST, is this normal?) and -9.9 when flipped, with LCD facing down. The Bubble app for me is really crazy, totally bugged out of the center, no matter what I do. I decided that SensorDebug was the one to use, since it shows the numbers correctly corresponding to the real position of the phone.

And even like that my phone DOES FREEZE a lot!

I was never able to stop or even diminish flickering. How can I do it?

Also my file never update itself like some of you guys are saying, I can even boot and it stays there like it was before. I had to made it 777 to edit and then made it 444 again.

Please, I need some help here, this Rom is almost perfect if it is not for the Freezing issue.

Greetings and Thanks, Santroph.

My File:

[AK8973]

HDOE_STATUS=1

HDOE_SUCTEMP=124

HDAC.x=0

HDAC.y=0

HDAC.z=0

HOFFSET.x=-105

HOFFSET.y=1327

HOFFSET.z=-39

ASENSE.x=256

ASENSE.y=256

ASENSE.z=256

AOFFSET.x=1

AOFFSET.y=-14

AOFFSET.z=-5

Post 10 file:

[AK8973]

HDOE_STATUS_SLIDER_OPEN=1

HDOE_STATUS_SLIDER_CLOSE=0

HDOE_SUCTEMP=114

HDAC_SLIDER_OPEN.x=128

HDAC_SLIDER_OPEN.y=135

HDAC_SLIDER_OPEN.z=4

HOFFSET_SLIDER_OPEN.x=250

HOFFSET_SLIDER_OPEN.y=593

HOFFSET_SLIDER_OPEN.z=175

HDAC_SLIDER_CLOSE.x=0

HDAC_SLIDER_CLOSE.y=0

HDAC_SLIDER_CLOSE.z=0

HOFFSET_SLIDER_CLOSE.x=0

HOFFSET_SLIDER_CLOSE.y=0

HOFFSET_SLIDER_CLOSE.z=0

ASENSE.x=256

ASENSE.y=256

ASENSE.z=256

AOFFSET.x=0

AOFFSET.y=0

AOFFSET.z=0
[HD2 Android SD Development] depakjan:
I am not able to recreate what you guys can.. i can live without restarting for days.. for me, if i input the new values from post 11 .. it gets edited fine and values dont change by itself even after using the gsensor heavily... but still i have freezes..

Maybe my build dont take dynamic values or something like that.. i am using mdeejay's HD build with hastrain's 7.2 kernal.. i even remember trying this in Core Droid HD build.... what could be the issue??..

if i restart the values change back to original ones.. so i am guessing, it's always using the original value and it never uses the changed values .. how can i make it use the new values???
[HD2 Android SD Development] aussiebum:
hmm, ok. Checked Z after putting phone against 90-degree tissuebox, can confirm z is very close to 0 so that's good.

The file's gotten overwritten again even though I'd set read permissions on the file (because the dir itself isn't readonly... should've realise that) and kept the offsets, but yeah still get the odd pause here and there.

Going to try another hack tonight to see if I can force the settings from post 11 to not get overwritten without screwing around with dir permissions.
[HD2 Android SD Development] wisecracker:
New observation about screen freezes

I'm currently running M-Deejay's Froyo HD 3.4.1 on my TMOUS version of Leo.

I thought screen freezes were all in the past, but this build has regular screen freezes for me.

What I have noticed is that when I am using the phone while it is connected to the recharger (either regular wall recharge or USB) I do not get the screen freezes. But within 2 minutes of disconnect the screen freezes reappear.

I know most thinking about screen freezes is tied to the G-Sensor, but I'd like to suggest that perhaps something in Android's power manager is also in play. I'm just an enthusiast end user and not a developer, but all I can say for sure is that my phone does not freeze when it is being recharged.

I hope smarter people than me can figure out the answer!
[HD2 Android SD Development] idcom:
I can only get the changes to take by rebooting. On the plus side, once set they don't change on reboot. I am using bangsters v1.5 with hastarin 7.2 kernel.
[HD2 Android SD Development] tyween:
Default configuration have freezes: YES

New values fix freezes: NO

Different files freezes: YES

Build/Kernel: AndroidMedaUltimateV1.2(HyperDroid donator version) / michyprima r11 VBNDroid Minimal RC3 Minimal (3.14 base) 2.15.50 radio

I calibrated the pitch, roll, and z values. This doesn't seem to be helping me at all.

My values:

AOFFSET.x=16

AOFFSET.y=-26

AOFFSET.z=-4

I did not have these values:

HDOE_STATUS_SLIDER_OPEN=2

HDOE_STATUS_SLIDER_CLOSE=0

HDOE_SUCTEMP=111

HDAC_SLIDER_OPEN.x=4

HDAC_SLIDER_OPEN.y=135

HDAC_SLIDER_OPEN.z=8

HOFFSET_SLIDER_OPEN.x=-849

HOFFSET_SLIDER_OPEN.y=1179

HOFFSET_SLIDER_OPEN.z=-653

HDAC_SLIDER_CLOSE.x=0

HDAC_SLIDER_CLOSE.y=0

HDAC_SLIDER_CLOSE.z=0

HOFFSET_SLIDER_CLOSE.x=0

HOFFSET_SLIDER_CLOSE.y=0

HOFFSET_SLIDER_CLOSE.z=0

In my file I have:

HDOE_STATUS=3

HDOE_SUCTEMP=128

HDAC.x=0

HDAC.y=0

HDAC.z=0

HOFFSET.x=-802

HOFFSET.y=265

HOFFSET.z=45

I am wondering if these variables are the same but named differently. If someone can shed some light on this it would be appreciated.
[HD2 Android SD Development] memin1857:
You can ignore the CLOSE value. OPEN values are used for sense roms, and OPEN values correspond to the existing lines in nexus roms.

If you follow the first post your bubble should be exactly in the center. (go to bubble apps settings and select (tick) show angle and it will be easier for you to make degrees 0. (the graphical bubble moves in 0.25 degree increments) And also the camera lens makes a physical 1 degree offset.

After calibration, my bubble app show 0 degrees with the phone laying on the table, with camera lens protruding from the edge of the table, with sideways and upright positions all at the same time. Even the bubble graphic (which is more sensitive than the degree readings) is centered.

Flickering won't diminish. Even native android phones have the same amount of flicker.

I think sense builds do the update thing. Even if you can't get rid of freezes, you may be able to lower them. Bubble app is the MOST freezing app. You get much less freezes with normal apps/games you use.
[HD2 Android SD Development] memin1857:
I advise everyone:

1) Never have extreme HOFFSET values in you AK8973Prms.txt (as a general guide they should be between -20 and 20, not 50, 100 or 800)

2) Don't let HDAC values be 0. Throw a value, similar to the posts.

If you high HOFFSET values or 0 HDAC value then you may have done the corrupting autocalibration. (Or the build came like that)

I can now say that nexus builds have the changes reflected only after reboot, but won't automatically update the file.

Sense files have the changes reflected instantly, but updates the file everytime you access sensors. But it won't change the HOFFSET values (which are for calibration) but change the others slightly. File permissions will also get reset unfortunately.
[HD2 Android SD Development] jinharry:
Sensor Fix Seems to Work with this build...

See my details below. I have verified that the fix works even after a re-boot. (set permissions on file to read only, but the system reset to rw- rw- rw- after re-boot.)
[HD2 Android SD Development] AMCJUNGLE:
I see a lot of issues with the G-sensor still going on. I did this to fix all my issues:

/data/misc/AK8973Prms.txt editedthis file to the following:

[AK8973]

HDOE_STATUS=0

HDOE_SUCTEMP=0

HDAC.x=9

HDAC.y=130

HDAC.z=137

HOFFSET.x=0

HOFFSET.y=0

HOFFSET.z=0

ASENSE.x=256

ASENSE.y=256

ASENSE.z=256

AOFFSET.X=-5

AOFFSET.y=-23

AOFFSET.z=-10
[HD2 Android SD Development] jmmmmm:
Can someone running an RMNET build confirm whether or not this fixes the screen freezes. I have been able to zeroize my axis' but there is still a ton of TS freezing.
[HD2 Android SD Development] avetny:
got owned ! lol
[HD2 Android SD Development] memin1857:
With the newest 15 Oct kernel, light sensor poll interval is changed. (It was 4 seconds before, now it seems equal to or less than 1 second) Means light sensor data is now updated much faster for quicker reponse.

This more load MAY result in more sensor related freezes.

I need confirmation.

Note: Hastarin 7.3 is based on that change. Also any official evo kernel dated 15th oct or later. This means this threads fixes "might" be less useful with those kernels.
[HD2 Android SD Development] OwenChiang:
after copy your setting on post #10, no more screen freeze for two days already. Many Thanks~!!
[HD2 Android SD Development] depakjan:
ou have not mentioned this anywhere... @memin1857 ... please tell us whata build you are using and in which build were you able to eliminate this TS freeze.. i tried Mdeejey's HD build, some nexus one build, froyostone 3.1 , core droid, i still got the same issue.. not able to solve at all....

Also those who are reporting Success.. please let us know you Build info also... would be very helpful..
[HD2 Android SD Development] memin1857:
Well I did write already, but here it is anyway: mdeejay froyohd 3.4.1

But I test many different builds. Even I can't reproduce it everytime.

Still it helps a lot of people. But not everybody, yet. I either get no freezes or much less freezes. It currently depends more on luck then build.
[HD2 Android SD Development] memin1857:
I found that if you hold the home button to switch back to sensor app, the changes ARE reflected in desire HD builds, but are NOT reflected in desire builds.

So, for desire builds press back button to get out of your sensor app, then after editing with rootexplorer press home button once, then restart your sensor app from app drawer to get changes reflected in realtime (without reboot)
[HD2 Android SD Development] aussiebum:
Hmm, I noticed that if you change every value in AK8973Prms.txt except for the values starting with "HDOE_STATUS" (ie. including HDOE_STATUS_SLIDER_OPEN/CLOSE, IF you have those) and "HDOE_SUCTEMP" - then said changes don't alleviate / minimise gsensor-related freezes.

So I saw your post and then updated HDOE_STATUS_SLIDER_OPEN and HDOE_SUCTEMP to both 0, and that seems to have helped drastically reduce the amount of TS freezes. If I start up Sensor Debug app and shake my phone a lot, I *can* get the values to freeze for about 1-2 seconds, but I have no problems so far playing games that heavily use the g sensor and touchscreen like Ninja Splat.

Oh yeah, to get around the problem of AK8973Prms.txt getting overwritten by the g-sensor app, just change the owner of the file to root AND make the file world-readable (ie. 1) start up a command prompt either via Droid Explorer/ADB/Terminal Emulator/etc, 2) su 3) cd /data/misc, 4) busybox chown 0:0 AK8973Prms.txt, 5) chmod 664 AK8973Prms.txt). A "AK8973Prms.txt.tmp" will get created in that dir also when you start using the g sensor, but it should contain the same values as the now readonly AK8973Prms file.
[HD2 Android SD Development] memin1857:
Nice find Aussiebum!

I confirm the change owner (chown) trick works. It prevents the files content from being changed. Now we can experiment with values that give better results. (since 0 values don't work perfectly)

Note: busybox is not required, direct chown works too. And it is better to update the actual file after ownership is changed. (Or both files have wrong values)
[HD2 Android SD Development] alik713:
Having tried fruitlessly to find said file in Core Droid v0.5, I switched back to MattcEvo V1.0.1, and, here are my values

[AK8973]

HDOE_STATUS_SLIDER_OPEN=0

HDOE_STATUS_SLIDER_CLOSE=0

HDOE_SUCTEMP=0

HDAC_SLIDER_OPEN.x=9

HDAC_SLIDER_OPEN.y=130

HDAC_SLIDER_OPEN.z=137

HOFFSET_SLIDER_OPEN.x=0

HOFFSET_SLIDER_OPEN.y=0

HOFFSET_SLIDER_OPEN.z=0

HDAC_SLIDER_CLOSE.x=0

HDAC_SLIDER_CLOSE.y=0

HDAC_SLIDER_CLOSE.z=0

HOFFSET_SLIDER_CLOSE.x=0

HOFFSET_SLIDER_CLOSE.y=0

HOFFSET_SLIDER_CLOSE.z=0

ASENSE.x=256

ASENSE.y=256

ASENSE.z=256

AOFFSET.x=13

AOFFSET.y=-15

AOFFSET.z=0

This is on TMOUS HD2 (1024 Leo), running

ChuckyDroidRom,

2.12.50..2 (I think) radio,

mattcEvoLeo 1.0.1

Using "bubble level", I can still produce freezes, but, the phone is very responsive.

Thanks, man!
[HD2 Android SD Development] AMCJUNGLE:
Try changing:

AOFFSET.x=13

AOFFSET.y=-15

AOFFSET.z=0

to:

AOFFSET.x=-5

AOFFSET.y=-23

AOFFSET.z=-10

using a root file explorer and text editor. Humor me and se if your feezing stops
[HD2 Android SD Development] alik713:
Fixed that for you.

Nope, freezing did not stop.

However, I'm curios about the values.

I attained mine through calibration and testing and tuning.

How did you come up with yours?
[HD2 Android SD Development] u71498:
Is great after I using setting from post 11 in my hyperdroid v1.6. Seem freeze issue all gone. Thanks a lot!
[HD2 Android SD Development] AMCJUNGLE:
I got them from another discussion of the g-sensor and how to calibrate it. I do have values that worked perfectly for me using hyperdroid, but they do not have all the same fields as these. I am currently testing them on Bangsters 1.5
[HD2 Android SD Development] Ynotx3:
So far I'm not getting any ts freezes with Bangsters 1.5 with default settings posted on #11.

Will need to test out more often on school days.
[HD2 Android SD Development] speedy-grufti:
hi i have a question.

i tried to calibrate my Z axis like told on page 7 but my value is about -9,8 after with face UP and +9,5 with face down...

the poster said that the prefix has to be + with face up and - with face down. Should i calibrate it in that way or is mine fine too?

Thanks for help :)
[HD2 Android SD Development] davidjz87:
im using this same setting as you but now my viewable screen got smaller
[HD2 Android SD Development] Zythyr:
So by accident I used the default G-Sensor calibration tool. I fixed my calibration by using the values given in post 10, of this topic.

I am still experiencing another issue, which I am unsure if it is related to the G-Sensor or the actual android build I am using. When I am txting or using the phone while walking around, I noticed a that keys/keyboard freezes or lags...

Is there anyway to fix this problem?
[HD2 Android SD Development] memin1857:
Latest kernel effect on ts freeze

4 Nov and later kernel have changes to how light sensor is handled and it makes a good difference with ts freezes. i2c bus is more free now, thus ts freezes are decreased.
[HD2 Android SD Development] depakjan:
Do we need new lights file also???... i cant find the lights file in the auto build.. where do i get it?
[HD2 Android SD Development] memin1857:
Light sensor is not handled by the lights file. It is handled by the sensors file and no change/replacement is needed.

Lights file handles led lights (keypad and notification led)
[HD2 Android SD Development] echardcore:
This worked instantly by just deleting that file and editing said other file. I did have to purchase ROOTEXPLORER though. worth it.
[HD2 Android SD Development] aussiebum:
hmm... using the Mdeejay's S1 and the amount of g sensor-related ts freezes still seems to be about the same to me.
[HD2 Android SD Development] raziel123:
G-Sensor Touchscreen Fix

Guy's I think My G-sensor and Touchscreen freezes are pretty much fixed (havent had one for weeks ), I'm using Hastarins R8 Kernal, with Auto Screen Brightness disabled, Auto rotate DIsabled, I callibrated the G-sensor with GPS Update/Toolbox utility (it's free from the Market) ...

Only posting cause this may solve someone elses G-Sensor Touchscreen freeze problem ...

regards

Raz
[HD2 Android SD Development] jmmmmm:
Auto rotate disabled is the standard and well known work around for ts freezes. Nothing new there. I think most of us clamoring about ts freezing want to keep auto rotate enabled. :(
[HD2 Android SD Development] raziel123:
Forgot to mention, I turned on and used Autorotate, (i've been turning it on and of when I needed it) No freezes so far ...

regards.
[HD2 Android SD Development] jmmmmm:
Since you have almost the same setup as me could you run a quick test.

Try to use autorotate on while walking? :)
[HD2 Android SD Development] memin1857:
Real TS Freeze FIX

There is a patch being developed to completely eliminate TS FREEZE.

Thanks to mdebeljuh and jdivic, I tested it and it seems to be working perfectly.

A patched hastarin 8.2 kernel has been posted. Check post 140 on this page.
[HD2 Android SD Development] shadiku:
Made my day.
[HD2 Android SD Development] depakjan:
OH!!!!... thank god.. i thought no one would ever fix this issue.. if you ever need a tester for this count me in :)
[HD2 Android SD Development] mdebeljuh:
Patch for ts/gsensor freezes

Like memin1857 said we are working on a patch for ts/gsensor freezes. I am looking for people who would like to test it. I have uploaded kernel (and modules) with patch and logging for debugging, so this kernels are not for everyday usage. If you can see any ts/gsensor freezes please send me the dmesg logs. If you can try to test it while connected to the pc so you can make dmesg log just after you see any strange behavior.

I will release the patch when we see that the patch is working and that we haven't made new bugs/problems.

Hastarin 8.2 (Wed Nov 10 23:56:53): http://www.multiupload.com/32KM9H46RI

Something about the problem: what we could see the problem is that gsensor after returning the data doesn't releases the i2c bus and the recovery from that took about 2 to 4 second (by reseting the i2c bus). We have dramatically reduced the time which is needed to reset the i2c bus (this is only done for communication with gsensor).

Update: you can make dmesg logs with:

adb shell dmesg > ts.txt

and if you see freezes and "Error waiting for notbusy" message in the log send me that log to the mdebeljuh+ts at gmail.com
[HD2 Android SD Development] shadiku:
I'll get right on that.

EDIT: So far, so good.
[HD2 Android SD Development] starbase64:
Hi,

nice patch, but camera dont work on this kernel.

Android: mdj Froyo Sense Revolution 1.6

with friendly greet

starbase64