yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Dark3n:
v4.8.1 fixes a few issues: https://github.com/d4rken/sdmaid-public/blob/master/CHANGELOG.md
[Android Apps and Games] Oswald Boelcke:
Had already no issues with v4.8.0 but 4.8.1 is running fine as well. Nothing to report.

Sounds like a good plan; great idea. Fine with me.
[Android Apps and Games] ogisha:
After I start 4.8.0/4.8.1 it asks me to grant permission for internal sdcard.

It does not access to my external sdcard anymore.

System cleaner finds zero items.

Databases' optimiser reports there are no databases on my system.

When I revert to 4.7.6 it asks me to grant permission for external sdcard only. It finds and cleans everything.

Device:

Huawei P9 L09C432B386, Nougat 7.0.0.
[Android Apps and Games] Dark3n:
[MENTION=4657522]ogisha[/MENTION] please record a debug log while loading the overview tool (and completing the setup).

https://github.com/d4rken/sdmaid-public/wiki/Reporting-a-bug#debugrun-log
[Android Apps and Games] Oswald Boelcke:
Did you try to manually add the external SD via settings?

Settings => General settings => Advanced settings => Storage access => Add => (should show SDCARD1, click on it) then click on "select" (which is "Auswählen" in my screenshot). Afterwards it should show that the external SD was added, which bears the name "5661-150B" in my case.
[Android Apps and Games] Dark3n:
Shouldn't be required though, SD Maid needs to show this during setup if it is necessary.

Between v4.7.6 and v4.8.1 this was affected by https://github.com/d4rken/sdmaid-public/issues/1116.

I did a quick diff on the code but couldn't spot anything that would explain this.
[Android Apps and Games] Oswald Boelcke:
Concur. It wasn't required for me. However,...

EDIT (2017-10-01): v4.8.3 is running perfectly and as advertised. :good:
[Android Apps and Games] Dark3n:
The latest is currently v4.8.3:

https://github.com/d4rken/sdmaid-public/blob/master/CHANGELOG.md

v4.8.1 to v4.8.3 were mostly tweaks and bugfixes for changes introduced in v4.8.0.

Based on reports and metrics it's all looking well.

There are some rare crashs originating from the StorageAnalyzer that I can't reproduce. This isn't new to v4.8.0+.

The crash is caused by SD Maid not finding parents, i.e. we have `/A/B/C` and we found and are processing C, but when we try to find B to link to get our storage tree, then B isn't found...

If someone manages to regularly crash the StorageAnalyzer please speak up :).

I plan to move v4.8.3 into rollout later today.
[Android Apps and Games] ogisha:
I am having the same problems with 4.8.3.

Currently, I am very busy with my work. As soon as I get more spare time I will do some further tests and pull some logs.
[Android Apps and Games] Dark3n:
v4.8.3 is now rolled out to production. Currently approaching 200k installs without any major issue.

A few crashes here and there, but with <10 out of 200k it could also just be buggy ROMs, Xposed or gremlins.
[Android Apps and Games] Thebear j koss:
No logs, it never happened.
[Android Apps and Games] KatayHan:
Is there an option to backup settings?

Because after each rom or gapps update, I uninstall tons of apps and finding them among all other apps is pain in the arse. So that "exclude" options made me save a lot of time.

But what if it's inevitable to reinstall SD Maid. What then? :)

I'd like to save that excluded apps list.
[Android Apps and Games] patrickdrd:
don't you use titanium?
[Android Apps and Games] Dark3n:
You can long press, select all and export exclusions.

Same goes for custom filters.

The rest of the settings can't be exported currently.

Titanium Backup would work well too.
[Android Apps and Games] IronTechmonkey:
Question about a new behavior since Playstore update to 4.8.3 (40803)

On LOS 14.1/N 7.1.2 w/LOS SU, after installing SD Maid 4.8.3, the CorpseFinder started detecting some items that seem necessary to some apps and live in the following directories on SDcard (/storage/emulated/0): .DataStorage, .antutu, .UTSystemConfig, matlog, osmdroid.

In Settings > CorpseFinder > /sdcard/ Public app data outside of standard directories: was enabled, and disabling it prevented those directories from being detected (as it had been before).

It makes sense that the listed items which had not previously been detected would be detected with that setting enabled, and the CorpseFinder items in the changelog do seem related to this, but is it expected or desirable behavior to have Settings > CorpseFinder > /sdcard/ enabled by default or become enabled through an update where it was previously disabled.

