├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── font │ │ │ │ ├── nunito_bold.ttf │ │ │ │ ├── nunito_light.ttf │ │ │ │ ├── nunito_semi_bold.ttf │ │ │ │ └── nunito_extra_light.ttf │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── drawable │ │ │ │ ├── splash_screen_icon.webp │ │ │ │ ├── game_app_item_container.xml │ │ │ │ ├── transparent_rounded_square.xml │ │ │ │ ├── space_vertical_separation.xml │ │ │ │ ├── background_resolution_slider.xml │ │ │ │ ├── rounded_corners.xml │ │ │ │ ├── empty_recent_game.xml │ │ │ │ ├── add_game_plus.xml │ │ │ │ ├── ic_round_keyboard_arrow_up_24.xml │ │ │ │ ├── background_game_list.xml │ │ │ │ ├── background_top.xml │ │ │ │ ├── background_bottom.xml │ │ │ │ ├── splash_screen_background.xml │ │ │ │ └── progress.xml │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── colors.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ └── layout │ │ │ │ ├── no_game_app_item.xml │ │ │ │ ├── add_game_layout.xml │ │ │ │ ├── detail_item.xml │ │ │ │ ├── game_app_item.xml │ │ │ │ ├── activity_main_options_shown.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── spse │ │ │ │ └── gameresolutionchanger │ │ │ │ ├── SplashScreen.java │ │ │ │ ├── GameApp.java │ │ │ │ ├── WrappedDrawable.java │ │ │ │ ├── ExecuteADBCommands.java │ │ │ │ ├── SettingsManager.java │ │ │ │ ├── GameAppManager.java │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── spse │ │ │ └── gameresolutionchanger │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── spse │ │ └── gameresolutionchanger │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── .idea ├── .name ├── .gitignore ├── compiler.xml ├── render.experimental.xml ├── misc.xml ├── runConfigurations.xml ├── jarRepositories.xml └── codeStyles │ └── Project.xml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── NON-ROOT-PERMISSION-FILE ├── gradle.properties ├── .gitignore ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | Game Resolution Changer -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Game Resolution Changer" -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/font/nunito_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/font/nunito_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/nunito_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/font/nunito_light.ttf -------------------------------------------------------------------------------- /NON-ROOT-PERMISSION-FILE: -------------------------------------------------------------------------------- 1 | adb devices 2 | adb devices 3 | 4 | adb shell pm grant com.spse.gameresolutionchanger android.permission.WRITE_SECURE_SETTINGS 5 | -------------------------------------------------------------------------------- /app/src/main/res/font/nunito_semi_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/font/nunito_semi_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/nunito_extra_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/font/nunito_extra_light.ttf -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_screen_icon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/drawable/splash_screen_icon.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3DDC84 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mathias-Boulay/Android-Game-Booster/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/render.experimental.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 07 21:35:39 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/game_app_item_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/transparent_rounded_square.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/space_vertical_separation.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_resolution_slider.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_corners.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 12 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/empty_recent_game.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 11 | 12 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/add_game_plus.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/test/java/com/spse/gameresolutionchanger/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_round_keyboard_arrow_up_24.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_game_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 7 | 8 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/SplashScreen.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | import androidx.annotation.Nullable; 7 | import androidx.appcompat.app.AppCompatActivity; 8 | 9 | public class SplashScreen extends AppCompatActivity { 10 | 11 | @Override 12 | protected void onCreate(@Nullable Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | 15 | startActivity(new Intent(SplashScreen.this,MainActivity.class)); 16 | 17 | finish(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/GameApp.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.graphics.drawable.Drawable; 4 | 5 | public class GameApp { 6 | //Just a "dummy" class to store properties 7 | private final String gameName; 8 | private final Drawable icon; 9 | private final String packageName; 10 | 11 | public GameApp(String gameName, Drawable icon, String packageName){ 12 | this.gameName = gameName; 13 | this.icon = icon; 14 | this.packageName = packageName; 15 | } 16 | 17 | public String getGameName(){ 18 | return gameName; 19 | } 20 | 21 | public Drawable getIcon() { 22 | return icon; 23 | } 24 | 25 | public String getPackageName() { 26 | return packageName; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/background_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/spse/gameresolutionchanger/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.spse.gameresolutionchanger", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_screen_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 | 18 | 23 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6200EE 4 | #3700B3 5 | #FF1900 6 | 7 | #3F41F8 8 | #595BF7 9 | 10 | #FFFFFF 11 | #191919 12 | 13 | #F8F7FC 14 | #7F7F7F 15 | 16 | #C4C4C4 17 | 18 | #16A1A5 19 | #8ED9C0 20 | 21 | #1F2072 22 | 23 | #5720FF 24 | 25 | #FF1900 26 | 27 | #FA5805 28 | #D100FF 29 | 30 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 30 5 | buildToolsVersion "29.0.3" 6 | 7 | defaultConfig { 8 | applicationId "com.spse.gameresolutionchanger" 9 | minSdkVersion 21 10 | targetSdkVersion 30 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled true 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: "libs", include: ["*.jar"]) 27 | implementation 'androidx.appcompat:appcompat:1.2.0' 28 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4' 29 | implementation 'com.google.android.material:material:1.2.1' 30 | testImplementation 'junit:junit:4.12' 31 | androidTestImplementation 'androidx.test.ext:junit:1.1.2' 32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' 33 | 34 | } -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/no_game_app_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 36 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 9 | 10 | 12 | 13 | 14 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 27 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/add_game_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 17 | 18 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/layout/detail_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 30 | 31 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | 16 | # Built application files 17 | *.apk 18 | *.aar 19 | *.ap_ 20 | *.aab 21 | 22 | # Files for the ART/Dalvik VM 23 | *.dex 24 | 25 | # Java class files 26 | *.class 27 | 28 | # Generated files 29 | bin/ 30 | gen/ 31 | out/ 32 | # Uncomment the following line in case you need and you don't have the release build type files in your app 33 | release/ 34 | 35 | # Gradle files 36 | .gradle/ 37 | build/ 38 | 39 | # Local configuration file (sdk path, etc) 40 | local.properties 41 | 42 | # Proguard folder generated by Eclipse 43 | proguard/ 44 | 45 | # Log Files 46 | *.log 47 | 48 | # Android Studio Navigation editor temp files 49 | .navigation/ 50 | 51 | # Android Studio captures folder 52 | captures/ 53 | 54 | # IntelliJ 55 | *.iml 56 | .idea/workspace.xml 57 | .idea/tasks.xml 58 | .idea/gradle.xml 59 | .idea/assetWizardSettings.xml 60 | .idea/dictionaries 61 | .idea/libraries 62 | # Android Studio 3 in .gitignore file. 63 | .idea/caches 64 | .idea/modules.xml 65 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you 66 | .idea/navEditor.xml 67 | 68 | # Keystore files 69 | # Uncomment the following lines if you do not want to check your keystore files in. 70 | #*.jks 71 | #*.keystore 72 | 73 | # External native build folder generated in Android Studio 2.2 and later 74 | .externalNativeBuild 75 | .cxx/ 76 | 77 | # Google Services (e.g. APIs or Firebase) 78 | # google-services.json 79 | 80 | # Freeline 81 | freeline.py 82 | freeline/ 83 | freeline_project_description.json 84 | 85 | # fastlane 86 | fastlane/report.xml 87 | fastlane/Preview.html 88 | fastlane/screenshots 89 | fastlane/test_output 90 | fastlane/readme.md 91 | 92 | # Version control 93 | vcs.xml 94 | 95 | # lint 96 | lint/intermediates/ 97 | lint/generated/ 98 | lint/outputs/ 99 | lint/tmp/ 100 | # lint/reports/ 101 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/WrappedDrawable.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.ColorFilter; 5 | import android.graphics.PixelFormat; 6 | import android.graphics.drawable.Drawable; 7 | 8 | public class WrappedDrawable extends Drawable { 9 | 10 | private final Drawable _drawable; 11 | protected Drawable getDrawable() { 12 | return _drawable; 13 | } 14 | 15 | public WrappedDrawable(Drawable drawable) { 16 | super(); 17 | _drawable = drawable; 18 | } 19 | 20 | public WrappedDrawable(Drawable drawable, int left, int top, int right, int bottom) { 21 | super(); 22 | _drawable = drawable; 23 | setBounds(left, top, right, bottom); 24 | } 25 | 26 | @Override 27 | public void setBounds(int left, int top, int right, int bottom) { 28 | //update bounds to get correctly 29 | super.setBounds(left, top, right, bottom); 30 | Drawable drawable = getDrawable(); 31 | if (drawable != null) { 32 | drawable.setBounds(left, top, right, bottom); 33 | } 34 | } 35 | 36 | @Override 37 | public void setAlpha(int alpha) { 38 | Drawable drawable = getDrawable(); 39 | if (drawable != null) { 40 | drawable.setAlpha(alpha); 41 | } 42 | } 43 | 44 | @Override 45 | public void setColorFilter(ColorFilter colorFilter) { 46 | Drawable drawable = getDrawable(); 47 | if (drawable != null) { 48 | drawable.setColorFilter(colorFilter); 49 | } 50 | } 51 | 52 | @Override 53 | public int getOpacity() { 54 | Drawable drawable = getDrawable(); 55 | return drawable != null 56 | ? drawable.getOpacity() 57 | : PixelFormat.UNKNOWN; 58 | } 59 | 60 | @Override 61 | public void draw(Canvas canvas) { 62 | Drawable drawable = getDrawable(); 63 | if (drawable != null) { 64 | drawable.draw(canvas); 65 | } 66 | } 67 | 68 | @Override 69 | public int getIntrinsicWidth() { 70 | Drawable drawable = getDrawable(); 71 | return drawable != null 72 | ? drawable.getBounds().width() 73 | : 0; 74 | } 75 | 76 | @Override 77 | public int getIntrinsicHeight() { 78 | Drawable drawable = getDrawable(); 79 | return drawable != null ? 80 | drawable.getBounds().height() 81 | : 0; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GRS 3 | 4 | 100% 5 | 50% 6 | 7 | FPS 8 | 9 | GameAppName (hezih) 10 | PackageName (com.hezih.IwantToDie) 11 | Can\'t find your game ? 12 | 13 | Native: 14 | Tweaked: 15 | p 16 | 17 | Recently added games: 18 | 19 | 20 | Settings 21 | Aggressive Low Memory Killer 22 | Kill all apps (NOT RECOMMENDED) 23 | Keep stock DPI 24 | 25 | Custom resolution found ! 26 | Do you want to revert back to the original resolution 27 | Revert resolution 28 | No, I like it 29 | 30 | No root solution detected ! 31 | It seems like there is no root access.\nDo you want to use non-root mode ? 32 | I\'ll try non-root mode 33 | Quit the app 34 | 35 | Disclaimer 36 | The software is provided "AS IS", without any warranty of any kind, express or implied. 37 | I know what I\'m doing 38 | Quit the app 39 | 40 | Remove 41 | Removes the app from the list 42 | 43 | No permission 44 | The non-root mode requires the WRITE_SECURE_SETTINGS permission, which can be given through an ADB command.\nClick the learn more button to explain how to. 45 | Learn more 46 | Quit the app 47 | 48 | Can\'t use this option in non-root mode ! 49 | 50 | https://github.com/serpentspirale/Android-Game-Booster#Setup 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/game_app_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 33 | 34 | 45 | 46 | 62 | 63 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | roundsplashscreenicon-1-1-1-1-1-1

