├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── ic_launcher-web.png │ ├── java │ └── simple │ │ └── reboot │ │ └── com │ │ ├── MainActivity.kt │ │ ├── MainActivityViewModel.kt │ │ ├── RebootMenu.kt │ │ └── actions │ │ ├── ActionItems.kt │ │ ├── PowerActionItem.kt │ │ └── PowerActionType.kt │ └── res │ ├── drawable │ ├── ic_launcher_foreground.xml │ ├── ic_power_off.xml │ └── ic_restart.xml │ ├── mipmap-anydpi-v26 │ └── ic_launcher.xml │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ └── values │ ├── dimens.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── styles.xml ├── build.gradle ├── fastlane └── metadata │ └── android │ ├── af │ └── short_description.txt │ ├── am │ └── short_description.txt │ ├── ar │ └── short_description.txt │ ├── bg │ └── short_description.txt │ ├── ca │ └── short_description.txt │ ├── cs │ └── short_description.txt │ ├── da │ └── short_description.txt │ ├── de │ └── short_description.txt │ ├── el │ └── short_description.txt │ ├── en-US │ ├── changelogs │ │ └── 1803261730.txt │ ├── full_description.txt │ ├── images │ │ └── icon.png │ └── short_description.txt │ ├── eo │ └── short_description.txt │ ├── es │ └── short_description.txt │ ├── et │ └── short_description.txt │ ├── fi │ └── short_description.txt │ ├── fr │ └── short_description.txt │ ├── hi │ └── short_description.txt │ ├── hr │ └── short_description.txt │ ├── hu │ └── short_description.txt │ ├── id │ └── short_description.txt │ ├── it │ └── short_description.txt │ ├── ja │ └── short_description.txt │ ├── ko │ └── short_description.txt │ ├── lt │ └── short_description.txt │ ├── lv │ └── short_description.txt │ ├── nb │ └── short_description.txt │ ├── nl │ └── short_description.txt │ ├── no │ └── short_description.txt │ ├── pl │ └── short_description.txt │ ├── pt-BR │ └── short_description.txt │ ├── pt-PT │ └── short_description.txt │ ├── pt │ └── short_description.txt │ ├── ro │ └── short_description.txt │ ├── ru │ └── short_description.txt │ ├── sk │ └── short_description.txt │ ├── sv │ └── short_description.txt │ ├── sw │ └── short_description.txt │ ├── th │ └── short_description.txt │ ├── tr │ └── short_description.txt │ ├── uk │ └── short_description.txt │ ├── vi │ └── short_description.txt │ └── zh-CN │ └── short_description.txt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | .idea 8 | app/app.iml 9 | SimpleReboot.iml 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015-2024 Francisco Franco 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Simple-Reboot-app 2 | ================= 3 | 4 | Source code for my free app Simple Reboot. It's nothing fancy, just pushed following a user request. 5 | 6 | Play Store link: https://play.google.com/store/apps/details?id=simple.reboot.com -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/app.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 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 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | 4 | android { 5 | compileSdk = 34 6 | buildToolsVersion = "34.0.0" 7 | namespace = "simple.reboot.com" 8 | 9 | buildFeatures { 10 | compose true 11 | } 12 | 13 | composeOptions { 14 | kotlinCompilerExtensionVersion = "1.5.11" 15 | } 16 | 17 | defaultConfig { 18 | minSdkVersion 21 19 | targetSdkVersion 34 20 | versionCode 1803261732 21 | versionName "9.0" 22 | } 23 | 24 | compileOptions { 25 | sourceCompatibility = 17 26 | targetCompatibility = 17 27 | } 28 | 29 | kotlinOptions { 30 | jvmTarget = 17 31 | } 32 | 33 | signingConfigs { 34 | debug { 35 | } 36 | 37 | release { 38 | } 39 | } 40 | 41 | buildTypes { 42 | release { 43 | minifyEnabled true 44 | shrinkResources true 45 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 46 | signingConfig signingConfigs.release 47 | } 48 | 49 | debug { 50 | minifyEnabled false 51 | shrinkResources false 52 | } 53 | } 54 | } 55 | 56 | dependencies { 57 | implementation 'com.google.android.material:material:1.11.0' 58 | implementation 'com.github.topjohnwu.libsu:core:5.2.2' 59 | implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0" 60 | 61 | implementation platform('androidx.compose:compose-bom:2024.03.00') 62 | implementation 'androidx.compose.material3:material3:' 63 | implementation 'androidx.activity:activity-compose:1.8.2' 64 | 65 | implementation "androidx.lifecycle:lifecycle-runtime-compose:2.7.0" 66 | implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0" 67 | } 68 | -------------------------------------------------------------------------------- /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 /usr/local/opt/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 *Annotation* 19 | -keepattributes SourceFile,LineNumberTable 20 | -keep public class * extends java.lang.Exception -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com 2 | 3 | import android.os.Build 4 | import android.os.Bundle 5 | import androidx.activity.ComponentActivity 6 | import androidx.activity.compose.setContent 7 | import androidx.activity.enableEdgeToEdge 8 | import androidx.compose.foundation.isSystemInDarkTheme 9 | import androidx.compose.material3.MaterialTheme 10 | import androidx.compose.material3.darkColorScheme 11 | import androidx.compose.material3.dynamicDarkColorScheme 12 | import androidx.compose.material3.dynamicLightColorScheme 13 | import androidx.compose.material3.lightColorScheme 14 | import androidx.compose.ui.platform.LocalContext 15 | 16 | class MainActivity : ComponentActivity() { 17 | override fun onCreate(savedInstanceState: Bundle?) { 18 | enableEdgeToEdge() 19 | super.onCreate(savedInstanceState) 20 | 21 | setContent { 22 | val dynamicColor = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S 23 | val isSystemInDarkTheme = isSystemInDarkTheme() 24 | val context = LocalContext.current 25 | 26 | val colors = when { 27 | dynamicColor && isSystemInDarkTheme -> dynamicDarkColorScheme(context) 28 | dynamicColor && !isSystemInDarkTheme -> dynamicLightColorScheme(context) 29 | isSystemInDarkTheme -> darkColorScheme() 30 | else -> lightColorScheme() 31 | } 32 | 33 | MaterialTheme(colorScheme = colors) { RebootMenu() } 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/MainActivityViewModel.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com 2 | 3 | import androidx.compose.runtime.getValue 4 | import androidx.compose.runtime.mutableStateOf 5 | import androidx.compose.runtime.setValue 6 | import androidx.lifecycle.ViewModel 7 | import androidx.lifecycle.viewModelScope 8 | import com.topjohnwu.superuser.Shell 9 | import kotlinx.coroutines.Dispatchers 10 | import kotlinx.coroutines.launch 11 | import kotlinx.coroutines.withContext 12 | 13 | class MainActivityViewModel : ViewModel() { 14 | var uiState by mutableStateOf(UiState()) 15 | private set 16 | 17 | fun areWeRooted() { 18 | viewModelScope.launch { 19 | val isRoot = withContext(Dispatchers.IO) { Shell.getShell().isRoot } 20 | uiState = uiState.copy(areWeRooted = isRoot) 21 | } 22 | } 23 | 24 | fun runCommand(command: String) { 25 | Shell.cmd(command).submit() 26 | } 27 | } 28 | 29 | data class UiState( 30 | val areWeRooted: Boolean? = null 31 | ) -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/RebootMenu.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com 2 | 3 | import android.os.Process 4 | import android.widget.Toast 5 | import androidx.compose.foundation.background 6 | import androidx.compose.foundation.clickable 7 | import androidx.compose.foundation.interaction.MutableInteractionSource 8 | import androidx.compose.foundation.layout.Arrangement 9 | import androidx.compose.foundation.layout.Box 10 | import androidx.compose.foundation.layout.Column 11 | import androidx.compose.foundation.layout.fillMaxSize 12 | import androidx.compose.foundation.layout.padding 13 | import androidx.compose.foundation.layout.size 14 | import androidx.compose.foundation.lazy.grid.GridCells 15 | import androidx.compose.foundation.lazy.grid.LazyVerticalGrid 16 | import androidx.compose.foundation.lazy.grid.itemsIndexed 17 | import androidx.compose.foundation.shape.CircleShape 18 | import androidx.compose.foundation.shape.RoundedCornerShape 19 | import androidx.compose.material.ripple.rememberRipple 20 | import androidx.compose.material3.Icon 21 | import androidx.compose.material3.MaterialTheme 22 | import androidx.compose.material3.Surface 23 | import androidx.compose.material3.Text 24 | import androidx.compose.runtime.Composable 25 | import androidx.compose.runtime.getValue 26 | import androidx.compose.runtime.mutableIntStateOf 27 | import androidx.compose.runtime.remember 28 | import androidx.compose.runtime.setValue 29 | import androidx.compose.ui.Alignment 30 | import androidx.compose.ui.Modifier 31 | import androidx.compose.ui.draw.clip 32 | import androidx.compose.ui.graphics.Color 33 | import androidx.compose.ui.layout.onGloballyPositioned 34 | import androidx.compose.ui.platform.LocalContext 35 | import androidx.compose.ui.platform.LocalDensity 36 | import androidx.compose.ui.res.painterResource 37 | import androidx.compose.ui.res.stringResource 38 | import androidx.compose.ui.text.style.TextAlign 39 | import androidx.compose.ui.unit.dp 40 | import androidx.lifecycle.Lifecycle 41 | import androidx.lifecycle.compose.LifecycleEventEffect 42 | import androidx.lifecycle.viewmodel.compose.viewModel 43 | import simple.reboot.com.actions.ActionItems 44 | import simple.reboot.com.actions.PowerActionItem 45 | 46 | @Composable 47 | fun RebootMenu( 48 | modifier: Modifier = Modifier, 49 | viewModel: MainActivityViewModel = viewModel(), 50 | ) { 51 | val uiState = viewModel.uiState 52 | 53 | LifecycleEventEffect(event = Lifecycle.Event.ON_RESUME) { 54 | viewModel.areWeRooted() 55 | } 56 | 57 | if (uiState.areWeRooted == true) { 58 | Surface( 59 | modifier = modifier.fillMaxSize(), 60 | color = Color.Transparent 61 | ) { 62 | Box( 63 | modifier = Modifier.fillMaxSize(), 64 | contentAlignment = Alignment.Center 65 | ) { 66 | LazyVerticalGrid( 67 | modifier = Modifier 68 | .padding(all = 64.dp) 69 | .clip(RoundedCornerShape(size = 16.dp)) 70 | .background(color = MaterialTheme.colorScheme.background) 71 | .padding(16.dp), 72 | columns = GridCells.Fixed(2), 73 | horizontalArrangement = Arrangement.spacedBy(space = 16.dp), 74 | verticalArrangement = Arrangement.spacedBy(space = 16.dp) 75 | ) { 76 | itemsIndexed(items = ActionItems.commands) { index, item -> 77 | val bgColor = if (index == 0) { 78 | MaterialTheme.colorScheme.errorContainer 79 | } else { 80 | MaterialTheme.colorScheme.surfaceContainer 81 | } 82 | 83 | ActionButton( 84 | actionItem = item, 85 | bgColor = bgColor, 86 | runCommand = { viewModel.runCommand(item.command) } 87 | ) 88 | } 89 | } 90 | } 91 | } 92 | } else if (uiState.areWeRooted == false) { 93 | // we're dead in the water, warn the user and obliterate everything 94 | Toast.makeText(LocalContext.current, R.string.root_status_no, Toast.LENGTH_LONG).show() 95 | Process.killProcess(Process.myPid()) 96 | } 97 | } 98 | 99 | @Composable 100 | private fun ActionButton( 101 | modifier: Modifier = Modifier, 102 | actionItem: PowerActionItem, 103 | bgColor: Color, 104 | runCommand: () -> Unit, 105 | ) { 106 | var width by remember { mutableIntStateOf(0) } 107 | val size = with(LocalDensity.current) { width.toDp() } 108 | 109 | Column( 110 | modifier = modifier 111 | .fillMaxSize() 112 | .onGloballyPositioned { width = it.size.width }, 113 | verticalArrangement = Arrangement.spacedBy(8.dp) 114 | ) { 115 | Box( 116 | modifier = Modifier 117 | .size(size) 118 | .background(color = bgColor, shape = CircleShape) 119 | .clip(CircleShape) 120 | .clickable( 121 | interactionSource = remember { MutableInteractionSource() }, 122 | indication = rememberRipple(color = MaterialTheme.colorScheme.onBackground), 123 | onClick = runCommand 124 | ), 125 | contentAlignment = Alignment.Center 126 | ) { 127 | if (actionItem.icon != null) { 128 | Icon( 129 | painter = painterResource(id = actionItem.icon), 130 | contentDescription = null, 131 | tint = MaterialTheme.colorScheme.onSurface 132 | ) 133 | } 134 | } 135 | Text( 136 | modifier = Modifier.align(Alignment.CenterHorizontally), 137 | text = stringResource(id = actionItem.title), 138 | color = MaterialTheme.colorScheme.onBackground, 139 | style = MaterialTheme.typography.bodySmall, 140 | textAlign = TextAlign.Center 141 | ) 142 | } 143 | } -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/actions/ActionItems.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com.actions 2 | 3 | import simple.reboot.com.R 4 | 5 | private const val SHUTDOWN = "svc power shutdown" 6 | private const val REBOOT_CMD = "svc power reboot" 7 | private const val REBOOT_SOFT_REBOOT_CMD = "stop ; start" 8 | private const val REBOOT_RECOVERY_CMD = "reboot recovery" 9 | private const val REBOOT_BOOTLOADER_CMD = "reboot bootloader" 10 | private const val REBOOT_SYSTEMUI_CMD = 11 | "pidof com.android.systemui | awk '{print \$1}' | xargs kill" 12 | private val REBOOT_SAFE_MODE = StringBuilder() 13 | .append("setprop persist.sys.safemode 1;\n") 14 | .append(REBOOT_SOFT_REBOOT_CMD) 15 | .toString() 16 | 17 | object ActionItems { 18 | val commands: List = listOf( 19 | PowerActionItem( 20 | type = PowerActionType.POWER_OFF, 21 | title = R.string.shutdown, 22 | icon = R.drawable.ic_power_off, 23 | command = SHUTDOWN 24 | ), 25 | PowerActionItem( 26 | type = PowerActionType.RESTART, 27 | title = R.string.reboot, 28 | icon = R.drawable.ic_restart, 29 | command = REBOOT_CMD 30 | ), 31 | PowerActionItem( 32 | type = PowerActionType.RESTART_SYSTEMUI, 33 | title = R.string.restart_systemui, 34 | command = REBOOT_SYSTEMUI_CMD 35 | ), 36 | PowerActionItem( 37 | type = PowerActionType.SOFT_RESTART, 38 | title = R.string.soft_reboot, 39 | command = REBOOT_SOFT_REBOOT_CMD 40 | ), 41 | PowerActionItem( 42 | type = PowerActionType.RESTART_RECOVERY, 43 | title = R.string.reboot_recovery, 44 | command = REBOOT_RECOVERY_CMD 45 | ), 46 | PowerActionItem( 47 | type = PowerActionType.RESTART_BOOTLOADER, 48 | title = R.string.reboot_bootloader, 49 | command = REBOOT_BOOTLOADER_CMD 50 | ), 51 | PowerActionItem( 52 | type = PowerActionType.RESTART_SAFE_MODE, 53 | title = R.string.reboot_safe_mode, 54 | command = REBOOT_SAFE_MODE 55 | ) 56 | ) 57 | } -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/actions/PowerActionItem.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com.actions 2 | 3 | import androidx.annotation.DrawableRes 4 | import androidx.annotation.StringRes 5 | import androidx.compose.runtime.Stable 6 | 7 | @Stable 8 | data class PowerActionItem( 9 | val type: PowerActionType, 10 | @StringRes val title: Int, 11 | @DrawableRes val icon: Int? = null, 12 | val command: String, 13 | ) -------------------------------------------------------------------------------- /app/src/main/java/simple/reboot/com/actions/PowerActionType.kt: -------------------------------------------------------------------------------- 1 | package simple.reboot.com.actions 2 | 3 | enum class PowerActionType { 4 | POWER_OFF, 5 | RESTART, 6 | RESTART_SYSTEMUI, 7 | SOFT_RESTART, 8 | RESTART_RECOVERY, 9 | RESTART_BOOTLOADER, 10 | RESTART_SAFE_MODE 11 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_power_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_restart.xml: -------------------------------------------------------------------------------- 1 | 13 | 19 | 22 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 8dp 3 | 40dp 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Simple Reboot 4 | Restart 5 | Restart to recovery 6 | Restart to bootloader 7 | Root not available - this app won\'t work at all 8 | Soft restart 9 | Restart to safe mode 10 | Power off 11 | Close 12 | Restart SystemUi 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.9.23' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:8.3.1' 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | maven { url 'https://jitpack.io' } 18 | } 19 | } -------------------------------------------------------------------------------- /fastlane/metadata/android/af/short_description.txt: -------------------------------------------------------------------------------- 1 | Maak herselflaai weer groot - een herlaai op 'n slag 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/am/short_description.txt: -------------------------------------------------------------------------------- 1 | ታላቅ እንደገና ዳግም ለማድረግ - አንድ ዳግም ማስጀመር በአንድ ጊዜ 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ar/short_description.txt: -------------------------------------------------------------------------------- 1 | جعل تمهيد كبيرة مرة أخرى - إعادة تشغيل في وقت واحد 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/bg/short_description.txt: -------------------------------------------------------------------------------- 1 | Направи рестартирания страхотно отново - един рестарт в даден момент 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ca/short_description.txt: -------------------------------------------------------------------------------- 1 | Fer reinicis gran una altra vegada - un reinici alhora 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/cs/short_description.txt: -------------------------------------------------------------------------------- 1 | Ujistěte se restartuje znovu velký - jeden restart najednou 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/da/short_description.txt: -------------------------------------------------------------------------------- 1 | Foretag genstarter store igen - en genstart af gangen 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/de/short_description.txt: -------------------------------------------------------------------------------- 1 | Neustarts wieder einfach machen – ein gezielter Neustart 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/el/short_description.txt: -------------------------------------------------------------------------------- 1 | Κάντε επανεκκίνηση μεγάλη και πάλι - μια επανεκκίνηση σε έναν χρόνο 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/changelogs/1803261730.txt: -------------------------------------------------------------------------------- 1 | * Added a new option to restart SystemUi 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 |

It'll be the best reboot you'll ever experience.

2 |

Do you want to reboot and your rom doesn't have that shortcut? Simple Reboot.

3 |

Do you want to enter the recovery and you don't want to enter the line manually into the terminal? Simple Reboot.

4 |

Do you want to enter your bootloader to use fastboot and there is no way reboot into it? Simple Reboot.

5 |

Now also including a Soft Reboot and Safe Mode reboot options!

6 |

Restart SystemUi without rebooting your device.

7 |

Be afraid no more! This simple application gives you all the shortcuts for all these tasks without having to type it into command line or adb. You just need root and you're good to go!!!

8 |

It only does what it's advertised, no shady permissions or data collection.

9 |

For transparency the source code is available here: https://github.com/franciscofranco/Simple-Reboot-app

10 |

It just works™

-------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/fastlane/metadata/android/en-US/images/icon.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Make reboots great again - one restart at a time -------------------------------------------------------------------------------- /fastlane/metadata/android/eo/short_description.txt: -------------------------------------------------------------------------------- 1 | Aldonaj eblaĵoj por restarti aparaton (postulas «root») 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/es/short_description.txt: -------------------------------------------------------------------------------- 1 | Hacer reinicios grande otra vez - un reinicio a la vez 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/et/short_description.txt: -------------------------------------------------------------------------------- 1 | Tee reboots suur uuesti - üks restart korraga 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/fi/short_description.txt: -------------------------------------------------------------------------------- 1 | Tee uudelleenkäynnistykset suuri jälleen - yksi uudelleenkäynnistys kerrallaan 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/fr/short_description.txt: -------------------------------------------------------------------------------- 1 | Pour rendre leur grandeur aux redémarrages, un à la fois 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/hi/short_description.txt: -------------------------------------------------------------------------------- 1 | एक समय में एक पुनः आरंभ - फिर से महान रिबूट बनाओ 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/hr/short_description.txt: -------------------------------------------------------------------------------- 1 | Provjerite ponovno podizanje sustava opet super - jedan restart na vrijeme 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/hu/short_description.txt: -------------------------------------------------------------------------------- 1 | Tedd újraindul megint szép - egy újraindítás egy időben 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/id/short_description.txt: -------------------------------------------------------------------------------- 1 | Membuat reboot besar lagi - satu me-restart pada suatu waktu 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/it/short_description.txt: -------------------------------------------------------------------------------- 1 | Fare riavvii di nuovo grande - una ripartenza alla volta 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ja/short_description.txt: -------------------------------------------------------------------------------- 1 | 偉大再びリブートしてください - 1の再起動を一度に 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ko/short_description.txt: -------------------------------------------------------------------------------- 1 | 큰 다시 재부팅을합니다 - 하나 다시 시작을 한 번에 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/lt/short_description.txt: -------------------------------------------------------------------------------- 1 | Padaryti persikrauna puikus vėl - vienas iš naujo metu 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/lv/short_description.txt: -------------------------------------------------------------------------------- 1 | Padarīt reboots liels atkal - vienu restart laikā 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/nb/short_description.txt: -------------------------------------------------------------------------------- 1 | Gjør omstarter storartede igjen - én omstart av gangen 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/nl/short_description.txt: -------------------------------------------------------------------------------- 1 | Maak reboots opnieuw geweldig - één keer opnieuw opstarten in een tijd 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/no/short_description.txt: -------------------------------------------------------------------------------- 1 | Gjør reboots stor igjen - en omstart av gangen 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pl/short_description.txt: -------------------------------------------------------------------------------- 1 | Spraw, aby ponowne uruchomienie znów było świetne - jeden restart na raz 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pt-BR/short_description.txt: -------------------------------------------------------------------------------- 1 | Faça reboots grande novamente - uma reinicialização de cada vez 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pt-PT/short_description.txt: -------------------------------------------------------------------------------- 1 | Faça reboots grande novamente - uma reinicialização de cada vez 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/pt/short_description.txt: -------------------------------------------------------------------------------- 1 | Faça reboots grande novamente - uma reinicialização de cada vez 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ro/short_description.txt: -------------------------------------------------------------------------------- 1 | A face reporniri mare din nou - o repornire la un moment dat 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/ru/short_description.txt: -------------------------------------------------------------------------------- 1 | Сделайте перезагрузок здорово снова - один рестарт в то время 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/sk/short_description.txt: -------------------------------------------------------------------------------- 1 | Uistite sa reštartuje znovu veľký - jeden reštart naraz 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/sv/short_description.txt: -------------------------------------------------------------------------------- 1 | Gör omstarter stora igen - en omstart i taget 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/sw/short_description.txt: -------------------------------------------------------------------------------- 1 | Kufanya reboots kubwa tena - upya moja kwa wakati mmoja 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/th/short_description.txt: -------------------------------------------------------------------------------- 1 | ทำให้เรียบที่ยิ่งใหญ่อีกครั้ง - หนึ่งเริ่มต้นใหม่ได้ตลอดเวลา 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/tr/short_description.txt: -------------------------------------------------------------------------------- 1 | Yeniden başlatma işini mükemmel hale getirin - her sefer bir yeniden başlatma 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/uk/short_description.txt: -------------------------------------------------------------------------------- 1 | Зробіть перезавантажень здорово знову - один рестарт в той час 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/vi/short_description.txt: -------------------------------------------------------------------------------- 1 | Hãy khởi động lại lớn nữa - một khởi động lại tại một thời điểm 2 | -------------------------------------------------------------------------------- /fastlane/metadata/android/zh-CN/short_description.txt: -------------------------------------------------------------------------------- 1 | 让重新启动再次伟大 —— 每次重启一次 2 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.caching=true 2 | org.gradle.daemon=true 3 | org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" 4 | android.useAndroidX=true 5 | org.gradle.unsafe.configuration-cache=true 6 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/franciscofranco/Simple-Reboot-app/fc043f6807324c03b46a342d44a98703ae915d51/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https://services.gradle.org/distributions/gradle-8.7-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | 88 | @rem Execute Gradle 89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 90 | 91 | :end 92 | @rem End local scope for the variables with windows NT shell 93 | if "%ERRORLEVEL%"=="0" goto mainEnd 94 | 95 | :fail 96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 97 | rem the _cmd.exe /c_ return code! 98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 99 | exit /b 1 100 | 101 | :mainEnd 102 | if "%OS%"=="Windows_NT" endlocal 103 | 104 | :omega 105 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' --------------------------------------------------------------------------------