[EDIT] On a similarly configured device running an SDMaid 4.7.6 that setting is enabled but the same items are not detected - to the point the CorpseFinder improvements mentioned in the changelog. So, the setting remaining enabled though the update was expected and it's just a matter of user adjustment. That is fair enough and worth better the detection, although some folks who are not paying attention may loose logcats and other things. Thanks for the update!
[Android Apps and Games] Dark3n:
If the corresponding app is still installed, then these are false positive results. Please report them from inside SD Maid, so I can fix it.

From the top of my head, the changes between v4.7.6 and v4.8.3 should not have affected the directories you named though...
[Android Apps and Games] IronTechmonkey:
Done for Matlog, and BTW SDMaid's internal logging UI is as highly polished as the main app. Nice.

FWIW, there may (or may not) be a complicating factor in regards to this particular detection: Matlog is a continuation of the older and widely used catlog app, now maintained by a different developer. Matlog previously used used the old catlog location for its saved logs directory /storage/emulated/0/catlog/saved_logs, and then a few months ago switched to /storage/emulated/0/matlog/saved_logs.... and then there could be old catlog installations out there also using /storage/emulated/0/catlog/saved_logs.

The other items that are now being detected by corpsefinder do seem related to removed apps (and I'm glad they are now being detected) . Will research those and report any that may be false positives (as unlikely as that may be). Thanks!
[Android Apps and Games] KatayHan:
Umm...

Will there ever be a discount on the unlocker?

Don't get me wrong. Free version contains everything I currently need(app control and system cleaner) but I actually want to support you for writing this app which has been frequently used by me for a long time and maybe check out other functions of the app as well.

But price is a little bit high in my currency. So...

I expect good news:)
[Android Apps and Games] Vagelis1608:
I don't know about darken, but I understand what you mean.

After all, I have never given over 5€ on a single game on Steam. :p

Nevertheless, I have years of experience on android and the only two apps that I found that are worth the money they ask for are SD Maid Pro and Tasker.

That is, if you have a use for SD Maid's pro features. ;)
[Android Apps and Games] IronTechmonkey:
I'm not sure how nagging for discounts and discussing how infrequently paid apps are used informs this development thread so...

Careening back on topic: After recent changes to CorpseFinder Matlog's saved logs directory is being detected and deleted. As described in previous posts this can be easily worked around and the false positive has been reported. I'm just curious if there is anyone else who uses Matt log and SD Maid who could share their experience with this.
[Android Apps and Games] voroxda:
I totally agree. Let me tell you my experiences with this tool SD Maid. I had developed a complex tasker device maintenance script (maintenance by OS tools, greenifying apps, individual activities....) Among many steps there were two cleaning tools, Root cleaner Pro and SD Maid Pro. For me it was absolutely normal that both tools are cleaning a lot of files, (first runs Root cleaner) each tool founds approximately 4MB each day. Then I became curious and changed the sequence, first SD Maid and after that Root cleaner Pro.

I am so sorry. Nothing to clean for Root cleaner Pro. SD Maid made it. So I uninstalled the unemployed Root cleaner.

Yes, SD Maid makes a very very good job.
[Android Apps and Games] Dark3n:
I don't believe that discounts are a good practice unless you need to shed inventory or a product suddenly became worth less. Giving random discounts fuels hesitation and causes buyers remorse.

The price is already adjusted to for purchasing power in different countries. If you want to discuss pricing, send an email to support@...

I understand, but disagree.

:good: XDA is for discussing how we can push boundaries :).

Everyone who uses "Matt log" should have had the same experience. SD Maid didn't know about another owner of the same folder and could thus only assume that the folder is not owned. I've not found a way to prevent this from happening. We would need a way to detect that a path is still being used. Detecting file access is possible (with root) but an app would have to be running at the same time as SD Maid and constant monitoring would drain resources. Using filesystem accesstime could work but this is again disabled on most ROMs to reduce resource usage.
[Android Apps and Games] IronTechmonkey:
I figured other "Matt log" users would experience the same thing but just wanted to get back to discussing SDMaid.

Thanks for the explanation. The fact is that there are workarounds available to SD Maid users including: Exclude that matlog folder from Corpse Finder (LOL, forest but for the trees - I forgot that could be done until just now).