3 | 4 | 5 | # Game Resolution Scaler (GRS) 6 | The Game Resolution scaler is a unified implementation for custom resolutions on Android, compatible from android 5.0 (*lollipop*) all the way up to android 11, compatible with both rooted **and** rootless devices ! 7 | 8 | ## Features 9 | - FPS gains up to **+80%** ! 10 | - Save battery life ! 11 | - Lightweight, with an install size < 5MB 12 | - A simple an beautiful UI, easy to understand by everyone 13 | - Automated DPI scaling, avoiding too big/small UI everywhere 14 | - Toggle for stock DPI value ¹ 15 | - Aggressive Low Memory Killer (LMK) to prioritize RAM for GAMING ¹ | ² 16 | - Kill every non-system app before launching the game [NOT ADVISED] ¹ | ² 17 | 18 | ¹ *Optional feature, disabled by default*. 19 | 20 | ² *Feature available for rooted devices only*. 21 | 22 | 23 | 24 | ## Setup 25 | ### Rooted devices 26 | 27 |
Click for instruction on rooted devices 28 | 29 | - [Download](https://github.com/serpentspirale/Android-Game-Booster/releases) and install the latest stable build. 30 | - Upon launch, when the app ask for root rights, grant them. 31 | - Profit ! 32 | 33 |
34 | 35 | 36 | ### Non-rooted devices 37 | 38 |
Click here for instructions on non-rooted devices 39 | 40 | **You need to have developer options and USB debugging enabled on your device !** 41 | 42 | - [Download](https://github.com/serpentspirale/Android-Game-Booster/releases) and install the latest stable build. 43 | - **Before launching the app:** 44 | - [Download](https://developer.android.com/studio/releases/platform-tools) and extract the platform-tools adapted to your platform 45 | - Copy [this file](https://raw.githubusercontent.com/serpentspirale/Android-Game-Booster/main/NON-ROOT-PERMISSION-FILE) and save it as a *.bat* (windows) or a *.sh* (Linux, MacOS) **in the extracted folder !** 46 | - Link your phone to your PC with the USB cable. 47 | - Execute the saved file. If the phone asks *allow USB debugging ?* , grant permissions to it. 48 | - If all went good, the app should have been granted the *WRITE_SECURE_SETTINGS* permission. 49 | - Launch the app and select non-root when prompted to. 50 | - Profit ! 51 | 52 |
53 | 54 | 55 | ## How to contribute 56 | 57 | If you'd like to contribute, start by searching through the [issues](https://github.com/serpentspirale/Android-Game-Booster/issues) and [pull requests](https://github.com/serpentspirale/Android-Game-Booster/pulls) to see whether someone else has raised a similar idea or question. 58 | 59 | If you don't see your idea listed, and you think it fits into the goals of this application, do one of the following: 60 | * **If your contribution is minor,** such as a typo fix, open a pull request. 61 | * **If your contribution is major,** such as a new guide, start by opening an issue first. That way, other people can weigh in on the discussion before you do any work. 62 | 63 | Development is made on Android Studio 4.1 with Gradle 6.1.1. 64 | You can just clone the repo and get started ! 65 | 66 | **Key rules when contributing:** 67 | - Respect the same style as the original code (better consistency) 68 | - It must introduce no crashes whatsoever (be error proof) 69 | - When introducing UI changes, make sure it is ~~dumb~~ user proof. It seems simple but believe me, it isn't. 70 | - Do **not** touch the *build.gradle* file 71 | 72 | 73 | 74 | 75 | ### Todos 76 | 77 | - Improve the UI smoothness by caching. 78 | - Improve performance with multi-threading the getGameApps and showAddPopup functions. 79 | - Add per-game custom resolution to override global custom resolution. 80 | - Add compatibility to android 4.4 ? Are modern games compatible with a 7 years old version ? 81 | 82 | 83 | License 84 | ---- 85 | 86 | See the LICENSE file at the root of the repository 87 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/ExecuteADBCommands.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.util.Log; 4 | 5 | import java.io.DataInputStream; 6 | import java.io.DataOutputStream; 7 | import java.io.IOException; 8 | import java.lang.reflect.Array; 9 | import java.util.ArrayList; 10 | import java.util.Arrays; 11 | import java.util.Collections; 12 | 13 | public class ExecuteADBCommands extends MainActivity 14 | { 15 | public static boolean canRunRootCommands() 16 | { 17 | boolean retval = false; 18 | Process suProcess; 19 | 20 | try 21 | { 22 | suProcess = Runtime.getRuntime().exec("su"); 23 | 24 | DataOutputStream os = new DataOutputStream(suProcess.getOutputStream()); 25 | DataInputStream osRes = new DataInputStream(suProcess.getInputStream()); 26 | 27 | if (null != os && null != osRes) 28 | { 29 | // Getting the id of the current user to check if this is root 30 | os.writeBytes("id\n"); 31 | os.flush(); 32 | 33 | String currUid = osRes.readLine(); 34 | 35 | boolean exitSu = false; 36 | if (null == currUid) 37 | { 38 | retval = false; 39 | exitSu = false; 40 | Log.d("ROOT", "Can't get root access or denied by user"); 41 | } 42 | else if (currUid.contains("uid=0")) 43 | { 44 | retval = true; 45 | exitSu = true; 46 | Log.d("ROOT", "Root access granted"); 47 | } 48 | else 49 | { 50 | retval = false; 51 | exitSu = true; 52 | Log.d("ROOT", "Root access rejected: " + currUid); 53 | } 54 | 55 | if (exitSu) 56 | { 57 | os.writeBytes("exit\n"); 58 | os.flush(); 59 | } 60 | } 61 | } 62 | catch (Exception e) 63 | { 64 | // Can't get root ! 65 | // Probably broken pipe exception on trying to write to output stream (os) after su failed, meaning that the device is not rooted 66 | 67 | retval = false; 68 | Log.d("ROOT", "Root access rejected [" + e.getClass().getName() + "] : " + e.getMessage()); 69 | } 70 | 71 | return retval; 72 | } 73 | 74 | public static void execute(String command, boolean isSuperUser){ 75 | execute(new ArrayList<>(Collections.singletonList(command)), isSuperUser); 76 | } 77 | 78 | public static boolean execute(ArrayList commands,boolean isSuperUser) 79 | { 80 | boolean retval = false; 81 | 82 | try 83 | { 84 | if (null != commands && commands.size() > 0) 85 | { 86 | Process process = Runtime.getRuntime().exec(isSuperUser ? "su" : ""); 87 | 88 | DataOutputStream os = new DataOutputStream(process.getOutputStream()); 89 | 90 | // Execute commands that may require root access 91 | for(int i=0; i 2 | 3 | 4 | 11 | 20 | 21 | 22 | 23 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | xmlns:android 32 | 33 | ^$ 34 | 35 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | xmlns:.* 43 | 44 | ^$ 45 | 46 | 47 | BY_NAME 48 | 49 |
50 |
51 | 52 | 53 | 54 | .*:id 55 | 56 | http://schemas.android.com/apk/res/android 57 | 58 | 59 | 60 |
61 |
62 | 63 | 64 | 65 | .*:name 66 | 67 | http://schemas.android.com/apk/res/android 68 | 69 | 70 | 71 |
72 |
73 | 74 | 75 | 76 | name 77 | 78 | ^$ 79 | 80 | 81 | 82 |
83 |
84 | 85 | 86 | 87 | style 88 | 89 | ^$ 90 | 91 | 92 | 93 |
94 |
95 | 96 | 97 | 98 | .* 99 | 100 | ^$ 101 | 102 | 103 | BY_NAME 104 | 105 |
106 |
107 | 108 | 109 | 110 | .* 111 | 112 | http://schemas.android.com/apk/res/android 113 | 114 | 115 | ANDROID_ATTRIBUTE_ORDER 116 | 117 |
118 |
119 | 120 | 121 | 122 | .* 123 | 124 | .* 125 | 126 | 127 | BY_NAME 128 | 129 |
130 |
131 |
132 |
133 |
134 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/SettingsManager.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.SharedPreferences; 6 | import android.graphics.Point; 7 | import android.util.Log; 8 | import android.view.Display; 9 | 10 | import java.util.ArrayList; 11 | 12 | public class SettingsManager { 13 | //PUBLIC OPTIONS 14 | private boolean KEEP_STOCK_DPI; 15 | private boolean AGGRESSIVE_LOW_MEMORY_KILLER; 16 | private boolean KILL_ALL_OTHER_APPS; 17 | 18 | private boolean IS_ROOT; 19 | 20 | 21 | SharedPreferences preferences; 22 | SharedPreferences.Editor editor; 23 | Activity activity; 24 | int[] displayStats = new int[3]; //Width, Height, DPI 25 | 26 | final String SETTINGS_FILE = "SETTINGS"; 27 | 28 | public SettingsManager(Activity activity){ 29 | this.activity = activity; 30 | preferences = activity.getSharedPreferences(SETTINGS_FILE,Context.MODE_PRIVATE); 31 | Display display = activity.getWindowManager().getDefaultDisplay(); 32 | 33 | Point point = new Point(); 34 | display.getRealSize(point); 35 | displayStats[0] = point.x; 36 | displayStats[1] = point.y; 37 | displayStats[2] = activity.getResources().getDisplayMetrics().densityDpi; 38 | 39 | IS_ROOT = preferences.getBoolean("isRoot",ExecuteADBCommands.canRunRootCommands()); 40 | if(IS_ROOT) { 41 | AGGRESSIVE_LOW_MEMORY_KILLER = preferences.getBoolean("aggressiveLMK", false); 42 | KILL_ALL_OTHER_APPS = preferences.getBoolean("isMurderer", false); 43 | }else{ 44 | AGGRESSIVE_LOW_MEMORY_KILLER = false; 45 | KILL_ALL_OTHER_APPS = false; 46 | } 47 | 48 | KEEP_STOCK_DPI = preferences.getBoolean("keepStockDPI", false); 49 | 50 | 51 | 52 | } 53 | 54 | 55 | //Get stuff 56 | public int getCurrentWidth(){ 57 | return displayStats[0]; 58 | } 59 | 60 | public int getCurrentHeight(){ 61 | return displayStats[1]; 62 | } 63 | 64 | public int getCurrentDensity(){ 65 | return displayStats[2]; 66 | } 67 | 68 | public boolean isFirstLaunch(){ 69 | return preferences.getBoolean("firstLaunch",true); 70 | } 71 | 72 | public int getOriginalDensity(){ 73 | return preferences.getInt("originalDPI", getCurrentDensity()); 74 | } 75 | 76 | public String getOriginalResolution(){ 77 | return preferences.getString("originalResolution", getCurrentWidth() + "x" + getCurrentHeight()); 78 | } 79 | 80 | public int getOriginalWidth(){ 81 | return preferences.getInt("originalWidth", getCurrentWidth()); 82 | } 83 | 84 | public int getOriginalHeight(){ 85 | return preferences.getInt("originalHeight", getCurrentHeight()); 86 | } 87 | 88 | 89 | public GameApp getRecentGameApp(int index){ 90 | return GameAppManager.getGameApp(activity, preferences.getString(String.valueOf(index).concat("thGame"),"")); 91 | } 92 | 93 | public boolean isLMKActivated(){ 94 | return AGGRESSIVE_LOW_MEMORY_KILLER; 95 | } 96 | 97 | public boolean isMurderer(){ 98 | return KILL_ALL_OTHER_APPS; 99 | } 100 | 101 | public boolean keepStockDPI(){return KEEP_STOCK_DPI;} 102 | 103 | public boolean isRoot(){ 104 | return IS_ROOT; 105 | } 106 | 107 | public int getLastResolutionScale(){ 108 | return preferences.getInt("lastResolutionScale", 0); 109 | } 110 | 111 | 112 | 113 | 114 | 115 | 116 | //Set stuff 117 | public void initializeFirstLaunch(){ 118 | //Screen dimension stuff 119 | editor = preferences.edit(); 120 | int width = getCurrentWidth(); 121 | int height = getCurrentHeight(); 122 | editor.putInt("originalWidth", width); 123 | editor.putInt("originalHeight", height); 124 | editor.putString("originalResolution", width + "x" + height); 125 | editor.putInt("originalDPI", getCurrentDensity()); 126 | 127 | 128 | //Now we've collected the info 129 | editor.putBoolean("firstLaunch", false); 130 | 131 | 132 | 133 | editor.apply(); 134 | } 135 | 136 | public boolean setScreenDimension(int height, int width){ 137 | boolean success; 138 | int densityDPI; 139 | if(!KEEP_STOCK_DPI){ 140 | densityDPI = (int)(getOriginalDensity() * ((float)width/(float)getOriginalWidth())); 141 | }else{ 142 | densityDPI = getOriginalDensity(); 143 | } 144 | 145 | Log.d("DensityDPI: ","nb: " + densityDPI); 146 | ArrayList commands = new ArrayList<>(2); 147 | if (height < getCurrentHeight()){ //Scale Down 148 | commands.add("wm density " + densityDPI); 149 | commands.add("wm size " + width +"x"+ height); 150 | }else{ //Scale up, shouldn't occur. 151 | commands.add("wm size " + width +"x"+ height); 152 | commands.add("wm density " + densityDPI); 153 | } 154 | 155 | success = ExecuteADBCommands.execute(commands, isRoot()); 156 | displayStats[0] = width; 157 | displayStats[1] = height; 158 | displayStats[2] = densityDPI; 159 | 160 | return success; 161 | 162 | } 163 | 164 | 165 | public void addGameApp(String packageName, int index){ 166 | editor = preferences.edit(); 167 | editor.putString((index+1)+"thGame", packageName); 168 | editor.apply(); 169 | } 170 | 171 | public void removeGameApp(int index){ 172 | editor = preferences.edit(); 173 | editor.putString((index+1)+"thGame", ""); 174 | editor.apply(); 175 | } 176 | 177 | public int findFirstEmptyRecentGameApp(){ 178 | for(int i=1; i<=6;i++){ 179 | if(getRecentGameApp(i) == null){ 180 | return (i-1); 181 | } 182 | } 183 | return 0; 184 | } 185 | 186 | public void setLMK(boolean state){ 187 | AGGRESSIVE_LOW_MEMORY_KILLER = state; 188 | 189 | editor = preferences.edit(); 190 | editor.putBoolean("aggressiveLMK", state); 191 | editor.apply(); 192 | } 193 | 194 | public void setMurderer(boolean state){ 195 | KILL_ALL_OTHER_APPS = state; 196 | 197 | editor = preferences.edit(); 198 | editor.putBoolean("isMurderer", state); 199 | editor.apply(); 200 | } 201 | 202 | public void setKeepStockDPI(boolean state){ 203 | KEEP_STOCK_DPI = state; 204 | 205 | editor = preferences.edit(); 206 | editor.putBoolean("keepStockDPI", state); 207 | editor.apply(); 208 | } 209 | 210 | 211 | public void setLastResolutionScale(int scale){ 212 | editor = preferences.edit(); 213 | editor.putInt("lastResolutionScale", scale); 214 | editor.apply(); 215 | } 216 | 217 | public void setRootState(boolean state){ 218 | IS_ROOT = state; 219 | 220 | editor = preferences.edit(); 221 | editor.putBoolean("isRoot", state); 222 | editor.apply(); 223 | } 224 | } 225 | 226 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/GameAppManager.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.annotation.SuppressLint; 4 | import android.app.Activity; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.content.pm.ApplicationInfo; 8 | import android.content.pm.PackageInfo; 9 | import android.content.pm.PackageManager; 10 | import android.graphics.Bitmap; 11 | import android.graphics.drawable.BitmapDrawable; 12 | import android.graphics.drawable.Drawable; 13 | import android.graphics.drawable.ScaleDrawable; 14 | import android.os.Build; 15 | import android.provider.Settings; 16 | import android.util.Log; 17 | import android.widget.Toast; 18 | 19 | import java.io.File; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | public class GameAppManager { 24 | 25 | 26 | public static List getGameApps(MainActivity context, boolean onlyAddGames){ 27 | PackageManager gamePM = context.getPackageManager(); 28 | List gameAppList = new ArrayList<>(); 29 | List gameAppInfo = gamePM.getInstalledPackages(0); 30 | 31 | for(PackageInfo info : gameAppInfo){ 32 | 33 | if (!isValidPackage(context, info, onlyAddGames)) { 34 | continue; 35 | } 36 | 37 | String appName = info.applicationInfo.loadLabel(gamePM).toString(); 38 | String packages = info.applicationInfo.packageName; 39 | 40 | WrappedDrawable wrappedIcon = new WrappedDrawable(info.applicationInfo.loadIcon(gamePM),0,0,160,160); 41 | 42 | gameAppList.add(new GameApp(appName, wrappedIcon, packages)); 43 | 44 | } 45 | return gameAppList; 46 | } 47 | 48 | public static GameApp getGameApp(Context context, String packageName){ 49 | if (packageName.equals("")) return null; 50 | PackageManager PM = context.getPackageManager(); 51 | try { 52 | 53 | ApplicationInfo app = PM.getApplicationInfo(packageName, 0); 54 | WrappedDrawable wrappedIcon = new WrappedDrawable(PM.getApplicationIcon(app), 0,0,180,180); 55 | String name = PM.getApplicationLabel(app).toString(); 56 | 57 | return new GameApp(name,wrappedIcon,packageName); 58 | } catch (PackageManager.NameNotFoundException e) { 59 | e.printStackTrace(); 60 | } 61 | return null; 62 | } 63 | 64 | private static boolean isSystemPackage( PackageInfo pkgInfo) { 65 | return (pkgInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0; 66 | } 67 | 68 | @SuppressLint("NewApi") 69 | private static boolean isGamePackage(MainActivity context, ApplicationInfo appInfo, boolean onlyAddGames) { 70 | //Little hack to just consider everything as a game when we want everything 71 | if(!onlyAddGames){return true;} 72 | 73 | //Check both the new and deprecated flag since some apps only use the deprecated one... 74 | return ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) && (appInfo.category == ApplicationInfo.CATEGORY_GAME)) || ((appInfo.flags & ApplicationInfo.FLAG_IS_GAME) == ApplicationInfo.FLAG_IS_GAME); 75 | } 76 | 77 | private static boolean isValidPackage(MainActivity context, PackageInfo pkgInfo, boolean onlyAddGames){ 78 | 79 | if((isGamePackage(context, pkgInfo.applicationInfo, onlyAddGames) 80 | && !isSystemPackage(pkgInfo) 81 | && !pkgInfo.packageName.equals(context.getApplicationContext().getPackageName()) 82 | 83 | )){ 84 | for(int i=1;i<=6;i++){ 85 | if(context.settingsManager.getRecentGameApp(i) != null){ 86 | if(context.settingsManager.getRecentGameApp(i).getPackageName().equals(pkgInfo.packageName)){ 87 | return false; 88 | } 89 | } 90 | } 91 | return true; 92 | } 93 | return false; 94 | 95 | 96 | 97 | } 98 | 99 | private static void murderApps(MainActivity context){ 100 | ArrayList murdererList = new ArrayList<>(); 101 | 102 | PackageManager gamePM = context.getPackageManager(); 103 | List gameAppInfo = gamePM.getInstalledPackages(0); 104 | 105 | 106 | final String[] unkillableAppList = new String[]{ 107 | context.getApplication().getPackageName(), 108 | "com.topjohnwu.magisk", 109 | "eu.chainfire.supersu-1" 110 | }; 111 | 112 | for(int i=0;i < gameAppInfo.size(); i++){ 113 | String packageName = gameAppInfo.get(i).packageName; 114 | 115 | boolean isKillable = true; 116 | for(String unkillableApp : unkillableAppList){ 117 | if(isSystemPackage(gameAppInfo.get(i)) || packageName.equals(unkillableApp)){ 118 | isKillable = false; 119 | break; 120 | } 121 | } 122 | if(isKillable){ 123 | murdererList.add("am force-stop ".concat(packageName)); 124 | } 125 | } 126 | 127 | ExecuteADBCommands.execute(murdererList, true); 128 | 129 | } 130 | 131 | 132 | private static void activateLMK(MainActivity context){ 133 | ExecuteADBCommands.execute("cat /sys/module/lowmemorykiller/parameters/minfree > " + context.getApplicationInfo().dataDir + "/lastLMKProfile.backup", true); 134 | 135 | ExecuteADBCommands.execute("echo 2560,5120,11520,25600,35840,358400 > /sys/module/lowmemorykiller/parameters/minfree", true); 136 | } 137 | 138 | public static void restoreOriginalLMK(MainActivity context){ 139 | ExecuteADBCommands.execute("cat " + context.getApplicationInfo().dataDir + "/lastLMKProfile.backup > /sys/module/lowmemorykiller/parameters/minfree", true); 140 | new File(context.getApplicationInfo().dataDir + "/lastLMKProfile.backup").delete(); 141 | } 142 | 143 | public static void launchGameApp(MainActivity context, String packageName){ 144 | 145 | 146 | 147 | //Applying modifications before launching the app: 148 | SettingsManager st = context.settingsManager; 149 | int resolutionScale = context.resolutionSeekBar.getProgress(); 150 | 151 | 152 | //Save the resolution chosen for the game: 153 | st.setLastResolutionScale(context.resolutionSeekBar.getProgress()); 154 | 155 | //Changing the DPI causes the activity layout to restart from scratch, so we have to let a trace informing that we are just changing stuff, not relaunching the app: 156 | 157 | if(!st.keepStockDPI()) { 158 | ExecuteADBCommands.execute("echo '' > " + context.getApplicationInfo().dataDir + "/tmp", st.isRoot()); 159 | } 160 | 161 | st.setScreenDimension( 162 | (int)(Math.ceil(context.coefficients[1]*resolutionScale) + st.getOriginalHeight()), 163 | (int)(Math.ceil(context.coefficients[0]*resolutionScale) + st.getOriginalWidth()) 164 | ); 165 | 166 | if(st.isMurderer()){ 167 | murderApps(context); 168 | } 169 | 170 | if(st.isLMKActivated()){ 171 | activateLMK(context); 172 | } 173 | 174 | 175 | //Launch the app 176 | Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(packageName); 177 | if (launchIntent != null) { 178 | launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 179 | context.startActivity(launchIntent);//null pointer check in case package name was not found 180 | 181 | //Then I kill myself to let all the memory for the game; 182 | context.finish(); 183 | 184 | } 185 | } 186 | 187 | 188 | } 189 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main_options_shown.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 20 | 21 | 27 | 28 | 34 | 35 | 41 | 42 | 48 | 49 | 60 | 61 | 78 | 79 | 100 | 101 | 116 | 117 | 134 | 135 | 152 | 153 | 168 | 169 | 185 | 186 | 199 | 200 | 217 | 218 | 232 | 233 | 246 | 247 | 263 | 264 | 277 | 278 | 293 | 294 | 307 | 308 | 323 | 324 | 337 | 338 | 353 | 354 | 367 | 368 | 383 | 384 | 397 | 398 | 412 | 413 | 429 | 430 | 447 | 448 | 465 | 466 | 482 | 483 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 21 | 22 | 28 | 29 | 35 | 36 | 42 | 43 | 49 | 50 | 61 | 62 | 63 | 80 | 81 | 102 | 103 | 118 | 119 | 136 | 137 | 154 | 155 | 170 | 171 | 187 | 188 | 201 | 202 | 220 | 221 | 233 | 234 | 249 | 250 | 264 | 265 | 280 | 281 | 295 | 296 | 311 | 312 | 326 | 327 | 342 | 343 | 357 | 358 | 373 | 374 | 388 | 389 | 404 | 405 | 416 | 417 | 418 | 433 | 434 | 450 | 451 | 467 | 468 | 484 | 485 | 501 | 502 | 517 | 518 | 519 | -------------------------------------------------------------------------------- /app/src/main/java/com/spse/gameresolutionchanger/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.spse.gameresolutionchanger; 2 | 3 | import android.Manifest; 4 | import android.annotation.SuppressLint; 5 | import android.app.Dialog; 6 | import android.content.Context; 7 | import android.content.DialogInterface; 8 | import android.content.Intent; 9 | import android.content.pm.PackageManager; 10 | import android.graphics.Color; 11 | import android.graphics.drawable.ColorDrawable; 12 | import android.net.Uri; 13 | import android.os.Build; 14 | import android.os.Bundle; 15 | import android.transition.TransitionManager; 16 | import android.util.Log; 17 | import android.view.LayoutInflater; 18 | import android.view.View; 19 | import android.widget.CheckBox; 20 | import android.widget.ImageButton; 21 | import android.widget.ImageView; 22 | import android.widget.LinearLayout; 23 | import android.widget.ProgressBar; 24 | import android.widget.SeekBar; 25 | import android.widget.Space; 26 | import android.widget.TextView; 27 | import android.widget.Toast; 28 | 29 | import androidx.appcompat.app.AlertDialog; 30 | import androidx.appcompat.app.AppCompatActivity; 31 | import androidx.constraintlayout.widget.ConstraintLayout; 32 | import androidx.constraintlayout.widget.ConstraintSet; 33 | import androidx.core.content.ContextCompat; 34 | 35 | import java.io.File; 36 | import java.util.List; 37 | 38 | public class MainActivity extends AppCompatActivity { 39 | //Options variables 40 | TextView FPSPercentage; 41 | TextView tweakedResolution; 42 | SeekBar resolutionSeekBar; 43 | float[] coefficients = new float[2]; //Width, Height 44 | 45 | 46 | ProgressBar circularProgressBar; 47 | int lastProgress = 0; //This is used to set the progress before API 24 48 | ImageButton settingsSwitch; 49 | 50 | SettingsManager settingsManager; 51 | Boolean settingsShown = false; 52 | CheckBox[] optionCheckboxes = new CheckBox[3]; 53 | 54 | ConstraintSet layoutSettingsHidden = new ConstraintSet(); 55 | ConstraintSet layoutSettingShown = new ConstraintSet(); 56 | 57 | //Dialog gameListPopUp; 58 | List gameList; 59 | 60 | //Recently added games 61 | GameApp[] recentGameApp = new GameApp[6]; 62 | TextView[] recentGameAppTitle = new TextView[6]; 63 | ImageButton[] recentGameAppLogo = new ImageButton[6]; 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | @SuppressLint("DefaultLocale") 73 | @Override 74 | protected void onCreate(Bundle savedInstanceState) { 75 | super.onCreate(savedInstanceState); 76 | 77 | 78 | setContentView(R.layout.activity_main); 79 | settingsManager = new SettingsManager(this); 80 | 81 | //Compute coefficient 82 | coefficients[0] = computeCoefficients(true); 83 | coefficients[1] = computeCoefficients(false); 84 | 85 | //Check if we are using native resolution 86 | 87 | //The file created when DPI is changed 88 | File tmpFile = new File(this.getApplicationInfo().dataDir + "/tmp"); 89 | if (tmpFile.exists()){ 90 | tmpFile.delete(); 91 | }else { 92 | if (settingsManager.getOriginalWidth() != settingsManager.getCurrentWidth()) { 93 | showResetPopup(); 94 | } 95 | } 96 | 97 | //Mostly linking stuff to the view 98 | FPSPercentage = findViewById(R.id.textViewPercentage); 99 | FPSPercentage.setText(String.format("+%d%%", (int) (settingsManager.getLastResolutionScale() * 0.8))); 100 | 101 | TextView nativeResolution = findViewById(R.id.textViewNativeResolution); 102 | nativeResolution.setText(String.format("%s\n%dx%d%s", getString(R.string.resolution), settingsManager.getOriginalHeight(), settingsManager.getOriginalWidth(), getString(R.string.progressive))); 103 | tweakedResolution = findViewById(R.id.textViewTweakedResolution); 104 | tweakedResolution.setText(String.format("%s\n%dx%d%s", getString(R.string.resolution_tweaked),(int) ((coefficients[1] * settingsManager.getLastResolutionScale()) + settingsManager.getOriginalHeight()), (int) ((coefficients[0] * settingsManager.getLastResolutionScale()) + settingsManager.getOriginalWidth()) , getString(R.string.progressive))); 105 | 106 | 107 | 108 | resolutionSeekBar = findViewById(R.id.seekBarRes); 109 | resolutionSeekBar.setProgress(settingsManager.getLastResolutionScale()); 110 | 111 | circularProgressBar = findViewById(R.id.progressBar); 112 | circularProgressBar.setProgress(resolutionSeekBar.getProgress()); 113 | lastProgress = resolutionSeekBar.getProgress(); 114 | 115 | ImageButton addGame = findViewById(R.id.addGameButton); 116 | 117 | init(); 118 | 119 | if(!settingsManager.isRoot()){ 120 | showNoRootPopup(); 121 | }else{ 122 | settingsManager.setRootState(true); 123 | } 124 | 125 | if (settingsManager.isFirstLaunch()){ 126 | showDisclaimerPopup(); 127 | } 128 | 129 | //Options 130 | initializeOptions(); 131 | 132 | //Add the click listener for all of them; 133 | setOptionsOnClickListener(); 134 | 135 | //Make them uncheckable since there are hidden 136 | setOptionsClickable(false); 137 | 138 | 139 | //Recent GameApps 140 | initializeRecentGames(); 141 | 142 | 143 | 144 | layoutSettingsHidden.clone((ConstraintLayout) findViewById(R.id.MainActivity)); 145 | layoutSettingShown.clone(this, R.layout.activity_main_options_shown); 146 | 147 | settingsSwitch = findViewById(R.id.imageButtonSettingSwitch); 148 | settingsSwitch.setOnClickListener(new View.OnClickListener() { 149 | @Override 150 | public void onClick(View view) { 151 | TransitionManager.beginDelayedTransition((ConstraintLayout) findViewById(R.id.MainActivity)); 152 | ConstraintSet constrain; 153 | if(settingsShown){ 154 | constrain = layoutSettingsHidden; 155 | setRecentGameAppClickable(true); 156 | setOptionsClickable(false); 157 | }else{ 158 | constrain = layoutSettingShown; 159 | setRecentGameAppClickable(false); 160 | setOptionsClickable(true); 161 | } 162 | 163 | constrain.applyTo((ConstraintLayout) findViewById(R.id.MainActivity)); 164 | settingsShown = !settingsShown; 165 | 166 | } 167 | }); 168 | 169 | resolutionSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { 170 | @Override 171 | public void onProgressChanged(SeekBar seekBar, int i, boolean b) { 172 | circularProgressBar.incrementProgressBy((i- lastProgress)); 173 | lastProgress = i; 174 | FPSPercentage.setText(String.format("+%d%%", (int) (i * 0.8))); 175 | 176 | tweakedResolution.setText(String.format("%s\n%dx%d%s", getString(R.string.resolution_tweaked),(int) (Math.ceil(coefficients[1] * i) + settingsManager.getOriginalHeight()), (int) (Math.ceil(coefficients[0] * i) + settingsManager.getOriginalWidth()), getString(R.string.progressive))); 177 | } 178 | 179 | @Override 180 | public void onStartTrackingTouch(SeekBar seekBar) {} 181 | 182 | @Override 183 | public void onStopTrackingTouch(SeekBar seekBar) {} 184 | }); 185 | 186 | addGame.setOnClickListener(new View.OnClickListener() { 187 | @Override 188 | public void onClick(View view) { 189 | showAddGame(true, settingsManager.findFirstEmptyRecentGameApp()); 190 | } 191 | }); 192 | 193 | 194 | } 195 | 196 | 197 | void init() { 198 | int canWriteSecureSettings = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_SECURE_SETTINGS); 199 | Log.d("CAN WRITE SECURE SET: ", String.valueOf(canWriteSecureSettings)); 200 | 201 | Log.d("DEVICE RAM","IS LOW ?"); 202 | 203 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.R ) { 204 | int canQueryPackages = ContextCompat.checkSelfPermission(this, Manifest.permission.QUERY_ALL_PACKAGES); 205 | Log.d("QUERY PACKAGES", String.valueOf(canQueryPackages)); 206 | if(canQueryPackages == -1 /*Permission denied*/ ){ 207 | Toast.makeText(this,"No permission",Toast.LENGTH_LONG).show(); 208 | } 209 | } 210 | 211 | return; 212 | } 213 | 214 | void showGameListPopup(Context context, boolean onlyAddGames, final int gameAppIndex){ 215 | final Dialog gameListPopUp = new Dialog(this); 216 | 217 | int xScreen = context.getResources().getDisplayMetrics().widthPixels; 218 | int yScreen = context.getResources().getDisplayMetrics().heightPixels; 219 | 220 | gameListPopUp.setContentView(R.layout.add_game_layout); 221 | gameListPopUp.getWindow().setLayout((int) Math.ceil(xScreen*0.90),(int) Math.min(Math.ceil(yScreen*0.85),gameList.size()*200 + (onlyAddGames ? 200 : 0)) );//The magic number 200 correspond to one GameApp item + one space 222 | 223 | LinearLayout layout = (LinearLayout) gameListPopUp.findViewById(R.id.gameListLayout); 224 | LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); 225 | 226 | 227 | for(int i = 0; i < gameList.size(); i++ ){ 228 | 229 | View child = inflater.inflate(R.layout.game_app_item, null); 230 | TextView title = child.findViewById(R.id.textViewGameAppTitle); 231 | final TextView packageName = child.findViewById(R.id.textViewGameAppPackageName); 232 | ImageView icon = child.findViewById(R.id.imageViewGameIcon); 233 | 234 | GameApp game = gameList.get(i); 235 | 236 | title.setText(game.getGameName()); 237 | packageName.setText(game.getPackageName()); 238 | icon.setImageDrawable(game.getIcon()); 239 | 240 | 241 | layout.addView(child); 242 | 243 | child.setOnClickListener(new View.OnClickListener() { 244 | @Override 245 | public void onClick(View view) { 246 | test(packageName.getText().toString()); 247 | //settingsManager.addGameApp(packageName.getText().toString()); 248 | 249 | gameListPopUp.dismiss(); 250 | addGameUI(packageName.getText().toString(), gameAppIndex); 251 | //GameAppManager.launchGameApp(MainActivity.this,packageName.getText().toString()); 252 | } 253 | }); 254 | 255 | child = new Space(this); 256 | child.setMinimumHeight(10); 257 | 258 | layout.addView(child); 259 | 260 | 261 | } 262 | if(onlyAddGames){ 263 | View lastChild = inflater.inflate(R.layout.no_game_app_item, null); 264 | layout.addView(lastChild); 265 | lastChild.setOnClickListener(new View.OnClickListener() { 266 | @Override 267 | public void onClick(View v) { 268 | 269 | gameListPopUp.dismiss(); 270 | gameList = GameAppManager.getGameApps(MainActivity.this, false); 271 | showGameListPopup(MainActivity.this, false, gameAppIndex); 272 | 273 | } 274 | }); 275 | } 276 | 277 | gameListPopUp.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); 278 | gameListPopUp.show(); 279 | } 280 | 281 | 282 | public void test(String str){ 283 | Log.d("PackageName: ", str); 284 | } 285 | 286 | 287 | private void initializeOptions(){ 288 | //Link option switches 289 | optionCheckboxes[0] = findViewById(R.id.checkBoxAggressive); 290 | optionCheckboxes[1] = findViewById(R.id.checkBoxMurderer); 291 | optionCheckboxes[2] = findViewById(R.id.checkBoxStockDPI); 292 | 293 | //Load their previous state: 294 | optionCheckboxes[0].setChecked(settingsManager.isLMKActivated()); 295 | optionCheckboxes[1].setChecked(settingsManager.isMurderer()); 296 | optionCheckboxes[2].setChecked(settingsManager.keepStockDPI()); 297 | 298 | 299 | } 300 | 301 | public void setOptionsClickable(boolean state) { 302 | for (int i = 0; i < optionCheckboxes.length; i++) { 303 | optionCheckboxes[i].setClickable(state); 304 | } 305 | return; 306 | } 307 | 308 | private void setOptionsOnClickListener(){ 309 | //If you have a non-rooted device, use the non rooted behavior instead 310 | if(settingsManager.isRoot()) { 311 | optionCheckboxes[0].setOnClickListener(new View.OnClickListener() { 312 | @Override 313 | public void onClick(View v) { 314 | settingsManager.setLMK(optionCheckboxes[0].isChecked()); 315 | } 316 | }); 317 | 318 | optionCheckboxes[1].setOnClickListener(new View.OnClickListener() { 319 | @Override 320 | public void onClick(View v) { 321 | settingsManager.setMurderer(optionCheckboxes[1].isChecked()); 322 | } 323 | }); 324 | }else{ 325 | optionCheckboxes[0].setOnClickListener(new View.OnClickListener() { 326 | @Override 327 | public void onClick(View v) { 328 | optionCheckboxes[0].setChecked(false); 329 | Toast.makeText(MainActivity.this, getString(R.string.no_permission_toast), Toast.LENGTH_SHORT).show(); 330 | } 331 | }); 332 | 333 | optionCheckboxes[1].setOnClickListener(new View.OnClickListener() { 334 | @Override 335 | public void onClick(View v) { 336 | optionCheckboxes[1].setChecked(false); 337 | Toast.makeText(MainActivity.this, getString(R.string.no_permission_toast), Toast.LENGTH_SHORT).show(); 338 | } 339 | }); 340 | } 341 | 342 | optionCheckboxes[2].setOnClickListener(new View.OnClickListener() { 343 | @Override 344 | public void onClick(View v) { 345 | settingsManager.setKeepStockDPI(optionCheckboxes[2].isChecked()); 346 | } 347 | }); 348 | } 349 | 350 | private void initializeRecentGames(){ 351 | //Link recent games stuff 352 | recentGameAppTitle[0] = findViewById(R.id.textViewRecentGame1); 353 | recentGameAppTitle[1] = findViewById(R.id.textViewRecentGame2); 354 | recentGameAppTitle[2] = findViewById(R.id.textViewRecentGame3); 355 | recentGameAppTitle[3] = findViewById(R.id.textViewRecentGame4); 356 | recentGameAppTitle[4] = findViewById(R.id.textViewRecentGame5); 357 | recentGameAppTitle[5] = findViewById(R.id.textViewRecentGame6); 358 | 359 | recentGameAppLogo[0] = findViewById(R.id.imageViewRecentGame1); 360 | recentGameAppLogo[1] = findViewById(R.id.imageViewRecentGame2); 361 | recentGameAppLogo[2] = findViewById(R.id.imageViewRecentGame3); 362 | recentGameAppLogo[3] = findViewById(R.id.imageViewRecentGame4); 363 | recentGameAppLogo[4] = findViewById(R.id.imageViewRecentGame5); 364 | recentGameAppLogo[5] = findViewById(R.id.imageViewRecentGame6); 365 | 366 | loadRecentGamesUI(); 367 | } 368 | 369 | private void loadRecentGamesUI(){ 370 | //Now we need to load recent games 371 | for(int i=0; i<6; i++){ 372 | recentGameApp[i] = settingsManager.getRecentGameApp(i+1); 373 | final int finalI = i; 374 | if(recentGameApp[i] != null) { 375 | recentGameAppTitle[i].setText(recentGameApp[i].getGameName()); 376 | recentGameAppLogo[i].setImageDrawable(recentGameApp[i].getIcon()); 377 | 378 | 379 | recentGameAppLogo[i].setOnClickListener(new View.OnClickListener() { 380 | @Override 381 | public void onClick(View view) { 382 | GameAppManager.launchGameApp(MainActivity.this, recentGameApp[finalI].getPackageName()); 383 | } 384 | }); 385 | recentGameAppLogo[i].setOnLongClickListener(new View.OnLongClickListener() { 386 | @Override 387 | public boolean onLongClick(View view) { 388 | //The long click is used to delete an app 389 | //Todo create a complete sub menu 390 | showRemoveGamePopup(MainActivity.this, finalI); 391 | return false; 392 | } 393 | }); 394 | }else{ 395 | //No game yet, let's add a game 396 | recentGameAppTitle[i].setText(R.string.empty_recent_game); 397 | recentGameAppLogo[i].setImageDrawable(ContextCompat.getDrawable(MainActivity.this, R.drawable.empty_recent_game)); 398 | 399 | recentGameAppLogo[i].setOnClickListener(new View.OnClickListener() { 400 | @Override 401 | public void onClick(View v) { 402 | showAddGame(true, finalI); 403 | } 404 | }); 405 | } 406 | } 407 | return; 408 | } 409 | 410 | private void setRecentGameAppClickable(boolean state){ 411 | for(int i = 0; i<5; i++){ 412 | recentGameAppLogo[i].setClickable(state); 413 | } 414 | } 415 | 416 | public float computeCoefficients(boolean computeWidth){ 417 | if(computeWidth){ 418 | //Compute the width coefficient 419 | return (float) (-settingsManager.getOriginalWidth()*0.005); 420 | }else{ 421 | //Compute the height coefficient 422 | return (float) (-settingsManager.getOriginalHeight()*0.005); 423 | } 424 | } 425 | 426 | private void showResetPopup(){ 427 | AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); 428 | 429 | // 2. Chain together various setter methods to set the dialog characteristics 430 | builder.setTitle(R.string.reset_popup_title) 431 | .setMessage(R.string.reset_popup_text) 432 | .setPositiveButton(R.string.reset_popup_positive_choice, new DialogInterface.OnClickListener() { 433 | @Override 434 | public void onClick(DialogInterface dialog, int which) { 435 | dialog.dismiss(); 436 | GameAppManager.restoreOriginalLMK(MainActivity.this); 437 | settingsManager.setScreenDimension(settingsManager.getOriginalHeight(), settingsManager.getOriginalWidth()); 438 | 439 | } 440 | }) 441 | .setNegativeButton(R.string.reset_popup_negative_choice, new DialogInterface.OnClickListener() { 442 | @Override 443 | public void onClick(DialogInterface dialog, int which) { 444 | Log.d("NEGATIVE CHOICE BUTTON", "PRESSED"); 445 | dialog.dismiss(); 446 | } 447 | }); 448 | 449 | 450 | AlertDialog dialog = builder.create(); 451 | 452 | dialog.show(); 453 | } 454 | 455 | private void showNoRootPopup(){ 456 | AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); 457 | 458 | // 2. Chain together various setter methods to set the dialog characteristics 459 | builder.setTitle(R.string.no_root_popup_title) 460 | .setMessage(R.string.no_root_popup_text) 461 | .setPositiveButton(R.string.no_root_popup_positive_choice, new DialogInterface.OnClickListener() { 462 | @Override 463 | public void onClick(DialogInterface dialog, int which) { 464 | dialog.dismiss(); 465 | int canWriteSecureSettings = ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.WRITE_SECURE_SETTINGS); 466 | if(canWriteSecureSettings == PackageManager.PERMISSION_DENIED){ 467 | showNoPermissionsPopup(); 468 | }else{ 469 | //The no-root method is ready, so we register it in the settings; 470 | settingsManager.setRootState(false); 471 | } 472 | 473 | 474 | } 475 | }) 476 | .setNegativeButton(R.string.no_root_popup_negative_choice, new DialogInterface.OnClickListener() { 477 | @Override 478 | public void onClick(DialogInterface dialog, int which) { 479 | Log.d("NEGATIVE CHOICE BUTTON", "PRESSED"); 480 | dialog.dismiss(); 481 | finish(); 482 | } 483 | }).setCancelable(false); 484 | 485 | 486 | AlertDialog dialog = builder.create(); 487 | 488 | dialog.show(); 489 | } 490 | 491 | private void showNoPermissionsPopup(){ 492 | AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); 493 | 494 | // 2. Chain together various setter methods to set the dialog characteristics 495 | builder.setTitle(R.string.no_permission_popup_title) 496 | .setMessage(R.string.no_permission_popup_text) 497 | .setPositiveButton(R.string.no_permission_popup_positive_choice, new DialogInterface.OnClickListener() { 498 | @Override 499 | public void onClick(DialogInterface dialog, int which) { 500 | dialog.dismiss(); 501 | 502 | Uri url = Uri.parse(getString(R.string.link_to_setup)); 503 | Intent intent = new Intent(Intent.ACTION_VIEW, url); 504 | if (intent.resolveActivity(getPackageManager()) != null) { 505 | startActivity(intent); 506 | } 507 | finish(); 508 | 509 | } 510 | }) 511 | .setNegativeButton(R.string.no_permission_popup_negative_choice, new DialogInterface.OnClickListener() { 512 | @Override 513 | public void onClick(DialogInterface dialog, int which) { 514 | Log.d("NEGATIVE CHOICE BUTTON", "PRESSED"); 515 | dialog.dismiss(); 516 | finish(); 517 | } 518 | }); 519 | 520 | 521 | AlertDialog dialog = builder.create(); 522 | 523 | dialog.show(); 524 | } 525 | 526 | private void showDisclaimerPopup(){ 527 | AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this); 528 | 529 | // 2. Chain together various setter methods to set the dialog characteristics 530 | builder.setTitle(R.string.disclaimer_popup_title) 531 | .setMessage(R.string.disclaimer_popup_text) 532 | .setPositiveButton(R.string.disclaimer_popup_positive_choice, new DialogInterface.OnClickListener() { 533 | @Override 534 | public void onClick(DialogInterface dialog, int which) { 535 | dialog.dismiss(); 536 | //The user accepted, meaning he entered the app for the first time 537 | settingsManager.initializeFirstLaunch(); 538 | 539 | } 540 | }) 541 | .setNegativeButton(R.string.disclaimer_popup_negative_choice, new DialogInterface.OnClickListener() { 542 | @Override 543 | public void onClick(DialogInterface dialog, int which) { 544 | Log.d("NEGATIVE CHOICE BUTTON", "PRESSED"); 545 | dialog.dismiss(); 546 | finish(); 547 | } 548 | }).setCancelable(false); 549 | 550 | 551 | AlertDialog dialog = builder.create(); 552 | 553 | dialog.show(); 554 | } 555 | 556 | void showRemoveGamePopup(Context context, final int gameAppIndex){ 557 | final Dialog gameListPopUp = new Dialog(this); 558 | 559 | final int xScreen = context.getResources().getDisplayMetrics().widthPixels; 560 | final int yScreen = context.getResources().getDisplayMetrics().heightPixels; 561 | 562 | gameListPopUp.setContentView(R.layout.add_game_layout); 563 | gameListPopUp.getWindow().setLayout((int) Math.ceil(xScreen*0.90),(int) Math.min(Math.ceil(yScreen*0.85), 204*2 /*204 x number of items*/) );//The magic number 200 correspond to one GameApp item + one space 564 | 565 | LinearLayout layout = (LinearLayout) gameListPopUp.findViewById(R.id.gameListLayout); 566 | LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); 567 | 568 | 569 | 570 | //First the GameApp to show details 571 | View child = inflater.inflate(R.layout.game_app_item, null); 572 | TextView title = child.findViewById(R.id.textViewGameAppTitle); 573 | TextView packageName = child.findViewById(R.id.textViewGameAppPackageName); 574 | ImageView icon = child.findViewById(R.id.imageViewGameIcon); 575 | 576 | GameApp game = settingsManager.getRecentGameApp(gameAppIndex+1); 577 | 578 | title.setText(game.getGameName()); 579 | packageName.setText(game.getPackageName()); 580 | icon.setImageDrawable(game.getIcon()); 581 | 582 | layout.addView(child); 583 | 584 | 585 | //Then a space 586 | child = new Space(this); 587 | child.setMinimumHeight(10); 588 | 589 | layout.addView(child); 590 | 591 | //Then the remove from list button 592 | child = inflater.inflate(R.layout.detail_item, null); 593 | title = child.findViewById(R.id.textViewGameAppTitle); 594 | packageName = child.findViewById(R.id.textViewGameAppPackageName); 595 | 596 | title.setText(getString(R.string.remove_popup_title)); 597 | packageName.setText(getString(R.string.remove_popup_text)); 598 | 599 | layout.addView(child); 600 | 601 | child.setOnClickListener(new View.OnClickListener() { 602 | @Override 603 | public void onClick(View view) { 604 | removeGameUI(gameAppIndex); 605 | gameListPopUp.dismiss(); 606 | } 607 | }); 608 | 609 | 610 | 611 | 612 | 613 | gameListPopUp.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); 614 | gameListPopUp.show(); 615 | } 616 | 617 | private void showAddGame(boolean onlyAddGames, int gameAppIndex){ 618 | gameList = GameAppManager.getGameApps(MainActivity.this, onlyAddGames); 619 | showGameListPopup(MainActivity.this, onlyAddGames, gameAppIndex); 620 | } 621 | 622 | private void addGameUI(String packageName, int index){ 623 | settingsManager.addGameApp(packageName, index); 624 | loadRecentGamesUI(); 625 | } 626 | 627 | private void removeGameUI(int index){ 628 | settingsManager.removeGameApp(index); 629 | loadRecentGamesUI(); 630 | } 631 | 632 | @Override 633 | public void onBackPressed() { 634 | if (settingsShown){ 635 | //Simulate a button click on the setting switch button 636 | settingsSwitch.performClick(); 637 | return; 638 | } 639 | super.onBackPressed(); 640 | } 641 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | --------------------------------------------------------------------------------