yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] lban:
Not working on Doogee X5

Hi there,

My son has a Doogee, which claims to have both a magnetic sensor and a gyroscope, but does not seem to in reality. I thought this might be a way to turn on 360 videos and the like, but so far, no luck.

The outputs I'm seeing from VirtualSensor are as follows:

Version: 1.41

Accelerometer: true

Accelerometer Values: -0.23; 0.51; 9.83

Magnetic Sensor: true

Magnetic Values: ...

Gyroscope : true

Gyroscope Values: ...

Theoretical Values: 0.0; 0.0; 0.0

Values identical : true

Any thoughts?

Thanks.. this looks like a great project!
[Xposed Framework Modules] Frazew:
Wow, this is really weird. The fact that the phone actually seems to have both a gyroscope and a magnetic sensor but doesn't receive values at all from the magnetic sensor is surprising. I have no idea about what could be causing this, but I would like it (if possible) if you could send the values a sensors testing app receives (you can easily find many of those on the play store).

Thank you !
[Xposed Framework Modules] lban:
Thanks for the quick reply. Here are the screenshots from "Sensor Kinetics"
[Xposed Framework Modules] cojocariu.adr:
How on P9 lite ?

Works on P9 Lite ? Have you simply downloaded the Apk and installed it ? When I run the app it just closes. I have root access tested. The Sensor box says no gyro still. I found a really cheap VR headset for mobile and I really wanna show my moms.
[Xposed Framework Modules] Mimisf:
It isn't suitable for vr use yet... The developer is working on it.
[Xposed Framework Modules] cojocariu.adr:
I know but

I know but I can't even get it to detect my 'gyroscope' in a sensor detection app. Do I need install something else first ?
[Xposed Framework Modules] Mimisf:
Yes!! You also need to install Xposed framework to use Xposed modules like this one. You have to be rooted to do this.
[Xposed Framework Modules] waleeds1:
You should test it using the app called phone doctor plus because i tried it with different apps and apps which only detect sensors dont work but i on phone doctor plus if it is working then it's fine of not then u didnot activate it in xposed modules tried it with google camera and it works
[Xposed Framework Modules] cojocariu.adr:
It works

OK I'm sorry for my lack of skills. I have reflashed twrp then reinstalled su and the xposed framework, downloaded the virtual sensor from the framework app itself and then activated it. O did reboot on every step and guess what: it works !

The sensor box app detects the gyro but the cube won t turn. In the virtual sensor app the values do change. This is really awesome work dev, thanks !

