yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Dark3n:
The AppCleaner may kill an app when deleting it's cache. Prevent it my either enabling the option "Skip running apps" or excluding the app.
[Android Apps and Games] Oswald Boelcke:
Just for information of all SD Maid users: Did the solution @Dark3n provide just below your post solve the issue?

BTW: Since this morning on v4.14.1 and looking more than promising.
[Android Apps and Games] Itachi2016:
Is it possible to add this function to this amazing app:

auto clear cache when the device is low on internal storage space with whitelisting or blacklisting

auto clear cache or history for a specified application when reach a certain number like 500MB or 1G
[Android Apps and Games] MrTooPhone:
Unlocker Needs Updated

Today SDMAID updated, when I opened it would not proceed until I update unlocker. I see no way to do that. Unlocker also disappeared from my list of apps but TB shows it still installed. I do/did have a paid version of the unlocker. Is SDMAID requiring previous subscribers to purchase again?
[Android Apps and Games] Dark3n:
The unlocker is updated through Google Play.

https://play.google.com/store/apps/details?id=eu.thedarken.sdm.unlocker

It's hidden because you selected the option to hide it at some point, there is an option SD Maid to make it visible again but should have no impact on updating it?

I'm not sure why this is so difficult, you are not the first one with the exact same question.

Why is your SD Maid updating, but the unlocker isn't?

Why are you assuming you are being asked to pay again?
[Android Apps and Games] drezz2:
the last versions, Do they include the options to erase the complete cache and not only the public part? (I suppose only if you are root?)
[Android Apps and Games] Dark3n:
Do you mean https://github.com/d4rken/sdmaid-public/wiki/AppCleaner#accessibility-service ?
[Android Apps and Games] drezz2:
that's it, just as I'm confusing, that was already or is new in these versions? (I know we talked about it in past messages)

and this https://github.com/d4rken/sdmaid-public/issues/2396#issuecomment-485920422 was for that?

root not necesary then?
[Android Apps and Games] Dark3n:
That option exists since v4.14.0 for english and other languages were added with the following versions.

Reliability was quite bad with v4.14.0 and should be a lot better since v4.14.3-4

Yes. The feature is based on recognizing certain UI elements which differ between ROMs and languages. I think we got about 90% now but in some cases it will still need some adjustment. Can't do that without help though as I don't own buckets of different devices :p.

Not necessary to clear private default caches now, but root is obviously still better.
[Android Apps and Games] drezz2:
Ah OK I understand

I thought that the program only called the option to erase the cache, but I thought it was manual, that is, you had to press on the button to erase

with the service you simulate the pressing of said buttons?

I had seen some other variant that either showed you the tab of each app to do it manually or did it with service automatically
[Android Apps and Games] Dark3n:
I consider v4.14.12 stable and it's now rolling out to production.

The accessibility service routine (ACS) has received many reliability improvements.

It will automatically try to dismiss notifications or notification shades that interrupt the process.

The retry intervals on failure will no longer restart the whole routine but only smaller sub-steps.

For v4.14.13 the canceling process will be much faster.

SD Maid will also start to scroll the screen if the target node is not found in the visible UI hierarchy which is something I did not consider initially, but can apparently happen when accessibility settings have been used to increase element and font size: https://github.com/d4rken/sdmaid-public/issues/2598
[Android Apps and Games] Oswald Boelcke:
Concur. Very happy with v4.14.12! Excellent job. Looking forward to the next beta/production.
[Android Apps and Games] Dark3n:
v4.14.13 has been unexpectedly raced through to replace v4.14.12.

Granting secondary storage access, on unrooted devices, running Android 5.0 to 6.0, was not directly possible.

It was an unexpected side-effect from another fix.

I made some changes such that if the system's file picker window crashes, SD Maid won't crash too.

This is not uncommon on Android 5 to 6 because some (looking at you Samsung) ROMs have bugs that cause the system's window to crash if the sdcard has no name.

I tried to combat that by detaching the systems Activity from SD Maid's task stack such that it doesn't take down our Activity with it.

Unknown to me though: Adding this flag automatically causes the callback to return to SD Maid with an empty result despite the file picker window still being open.

