├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── grarak │ │ └── kerneladiutor │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── downloads.json │ │ ├── gamma_profiles.json │ │ └── temp.json │ ├── java │ │ └── com │ │ │ ├── bvalosek │ │ │ └── cpuspy │ │ │ │ ├── CpuSpyApp.java │ │ │ │ └── CpuStateMonitor.java │ │ │ ├── grarak │ │ │ └── kerneladiutor │ │ │ │ ├── activities │ │ │ │ ├── BannerResizerActivity.java │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── EditorActivity.java │ │ │ │ ├── FilePickerActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── NavigationActivity.java │ │ │ │ ├── SecurityActivity.java │ │ │ │ ├── StartActivity.java │ │ │ │ ├── StartActivityMaterial.java │ │ │ │ ├── TextActivity.java │ │ │ │ └── tools │ │ │ │ │ ├── CustomControlsActivity.java │ │ │ │ │ ├── DownloadsActivity.java │ │ │ │ │ └── profile │ │ │ │ │ ├── ProfileActivity.java │ │ │ │ │ ├── ProfileEditActivity.java │ │ │ │ │ └── ProfileTaskerActivity.java │ │ │ │ ├── database │ │ │ │ ├── Provider.java │ │ │ │ ├── Settings.java │ │ │ │ └── tools │ │ │ │ │ ├── customcontrols │ │ │ │ │ ├── Controls.java │ │ │ │ │ ├── ExportControl.java │ │ │ │ │ └── ImportControl.java │ │ │ │ │ └── profiles │ │ │ │ │ ├── ExportProfile.java │ │ │ │ │ ├── ImportProfile.java │ │ │ │ │ └── Profiles.java │ │ │ │ ├── fragments │ │ │ │ ├── ApplyOnBootFragment.java │ │ │ │ ├── BaseFragment.java │ │ │ │ ├── DescriptionFragment.java │ │ │ │ ├── RecyclerViewFragment.java │ │ │ │ ├── SwitcherFragment.java │ │ │ │ ├── kernel │ │ │ │ │ ├── BatteryFragment.java │ │ │ │ │ ├── CPUFragment.java │ │ │ │ │ ├── CPUHotplugFragment.java │ │ │ │ │ ├── CPUVoltageFragment.java │ │ │ │ │ ├── EntropyFragment.java │ │ │ │ │ ├── GPUFragment.java │ │ │ │ │ ├── IOFragment.java │ │ │ │ │ ├── KSMFragment.java │ │ │ │ │ ├── LEDFragment.java │ │ │ │ │ ├── LMKFragment.java │ │ │ │ │ ├── MiscFragment.java │ │ │ │ │ ├── PathReaderFragment.java │ │ │ │ │ ├── ScreenFragment.java │ │ │ │ │ ├── SoundFragment.java │ │ │ │ │ ├── ThermalFragment.java │ │ │ │ │ ├── VMFragment.java │ │ │ │ │ └── WakeFragment.java │ │ │ │ ├── other │ │ │ │ │ ├── AboutFragment.java │ │ │ │ │ ├── ContributorsFragment.java │ │ │ │ │ ├── HelpFragment.java │ │ │ │ │ └── SettingsFragment.java │ │ │ │ ├── statistics │ │ │ │ │ ├── DeviceFragment.java │ │ │ │ │ ├── InputsFragment.java │ │ │ │ │ ├── MemoryFragment.java │ │ │ │ │ └── OverallFragment.java │ │ │ │ └── tools │ │ │ │ │ ├── BackupFragment.java │ │ │ │ │ ├── BuildpropFragment.java │ │ │ │ │ ├── InitdFragment.java │ │ │ │ │ ├── OnBootFragment.java │ │ │ │ │ ├── ProfileFragment.java │ │ │ │ │ ├── RecoveryFragment.java │ │ │ │ │ ├── customcontrols │ │ │ │ │ ├── CreateFragment.java │ │ │ │ │ └── CustomControlsFragment.java │ │ │ │ │ └── downloads │ │ │ │ │ ├── AboutFragment.java │ │ │ │ │ ├── DownloadKernelFragment.java │ │ │ │ │ ├── DownloadsFragment.java │ │ │ │ │ └── FeaturesFragment.java │ │ │ │ ├── services │ │ │ │ ├── DashClock.java │ │ │ │ ├── boot │ │ │ │ │ ├── ApplyOnBoot.java │ │ │ │ │ ├── ApplyOnBootService.java │ │ │ │ │ └── OnBootReceiver.java │ │ │ │ └── profile │ │ │ │ │ ├── Tasker.java │ │ │ │ │ ├── Tile.java │ │ │ │ │ └── Widget.java │ │ │ │ ├── utils │ │ │ │ ├── Device.java │ │ │ │ ├── DownloadTask.java │ │ │ │ ├── FingerprintUiHelper.java │ │ │ │ ├── NotificationId.java │ │ │ │ ├── Prefs.java │ │ │ │ ├── Utils.java │ │ │ │ ├── ViewUtils.java │ │ │ │ ├── WebpageReader.java │ │ │ │ ├── kernel │ │ │ │ │ ├── Switch.java │ │ │ │ │ ├── battery │ │ │ │ │ │ └── Battery.java │ │ │ │ │ ├── cpu │ │ │ │ │ │ ├── CPUBoost.java │ │ │ │ │ │ ├── CPUFreq.java │ │ │ │ │ │ ├── MSMPerformance.java │ │ │ │ │ │ ├── Misc.java │ │ │ │ │ │ └── Temperature.java │ │ │ │ │ ├── cpuhotplug │ │ │ │ │ │ ├── AiOHotplug.java │ │ │ │ │ │ ├── AlucardHotplug.java │ │ │ │ │ │ ├── AutoSmp.java │ │ │ │ │ │ ├── BluPlug.java │ │ │ │ │ │ ├── CoreCtl.java │ │ │ │ │ │ ├── Hotplug.java │ │ │ │ │ │ ├── IntelliPlug.java │ │ │ │ │ │ ├── LazyPlug.java │ │ │ │ │ │ ├── MBHotplug.java │ │ │ │ │ │ ├── MPDecision.java │ │ │ │ │ │ ├── MSMHotplug.java │ │ │ │ │ │ ├── MakoHotplug.java │ │ │ │ │ │ ├── QcomBcl.java │ │ │ │ │ │ ├── ThunderPlug.java │ │ │ │ │ │ └── ZenDecision.java │ │ │ │ │ ├── cpuvoltage │ │ │ │ │ │ └── Voltage.java │ │ │ │ │ ├── entropy │ │ │ │ │ │ └── Entropy.java │ │ │ │ │ ├── gpu │ │ │ │ │ │ ├── AdrenoIdler.java │ │ │ │ │ │ ├── GPU.java │ │ │ │ │ │ ├── GPUFreq.java │ │ │ │ │ │ └── SimpleGPU.java │ │ │ │ │ ├── io │ │ │ │ │ │ └── IO.java │ │ │ │ │ ├── ksm │ │ │ │ │ │ └── KSM.java │ │ │ │ │ ├── led │ │ │ │ │ │ ├── LED.java │ │ │ │ │ │ └── Sec.java │ │ │ │ │ ├── lmk │ │ │ │ │ │ └── LMK.java │ │ │ │ │ ├── misc │ │ │ │ │ │ ├── Misc.java │ │ │ │ │ │ ├── PowerSuspend.java │ │ │ │ │ │ ├── Vibration.java │ │ │ │ │ │ └── Wakelocks.java │ │ │ │ │ ├── screen │ │ │ │ │ │ ├── Calibration.java │ │ │ │ │ │ ├── Gamma.java │ │ │ │ │ │ ├── GammaProfiles.java │ │ │ │ │ │ ├── Misc.java │ │ │ │ │ │ └── Screen.java │ │ │ │ │ ├── sound │ │ │ │ │ │ └── Sound.java │ │ │ │ │ ├── thermal │ │ │ │ │ │ ├── MSMThermal.java │ │ │ │ │ │ ├── Thermal.java │ │ │ │ │ │ └── Thermald.java │ │ │ │ │ ├── vm │ │ │ │ │ │ ├── VM.java │ │ │ │ │ │ ├── ZRAM.java │ │ │ │ │ │ └── ZSwap.java │ │ │ │ │ └── wake │ │ │ │ │ │ ├── Dt2s.java │ │ │ │ │ │ ├── Dt2w.java │ │ │ │ │ │ ├── Gestures.java │ │ │ │ │ │ ├── Misc.java │ │ │ │ │ │ ├── S2s.java │ │ │ │ │ │ ├── S2w.java │ │ │ │ │ │ ├── T2w.java │ │ │ │ │ │ └── Wake.java │ │ │ │ ├── other │ │ │ │ │ └── Contributors.java │ │ │ │ ├── root │ │ │ │ │ ├── Control.java │ │ │ │ │ ├── RootFile.java │ │ │ │ │ └── RootUtils.java │ │ │ │ ├── server │ │ │ │ │ ├── DeviceInfo.java │ │ │ │ │ ├── Server.java │ │ │ │ │ ├── ServerCreateDevice.java │ │ │ │ │ └── ServerSearchDevice.java │ │ │ │ └── tools │ │ │ │ │ ├── Backup.java │ │ │ │ │ ├── Buildprop.java │ │ │ │ │ ├── Initd.java │ │ │ │ │ ├── Recovery.java │ │ │ │ │ ├── SupportedDownloads.java │ │ │ │ │ └── customcontrols │ │ │ │ │ ├── CustomControlException.java │ │ │ │ │ ├── Items.java │ │ │ │ │ └── Values.java │ │ │ │ └── views │ │ │ │ ├── BorderCircleView.java │ │ │ │ ├── ColorTable.java │ │ │ │ ├── NavHeaderView.java │ │ │ │ ├── XYGraph.java │ │ │ │ ├── dialog │ │ │ │ ├── Dialog.java │ │ │ │ └── ViewPagerDialog.java │ │ │ │ ├── preference │ │ │ │ └── ColorPreference.java │ │ │ │ └── recyclerview │ │ │ │ ├── ButtonView.java │ │ │ │ ├── CardView.java │ │ │ │ ├── ContributorView.java │ │ │ │ ├── DescriptionView.java │ │ │ │ ├── DropDownView.java │ │ │ │ ├── EditTextView.java │ │ │ │ ├── GenericSelectView.java │ │ │ │ ├── RecyclerViewAdapter.java │ │ │ │ ├── RecyclerViewItem.java │ │ │ │ ├── SeekBarView.java │ │ │ │ ├── SelectView.java │ │ │ │ ├── StatsView.java │ │ │ │ ├── SwitchView.java │ │ │ │ ├── TitleView.java │ │ │ │ ├── ValueView.java │ │ │ │ ├── XYGraphView.java │ │ │ │ ├── customcontrols │ │ │ │ ├── CodeView.java │ │ │ │ └── ErrorView.java │ │ │ │ ├── downloads │ │ │ │ ├── DownloadAboutView.java │ │ │ │ ├── DownloadKernelView.java │ │ │ │ └── KernelItemView.java │ │ │ │ └── overallstatistics │ │ │ │ ├── FrequencyButtonView.java │ │ │ │ ├── FrequencyTableView.java │ │ │ │ └── TemperatureView.java │ │ │ └── viewpagerindicator │ │ │ ├── CirclePageIndicator.java │ │ │ └── PageIndicator.java │ └── res │ │ ├── anim │ │ └── slide_in_bottom.xml │ │ ├── drawable │ │ ├── drawable_frame_dark.xml │ │ ├── drawable_frame_light.xml │ │ ├── dropshadow.xml │ │ ├── ic_about.xml │ │ ├── ic_add.xml │ │ ├── ic_arrow.xml │ │ ├── ic_banner.png │ │ ├── ic_banner_material.png │ │ ├── ic_battery.xml │ │ ├── ic_blank.xml │ │ ├── ic_bolt.xml │ │ ├── ic_cancel.xml │ │ ├── ic_chart.xml │ │ ├── ic_clear.xml │ │ ├── ic_console.xml │ │ ├── ic_cpu.xml │ │ ├── ic_database.xml │ │ ├── ic_device.xml │ │ ├── ic_dir.xml │ │ ├── ic_display.xml │ │ ├── ic_done.xml │ │ ├── ic_dots.xml │ │ ├── ic_download.xml │ │ ├── ic_edit.xml │ │ ├── ic_file.xml │ │ ├── ic_gallery.xml │ │ ├── ic_github.png │ │ ├── ic_googleplus.png │ │ ├── ic_gpu.xml │ │ ├── ic_help.xml │ │ ├── ic_keyboard.xml │ │ ├── ic_launcher_preview.png │ │ ├── ic_layers.xml │ │ ├── ic_led.xml │ │ ├── ic_merge.xml │ │ ├── ic_music.xml │ │ ├── ic_numbers.xml │ │ ├── ic_paypal.png │ │ ├── ic_people.xml │ │ ├── ic_profile.jpeg │ │ ├── ic_refresh.xml │ │ ├── ic_restore.xml │ │ ├── ic_save.xml │ │ ├── ic_sdcard.xml │ │ ├── ic_search.xml │ │ ├── ic_security.xml │ │ ├── ic_server.xml │ │ ├── ic_settings.xml │ │ ├── ic_shell.xml │ │ ├── ic_stackoverflow.xml │ │ ├── ic_start.xml │ │ ├── ic_switch.xml │ │ ├── ic_temperature.xml │ │ ├── ic_unlock.xml │ │ ├── ic_xda.png │ │ └── profile_widget_preview.jpg │ │ ├── layout-land │ │ └── fragment_banner_resizer.xml │ │ ├── layout │ │ ├── activity_downloads.xml │ │ ├── activity_editor.xml │ │ ├── activity_fragments.xml │ │ ├── activity_main.xml │ │ ├── activity_navigation.xml │ │ ├── activity_profile.xml │ │ ├── activity_security.xml │ │ ├── activity_text.xml │ │ ├── ad_native_express_view.xml │ │ ├── app_bar_main.xml │ │ ├── dialog_datasharing_device.xml │ │ ├── fragment_apply_on_boot.xml │ │ ├── fragment_banner_resizer.xml │ │ ├── fragment_buildprop_search.xml │ │ ├── fragment_description.xml │ │ ├── fragment_global_offset.xml │ │ ├── fragment_info.xml │ │ ├── fragment_profile_details.xml │ │ ├── fragment_profile_dialog.xml │ │ ├── fragment_recovery_options.xml │ │ ├── fragment_recyclerview.xml │ │ ├── fragment_selector.xml │ │ ├── fragment_switcher.xml │ │ ├── fragment_usage_view.xml │ │ ├── nav_header_layout.xml │ │ ├── nav_header_view.xml │ │ ├── preference_color_view.xml │ │ ├── rv_button.xml │ │ ├── rv_card_view.xml │ │ ├── rv_code_view.xml │ │ ├── rv_contributor_view.xml │ │ ├── rv_datasharing_device.xml │ │ ├── rv_datasharing_page.xml │ │ ├── rv_description_view.xml │ │ ├── rv_download_about_view.xml │ │ ├── rv_download_kernel_view.xml │ │ ├── rv_drop_down_item_view.xml │ │ ├── rv_drop_down_view.xml │ │ ├── rv_edittext_view.xml │ │ ├── rv_error_view.xml │ │ ├── rv_frequencytable_buttons_view.xml │ │ ├── rv_frequencytable_view.xml │ │ ├── rv_kernel_item_view.xml │ │ ├── rv_seekbar_view.xml │ │ ├── rv_stats_view.xml │ │ ├── rv_switch_view.xml │ │ ├── rv_temperature_view.xml │ │ ├── rv_title_view.xml │ │ ├── rv_value_view.xml │ │ ├── rv_xygraph_view.xml │ │ ├── viewpager_view.xml │ │ ├── widget_profile.xml │ │ └── widget_profile_item.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_material.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_material.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_material.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_material.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_material.png │ │ ├── values-af │ │ └── strings.xml │ │ ├── values-ar │ │ └── strings.xml │ │ ├── values-ast-rES │ │ └── strings.xml │ │ ├── values-az │ │ └── strings.xml │ │ ├── values-bg │ │ └── strings.xml │ │ ├── values-ca │ │ └── strings.xml │ │ ├── values-cs │ │ └── strings.xml │ │ ├── values-da │ │ └── strings.xml │ │ ├── values-de │ │ └── strings.xml │ │ ├── values-el │ │ └── strings.xml │ │ ├── values-es │ │ └── strings.xml │ │ ├── values-et │ │ └── strings.xml │ │ ├── values-fi │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-he │ │ └── strings.xml │ │ ├── values-hi │ │ └── strings.xml │ │ ├── values-hr │ │ └── strings.xml │ │ ├── values-hu │ │ └── strings.xml │ │ ├── values-hy-rAM │ │ └── strings.xml │ │ ├── values-id │ │ └── strings.xml │ │ ├── values-it │ │ └── strings.xml │ │ ├── values-ja │ │ └── strings.xml │ │ ├── values-kn │ │ └── strings.xml │ │ ├── values-ko │ │ └── strings.xml │ │ ├── values-nl │ │ └── strings.xml │ │ ├── values-no │ │ └── strings.xml │ │ ├── values-pl │ │ └── strings.xml │ │ ├── values-pt-rBR │ │ └── strings.xml │ │ ├── values-pt-rPT │ │ └── strings.xml │ │ ├── values-ro │ │ └── strings.xml │ │ ├── values-ru │ │ └── strings.xml │ │ ├── values-sk │ │ └── strings.xml │ │ ├── values-sl │ │ └── strings.xml │ │ ├── values-sr │ │ └── strings.xml │ │ ├── values-sv │ │ └── strings.xml │ │ ├── values-tr │ │ └── strings.xml │ │ ├── values-uk │ │ └── strings.xml │ │ ├── values-v21 │ │ ├── dimens.xml │ │ └── styles.xml │ │ ├── values-vi │ │ └── strings.xml │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ └── strings.xml │ │ ├── values │ │ ├── accents.xml │ │ ├── arrays.xml │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── ids.xml │ │ ├── pageindicator.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── profile_widget.xml │ │ ├── settings.xml │ │ └── shortcuts.xml │ └── test │ └── java │ └── com │ └── grarak │ └── kerneladiutor │ └── ExampleUnitTest.java ├── build.gradle ├── controls └── selinux.json ├── download ├── angler.json ├── condor.json ├── desire816.json ├── falcon.json ├── g3.json ├── g3beat_jag3gds.json ├── g3beat_jagnm.json ├── galaxyr.json ├── galaxys5.json ├── galaxys7.json ├── galaxys7edge.json ├── jalebi.json ├── lettuce.json ├── nicki.json ├── oneplusone.json ├── peregrine.json ├── quark.json ├── s2.json ├── sm-g900t.json ├── sprout.json ├── tomato.json ├── wingtech.json ├── x3.json └── xperiasp.json ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── importTranslations.sh └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | *.properties 4 | .DS_Store 5 | /build 6 | /captures 7 | .idea 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | 3 | before_script: 4 | - yes | sdkmanager 'build-tools;27.0.1' 'platforms;android-27' 5 | 6 | android: 7 | components: 8 | - extra-google-m2repository 9 | - extra-android-m2repository 10 | - platform-tools 11 | - tools 12 | - build-tools-27.0.1 13 | - android-27 14 | 15 | jdk: 16 | - oraclejdk8 17 | 18 | script: 19 | ./gradlew build 20 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /src/main/gen 3 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | buildToolsVersion "27.0.1" 6 | defaultConfig { 7 | applicationId "com.nhellfire.kerneladiutor" 8 | minSdkVersion 15 9 | targetSdkVersion 27 10 | versionCode 248 11 | versionName "0.9.73.3-fdroid0" 12 | vectorDrawables.useSupportLibrary = true 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | lintOptions { 22 | abortOnError false 23 | } 24 | } 25 | 26 | repositories { 27 | maven { url "https://jitpack.io" } 28 | } 29 | 30 | dependencies { 31 | compile fileTree(dir: 'libs', include: ['*.jar']) 32 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 33 | exclude group: 'com.android.support', module: 'support-annotations' 34 | }) 35 | 36 | compile('com.github.ozodrukh:CircularReveal:1.3.1@aar') { 37 | transitive = true 38 | } 39 | compile 'com.android.support:appcompat-v7:27.0.1' 40 | compile 'com.android.support:cardview-v7:27.0.1' 41 | compile 'com.android.support:design:27.0.1' 42 | compile 'com.android.support:preference-v14:27.0.1' 43 | compile 'com.google.android.apps.dashclock:dashclock-api:2.0.0' 44 | compile 'com.mattprecious.swirl:swirl:1.0.0' 45 | compile 'com.mikhaellopez:circularimageview:3.0.2' 46 | compile 'com.squareup.picasso:picasso:2.5.2' 47 | compile 'org.adw.library:discrete-seekbar:1.0.1' 48 | compile 'org.cyanogenmod:platform.sdk:5.0.1' 49 | 50 | testCompile 'junit:junit:4.12' 51 | } 52 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/willi/android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -keepattributes Signature 19 | -keepattributes *Annotation* 20 | -keep class com.squareup.okhttp.** { *; } 21 | -keep interface com.squareup.okhttp.** { *; } 22 | -dontwarn com.squareup.okhttp.** 23 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/grarak/kerneladiutor/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.grarak.kerneladiutor; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/assets/temp.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "board": "apq8084", 4 | "cpu": "/sys/class/thermal/thermal_zone6/temp", 5 | "gpu": "/sys/class/thermal/thermal_zone10/temp", 6 | "cpu-offset": 1, 7 | "gpu-offset": 1 8 | }, 9 | { 10 | "board": "baytrail", 11 | "cpu": "/sys/class/thermal/thermal_zone1/temp", 12 | "cpu-offset": 1000 13 | }, 14 | { 15 | "board": "msm8226", 16 | "cpu": "/sys/class/thermal/thermal_zone0/temp", 17 | "gpu": "/sys/class/thermal/thermal_zone2/temp", 18 | "cpu-offset": 1, 19 | "gpu-offset": 1 20 | }, 21 | { 22 | "board": "msm8228", 23 | "cpu": "/sys/class/thermal/thermal_zone0/temp", 24 | "gpu": "/sys/class/thermal/thermal_zone2/temp", 25 | "cpu-offset": 1, 26 | "gpu-offset": 1 27 | }, 28 | { 29 | "board": "msm8610", 30 | "cpu": "/sys/class/thermal/thermal_zone5/temp", 31 | "cpu-offset": 1 32 | }, 33 | { 34 | "board": "msm8916", 35 | "cpu": "/sys/class/thermal/thermal_zone0/temp", 36 | "gpu": "/sys/class/thermal/thermal_zone2/temp", 37 | "cpu-offset": 1000, 38 | "gpu-offset": 1 39 | }, 40 | { 41 | "board": "msm8960", 42 | "cpu": "/sys/class/thermal/thermal_zone7/temp", 43 | "cpu-offset": 1 44 | }, 45 | { 46 | "board": "msm8974", 47 | "cpu": "/sys/class/thermal/thermal_zone5/temp", 48 | "gpu": "/sys/class/thermal/thermal_zone9/temp", 49 | "cpu-offset": 1, 50 | "gpu-offset": 1 51 | }, 52 | { 53 | "board": "msm8974pro-ac", 54 | "cpu": "/sys/class/thermal/thermal_zone5/temp", 55 | "gpu": "/sys/class/thermal/thermal_zone9/temp", 56 | "cpu-offset": 1, 57 | "gpu-offset": 1 58 | }, 59 | { 60 | "board": "msm8992", 61 | "cpu": "/sys/class/thermal/thermal_zone7/temp", 62 | "gpu": "/sys/class/thermal/thermal_zone11/temp", 63 | "cpu-offset": 1, 64 | "gpu-offset": 1 65 | }, 66 | { 67 | "board": "msm8994", 68 | "cpu": "/sys/class/thermal/thermal_zone8/temp", 69 | "gpu": "/sys/class/thermal/thermal_zone13/temp", 70 | "cpu-offset": 1, 71 | "gpu-offset": 1 72 | }, 73 | { 74 | "board": "msm8996", 75 | "cpu": "/sys/class/thermal/thermal_zone5/temp", 76 | "gpu": "/sys/class/thermal/thermal_zone16/temp", 77 | "cpu-offset": 10, 78 | "gpu-offset": 10 79 | }, 80 | { 81 | "board": "msm8996pro", 82 | "cpu": "/sys/class/thermal/thermal_zone5/temp", 83 | "gpu": "/sys/class/thermal/thermal_zone16/temp", 84 | "cpu-offset": 10, 85 | "gpu-offset": 10 86 | }, 87 | { 88 | "board": "msm8998", 89 | "cpu": "/sys/class/thermal/thermal_zone11/temp", 90 | "gpu": "/sys/class/thermal/thermal_zone21/temp", 91 | "cpu-offset": 10, 92 | "gpu-offset": 10 93 | }, 94 | { 95 | "board": "mt6735", 96 | "cpu": "/sys/class/thermal/thermal_zone2/temp", 97 | "gpu": "/sys/class/thermal/thermal_zone9/temp", 98 | "cpu-offset": 1000, 99 | "gpu-offset": 1000 100 | } 101 | ] 102 | -------------------------------------------------------------------------------- /app/src/main/java/com/bvalosek/cpuspy/CpuSpyApp.java: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // (C) Brandon Valosek, 2011 4 | // (C) Willi Ye, 2015 5 | // 6 | //----------------------------------------------------------------------------- 7 | // Modified by Willi Ye to work with big.LITTLE 8 | 9 | package com.bvalosek.cpuspy; 10 | 11 | import android.content.Context; 12 | import android.util.SparseArray; 13 | 14 | import com.grarak.kerneladiutor.utils.Prefs; 15 | import com.grarak.kerneladiutor.utils.Utils; 16 | 17 | /** 18 | * main application class 19 | */ 20 | public class CpuSpyApp { 21 | 22 | private final String PREF_OFFSETS; 23 | 24 | /** 25 | * the long-living object used to monitor the system frequency states 26 | */ 27 | private final CpuStateMonitor mMonitor; 28 | 29 | public CpuSpyApp(int core, Context context) { 30 | PREF_OFFSETS = "offsets" + core; 31 | mMonitor = new CpuStateMonitor(core); 32 | loadOffsets(context); 33 | } 34 | 35 | /** 36 | * @return the internal CpuStateMonitor object 37 | */ 38 | public CpuStateMonitor getCpuStateMonitor() { 39 | return mMonitor; 40 | } 41 | 42 | /** 43 | * Load the saved string of offsets from preferences and put it into the 44 | * state monitor 45 | */ 46 | private void loadOffsets(Context context) { 47 | String prefs = Prefs.getString(PREF_OFFSETS, "", context); 48 | 49 | if (prefs.isEmpty()) return; 50 | // split the string by peroids and then the info by commas and load 51 | SparseArray offsets = new SparseArray<>(); 52 | String[] sOffsets = prefs.split(","); 53 | for (String offset : sOffsets) { 54 | String[] parts = offset.split(" "); 55 | offsets.put(Utils.strToInt(parts[0]), Utils.strToLong(parts[1])); 56 | } 57 | 58 | mMonitor.setOffsets(offsets); 59 | } 60 | 61 | /** 62 | * Save the state-time offsets as a string e.g. "100 24, 200 251, 500 124 63 | * etc 64 | */ 65 | public void saveOffsets(Context context) { 66 | // build the string by iterating over the freq->duration map 67 | StringBuilder str = new StringBuilder(); 68 | SparseArray offsets = mMonitor.getOffsets(); 69 | for (int i = 0; i < offsets.size(); i++) { 70 | str.append(offsets.keyAt(i)).append(" ").append(offsets.valueAt(i)).append(","); 71 | } 72 | 73 | Prefs.saveString(PREF_OFFSETS, str.toString(), context); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/activities/StartActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.activities; 21 | 22 | import android.app.Activity; 23 | import android.content.Intent; 24 | import android.os.Bundle; 25 | 26 | import com.grarak.kerneladiutor.BuildConfig; 27 | 28 | /** 29 | * Created by willi on 02.08.16. 30 | */ 31 | public class StartActivity extends Activity { 32 | 33 | /* 34 | * This activity only existed, so the user can toggle between 35 | * classic and material icon. 36 | */ 37 | 38 | @Override 39 | protected void onCreate(Bundle savedInstanceState) { 40 | super.onCreate(savedInstanceState); 41 | Intent intent = new Intent(this, MainActivity.class); 42 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); 43 | if (getIntent().getExtras() != null) { 44 | intent.putExtras(getIntent().getExtras()); 45 | } 46 | startActivity(intent); 47 | finish(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/activities/StartActivityMaterial.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.activities; 21 | 22 | import android.app.Activity; 23 | import android.content.Intent; 24 | import android.os.Bundle; 25 | 26 | import com.grarak.kerneladiutor.BuildConfig; 27 | 28 | /** 29 | * Created by willi on 02.08.16. 30 | */ 31 | public class StartActivityMaterial extends Activity { 32 | 33 | /* 34 | * This activity only existed, so the user can toggle between 35 | * classic and material icon. 36 | */ 37 | 38 | @Override 39 | protected void onCreate(Bundle savedInstanceState) { 40 | super.onCreate(savedInstanceState); 41 | Intent intent = new Intent(this, MainActivity.class); 42 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); 43 | if (getIntent().getExtras() != null) { 44 | intent.putExtras(getIntent().getExtras()); 45 | } 46 | startActivity(intent); 47 | finish(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/activities/TextActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.activities; 21 | 22 | import android.os.Bundle; 23 | import android.support.annotation.Nullable; 24 | import android.view.View; 25 | import android.widget.TextView; 26 | 27 | import com.grarak.kerneladiutor.R; 28 | import com.grarak.kerneladiutor.utils.Utils; 29 | 30 | /** 31 | * Created by willi on 14.04.16. 32 | */ 33 | public class TextActivity extends BaseActivity { 34 | 35 | public static final String MESSAGE_INTENT = "message_intent"; 36 | public static final String SUMMARY_INTENT = "summary_intent"; 37 | 38 | @Override 39 | protected void onCreate(@Nullable Bundle savedInstanceState) { 40 | super.onCreate(savedInstanceState); 41 | setContentView(R.layout.activity_text); 42 | 43 | String message = getIntent().getStringExtra(MESSAGE_INTENT); 44 | final String url = getIntent().getStringExtra(SUMMARY_INTENT); 45 | 46 | if (message != null) 47 | ((TextView) findViewById(R.id.message_text)).setText(message); 48 | if (url != null) 49 | findViewById(R.id.help_fab).setOnClickListener(new View.OnClickListener() { 50 | @Override 51 | public void onClick(View v) { 52 | Utils.launchUrl(url, TextActivity.this); 53 | } 54 | }); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/activities/tools/CustomControlsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.activities.tools; 21 | 22 | import android.os.Bundle; 23 | import android.support.annotation.Nullable; 24 | import android.support.v4.app.Fragment; 25 | 26 | import com.grarak.kerneladiutor.R; 27 | import com.grarak.kerneladiutor.activities.BaseActivity; 28 | import com.grarak.kerneladiutor.fragments.tools.customcontrols.CreateFragment; 29 | import com.grarak.kerneladiutor.utils.tools.customcontrols.Items; 30 | 31 | import java.util.ArrayList; 32 | 33 | /** 34 | * Created by willi on 30.06.16. 35 | */ 36 | public class CustomControlsActivity extends BaseActivity { 37 | 38 | public static final String SETTINGS_INTENT = "settings"; 39 | public static final String RESULT_INTENT = "result"; 40 | 41 | private ArrayList mSettings; 42 | 43 | @Override 44 | protected void onCreate(@Nullable Bundle savedInstanceState) { 45 | super.onCreate(savedInstanceState); 46 | setContentView(R.layout.activity_fragments); 47 | 48 | initToolBar(); 49 | 50 | mSettings = getIntent().getParcelableArrayListExtra(SETTINGS_INTENT); 51 | for (Items.Setting setting : mSettings) { 52 | if (setting.getId().equals("id")) { 53 | getSupportActionBar().setTitle(getString(Items.Control.getControl(setting.getName(null) 54 | .toString()).getRes())); 55 | } 56 | } 57 | 58 | getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, getFragment(), 59 | "create_fragment").commit(); 60 | } 61 | 62 | private Fragment getFragment() { 63 | Fragment fragment = getSupportFragmentManager().findFragmentByTag("create_fragment"); 64 | if (fragment == null) { 65 | return CreateFragment.newInstance(mSettings); 66 | } 67 | return fragment; 68 | } 69 | 70 | @Override 71 | public void finish() { 72 | getSupportFragmentManager().beginTransaction().remove(getFragment()).commit(); 73 | super.finish(); 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/database/tools/customcontrols/ExportControl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.database.tools.customcontrols; 21 | 22 | import com.grarak.kerneladiutor.utils.Utils; 23 | 24 | import org.json.JSONException; 25 | import org.json.JSONObject; 26 | 27 | import java.io.File; 28 | 29 | /** 30 | * Created by willi on 03.07.16. 31 | */ 32 | public class ExportControl { 33 | 34 | private JSONObject mMain; 35 | 36 | public ExportControl(Controls.ControlItem item, int version) { 37 | mMain = new JSONObject(); 38 | try { 39 | item.getItem().remove("uniqueId"); 40 | item.getItem().remove("onboot"); 41 | item.getItem().remove("arguments"); 42 | mMain.put("version", version); 43 | mMain.put("control", item.getItem()); 44 | } catch (JSONException ignored) { 45 | } 46 | } 47 | 48 | public boolean export(String name) { 49 | if (!name.endsWith(".json")) name += ".json"; 50 | File exportFiles = new File(Utils.getInternalDataStorage() + "/controls"); 51 | File file = new File(exportFiles.toString() + "/" + name); 52 | if (file.exists()) return false; 53 | exportFiles.mkdirs(); 54 | Utils.writeFile(file.toString(), mMain.toString(), false, false); 55 | return true; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/database/tools/profiles/ExportProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.database.tools.profiles; 21 | 22 | import com.grarak.kerneladiutor.utils.Utils; 23 | 24 | import org.json.JSONException; 25 | import org.json.JSONObject; 26 | 27 | import java.io.File; 28 | 29 | /** 30 | * Created by willi on 12.07.16. 31 | */ 32 | public class ExportProfile { 33 | 34 | private JSONObject mMain; 35 | 36 | public ExportProfile(Profiles.ProfileItem item, int version) { 37 | mMain = new JSONObject(); 38 | try { 39 | mMain.put("version", version); 40 | item.getItem().remove("name"); 41 | mMain.put("profile", item.getItem()); 42 | } catch (JSONException ignored) { 43 | } 44 | } 45 | 46 | public boolean export(String name) { 47 | if (!name.endsWith(".json")) name += ".json"; 48 | File exportFiles = new File(Utils.getInternalDataStorage() + "/profiles"); 49 | File file = new File(exportFiles.toString() + "/" + name); 50 | if (file.exists()) return false; 51 | exportFiles.mkdirs(); 52 | Utils.writeFile(file.toString(), mMain.toString(), false, false); 53 | return true; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/database/tools/profiles/ImportProfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.database.tools.profiles; 21 | 22 | import com.grarak.kerneladiutor.utils.Utils; 23 | 24 | import org.json.JSONArray; 25 | import org.json.JSONException; 26 | import org.json.JSONObject; 27 | 28 | import java.util.LinkedHashMap; 29 | 30 | /** 31 | * Created by willi on 15.07.16. 32 | */ 33 | public class ImportProfile { 34 | 35 | private int mVersion; 36 | private JSONArray mCommands; 37 | 38 | public ImportProfile(String path) { 39 | String json = Utils.readFile(path); 40 | if (json != null && !json.isEmpty()) { 41 | try { 42 | JSONObject main = new JSONObject(json); 43 | mVersion = main.getInt("version"); 44 | JSONObject profile = main.getJSONObject("profile"); 45 | 46 | mCommands = profile.getJSONArray("commands"); 47 | for (int i = 0; i < mCommands.length(); i++) { 48 | JSONObject command = mCommands.getJSONObject(i); 49 | if (!command.has("path") || !command.has("command")) { 50 | mCommands = null; 51 | break; 52 | } 53 | } 54 | } catch (JSONException ignored) { 55 | } 56 | } 57 | } 58 | 59 | public LinkedHashMap getResults() { 60 | LinkedHashMap results = new LinkedHashMap<>(); 61 | for (int i = 0; i < mCommands.length(); i++) { 62 | try { 63 | JSONObject command = mCommands.getJSONObject(i); 64 | results.put(command.getString("path"), command.getString("command")); 65 | } catch (JSONException ignored) { 66 | } 67 | } 68 | return results; 69 | } 70 | 71 | public boolean matchesVersion() { 72 | return Profiles.VERSION == mVersion; 73 | } 74 | 75 | public boolean readable() { 76 | return mCommands != null; 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/fragments/SwitcherFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.fragments; 21 | 22 | import android.os.Bundle; 23 | import android.support.annotation.Nullable; 24 | import android.support.v7.widget.SwitchCompat; 25 | import android.view.LayoutInflater; 26 | import android.view.View; 27 | import android.view.ViewGroup; 28 | import android.widget.CompoundButton; 29 | import android.widget.TextView; 30 | 31 | import com.grarak.kerneladiutor.R; 32 | 33 | /** 34 | * Created by willi on 17.09.17. 35 | */ 36 | 37 | public class SwitcherFragment extends BaseFragment { 38 | 39 | public static SwitcherFragment newInstance(String title, String summary, boolean checked, 40 | CompoundButton.OnCheckedChangeListener onCheckedChangeListener) { 41 | SwitcherFragment fragment = new SwitcherFragment(); 42 | fragment.mTitle = title; 43 | fragment.mSummary = summary; 44 | fragment.mChecked = checked; 45 | fragment.mOnCheckedChangeListener = onCheckedChangeListener; 46 | return fragment; 47 | } 48 | 49 | private String mTitle; 50 | private String mSummary; 51 | private boolean mChecked; 52 | private CompoundButton.OnCheckedChangeListener mOnCheckedChangeListener; 53 | 54 | private SwitchCompat mSwitch; 55 | 56 | @Nullable 57 | @Override 58 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, 59 | @Nullable Bundle savedInstanceState) { 60 | View view = inflater.inflate(R.layout.fragment_switcher, container, false); 61 | if (mTitle != null) { 62 | ((TextView) view.findViewById(R.id.title)).setText(mTitle); 63 | } 64 | if (mSummary != null) { 65 | ((TextView) view.findViewById(R.id.summary)).setText(mSummary); 66 | } 67 | mSwitch = view.findViewById(R.id.switcher); 68 | mSwitch.setChecked(mChecked); 69 | mSwitch.setOnCheckedChangeListener(mOnCheckedChangeListener); 70 | return view; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/fragments/other/HelpFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.fragments.other; 21 | 22 | import com.grarak.kerneladiutor.R; 23 | import com.grarak.kerneladiutor.fragments.RecyclerViewFragment; 24 | import com.grarak.kerneladiutor.views.recyclerview.DescriptionView; 25 | import com.grarak.kerneladiutor.views.recyclerview.RecyclerViewItem; 26 | 27 | import java.util.LinkedHashMap; 28 | import java.util.List; 29 | 30 | /** 31 | * Created by willi on 25.07.16. 32 | */ 33 | public class HelpFragment extends RecyclerViewFragment { 34 | 35 | private static final LinkedHashMap sHelps = new LinkedHashMap<>(); 36 | 37 | static { 38 | sHelps.put(R.string.misspelled, R.string.misspelled_summary); 39 | sHelps.put(R.string.have_to_donate, R.string.have_to_donate_summary); 40 | sHelps.put(R.string.cpu_freq_not_sticking, R.string.cpu_freq_not_sticking_summary); 41 | sHelps.put(R.string.feature_not_appearing, R.string.feature_not_appearing_summary); 42 | sHelps.put(R.string.feature_function, R.string.feature_function_summary); 43 | sHelps.put(R.string.add_new_features, R.string.add_new_features_summary); 44 | } 45 | 46 | @Override 47 | protected boolean showViewPager() { 48 | return false; 49 | } 50 | 51 | @Override 52 | protected void addItems(List items) { 53 | for (int id : sHelps.keySet()) { 54 | DescriptionView descriptionView = new DescriptionView(); 55 | descriptionView.setTitle(getString(id)); 56 | descriptionView.setSummary(getString(sHelps.get(id))); 57 | 58 | items.add(descriptionView); 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/fragments/statistics/MemoryFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.fragments.statistics; 21 | 22 | import android.content.res.Configuration; 23 | 24 | import com.grarak.kerneladiutor.R; 25 | import com.grarak.kerneladiutor.fragments.RecyclerViewFragment; 26 | import com.grarak.kerneladiutor.utils.Device; 27 | import com.grarak.kerneladiutor.utils.Utils; 28 | import com.grarak.kerneladiutor.views.recyclerview.DescriptionView; 29 | import com.grarak.kerneladiutor.views.recyclerview.RecyclerViewItem; 30 | 31 | import java.util.List; 32 | 33 | /** 34 | * Created by willi on 05.08.16. 35 | */ 36 | public class MemoryFragment extends RecyclerViewFragment { 37 | 38 | @Override 39 | protected boolean showViewPager() { 40 | return false; 41 | } 42 | 43 | @Override 44 | public int getSpanCount() { 45 | int span = Utils.isTablet(getActivity()) ? Utils.getOrientation(getActivity()) == 46 | Configuration.ORIENTATION_LANDSCAPE ? 5 : 4 : Utils.getOrientation(getActivity()) == 47 | Configuration.ORIENTATION_LANDSCAPE ? 3 : 2; 48 | if (itemsSize() != 0 && span > itemsSize()) { 49 | span = itemsSize(); 50 | } 51 | return span; 52 | } 53 | 54 | @Override 55 | protected void addItems(List items) { 56 | List mems = Device.MemInfo.getItems(); 57 | for (String mem : mems) { 58 | DescriptionView memView = new DescriptionView(); 59 | memView.setTitle(mem); 60 | memView.setSummary(Device.MemInfo.getItem(mem).replace(" ", "") 61 | .replace("kB", getString(R.string.kb))); 62 | 63 | items.add(memView); 64 | } 65 | } 66 | 67 | @Override 68 | protected boolean showAd() { 69 | return true; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/fragments/tools/downloads/AboutFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.fragments.tools.downloads; 21 | 22 | import com.grarak.kerneladiutor.fragments.RecyclerViewFragment; 23 | import com.grarak.kerneladiutor.utils.tools.SupportedDownloads; 24 | import com.grarak.kerneladiutor.views.recyclerview.RecyclerViewItem; 25 | import com.grarak.kerneladiutor.views.recyclerview.downloads.DownloadAboutView; 26 | 27 | import java.util.List; 28 | 29 | /** 30 | * Created by willi on 07.07.16. 31 | */ 32 | public class AboutFragment extends RecyclerViewFragment { 33 | 34 | public static AboutFragment newInstance(SupportedDownloads.KernelContent kernelContent) { 35 | AboutFragment fragment = new AboutFragment(); 36 | fragment.mKernelContent = kernelContent; 37 | return fragment; 38 | } 39 | 40 | private SupportedDownloads.KernelContent mKernelContent; 41 | 42 | @Override 43 | protected boolean showViewPager() { 44 | return false; 45 | } 46 | 47 | @Override 48 | protected boolean isForeground() { 49 | return true; 50 | } 51 | 52 | @Override 53 | protected void addItems(List items) { 54 | items.add(new DownloadAboutView(mKernelContent)); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/services/boot/OnBootReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.services.boot; 21 | 22 | import android.content.BroadcastReceiver; 23 | import android.content.Context; 24 | import android.content.Intent; 25 | 26 | import com.grarak.kerneladiutor.utils.Prefs; 27 | import com.grarak.kerneladiutor.utils.Utils; 28 | import com.grarak.kerneladiutor.utils.root.RootUtils; 29 | 30 | /** 31 | * Created by willi on 03.05.16. 32 | */ 33 | public class OnBootReceiver extends BroadcastReceiver { 34 | 35 | @Override 36 | public void onReceive(Context context, Intent intent) { 37 | if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { 38 | RootUtils.SU su = new RootUtils.SU(); 39 | su.runCommand("echo /testRoot/"); 40 | if (!su.denied) { 41 | Utils.startService(context, new Intent(context, ApplyOnBootService.class)); 42 | } 43 | su.close(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/NotificationId.java: -------------------------------------------------------------------------------- 1 | package com.grarak.kerneladiutor.utils; 2 | 3 | /** 4 | * Created by willi on 27.11.17. 5 | */ 6 | 7 | public class NotificationId { 8 | 9 | public static final int APPLY_ON_BOOT = 1; 10 | public static final int APPLY_ON_BOOT_CONFIRMATION = 2; 11 | public static final int MONITOR = 3; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/Prefs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils; 21 | 22 | import android.content.Context; 23 | import android.preference.PreferenceManager; 24 | 25 | /** 26 | * Created by willi on 01.01.16. 27 | */ 28 | public class Prefs { 29 | 30 | public static void remove(String name, Context context) { 31 | PreferenceManager.getDefaultSharedPreferences(context).edit().remove(name).apply(); 32 | } 33 | 34 | public static int getInt(String name, int defaults, Context context) { 35 | return PreferenceManager.getDefaultSharedPreferences(context).getInt(name, defaults); 36 | } 37 | 38 | public static void saveInt(String name, int value, Context context) { 39 | PreferenceManager.getDefaultSharedPreferences(context).edit().putInt(name, value).apply(); 40 | } 41 | 42 | public static boolean getBoolean(String name, boolean defaults, Context context) { 43 | return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(name, defaults); 44 | } 45 | 46 | public static void saveBoolean(String name, boolean value, Context context) { 47 | PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(name, value).apply(); 48 | } 49 | 50 | public static String getString(String name, String defaults, Context context) { 51 | return PreferenceManager.getDefaultSharedPreferences(context).getString(name, defaults); 52 | } 53 | 54 | public static void saveString(String name, String value, Context context) { 55 | PreferenceManager.getDefaultSharedPreferences(context).edit().putString(name, value).apply(); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/Switch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel; 21 | 22 | /** 23 | * Created by willi on 21.08.17. 24 | */ 25 | 26 | public class Switch { 27 | 28 | private String mEnable; 29 | private String mDisable; 30 | 31 | public Switch(String enable, String disable) { 32 | mEnable = enable; 33 | mDisable = disable; 34 | } 35 | 36 | public String getEnable() { 37 | return mEnable; 38 | } 39 | 40 | public String getDisable() { 41 | return mDisable; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/cpuhotplug/AiOHotplug.java: -------------------------------------------------------------------------------- 1 | package com.grarak.kerneladiutor.utils.kernel.cpuhotplug; 2 | 3 | import android.content.Context; 4 | 5 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 6 | import com.grarak.kerneladiutor.utils.Utils; 7 | import com.grarak.kerneladiutor.utils.root.Control; 8 | 9 | /** 10 | * Created by willi on 19.06.17. 11 | */ 12 | 13 | public class AiOHotplug { 14 | 15 | private static final String PARENT = "/sys/kernel/AiO_HotPlug"; 16 | private static final String TOGGLE = PARENT + "/toggle"; 17 | private static final String CORES = PARENT + "/cores"; 18 | private static final String BIG_CORES = PARENT + "/big_cores"; 19 | private static final String LITTLE_CORES = PARENT + "/LITTLE_cores"; 20 | 21 | public static void setLITTLECores(int cores, Context context) { 22 | run(Control.write(String.valueOf(cores), LITTLE_CORES), LITTLE_CORES, context); 23 | } 24 | 25 | public static int getLITTLECores() { 26 | return Utils.strToInt(Utils.readFile(LITTLE_CORES)); 27 | } 28 | 29 | public static boolean hasLITTLECores() { 30 | return Utils.existFile(LITTLE_CORES); 31 | } 32 | 33 | public static void setBigCores(int cores, Context context) { 34 | run(Control.write(String.valueOf(cores), BIG_CORES), BIG_CORES, context); 35 | } 36 | 37 | public static int getBigCores() { 38 | return Utils.strToInt(Utils.readFile(BIG_CORES)); 39 | } 40 | 41 | public static boolean hasBigCores() { 42 | return Utils.existFile(BIG_CORES); 43 | } 44 | 45 | public static void setCores(int cores, Context context) { 46 | run(Control.write(String.valueOf(cores), CORES), CORES, context); 47 | } 48 | 49 | public static int getCores() { 50 | return Utils.strToInt(Utils.readFile(CORES)); 51 | } 52 | 53 | public static boolean hasCores() { 54 | return Utils.existFile(CORES); 55 | } 56 | 57 | public static void enable(boolean enable, Context context) { 58 | run(Control.write(enable ? "1" : "0", TOGGLE), TOGGLE, context); 59 | } 60 | 61 | public static boolean isEnabled() { 62 | return Utils.readFile(TOGGLE).equals("1"); 63 | } 64 | 65 | public static boolean hasToggle() { 66 | return Utils.existFile(TOGGLE); 67 | } 68 | 69 | public static boolean supported() { 70 | return Utils.existFile(PARENT); 71 | } 72 | 73 | private static void run(String command, String id, Context context) { 74 | Control.runSetting(command, ApplyOnBootFragment.CPU_HOTPLUG, id, context); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/cpuhotplug/Hotplug.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.cpuhotplug; 21 | 22 | /** 23 | * Created by willi on 07.05.16. 24 | */ 25 | public class Hotplug { 26 | 27 | public static boolean supported() { 28 | return MPDecision.supported() || IntelliPlug.supported() || LazyPlug.supported() 29 | || BluPlug.supported() || MSMHotplug.supported() || MakoHotplug.supported() 30 | || MBHotplug.supported() || AlucardHotplug.supported() || ThunderPlug.supported() 31 | || ZenDecision.supported() || AutoSmp.supported() || CoreCtl.supported() 32 | || AiOHotplug.supported(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/cpuhotplug/MPDecision.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.cpuhotplug; 21 | 22 | import android.content.Context; 23 | 24 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 25 | import com.grarak.kerneladiutor.utils.Utils; 26 | import com.grarak.kerneladiutor.utils.kernel.cpu.CPUFreq; 27 | import com.grarak.kerneladiutor.utils.root.Control; 28 | 29 | /** 30 | * Created by willi on 07.05.16. 31 | */ 32 | public class MPDecision { 33 | 34 | public static final String HOTPLUG_MPDEC = "mpdecision"; 35 | 36 | public static void enableMpdecision(boolean enable, Context context) { 37 | if (enable) { 38 | run(Control.startService(HOTPLUG_MPDEC), HOTPLUG_MPDEC, context); 39 | } else { 40 | run(Control.stopService(HOTPLUG_MPDEC), HOTPLUG_MPDEC, context); 41 | for (int i = 0; i < CPUFreq.getCpuCount(); i++) { 42 | CPUFreq.onlineCpu(i, true, ApplyOnBootFragment.CPU_HOTPLUG, false, context); 43 | } 44 | } 45 | } 46 | 47 | public static boolean isMpdecisionEnabled() { 48 | return Utils.isPropRunning(HOTPLUG_MPDEC); 49 | } 50 | 51 | public static boolean supported() { 52 | return Utils.hasProp(HOTPLUG_MPDEC); 53 | } 54 | 55 | private static void run(String command, String id, Context context) { 56 | Control.runSetting(command, ApplyOnBootFragment.CPU_HOTPLUG, id, context); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/entropy/Entropy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.entropy; 21 | 22 | import android.content.Context; 23 | 24 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 25 | import com.grarak.kerneladiutor.utils.Utils; 26 | import com.grarak.kerneladiutor.utils.root.Control; 27 | 28 | /** 29 | * Created by willi on 29.06.16. 30 | */ 31 | public class Entropy { 32 | 33 | private static final String PARENT = "/proc/sys/kernel/random"; 34 | private static final String AVAILABLE = PARENT + "/entropy_avail"; 35 | private static final String POOLSIZE = PARENT + "/poolsize"; 36 | private static final String READ = PARENT + "/read_wakeup_threshold"; 37 | private static final String WRITE = PARENT + "/write_wakeup_threshold"; 38 | 39 | public static void setWrite(int value, Context context) { 40 | run(Control.write(String.valueOf(value), WRITE), WRITE, context); 41 | } 42 | 43 | public static int getWrite() { 44 | return Utils.strToInt(Utils.readFile(WRITE)); 45 | } 46 | 47 | public static void setRead(int value, Context context) { 48 | run(Control.write(String.valueOf(value), READ), READ, context); 49 | } 50 | 51 | public static int getRead() { 52 | return Utils.strToInt(Utils.readFile(READ)); 53 | } 54 | 55 | public static int getPoolsize() { 56 | return Utils.strToInt(Utils.readFile(POOLSIZE)); 57 | } 58 | 59 | public static int getAvailable() { 60 | return Utils.strToInt(Utils.readFile(AVAILABLE)); 61 | } 62 | 63 | public static boolean supported() { 64 | return Utils.existFile(PARENT); 65 | } 66 | 67 | private static void run(String command, String id, Context context) { 68 | Control.runSetting(command, ApplyOnBootFragment.ENTROPY, id, context); 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/gpu/GPU.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.gpu; 21 | 22 | /** 23 | * Created by willi on 12.05.16. 24 | */ 25 | public class GPU { 26 | 27 | public static boolean supported() { 28 | return GPUFreq.supported() || SimpleGPU.supported() || AdrenoIdler.supported(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/screen/Screen.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.screen; 21 | 22 | /** 23 | * Created by willi on 01.06.16. 24 | */ 25 | public class Screen { 26 | 27 | public static boolean supported() { 28 | return Calibration.supported() || Gamma.supported() || Misc.supported(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/thermal/Thermal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.thermal; 21 | 22 | /** 23 | * Created by willi on 12.05.16. 24 | */ 25 | public class Thermal { 26 | 27 | public static boolean supported() { 28 | return Thermald.supported() || MSMThermal.supported(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/thermal/Thermald.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.thermal; 21 | 22 | import android.content.Context; 23 | 24 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 25 | import com.grarak.kerneladiutor.utils.Utils; 26 | import com.grarak.kerneladiutor.utils.root.Control; 27 | 28 | /** 29 | * Created by willi on 12.05.16. 30 | */ 31 | public class Thermald { 32 | 33 | private static final String THERMALD = "thermald"; 34 | 35 | public static void enableThermald(boolean enable, Context context) { 36 | if (enable) { 37 | run(Control.startService(THERMALD), THERMALD, context); 38 | } else { 39 | run(Control.stopService(THERMALD), THERMALD, context); 40 | } 41 | } 42 | 43 | public static boolean isThermaldEnabled() { 44 | return Utils.isPropRunning(THERMALD); 45 | } 46 | 47 | public static boolean supported() { 48 | return Utils.hasProp(THERMALD); 49 | } 50 | 51 | private static void run(String command, String id, Context context) { 52 | Control.runSetting(command, ApplyOnBootFragment.THERMAL, id, context); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/vm/VM.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.vm; 21 | 22 | import android.content.Context; 23 | 24 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 25 | import com.grarak.kerneladiutor.utils.Utils; 26 | import com.grarak.kerneladiutor.utils.root.Control; 27 | 28 | /** 29 | * Created by willi on 29.06.16. 30 | */ 31 | public class VM { 32 | 33 | private static final String PATH = "/proc/sys/vm"; 34 | private static final String[] SUPPORTED_VM = {"dirty_ratio", "dirty_background_ratio", "dirty_expire_centisecs", 35 | "dirty_writeback_centisecs", "min_free_kbytes", "oom_kill_allocating_task", "overcommit_ratio", "swappiness", 36 | "vfs_cache_pressure", "laptop_mode", "extra_free_kbytes"}; 37 | 38 | public static void setValue(String value, int position, Context context) { 39 | run(Control.write(value, PATH + "/" + SUPPORTED_VM[position]), PATH + "/" + 40 | SUPPORTED_VM[position], context); 41 | } 42 | 43 | public static String getValue(int position) { 44 | return Utils.readFile(PATH + "/" + SUPPORTED_VM[position]); 45 | } 46 | 47 | public static String getName(int position) { 48 | return SUPPORTED_VM[position]; 49 | } 50 | 51 | public static boolean exists(int position) { 52 | return Utils.existFile(PATH + "/" + SUPPORTED_VM[position]); 53 | } 54 | 55 | public static int size() { 56 | return SUPPORTED_VM.length; 57 | } 58 | 59 | private static void run(String command, String id, Context context) { 60 | Control.runSetting(command, ApplyOnBootFragment.VM, id, context); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/vm/ZRAM.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.vm; 21 | 22 | import android.content.Context; 23 | 24 | import com.grarak.kerneladiutor.fragments.ApplyOnBootFragment; 25 | import com.grarak.kerneladiutor.utils.Utils; 26 | import com.grarak.kerneladiutor.utils.root.Control; 27 | 28 | /** 29 | * Created by willi on 03.08.16. 30 | */ 31 | public class ZRAM { 32 | 33 | private static final String ZRAM = "/sys/block/zram0"; 34 | private static final String BLOCK = "/dev/block/zram0"; 35 | private static final String DISKSIZE = "/sys/block/zram0/disksize"; 36 | private static final String RESET = "/sys/block/zram0/reset"; 37 | private static final String MAX_COMP_STREAMS = "/sys/block/zram0/max_comp_streams"; 38 | 39 | public static void setDisksize(final int value, final Context context) { 40 | String maxCompStrems = null; 41 | if (Utils.existFile(MAX_COMP_STREAMS)) { 42 | maxCompStrems = Utils.readFile(MAX_COMP_STREAMS); 43 | } 44 | int size = value * 1024 * 1024; 45 | run("swapoff " + BLOCK + " > /dev/null 2>&1", BLOCK + "swapoff", context); 46 | run(Control.write("1", RESET), RESET, context); 47 | run(Control.write("0", DISKSIZE), DISKSIZE + "reset", context); 48 | if (maxCompStrems != null) { 49 | run(Control.write(maxCompStrems, MAX_COMP_STREAMS), MAX_COMP_STREAMS, context); 50 | } 51 | if (size != 0) { 52 | run(Control.write(String.valueOf(size), DISKSIZE), DISKSIZE, context); 53 | run("mkswap " + BLOCK + " > /dev/null 2>&1", BLOCK + "mkswap", context); 54 | run("swapon " + BLOCK + " > /dev/null 2>&1", BLOCK + "swapon", context); 55 | } 56 | } 57 | 58 | public static int getDisksize() { 59 | return Utils.strToInt(Utils.readFile(DISKSIZE)) / 1024 / 1024; 60 | } 61 | 62 | public static boolean supported() { 63 | return Utils.existFile(ZRAM); 64 | } 65 | 66 | private static void run(String command, String id, Context context) { 67 | Control.runSetting(command, ApplyOnBootFragment.VM, id, context); 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/kernel/wake/Wake.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.kernel.wake; 21 | 22 | /** 23 | * Created by willi on 23.06.16. 24 | */ 25 | public class Wake { 26 | 27 | public static boolean supported() { 28 | return Dt2w.supported() || S2w.supported() || T2w.supported() || Dt2s.supported() 29 | || S2s.supported() || Misc.supported() || Gestures.supported(); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/server/Server.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.server; 21 | 22 | /** 23 | * Created by willi on 18.09.17. 24 | */ 25 | 26 | public class Server { 27 | 28 | private String mAddress; 29 | 30 | Server(String address) { 31 | mAddress = address; 32 | } 33 | 34 | class Query { 35 | 36 | private String mKey; 37 | private String mValue; 38 | 39 | Query(String key, String value) { 40 | mKey = key; 41 | mValue = value; 42 | } 43 | } 44 | 45 | String getAddress(String url, Query... queries) { 46 | StringBuilder parsedUrl = new StringBuilder(mAddress + url + "?"); 47 | for (Query query : queries) { 48 | if (query.mValue == null) continue; 49 | parsedUrl.append(query.mKey).append("=").append(query.mValue).append("&"); 50 | } 51 | parsedUrl.setLength(parsedUrl.length() - 1); 52 | return parsedUrl.toString(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/tools/Initd.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.tools; 21 | 22 | import com.grarak.kerneladiutor.utils.Utils; 23 | import com.grarak.kerneladiutor.utils.root.RootFile; 24 | import com.grarak.kerneladiutor.utils.root.RootUtils; 25 | 26 | import java.util.List; 27 | 28 | /** 29 | * Created by willi on 16.07.16. 30 | */ 31 | public class Initd { 32 | 33 | private static final String INITD = "/system/etc/init.d"; 34 | 35 | public static void write(String file, String text) { 36 | RootUtils.mount(true, "/system"); 37 | RootFile f = new RootFile(INITD + "/" + file); 38 | f.write(text, false); 39 | RootUtils.chmod(INITD + "/" + file, "755"); 40 | RootUtils.mount(false, "/system"); 41 | } 42 | 43 | public static void delete(String file) { 44 | RootUtils.mount(true, "/system"); 45 | RootFile f = new RootFile(INITD + "/" + file); 46 | f.delete(); 47 | RootUtils.mount(false, "/system"); 48 | } 49 | 50 | public static String execute(String file) { 51 | RootUtils.chmod(INITD + "/" + file, "755"); 52 | return RootUtils.runCommand(INITD + "/" + file); 53 | } 54 | 55 | public static String read(String file) { 56 | return Utils.readFile(INITD + "/" + file); 57 | } 58 | 59 | public static List list() { 60 | RootFile file = new RootFile(INITD); 61 | if (!file.exists()) { 62 | RootUtils.mount(true, "/system"); 63 | file.mkdir(); 64 | RootUtils.mount(false, "/system"); 65 | } 66 | return file.list(); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/utils/tools/customcontrols/CustomControlException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.utils.tools.customcontrols; 21 | 22 | /** 23 | * Created by willi on 02.07.16. 24 | */ 25 | public class CustomControlException extends Exception { 26 | 27 | public CustomControlException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/preference/ColorPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.preference; 21 | 22 | import android.content.Context; 23 | import android.support.v7.preference.Preference; 24 | import android.util.AttributeSet; 25 | 26 | import com.grarak.kerneladiutor.R; 27 | 28 | /** 29 | * Created by willi on 21.08.16. 30 | */ 31 | 32 | public class ColorPreference extends Preference { 33 | 34 | public ColorPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 35 | super(context, attrs, defStyleAttr, defStyleRes); 36 | setWidgetLayoutResource(R.layout.preference_color_view); 37 | } 38 | 39 | public ColorPreference(Context context, AttributeSet attrs, int defStyleAttr) { 40 | this(context, attrs, defStyleAttr, 0); 41 | } 42 | 43 | public ColorPreference(Context context, AttributeSet attrs) { 44 | this(context, attrs, android.support.v7.preference.R.attr.preferenceStyle); 45 | } 46 | 47 | public ColorPreference(Context context) { 48 | this(context, null); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/ButtonView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview; 21 | 22 | import android.support.v7.widget.AppCompatButton; 23 | import android.view.View; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | 27 | /** 28 | * Created by willi on 28.09.17. 29 | */ 30 | 31 | public class ButtonView extends RecyclerViewItem { 32 | 33 | private AppCompatButton mButton; 34 | 35 | private String mText; 36 | private View.OnClickListener mOnClickListener; 37 | 38 | @Override 39 | public int getLayoutRes() { 40 | return R.layout.rv_button; 41 | } 42 | 43 | @Override 44 | protected boolean cardCompatible() { 45 | return false; 46 | } 47 | 48 | @Override 49 | public void onCreateView(View view) { 50 | mButton = view.findViewById(R.id.btn); 51 | 52 | super.onCreateView(view); 53 | setup(); 54 | } 55 | 56 | public void setText(String text) { 57 | mText = text; 58 | setup(); 59 | } 60 | 61 | private void setup() { 62 | if (mButton != null) { 63 | mButton.setText(mText); 64 | mButton.setOnClickListener(mOnClickListener); 65 | } 66 | } 67 | 68 | public void setOnClickListener(View.OnClickListener onClickListener) { 69 | mOnClickListener = onClickListener; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/ContributorView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview; 21 | 22 | import android.view.View; 23 | import android.widget.TextView; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | import com.grarak.kerneladiutor.utils.Utils; 27 | import com.grarak.kerneladiutor.utils.ViewUtils; 28 | import com.grarak.kerneladiutor.utils.other.Contributors; 29 | import com.mikhaellopez.circularimageview.CircularImageView; 30 | 31 | /** 32 | * Created by willi on 23.07.16. 33 | */ 34 | public class ContributorView extends RecyclerViewItem { 35 | 36 | private final Contributors.Contributor mContributor; 37 | 38 | public ContributorView(Contributors.Contributor contributor) { 39 | mContributor = contributor; 40 | } 41 | 42 | @Override 43 | public int getLayoutRes() { 44 | return R.layout.rv_contributor_view; 45 | } 46 | 47 | @Override 48 | public void onCreateView(View view) { 49 | super.onCreateView(view); 50 | 51 | CircularImageView image = (CircularImageView) view.findViewById(R.id.image); 52 | TextView name = (TextView) view.findViewById(R.id.name); 53 | TextView contributions = (TextView) view.findViewById(R.id.contributions); 54 | 55 | ViewUtils.loadImagefromUrl(mContributor.getAvatarUrl(), image, 200, 200); 56 | name.setText(mContributor.getLogin()); 57 | contributions.setText(view.getResources().getString(R.string.commits, mContributor.getContributions())); 58 | 59 | view.setOnClickListener(new View.OnClickListener() { 60 | @Override 61 | public void onClick(View v) { 62 | Utils.launchUrl(mContributor.getHtmlUrl(), v.getContext()); 63 | } 64 | }); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/StatsView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview; 21 | 22 | import android.view.View; 23 | import android.widget.TextView; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | 27 | /** 28 | * Created by willi on 23.08.16. 29 | */ 30 | 31 | public class StatsView extends RecyclerViewItem { 32 | 33 | private TextView mStatView; 34 | private TextView mTitleView; 35 | 36 | private CharSequence mStat; 37 | private CharSequence mTitle; 38 | 39 | @Override 40 | public int getLayoutRes() { 41 | return R.layout.rv_stats_view; 42 | } 43 | 44 | @Override 45 | public void onCreateView(View view) { 46 | mStatView = (TextView) view.findViewById(R.id.stat); 47 | mTitleView = (TextView) view.findViewById(R.id.title); 48 | 49 | super.onCreateView(view); 50 | } 51 | 52 | public void setStat(CharSequence stat) { 53 | mStat = stat; 54 | refresh(); 55 | } 56 | 57 | public void setTitle(CharSequence title) { 58 | mTitle = title; 59 | refresh(); 60 | } 61 | 62 | @Override 63 | protected void refresh() { 64 | super.refresh(); 65 | 66 | if (mStatView != null && mStat != null) { 67 | mStatView.setText(mStat); 68 | } 69 | if (mTitleView != null && mTitle != null) { 70 | mTitleView.setText(mTitle); 71 | } 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/TitleView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview; 21 | 22 | import android.support.v7.widget.AppCompatTextView; 23 | import android.view.View; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | 27 | /** 28 | * Created by willi on 30.04.16. 29 | */ 30 | public class TitleView extends RecyclerViewItem { 31 | 32 | private AppCompatTextView mTitle; 33 | 34 | private CharSequence mTitleText; 35 | 36 | @Override 37 | public int getLayoutRes() { 38 | return R.layout.rv_title_view; 39 | } 40 | 41 | @Override 42 | public void onCreateView(View view) { 43 | mTitle = (AppCompatTextView) view.findViewById(R.id.title); 44 | 45 | setFullSpan(true); 46 | super.onCreateView(view); 47 | } 48 | 49 | public void setText(CharSequence text) { 50 | mTitleText = text; 51 | refresh(); 52 | } 53 | 54 | @Override 55 | protected void refresh() { 56 | super.refresh(); 57 | if (mTitle != null && mTitleText != null) { 58 | mTitle.setText(mTitleText); 59 | } 60 | } 61 | 62 | @Override 63 | protected boolean cardCompatible() { 64 | return false; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/XYGraphView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview; 21 | 22 | import android.view.View; 23 | import android.widget.TextView; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | import com.grarak.kerneladiutor.views.XYGraph; 27 | 28 | import java.util.ArrayList; 29 | import java.util.List; 30 | 31 | /** 32 | * Created by willi on 12.05.16. 33 | */ 34 | public class XYGraphView extends RecyclerViewItem { 35 | 36 | private TextView mTitle; 37 | private TextView mText; 38 | private XYGraph mGraph; 39 | 40 | private CharSequence mTitleStr; 41 | private CharSequence mTextStr; 42 | private List mPercentages = new ArrayList<>(); 43 | 44 | @Override 45 | public int getLayoutRes() { 46 | return R.layout.rv_xygraph_view; 47 | } 48 | 49 | @Override 50 | public void onCreateView(View view) { 51 | mTitle = (TextView) view.findViewById(R.id.title); 52 | mText = (TextView) view.findViewById(R.id.text); 53 | mGraph = (XYGraph) view.findViewById(R.id.graph); 54 | 55 | super.onCreateView(view); 56 | } 57 | 58 | public void setTitle(CharSequence title) { 59 | mTitleStr = title; 60 | refresh(); 61 | } 62 | 63 | public void setText(CharSequence text) { 64 | mTextStr = text; 65 | refresh(); 66 | } 67 | 68 | public void addPercentage(int percentage) { 69 | mPercentages.add(percentage); 70 | refresh(); 71 | } 72 | 73 | @Override 74 | 75 | protected void refresh() { 76 | super.refresh(); 77 | if (mTitle != null && mTitleStr != null) { 78 | mTitle.setText(mTitleStr); 79 | } 80 | if (mText != null && mTextStr != null) { 81 | mText.setText(mTextStr); 82 | } 83 | if (mGraph != null) { 84 | mGraph.clear(); 85 | for (int per : mPercentages) { 86 | mGraph.addPercentage(per); 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/customcontrols/ErrorView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview.customcontrols; 21 | 22 | import android.view.View; 23 | import android.widget.TextView; 24 | 25 | import com.grarak.kerneladiutor.R; 26 | import com.grarak.kerneladiutor.views.recyclerview.RecyclerViewItem; 27 | 28 | /** 29 | * Created by willi on 02.07.16. 30 | */ 31 | public class ErrorView extends RecyclerViewItem { 32 | 33 | private TextView mText; 34 | private Exception mError; 35 | 36 | @Override 37 | public int getLayoutRes() { 38 | return R.layout.rv_error_view; 39 | } 40 | 41 | @Override 42 | public void onCreateView(View view) { 43 | mText = (TextView) view.findViewById(R.id.text); 44 | 45 | super.onCreateView(view); 46 | } 47 | 48 | public void setException(Exception error) { 49 | mError = error; 50 | refresh(); 51 | } 52 | 53 | @Override 54 | protected void refresh() { 55 | super.refresh(); 56 | 57 | if (mText != null && mError != null) { 58 | mText.setText(mError.getMessage()); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/com/grarak/kerneladiutor/views/recyclerview/downloads/KernelItemView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 Willi Ye 3 | * 4 | * This file is part of Kernel Adiutor. 5 | * 6 | * Kernel Adiutor is free software: you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Kernel Adiutor is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with Kernel Adiutor. If not, see . 18 | * 19 | */ 20 | package com.grarak.kerneladiutor.views.recyclerview.downloads; 21 | 22 | import android.view.View; 23 | import android.widget.ImageView; 24 | import android.widget.TextView; 25 | 26 | import com.grarak.kerneladiutor.R; 27 | import com.grarak.kerneladiutor.utils.Utils; 28 | import com.grarak.kerneladiutor.utils.ViewUtils; 29 | import com.grarak.kerneladiutor.utils.tools.SupportedDownloads; 30 | import com.grarak.kerneladiutor.views.recyclerview.RecyclerViewItem; 31 | 32 | /** 33 | * Created by willi on 06.07.16. 34 | */ 35 | public class KernelItemView extends RecyclerViewItem { 36 | 37 | private final SupportedDownloads.KernelContent mKernelContent; 38 | 39 | public KernelItemView(SupportedDownloads.KernelContent content) { 40 | mKernelContent = content; 41 | } 42 | 43 | @Override 44 | public int getLayoutRes() { 45 | return R.layout.rv_kernel_item_view; 46 | } 47 | 48 | @Override 49 | public void onCreateView(View view) { 50 | super.onCreateView(view); 51 | 52 | final ImageView icon = (ImageView) view.findViewById(R.id.icon); 53 | TextView title = (TextView) view.findViewById(R.id.title); 54 | TextView summary = (TextView) view.findViewById(R.id.summary); 55 | 56 | ViewUtils.loadImagefromUrl(mKernelContent.getLogo(), icon, 300, 300); 57 | 58 | title.setText(Utils.htmlFrom(mKernelContent.getName()).toString()); 59 | summary.setText(Utils.htmlFrom(mKernelContent.getShortDescription())); 60 | 61 | view.setOnClickListener(new View.OnClickListener() { 62 | @Override 63 | public void onClick(View view) { 64 | if (getOnItemClickListener() != null) { 65 | getOnItemClickListener().onClick(KernelItemView.this); 66 | } 67 | } 68 | }); 69 | } 70 | 71 | @Override 72 | protected boolean cardCompatible() { 73 | return false; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /app/src/main/java/com/viewpagerindicator/PageIndicator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Patrik Akerfeldt 3 | * Copyright (C) 2011 Jake Wharton 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.viewpagerindicator; 18 | 19 | import android.support.v4.view.ViewPager; 20 | 21 | /** 22 | * A PageIndicator is responsible to show an visual indicator on the total views 23 | * number and the current visible view. 24 | */ 25 | public interface PageIndicator extends ViewPager.OnPageChangeListener { 26 | /** 27 | * Bind the indicator to a ViewPager. 28 | * 29 | * @param view 30 | */ 31 | void setViewPager(ViewPager view); 32 | 33 | /** 34 | * Bind the indicator to a ViewPager. 35 | * 36 | * @param view 37 | * @param initialPosition 38 | */ 39 | void setViewPager(ViewPager view, int initialPosition); 40 | 41 | /** 42 | *

