[APP][1.6+] SD Maid - System cleaning tool

Search This thread

aankkurr

Senior Member
Jun 8, 2016
118
37
Every time SD Maid (Pro) runs, I need to login again to Netflix on Shield TV (root).

And also I am loosing all downloaded AdAway sources, I have to download again.

Is there any suggestion other than ignoring these folders?
 

patrickdrd

Senior Member
Mar 24, 2015
718
140
ok, so I've rooted one of my devices, cache is cleaned automatically,
but I've noticed around 1,5gb of "system data" space (in diskusage app),
is it possible using sd maid to empty that (reserved) space?
 

radz_

Senior Member
Feb 23, 2013
3,597
1,880
I'm wondering why SD maid is not asking for Root Permission.
All other apps works fine..

It just say. "Deny" @Dark3n

Screenshot_20180617-004130__01.jpeg
 

IronTechmonkey

Recognized Contributor
Feb 12, 2013
7,652
10,628
I'm wondering why SD maid is not asking for Root Permission.
All other apps works fine..

It just say. "Deny" @Dark3n

View attachment 4528323

I'm not sure what is Magisk's default setting for app permissions requests (Ask, Allow, Deny) but AFAIK most SU managers would start with Ask, which implies that at one point SD Maid might (or might not) have been manually set to "Deny" as shown in your screenshots. In any event have you tried removing permissions for SD made in Magisk and or manual assigning them. Does the same thing occur in a fresh installation of SD maid? FWIW, I'm getting proper SU for SD maid in LOS 14.1 with native LOS SU (and I'm flashing ROMs today so will have opportunity to test again later).
 

radz_

Senior Member
Feb 23, 2013
3,597
1,880
I'm not sure what is Magisk's default setting for app permissions requests (Ask, Allow, Deny) but AFAIK most SU managers would start with Ask, which implies that at one point SD Maid might (or might not) have been manually set to "Deny" as shown in your screenshots. In any event have you tried removing permissions for SD made in Magisk and or manual assigning them. Does the same thing occur in a fresh installation of SD maid? FWIW, I'm getting proper SU for SD maid in LOS 14.1 with native LOS SU (and I'm flashing ROMs today so will have opportunity to test again later).
I just set Request Permission to "Grant" but the toast notif still says "Deny"

SD is not even listed in Superuser access. Meaning no request pop-up.

As a side note, im using the unofficial Magisk by @kantjer which is a fix version of 16.4, BUT again all other apps works perfectly fine.

(I just flash the latest firmware for OP5T)
 
Last edited:

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,169
twitter.com
This is known to happen with all super-user apps sometimes. At least I've seen it with SuperSU too.
I never found out what exactly happen but it seems to be some kind of database issue.
I think SD Maid is somewhat more prone to it as we generate a lot of su requests.
(Maybe the bug itself is then a race condition?)

The general approach to troubleshooting would be (arranged by escalation):

1: Just reboot the device
2: If app is listed in the app su app, remove it, then reboot.
3: Go system -> su app -> wipe data, then reboot
4: Uninstall SD Maid, reboot, reinstall SD Maid
5. Reroot
 

IronTechmonkey

Recognized Contributor
Feb 12, 2013
7,652
10,628
I just set Request Permission to "Grant" but the toast notif still says "Deny"

SD is not even listed in Superuser access. Meaning no request pop-up.

Ahh, I mistook the log for the list of relevant apps identified by Magisk.

As a side note, im using the unofficial Magisk by @kantjer which is a fix version of 16.4, BUT again all other apps works perfectly fine.

IDK if that would be an SD Maid issue or Magisk issue but a logical next testing step would still be to see if this occurs in a clean installation of SD Maid if you've not already done that.
 
  • Like
Reactions: radz_

IronTechmonkey

Recognized Contributor
Feb 12, 2013
7,652
10,628
This is known to happen with all super-user apps sometimes. At least I've seen it with SuperSU too.
I never found out what exactly happen but it seems to be some kind of database issue.
I think SD Maid is somewhat more prone to it as we generate a lot of su requests.
(Maybe the bug itself is then a race condition?)

