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

Config of search paths for databases fails #313

Closed
elhennig opened this Issue Mar 1, 2016 · 15 comments

Comments

2 participants
@elhennig

elhennig commented Mar 1, 2016

Selecting the directories where SDmaid searches for databases does not work for me. There is no way to choose the directories or navigate somewhere else than /sdcard

I am using the 4007 beta of SDmaid on CM13 on my Samsung S5 mini.

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

Does SD Maid have root access?

What specifically prevents you from choosing other locations? Maybe you can show me some screenshots?

@elhennig

This comment has been minimized.

elhennig commented Mar 1, 2016

Yes, it does have root access!

If I choose Settings - Databases - Search Locations I see the one directory already beeing configured. When I press the + button on the bottom I get to a mask where I should be able to choose other locations. The mask shows "/ storage emulated 0" (all selectable). If I choose new and add the additional directory there an error comes up "invalid input"
Maybe I only do something wrong there...

@elhennig elhennig closed this Mar 1, 2016

@elhennig elhennig reopened this Mar 1, 2016

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

The new button in the top right is to create a new directory.
You would i.e. tap "/", then click "data" and use the right hand checkboxes to select new locations, once you selected at least one, you can use the green + (FAB) button to add it.

I'll deactivate the new folder button here, it doesn't make much sense.

@d4rken d4rken added the question label Mar 1, 2016

@elhennig

This comment has been minimized.

elhennig commented Mar 1, 2016

If i tab "/" I do not see any dir to select...
So I tried deleting all data of SDmaid and start from scratch. I managed to go one step ahead. As I needed to allow the access to the sdcard and external SD I have now two oaths in the search path for databases. The problem stll remains with /data and also when I remove one path and try to add it again: There is nothing to choose from...

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

"/" shouldn't be empty. If you use SD Maids Explorer and browse to "/", is it also empty?
Can you start a debug run (advanced settings) and record this happening?
I have an N7 here with CM12 where this doesn't seem to happen.

@elhennig

This comment has been minimized.

elhennig commented Mar 1, 2016

The explorer seems to work fine.
I think this is related to the stupid permission changes in MM.
Where will the debug file be stored?

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

sdcard/Android/data/eu.thedarken.sdm/files/logfiles/

The path will also be listed in Overview>SDMaid

@elhennig

This comment has been minimized.

elhennig commented Mar 1, 2016

Thanks, here is the log (the behaviour is the same for the configuration of search duplicates
sdmaid_logfile_1456847270381.txt

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

The issue comes from this:

V/SDM:StreamHarvester: Error:xargs: /data/user/0/eu.thedarken.sdm/files/busybox: Permission denied

While this in itself is not fatal, it is a problem because during testing SD Maid thought this works!

I/SDM:BusyboxInstaller: Testing /data/user/0/eu.thedarken.sdm/files/busybox [Type:INTERNAL] testWithRoot:true
1456847278063 V/SDM:Shell:StaticExecutor: SHELLDELAY:100
1456847278063 V/SDM:Shell:StaticExecutor: trying to execute as root
1456847278200 V/SDM:Shell:StaticExecutor: $BUSYBOX find \/data -maxdepth 0  -print0 | $BUSYBOX xargs -0 $BUSYBOX stat -c "%a:%F:%d:%i:%u:%g:%s:%Z:%N"
1456847278264 V/SDM:StreamHarvester: Error:xargs: /data/user/0/eu.thedarken.sdm/files/busybox: Permission denied
1456847278276 V/SDM:Shell:StaticExecutor: Exitcode: 0
1456847278277 V/SDM:Shell:StaticExecutor: Destroying Executor
1456847278278 I/SDM:BusyboxInstaller: Works (withRoot:true):'/data/user/0/eu.thedarken.sdm/files/busybox'

Normaly xargs failing on that location is a phenomen on Samsung devices because KNOX blocks xargs from forking. I'm not sure why this would happen on CM13.

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

Can't reproduce it on my N7 with an unofficial CM13 build.

If you revoke and deny SD Maid root permission, how does SD Maid behave then?
Even without root you should be able to load "/".

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 1, 2016

According to the log SELinux is also disabled, currently I would put the ROM or it's superuser install at fault.

I'm still looking into why SD Maids fallback solution did not kick in, while this should not be necessary on this ROM, it's a bug nonetheless.

@elhennig

This comment has been minimized.

elhennig commented Mar 2, 2016

Without root access it works, the configuration is saved. Of course I am not able to add /data/data (but at least /data).
Giving SDmaid root access again, the search for databases does not find any dbs.

Root is stock implementation from CM13 für the SM-G800F

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 2, 2016

The permission denied issue seems to be an issue with your ROM. I can't fix that, but I have ammended SD Maids busybox test and in the next update it should attempt a fallback solution.

@d4rken d4rken closed this Mar 3, 2016

@elhennig

This comment has been minimized.

elhennig commented Mar 3, 2016

Thanks a lot for analysing this problem.
I installed SuperSU now and everything works now with SDmaid!
:-)

@d4rken

This comment has been minimized.

Owner

d4rken commented Mar 4, 2016

FYI: I could just reproduce the same symptoms and it was caused by SD Maid being disallowed root without completely restarting SD Maid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment