d4rken-org / sdmaid

SD Maid is an Android app that helps you manage files and apps.
https://play.google.com/store/apps/details?id=eu.thedarken.sdm
1.52k stars 752 forks source link

Incompatible SQL binary on Android 11 (MIUI)? #5755

Closed Kugumin closed 1 year ago

Kugumin commented 2 years ago

Describe the bug So basically the issue that Databases cleaning doesn't work properly. When I scan for all my databases on the phone it finds only 1. if enable option to scan for system app related ones it finds only Google databases, what is the problem. I want to trim all databases, but can't.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Databases'
  2. Click on 'Scan'
  3. Wait for scanning to end
  4. See the problem. Only Google databases in the list

Expected behavior a list of all databases on the phone, that could be cleaned

Screenshots Screenshot_2022-10-06-13-16-16-312_eu thedarken sdm

Debug log sdmaid_logfile_1665050782315.txt.zip

Smartphone:

Additional context On some version like 5.3.11(12) it was working absolutely properly. But also I noticed there was a change in scan directories since then. Maybe somehow this related to issue.

dragonGod97677 commented 2 years ago

1st of all, is your device rooted? If so.. there is really a problem. Those files are and can be only found on the Google Play Services internal data folder /data/user/0/com.google.android.gms/database/ and SD maid should found other app's database files, if you given it a root permission.

Second, if your device isn't rooted, most database files are inside app's each internal folder which user cant and other apps access it. And if the device isnt rooted and SD maid found those database files, google seems exposed the files into user space storage (phone internal storage where you store your stuff and not external SD card)

Kugumin commented 2 years ago

If so.. there is really a problem.

Yes, I do have a root (latest Magisk)

d4rken commented 2 years ago

Please provide a debug log of the databases scan.

Kugumin commented 2 years ago

Please provide a debug log of the databases scan.

I did, it's under the screenshot

d4rken commented 2 years ago

Ah sorry, seems I didn't have enough :coffee: yet :grin:.

It looks like the compatibility text, i.e. whether it's a database SD Maid can support is failing:

1665050842438  V/RXS:CmdProcessor: onNext(QueueCmd(command=Cmd(timeout=0, commands=[cd '/data/app/~~dUP0ol0lENKiXjr3Mtp-9A==/eu.thedarken.sdm-fCxoiJIMoZFiwMmYdWqQJA==/lib/arm64', $VA76A7C87FAB7 test -f '/data/user/0/com.miHoYo.GenshinImpact/databases/ThrowalbeLog.db' && ./libsqlite3.so '/data/user/0/com.miHoYo.GenshinImpact/databases/ThrowalbeLog.db' "pragma schema_version" ]), exitCode=1, output.size()=0, errors.size()=0))
1665050842438  I/RXS:CmdProcessor: Processed: Cmd.Result(cmd=Cmd(timeout=0, commands=[cd '/data/app/~~dUP0ol0lENKiXjr3Mtp-9A==/eu.thedarken.sdm-fCxoiJIMoZFiwMmYdWqQJA==/lib/arm64', $VA76A7C87FAB7 test -f '/data/user/0/com.miHoYo.GenshinImpact/databases/ThrowalbeLog.db' && ./libsqlite3.so '/data/user/0/com.miHoYo.GenshinImpact/databases/ThrowalbeLog.db' "pragma schema_version" ]), exitcode=1, output.size()=0, errors.size()=0)
1665050842439  D/Databases:Worker: Not a valid sqlite database: /data/user/0/com.miHoYo.GenshinImpact/databases/ThrowalbeLog.db

I wonder if SD Maids internal library that is used, is too old. But for the system databases it work? :thinking:

AppletBinary(type=INTERNAL, envvar=V55EB0294D4D6, path=/data/app/~~dUP0ol0lENKiXjr3Mtp-9A==/eu.thedarken.sdm-fCxoiJIMoZFiwMmYdWqQJA==/lib/arm64/libsqlite3.so, version=3.25.3 2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2), compat=ALL

I can't remember that I changed anything in that regard in last versions in SD Maid.

One approach could be to include a newer binary in SD Maid, or we change the priority, and let SD Maid prefer the system binary over the internal one :thinking:

Kugumin commented 2 years ago

Ah sorry, seems I didn't have enough ☕ yet 😁.

That's absolutely fine. I hope issue will get fixed!

Also take a look on additional context if you didn't

d4rken commented 2 years ago

Can you record a log with v5.3.11?

SD_Maid-v5.3.11(50311)-RELEASE-73b3f8d6f.zip

Kugumin commented 2 years ago

Can you record a log with v5.3.11?

SD_Maid-v5.3.11(50311)-RELEASE-73b3f8d6f.zip

Yes, here it is

sdmaid_logfile_1665517453117.txt.zip

Also search directories are different IMG_20221011_224636

gitguy1988 commented 1 year ago

I have the same issue on my Oneplus 9 pro with Android 11. The only databases it shows after scanning are the play services dbs. 5.3.11 still works for me as well.