os-issue-tracker icon indicating copy to clipboard operation
os-issue-tracker copied to clipboard

temperature sensor app for Pixel 8 Pro doesn't work

Open thestinger opened this issue 1 year ago • 21 comments

thestinger avatar Oct 16 '23 13:10 thestinger

Can confirm this issue. Screenshot_20231226-175551

MiMillieuh avatar Dec 26 '23 16:12 MiMillieuh

According to this post https://xdaforums.com/t/thermometer-reverse-engineering.4635859/ it needs to be installed as system app.

jonas-w avatar Jan 18 '24 00:01 jonas-w

FWIW after the latest thermometer app update it just crashes on startup:

type: logcat
osVersion: google/husky/husky:14/UQ1A.240105.004/2024011600:user/release-keys
packageName: com.google.android.apps.pixel.health:1774
buffers: main,system,crash,events
level: error

--------- beginning of main
1706269656.372  2225  2225 E ps.pixel.health: Not starting debugger since process cannot load the jdwp agent.
1706269656.466  2225  2225 E cutils-trace: Error opening trace file: No such file or directory (2)
1706269656.598  2225  2225 E com.google.android.apps.pixel.health: Unable to find pattern file or unable to map it for am
--------- beginning of crash
1706269656.685  2225  2225 E AndroidRuntime: FATAL EXCEPTION: main
1706269656.685  2225  2225 E AndroidRuntime: Process: com.google.android.apps.pixel.health, PID: 2225
1706269656.685  2225  2225 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.apps.pixel.health.thermometer.featureprovider.FeatureContentProvider: java.lang.SecurityException: Permission denial: reading from settings requires:android.permission.READ_DEVICE_CONFIG
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:7872)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7378)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7073)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2268)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:205)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:294)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8279)
1706269656.685  2225  2225 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
1706269656.685  2225  2225 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
1706269656.685  2225  2225 E AndroidRuntime: 	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
1706269656.685  2225  2225 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
1706269656.685  2225  2225 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
1706269656.685  2225  2225 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission denial: reading from settings requires:android.permission.READ_DEVICE_CONFIG
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.Settings$Config.enforceReadPermission(Settings.java:19486)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.Settings$NameValueCache.getStringsForPrefix(Settings.java:3516)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.Settings$Config.getStrings(Settings.java:19198)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.Settings$Config.getStrings(Settings.java:19175)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.DeviceConfig.getProperties(DeviceConfig.java:1070)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.DeviceConfig.getProperty(DeviceConfig.java:1043)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.provider.DeviceConfig.getBoolean(DeviceConfig.java:1114)
1706269656.685  2225  2225 E AndroidRuntime: 	at blw.<init>(PG:3)
1706269656.685  2225  2225 E AndroidRuntime: 	at bov.a(PG:8)
1706269656.685  2225  2225 E AndroidRuntime: 	at cng.a(PG:1)
1706269656.685  2225  2225 E AndroidRuntime: 	at bgx.a(PG:1)
1706269656.685  2225  2225 E AndroidRuntime: 	at com.google.android.apps.pixel.health.thermometer.featureprovider.FeatureContentProvider.onCreate(PG:4)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:2619)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:2589)
1706269656.685  2225  2225 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:7867)
1706269656.685  2225  2225 E AndroidRuntime: 	... 13 more
--------- switch to main
1706269656.869  2336  2336 E ps.pixel.health: Not starting debugger since process cannot load the jdwp agent.
1706269656.955  2336  2336 E cutils-trace: Error opening trace file: No such file or directory (2)
1706269657.065  2336  2336 E com.google.android.apps.pixel.health: Unable to find pattern file or unable to map it for am
--------- switch to crash
1706269657.144  2336  2336 E AndroidRuntime: FATAL EXCEPTION: main
1706269657.144  2336  2336 E AndroidRuntime: Process: com.google.android.apps.pixel.health, PID: 2336
1706269657.144  2336  2336 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.apps.pixel.health.thermometer.featureprovider.FeatureContentProvider: java.lang.SecurityException: Permission denial: reading from settings requires:android.permission.READ_DEVICE_CONFIG
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:7872)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:7378)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7073)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2268)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:205)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:294)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8279)
1706269657.144  2336  2336 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
1706269657.144  2336  2336 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
1706269657.144  2336  2336 E AndroidRuntime: 	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
1706269657.144  2336  2336 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
1706269657.144  2336  2336 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
1706269657.144  2336  2336 E AndroidRuntime: Caused by: java.lang.SecurityException: Permission denial: reading from settings requires:android.permission.READ_DEVICE_CONFIG
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.Settings$Config.enforceReadPermission(Settings.java:19486)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.Settings$NameValueCache.getStringsForPrefix(Settings.java:3516)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.Settings$Config.getStrings(Settings.java:19198)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.Settings$Config.getStrings(Settings.java:19175)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.DeviceConfig.getProperties(DeviceConfig.java:1070)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.DeviceConfig.getProperty(DeviceConfig.java:1043)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.provider.DeviceConfig.getBoolean(DeviceConfig.java:1114)
1706269657.144  2336  2336 E AndroidRuntime: 	at blw.<init>(PG:3)
1706269657.144  2336  2336 E AndroidRuntime: 	at bov.a(PG:8)
1706269657.144  2336  2336 E AndroidRuntime: 	at cng.a(PG:1)
1706269657.144  2336  2336 E AndroidRuntime: 	at bgx.a(PG:1)
1706269657.144  2336  2336 E AndroidRuntime: 	at com.google.android.apps.pixel.health.thermometer.featureprovider.FeatureContentProvider.onCreate(PG:4)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:2619)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:2589)
1706269657.144  2336  2336 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:7867)
1706269657.144  2336  2336 E AndroidRuntime: 	... 13 more

jonas-w avatar Jan 26 '24 11:01 jonas-w

Will this issue ever get fixed? I mean... it's kinda a useless feature most of the time, but I've once needed to get a chipset temperature for my job but didn't carry my thermometer with me, and realised that the temp sensor didn't work on my p8p. It could have been a very useful feature in rare cases when I don't have a thermometer with me

minhng99 avatar Feb 24 '24 02:02 minhng99

I'm willing to take a crack at solving this if someone can suggest a starting point!

MichaByte avatar Apr 05 '24 17:04 MichaByte

Thanks @MichaByte Maybe the xda post in my comment above can give you a direction?

https://github.com/GrapheneOS/os-issue-tracker/issues/2563#issuecomment-1897528579

jonas-w avatar Apr 05 '24 17:04 jonas-w

Sure thing @jonas-w! I looked at that post. The TL;DR is that the app needs to either be installed as a system app (needs either root or OS modification, both would compromise security) or just the permission com.google.sensor.permission.FAR_INFRARED_TEMPERATURE. Not sure where to start with this, and I'm not the best programmer, but I'm willing to try if I know where to look.

MichaByte avatar Apr 05 '24 17:04 MichaByte

Trying to give the permission manually via adb also won't work. "Not changable permission type" yea well, I guess it's not gonna happen

KyrillGobber avatar Apr 06 '24 10:04 KyrillGobber