Is there anything that could be done by Matt Log (apart from changing the location of the saved logs) to make it easier to identify and preserve that folder?
[Android Apps and Games] Dark3n:
> Is there anything that could be done by Matt Log (apart from changing the location of the saved logs) to make it easier to identify and preserve that folder?

No, this will just be fixed by SD Maids next update.
[Android Apps and Games] shilanjan:
How can I fix this??
[Android Apps and Games] djsolidsnake86:
yes app cleaner

for example app cache cleaner or accleaner are very fast to delete app cache!

clean system is safe to use?
[Android Apps and Games] cb474:
SD Maid says my device is unrooted, even though it's rooted. Is there a solution to this?
[Android Apps and Games] Dark3n:
Then they are most likely not as thorough.

Though deleting is very fast itself, it takes a bit longer though as it automaticly checks after deletion if the deletion was successfull by rescanning the apps that were previously found.

I would think so, i don't know of any problems that would cause harm.

For some users the system cleaner hangs sometimes, i could not pin down the cause yet.

Did you check if you denied sd maid access by mistake?

I don't think there is something from on SD Maids end.

Some users i talked to, who had this, had a problem with the superuser app.

Some kind of sql database error.

You could send me a log (use the app aLogCat to do that), then i could look into it.

Or you could try just reinstalling the superuser app.
[Android Apps and Games] Isadora:
Any chance you could add an option for an automatic app cleaning schedule?
[Android Apps and Games] Dark3n:
Its definitely on the TODO list, along with widgets (which are really a pain to program).

But i don't have the time for that at the moment as i'm currently working on a new app.

I will get around to it at some point though. Maybe this month, but i can't promise anything.
[Android Apps and Games] Isadora:
Fab :D no rush, it's ready when it's ready and not before!
[Android Apps and Games] prboy1969:
Hellua nice app. Thanks.
[Android Apps and Games] Dan_Aykroyd:
I commented before than in the previous version, when picking more than 1 thread for the performance setting, I'd get some errors and not all logs would be cleared.

Now, in this version, when picking more than 1 thread, the whole application closes when the scan starts.

I'm runnning a Samsung Galaxy S I9000 Stock Froyo ROM

Thanks
[Android Apps and Games] TVTV:
Great app!

The only thing that could be easily improved, graphics-wise, is the "Exclude files/dirs" menu button. The text is just too long for the button. Why not just name the button "Exclude" and explain in the pop-up that you can exclude both files and directories?

My suggestion may sound a bit trivial, but good aesthetics is part of the general user experience and should not be ignored, IMO.
[Android Apps and Games] Dark3n:
Thanks, its in the next update.

Small heads up for everyone.

The next update will contain italian and hebrew translations.

Besides that bug fixes.

For those experiencing some FCs:

It seems i introduced an error related to the app settings.

You can fix it by uninstalling and then reinstalling.

Eitherway the next update will contain a small code snippet to fix this too.
[Android Apps and Games] drpratik:
Would this run on ATRIX 2.3.4 ?

Thanks.
[Android Apps and Games] Dark3n:
Yes it should.
[Android Apps and Games] droidance:
Thanks! So far so good. Nexus S GSM :D
[Android Apps and Games] Dark3n:
I'm currently trying a different approch on the system cleaner, if it goes well it will result in alot better performance and hopefully less hangs for some users.
[Android Apps and Games] Dark3n:
The new update is basicly done.

I'm quite happy with the reworked system cleaner.

I have also added LOST.DIR directories to the system cleaner (thanks to Pele for that).
[Android Apps and Games] scarmon25:
Just installed. System cleaner seems much more efficient. I like how it now shows the number of items its scanning rather then the number of catagories selected. So far its a good update. Thanks a ton.

Also. Are you on twitter? If so what's your ID?
[Android Apps and Games] Dark3n:
Thanks for the feedback.

I'm not on twitter, ...yet. Maybe someday.
[Android Apps and Games] scarmon25:
That's cool. Thanks for the awesome app. I haven't found another that will do what this will.
[Android Apps and Games] Dark3n:
0.9.6.5 is on the market.
[Android Apps and Games] lohtse:
installed this on my htc hero with floyo 1.4pre1 and is says may device is unrooted yet it's rooted and all other apps requiring root work perfectly....

