Kjos / XposedJitteryGyroFix

An app for Xposed to fix jittery gyroscopes of Android phones.
GNU General Public License v2.0
22 stars 8 forks source link

Does not work with emulated gyroscopes #10

Open greeny18 opened 7 years ago

greeny18 commented 7 years ago

Hi,

First of all, thanks so much for providing and developing this fix! Unfortunately, it does not seem to work with emulated gyroscopes. I am on a Huawei P8 with the following gyroscope fix: https://forum.xda-developers.com/showpost.php?p=64862689&postcount=2

Have you planned to address this issue?

Thanks and all the best,

greeny18

Kjos commented 7 years ago

This Github isn't being updated anymore unfortunately. I'm not sure if it'll work with an emulated gyro, but you could try to change the code, it's not that intense. This line (hook 1): https://github.com/Kjos/XposedJitteryGyroFix/blob/master/GyroscopeNoiseFilter/src/net/kajos/gyronoisefilter/GyroscopeNoiseFilter.java#L235 filters the sensor inputs. If you change the sensortype to the emulated gyroscope it might work. Does the emulated gyro work at all in Cardboard? If so, you can also try hook 2 or 3.

greeny18 commented 7 years ago

Kjos,

Thanks for the quick reply! The emulated gyroscope does work in Cardboard but it is very jittery. This is the main reason why I am trying to get this filter to work with the emulated gyroscope. I have no experience when it comes to programming but I understand what you mean with the sensor type. The only problem that I see right now is how to get the correct term to specify the emulated gyroscope (I guess TYPE_emulatedGyroscope won't work).

Thanks for your help,

greeny18

Kjos commented 7 years ago

https://developer.android.com/guide/topics/sensors/sensors_overview.html

Did you try using hook 1 and 2? Would be easier to use those if they still work. I think an emulated gyroscope would probably be just TYPE_GYROSCOPE too actually.

Note that this fixes doesn't work with binary code (Unity - some work some dont) last I checked.

greeny18 commented 7 years ago

Sorry if this is annoying to you but how do I use these hooks? As I said, I am not familiar with this sort of programming. Feel free to link me any tutorial and I will try to figure out most of this by myself.

Thanks,

greeny18

Kjos commented 7 years ago

You set the modules settings in Exposed. You can choose the hooks there. See https://github.com/Kjos/XposedJitteryGyroFix under Options.

I'm happy to help out, but I'm afraid it might not work anymore, since it's been so long since this was updated. I also only tried on KitKat as back then Exposed didn't work for Lollipop correctly, but Exposed might work fine for newer Androids nowadays, but can't be sure.

greeny18 commented 7 years ago

Kjos,

Thanks so much for the explanation - I will try it immediately!

Kjos commented 7 years ago

Okay, no problem and good luck :)

Kjos commented 7 years ago

Sorry, replied to wrong email..