Guest Rapid81 Posted March 16, 2011 Report Posted March 16, 2011 (edited) Hi everyone! My friends Soroush0313 and Fardjad, and I want to provide you the REAL WVGA Teeter from HTC HD2. In the last few days, we did everything to make it work, and we finally did it! The HTC HD2's WVGA Teeter is working like charm on our Omnia 2! What we've done:We patched the exe not to check the device. We patched the exe to use pdraw.dll (all credits to the author(s) of this file)We patched the exe to use DeviceIOControl.dllIn DeviceIOControl.dll we starts the SmiSensorServer_2.dll (The Samsung's sensor service) and reads the sensor's datas and pass back to Labyrinth.exe in a freaky way :(And that's it!Installation: Copy the cab file to your device and install it. :D Teeter_Porting_Team_Omnia_II_Teeter.cab Fardjad provided the source code to you all, if you want to learn some sensor's handling:DeviceIOControl_Source.zipOEM Package for rommersAdditional languages (mui files) - just copy to the installation folder.Hungarian - labyrinth.exe.040e.zipRussian - Labyrinth.exe.0419.zip Level Editors: [*] TeeterEdit 1.4 - TeeterEdit.zip [*] TeeterLevels - TeeterLevels.zip The program's license is BSD. Here's some screenshots from the Teeter working on my O2: Edited March 28, 2011 by Rapid81
Guest soroush0313 Posted March 16, 2011 Report Posted March 16, 2011 (edited) reserved for future use... Edited March 22, 2011 by soroush0313
Guest Mk256 Posted March 16, 2011 Report Posted March 16, 2011 (edited) I will work on it :D Edit:I'm getting some thing :( Edited March 16, 2011 by Mk256
Guest Mk256 Posted March 16, 2011 Report Posted March 16, 2011 (edited) I found the solution : I just need an expert person in PE explorer for editing something in the exe file. Edited March 16, 2011 by Mk256
Guest fardjad Posted March 17, 2011 Report Posted March 17, 2011 I found the solution : I just need an expert person in PE explorer for editing something in the exe file. Hello, Could you please share the idea, maybe I can figure it out :D
Guest Mk256 Posted March 17, 2011 Report Posted March 17, 2011 Hello, Could you please share the idea, maybe I can figure it out :D I told soroush.Ask him
Guest Rapid81 Posted March 18, 2011 Report Posted March 18, 2011 Additional informations: Yesterday we worked on this project, but with no luck yet. We tried to solve it from some different angles: - Changed the service's prefix in the exe from SEN to SSS (SmiSensorServer) -> not worked - Changed the service's prefix in the exe from SEN to ACC (Samsung's G-Sensor's device name) -> not worked - Started the SmiSensorServer with HTCSensorservice alias -> not worked - The HTC and the Samsung service's commands are (almost) identical. Like SEN_Init -> SSS_Init or SEN_Read -> SSS_Read. We came up with a possible solution, but we definitely need some help in this. The idea is the following: - We need a WM service dll, what's pretend itself as HTCSensorService (Prefix: SEN, dll's name: HTCSensorService.dll) - This service captures the requests from the Labyrinth.exe - Redirects the requests to the Smi Sensor Server (Prefix: SSS, dll's name SmiSensorServer_2.dll) or to the SamsungMobilesdk_2.dll - Then pass back the values of the G-Sensor's readings to the Labyrinth.exe I tried to contact with Chainfire, but he didn't respond (yet?). Ginkage was not here seen since last september. :( I know we have programming experts here, and I hope they can help us. :D
Guest fardjad Posted March 19, 2011 Report Posted March 19, 2011 (edited) Mar 18 2010: Before we making HTCSensorService.dll compatibility layer, I decided to look into the Labyrinth.exe carefully, I've disassembled two functions: HTCSensorOpen and InitSensorEvents (the function names are abstract). Here is the result: HANDLE HTCSensorOpen(int sensorType) { hDevice = CreateFileW("SEN0:", 0, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (hDevice == INVALID_HANDLE_VALUE) { if(!RegisterService("SEN", 0, "HTCSensorService.dll", 1)) return NULL; hDevice = CreateFileW("SEN0:", 0, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (hDevice == INVALID_HANDLE_VALUE) return NULL; } LPDWORD lpInBuffer = new DWORD; CONTROL_CODE = 0x1000001 // Related to SENSORTYPE_GSENSOR; if (!DeviceIoControl(hDevice, CONTROL_CODE, &lpInBuffer, sizeof(DWORD), &lpOutBuffer, 0, &lpBytesReturned, NULL)); KDbgPrintfW("[AP:SensorSDK] Can't update. Used default setting"); } if (!InitSensorEvents(hDevice)) return NULL; return hDevice; } bool InitSensorEvents(HANDLE hDevice) { HANDLE hEvent = CreateEvent(NULL, 0, 0, "HTC_GSENSOR_SERVICESTART"); if (hEvent == NULL) return 0; EventModify(hEvent, EVENT_SET); Sleep(100); hEvent = CreateEvent(NULL, 0, 0, "HTC_GSENSOR_SERVICESTOP"); if (hEvent != NULL) return 1; CloseHandle(hDevice); return 0; } I realized that if we want to make Labyrinth use Samsung Service, we should do the following:Change SEN0 to ACC1Change SEN to SSS(?)Change the CONTROL_CODE: Samsung control codes are: ACCOnRot = 0x44E ACCOffRot = 0x44FACCReadValues = 0x80122EF0 I think we only need this oneAlso the output of Samsung Service and HTC Service is completely different: Samsung outputs {3*16 bits} (X, Y, -Z) but HTC outputs {3*16 bits, 16 bit, 3*32 bits} which we need first three 16 bits as (X, Y, Z). Another difference is the readings offsets. (2048 for Samsung) I think we can solve all these problems by redirecting (import table patching) DeviceIOControl function in Labyrinth.exe We should make a dll with DeviceIOControl function implemented in it, redirect the requests to Samsung Sensor, adapt it's output and... we'll done. Obviously we can do this faster if others help us. Best Regards. Edited March 22, 2011 by fardjad
Guest fardjad Posted March 20, 2011 Report Posted March 20, 2011 (edited) Patch Mar 20 2011: In this version I've Patched Labyrinth.exe import table to redirect these functions:DeviceIoControl: To change the IO Control Code to 0x80122EF0 and the Sensor Device Name to ACC1:RegisterService: To make Labyrinth use SmiSensorServer_2.dll and register the service as SSSSomeone please test this version and report. (I don't have Omnia II anymore). I'll attach the redirector functions source-code for those who want to contribute :D Edit: The working source-code and Teeter package can be found in post #1. Edited March 22, 2011 by fardjad
Guest Rapid81 Posted March 20, 2011 Report Posted March 20, 2011 (edited) Patch Mar 20 2011: In this version I've Patched Labyrinth.exe import table to redirect these functions:DeviceIoControl: To change the IO Control Code to 0x80122EF0 and the Sensor Device Name to ACC1:RegisterService: To make Labyrinth use SmiSensorServer_2.dll and register the service as SSSSomeone please test this version and report. (I don't have Omnia II anymore). I'll attach the redirector functions source-code for those who want to contribute :D Tried, but unfortunately, it's not working. But something definitely changed. With the first version, when I put the Teeter to the background, then resumed, the ball went from the upper left corner, to the bottom right and stays there. Now, after the resume, the ball moves a little, about 2 millimeter, and stops. The SMI Sensor Server service is running on my phone. Do I need to stop it or delete from the services? Update: This is interesting. When I unplug the phone from the USB, the ball moves away from the wall about a centimeter, then goes back. When I replug the USB, the ball does the same. It does the same with removed, running or stopped SMI Sensor Server service. Edited March 20, 2011 by Rapid81
Guest soroush0313 Posted March 22, 2011 Report Posted March 22, 2011 (edited) Hello Everyone Finally we are done, I confirm that I8000 Teeter works fine every thing's just working fine We are going to clean every thing up and release a new full cab very soon ... :D Edited March 22, 2011 by soroush0313
Guest HAL_9000 Posted March 22, 2011 Report Posted March 22, 2011 That´s great! :D I look forward to new release...
Guest Rapid81 Posted March 22, 2011 Report Posted March 22, 2011 (edited) Check the first post. :D Edited March 22, 2011 by Rapid81
Guest BTGDelta Posted March 22, 2011 Report Posted March 22, 2011 complains about unvalid certificate... help a wm 6.5 newbie pls
Guest thund3r Posted March 23, 2011 Report Posted March 23, 2011 (edited) complains about unvalid certificate... help a wm 6.5 newbie pls Same here... the exe is not working properly and it installs directly into the Windows folder! Get's messy... Edited March 23, 2011 by thund3r
Guest fardjad Posted March 23, 2011 Report Posted March 23, 2011 Same here... the exe is not working properly and it installs directly into the Windows folder! Get's messy... It needs to be installed in Windows folder for a reason :D
Guest fardjad Posted March 23, 2011 Report Posted March 23, 2011 (edited) complains about unvalid certificate... help a wm 6.5 newbie pls That error message usually means the application can't find its dependencies. (Post your ROM information). Edited March 23, 2011 by fardjad
Guest fardjad Posted March 23, 2011 Report Posted March 23, 2011 (edited) I've attached a new cab. Installs faster and performs full cleanup on deinstallation :D Edit: See the first post. Edited March 23, 2011 by fardjad
Guest Odysseas07 Posted March 23, 2011 Report Posted March 23, 2011 (edited) Hello Just install it but i have a problem When i install it it install only an zip file on windows directory... I have to find it and extract it where i want and then i can play the game i dont know if you undrestand me ..... and 1 more thing when i play and touch the screen i can see 2 empty buttons. How we can see the words on it ??? Edited March 23, 2011 by Odysseas07
Guest fardjad Posted March 23, 2011 Report Posted March 23, 2011 Hello Just install it but i have a problem When i install it it install only an zip file on windows directory... I have to find it and extract it where i want and then i can play the game i dont know if you undrestand me ..... It supposed to extract contents of the zip file to your Windows directory. Did you installed the previous version before? And did you see the message: "Omnia II Teeter 0.4.4.0 by Teeter Porrting Team" after installation? and 1 more thing when i play and touch the screen i can see 2 empty buttons. How we can see the words on it ??? The files should be placed in Windows folder for the application to work correctly.
Guest Odysseas07 Posted March 23, 2011 Report Posted March 23, 2011 It supposed to extract contents of the zip file to your Windows directory. Did you installed the previous version before? And did you see the message: "Omnia II Teeter 0.4.4.0 by Teeter Porrting Team" after installation? The files should be placed in Windows folder for the application to work correctly. no i havent install the previous version I had see the Teeter 0.4.4.0 by Teeter Porrting Team" after installation i have extract it on the Progam File Directory . I will extact it to windows folder and i will try it. Thank you for your answer
Guest fardjad Posted March 23, 2011 Report Posted March 23, 2011 (edited) no i havent install the previous version I had see the Teeter 0.4.4.0 by Teeter Porrting Team" after installation i have extract it on the Progam File Directory . I will extact it to windows folder and i will try it. Thank you for your answer Actually there was a problem with cab (not the cab, the way it extracts files) I've attached a new one, hopefully this one works well :D Everyone please report if it's working. Edit: See the first post. Edited March 23, 2011 by fardjad
Guest bluhound Posted March 23, 2011 Report Posted March 23, 2011 (edited) Error with the new cab: Couldn't unzip '\Temp\Omnia II Teeter\Omnia II Teeter.zip' to '\Windows\' Line 3 (\Temp\Omnia II Teeter\install.mscr); UnzipAll(SystamPath("Script Path") & "\Omnia II Teeter.zip", "\Windows\") Edited March 23, 2011 by bluhound
Guest Rapid81 Posted March 23, 2011 Report Posted March 23, 2011 Hello Just install it but i have a problem When i install it it install only an zip file on windows directory... I have to find it and extract it where i want and then i can play the game i dont know if you undrestand me ..... and 1 more thing when i play and touch the screen i can see 2 empty buttons. How we can see the words on it ??? Only the 409 mui is in the cab. If you can find the mui in your language, just copy it to the \Windows folder and share with us. :D If you cannot, then rename the 409 mui to your language code and it will be fine. I have the 40e, hungarian mui. I will upload that later today.
Guest Pawel Virtuss Omega Posted March 23, 2011 Report Posted March 23, 2011 I tried cab from firsst post (after installation no icon.., also found zip in windows folder.., tried unzipping it to \Windows\ dir but was getting: "The file 'Labirynt' cannot be opened. Either it is not signed with trusted certificate, or one of its components..." I tried also new cab from posts above. This time I had see the Teeter 0.4.4.0 by Teeter Porrting Team" after installation, also there was a new icon added. But when trying to run the thing, same message appears: "The file 'Labirynt' cannot be opened. Either it is not signed with trusted certificate, or one of its components..." :/ I'm running official I8000NXXJJ1, no modifications.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now