SD Maid would immediately see the empty callback and go into the "unsuccessful" state. While this allows the user then to continue, granting storage access was not possible that way.

Nifty users then went into the advanced settings and granted access from there. This worked as both approaches don't share the same code. The routine via advanced settings doesn't have that extra flag.

This was difficult to find in beta testing, you'd need to do a fresh install on an unrooted device, with a non-adopted sdcard, running Android 5.0 to 6.0.

Theoretically someone on Android Q could have catched it too, but probably attributed it to Android Q being buggy.

Sorry for not catching it myself :(.

Let me rant a bit here...

There are two approaches to granting secondary storage access via the SAF (storage access framework).

Method A: File picker window opens and you select the path to grant access to.

Method A+: File picker window opens on the correct path you have to select.

Method B: A popup shows that asks you to grant access for the path and you just have to click yes/no.

Android 5 to 6: Method A

Android 7 to 9: Method B

Android 8 to 9: Method A+ & Method B

Android 10(Q) to _: Method A+ (Android Q broke method B intentionally)

Thanks Google... :rolleyes:
[Android Apps and Games] joelcool69:
[MENTION=608746]Dark3n[/MENTION], first of all thanks for this great app, it's a must have on all my devices. However, the latest version it's ultra slow on my Shield TV (Running O). And now asks for "stadistics permission", and when I try to allow this, nothing happens. The 4.12 versions works great. How can I fix this?
[Android Apps and Games] Dark3n:
I assume by latest you mean v4.14.14?

I'm aware of both issues but need more data to fix it.

Can you record a debug log for both and add them to these tickets?

Android TV & Usage Stats: https://github.com/d4rken/sdmaid-public/issues/2559

I'm not sure if there even is a solution to this, maybe I just have to not show the permission request and disable related features.

Android O performance: https://github.com/d4rken/sdmaid-public/issues/2557

Is the scan speed just slow for you or is the UI laggy too?

Currently can't reproduce this. We need to narrow it down to a specific SD Maid tool.

https://github.com/d4rken/sdmaid-public/wiki/Reporting-a-bug#debug-log
[Android Apps and Games] ogisha:
Hi [MENTION=608746]Dark3n[/MENTION],

I haven problem on my Android 5.0 x86 tablet since 14.14.11 or 12.

SD Maid crashes while App Cleaner scanning.

Please help me how could I report the and send the log file, or maybe you already have received it automaticly from app itself.

Thank you.
[Android Apps and Games] Dark3n:
[MENTION=4657522]ogisha[/MENTION] You quoting a post which contains a link on how to report bugs while asking me how to report bugs :confused:
[Android Apps and Games] ogisha:
I am sorry. :(

I did not pay attention to the last link in the post.

---------- Post added at 12:42 PM ---------- Previous post was at 12:41 PM ----------

Expect bug to be reported, soon. :)
[Android Apps and Games] Dark3n:
Since we now have some nice code to use the accessibility service (ACS), it would not be too difficult to write a task that uses it to force-stop an app.

So for unrooted devices we could add force-stopping via ACS, thoughts?

https://github.com/d4rken/sdmaid-public/issues/2691

Btw Beta v4.14.21 is out :). I've made some changes to how ownership of files under `Android/data` and `data/data` is treated, did anyone noticed any changes? Maybe with the UninstallWatcher feature?
[Android Apps and Games] Oswald Boelcke:
All of our devices are rooted and will always be. I'd never purchase one where the bootloader can't be unlocked and which couldn't be rooted. I apologise unable to assist.

Installed v4.14.21 this morning. Going to provide feedback after the next uninstall that should occasionally occur. In case of a problem, I'm going to report it in the issue tracker, otherwise here. [MENTION=608746]Dark3n[/MENTION] I'm fascinated to see how fast development is currently occuring. Thanks very much for all efforts and the great job.
[Android Apps and Games] Dark3n:
Another idea in the same vein, batch uninstall via ACS: https://github.com/d4rken/sdmaid-public/issues/2696

It's a mix of different motivations.

"I want to push this update to production now" then someone reports an issue, I want to include the fix in the update, push an update, wait to see if everything is stable, and then another issue is reported.