Odd problem and damn annoying as basically means app is pointless for me...
[Android Apps and Games] Dark3n:
https://github.com/d4rken/sdmaid-public/wiki/Duplicates#read-failed-io-error
[Android Apps and Games] Lazy8:
I just recently discovered this app and it looks great. Definitely something I'd be willing to spend money on, only problem is that I'm on a stock ROM rooted with magisk and using the built in su. I'm getting errors on install that sdmaid doesn't have root, and that busybox has an error. Is this magisk related only or sdmaid? Anyone using magisk and sdmaid together successfully? I tried a search on this thread and came up empty.
[Android Apps and Games] Vagelis1608:
All working here on MIUI 8 with Magisk.
[Android Apps and Games] Oswald Boelcke:
Using SD Maid Pro on two different Samsung GT-i9305 without any problems.

The first i9305 runs on RR-M-5.7.4-Sammy with Chainfire's SuperSU v2.76, the other one on RR-N-5.8.5-final with Magisk v14; please refer to attached screenshots.

I guess @Dark3n will come back to you if it's SD Maid related (what I personally doubt but you didn't tell use more about your device, which version of SD Maid, which version of "stock ROM", which Magisk version, if Xposed is running, if other "root-apps" have issues and so on; just a pretty too little information - I hope you don't try to tribute to your user name). Hopefully, you've already enabled "error reporting" in SD Maid that Dark3n could already get some more information.
[Android Apps and Games] Lazy8:
Yup, I didn't give much if any info about my phone. Sorry about that, just thought I'd ask for a feeler first before posting a lot.

Comparing screenshots with you I see my SELinux is set to enforced and yours is permissive. Don't know what that is yet.

I'm on a HTC M8 running a stock mm port from a M10 made by Santod. Everything works and I haven't encountered any problems besides sdmaid so far. Other apps that work fine with root are, titanium, elixir, erobot, adaway, betterbatterystats.

I have only been on the ROM a few days. Before that I was on a lp stock ROM using chainfire su.

Thanks for the reply's, trying now to figure out how to post pics....been a member for years and never had to before.
[Android Apps and Games] Bryanx86:
I am not rooted on stock Oreo, pixel XL. Granted adb read permission to mattlog, and took log. Then opened sd maid, which doesn't have root access, and ran it. It deleted mattlog file and one other file off of my sdcard. So will this delete any file that isn't properly recognized by sdmaid as active? Photos, random files?
[Android Apps and Games] IronTechmonkey:
The types of locations affected by what we were discussing are described in-app at

Settings > CorpseFinder > /sdcard/ (top item in list) as "public app data outside of standard directories". These are not just "random" or active "files".

In my case, apart from the false positive for mattlog (which has been fixed in next version of SD Maid) the rest were for apps that had been removed.
[Android Apps and Games] Oswald Boelcke:
First, just for your information: SELinux. I'm personally always on permissive (sometimes this appears as "moderate"). Other people require it to be set to strict/enforcing in order to e.g. pass the safetynet check that doesn't apply to me.

As you migrated from LP to MM, I assume you certainly clean flashed the MM ROM. Did you already use SD Maid before on LP? If yes, did you "clean" install SD Maid after the migration, or did you restore SD Maid e.g. from a Titanium backup? If latter is the case, how about to uninstall SD Maid and to install it again (either from Google Play Store or Dark3n's Github).

Last but not least - and I apologise for this stupid question: Did you check in Magisk settings if root is granted to SD Maid or disabled (at least it should appear in the list).

Finally, how about to reproduce the issue while logging and to post the logs?
[Android Apps and Games] Dark3n:
[MENTION=7396816]Bryanx86[/MENTION]

The MatLog issue will be fixed with the next update. It occured because of two different packages overlapping on the same directory without SD Maid knowing.

Regarding your second question: It depends on the location of the files. E.g.: The root of the sdcard uses a "whitelisting" mechanism, only items with known relations are considered by SD Maid. Directories such as private or public app data are using a blacklisting mechanism. Anything that can not be mapped to an installed app is suggested for deletion.

I generally err on the safe side with definitions, items may also be additionally protected by flags, e.g. photos flagged as `KEEPER` requiring you to opt-in through settings before they are offered for deletion, should SD Maid think there is no active owner.

This affects most of SD Maid's tool which use the "FileForensics" module. It is what the CorpseFinder uses to detect corpses, the AppCleaner to know where to apply filters, or the Databases tool to know which Databases to include (because we only act on Databases with known owners) etc.

You can play around with this by just creating files and seeing what icon SD Maid's Explorer gives them.

[MENTION=4001064]Lazy8[/MENTION]

It's quite common for superuser apps to sometimes struggle after an app has been updated that is in their list of approved root apps. What usually helps is to remove the app from the superuser app, reboot the device and have it request root again. If you think something else is afoot, record a debug log and look for log output with the tag "SDM:Root" it will tell you why no root was available.

As you mentioned "buybox error", SD Maid will also relinquish root access if it's not possible to run with root on your device due not finding a usuable set of applets from busybox/toolbox/toybox etc. This would be visible in SD Maids overview section though. Better without root then not at all, right?
[Android Apps and Games] Lazy8:
OK, not sure why, probably operator error but yesterday I couldn't upload pics. So here are the screen shots and I'll post my logs when I get a chance.

[MENTION=7408621]noc.jfcbs[/MENTION]

I looked up SELinux and am on the fence about whether to make this permissible or not.

1) it might break safetynet checks and I need that for Android pay

2) it opens up a whole other can of worms being exposed to vulnerabilities that I don't want to do. At least from what I read on here.

I did flash to the current firmware and I was on another mm ROM before this for some time with no issues.

I did not use sdmaid before, only just recently discovered it. Not sure how I missed it, seems very useful.

So also I didn't use tb to retire sdmaid it was fresh installed.

I did check to see that magisk had sdmaid root enables too.

All very good tips and things to check. Thank you for those.

[MENTION=7396816]Bryanx86[/MENTION]

I did try removing sdmaid from magisk and rebooting and adding again...no luck.
[Android Apps and Games] Bryanx86:
Altering SELinux definitely breaks safety net. I'm not sure if magisk can hide permissive SELinux?
[Android Apps and Games] Lazy8:
So am I to understand that not having SELinux=permissive means SDmaid won't work? If so, why do other apps that use root work ok? I hope this is not the case because I don't want to break safetynet and I would really like to get SDMaid working.
[Android Apps and Games] Dark3n:
SD Maid does not require SELinux=permissive.

Your last screenshots shows that SD Maid relinquished root (see "Error"), because no mount applet could be found that works with root (see red applet entry). SD Maid does tests to applets, with and without root, to ensure they work as expected. There are about a dozen combinations of busybox/toolbox/toybox SD Maid tries and apparently on your ROM no combination passed the test when used with root permission.

For further details record and post a debug log so we can see why the mount applet tests are failing.
[Android Apps and Games] Lazy8:
Stupid question but how do I post my log? It won't let me upload .txt files. You want me to search for sdm:root and post screen shots?
[Android Apps and Games] Dark3n:
You can also mail the log to support@darken.eu
[Android Apps and Games] Dark3n:
[MENTION=4001064]Lazy8[/MENTION]

As suspected root works:

1509045090558 D/Root:Factory: {-SDMEOF-, uid=0(root) gid=0(root) groups=0(root) context=u:r:su:s0}
1509045090558 D/Root:Factory: Root try successfull, we got ROOT :D!
1509045090559 D/RootContext:Factory: RootState: Root(state=ROOTED)

SD Maids internal applet fails because `/system` can not be found, which is a bit weird for a 6.0 ROM. I've seen that on newer ROMs occasionally. I think this could be adressed by me building toybox against the NDK toolchain, but that's easier said than done and kind of a shot in the the dark I'm not willing to try for now.

1509045090900 V/Shell:Interactive: Input : /data/user/0/eu.thedarken.sdm/files/toybox_sdm mount -o ro,remount '/system'
1509045090904 V/Shell:Interactive: Error : mount: '/system' not in /proc/mounts

The default ROM applet fails with a segmentation fault, that can happen depending on where the the native mount applet comes (is linked to) from, e.g. if it is an old "toolbox" version, those were known to be buggy.

1509045091701 V/Shell:Interactive: Input : /system/bin/toybox mount -o ro,remount '/system'
1509045091749 V/Shell:Interactive: Error : Segmentation fault

No other mount applets could be found.

The easiest solution would be if you manually install a working mount applet (e.g. a toybox/busybox installer of your choice). Might also be good for your other root apps. Many root apps don't test the applets and just fail in forseen ways.