DivestOS/Scripts/Common/Optimize.sh

32 lines
1.4 KiB
Bash
Raw Normal View History

#!/bin/bash
2017-11-05 15:58:01 +00:00
#DivestOS: A privacy oriented Android distribution
2018-06-03 18:13:59 +00:00
#Copyright (c) 2017-2018 Divested Computing, Inc.
2017-11-05 15:58:01 +00:00
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
#Attempts to increase performance and battery life
2018-04-28 03:49:40 +00:00
#Last verified: 2018-04-27
2018-04-23 12:59:18 +00:00
echo "Optimizing...";
2018-04-23 12:59:18 +00:00
enter "frameworks/base";
sed -i 's/ScaleSetting = 1.0f;/ScaleSetting = 0.5f;/' services/core/java/com/android/server/wm/WindowManagerService.java;
#sed -i 's|||'
enter "kernel"
2018-06-23 04:21:48 +00:00
sed -i "s/#define VM_MAX_READAHEAD\t128/#define VM_MAX_READAHEAD\t512/" ./*/*/include/linux/mm.h; #Lee Susman <lsusman@codeaurora.org>: Change the VM_MAX_READAHEAD value from the default 128KB to 512KB. This will allow the readahead window to grow to a maximum size of 512KB, which greatly benefits to sequential read throughput.
2018-06-29 04:55:21 +00:00
cd "$DOS_BUILD_BASE";
2018-04-23 12:59:18 +00:00
echo "Optimizing complete!";