FWIW, in LOS 14.1 with LOS SU (ROM regularly clean flashed) When SD Maid is restored from TiBu, or updated from playstore, or clean installed; I've never had issues with SD Maid SU permissions. To your point, about SD Maid perhaps being more prone to this than other apps, particularly in Magisk and SuperSU, I've occasionally seen similar pasterns of behaviour with some other apps - happy with LOS SU but some hiccups with SuperSU and or Magisk.

The general approach to troubleshooting would be (arranged by escalation):

1: Just reboot the device
2: If app is listed in the app su app, remove it, then reboot.
3: Go system -> su app -> wipe data, then reboot
4: Uninstall SD Maid, reboot, reinstall SD Maid
5. Reroot

I'd follow your advise about this before anyone else's but I'm curious why in your list a clean install of SD Maid is after a data wipe for the SU app. I, perhaps mistakenly, perceive the data wipe for the SU manager to have potential impact on a wider range of device function (SU settings for other apps) than removing/reinstalling SD maid around a reboot. Is this just different priorities or am I missing something?
 

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,169
twitter.com
I'd follow your advise about this before anyone else's but I'm curious why in your list a clean install of SD Maid is after a data wipe for the SU app. I, perhaps mistakenly, perceive the data wipe for the SU manager to have potential impact on a wider range of device function (SU settings for other apps) than removing/reinstalling SD maid around a reboot. Is this just different priorities or am I missing something?

Subjectively I find it easier to to press yes/no on a few su popup dialogs than to reconfigure SD Maid without backup (which underlines that at some point I really should add a settings export/import feature... :| ).

Objectively the issue is with the super user management app, not SD Maid.
If we would look at SD Maids debug log we would see SD Maid opening a shell with "su" and then probably getting either an exitcode of 1 (error) or 255 (out of range) or possibly a "permission denied" (though rather rare).
While removing SD Maid might trigger the su app to cleanup/fix itself, it could also fail because of the same underlying issue.

On a side note, I've had a few users with similar issues where the cause was "su" being accidentally hidden from SD Maid. Though I don't know if it's exactly this issue as no one shared the little detail of whether the su app log showed something, I'll have to ask that the next time this comes up...

What does SD Maid say in overview about root? @radz_
 
  • Like
Reactions: IronTechmonkey

radz_

Senior Member
Feb 23, 2013
3,597
1,880
This is known to happen with all super-user apps sometimes. At least I've seen it with SuperSU too.
I never found out what exactly happen but it seems to be some kind of database issue.
I think SD Maid is somewhat more prone to it as we generate a lot of su requests.
(Maybe the bug itself is then a race condition?)

The general approach to troubleshooting would be (arranged by escalation):

1: Just reboot the device
2: If app is listed in the app su app, remove it, then reboot.
3: Go system -> su app -> wipe data, then reboot
4: Uninstall SD Maid, reboot, reinstall SD Maid
5. Reroot
Ahh, I mistook the log for the list of relevant apps identified by Magisk.



IDK if that would be an SD Maid issue or Magisk issue but a logical next testing step would still be to see if this occurs in a clean installation of SD Maid if you've not already done that.
Fixed!!!

I just reflash Magisk.zip via Magisk app.
Initially, I flash Magisk.zip in TWRP.

Thanks man..
 

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,169
twitter.com
Fixed!!
I just reflash Magisk.zip via Magisk app.
Initially, I flash Magisk.zip in TWRP.

Thanks man..

Where you flashed it from was not the cause of the issue.
The data wipe is likely what fixed it (even if you would have flashed it via TWRP again).
In any case, happy to hear it's working again.

Hm maybe next time someone reproduces this we could backup magisks data and open a bug ticket with magisk to further look into this.
 

Oswald Boelcke

Forum Moderator / Recognized Translator
Staff member
Fixed!!!

I just reflash Magisk.zip via Magisk app.
Initially, I flash Magisk.zip in TWRP.

Thanks man..
I'm using Magisk v16.0 (not any beta) and it's working great - also with SD Maid.


You mentioned this:

As a side note, im using the unofficial Magisk by @kantjer which is a fix version of 16.4, BUT again all other apps works perfectly fine.
If you now flashed Magisk via the Magisk-app, I assume you're now also going with the official Magisk. Maybe the unofficial one was the culprit?
 

radz_

Senior Member
Feb 23, 2013
3,597
1,880
I'm using Magisk v16.0 (not any beta) and it's working great - also with SD Maid.


You mentioned this:


If you now flashed Magisk via the Magisk-app, I assume you're now also going with the official Magisk. Maybe the unofficial one was the culprit?
Hi mate, I'm still using the unofficial one.. it works great, it could be a glitch in Magisk database.

The unofficial version of Magisk is a fixed version for 16.4, the commits is from topjohnwu.
 

spawnlives

Senior Member
Jan 27, 2018
903
332
If it helps I am using official 16.4 (beta) magisk.
No issues with SD Maid or any other apps using root access.

Sent from my Samsung Galaxy S8 using XDA Labs
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    I currently suffer from days only having 24 hours and weeks only 7 days, and what is up with weekends only being 2 days?

    I'm very happy when expert users like @Oswald Boelcke step up and share their knowledge to help others. ❤️

    I try to spend what time I currently have available on updates. I think everyone benefits from that the most.
    6
    I currently suffer from days only having 24 hours and weeks only 7 days, and what is up with weekends only being 2 days?

    I'm very happy when expert users like @Oswald Boelcke step up and share their knowledge to help others. ❤️

    I try to spend what time I currently have available on updates. I think everyone benefits from that the most.
    You don't have to apologise! If you devote your limited time in accordance with your priorities and preferences or if you take a break, we have to respect that irrespectively of your reasons.
    Everything is for free and by XDA principle without a fixed release date. And in case somebody has doubts you wouldn't support your own project anymore, I simply recommend to observe the regular updates (certainly quite a few as beta's) coming or to check what's happening on Github.
    @Dark3n You don't owe us absolutely nothing! Thanks very much for your time and everything else that you invest into SD Maid and all your other excellent products.

    Stay safe and stay healthy! ...and have a break occasionally!
    4
    With this app now dead, especially on Samsung, what is the alternative app to use please?
    The app is certainly not dead. It receives regular updates. My last one was on 2021-03-01.

    Screenshot_20210324-103303_AM_Pre-release.png

    It's not working on Samsung galaxy s21 android 11...
    I guess this is slightly too little information for a bug report that might support @Dark3n in fixing an issue. Did you submit an in-app ticket? Or opened a ticket on Github including a logcat respectively provided the logcat and error description here in the thread? As the XDA search is unluckily still broken I was unable to check the latter.

    Screenshot_20210324-103452_SD_Maid.png
    3
    With this app now dead, especially on Samsung, what is the alternative app to use please?
    This app ain't dead.
    3
    I agree with you in general, but everything is NOT free unless you pirate it and I personally purchased SD Maid Pro.
    Omg the app is so cheap, if someone pirate it, he is going through difficult times.
    The purchase of the pro app is the best thanks to be given to the developer.
  • 512
    Description:
    Ive started working on a tool to clean up after apps (inspired by this thread).

    Nobody is perfect and android neither.
    Apps you have already deleted sometimes leave data behind.
    The system constantly creates logs, crash reports and debug files you don't really need.
    The market leaves temporary files of downloaded apps behind.
    Lets not go on here...

    SD Maid is a universal file tool that helps you keep your device neat and tidy.


    Features
    • Storage overview
    • Root explorer & search
    • Find & remove left over files from uninstalled apps
    • Freeze, Uninstall, Export or kill apps
    • Toggle autstart entries
    • Find & delete common unnecessary files
    • Clean applications by removing various cache files without loosing any data
    • Find & delete duplicate files
    • Overview over biggest files/directories on your device
    • Optimize your SQL databases
    • Show last modified files
    • and more...

    Installation instructions
    * Install this like any other app.
    * If your device is rooted, you will be asked if you want to grant SD Maid root permission upon its first launch
    * It is up to you what you choose, in each case SD Maid will make best possible use of its features.
    * Have the SuperUser application remember this choice, repeated prompts can cause unexpected behavior

    Download links
    SD Maid can either be downloaded from Google Play or direct from my server, appropriate links are collected here. The unlocker for SD Maid Pro can currently only be obtained through Google Play. I really recommend to only use these two sources. If you can't verify that the apk files are original you may put your device at risk.

    Changelog
    A detailed changelog can be found on Github and most update release posts also contain some explanation of what's new.

    Bugs / Requests
    Please use the issue tracker for any kind of bug reports or feature requests for both SD Maid stable & beta. I'll also discuss issues else where but usually a lot of helpful information gets lost if it's not organised, so I prefer the issue tracker :).

    Beta testing
    If you are interested in beta versions and want to help test new features you can find the appropriate links here There is also some discussion in SD Maids G+ community.

    Translations
    If you want to help translate look here: SD Maid @ crowdin.com
    Thank you!

    Help document
    See sdmaid.darken.eu/help

    Privacy
    See sdmaid.darken.eu/privacy

    XDA:DevDB Information
    SD Maid - System Cleaning Tool, App for the Android General

    Contributors
    Dark3n

    Version Information
    Status: Stable
    Current Stable Version: -
    Stable Release Date: 1969-12-31

    Created 2014-06-02
    Last Updated 2017-08-15
    77
    How to help me troubleshoot your issues

    Please see here for instructions on how to best report bugs:
    https://github.com/d4rken/sdmaid-public/wiki/Reporting-a-bug
    31
    Weekend beta v4.3.0 brings a truckload of core improvements.

    Here are the links if you just want to dive in:

    http://sdmaid.darken.eu/download
    http://sdmaid.darken.eu/changelog
    http://sdmaid.darken.eu/issues

    Some notes:
    • Tools will now display 'allocated size' instead of 'apparent size'. Allocated size is the size an item actually takes up on your storage (i.e. a 1 byte file actually uses 4096 byte on storage). Apparent size is a files length, how large the file itself tells us it is (i.e. a file may say it is 8096 byte long, but actually only takes up 4096 byte). A big source for discrepancy between sizes are caused by "sparse-files", these are files that contains a lot of 0000000. If the file system supports it, a sparse file of length 1GB could be saved on a 1MB storage. I think we are mainly interested in size on our storage (allocated size), not how much data something uses when sending it over network (apparent size). This will be most noticeable with the AppCleaner (which will show larger amounts because of many small files) and the SystemCleaner (which will show smaller ammounts, due to thumbnails often being sparse files). The Explorer will show both sizes if they differ, format 'allocated size (apparent size)'.
    • SD Maid now ships with toybox instead of busybox. Toybox is smaller and it fixes an issue I had with busybox. It's debatable whether toybox is faster, but looking it's code it is at least a lot leaner. Toybox is also something that all future Android versions will ship which gives us a lot of room for good compatibility on future Android ROMs (e.g. if we have to use the system toybox binary instead of SD Maids own). Busybox was not installed in most ROMs. Why not both? SD Maid is now compatible with both toybox and busybox, and will fallback to a busybox on your system if that is what it takes to run without issue on your device. Maxium compatibility :)!
    • If you have root SD Maid will no longer ask for secondary storage permission. There were too many problems with people on chinese (rooted) ROMs that did not manage to grant the permission. You can still grant it manually via advanced settings. In theory, i thought performance should be better with secondary storage permissions through the storage access framework, but I couldn't actually measure it. ¯\_(ツ)_/¯
    • You will probably never see the 'BUSYBOX error' page again because this only happens with root and SD Maid will now give up root if it would otherwise mean showing the error and giving up.
    • AppControl doesn't load app sizes by default anymore and is thus much faster. Also has improved filtering options (right side drawer).
    • The tool "Biggest" is now called "Storage analyzer" and has been completely rewritten.
    • Explorer now supports unpacking any type of 'zip' files (.zip, .apk etc) (without root for now).
    • The LastModified tool is gone (bye!), and the Searcher now has options for minimum and maximum age (hi!).
    • There is a new (better?) clutter reporter tool which uses GitHub. Let me know how it works and what I can improve, clutter reports is what gets us closer and closer to a 100% detection rate.
    • Besides dozen of bugfixes, there have also been multiple core changes that attempt to improve performance of SD Maid by reusing objects and making data lookups faster.
    • Not that you can see it, but many of the changes made it also a lot easier for me to better write unit tests for modules of SD Maid :cool:

    All unit tests, I currently have, passed, but due to the amount of changes and changes to the core structure, I expect a few bugs, so this is a beta only release. Catching them and adding more tests is what a beta is for though, right :)? (give the issue tracker some love!)
    28
    I made some good progress on the weekend so SD Maid v4.10.0 is here.

    This update is dedicated to the duplicates tool and a beta-only release.

    Let's start with the biggest change: The previous autoselection dialog is gone and SD Maid now performs an automatic selection based on a set of criterias you can adjust. So now you press the autoselection button and it just happens.

    The previous dialog allowed you to select one and only one type of criterion to select files by. There isn't really a right and a wrong way to do that, but based on many mails I received there is certainly a popular preference. I've put these preferences as "defaults" into an extra screen (check the option menu) which you can adjust.

    Currently we have the following defaults:

    - Priority 1: Media Provider, try to keep files that are indexed by the Media Storage app and try to delete those that are not indexed. The most common type of support mail I get is people complaining that SD Maid deleted their images, because they only look in the gallery app, they think SD Maid deleted them all, but the remaining copy is just in a space that is not indexed.

    - Priority 2: Storage location, assuming the user has an extra sdcard, try to keep the files on the sdcard and delete the files in internal storage. The assumption is that the user always wants to free space on internal storage.

    - Priority 3: Path nesting, we prefer to keep shallowly nested files as those are easier to find and access.

    - Priority 4: Modification date, we prefer older files because we assume that the newer file is an unwanted copy. E.g. older picture comes from the camera app, while the newer picture is a copy from an instant messenger app.

    I'm looking for feedback whether you think this is the optimal default setup.

    You can also find these details in the wiki: https://github.com/d4rken/sdmaid-public/wiki/Duplicates

    The second new feature is "pruning media storage references". It's a not too rare occurence that apps show empty/grey thumbnails for image files that have been deleted, because the media storage database still contains a reference. SD Maid will now check the database for references to images deleted by the duplicates tool and then delete those references.

    There have also been various changes to the user interface. I'm slowly changing some of SD Maids core UI architecture to allow for a more responsive UI interaction. The duplicates tool is just the first tool getting this treatment. The UI should lag less on low end devices and it should also no longer freeze when running selection on thousands of files. Play a bit around with the autoselection, using single click/long click on items and let me know how it goes.

    I've also added a box that shows the task result prominently. Task results were previously rather hidden away (navdrawer, startpage, notifications) and you couldn't easily view them in the actual tool they belong too, which is a bit backwards, isn't it? I plan to add this "task result box" to other tools too. With more space to display infos we can then also make the result messages a bit more detailed.

    Some texts such as the selection criterion explanations are not translatable yet as I'm looking for your feedback on the wording. Is it clear what each option? Please let me know.

    Oh and the duplicates settings have been moved into their own file and gotten a "reset to default" option, once the other tools get this we can finally have a nice and clean backup option for settings :).

    There have been a few other changes, but I think this is enough wall of text. Check the changelog ;).

    http://sdmaid.darken.eu/changelog
    http://sdmaid.darken.eu/issues
    http://sdmaid.darken.eu/download
    28
    v4.10.1 is out.

    I've fixed reported crashes (thx @IronTechmonkey ) and spend time rewriting quick access and other progress related feedback to improve performance. In some case there were multiple dozen callbacks per second which just wasted UI resources. I've limited this to ~70ms update intervals which is about the lower edge of delay at which humans can notice motion.

    Using ConstraintLayout I've also made several UI hierarchies flatter which should also improve performance when redrawing elements to display progress updates.

    Now that the duplicate criteria screen no longer crashes, I'm looking for some feedback on the texts/wording of each option before they are made translateable.

    http://sdmaid.darken.eu/changelog
    http://sdmaid.darken.eu/issues
    http://sdmaid.darken.eu/download
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone