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
Applying filters fails often, hangs daemonsu #492
Comments
I find that adaway has a dozen or so entries in the SuperSU logs for when it automatically applies filters, so I'm not sure if this is related or is harmless but I don't see any other apps which appear to request root that many times at once or in a row. |
This happens for me with SuperSU 1.86, AdAway 2.8, Stock KitKat 4.4.2 on both my Nexus 5 and Nexus 10. It doesn't happen every day, but when it does it looks like this:
|
I recently re-created this bug and here's a relevant section of the logs: E/AndroidRuntime( 3214): FATAL EXCEPTION: IntentService[AdAwayApplyService] E/AndroidRuntime( 3214): Process: org.adaway, PID: 3214 E/AndroidRuntime( 3214): java.lang.RuntimeException: org.sufficientlysecure.rootcommands.util.RootAccessDeniedException: stdout line is null! Access was denied or this executeable is not a shell! E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Remounter.findMountPointRecursive(Remounter.java:144) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Remounter.remount(Remounter.java:115) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Toolbox.remount(Toolbox.java:733) E/AndroidRuntime( 3214): at org.adaway.util.ApplyUtils.copyHostsFile(ApplyUtils.java:195) E/AndroidRuntime( 3214): at org.adaway.service.ApplyService.apply(ApplyService.java:399) E/AndroidRuntime( 3214): at org.adaway.service.ApplyService.doWakefulWork(ApplyService.java:100) E/AndroidRuntime( 3214): at com.commonsware.cwac.wakeful.WakefulIntentService.onHandleIntent(WakefulIntentService.java:100) E/AndroidRuntime( 3214): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) E/AndroidRuntime( 3214): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 3214): at android.os.Looper.loop(Looper.java:136) E/AndroidRuntime( 3214): at android.os.HandlerThread.run(HandlerThread.java:61) E/AndroidRuntime( 3214): Caused by: org.sufficientlysecure.rootcommands.util.RootAccessDeniedException: stdout line is null! Access was denied or this executeable is not a shell! E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Shell.(Shell.java:147) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Shell.startRootShell(Shell.java:62) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Shell.startRootShell(Shell.java:74) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Remounter.getMounts(Remounter.java:166) E/AndroidRuntime( 3214): at org.sufficientlysecure.rootcommands.Remounter.findMountPointRecursive(Remounter.java:134) E/AndroidRuntime( 3214): ... 10 more |
Probably related to #476. |
If I understand #476 correctly, it's that the hosts file changes are not being used by the OS. This issue seems to be about failures to change the hosts file, so I don't think they're related. |
had the hosts update problem since 4.4.0 (now on 4.4.2). can confirm the daemonsu hanging process(es) killing my battery. also seeing lots of adaway supersu requests. |
This issue is not directly caused by AdAway but by the library "RootCommands" used by it. I fixed the issue for myself by replacing the code in that function with something that opens an unrelated root shell independent of the RootCommands library. It's a lazy fix, but i really did not want to dive into the RootCommands library to find the underlying issue. Sorry. The code: I don't know whether this works for you, but you can try if you want. |
Thank you. Since there are few official updates, a hacked and temporary fix Note to others: because the apk signature is different, the official app |
Just wanted to chime in to say that d4rken's release fixes this issue for me, too. I'm really grateful for the generous community support and I hope this fix gets rolled into future official releases! |
Patch also works on a stock 4.3 Galaxy Nexus rooted with SuperSU. |
Patch worked on Samsung Galaxy s4 on 4.4.2 |
The fix seems to work well for me on CyanogenMod 11 on my LG G2 d800. Please merge. |
Upgrading vom CM 10.x to CM 11 works perfect Only problem is if CM11 is the first installation |
Patch worked on N4, Paranoid Android, SuperSu |
Patched version worked on N4, 4.4.2, CM11-M3. Cheers! |
Hello @d4rken , i'm facing the problem you seem to have fixed on your fork, did you tried to send a pull request on your fix ? It would be nice to have your fix merged. |
@Magissia No i didn't. I don't consider the change i made as something that should be merged. It was a workaround not the real solution. As far as i could see the issue was not with AdAway but with the root library being used. It replaced a call to the root library with a custom root call. The clean solution would be to fix the underlying issue in the root library or replace every use of the library with something different. |
@d4rken Someone reported the problem on library's issue tracker ? (seems not on my side, worth double checking in case i didn't checked at the correct place https://github.com/dschuermann/superuser-commands/issues ) |
@Magissia Did now , :p Free-Software-for-Android/RootCommands#23 |
Same issue on LG G Pad 8.3, Samsung Galaxy S4 and Notes2 (all running stock 4.4.2). While I understand that the issue is not with the app itself and the hack fixes an external lib, the reality is that if the underlying lib is not going to be fixed, AdAway is broken in its official version with many recent Android releases. I did the mount myself to ln -s from /data/data/hosts but it would be cleaner to have a working app in the first place . Thanks anyway for this must-have apk! |
Can someone build a 2.8.1 version with this temporary fix? Seems like I have the same issue on my Motorola DRIOD Maxx with KitKat 4.4. |
Latest AdAway patched build can be downloaded from XDA: It looks like everybody using SuperSU instead of Superuser (independent of the phone make and model) needs the patched build. |
@Condor70 thanks for the analysis. |
the one uploaded to XDA: links to a file that is ~300kbps which is too small: |
Updated version works like a charm for a couple of month already. This should be integrated to the main branch. |
are you talking about the regular 2.8.1? |
I'm about modified version of adaway. Both original 2.8 and 2.8.1 did not update my hosts file properly and hang every now and than on update while patched versions from this thread work flawlessly. |
could someone reupload 2.8.1 modified version or is this link correct? http://d-h.st/lZ4 |
It's more complicated than that, let's be patient |
After a change from SuperSU to Superuser, the original pp works fine. So maybe the problem is SuperSU. |
I'm going to say that's not the case and I believe it's already been Unfortunately this is an issue with adaway. Someone graciously posted a
|
Apologies, the issue isn't with adaway directly, it's with the root library adaway uses for root access (my first response was via email so I hadn't looked back at the contents). To better explain; Adaway -> root library (RootCommands) -> su binary -> su app The su binary and su app are usuals bundled together and maintained by one person (like chainfire, koush, or chainsdd). So this leaves the adaway Dev with two options; fix the RootCommands library being used by adaway, or stop using RootCommands all together and rewrite adaway to use another method of calling the su binary. For those reading this that have more direct knowledge of the situation, I apologize if I've butchered anything, this is my basic understanding of the situation from the outside. |
@nemchik that is correct. |
This may be fixed by pull request #536 |
Can somebody who had this issue verify that it is fixed in AdAway 2.9? |
Please check issue #476 |
On a Galaxy S3 running CM 10.2, with SuperSU 1.80, Adaway 2.8 often fails to apply filter changes (after successfully downloading the various files). When it does, it leaves one of the daemonsu:nnnnn processes in such a state that the process consumes 100% of one core and keeps the CPU awake, running down the battery.
What sort of logs should I provide so that you can investigate and fix the issue?
The text was updated successfully, but these errors were encountered: