Android Open Source - Pimp_my_Z1 Shell






From Project

Back to project page Pimp_my_Z1.

License

The source code is released under:

GNU General Public License

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//from  w  ww.  ja v a2s . c  o m
 *
 * 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;

public class Shell {

    // Mount /system as Read-Write or Read-Only
    public static final String MOUNT_SYSTEM_RW = "busybox mount -o rw,remount -t auto /system";
    public static final String MOUNT_SYSTEM_RO = "busybox mount -o ro,remount -t auto /system";
    public static final String ECHO = "busybox echo ";
    public static final String BUILD_PROP = "/system/build.prop";
    public static final String SED = "busybox sed -i /\"";

    // Wifi Scan Interval
    public static final String WIFI_SCAN_PROP1 = "wifi.supplicant_scan_interval";
    public static final String WIFI_SCAN_PROP2 = "persist.wifi_scan_interval";

    // TCP Congestion Algorithms
    public static final String SYSCTL_ALGORITHMS = "sysctl -w net.ipv4.tcp_congestion_control=";
    public static final String AVAILABLE_ALGORITHMS = "sysctl net.ipv4.tcp_available_congestion_control";

    // Google DNS
    public static final String PMR_DNS = "ro.pimp.my.rom.google_dns";
    public static final String SED_PMR_DNS = "busybox sed -i \'/" + PMR_DNS + "/d\' " + BUILD_PROP;
    public static final String SED_DNS_1 = "busybox sed -i \'/net.dns1=8.8.8.8/d\' /system/build.prop";
    public static final String SED_DNS_2 = "busybox sed -i \'/net.dns2=8.8.4.4/d\' /system/build.prop";
    public static final String ECHO_DNS_1 = "busybox echo \"net.dns1=8.8.8.8\" >> /system/build.prop";
    public static final String ECHO_DNS_2 = "busybox echo \"net.dns2=8.8.4.4\" >> /system/build.prop";
    public static final String SETPROP_DNS1 = "setprop net.dns1 8.8.8.8";
    public static final String SETPROP_DNS2 = "setprop net.dns2 8.8.4.4";

    // Media Streaming Tweaks (StageFright)
    public static final String PMR_STREAMING = "ro.pimp.my.rom.streaming_tweaks";
    public static final String SED_PMR_STREAMING = "busybox sed -i \'/" + PMR_STREAMING + "/d\' " + BUILD_PROP;
    public static final String SED_STREAMING = "busybox sed -i \'/media.stagefright.enable-/d\' /system/build.prop";
    public static final 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
    public static final String PMR_HSUPA = "ro.pimp.my.rom.enable_hsupa";
    public static final String SED_HSUPA = "busybox sed -i \'/ro.ril.hsxpa=/d\' /system/build.prop";
    public static final String ECHO_HSUPA = "busybox echo \"ro.ril.hsxpa=3\" >> /system/build.prop";
    public static final String SETPROP_HSUPA = "setprop ro.ril.hsxpa 3";

    public static void su(String command) {
        CMDProcessor.runSuCommand(command);
    }

    public static void sh(String command) {
        CMDProcessor.runShellCommand(command);
    }
}




Java Source Code List

