There is a tip to reduce the threshold as follows but it doesn't work on CM 10.1:
To reduce from 10% to 5% warning from your “adb shell”:
- Code: Select all
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> insert into secure (name, value) VALUES('sys_storage_threshold_percentage','5');
sqlite> insert into gservices (name, value) VALUES('sys_storage_threshold_percentage','5');
sqlite> .quit
# reboot
*** don't include the # or sqlite>, those are the console prompts... ***
http://forum.xda-developers.com/showthread.php?t=877793
I did a search but only found the above tip. So I decided to look at the CM 10.1 source code and found that it uses the global table.
- Code: Select all
private long getMemThreshold() {
long value = Settings.Global.getInt(
mContentResolver,
Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE,
DEFAULT_THRESHOLD_PERCENTAGE);
CM 10.1 DeviceStorageMonitorService
- Code: Select all
public static final class Global extends NameValueTable {
...
public static final String
SYS_STORAGE_THRESHOLD_PERCENTAGE = "sys_storage_threshold_percentage";
CM 10.1 Settings
Therefore, in order to reduce the threshold in CM 10.1, the following code must be used instead:
- Code: Select all
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> insert into global (name, value) VALUES('sys_storage_threshold_percentage','5');
sqlite> .quit
# reboot
I've tested it and it worked.
Update: This should work on CM 10.2 and CM 11 as well. I looked at CM 10.2 and CM 11 source code. It also uses the global table.
- Code: Select all
final StorageManager sm = StorageManager.from(context);
mMemLowThreshold = sm.getStorageLowBytes(DATA_PATH);
CM 10.2 DeviceStorageMonitorService
CM 11 DeviceStorageMonitorService
- Code: Select all
public long getStorageLowBytes(File path) {
final long lowPercent = Settings.Global.getInt(mResolver,
Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE, DEFAULT_THRESHOLD_PERCENTAGE);
CM 10.2 StorageManager
CM 11 StorageManager