Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <ut9v35$lob$1@nnrp.usenet.blueworldhosting.com>
Deutsch   English   Français   Italiano  
<ut9v35$lob$1@nnrp.usenet.blueworldhosting.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: Andrew <andrew@spam.net>
Newsgroups: comp.mobile.android
Subject: Re: Clear the cache of an android Cellphone (Moto G Pure)
Date: Mon, 18 Mar 2024 17:53:41 -0000 (UTC)
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <ut9v35$lob$1@nnrp.usenet.blueworldhosting.com>
References: <ut866h$3r1ut$1@dont-email.me>
Injection-Date: Mon, 18 Mar 2024 17:53:41 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
	logging-data="22283"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Xnews/2009.05.01
Cancel-Lock: sha1:7KIFOvzwvapHY3Rhut1N4T1DRVI= sha256:9Vez+waOhvuawU/Y0W9VV7itcIhY+wIrqay0GR3GujE=
	sha1:H6AUZmWvOGw0RMIQCt5TqDA46nU= sha256:KCRFQ3OGeuLpQQLdHfOr50XvYjpnoULv6sQu8t0lToA=
Bytes: 6658
Lines: 114

knuttle wrote on Sun, 17 Mar 2024 21:42:40 -0400 :

> Is there some why to clear the caches of all the apps on my cellphone 
> with out resetting the phone?

Yes. But the answer has nuance (see below) that Keith may want to consider.

But first, you might want to use a benchmark tool to see how well your
phone supports background processing such as this open source cache test.
<https://play.google.com/store/apps/details?id=com.urbandroid.dontkillmyapp>

And you might want to use a dedicated cache cleaner tool such as this.
 <https://play.google.com/store/apps/details?id=com.github.bmx666.appcachecleaner.googleplay>
 <https://play.google.com/store/apps/details?id=com.mitigator.gator>
 <https://play.google.com/store/apps/details?id=com.symantec.cleansweep>
Other well rated cache cleaner apps which contain ads are these, Keith.
 <https://play.google.com/store/apps/details?id=com.redsoft.zerocleaner>
 <https://play.google.com/store/apps/details?id=com.a0soft.gphone.acc.free>
 <https://play.google.com/store/apps/details?id=com.baloota.xcleaner>

And, of course, as VanguardLH suggested, the adb pm trim-caches command
takes the desired free space parameter in kilo/mega/gigabytes to trim to.
 C:\> adb shell pm trim-caches 64K
 C:\> adb shell pm trim-caches 64M
 C:\> adb shell pm trim-caches 64G

You can also specify an impossibly large amount of free space to seek,
which effectively will trim the cache for all non-running apps.
 C:\> adb shell pm trim-caches 9999999999 

Or, you can specify that adb clear the App Data & Cache of an app.
ADB Command for clearing App Data and Cache
 C:\> adb shell pm clear my.package.name
Or you can limit the clearing to only the Cache & not to App Data.
 C:\> adb shell pm clear --cache-only my.package.name

Since ADB can run a Linux command on the phone, this Linux command
will clear all data along with cache for all the apps on the phone.
 C:\> adb shell cmd package list packages | cut -d":" -f2 | while read package;do pm clear $package:done

Of course, if you're rooted, you can use the su commands to do it.
 C:\> adb shell
      su -c "rm -r /data/dalvik-cache"
 C:\> adb shell
      su -c "rm -r /cache/dalvik-cache"

Or for one package alone, if you're rooted, you can use this.
 C:\> adb shell
      su -c "rm -rf /data/data/my.package.name/cache/*"

There are other more drastic ways to clear the data and cache
but I wouldn't recommend them to Keith since it's not needed.
 a. Fastboot
 b. TWRP Recovery
 <https://web.archive.org/web/20160408152243/http://techbeasts.com/useful-adb-and-fastboot-commands-and-how-to-them/2>

Fastboot is a protocol used for diagnosing Android devices and flashing
firmware images onto them using USB. The Fastboot Mode isn't available for
Samsung users as Galaxy devices use the Download Mode instead.

Using Fastboot Commands, you'll be able to erase partitions like cache and
user data on your Android smartphone. 
1. Connect your smartphone to a PC and launch a command window
   Win+R cmd [Control+Shift+Enter]
2. adb reboot bootloader
3. Wait until your smartphone enters the Fastboot Mode
   In a separate PowerShell or Terminal window, enter this:
   fastboot erase cache
4. Once the cache partition is wiped, reboot.
   fastboot reboot

You can also wipe the system cache using the stock recovery or TWRP.
1. Boot your smartphone into Recovery Mode using hardware keys, 
   ADB commands, or tools like ADB AppControl/WebADB
2. Connect your smartphone to your PC & in a terminal type
   adb reboot recovery
3. Wait until your smartphone reboots into the Recovery Mode
4. Highlight the Wipe Cache Partition option & then press the Power key
5. Select the YES option to confirm system cache deletion
6. Once the cache partition is wiped, you should return to the home 
   screen in recovery and then select 'Reboot System Now'

If you are using TWRP Recovery, you need to select 
 Wipe > Advanced App > Dalvik/ART Cache 
and then Swipe to wipe to delete the system cache.

Contrary to what VanguardLH wrote, I'm not aware of a release option. 
  adb shell pm trim-caches <release>
But it might exist for all I know as I'm writing this from memory.

Speaking of writing from memory, I'm told SD Maid will supposedly clear the
cache for all your apps whether or not you are rooted.
 <https://play.google.com/store/apps/details?id=eu.thedarken.sdm>

SD Maid works unrooted but has more capability on rooted devices.
<https://github.com/d4rken-org/sdmaid/wiki/Frequently-Asked-Questions#does-sd-maid-only-work-with-root>

In rooted devices, SD Maid clears all the app caches & uses less RAM.
In unrooted devices, SD Maid goes to the app info for each app 
to clear the cache (and needs accessibility permissions which uses RAM).

Unrooted may also need a "force stop app" to stop apps to clear cache.
 <https://play.google.com/store/search?q=force%20stop%20apps&c=apps>

For example these are the first three in that force-stop-app search:
 <https://play.google.com/store/apps/details?id=com.force.stop.apps>
 <https://play.google.com/store/apps/details?id=com.tafayor.killall>
 <https://play.google.com/store/apps/details?id=com.redsoft.appkiller>
But these app killers (which force stop background apps) have no ads.
 <https://play.google.com/store/apps/details?id=org.codedrink.app_killer>
 <https://play.google.com/store/apps/details?id=me.piebridge.brevent>
 <https://play.google.com/store/apps/details?id=com.app.detail>

Be advised I haven't tried any of these so I'm just letting you know what I
remember, offhand, was the answer every time that same question was asked.