I'm also procrastinating, I want to work on something else, but can't find the motivation, though instead of doing nothing I procrastinate by working on SD Maid, so I guess it's not all bad :).

For some issues I've been fixing the short lived beta versions were also enough to do quick iterations, drill down on the causes via automatic crash reports.
[Android Apps and Games] DB126:
I do like the concept and potential extensibility of ACS foundation. That said, I appreciate (fully) your motivational comments regarding a mature product and desire to explore other opportunites. Either way, we the user community 'win' as SD Maid is already a fine offering with few rivals.
[Android Apps and Games] mkhtfld76:
Still one of the greatest/most useful apps on Android. Thanks for all the work you've put into this over the years. So many "cleaner" apps out there but none come close to SD Maid.
[Android Apps and Games] Dark3n:
v4.14.27 is now the latest release and currently replacing v4.14.22.

Lot's of minor improvements to increase the overall quality of results, and a healthy dose of bugfixes for specific devices/ROMs.

https://github.com/d4rken/sdmaid-public/blob/master/CHANGELOG.md
[Android Apps and Games] Dark3n:
v4.14.30 is now the latest release and has replaced v4.14.27.

Few bugfixes, Accessibility-Service based cache cleaning now supports MIUI ROMs thanks to a helpful user, and the SystemCleaner's empty directory filter can now handle most cases of nested empty directories in one pass.

https://github.com/d4rken/sdmaid-public/blob/master/CHANGELOG.md
[Android Apps and Games] MustangLife03:
So I've used SD Maid in the past. On probaly 3-4 different Android versions. My question is SD Maid needed for Android Pie. Supposedly it does alot of cleaning on its own without the need for apps. Can anyone chime in. I'm not used to Google Files and no options to clear data, cache, cache partition in recover
[Android Apps and Games] DB126:
SD Maid offers more features, more flexibility, more visibility and more in depth cleaning than any native Android/Google 'tool'. Do you absolutely need it? Absolutely not. But that's not the point.
[Android Apps and Games] Dark3n:
[MENTION=5488402]DB126[/MENTION] Is on point.

Some more details:

The system's smart cleaning on Pie is "smart" in terms of WHEN, not WHAT.

It will mostly target the default caches as that's all the system allowed to do (in terms of defined behavior).

Mostly, because it also offers to remove photos that are backed up via Google Photos.

I'm usually just annoyed by it asking me to use Google Photos to backup to free space and I don't want to use it :).

It is supposed to automatically click the "Clear cache" button (which cleans default caches) on apps that are select by their size and usage pattern.

On unrooted devices it would be optimal if this would remove the need for clearing default caches via accessibility service (which is not optimal but the best we can do), but it seems to trigger only very late, i.e. not a solution for single apps that don't manage their caches well while the overall free space on the device stays high.

