Here is an idea: a lot of people are unhappy about the fact that their G-Sensor is out of alignment, and that this may negatively affect apps which may be developed in the future (or which are already under developemnt) and which rely on the sensor for something critical. Though my device does not suffer from this, I can fully understand them!
However, today the only app which uses the sensor is Teeter, for which - frankly - this mis-alignment is not a huge issue! The reason I say this is that this app would fall outside of what I propose below...
So, here is my idea: why don't we set up a simple standard for the G-Sensor calibration, to be stored in the registry in a dedicated set of keys, and develop a quick and simple application to calibrate it and store the values in there (much like was done in BubbleLevel)?
As long as all developers here agree to use these values and stick to the standard... voila! We can all have a calibrated G-Sensor, which any future program will know how to read correctly (by correcting the values it gets with the offsets stored in the Registry to get a perfect reading).
What do you people think (especially all you developers out there)? Anyone care to volunteer a registry location and some key names?
That would be really great
that's exactly what we need...
Instead of using HTCSensorSDK.dll we could create a HTCCalibratedSensorSDK.dll (for example )
Exactly same interface, but calibrated... The developers only would have to change their dll names...
I did the day before a such dll for testing purposes, and its really simple (I even successed in 'calibrating' teeter when overwriting the original one..).
I think this is the thing we have to do...
Other inputs?
Sven
g-sensor not working
after i installed gsen my g-sensor dont work! when i try to play teeter the ball is stuck up and only moves left to right. also it opens my ktcalbum upside down. can the touchflo be reinstalled maybe? any idea?
svenso said:
that's exactly what we need...
Instead of using HTCSensorSDK.dll we could create a HTCCalibratedSensorSDK.dll (for example )
Exactly same interface, but calibrated... The developers only would have to change their dll names...
I did the day before a such dll for testing purposes, and its really simple (I even successed in 'calibrating' teeter when overwriting the original one..).
I think this is the thing we have to do...
Other inputs?
Sven
Click to expand...
Click to collapse
This sounds live a VERY good idea. Do I understand you correctly, that you actually have a basic version of the DLL already done???
Related
I contacted HTC and asked them if they had a tilt sensor SDK, or had plans to release one, and they basically said "no". So, I decided to see what I could come up with to get tilt response integrated into my little pet-project, and to my surprise, managed to figure out how to get some basic data out of the existing tilt sensor DLL on the Diamond.
If you'd like, you can see my "hello world"-level app using the tilt sensor here on my blog. I've included the source so others can play with the few tidbits I've figured out. The app itself is pretty boring, it'll really only be of interest to developers looking to integrate tilt into their app, and even then, it's still a boring app =)
If accessing the tilt sensor is well known, feel free to ignore me.
Well done, thats great!
You should also probably look at this and talk to CharlyV, he might be able to add some info.
http://forum.xda-developers.com/showthread.php?t=403939
That's great news !
Now developers might use such information to release usefull applications and funny games !
Yes, I was wondering, for my car I use the G-tech for acceleration-measurement.
Is this sensor sensitive / good enough to also do those kind of things?
Also, navigation programs can be a lot more precise by knowing when accelerating, cornering or braking.
Riel said:
Yes, I was wondering, for my car I use the G-tech for acceleration-measurement.
Is this sensor sensitive / good enough to also do those kind of things?
Click to expand...
Click to collapse
Good question: I might try to write some sort of logging program and see what kind of data I can get out of a car trip. That's a bit off for now.
Also, I made a minor update the project, I determined a few more of the unknown values that the API returns.
perhaps you or some other guys are capable to work with some tools mentioned in this post??
http://forum.xda-developers.com/showpost.php?p=2373447&postcount=56
Is there any chance to develop a calibration tool for this sensor?? Mine drifts to lower-left and thats annoying because Opera always means, I rotate my phone :-(
Thank you
I updated the project to include a sample of how to use the event driven notification of different orientations that Opera uses (instead of polling the sensor constantly to determine the current orientation).
I'll have to do some digging to see if there's any way to calibrate the sensor. It'd be nice (mine is a bit off too), but I don't see anything immediatly obvious.
Perfect news!
I hope there are devs, who will make apps or games for this. My idea of a new game is "Black Circle".
(Side in German bug game in English, dont worry)
http://spiele.isnichwahr.de/r432-spin-the-black-circle.html
What do you tink about it?
I wrote a managed wrapper based on Scott's work:
http://blog.enterprisemobile.com/2008/07/using-htc-diamonds-sensor-sdk-from-managed-code/
I think it would be possible to calibrate the sensor by replacing the HTCSensorSDK.dll with one that acts as a pass through to the real thing. Then it could "massage" the returned values with calibration adjustments.
Teeter -> HTCSensorSDK.dll (one we roll that tweaks values) -> RealHTCSensorSDK.dll (the real DLL)
I don't think that the DLL is replaceable unless the device is flashed with a new ROM.
Thoughts?
I recently had a xda IIs before i found out that the qwerty is busted. I've searched the site and found out that theres an app which is "Fingerboard" that can be used as a keyboard aside from the default one that xda has. Now the question is that, can we install it to the BA? ive checked the thread about that and it says there that it need to match the screensize (QVGA,VGA,WVGA im not sure)And if possible I wanted to use that as my default keyboard since Im really not comfortable with using the stylus..
Thanks in advance for all your replies...
Hopefully I wont offend someone or make someone angry about my questions.
1. you are probably talking about this app:
http://forum.xda-developers.com/showthread.php?t=487677
it is called fingerkeyboard 2.1 and it is great.
2. yes, you can install it to the BA, just pick the QVGA cab installer.
the screen (size/) resolution is very important for apps like this, because, it wants to bring you bigger keys, so you can control the soft keyboard with your fingers, on the other hand, it needs practically all the keys, the small soft keyboard has, without being too big, so you couldn't see the rest of the screen, hard to find a good way to do that, but fingerkeyboard2 is a good program doing all of that (in he 2.1 version). in case you were wondering, the BA's screen is QVGA, meaning 240*320, in contrast to VGA, 480*640 and WVGA 480*800.
3. i am using i as my default keyboard, too. there are different ways to set this as default, tweak programs, registry changes... but the easiest way to do so is, to install SIP change, pick fingerkeyb as default, and set the timeout to 50seconds, meaning, whenever you soft reset your device, sip change will start and set fingerkeyb as default, and after 50sec. the program quits, because then it is definitely set.
installing both apps isn't hard, just 2 cab files you copy to your device. fingerkeyb needs a bit of configuration to match your country's layout and other things like sound, vibrate, auto-correction, but it is self-expainatory, plus you will find a lot of help in that particular thread, so look it up, install it, have fun.
P.S. i forgot to mention the 2 biggest advantages: it is (in contrast to SPB keyboard) FREE & SMALL in installation size.
greetz
Chef_Tony
^__^
As expected of chef_tony!
Thanks for the quick reply and very in-depth explanation. I will try that one now. hopefully someday I can be of help to you too sir. Cheers!
I was wondering, would it be feasible to rewrite the button driver to customize the X1 buttons? I mean even higher level than a key hook. Key hooks are annoying because they interfere with other apps that want to set key hooks. Hot keys are useful, but another application can come along and steal your hotkey. I want to modify the X1 buttons at a much higher level.
One thing for instance about the panel button i have always wanted to know. The panel manager sends out button code 0x00EA. Even if this event is suppressed by a key hook, the panel manager still opens. So I wonder what part of the OS is responsible for this? Is there a button driver dll that can be overwritten? Is the button driver built into the OEMXipKernel (but possibly overwrite-able at the ROM cooking level)?
Basically I want to know if it is possible to rewrite the button driver that actually detects the hardware interrupts from the keyboard/buttons and sends key press events to the OS. Does anyone know if this is possible? People have rewritten/modified things such as the battery and even display drivers. Is this in the same category?
yes there is keboard dll
keypad.dll it "supports" panel manager button, ok, arrows & everything else...
if U could write something like thi, it would be great... i think... I'm maniac of very useful Xperia buttons (there is no other device like sex1, which has so many buttons on front panel... ! it's just great !)
giving users possibility to bind actions (win lock, new process, win key, esc, ok, OK/Close, back, home, etc... to any ! button would be great !), swapping, changing them, different actions for different screens ... GREAT !! I can see !!
I was thinking long time ago about doing such of thing but has no idea how to modify existing keypad.dll (no such great programmer skills) or create new one but in "low level type" ... (interfacing hardware ? :/ noooo idea... ! )
If You'd like my help i could create advanced GUI Configurator of program...
cichy3000 said:
yes there is keboard dll
keypad.dll it "supports" panel manager button, ok, arrows & everything else...
if U could write something like thi, it would be great... i think... I'm maniac of very useful Xperia buttons (there is no other device like sex1, which has so many buttons on front panel... ! it's just great !)
giving users possibility to bind actions (win lock, new process, win key, esc, ok, OK/Close, back, home, etc... to any ! button would be great !), swapping, changing them, different actions for different screens ... GREAT !! I can see !!
I was thinking long time ago about doing such of thing but has no idea how to modify existing keypad.dll (no such great programmer skills) or create new one but in "low level type" ... (interfacing hardware ? :/ noooo idea... ! )
If You'd like my help i could create advanced GUI Configurator of program...
Click to expand...
Click to collapse
Yes it really annoys me that manufacturers dont like to let you modify buttons anymore. I wrote X1BC to modify the buttons but I am tired of higher level methods of trapping keys. I want to go straight to the source.
Let me start taking a look at keypad.dll. I see in my ROM kitchen that it exists as a file (not a module) in OEM drivers. I want to see what the effect of cooking a ROM without it is. Also I will look at references to it in the registry and try to examine dll exports (going to google for software to do this; any free PE analyzers?).
So keypad.dll imports coredll.dll and ossvcs.dll. It exports KBD_Close, KBD_Deinit, KBD_IOControl, KBD_Init, KBD_Open, KBD_PowerDown, and KBD_PowerUp. I dont know what parameters those functions should take though. I want to write a keypad.dll and replace the old one to see when these functions are called.
Found this:
http://read.pudn.com/downloads120/sourcecode/embed/511498/HID/CLIENTS/KBDHID/kbd.cpp__.htm
i cross my fingers... thats sounds great... maybe you can little inspire from X2 keyboard layout maybe dll...
Well.. I dont have an X2 to test that with. :-/
Before I can start experimenting with overwriting the keyboard driver, I need to know how to properly sign drivers. I know that without being signed properly a driver will cause the device not to boot. Can someone tell me how I sign my home cooked driver?
*edit*
Well, keypad.dll doesnt seem to be the low level *driver*. Its just a service. Found this by searching keypad.dll into my kitchen:
Code:
[HKEY_LOCAL_MACHINE\Services\Keypad]
"Prefix"="KBD"
"Dll"="keypad.dll"
"Index"=dword:1
"Order"=dword:15
"Flags"=dword:00010000 ; DEVFLAGS_TRUSTEDCALLERONLY
"DisableKeyLight"=dword:0
"DisableGhostKeyDetect"=dword:0
"ActionDebounceTimeout"=dword:64 ; 100ms
So perhaps my dll doesnt need to signed. I dont even need to replace the old dll. Just point it to my own dll. I just changed "Dll"= to something else and rebooted. Device boots just fine but now the buttons do nothing. Good sign .
some time ago I've accidentally replaced HTC Diamond keypad.dll with Xperia's one (well... i didn't know that with cab that I made, was included keypad.dll didn't notice that ) ... the only issue that came after this change was "no keyboard effect", after I installed one more time the dll but with the right one... the issue gone ...
Just as interesting for what's new? Sorry for my curiosity ... Thank you
I have only done basic experimentation so far. First changed keypad.dll to something else in the registry (something that didnt exist) and as expected the buttons stopped working. I have written a dll to replace it that exports the same functions and made it log every time a function is called. I get attached to many processes and receive some calls to KBD_Init and KBD_IOControl. Nothing in particular corresponds with when a button is pushed yet, but that is probably because I need to respond to KBD_Init by initializing the keyboard. Have not been able to work on it for a while but hopefully I will next week, as I am on winter break from school. Thanks for your interest!
Jon
so we have (via Dependency Walker ):
KBD_Close
KBD_Deinit
KBD_IOControl
KBD_Init
KBD_Open
KBD_PowerDown
KBD_PowerUp
and we don't know how to use them (what arguments to use)... so what can we do with it ? guessing parameters ?
cichy3000 said:
so we have (via Dependency Walker ):
KBD_Close
KBD_Deinit
KBD_IOControl
KBD_Init
KBD_Open
KBD_PowerDown
KBD_PowerUp
and we don't know how to use them (what arguments to use)... so what can we do with it ? guessing parameters ?
Click to expand...
Click to collapse
Look at the link in post 5. Hopefully they are the same. What I am going to do next when I have time is understand that code.
So it looks like those are just the standard exported functions necessary for a service dll. The real meat of what the dll does probably has nothing to do with them. What I need to know is how to recieve keypress info from the keyboard driver and how to inject key events into the OS. Can I just use keybd_event funtion to send key events?..
Looks like I found an answer to that. From MSDN:
http://msdn.microsoft.com/en-us/library/ms646304(VS.85).aspx
The keybd_event function synthesizes a keystroke. The system can use such a synthesized keystroke to generate a WM_KEYUP or WM_KEYDOWN message. The keyboard driver's interrupt handler calls the keybd_event function.
Is keypad.dll the interrupt handler? Or is that something else? It must be. Because if I kill the keypad service no button events get through. I dont see how missing that service would kill the keybd_event function. Off to experiment.
If keybd_event proves to be the correct way to send key events the last question is how to receive interrupts from the keyboard.
I have learned loads over the past day. I Now fully understand the role of keypad.dll it must register to receive the interrupt and use keybd_event to sent keys to the OS. Through disassembly of keypad.dll I have also learned that this role is not simple. This dll has a LOT of code. I dont think I will be able to reproduce everything it does.
I have a new idea however. All I need to do is intercept calls from keypad.dll and decide what to really send and call keybd_event myself. I still achieve the goal of catching key events before 3rd party apps. I can think of two ways to achieve this. One would be to patch keypad.dll to call my own routine instead of keybd_event. Another would by to leave the stock keypad.dll and hook the keybd_event API at runtime. While I have learned loads at how to disassemble dlls and read the assembly, I do not yet know how to modify the import table. On the flipside I do not fully know how to hook APIs. Any help? I would like to go the modify import table route as this seems infinitely simpler.
keyboard driver successfully hooked.
The most reliable button reprogrammer is under way.
Program in private beta.
http://forum.xda-developers.com/showthread.php?p=5272353
Hi to all
I realise this is not a specific ROM type question, but if anyone was to know it would be you guys....
(I posted this in General with no responses)
Essentially, i am looking for a tweak that will make the 'Notes' program scrollable (kinetic..) with your finger. I have fiddled with a few Beta programs but all seem to conflict or have other issues, so no joy.
I am thinking there must be a reg tweak or something that will enable it or add it to a list or something (like the g-sensor whitelist) to make it finger scrollable - it seems odd on a stock 6.5 (SEA) ROM that this feature is not already available on this most basic program...
Any advice really appreciated (It's driving me nuts - and i don't have far to [email protected]!).
Cheers
Jabberoo
I would also like to know how to do this, but for RSS Hub's article view. I searched the registry and don't see anything. It seems stuck in "make selection" mode.
Actually, I know FTouchSL (www.ftouchsl.com) works but my problem is that it messes with all sorts of other apps on my phone (including HTC's stuff). I'd like to use it for just a few apps but it works by an exclusion principle ("blacklist": ignoring apps you don't want it to apply to) rather than inclusion ("whitelist": applying only to specific apps). Of course, I'm interested in the latter. The problem is, you have to go through the tedious process of excluding EVERY SINGLE APP you don't want it to work with!
I've emailed support at ftouchsl regarding a whitelist so we'll see if something turns up.
But if someone comes up w/ something to be able to finger scroll in Notes, I'd be VERY interested!
BTW, I have a GSM Raphael.
Wrong section, and a double post.
Closed.
Dave
If this has been discussed and I have overlooked it in my searches please if you know point me in the right direction. here is an example of what I am trying to do: The sensorcalibutil_yamaha, I want to find out how it is working so I can write a very simple app kind of like the one in the Froyo ROMs but where I can input inverted values for certain axis without "calibrating" them all thus messing up other axis I want to stay the same. Then save those values like this utility does only with my input tweaked values. I have tried logcat but it does not do what I need. is there something I can do in ADB?
dono, there is a file in *deep breath*
/sys/devices/virtual/accelerometer/accelerometer/
called acc_file which is rw-r--wrx (kinda weird). It looks like it contains the current accelerometer info (if you rotate the phone it changes) but I don't have a clue where the information is being read from or what function is putting it in there.
What 'cha trying to do?
Sherpa
Invert only one axis by inputting calibration values manually so as to correct the rotation issue. In the froyo roms there is a gui to do what sensorcalibutil_yamaha does bit it reads the current sensor values and issues an "offsetUpdate" with the current values as assumed Level. But on us variants you are holding the device semi verrical part landscape to get it to sort of stay rotated vertical but doing this also updates the other axes as "level" so rotation is flaky at best with no love in games at all. So if this app reads current values and issues an update we should easly be able to write a simple app that we put our own values into and issue an update. Thus allowing us to invert only a singlw axis and make rotation work perfect.
Sent from my SAMSUNG-SGH-I897 using XDA App
We've tried swapping every file with yamaha or sensor in it to a froyo build with no luck. It looks like the garray and marray values are somewhere deep inside the kernel rather than a handy library file. If your handy with a hex editor or a soldering iron you would be a hero
Sherpa
I saw an episode on revision 3 of a show called APP JUDGEMENT where the host was doing something like that to get a reading of how much his motercycle leaned in corners not sure which episode it was but its at least 4 weeks ago
Good luck hope you succeed
TMC_Sherpa said:
We've tried swapping every file with yamaha or sensor in it to a froyo build with no luck. It looks like the garray and marray values are somewhere deep inside the kernel rather than a handy library file. If your handy with a hex editor or a soldering iron you would be a hero
Sherpa
Click to expand...
Click to collapse
I am quite good with a hex editor and an expert with a soldering iron. anyways no one really cares lol so to clarify (sorry was on my device in a vehicle so I did not feel like typing a lot) No it is not stored in a file anywhere on the system (in temp memory while it reads the values before it updates) the values in this chip are stored outside the system (often in the chips software(actual firmware of the hardware) this would explain why when erasing the system and flashing back to stock leaves your rotation messed up even with a kernel reflash. it is in the kernel where the driver interprets these values (that is why in 2.1 it can be patched like in the reorient kernel) obviously the I9000 default settings are 90deg different on one axis then ours. SO my point remains, the recalibration utility works as described above, it calls commands I believe from perhaps one of the yamaha libs, libms3c_yamaha.so? it seems to do it in this order with a couple of other steps involved: it measures the sensor readings then gets the "offset" (I think this is it calculating the offset based on the current values being assumed level) then it saves those values (temp) then it issues the update. As I said before instead of updated ALL of the values as the new "level" we want to update with manually input values to work with single axes. anyone follow? I am going to give it a go tonight and at this time wish myself luck!
btw: I tried to patch the kernel with a hex editor but could never get it to repack correctly and was mostly bootless. next step is to **** my device for good with some micro-soldering (probably not plausible from the way it looks though)
It was a joke. Sir, step away from the iron.
There is an orientation lock so there is some control over the accelerometer however I'm not sure if you can lock only one axis. If it's a .so you are looking for then it ain't stripped so there should be readable text inside.
I would need to reboot to look further but the only real function in yamaha.c is yamaha_read which does what it says on the tin.
ak8973b.c does a bunch of stuff but I'm not sure why it's even in there as I doubt there are two accelerometers http://www.asahi-kasei.co.jp/akm/en/product/ak8973nbs/ak8973nbs.html but it's included with the build.
Grr, I bookmarked the photobucket but not the link
http://s379.photobucket.com/albums/oo239/vendetta-mr2/Captivate/
*Sigh* because I'm stupid
http://s379.photobucket.com/albums/oo239/vendetta-mr2/Captivate/
If it's a yamaha sensor I don't see it anywhere but then again I don't know which one it is (Thanks Samsung) so I'm not sure what part number to look for.
I think there was a point to all this but I don't remember what it was so quick ask another question, post another comment or just say something witty, I'm sure I'll remember it sooner or later.
hey what ever works for me! besides I can always fall back on the nexus. it's easier than it sounds I'll post what I find out tonight.
BLEH! "permission denied" happen to know if the gui in the froyo build is an apk?
TouchWiz is proprietary Samsung. Eugene373 has managed to remove/work around parts of it in his Frankin-Twiz but I have not messed around with that ROM so I don't know what bits are still in there.
Well that was a big ****ing fail! oh well. Gotta go back to work tomorrow so I guess that's it for me for now. I would say maybe next time but Froyo will be released by then I hope..... I guess I will spend the rest of the evening making sure I have a modem that works in froyo jpk
Ok, I gave it one last go and I got it to do portrait correctly BUT now landscape is upside down....... but it rotates nicely.....
TMC_Sherpa said:
There is an orientation lock so there is some control over the accelerometer however I'm not sure if you can lock only one axis. If it's a .so you are looking for then it ain't stripped so there should be readable text inside.
Click to expand...
Click to collapse
I rather doubt that orientation lock has anything to do with how the accelerometer values are interpreted. It probably just forces the UI to disregard changes in orientation.
Sent from my SAMSUNG-SGH-I897 using XDA App