[G1 Q&A, Help & Troubleshooting] HasanSabbah:
Solved

The issue for me was that the sensors' "akmd_set.txt" configuration file was not being re-created after a wipe/upgrade/flash/whatever.

Most solutions to this issue suggest deleting this config file in /data/misc, so that the /system/bin/akmd application would then re-create it and populate it with the default values. This did not work for me and I don't know why. I created an empty file: /data/misc/akmd_set.txt, and this was then partially filled after a restart. My magnetometer started working, but the rest of the sensors were still dead. I found an old nandroid backup (vanilla ROM from when I got a replacement for a bricked phone. YOU CANT PROVE ANYTHING!! :D) that had my original settings file, and when I pushed that to the phone everything worked!

You can extract files from an old nandroid backup by using an application called "unyaffs.exe". Search a bit for it and you'll find it online. Some suggest also replacing the /system/bin/akmd application from an old ROM, but that wasn't necessary for me.

I don't know how to post a file to this board, so I'll post the contents of the file here. Hopefully this helps someone, or at least provides another avenue to investigate.

//-----Int16-----//
STATUS_HDOEPRMS=0
HDA.x=135
HDA.y=133
HDA.z=152
HDA_STATUS0.x=0
HDA_STATUS0.y=0
HDA_STATUS0.z=0
HDA_STATUS1.x=135
HDA_STATUS1.y=133
HDA_STATUS1.z=152
HGA.x=7
HGA.y=7
HGA.z=10
HOF.x=-685
HOF.y=100
HOF.z=-67
HOF_STATUS0.x=0
HOF_STATUS0.y=0
HOF_STATUS0.z=0
HOF_STATUS1.x=-685
HOF_STATUS1.y=100
HOF_STATUS1.z=-67
HSE.x=798
HSE.y=793
HSE.z=791
HDST=1
HDST0=0
HDST1=1
KSTE.x=12452
KSTE.y=12452
KSTE.z=8520
ASE_EE.x=720
ASE_EE.y=708
ASE_EE.z=703
TTBL00_GAINDAC.x=3979
TTBL00_GAINDAC.y=4102
TTBL00_GAINDAC.z=3970
TTBL00_SENS.x=720
TTBL00_SENS.y=708
TTBL00_SENS.z=703
TTBL00_OFFSET.x=-13
TTBL00_OFFSET.y=14
TTBL00_OFFSET.z=32
TTBL00_TEMPLEVEL=2050
TTBL01_GAINDAC.x=3979
TTBL01_GAINDAC.y=4102
TTBL01_GAINDAC.z=3970
TTBL01_SENS.x=617
TTBL01_SENS.y=607
TTBL01_SENS.z=634
TTBL01_OFFSET.x=-123
TTBL01_OFFSET.y=-425
TTBL01_OFFSET.z=32
TTBL01_TEMPLEVEL=-22527
TTBL02_GAINDAC.x=3979
TTBL02_GAINDAC.y=4102
TTBL02_GAINDAC.z=3970
TTBL02_SENS.x=634
TTBL02_SENS.y=624
TTBL02_SENS.z=646
TTBL02_OFFSET.x=-105
TTBL02_OFFSET.y=-352
TTBL02_OFFSET.z=32
TTBL02_TEMPLEVEL=-18431
TTBL03_GAINDAC.x=3979
TTBL03_GAINDAC.y=4102
TTBL03_GAINDAC.z=3970
TTBL03_SENS.x=652
TTBL03_SENS.y=641
TTBL03_SENS.z=657
TTBL03_OFFSET.x=-87
TTBL03_OFFSET.y=-279
TTBL03_OFFSET.z=32
TTBL03_TEMPLEVEL=-14335
TTBL04_GAINDAC.x=3979
TTBL04_GAINDAC.y=4102
TTBL04_GAINDAC.z=3970
TTBL04_SENS.x=669
TTBL04_SENS.y=658
TTBL04_SENS.z=669
TTBL04_OFFSET.x=-68
TTBL04_OFFSET.y=-206
TTBL04_OFFSET.z=32
TTBL04_TEMPLEVEL=-10239
TTBL05_GAINDAC.x=3979
TTBL05_GAINDAC.y=4102
TTBL05_GAINDAC.z=3970
TTBL05_SENS.x=686
TTBL05_SENS.y=674
TTBL05_SENS.z=680
TTBL05_OFFSET.x=-50
TTBL05_OFFSET.y=-133
TTBL05_OFFSET.z=32
TTBL05_TEMPLEVEL=-6143
TTBL06_GAINDAC.x=3979
TTBL06_GAINDAC.y=4102
TTBL06_GAINDAC.z=3970
TTBL06_SENS.x=703
TTBL06_SENS.y=691
TTBL06_SENS.z=689
TTBL06_OFFSET.x=5
TTBL06_OFFSET.y=-21
TTBL06_OFFSET.z=51
TTBL06_TEMPLEVEL=-655
TTBL07_GAINDAC.x=3979
TTBL07_GAINDAC.y=4102
TTBL07_GAINDAC.z=3970
TTBL07_SENS.x=720
TTBL07_SENS.y=708
TTBL07_SENS.z=703
TTBL07_OFFSET.x=-13
TTBL07_OFFSET.y=14
TTBL07_OFFSET.z=32
TTBL07_TEMPLEVEL=2049
TTBL08_GAINDAC.x=3979
TTBL08_GAINDAC.y=4102
TTBL08_GAINDAC.z=3970
TTBL08_SENS.x=737
TTBL08_SENS.y=725
TTBL08_SENS.z=714
TTBL08_OFFSET.x=5
TTBL08_OFFSET.y=87
TTBL08_OFFSET.z=32
TTBL08_TEMPLEVEL=6145
TTBL09_GAINDAC.x=3979
TTBL09_GAINDAC.y=4102
TTBL09_GAINDAC.z=3970
TTBL09_SENS.x=754
TTBL09_SENS.y=742
TTBL09_SENS.z=726
TTBL09_OFFSET.x=23
TTBL09_OFFSET.y=160
TTBL09_OFFSET.z=32
TTBL09_TEMPLEVEL=10241
TTBL10_GAINDAC.x=3979
TTBL10_GAINDAC.y=4102
TTBL10_GAINDAC.z=3970
TTBL10_SENS.x=771
TTBL10_SENS.y=758
TTBL10_SENS.z=737
TTBL10_OFFSET.x=41
TTBL10_OFFSET.y=233
TTBL10_OFFSET.z=32
TTBL10_TEMPLEVEL=14337
TTBL11_GAINDAC.x=3979
TTBL11_GAINDAC.y=4102
TTBL11_GAINDAC.z=3970
TTBL11_SENS.x=788
TTBL11_SENS.y=775
TTBL11_SENS.z=749
TTBL11_OFFSET.x=60
TTBL11_OFFSET.y=306
TTBL11_OFFSET.z=32
TTBL11_TEMPLEVEL=18433
TTBL12_GAINDAC.x=3979
TTBL12_GAINDAC.y=4102
TTBL12_GAINDAC.z=3970
TTBL12_SENS.x=805
TTBL12_SENS.y=792
TTBL12_SENS.z=760
TTBL12_OFFSET.x=78
TTBL12_OFFSET.y=379
TTBL12_OFFSET.z=32
TTBL12_TEMPLEVEL=22529
//-----String-----//

Good Luck!