Set the current page of both the ViewPager and indicator.

43 | *

44 | *

This must be used if you need to set the page before 45 | * the views are drawn on screen (e.g., default start page).

46 | * 47 | * @param item 48 | */ 49 | void setCurrentItem(int item); 50 | 51 | /** 52 | * Set a page change listener which will receive forwarded events. 53 | * 54 | * @param listener 55 | */ 56 | void setOnPageChangeListener(ViewPager.OnPageChangeListener listener); 57 | 58 | /** 59 | * Notify the indicator that the fragment list has changed. 60 | */ 61 | void notifyDataSetChanged(); 62 | } 63 | -------------------------------------------------------------------------------- /app/src/main/res/anim/slide_in_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/drawable_frame_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/drawable_frame_light.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/dropshadow.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_about.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_banner.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_banner_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_banner_material.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_blank.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_bolt.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cancel.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chart.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_clear.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_console.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_cpu.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_database.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dir.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_display.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_done.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_dots.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_download.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_edit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_file.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_github.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_googleplus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_gpu.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_help.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_keyboard.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_launcher_preview.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_layers.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_led.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_merge.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_music.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_numbers.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_paypal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_people.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_profile.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_profile.jpeg -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_refresh.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_restore.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_save.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sdcard.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_server.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_shell.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_stackoverflow.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_switch.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_temperature.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_unlock.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_xda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/ic_xda.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/profile_widget_preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/drawable/profile_widget_preview.jpg -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_downloads.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 15 | 16 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fragments.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 24 | 25 | 29 | 30 | 36 | 37 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 20 | 21 | 26 | 27 | 28 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 22 | 23 | 32 | 33 | 34 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_security.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 18 | 19 | 29 | 30 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 23 | 24 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ad_native_express_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 20 | 21 | 25 | 26 | 33 | 34 | 45 | 46 | 51 | 52 | 53 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_apply_on_boot.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_buildprop_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 19 | 20 | 29 | 30 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_description.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 23 | 24 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_global_offset.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 22 | 23 | 34 | 35 | 45 | 46 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 23 | 24 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_profile_details.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_profile_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 21 | 22 | 30 | 31 | 36 | 37 | 46 | 47 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_recovery_options.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 32 | 33 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 | 24 | 25 | 31 | 32 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_switcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 25 | 26 | 30 | 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_usage_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 26 | 27 | 35 | 36 | 45 | 46 | 55 | 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 18 | 19 | 20 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/preference_color_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_contributor_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 20 | 21 | 28 | 29 | 35 | 36 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_datasharing_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 28 | 29 | 33 | 34 | 38 | 39 | 46 | 47 | 57 | 58 | 59 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_datasharing_page.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 23 | 24 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_description_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 22 | 23 | 28 | 29 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_drop_down_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 20 | 21 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_drop_down_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 21 | 22 | 28 | 29 | 34 | 35 | 40 | 41 | 42 | 43 | 50 | 51 | 52 | 53 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_edittext_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_error_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_frequencytable_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 16 | 17 | 21 | 22 | 29 | 30 | 37 | 38 | 45 | 46 | 47 | 48 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_kernel_item_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 24 | 25 | 32 | 33 | 41 | 42 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_stats_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 21 | 22 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_switch_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 21 | 22 | 27 | 28 | 33 | 34 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_title_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_value_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 19 | 20 | 25 | 26 | 31 | 32 | 38 | 39 | 45 | 46 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /app/src/main/res/layout/rv_xygraph_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 18 | 19 | 27 | 28 | 29 | 35 | 36 | -------------------------------------------------------------------------------- /app/src/main/res/layout/viewpager_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 15 | 16 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/widget_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 16 | 17 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/res/layout/widget_profile_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-hdpi/ic_launcher_material.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-mdpi/ic_launcher_material.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xhdpi/ic_launcher_material.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xxhdpi/ic_launcher_material.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/app/src/main/res/mipmap-xxxhdpi/ic_launcher_material.png -------------------------------------------------------------------------------- /app/src/main/res/values-af/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/values-az/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /app/src/main/res/values-da/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Adgangskode 6 | Forkert adgangskode 7 | Vælg billede 8 | Intet billede 9 | Noget gik galt! 10 | Tryk på tilbage igen for at afslutte 11 | Annullér 12 | OK 13 | Ukendt 14 | Uden for område 15 | Indstillinger 16 | Mere 17 | 18 | 19 | Gem 20 | 21 | Vælg %s? 22 | 23 | MHz 24 | ºC 25 | ºF 26 | 27 | 28 | 29 | Om 30 | Bidragsydere 31 | Hjælp 32 | 33 | Offline 34 | Oppetid 35 | 36 | RAM 37 | Fingeraftryk 38 | Bootloader 39 | Hardware 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | 16dp 8 | -30dp 9 | 16dp 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #2a7289 4 | #1d5060 5 | 6 | #8a000000 7 | #b3ffffff 8 | 9 | #000000 10 | #ffffff 11 | #5fb962 12 | #f66055 13 | 14 | #ef5350 15 | #ff80aa 16 | #ab47Bc 17 | #42a5f5 18 | #66bb6a 19 | #ffa726 20 | #8d6e63 21 | #bdbdbd 22 | #78909c 23 | #26a69a 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 160dp 3 | 4 | 8dp 5 | 0dp 6 | 0dp 7 | 0dp 8 | 9 | 8dp 10 | -48dp 11 | 8dp 12 | 13 | 10dp 14 | 15 | 3dp 16 | 3dp 17 | 18 | 50dp 19 | 50dp 20 | 2dp 21 | 1dp 22 | 23 | 30dp 24 | 25 | 100dp 26 | 50dp 27 | 28 | 50dp 29 | 30 | 320dp 31 | 32 | 140dp 33 | 180dp 34 | 280dp 35 | 36 | 50dp 37 | 50dp 38 | 1dp 39 | 40 | 5dp 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ca-app-pub-1851546461606210/9265877481 4 | ca-app-pub-1851546461606210/4717926683 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/xml/profile_widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/xml/shortcuts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/test/java/com/grarak/kerneladiutor/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.grarak.kerneladiutor; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.assertEquals; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.0.1' 10 | classpath 'com.google.gms:google-services:3.0.0' 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | jcenter() 20 | google() 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } 27 | -------------------------------------------------------------------------------- /controls/selinux.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "control": { 4 | "apply": "#!/system/bin/sh\n\nsetenforce $1", 5 | "enable": "#!/system/bin/sh\n\nif [ `getenforce` == \"Enforcing\" ]; then\n echo 1\nelse\n echo 0\nfi", 6 | "title": "Selinux", 7 | "description": "Security-Enhanced Linux is a Linux kernel security module that provides a mechanism for supporting access control security policies.", 8 | "id": "switch" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /download/angler.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Fechinator/android_kernel_huawei_angler/m/Fechdakernel_Angler.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/condor.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/zeeshanhussain/Inazumakernel/master/Inazuma.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/desire816.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Grarak/grarak.github.io/master/grakernel/desire816.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/falcon.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/BryanByteZero/android_kernel_motorola_msm8226/restart6/falcon.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/g3.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://www.dropbox.com/s/axo8gywdzmblvrl/g3.json?raw=1" 3 | ] 4 | -------------------------------------------------------------------------------- /download/g3beat_jag3gds.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/TheNotOnly/android_kernel_lge_msm8226/cm-13.0/g3beat_jag3gds.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/g3beat_jagnm.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/TheNotOnly/android_kernel_lge_msm8226/cm-13.0/g3beat_jagnm.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/galaxyr.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Grarak/grarak.github.io/master/grakernel/galaxyr.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/galaxys5.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/FrancescoCG/KernelUpdates/master/galaxys5tw.json", 3 | "https://raw.githubusercontent.com/FrancescoCG/KernelUpdates/master/galaxys5aosp.json" 4 | ] 5 | -------------------------------------------------------------------------------- /download/galaxys7.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/djb77/tgpkernel-s7/tw601/tgpkernel-tw601.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/galaxys7edge.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/djb77/tgpkernel-s7/tw601/tgpkernel-tw601.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/jalebi.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Shoaib0597/Velocity_Kernel_for_Yu-MSM8939/cm-12.1-amss-1.0.2/jalebi.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/lettuce.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Shoaib0597/Velocity_Kernel_for_Yu-MSM8939/Yup_CM12.1/lettuce.json", 3 | "https://raw.githubusercontent.com/The-Demon12/Json/master/phenex.json" 4 | ] 5 | -------------------------------------------------------------------------------- /download/nicki.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Nicklas373/Hana-Kernel_MSM8627-AOSP_7.0/master/tools/nicki.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/oneplusone.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/akhilnarang/akhilnarang.github.io/master/kernel/opo.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/peregrine.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/BryanByteZero/android_kernel_motorola_msm8226/restart6/peregrine.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/quark.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/bhb27/KernelAdiutor/json/quark.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/s2.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/rishabhrao/AndroModX-s2/android-6.0/AndroModX-s2.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/sm-g900t.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/ShinySide/KernelUpdates/master/sm-g900t.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/sprout.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/akhilnarang/akhilnarang.github.io/master/kernel/sprout.json", 3 | "https://raw.githubusercontent.com/Swapnil133609/swapnil133609.github.io/master/kernel/sprout.json", 4 | "https://raw.githubusercontent.com/vikrant699/Vikings_Sprout/marshmallow/sprout.json" 5 | ] 6 | -------------------------------------------------------------------------------- /download/tomato.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/HridayHS/Lightning-Downloads/master/tomato.json", 3 | "https://raw.githubusercontent.com/SomeshThakur/Xeon-KernelAdiutor/master/tomato.json", 4 | "https://raw.githubusercontent.com/Shoaib0597/Velocity_Kernel_for_Yu-MSM8939/cm-12.1-amss-1.0.2/tomato.json" 5 | ] 6 | -------------------------------------------------------------------------------- /download/wingtech.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/dev-elixir/elixir-redmi2/experimental/tools/elixir_r2.json", 3 | "https://raw.githubusercontent.com/dev-elixir/elixir-redmi2/master/tools/elixir_r2.json" 4 | ] 5 | -------------------------------------------------------------------------------- /download/x3.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/psycho-source/x3/master/x3.json" 3 | ] 4 | -------------------------------------------------------------------------------- /download/xperiasp.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://raw.githubusercontent.com/Tomoms/helium_kernel/release/huashan.json" 3 | ] 4 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NHellFire/KernelAdiutor/bc0fb7a2b4a3d0f1bb99a01a70b373728f457311/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 23 01:16:50 CET 2017 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-4.1-all.zip 7 | -------------------------------------------------------------------------------- /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 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 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 Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /importTranslations.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASE=`pwd` 4 | ZIP=$1 5 | 6 | if [ -z $ZIP ]; then 7 | echo missing ZIP 8 | exit 1 9 | fi 10 | 11 | if [ ! -f $ZIP ]; then 12 | echo ZIP does not exists 13 | exit 1 14 | fi 15 | 16 | NAME=`basename $ZIP` 17 | DIR=$(dirname $ZIP)/translations 18 | if [ -e $DIR ]; then 19 | rm -r $DIR 20 | fi 21 | mkdir -p $DIR 22 | cp $ZIP $DIR/ 23 | cd $DIR 24 | unzip -q $NAME 25 | rm $NAME 26 | for i in `ls`; do 27 | mv $i values-$i 28 | done 29 | 30 | mv values-ast values-ast-rES 31 | mv values-es-ES values-es 32 | mv values-hy-AM values-hy-rAM 33 | mv values-pt-BR values-pt-rBR 34 | mv values-pt-PT values-pt-rPT 35 | mv values-sv-SE values-sv 36 | mv values-zh-CN values-zh-rCN 37 | mv values-zh-TW values-zh-rTW 38 | 39 | for i in `ls`; do 40 | cp -r $i $BASE/app/src/main/res/ 41 | done 42 | 43 | cd .. 44 | rm -r translations 45 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | --------------------------------------------------------------------------------