My Facebook wouldn't work after xposed for some reason but I chmod 755 some file and now it works.
[Xposed Framework Modules] waleeds1:
If it has detected the sensor then you are good to go it wont work for vr and some apps but it works great i tried it with google camera and some other apps it works great now i have panorama and photosphere enabled in google camera and they work perfect
[Xposed Framework Modules] Christophera:
Still not working for my phone, Polytron Zap 6 Posh (it's a local phone from Indonesia) and it's already Lollipop. is the Gyroscope values supposed to be "....." or should have numbers in there?
[Xposed Framework Modules] cojocariu.adr:
Works like a charm

Haha yeah it glitches out on some apps and it shakes wildly but i opened g cardboard now and went to 360 videos and it seems to turn around very accurately.

Unfortunately left and right won t work, only up down and rotation. I read that the dev is still working on this.

Awesome work ! Very useful.

---------- Post added at 04:54 PM ---------- Previous post was at 03:54 PM ----------

Also, the 360 videos turn just fine when I move the camera, the img is smooth and stuff, but when I activate the cardboard icon and the screen splits in two, there is a very big delay in movement and it seems like the images aren t quite in sync.

So when i move my phone down it slowly moves down. But when i am watching it without VR it's no delay, real time.

The best app that works for me is called House of terror VR and it works even for left right ! I can't figure out how to play it though since you have to tap screen to move.
[Xposed Framework Modules] Dakkaron:
Would it be possible to add the ability to take input from stuff like a Dualshock 4 controller and send it to the virtual gyroscope? That way one could add a real gyroscope to a VR headset. Would just look incredibly dumb but might work better than the virtual one.
[Xposed Framework Modules] Zuzzurello:
didn't understand what you mean for "left and right not working"... since you can, your words, "turn around", you're supposed to have left and right working... don't ya?
[Xposed Framework Modules] Nate9790:
Help!

I'm having errors with lolipop 5.1.1 api 22 lg g vistia vs880

Downloaded the xposed and then got a android guy popping up with error on reboot
[Xposed Framework Modules] Choochter:
Did you download for the correct architecture? Anyway, please post your question in the Xposed thread.

Easiest way to install Xposed is to use this app:

http://xdaforums.com/xposed/material-design-xposed-installer-t3137758
[Xposed Framework Modules] Nate9790:
Yes I have, i thought i was in the right threat were do i go?... new here..

ill try that though
[Xposed Framework Modules] Choochter:
http://xdaforums.com/xposed/official-xposed-lollipop-t3030118
[Xposed Framework Modules] Zuzzurello:
is he still working on it?
[Xposed Framework Modules] kos25k:
no one knows ?

Peace to all
[Xposed Framework Modules] Nico403:
Doesn't work
[Xposed Framework Modules] MotoGix:
Works great on Moto G Falcon. Many thanks!
[Xposed Framework Modules] Zuzzurello:
z axis not working yet?
[Xposed Framework Modules] Nico403:
I'm on galaxy a5 2016 :rolleyes:
[Xposed Framework Modules] khachak:
hi all. just visiting to see how it goes.
[Xposed Framework Modules] kiodo1981:
I tried it but I have glitches.

Works only on streeview and google camera (photosphere).

Can I use it on youtube360 and VR app?

Thanks.
[Xposed Framework Modules] MotoGix:
Sorry, I cannot help you, since I'm just interested in the Google camera (panorama mode) and I don't make use of any other application.
[Xposed Framework Modules] kiodo1981:
OK.

It works fine photosphere mode?

Not for me.
[Xposed Framework Modules] MotoGix:
Panorama works fine. On the contrary, photosphere works but shots have unsatisfactory quality. It is not like having the gyroscope, because orientation is unavoidably less accurate. I'd suggest you to try to firstly calibrate the compass, in order to avoid introducing systematic errors. Perturbations in magnetic field, due to nearby obstacles, may indeed influence the quality of final result.
[Xposed Framework Modules] DroidzIcon:
Hi there,

I recently tried to install the latest version of this app (1.41) and it seems to be working somewhat. I can see the values changing in the app when I move the phone slightly and I also downloaded a sensor testing app and I could see the values changing in that too but they always go back to 0 after the phone stops moving no matter where it is orientated. It doesn not work at all in cardboard apps. No matter how much I move the phone nothing happens. If anyone could give me some insight on this I would greatly appreciate it.
[Xposed Framework Modules] DondoFX:
Problem

Phone : KMAX P9 [chinese rebrand of Ulefone Be Touch 3 and all the other brands with the same specs.]

Installed everything, rebooted and in Xposed everything is fine and dandy. I then went to Cardboard app, no movement. CPU-Z, VirtualGyroscope present but no change, just in VirtualSensor LinearAcceleration, even there, small numbers.

I rebooted again and I entered CPU-Z ASAP and went to sensors again, Gyro was working but just a few seconds, after that it would just stop at 0 again. So everytime I reboot, the gyro works for a few seconds and then it just stops.

:crying:
[Xposed Framework Modules] logran:
I have one question. It's possible to modify this Xposed Module to take data for virtual gyro sensor not from Compas+Accelerometer but from USB HID device via OTG?

Because it can be probably very cheap (about 8-12$) real gyro solution for people who have phone without gyro. I mean such thing as EDtracker: Arduino Pro Micro + MPU 9250 + EDtracker Firmware. After flashing official firmware and calibration it's just recognized on any PC as USB HID Joystick (Arduino LCC DIY EDTracker 2). Android also succesfully recognize it similar to other gamepads - as physical keyboard "DIY EDtracker 2", so it's probably possible to parse data from it and transfer to virtual sensor made by this Xposed module instead of calculated by module values.

Unfortunately I don't know java well enough to modify the module by myself = (

P.S. Sorry for bad English.
[Xposed Framework Modules] DIDIandroid1997:
We need further development here
[Xposed Framework Modules] DIDIandroid1997:
Tested a 360 VR image viewer with google cardboard on. Up and down is perfect!

Please fix left and right turning :) it does nothing
[Xposed Framework Modules] PROGamer_199:
Not working properly

