[G3 Android Development] AlwaysLucky:
Bluetooth Car Issues

Hey all. I was having trouble making and receiving calls from my car via Bluetooth, and as it turns out, it's a specific problem associated with Nougat 7.1.1. The good news, is that Google apparently has fixed the issue in Nougat 7.1.2, according to Nexus owners who downloaded the 7.1.2 beta:

https://productforums.google.com/forum/#!topic/nexus/DXBGo6r3t_k

And if anyone is curious what I get in the log when pairing, I attached it.

05-18 12:19:51.282 8474-8474/? W/n.ACL_CONNECTED: type=1400 audit(0.0:46): avc: denied { getattr } for path="/data/data/com.google.android.gms/databases/carservicedata.db-journal" dev="mmcblk0p43" ino=884354 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
05-18 12:19:51.285 8474-8474/? W/n.ACL_CONNECTED: type=1400 audit(0.0:48): avc: denied { getattr } for path="/data/data/com.google.android.gms/databases/carservicedata.db-journal" dev="mmcblk0p43" ino=884354 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
05-18 12:19:51.285 5035-8474/com.google.android.gms E/SQLiteLog: (2570) os_unix.c:32584: (13) unlink(/data/user/0/com.google.android.gms/databases/carservicedata.db-journal) -
05-18 12:19:51.291 5035-8474/com.google.android.gms E/SQLiteLog: (2570) os_unix.c:32584: (13) unlink(/data/user/0/com.google.android.gms/databases/carservicedata.db-journal) -
05-18 12:19:51.291 5035-8474/com.google.android.gms E/SQLiteLog: (14) cannot open file at line 32456 of [bda77dda96]
05-18 12:19:51.291 5035-8474/com.google.android.gms E/SQLiteLog: (14) os_unix.c:32456: (13) open(/data/user/0/com.google.android.gms/databases/carservicedata.db-journal) -
05-18 12:19:51.291 5035-8474/com.google.android.gms E/SQLiteLog: (14) statement aborts at 32: [CREATE TABLE IF NOT EXISTS android_metadata (locale TEXT)] unable to open database file
05-18 12:19:51.295 8474-8474/? W/n.ACL_CONNECTED: type=1400 audit(0.0:50): avc: denied { getattr } for path="/data/data/com.google.android.gms/databases/carservicedata.db-journal" dev="mmcblk0p43" ino=884354 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
05-18 12:19:51.295 8474-8474/? W/n.ACL_CONNECTED: type=1400 audit(0.0:51): avc: denied { getattr } for path="/data/data/com.google.android.gms/databases/carservicedata.db-journal" dev="mmcblk0p43" ino=884354 scontext=u:r:priv_app:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
05-18 12:19:51.295 5035-8474/com.google.android.gms E/SQLiteDatabase: Failed to open database '/data/user/0/com.google.android.gms/databases/carservicedata.db'.
android.database.sqlite.SQLiteException: Failed to change locale for db '/data/user/0/com.google.android.gms/databases/carservicedata.db' to 'en_US'.
at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:393)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:652)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
at hun.b(:com.google.android.gms:281)
at com.google.android.gms.carsetup.CarBluetoothReceiverOperation.onHandleIntent(:com.google.android.gms:27)
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms:118)
at byv.run(:com.google.android.gms:1864)
at bys.run(:com.google.android.gms:1143)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:371)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)*
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)*
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)*
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)*
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)*
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)*
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)*
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)*
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:652)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)*
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)*
at hun.b(:com.google.android.gms:281)*
at com.google.android.gms.carsetup.CarBluetoothReceiverOperation.onHandleIntent(:com.google.android.gms:27)*
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms:118)*
at byv.run(:com.google.android.gms:1864)*
at bys.run(:com.google.android.gms:1143)*
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)*
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)*
at java.lang.Thread.run(Thread.java:761)*
05-18 12:19:51.297 5035-8474/com.google.android.gms E/SQLiteOpenHelper: Couldn't open carservicedata.db for writing (will try read-only):
android.database.sqlite.SQLiteException: Failed to change locale for db '/data/user/0/com.google.android.gms/databases/carservicedata.db' to 'en_US'.
at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:393)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:652)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
at hun.b(:com.google.android.gms:281)
at com.google.android.gms.carsetup.CarBluetoothReceiverOperation.onHandleIntent(:com.google.android.gms:27)
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms:118)
at byv.run(:com.google.android.gms:1864)
at bys.run(:com.google.android.gms:1143)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration(SQLiteConnection.java:371)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)*
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)*
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)*
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)*
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)*
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)*
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)*
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)*
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:652)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:289)*
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)*
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)*
at hun.b(:com.google.android.gms:281)*
at com.google.android.gms.carsetup.CarBluetoothReceiverOperation.onHandleIntent(:com.google.android.gms:27)*
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms:118)*
at byv.run(:com.google.android.gms:1864)*
at bys.run(:com.google.android.gms:1143)*
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)*
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)*
at java.lang.Thread.run(Thread.java:761)*
05-18 12:19:51.342 5035-8474/com.google.android.gms I/GCore-Chimera-Crash: Cg8KCWNvbnRhaW5lchCs7T4aXwodY29tLmdvb2dsZS5hbmRyb2
lkLnBsYXkuZ2FtZXMSFDMuOS4wOCAoMzQ0ODI3MS0wMzApGN6g
0RIiIwocY29tLmdvb2dsZS5hbmRyb2lkLmdtcy5nYW1lcxDAoN
ES
GCore-Chimera-Crash
05-18 12:19:51.349 5035-8474/com.google.android.gms I/DeviceDrDatabaseHelper: Cleaning stale data from database!
05-18 12:19:51.375 5035-8474/com.google.android.gms W/DeviceDoctorHandler: Crash Hash: c19bcd632e6f8da71346bd0e362c29bccc324c51
05-18 12:19:51.376 5035-8474/com.google.android.gms I/DeviceDoctorHandler: Not shushing crash since a loop has been detected.
05-18 12:19:51.385 5035-8474/com.google.android.gms E/AndroidRuntime: FATAL EXCEPTION: [bys] processing com.google.android.gms.carsetup.CarBluetoothReceiverOperation for action android.bluetooth.device.action.ACL_CONNECTED
Process: com.google.android.gms, PID: 5035
android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 10: carservicedata.db
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:244)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
at hun.b(:com.google.android.gms:281)
at com.google.android.gms.carsetup.CarBluetoothReceiverOperation.onHandleIntent(:com.google.android.gms:27)
at com.google.android.chimera.IntentOperation.onHandleIntent(:com.google.android.gms:118)
at byv.run(:com.google.android.gms:1864)
at bys.run(:com.google.android.gms:1143)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
05-18 12:19:51.396 6104-6104/projekt.substratum E/AppCrashReceiver: com.google.android.gms stopped unexpectedly...
05-18 12:19:51.396 6104-6104/projekt.substratum E/AppCrashReceiver: com.google.android.gms stopped unexpectedly...

I tried changing permissions to the 'carservicedata.db' which appeared to be the issue, but no luck there. I will have to wait until 7.1.2 is released I suppose...

EDIT: I just installed the latest nightly for my LS990 and it DOES say 7.1.2! So AICP is on 7.1.2 and I'm still having this issue. Hopefully the log can help devs resolve it? And I guess the OP should be updated? Still love the ROM btw.