com.androguide.honamicontrol.MainActivity.java
com.androguide.honamicontrol.PresentationActivity.java
com.androguide.honamicontrol.SettingsActivity.java
com.androguide.honamicontrol.bootservice.BootHelper.java
com.androguide.honamicontrol.bootservice.BootReceiver.java
com.androguide.honamicontrol.cards.CardDoubleSeekBarPA.java
com.androguide.honamicontrol.cards.CardDoubleSeekBar.java
com.androguide.honamicontrol.cards.CardImageLocal.java
com.androguide.honamicontrol.cards.CardSeekBarGeneric.java
com.androguide.honamicontrol.cards.CardSeekBarReadahead.java
com.androguide.honamicontrol.cards.CardSeekBarSC.java
com.androguide.honamicontrol.cards.CardSeekBarSysctl.java
com.androguide.honamicontrol.cards.CardSeekBarVibrator.java
com.androguide.honamicontrol.cards.CardSeekBar.java
com.androguide.honamicontrol.cards.CardSpinnerSchedMCDisabled.java
com.androguide.honamicontrol.cards.CardSpinnerSchedMC.java
com.androguide.honamicontrol.cards.CardSpinnerVoltage.java
com.androguide.honamicontrol.cards.CardSpinner.java
com.androguide.honamicontrol.cards.CardSwitchDisabled.java
com.androguide.honamicontrol.cards.CardSwitchPlugin.java
com.androguide.honamicontrol.cards.CardTopImageLocal.java
com.androguide.honamicontrol.fragments.CardsFragment.java
com.androguide.honamicontrol.fragments.HelpFragment.java
com.androguide.honamicontrol.fragments.WelcomeFragment.java
com.androguide.honamicontrol.helpers.CPUHelper.java
com.androguide.honamicontrol.helpers.FileHelper.java
com.androguide.honamicontrol.helpers.Helpers.java
com.androguide.honamicontrol.helpers.NegativeSeekBar.java
com.androguide.honamicontrol.helpers.ShellInterface.java
com.androguide.honamicontrol.helpers.SystemPropertiesReflection.java
com.androguide.honamicontrol.helpers.CMDProcessor.AbstractAsyncSuCMDProcessor.java
com.androguide.honamicontrol.helpers.CMDProcessor.CMDProcessor.java
com.androguide.honamicontrol.helpers.CMDProcessor.ChildProcess.java
com.androguide.honamicontrol.helpers.CMDProcessor.CommandResult.java
com.androguide.honamicontrol.helpers.CMDProcessor.Constants.java
com.androguide.honamicontrol.helpers.CMDProcessor.Shell.java
com.androguide.honamicontrol.kernel.KernelFragment.java
com.androguide.honamicontrol.kernel.colorcontrol.ColorControlActivity.java
com.androguide.honamicontrol.kernel.colorcontrol.ColorControlInterface.java
com.androguide.honamicontrol.kernel.cpucontrol.CPUActivity.java
com.androguide.honamicontrol.kernel.cpucontrol.CPUFragment.java
com.androguide.honamicontrol.kernel.cpucontrol.CPUInterface.java
com.androguide.honamicontrol.kernel.cpucontrol.GovernorDialog.java
com.androguide.honamicontrol.kernel.gpucontrol.GPUActivity.java
com.androguide.honamicontrol.kernel.gpucontrol.GPUInterface.java
com.androguide.honamicontrol.kernel.iotweaks.IOTweaksActivity.java
com.androguide.honamicontrol.kernel.iotweaks.IOTweaksInterface.java
com.androguide.honamicontrol.kernel.memory.MemoryManagementActivity.java
com.androguide.honamicontrol.kernel.memory.MemoryManagementInterface.java
com.androguide.honamicontrol.kernel.misc.MiscActivity.java
com.androguide.honamicontrol.kernel.misc.MiscInterface.java
com.androguide.honamicontrol.kernel.powermanagement.PowerManagementActivity.java
com.androguide.honamicontrol.kernel.powermanagement.PowerManagementInterface.java
com.androguide.honamicontrol.kernel.voltagecontrol.VoltageActivity.java
com.androguide.honamicontrol.kernel.voltagecontrol.VoltageInterface.java
com.androguide.honamicontrol.profiles.BalancedProfile.java
com.androguide.honamicontrol.profiles.BatteryMaxProfile.java
com.androguide.honamicontrol.profiles.BatteryProfile.java
com.androguide.honamicontrol.profiles.BenchmarkProfile.java
com.androguide.honamicontrol.profiles.PerformanceProfile.java
com.androguide.honamicontrol.profiles.ProfileEnabler.java
com.androguide.honamicontrol.profiles.Profile.java
com.androguide.honamicontrol.soundcontrol.SoundControlActivity.java
com.androguide.honamicontrol.soundcontrol.SoundControlFragment.java
com.androguide.honamicontrol.soundcontrol.SoundControlInterface.java
com.androguide.honamicontrol.soundcontrol.SoundFragment.java
com.androguide.honamicontrol.touchscreen.TouchScreenFragment.java
com.androguide.honamicontrol.touchscreen.TouchScreenInterface.java
com.astuetz.viewpager.extensions.PagerSlidingTabStrip.java
com.echo.holographlibrary.BarGraph.java
com.echo.holographlibrary.Bar.java
com.echo.holographlibrary.LineGraph.java
com.echo.holographlibrary.LinePoint.java
com.echo.holographlibrary.Line.java
com.echo.holographlibrary.PieGraph.java
com.echo.holographlibrary.PieSlice.java
com.fima.cardsui.StackAdapter.java
com.fima.cardsui.SwipeDismissTouchListener.java
com.fima.cardsui.Utils.java
com.fima.cardsui.objects.AbstractCard.java
com.fima.cardsui.objects.CardStack.java
com.fima.cardsui.objects.Card.java
com.fima.cardsui.views.CardCategory.java
com.fima.cardsui.views.CardDownload.java
com.fima.cardsui.views.CardEditText.java
com.fima.cardsui.views.CardEdit.java
com.fima.cardsui.views.CardImage.java
com.fima.cardsui.views.CardPresentation.java
com.fima.cardsui.views.CardSeekBar.java
com.fima.cardsui.views.CardSpinner.java
com.fima.cardsui.views.CardTextStripe.java
com.fima.cardsui.views.CardText.java
com.fima.cardsui.views.CardTopImage.java
com.fima.cardsui.views.CardUI.java
com.fima.cardsui.views.QuickReturnListView.java