Hi,I have a Allview P8 Energy Mini and I've installed your app because my phone doesn't have a gyroscope,but when I try to view anything VR on Youtube or play any VR games it doen't work,it just stays in the same position that I've open it,when I press on Youtube on cardboard setting to be VR, it doesn't work,it just stays in the same position,at the games it's the same storry.
[Xposed Framework Modules] DroidzIcon:
Yeah it seems like up and down works with some apps, but the more common apps, such as the Cardboard app, are completely ineffective. Would really appreciate further development on this project.
[Xposed Framework Modules] waleeds1:
The most problems are with cardboard related apps because i tried it with some apps and ot works fine even with google camera and i can s

Take a complete panorama up down left right but only issue comes with z axis which is also noted in the OP
[Xposed Framework Modules] khachak:
"up and down worked but no side to side". "tried latest version"... which is quite old already if considered as 'in development'. stop saying "up and down" already. so many post saying that. please read before posting. no need repeating what's already known.
[Xposed Framework Modules] kikus14:
I installed it on my lg l70 (d320n) and when im trying to play some vr games on cardboard left/right dont work but as you can see on that movie https://youtu.be/vKds_1ElC2A it move right, left, around, up, down... tested on gyrodroid. So what can i do to make it work on vr games like rollercoaster or other games/apps?
[Xposed Framework Modules] Mimisf:
Wait. This is still under development. Not so active but the dev didn't quit.
[Xposed Framework Modules] kikus14:
Ok but why its working as i think pretty good in that app and on vr games it wont?
[Xposed Framework Modules] Mimisf:
Beacause some apps don't use the gyroscope method and use accelerometer+compass.

This mod does the same but it behaves like a gyroscope for the apps that don't support the method i stated above. But beacause it is still under development, some things aren't working.
[Xposed Framework Modules] kiodo1981:
Is it possibile to create an apk or a zip file that you can install from recovery? For those who doesn't use Xposed.

