Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Freeze on Android 6.0.1 #2

Closed
breversa opened this issue Dec 18, 2017 · 15 comments
Closed

[SOLVED] Freeze on Android 6.0.1 #2

breversa opened this issue Dec 18, 2017 · 15 comments

Comments

@breversa
Copy link

breversa commented Dec 18, 2017

Hi !

When I install Déjà Vu Location Service 1.0.2 from F-Droid on my LG G4/H815 running LineageOS 13/Android 6.0.1, my phone freezes as soon as I activate the backend in MicroG UnifiedNlp settings. After about two minutes, the phone will reboot and freeze again as soon as it has finished booting. Same if I reboot it beforehand.

I need to reboot to recovery (e.g. with adb reboot recovery) and delete /data/app/org.fitchfamily.android.dejavu for my phone to stop freezing.

@n76
Copy link
Owner

n76 commented Dec 18, 2017

Freeze meaning only the UI unresponsive or meaning totally dead? When that condition existed was it possible to connect with ADB and get a logcat? On reboot after deleting the app was there anything in dmsg or elsewhere that can give a clue to what was happening?

Without more information, and being unable to duplicate, it will be difficult to determine the cause.

@breversa
Copy link
Author

I'm running more tests right now : only the UI is frozen.

I can adb shell logcat just fine. Anything in particular I should be looking for ?

@breversa
Copy link
Author

Found something !
Just before the phone reboots, the logcat spits out this :

12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper: java.lang.NullPointerException: Attempt to invoke interface method 'android.os.Messenger android.net.wifi.IWifiManager.getWifiServiceMessenger()' on a null object reference
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1626)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1573)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.api.LocationBackend$Stub$Proxy.update(LocationBackend.java:158)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.update(BackendHelper.java:71)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.onServiceConnected(BackendHelper.java:135)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1224)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1241)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.os.Handler.handleCallback(Handler.java:739)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.os.Handler.dispatchMessage(Handler.java:95)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.os.Looper.loop(Looper.java:148)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at android.app.ActivityThread.main(ActivityThread.java:5461)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at java.lang.reflect.Method.invoke(Native Method)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-18 18:14:30.418 30129 30129 W NlpLocBackendHelper:   at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
12-18 18:14:30.418 30129 30129 D NlpLocBackendHelper: Unbinding from: Intent { act=org.microg.nlp.LOCATION_BACKEND pkg=org.fitchfamily.android.dejavu cmp=org.fitchfamily.android.dejavu/.BackendService }
12-18 18:14:30.419 31405 31660 D DejaVu Backend: onClose()
12-18 18:14:30.419 30191 30191 D AndroidRuntime: Shutting down VM
12-18 18:14:30.419 30191 30191 E AndroidRuntime: Error reporting crash
12-18 18:14:30.419 30191 30191 E AndroidRuntime: android.os.DeadObjectException
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at android.os.BinderProxy.transactNative(Native Method)
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at android.os.BinderProxy.transact(Binder.java:503)
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at android.app.ActivityManagerProxy.getConfiguration(ActivityManagerNative.java:3969)
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:88)
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
12-18 18:14:30.419 30191 30191 E AndroidRuntime:        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
12-18 18:14:30.419 30191 30191 I Process : Sending signal. PID: 30191 SIG: 9
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper: java.lang.IllegalArgumentException: Receiver not registered: org.fitchfamily.android.dejavu.BackendService$1@3712dac
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1624)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1573)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.api.LocationBackend$Stub$Proxy.close(LocationBackend.java:179)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.close(BackendHelper.java:119)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.AbstractBackendHelper.unbind(AbstractBackendHelper.java:66)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.update(BackendHelper.java:78)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.onServiceConnected(BackendHelper.java:135)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1224)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1241)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.os.Handler.handleCallback(Handler.java:739)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.os.Handler.dispatchMessage(Handler.java:95)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.os.Looper.loop(Looper.java:148)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at android.app.ActivityThread.main(ActivityThread.java:5461)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at java.lang.reflect.Method.invoke(Native Method)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-18 18:14:30.423 30129 30129 W NlpLocBackendHelper:   at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)

@breversa
Copy link
Author

breversa commented Dec 18, 2017

Also, this :

12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper: java.lang.SecurityException: getAllCellInfo: Neither user 10139 nor current process has android.permission.ACCESS_COARSE_LOCATION.
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1620)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at android.os.Parcel.readException(Parcel.java:1573)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at org.microg.nlp.api.LocationBackend$Stub$Proxy.update(LocationBackend.java:158)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendHelper.update(BackendHelper.java:71)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at org.microg.nlp.location.BackendFuser.update(BackendFuser.java:83)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at org.microg.nlp.location.ThreadHelper.run(ThreadHelper.java:73)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:278)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:270)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
12-18 18:17:52.822  3252  5580 W NlpLocBackendHelper:   at java.lang.Thread.run(Thread.java:818)
12-18 18:17:52.823  3252  5580 D NlpLocBackendHelper: Unbinding from: Intent { act=org.microg.nlp.LOCATION_BACKEND pkg=org.microg.nlp.backend.ichnaea cmp=org.microg.nlp.backend.ichnaea/.BackendService }
12-18 18:17:52.829  3252  3264 V NlpLocationProvider: onSetRequest: ProviderRequest[ON interval=+24h0m0s0ms] by WorkSource{1000 android}
12-18 18:17:52.829  3252  3264 V NlpLocationProvider: using autoUpdate=true autoTime=86400000

and

12-18 18:20:03.754  6694  6694 W PackageManager: Not granting permission android.permission.ACCESS_COARSE_LOCATION to package org.fitchfamily.android.dejavu because it was previously installed without
12-18 18:20:03.754  6694  6694 W PackageManager: Not granting permission android.permission.ACCESS_FINE_LOCATION to package org.fitchfamily.android.dejavu because it was previously installed without

I guess the UI gets caught in something when trying to display LineageOS' Privacy Guard or Android window requesting access to my location.

@n76
Copy link
Owner

n76 commented Dec 18, 2017

Looks like when the backend was selected in the microG settings it was not given the permissions it asked for.

I think you are in a "catch-22" situation here as you will need the UI to grant permissions but the UI is not available to you. I think you can get out of this by:

  1. Uninstalling the back end via ADB
  2. Rebooting
  3. Selecting some other backend in microG (just to insure its settings are cleared up)
  4. Reinstall the Déjá Vu back end being sure to grant permissions when you select it in microG.

I thought I'd properly coded the back end to fail in a soft way when it was not granted permissions but it seems not from your logcat snippets. I'll investigate further.

@n76 n76 closed this as completed in 30c480e Dec 18, 2017
@n76
Copy link
Owner

n76 commented Dec 18, 2017

In addition to request to permission on initial setup, added checks that permissions were actually granted in various places to avoid crashing microG.

@breversa
Copy link
Author

Thank you for your reply. I'll wait for a newer release to pop up on F-Droid and give it another try. I'm pretty satisfied with the behaviour on Android 7 devices. :-)

BTW, I understand that Déjà Vu allows to "remember" where I've been, but I also use your other LocalGSMBackend for coarse location where I haven't been (yet), by downloading the cells database in advance.
Do both backends risk conflicting with each other or not ?

@n76
Copy link
Owner

n76 commented Dec 20, 2017

There is no conflict using multiple backends: It appears that UnifiedNlp/microG uses the location that reports the best accuracy.

@breversa
Copy link
Author

That's what I thought. Thank you for your confirmation.

@breversa
Copy link
Author

breversa commented Dec 28, 2017

@n76 :
I followed your previous instructions, with Déjà Vu 1.0.4 (latest version available on F-Droid as of today), with LineageOS Privacy Guard NOT enabled for that app, to no avail… :-(

My guess is that Déjà Vu locks because of that :

12-18 18:20:03.754  6694  6694 W PackageManager: Not granting permission android.permission.ACCESS_COARSE_LOCATION to package org.fitchfamily.android.dejavu because it was previously installed without
12-18 18:20:03.754  6694  6694 W PackageManager: Not granting permission android.permission.ACCESS_FINE_LOCATION to package org.fitchfamily.android.dejavu because it was previously installed without

Since permissions were previously refused (How ? When ? No idea…), they seem not to be asked again. Is there any way to make Android forget about that ?

EDIT :
I had a quick look at your code (30c480e), and read that the permissions handling is done by MicroG/UnifiedNlp. FWIW, I'm using 1.6.8

@ale5000-git
Copy link

@breversa: Try to disable the backend and press OK, then re-enable the backend and press OK.
It should re-ask for permissions.

@breversa
Copy link
Author

I just did it, but sadly it doesn't change a thing.
Also, I haven't met that issue with devices running Android 7.0.1 (Samsung Galaxy S4 and Tab 3 ; LG G4).

@ale5000-git
Copy link

@breversa: Have you tried to re-install it directly from the apk here (without uninstalling it)?

@breversa
Copy link
Author

Same, no luck. :-(

I also tried the following, with the same result :

  • Uninstall Déjà Vu with adb (in the short time before reboot and freeze) : adb shell pm uninstall org.fitchfamily.android.dejavu
  • Install Déjà Vu, manually allow location permission (in Settings/Applications), then activate the backend in MicroG/UnifiedNlp

@breversa
Copy link
Author

breversa commented Dec 28, 2017

SOLVED ! :-D

This seems to be a LineageOS 13 issue : I had Settings/Privacy/Data protection turned on by default, and it prompts another location permission window, usually after Android's.

And sometimes, for some reason, that LineageOS permission window might get stuck under another UI element, while blocking all screen interaction until it's been answered ("catch-22", for english speakers, like @n76 said). From what I understand, this issue has been solved in LineageOS 14.

I solved the issue by doing the following :

  • Install Déjà Vu
  • Go to Setting/Privacy/Data protection
  • Long-tap on Déjà Vu in the app list
  • Allow "Coarse location" and "Wifi search"
  • Go to MicroG/UnifieldNlp settings
  • Activate Déjà Vu backend
  • Give location permission when asked by Android

@breversa breversa changed the title Freeze on Android 6.0.1 [SOLVED] Freeze on Android 6.0.1 Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants