[Huawei P8 Questions & Answers] juyer:
My Huawei can not detect horizontal position but it could before [advanced problem and description]

My Huawei P8 has stopped rotating the screen when it is in horizontally. Youtube, Acrobat, etc.

It had had worked but it stopped and it has not worked for a few days.

I have checked the "auto-rotate" option and it is enabled.

I disabled (grey), enabled again (blue) but it has not helped.

https://consumer-tkbdownload.huawei.com/ctkbfm/servlet/download/downloadServlet/H4sIAAAAAAAAAD2PzU7DMBCE38Xngtb2Zm1zwiGJygVxKOcqjZ1gqXUqJykCxLvjoIjjpxnNzzdbJp8On1fPHhhnO-bGj7ihzNiHs39pLyv2YTgm343JhTgcpy55H--vcdhcr-38nl1GkOCdlILMCUn2Bgqh0UvuAB34NfMUvp5dtu7to493ywSgNBqtspRD2zmM8RDWSk5gUAICB4Adm8IQ23lJ65iqtLUxjSAgXRa6oqbEmmpEqsgWAkyNhNA8kbFGcyoE1aSUtqpSmrim3HVrz8G9_b-f0-L_tm3v95b9_ALim_DTHgEAAA%3D%3D.png

So I have installed some applications, e.g. "Sensors" apk and it says that gravity, rotation, orientation, it has no value, message: "waiting for value".

Could somebody confirm that Huawei P8 should have values there? "Sensors" apk for instance.

https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTt7D4xZKR9FRq8ouZ0Ozj_xAp3OtoTNmTW_ldsjx303moLXCjzStfiOuiAAW4&s

On the other hand I very often used Acrobat Reader and the horizontal orientation had worked.

Of course the phone restart has not helped today.

I couldn't find so much about it on the internet.

For example I have found about Nexus 5 phone, when there was sensor issue then somebody

"Delete folder /data/system/sensors

Delete folder /data/misc/sensors

Delete file /persist/sensors/sns.reg

reboot and the sensor should work!"

I have this Huawei P8 root-ed so I've ssh-ed to my phone and in the Huawei P8

ls: /data/system/sensors: No such file or directory

ls: /data/misc/sensors: No such file or directory

ls: /persist/sensors/sns.reg: No such file or directory

find / -iname *sensor*

and there are interesting

/sys/bus/platform/devices/huawei_sensor

/sys/devices/virtual/misc/sensorhub

/sys/devices/platform/huawei_sensor

/sys/devices/platform/huawei_sensor/dump_sensor_status

/sys/devices/platform/huawei_sensor/sensor_list_info

/sys/devices/platform/huawei_sensor/sensor_test

/sys/devices/platform/huawei_sensor/dt_sensor_stu

/system/asr/sensory

/system/bin/sensorservice

/system/etc/permissions/android.hardware.sensor.accelerometer.xml

/system/etc/permissions/android.hardware.sensor.compass.xml

/system/etc/permissions/android.hardware.sensor.gyroscope.xml

/system/etc/permissions/android.hardware.sensor.light.xml

/system/etc/permissions/android.hardware.sensor.proximity.xml

/system/etc/permissions/android.hardware.sensor.stepcounter.xml

etc.

Also

ls -l /sys/devices/platform/huawei_sensor/ | awk '{print "size: " $5 " name: " $9}'

size: 4096 name: acc_calibrate

size: 4096 name: acc_enable

size: 4096 name: acc_info

size: 4096 name: acc_read_data

size: 4096 name: acc_selfTest

size: 4096 name: acc_setdelay

size: 4096 name: airpress_enable

size: 4096 name: airpress_info

size: 4096 name: airpress_read_data

size: 4096 name: airpress_set_calidata

size: 4096 name: airpress_setdelay

size: 4096 name: als_enable

size: 4096 name: als_info

size: 4096 name: als_read_data

size: 4096 name: als_setdelay

size: 4096 name: cap_prox_calibrate

size: 4096 name: cap_prox_enable

size: 4096 name: cap_prox_freespace

size: 4096 name: cap_prox_info

size: 4096 name: cap_prox_read_data

size: 4096 name: cap_prox_setdelay

size: 4096 name: dt_motion_stup

size: 4096 name: dt_sensor_stup

size: 4096 name: dt_stepcounter_stup

size: 4096 name: dt_stop_auto_data

size: 4096 name: dump_sensor_status

size: 4096 name: fingersense_data_ready

size: 4096 name: fingersense_latch_data

size: 4096 name: fingersense_req_data

size: 4096 name: gras_enable

size: 4096 name: gras_setdelay

size: 4096 name: gyro_enable

size: 4096 name: gyro_info

size: 4096 name: gyro_read_data

size: 4096 name: gyro_selfTest

size: 4096 name: gyro_setdelay

size: 4096 name: handpress_data

size: 4096 name: handpress_enable

size: 4096 name: handpress_info

size: 4096 name: handpress_read_data

size: 4096 name: handpress_setdelay

size: 4096 name: handpress_switch

size: 4096 name: i2c_rw

size: 4096 name: i2c_rw16

size: 4096 name: iom3_recovery

size: 4096 name: iom3_sr_status

size: 4096 name: iom3_sr_test

size: 4096 name: lines_enable

size: 4096 name: lines_setdelay

size: 4096 name: mag_enable

size: 4096 name: mag_info

size: 4096 name: mag_read_data

size: 4096 name: mag_selfTest

size: 4096 name: mag_setdelay

size: 4096 name: modalias

size: 4096 name: orientation_enable

size: 4096 name: orientation_setdelay

size: 0 name: power

size: 4096 name: ps_calibrate

size: 4096 name: ps_enable

size: 4096 name: ps_info

size: 4096 name: ps_read_data

size: 4096 name: ps_setdelay

size: 4096 name: rdr_test

size: 4096 name: read_airpress

size: 4096 name: read_temperature

size: 4096 name: rvs_enable

size: 4096 name: rvs_setdelay

size: 4096 name: sensor_list_info

size: 4096 name: sensor_test

size: 4096 name: set_fingersense_enable

size: 0 name: subsystem

size: 4096 name: uevent

root@HWP8:/sys/devices/platform/huawei_sensor #

# cat gyro_selfTest

# cat gyro_enable

0

# cat orientation_enable

0

#

but

# cat acc_enable

1

The acc I think it is an advanced charging controller.

So advanced charging controller is enabled but gyro & orientation

are disabled

WTF!?

# /system/bin/mount -o remount,rw / /

# echo 1 > orientation_enable ; echo 1 >> gyro_enable

# cat orientation_enable gyro_enable

0

0

#

:(

I have checked the "auto-rotate" option and it is enabled.

I disabled (grey), enabled again (blue) but it has not helped.

But during this.

# cat orientation_enable gyro_enable

0

0

# cat orientation_enable gyro_enable

0

0

#

I have no f***** clue what the hell is going on here.

Maybe somebody has any idea how to fix it?

PS I cannot wipe and reset whole phone because I have a lot of applications and data here.

It's kernel 3.10.74

Fri Nov 20 2015

EMUI 3.1