Thanks
[Xposed Framework Modules] waleeds1:
Well no xposed module can be created to be a zip or app which doesnt need xposed as xposed allows apps (xposed modules) to do specific tasks which cannot be done normally even with root like theming etc. So even in this case it needs xposed.
[Xposed Framework Modules] Unitedinred:
After a fight I got this installed. Works as advertised, not in cardboard (though tricks my phone into believing it's compatible) and only up/down but it's a start.

Can not believe the Xperia M5 e5603 has no gyro. Laughable. My old Xperia Z has one as I sold it a friend a while back. Tested Vr on it and its great.

So will keep tabs this but the plan is to buy an Xperia Z or Z1/Z2 soon as a dedicated VR phone.I will be setting it up to run games from my PC with gyro mouse etc. At around Â£100 in the UK it seems most plausible.

Respect to the Dev. Keep up the good work. Hopefully Google pull their thumb out and make VR more accessible because right now....this is stupid! A gyro costs pennies.
[Xposed Framework Modules] EuroCrafterLP:
Good Day, I got a Question about This Module can this Module work wiht Trinus VR I tried a 100 Times But It never gave Info about his Position. Is ther a Way too get it work wiht Trinus VR ?
[Xposed Framework Modules] Miggas09:
Hi, i was thinking if it would be possible to emulate gyro using a gyro on an Arduino connected via OTG or Bluetooth using the values transmitted which you probably read in the android terminal?

I thought of this because it's super cheap to get a Arduino nano or pro mini, a 3 axis gyroscope and Bluetooth module both for the Arduino on Ebay (about 10 bucks).
[Xposed Framework Modules] Maveroik:
Thanks You!

Hey! How do you install? I mean, I'm trying to install but I dont know what files I need. There are two links in download section, and in the first link there are 3 items to download? I need all items on my phone? (code source too?)
[Xposed Framework Modules] Nikøs:
I just istall it from xpose apk
[Xposed Framework Modules] Frazew:
First of all you of course need Xposed. Then, it's your choice. You either download it from Github using the .apk file or (preferably) use the Xposed Installer.

That actually makes sense. I just realized that I did not consider the case when the devices was not in portrait, I'll see why it's not working as expected. As for Pokémon GO, it doesn't work right now, but I'm working on it too.

Thank you ! We'll see if the next update changes anything. If not (or if you want/can do it now), could you send me the xposed logs so that I can analyse the issue ? Thanks !
[Xposed Framework Modules] rheckr:
Awesome work! Waiting for the new update which will work in Pogo! :D
[Xposed Framework Modules] Nikøs:
Thanks.. I hope you fix it
[Xposed Framework Modules] nicolobos77:
Doesn't work on my Moto G xt1032
[Xposed Framework Modules] Mourdraug:
How do you test virtual sensors output?

I tested most recent version atm and did test using

-App1(https://play.google.com/store/apps/details?id=asd.vector.sensor)

-App2(https://play.google.com/store/apps/details?id=com.axelk.sensorapp)

-App3(https://play.google.com/store/apps/details?id=imoblife.androidsensorbox)

I'll describe effects of my tests, if there is no description for one of apps it means it does not use that sensor.

First gyro:

App1: output still is delayed and "bounces" but seems more or less correct.

App2: values stay on 0, but if I swing phone hard there seem to be very weak output.

App3: cube does not budge, no matter what I do.

Gravity:

App1: works fine, no problems

App2: same

Linear-acceleration:

App1: nothing, not even zeroes, just empty fields.

App2: same, completely no output.

Rotation vector:

App1: seems to output correct vector, but no scalar value;

App2: output stays at {0,0,0.5,N/A}

I also tested georotation vector and it looks like its broken when using module. on both apps.

EDIT:

I actually started tinkering with your code, and noticed that you're calculating both TYPE_GEOMAGNETIC_ROTATION_VECTOR and TYPE_ROTATION_VECTOR form accel and magnetic sensors data. It might be different on your phone, but I have TYPE_GEOMAGNETIC_ROTATION_VECTOR implementation actually already built in.

I removed it from list of sensors for emulation and made module register TYPE_GEOMAGNETIC_ROTATION_VECTOR listener, instead accel and magnetic ones, when app tries to register TYPE_ROTATION_VECTOR listener. Then in dispatchSensorEvent hook I just added little code:

if (s.getType() == Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR && virtualListener.getSensor().getType() == Sensor.TYPE_ROTATION_VECTOR) {
float[] values = ((float[]) (param.args[1])).clone();
System.arraycopy(values, 0, (float[]) param.args[1], 0, values.length);
virtualListener.sensorRef = sensors.get(Sensor.TYPE_ROTATION_VECTOR);
}

And removed old rotation vector update on accelerometer event. And now I have both Geomagnetic and normal rotation vector working. :D

EDIT2:

Actually, I have idea to calculate gyro values from geomagnetic rotation vector only, since it basically returns orientation of phone and angular velocity would be just (orientation(t) - orientation(t-T))/T
[Xposed Framework Modules] Harjito:
work on galaxy a5 510fd. could see 360 degree video . not trying to play games

thank you:good:
[Xposed Framework Modules] Frazew:
That's nice, I tested it with the first two, I just installed the third one.

App1: I think I'll consider using the *maxRange* and *resolution* values of the accelerometer (and compass?) to adjust the outputs. In my case, this was not needed but it could be needed for a more general use.

App2: Same for me, I think that's because it rounds the values to the first decimal and the gyroscope is generally under that decimal. Again, this will need some tweaking, as it does not take into account the resolution of the accelerometer.

App3: Judging from the look of the third app, this doesn"t surprise me, I didn't decompile it yet but I think it might use the LegacySensorManager which this module doesn"t hook. I might be wrong, but that would explain why it doesn't work. I'll look into the code to see what's going on.

That's weird because they're nearly the same thing code-wise. Maybe there's a hook problem?

To be honest, I have no idea why the scalar value isn't showing up. I do return it in the values but it indeed never showed up. What I did not try to do is to see if it wasn't returning a weird value, in which case that could explain why the field is empty. (Just to make sure, could you tell me at which origin commit your HEAD was when you built the app?)

I initially wanted to indeed use its values for the TYPE_ROTATION_VECTOR but my phone did not have the TYPE_GEOMAGNETIC_ROTATION_VECTOR for some reason (It did not show up in the sensors list). I think I'll add your code with a simple check to see if the device already has the TYPE_GEOMAGNETIC_ROTATION_VECTOR, thanks ;)

Well, if you look at the code for the gyro calculation, that's basically what happens. The only difference is that I used a quaternion representation for the rotation vector and worked with rotation matrices for the gyro. I'll try using the rotation vector calculation to see if that gives a better output. The other advantage is that this will be much more efficient for the calculations (less trigonometry functions call). When I wrote the gyroscope code I hadn't yet looked into the quaternions but now that I understand them, I might be able to further optimise the code. This is a really good idea thank you !

Thank you very much for your help, this is really useful as you're providing in-depth details and even code !
[Xposed Framework Modules] sajjaad1:
Thank you for your nice piece of work.I started to be concerned about my phone (ze550ml)that doesn't have calibrated gyro.what's difference between calibrated gyro and uncalibrated gyro?

Finally I found reasons to root my phone?I hope Intel sensors will be accurate enough for this fusion of sensors and your work get done and we can have a good vr experience without gyro.
[Xposed Framework Modules] reversegear:
Hi Frazew

im very thankful that you came up with the xposed module to overcome the absence of GyroSenson in midrange and some highend devices

however this module does not work with my device.. can u please check the xposed log this may help you..

edit : here is a paper presented on the same subject
[Xposed Framework Modules] Koloses:
Mathematics overcoming lack of hardware. Great job. I'll try it some time later when I'll root my new J5 :D
[Xposed Framework Modules] Frazew:
Thanks for the log, that was helpful to know why it didn't work. Actually the major issue was that I though the major changes made in the SystemSensorManager were made in KitKat. Because of this, I thought the module would work on all versions from KitKat to Marshmallow. However, these changes were made in Marshmallow, thus making the module unusable on pre-M android. The newest version should fix this, along with other things. As I don't have any JellyBean device lying around, I can't test it, so I'm counting on you to report any issues. Thanks for your help !
[Xposed Framework Modules] Harjito:
Hi Frazew

Downloading v.1.1 but not work on my galaxy a510fd. Back to v 1.0 now
[Xposed Framework Modules] Frazew:
If you could send the xposed log, that would help as I cannot do anything without more information.
[Xposed Framework Modules] khachak:
still no gyro, orientation missing

report.

Seems not working on my phone. andromax E2 (Haier). before the module, sensor box detect accelerometer, light, orientation, proximity, and sound sensor. after this module, gryoscope still not emulated, and the orientation sensor also seems to be missing. but the screen still rotate when i flip/turn the phone. weird.
[Xposed Framework Modules] Frazew:
Same as always, I cannot do anything if you don't send me some kind of log. It can be a logcat, but preferably it is the xposed log found in the Xposed Installer app.
[Xposed Framework Modules] Harjito:
Found this on xposed log.
[Xposed Framework Modules] khachak:
Sorry Frazew. I'm new to this xposed thing. here is my log. thanks for your hard work.

added PS: my phone ddoesn't have gyro and compass
[Xposed Framework Modules] Frazew:
Thanks, that helped ! Could you try to use the attached version to see if that fixed it ?

No problem ;) The log you sent is the right file, however, it doesn't contain any errors. Could you maybe try to test the sensors with another app and send another log ? Thank you.
[Xposed Framework Modules] over1pixel:
Hi, I installed the last version of the xposed module, 1.4.1

Every app for sensor monitoring say that the gyroscope is present and working, I actually saw it working with GyroDroid app, but no way to make it work with Cardboard!!

Cardboard app opens normally but when you start the demo or any other app, you tilt the screen and the image stays frozen, like no sensors present. I can normally quit the app, change settings, but no way to use the gyroscope

any ideas?

thanks,

Christian
[Xposed Framework Modules] Mimisf:
The dev is on highschool now so this module isn't under active development.. he didn't abandoned it but can't work on it a lot.

This is a known "bug" and we Wait for an update...
[Xposed Framework Modules] HansIra:
Pls help, doesnt work on google cardboard app, google camera, fulldive vr and many more vr apps. Works for some games (though showing "no gyroscope") pls help i badly want the gcardboard and fulldive vr apl
[Xposed Framework Modules] Mimisf:
Read my post right above yours...
[Xposed Framework Modules] anatolyc:
Useless module

Well, i use it on Samsung A5 2016 but this module its useless to me. Sensor Box - Gyroscope its there active but when I click on it and change phone position the 3d cube is stuck. Nothing works with this, I have tried youtube VR videos, random VR games, etc. As long as its doing nothing I consider this module useless. I have rooted my phone losing the warranty only to see the module failing which I consider a real shame for the developer.
[Xposed Framework Modules] Pozas:
Maybe you should have read the thread before voiding your warranty, if it meant so much to you. It was explicited many times that the module still doesn't work in some cases.

I wonder if we'll have a Christmas gift in the form of update :)
[Xposed Framework Modules] cerbere974:
it tells me: magnetic sensor: false (and some numbers)

and gyroscope value don't change

what do i need to do to make it work?
[Xposed Framework Modules] Akimixu:
It is not working :(

Hello, I installed it on my SM-A500M running Android 6.0.1, and HadesKernel. I installed it but it is not working, none of my VR apps work, what can I do?
[Xposed Framework Modules] asiddarth54:
Could you please share a link on guide to how to install this.