If you think the Android project Pimp_my_Z1 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Performance Control - An Android CPU Control application Copyright (C) 2012
* James Roberts//fromwww.java2s.com
*
* 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 <http://www.gnu.org/licenses/>.
*/package com.androguide.honamicontrol.helpers.CMDProcessor;
publicclass Shell {
// Mount /system as Read-Write or Read-Only
publicstaticfinal String MOUNT_SYSTEM_RW = "busybox mount -o rw,remount -t auto /system";
publicstaticfinal String MOUNT_SYSTEM_RO = "busybox mount -o ro,remount -t auto /system";
publicstaticfinal String ECHO = "busybox echo ";
publicstaticfinal String BUILD_PROP = "/system/build.prop";
publicstaticfinal String SED = "busybox sed -i /\"";
// Wifi Scan Interval
publicstaticfinal String WIFI_SCAN_PROP1 = "wifi.supplicant_scan_interval";
publicstaticfinal String WIFI_SCAN_PROP2 = "persist.wifi_scan_interval";
// TCP Congestion Algorithms
publicstaticfinal String SYSCTL_ALGORITHMS = "sysctl -w net.ipv4.tcp_congestion_control=";
publicstaticfinal String AVAILABLE_ALGORITHMS = "sysctl net.ipv4.tcp_available_congestion_control";
// Google DNS
publicstaticfinal String PMR_DNS = "ro.pimp.my.rom.google_dns";
publicstaticfinal String SED_PMR_DNS = "busybox sed -i \'/" + PMR_DNS + "/d\' " + BUILD_PROP;
publicstaticfinal String SED_DNS_1 = "busybox sed -i \'/net.dns1=8.8.8.8/d\' /system/build.prop";
publicstaticfinal String SED_DNS_2 = "busybox sed -i \'/net.dns2=8.8.4.4/d\' /system/build.prop";
publicstaticfinal String ECHO_DNS_1 = "busybox echo \"net.dns1=8.8.8.8\" >> /system/build.prop";
publicstaticfinal String ECHO_DNS_2 = "busybox echo \"net.dns2=8.8.4.4\" >> /system/build.prop";
publicstaticfinal String SETPROP_DNS1 = "setprop net.dns1 8.8.8.8";
publicstaticfinal String SETPROP_DNS2 = "setprop net.dns2 8.8.4.4";
// Media Streaming Tweaks (StageFright)
publicstaticfinal String PMR_STREAMING = "ro.pimp.my.rom.streaming_tweaks";
publicstaticfinal String SED_PMR_STREAMING = "busybox sed -i \'/" + PMR_STREAMING + "/d\' " + BUILD_PROP;
publicstaticfinal String SED_STREAMING = "busybox sed -i \'/media.stagefright.enable-/d\' /system/build.prop";
publicstaticfinal String[] STREAMING_TWEAKS = {
"busybox echo \"media.stagefright.enable-player=true\" >> /system/build.prop",
"busybox echo \"media.stagefright.enable-meta=true\" >> /system/build.prop",
"busybox echo \"media.stagefright.enable-scan=true\" >> /system/build.prop",
"busybox echo \"media.stagefright.enable-http=false\" >> /system/build.prop",
"setprop media.stagefright.enable-player true", "setprop media.stagefright.enable-meta true",
"setprop media.stagefright.enable-scan true", "setprop media.stagefright.enable-http false"
};
// HSUPA
publicstaticfinal String PMR_HSUPA = "ro.pimp.my.rom.enable_hsupa";
publicstaticfinal String SED_HSUPA = "busybox sed -i \'/ro.ril.hsxpa=/d\' /system/build.prop";
publicstaticfinal String ECHO_HSUPA = "busybox echo \"ro.ril.hsxpa=3\" >> /system/build.prop";
publicstaticfinal String SETPROP_HSUPA = "setprop ro.ril.hsxpa 3";
publicstaticvoid su(String command) {
CMDProcessor.runSuCommand(command);
}
publicstaticvoid sh(String command) {
CMDProcessor.runShellCommand(command);
}
}