On rooted devices it's not match for SD Maid due to lack of flexibility and insight.
[Android Apps and Games] Dark3n:
delete me (I don't know why this double posts sometime using quick reply)
[Android Apps and Games] hyborian:
Thanks for the info. One question, what is actually happening when I use App Control, select an app, and Force Stop it ?

Just wanted more info, as I have a problem with an app, and force stopping it using SD Maid fixes the problem. Force Stopping it under the phone's settings doesn't fix it, and force stopping it using a shell or Terminal also does not work. Only SD Maid force stop works.
[Android Apps and Games] Dark3n:
SD Maid force-stops via shell too.

It executes the system's force stop routine which should be equal to pressing the force-stop button.

public boolean forceStop(@NonNull String packageName) throws IOException {
Timber.tag(TAG).d("Force stopping: %s", packageName);
Cmd.Builder cmdBuilder;
if (ApiHelper.hasLolliPop()) {
RootContext.ContextSwitch csw = rootContext.getContextSwitch();
cmdBuilder = Cmd.builder(csw.switchContext("u:r:system_app:s0", ShellHelper.getSetLDLibraryCommand() + " am force-stop " + ShellHelper.san(packageName)));
} else {
cmdBuilder = Cmd.builder(ShellHelper.getSetLDLibraryCommand() + " am force-stop " + ShellHelper.san(packageName));
}
Cmd.Result result = cmdBuilder.execute(shellSource.getSessionPreferRoot());
if (result.getExitCode() != Cmd.ExitCode.OK) {
Timber.tag(TAG).w("Force stop failed: %s, errors: %s", result.getExitCode(), StringUtils.join(result.merge()));
return false;
} else {
Timber.tag(TAG).d("Force stop successful: %s", packageName);
return true;
}
}
[Android Apps and Games] hyborian:
Thanks !
[Android Apps and Games] Chris.nl:
With latest Android10 Pixel 3a update, automated cache cleaning doesn't work (keeps retrying / refreshing first of list) Maybe because of changed layout after update?
[Android Apps and Games] jcmm11:
What version of SD Maid are you running?
[Android Apps and Games] Chris.nl:
4.14.33
[Android Apps and Games] Dark3n:
Possibly, can you record a debug log of it failing?
[Android Apps and Games] Chris.nl:
Just found out after 11 automated retries by SDmaid it skips and tries next in que. Would take to long to complete reloading 11x and skipping to next so I just abort.

I can't submit, did type out something but don't have/want a github account. Sorry for being lazy. love the app. I guess it will be reproduced by others if it's really a issue.

- edit -

Just managed to email the debug logfile. Hope it's helpful
[Android Apps and Games] Dark3n:
The log helped. :good:

Android 10 changed the entry labeling.

I've fixed EN,DE,NL and IT for the next update but I fear all other languages are affected too.

Can any other Android 10 users help me with the languages?

https://github.com/d4rken/sdmaid-public/issues/2922
[Android Apps and Games] Chris.nl:
Beta 4.14.34 worked for me! Thnx mate!
[Android Apps and Games] Oswald Boelcke:
You may want to consider to also seek for support here. I'm convinced you're going to get a few other languages.
[Android Apps and Games] chanh2018:
Sdmaid removed my Documents folder, I lost all files in it.

(I'm using latest Android Pie and rooted device)
[Android Apps and Games] shaggyskunk:
Did you look at your Settings?

Did not review what would be "cleaned" before you clicked "ok"?

Sounds like user error to me... ?

Sent from my SM-G975W ??
[Android Apps and Games] Dark3n:
Which SD Maid version?

Which tool?

Is it reproducible? If it's reproducible, please record a log:

https://github.com/d4rken/sdmaid-public/wiki/Reporting-a-bug#debug-log
[Android Apps and Games] chanh2018:
Version 4.14.32 (latest from Play store)

Using QuickAccess

It's not reproduced

I don't know what happened, but will try again and report back if problem exist

I don't think it's user issue because I left everything as is (default setting)
[Android Apps and Games] Dark3n:
What does the statistics history show? It should show which tool deleted it.
[Android Apps and Games] carlese:
Hi [MENTION=608746]Dark3n[/MENTION], please add a browse feature to add specific paths in the system cleanup (custom filters) and the option to add a path by long pressing on a folder/file.. It would be really helpful since it's not easy to add it manually now!
[Android Apps and Games] Dark3n:
v4.14.35 is now the latest production version and currently finishing rollout.

[MENTION=2290290]carlese[/MENTION] The explorer has an optional context menu action for creating SystemCleaner filters.

Browse feature is tricky (I'm not happy with the current browse tool that some of the options use) because there are so many access methods that need to be supported (root, normal, saf) that it's basically a full clone of the Explorer tool just to "browse", I need to split up a few more Explorer modules so I can reuse the code better. Somewhere on the TODO list...
[Android Apps and Games] carlese:
I only see the exclusion option in the menu, I don't see how can I add the folder or file to my system cleaner file..
[Android Apps and Games] sliding_billy:
Pixel 3 XL with Android 10 here. Is the inability to hide apps from the drawer in Android 10 here to stay, or is there something that can be done about it? I have a handful of apps that need hidden, both unlocker apps like SD Mail Pro and others, but also some redundent apps that I would rather access from somewhere other than the app drawer. I use Lawnchair beta, and hiding from drawer works with the custom launcher. Not working or available with stock either by way of the in-app hide option or by some other method.

P.S. Running SD Maid beta with advanced features on.
[Android Apps and Games] Dark3n:
So far it looks like it is here to stay. I have not found any method yet to restore the previous behavior.

The "hiding trick" was previously done by disabling the activity that has the flag "CATEGORY_LAUNCHER".

Since Android 10 any app is shown and if there is no activity with that flag then it just opens the settings for it.

From what I have seen in Google's issue tracker, this is working as intended, likely a way to combat malware that hides itself from the users view, i.e. most users would not manage find an app that is not displayed in the launcher.

There are a few apps (or rather packages) that don't show within the launcher, e.g. that act as "library", though then there would be the issue we had ~6 years ago, where users where confused because they bought and installed something but didn't find anything to open.

I'm open for ideas...
[Android Apps and Games] sliding_billy:
I appreciate the answer.

It sounds like the only answer is a custom launcher essentially overlaying stock. I assume that Lawnchair's (for example) ability to hide is because the actual drawer still exists and they are just hiding it an app from the overlay app drawer. I wonder how this is working for 3rd party manufacturers using propitiatory launchers. Perhaps once it is embedded into the build, it is subject to the same flag code that shows all apps. I assume there is no way to hide a folder that contains an "invisible" app. Keeping separate apps for standard vs. pro is a maintenance nightmare for the dev though others do it.
[Android Apps and Games] Dark3n:
3rd party launchers generally have the option to show and hide what ever they want.

Normally, at least that's what I would guess, you would query the systems package manager for all activities with this filter:

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

and then check whether the related component, e.g. the activity is enabled or disabled, and if it's disabled, remove it from the list.

Thinking out loud....

In Android 10 either ignore the enabled/disabled flag or just query all packages and then query each package... though that would show internal packages that are just libraries too, but they don't show them... which would point to the Pixel launcher just ignoring the enabled/disabled flag or if it's disabled, show a shortcut taking you to settings.

In any case we are stuck with the issue that we can no longer have an optionally hidden app. Switching unlocker users to IAPs is also not straightforward and it is unclear if the double icons are worse then the confusion created by no icon at all...

Then there is the thought of making the unlocker it's own app but this is also not confusion free and comes with much development overhead.

Those that use custom launchers that can hide apps are probably also the type of users that wouldn't be confused by a missing icon... and those users that would be confused ("you took my money but I didn't get anything") are the types of users that wouldn't use custom launchers... :rolleyes:

Currently just monitoring seeing if anyone else comes up with a good idea, I've mailed a few other devs with unlocker apps, though no responses yet :(.

Wouldn't be Android development if a new update didn't cause issues... :eek:
[Android Apps and Games] carlese:
Any help here?
[Android Apps and Games] sliding_billy:
Truer words have never been spoken. I just need to keep my OCD in check and not look at the stock launcher/drawer. Good luck, and thanks for the app.
[Android Apps and Games] Dark3n:
Settings > Explorer > Action - Add to SystemCleaner < - Tick
[Android Apps and Games] Golf c:
Obviously this app can't write to system on Android 10. Can't delete system apps

Edit : No one has figured out how to write to system in Android 10
[Android Apps and Games] carlese:
Nice, thank you! I found two bugs:

1) I have sd maid in Italian, and it says systeNcleaner

2) If I save my selections in a custom filter, and then I save other selections in a filter with the same name, it doesn't merge them but creates two custom filters with the same name. It would be great to have an incremental filter

Thanks!
[Android Apps and Games] jcmm11:
There's really no need to write to system. Instead of deleting system apps just freeze them, net result is the same as if you had removed them.

Magisk enables virtual modification of anything in system.
[Android Apps and Games] ianmacd:
And freezing them is persistent across firmware upgrades, whereas removal isn't.
[Android Apps and Games] DB126:
Almost - space consumed is not recovered but that's usually trivial and/or not of concern. I rarely delete anything from system; disable/freeze all the way. :)
[Android Apps and Games] hyborian:
I debloat a lot with a Tasker task, and run it regularly automatically. I use SD Maid to delete youtube though, as it is the most persistent ( together with Maps but a lot more) and keeps getting unfrozen.
[Android Apps and Games] jcmm11:
And if you actually delete a system app the space still isn't recovered, at least not to anyplace usable. It's recovered in system which will do nothing for space in data.

What you can do to recover space in data - before freezing/disabling clear data/cache (or reset in sdmaid) and uninstall all updates.