├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro ├── release │ └── output-metadata.json └── src │ └── main │ ├── AndroidManifest.xml │ ├── ic_launcher-playstore.png │ ├── java │ └── com │ │ └── iumlab │ │ └── fxxk1installer │ │ ├── InstallActivity.kt │ │ ├── InstallReceiver.kt │ │ ├── MainActivity.kt │ │ ├── ui │ │ ├── components │ │ │ ├── CardAbout.kt │ │ │ ├── CardGuide.kt │ │ │ ├── CardPermission.kt │ │ │ └── SystemUI.kt │ │ └── theme │ │ │ ├── Color.kt │ │ │ ├── Theme.kt │ │ │ └── Type.kt │ │ └── utils │ │ └── SystemUtils.kt │ └── res │ ├── drawable │ ├── ic_github_fill.xml │ ├── ic_launcher_background.xml │ └── ic_launcher_foreground.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-mdpi │ ├── ic_launcher.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxxhdpi │ ├── ic_launcher.webp │ ├── ic_launcher_foreground.webp │ └── ic_launcher_round.webp │ ├── values-night │ └── themes.xml │ ├── values-zh-rCN │ └── strings.xml │ ├── values │ ├── colors.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── themes.xml │ └── xml │ ├── backup_rules.xml │ ├── data_extraction_rules.xml │ └── file_path.xml ├── build.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 iumLab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apk.1-Installer 2 | 由于在QQ和微信中发送apk文件时,文件名会被万恶的腾讯添加后缀.1,此App可以省去重命名步骤,直接安装apk。 3 | ## 步骤 4 | - 获取安装权限(不需要读取存储权限) 5 | - 在QQ或微信里点击文件 → 用其他应用打开 → Apk.1 安装器 → 软件安装程序 6 | - And F_ck Tencənt 7 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.impldep.com.jcraft.jsch.ConfigRepository.defaultConfig 2 | import org.jetbrains.kotlin.com.intellij.diagnostic.StartUpMeasurer 3 | 4 | plugins { 5 | id("com.android.application") 6 | id("org.jetbrains.kotlin.android") 7 | } 8 | 9 | android { 10 | namespace = "com.iumlab.fxxk1installer" 11 | compileSdk = 35 12 | 13 | defaultConfig { 14 | applicationId = "com.iumlab.fxxk1installer" 15 | minSdk = 23 16 | targetSdk = 35 17 | versionCode = 9 18 | versionName = "1.8" 19 | 20 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 21 | vectorDrawables { 22 | useSupportLibrary = true 23 | } 24 | ndk { 25 | abiFilters.add("armeabi-v7a") 26 | abiFilters.add("arm64-v8a") 27 | abiFilters.add("x86") 28 | abiFilters.add("x86_64") 29 | } 30 | } 31 | 32 | buildTypes { 33 | release { 34 | isMinifyEnabled = true 35 | isShrinkResources = true 36 | isDebuggable = false 37 | proguardFiles( 38 | getDefaultProguardFile("proguard-android-optimize.txt"), 39 | "proguard-rules.pro" 40 | ) 41 | } 42 | 43 | debug { 44 | applicationIdSuffix = ".debug" 45 | } 46 | } 47 | compileOptions { 48 | sourceCompatibility = JavaVersion.VERSION_1_8 49 | targetCompatibility = JavaVersion.VERSION_1_8 50 | } 51 | configurations { 52 | all { 53 | exclude(module = "appcompat-v7") 54 | exclude(module = "support-v4") 55 | } 56 | } 57 | kotlinOptions { 58 | jvmTarget = "1.8" 59 | } 60 | buildFeatures { 61 | compose = true 62 | } 63 | composeOptions { 64 | kotlinCompilerExtensionVersion = "1.5.1" 65 | } 66 | packaging { 67 | resources { 68 | excludes += "/META-INF/{AL2.0,LGPL2.1}" 69 | } 70 | } 71 | 72 | 73 | } 74 | android.applicationVariants.all { 75 | val buildType = this.buildType.name 76 | outputs.all { 77 | if (this is com.android.build.gradle.internal.api.ApkVariantOutputImpl) { 78 | this.outputFileName = "${applicationId}_${versionName}_$buildType.apk" 79 | } 80 | } 81 | } 82 | 83 | dependencies { 84 | 85 | implementation("androidx.core:core-ktx:1.15.0") 86 | implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7") 87 | implementation("androidx.activity:activity-compose:1.9.3") 88 | implementation(platform("androidx.compose:compose-bom:2024.12.01")) 89 | implementation("androidx.compose.ui:ui") 90 | implementation("androidx.compose.ui:ui-graphics") 91 | implementation("androidx.compose.ui:ui-tooling-preview") 92 | implementation("androidx.compose.material3:material3") 93 | testImplementation("junit:junit:4.13.2") 94 | androidTestImplementation("androidx.test.ext:junit:1.2.1") 95 | androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1") 96 | androidTestImplementation(platform("androidx.compose:compose-bom:2024.12.01")) 97 | androidTestImplementation("androidx.compose.ui:ui-test-junit4") 98 | debugImplementation("androidx.compose.ui:ui-tooling") 99 | debugImplementation("androidx.compose.ui:ui-test-manifest") 100 | 101 | implementation("com.google.accompanist:accompanist-systemuicontroller:0.28.0") 102 | implementation("com.google.accompanist:accompanist-permissions:0.34.0") 103 | 104 | implementation("androidx.core:core-splashscreen:1.0.1") 105 | 106 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | #Okio 24 | -dontwarn org.codehaus.mojo.animal_sniffer.* 25 | 26 | # OkHttp3 27 | -dontwarn okhttp3.logging.** 28 | -keep class okhttp3.internal.**{*;} 29 | -dontwarn okio.** 30 | -dontwarn com.alibaba.** 31 | -dontwarn io.liteglue.** 32 | -dontwarn net.vidageek.** 33 | -dontwarn org.apache.** 34 | -dontwarn org.chromium.** 35 | -dontwarn org.greenrobot.** 36 | -dontwarn com.thoughtworks.** 37 | -dontwarn com.google.** 38 | 39 | # Retrofit2 40 | -dontwarn javax.annotation.** 41 | -dontwarn javax.inject.** 42 | -dontwarn retrofit2.** 43 | -keep class retrofit2.** { *; } 44 | -keepattributes Signature 45 | -keepattributes Exceptions 46 | 47 | # RxJava RxAndroid 48 | -dontwarn sun.misc.** 49 | -keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* { 50 | long producerIndex; 51 | long consumerIndex; 52 | } 53 | 54 | 55 | # Gson 56 | -keep class com.google.gson.stream.** { *; } 57 | -keepattributes EnclosingMethod 58 | 59 | #AndroidX 60 | -keep class com.google.android.material.** {*;} 61 | -keep class androidx.** {*;} 62 | -keep public class * extends androidx.** 63 | -keep interface androidx.** {*;} 64 | -dontwarn com.google.android.material.** 65 | -dontnote com.google.android.material.** 66 | -dontwarn androidx.** 67 | 68 | -keepclasseswithmembers class * { 69 | public (android.content.Context); 70 | } 71 | -keepclasseswithmembers class * { 72 | public (android.content.Context, android.util.AttributeSet); 73 | } 74 | -keepclasseswithmembers class * { 75 | public (android.content.Context, android.util.AttributeSet, int); 76 | } 77 | 78 | -keep class **.R$* {*;} 79 | 80 | -keepclassmembers public class * extends android.view.View { 81 | void set*(***); 82 | *** get*(); 83 | } 84 | 85 | -keepclassmembers public class * extends android.view.View { 86 | void set*(***); 87 | *** get*(); 88 | } 89 | 90 | # Please add these rules to your existing keep rules in order to suppress warnings. 91 | # This is generated automatically by the Android Gradle plugin. 92 | 93 | -------------------------------------------------------------------------------- /app/release/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "com.iumlab.fxxk1installer", 8 | "variantName": "release", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 9, 15 | "versionName": "1.8", 16 | "outputFile": "com.iumlab.fxxk1installer_1.8_release.apk" 17 | } 18 | ], 19 | "elementType": "File", 20 | "baselineProfiles": [ 21 | { 22 | "minApi": 28, 23 | "maxApi": 30, 24 | "baselineProfiles": [ 25 | "baselineProfiles/1/com.iumlab.fxxk1installer_1.8_release.dm" 26 | ] 27 | }, 28 | { 29 | "minApi": 31, 30 | "maxApi": 2147483647, 31 | "baselineProfiles": [ 32 | "baselineProfiles/0/com.iumlab.fxxk1installer_1.8_release.dm" 33 | ] 34 | } 35 | ], 36 | "minSdkVersionForDexing": 23 37 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 47 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/InstallActivity.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer 2 | 3 | import android.content.Intent 4 | import android.net.Uri 5 | import android.os.Build 6 | import android.os.Bundle 7 | import android.provider.Settings 8 | import android.view.View 9 | import android.view.WindowManager 10 | import androidx.activity.ComponentActivity 11 | import androidx.activity.compose.setContent 12 | import androidx.compose.foundation.layout.fillMaxSize 13 | import androidx.compose.material3.AlertDialog 14 | import androidx.compose.material3.MaterialTheme 15 | import androidx.compose.material3.Surface 16 | import androidx.compose.material3.Text 17 | import androidx.compose.material3.TextButton 18 | import androidx.compose.runtime.Composable 19 | import androidx.compose.runtime.getValue 20 | import androidx.compose.runtime.mutableStateOf 21 | import androidx.compose.runtime.setValue 22 | import androidx.compose.ui.Modifier 23 | import androidx.compose.ui.graphics.Color 24 | import androidx.compose.ui.res.stringResource 25 | import androidx.core.content.FileProvider 26 | import com.iumlab.fxxk1installer.ui.theme.AppTheme 27 | import java.io.BufferedInputStream 28 | import java.io.BufferedOutputStream 29 | import java.io.File 30 | import java.io.FileOutputStream 31 | import java.io.IOException 32 | import java.io.InputStream 33 | import java.io.OutputStream 34 | 35 | var showDialog by mutableStateOf(false) 36 | open class InstallActivity : ComponentActivity() { 37 | private val TAG = this.javaClass.name.toString() 38 | override fun onCreate(savedInstanceState: Bundle?) { 39 | val window = window 40 | window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) 41 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) 42 | window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN 43 | window.statusBarColor = Color.Transparent.hashCode() 44 | window.navigationBarColor = Color.Transparent.hashCode() 45 | // DynamicColors.applyToActivityIfAvailable(this) 46 | super.onCreate(savedInstanceState) 47 | val b = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 48 | packageManager.canRequestPackageInstalls() 49 | } else { 50 | true 51 | } 52 | if (b) { 53 | handleShared(intent) 54 | } else { 55 | showDialog = true 56 | } 57 | setContent { 58 | AppTheme { 59 | // A surface container using the 'background' color from the theme 60 | Surface( 61 | modifier = Modifier.fillMaxSize(), 62 | color = MaterialTheme.colorScheme.background 63 | ) { 64 | Home() 65 | // val b = packageManager.canRequestPackageInstalls() 66 | // if (!b) { 67 | // PermissionDialog { 68 | // val intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES) 69 | // startActivity(intent) 70 | // } 71 | // } 72 | PermissionDialog() 73 | } 74 | } 75 | } 76 | } 77 | 78 | override fun onNewIntent(intent: Intent) { 79 | super.onNewIntent(intent) 80 | handleShared(intent) 81 | sendBroadcast(Intent("CLOSE_MAIN_ACTIVITY")) 82 | } 83 | 84 | private fun handleShared(i: Intent?) { 85 | val intent: Intent? = i ?: intent 86 | val action: String? = intent?.action 87 | val type: String? = intent?.type 88 | val uri: Uri? = intent?.data 89 | 90 | val filePath = uri?.encodedPath ?: return 91 | if (filePath.endsWith(".apk")){ 92 | install(i) 93 | } else { 94 | copyFile(uri) 95 | } 96 | 97 | } 98 | 99 | private fun copyFile(uri : Uri) { 100 | try { 101 | val inputStream: InputStream = 102 | contentResolver.openInputStream(uri) ?: return 103 | val path = this.getExternalFilesDir("cache")!!.absolutePath+ "/temp.apk" 104 | val outputStream: OutputStream = FileOutputStream(path) 105 | copyStream(inputStream, outputStream, path) 106 | inputStream.close() 107 | outputStream.close() 108 | } catch (e: Exception) { 109 | e.printStackTrace() 110 | } 111 | } 112 | private fun copyStream(input: InputStream, output: OutputStream, path: String) { //文件存储 113 | val bufferSize = 1024 * 2 114 | val buffer = ByteArray(bufferSize) 115 | val in0 = BufferedInputStream(input, bufferSize) 116 | val out = BufferedOutputStream(output, bufferSize) 117 | var count = 0 118 | var n = 0 119 | try { 120 | while (in0.read(buffer, 0, bufferSize).also { n = it } != -1) { 121 | out.write(buffer, 0, n) 122 | count += n 123 | } 124 | out.flush() 125 | out.close() 126 | in0.close() 127 | val id = application.packageName 128 | val intent = Intent(Intent.ACTION_VIEW) 129 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 130 | val uri = FileProvider.getUriForFile( 131 | this, 132 | "$id.provider", 133 | File(path) 134 | ) 135 | intent.setDataAndType(uri, "application/vnd.android.package-archive") 136 | install(intent) 137 | } catch (e: IOException) { 138 | e.printStackTrace() 139 | } 140 | } 141 | 142 | private fun install(apk : File) { 143 | // val intent = Intent(Intent.ACTION_VIEW) 144 | // intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK 145 | // intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) 146 | // val contentUri = FileProvider.getUriForFile(this, mAuthority, apk) 147 | // intent.setDataAndType(contentUri, INTENT_TYPE) 148 | // mActivity.startActivity(intent) 149 | } 150 | 151 | private fun install(intent: Intent?) { 152 | if (intent == null) { 153 | return 154 | } 155 | val dataUri = intent.data 156 | // val intent = packageManager.getLaunchIntentForPackage("com.android.packageinstaller")!! 157 | val intent = Intent(Intent.ACTION_VIEW) 158 | 159 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 160 | intent.addFlags( 161 | Intent.FLAG_GRANT_READ_URI_PERMISSION /* | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION*/ 162 | ) 163 | intent.setDataAndType(dataUri, "application/vnd.android.package-archive") 164 | startActivity(intent) 165 | finish() 166 | } 167 | 168 | @Composable 169 | fun PermissionDialog() { 170 | if (showDialog) { 171 | AlertDialog( 172 | onDismissRequest = { 173 | showDialog = false }, 174 | title = { 175 | Text( 176 | text = stringResource(R.string.get_permission), 177 | style = MaterialTheme.typography.titleLarge 178 | ) 179 | }, 180 | text = { 181 | Text( 182 | text = stringResource(R.string.desc_permission), 183 | style = MaterialTheme.typography.bodyMedium 184 | ) 185 | }, 186 | dismissButton = { 187 | TextButton(onClick = { 188 | showDialog = false 189 | }) { 190 | Text(text = stringResource(R.string.cancel)) 191 | } 192 | }, 193 | confirmButton = { 194 | TextButton(onClick = { 195 | showDialog = false 196 | val intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES) 197 | startActivity(intent) 198 | }) { 199 | Text(text = stringResource(R.string.ok)) 200 | } 201 | } 202 | ) 203 | } 204 | } 205 | } 206 | 207 | -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/InstallReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.content.pm.PackageManager 7 | import android.text.TextUtils 8 | import android.util.Log 9 | import java.io.File 10 | 11 | 12 | class InstallReceiver : BroadcastReceiver() { 13 | override fun onReceive(context: Context, intent: Intent) { 14 | val pm: PackageManager = context.packageManager 15 | 16 | if (TextUtils.equals(intent.action, Intent.ACTION_PACKAGE_ADDED)) { 17 | val packageName: String = intent.data!!.schemeSpecificPart 18 | val path = context.getExternalFilesDir("cache")!!.absolutePath+ "/temp.apk" 19 | val file = File(path) 20 | file.delete() 21 | } 22 | /* else if (TextUtils.equals(intent.action, Intent.ACTION_PACKAGE_REPLACED)) { 23 | val packageName: String = intent.data!!.schemeSpecificPart 24 | } else if (TextUtils.equals(intent.action, Intent.ACTION_PACKAGE_REMOVED)) { 25 | val packageName: String = intent.data!!.schemeSpecificPart 26 | }*/ 27 | } 28 | } -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.content.IntentFilter 7 | import android.os.Build 8 | import android.os.Bundle 9 | import android.view.View 10 | import android.view.WindowManager 11 | import androidx.activity.ComponentActivity 12 | import androidx.activity.compose.setContent 13 | import androidx.activity.enableEdgeToEdge 14 | import androidx.compose.foundation.layout.Column 15 | import androidx.compose.foundation.layout.fillMaxSize 16 | import androidx.compose.foundation.layout.padding 17 | import androidx.compose.material3.CenterAlignedTopAppBar 18 | import androidx.compose.material3.ExperimentalMaterial3Api 19 | import androidx.compose.material3.MaterialTheme 20 | import androidx.compose.material3.Scaffold 21 | import androidx.compose.material3.Surface 22 | import androidx.compose.material3.Text 23 | import androidx.compose.material3.TopAppBarDefaults 24 | import androidx.compose.runtime.Composable 25 | import androidx.compose.ui.Modifier 26 | import androidx.compose.ui.graphics.Color 27 | import androidx.compose.ui.res.stringResource 28 | import androidx.compose.ui.tooling.preview.Preview 29 | import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen 30 | import com.google.accompanist.systemuicontroller.rememberSystemUiController 31 | import com.iumlab.fxxk1installer.ui.components.CardAbout 32 | import com.iumlab.fxxk1installer.ui.components.CardGuide 33 | import com.iumlab.fxxk1installer.ui.components.CardPermission 34 | import com.iumlab.fxxk1installer.ui.theme.AppTheme 35 | 36 | 37 | class MainActivity : ComponentActivity() { 38 | private val TAG = this.javaClass.name.toString() 39 | private lateinit var receiver: InstallReceiver 40 | private lateinit var closeReceiver: BroadcastReceiver 41 | val mainActivity = this 42 | private var keepSplashScreen = true 43 | override fun onCreate(savedInstanceState: Bundle?) { 44 | val window = window 45 | window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS) 46 | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) 47 | window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN 48 | window.statusBarColor = Color.Transparent.hashCode() 49 | window.navigationBarColor = Color.Transparent.hashCode() 50 | // actionBar?.hide() 51 | val splashScreen = installSplashScreen() 52 | enableEdgeToEdge() 53 | super.onCreate(savedInstanceState) 54 | 55 | setContent { 56 | AppTheme { 57 | // SetSystemBar() 58 | // A surface container using the 'background' color from the theme 59 | Surface( 60 | modifier = Modifier.fillMaxSize(), 61 | color = MaterialTheme.colorScheme.background 62 | ) { 63 | Home() 64 | } 65 | } 66 | } 67 | 68 | register() 69 | } 70 | private fun register() { 71 | receiver = InstallReceiver() 72 | val intentFilter = IntentFilter() 73 | intentFilter.addAction(Intent.ACTION_PACKAGE_ADDED) 74 | intentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED) 75 | intentFilter.addAction(Intent.ACTION_PACKAGE_REPLACED) 76 | intentFilter.addDataScheme("package") 77 | registerReceiver(InstallReceiver(), intentFilter) 78 | 79 | closeReceiver = object : BroadcastReceiver() { 80 | override fun onReceive(context: Context?, intent: Intent?) { 81 | if (intent?.action == "CLOSE_MAIN_ACTIVITY") { 82 | finish() 83 | } 84 | } 85 | } 86 | 87 | 88 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { 89 | registerReceiver(closeReceiver, IntentFilter("CLOSE_MAIN_ACTIVITY"), RECEIVER_NOT_EXPORTED) 90 | } else { 91 | registerReceiver(closeReceiver, IntentFilter("CLOSE_MAIN_ACTIVITY")) 92 | } 93 | } 94 | 95 | override fun onDestroy() { 96 | super.onDestroy() 97 | 98 | try { 99 | unregisterReceiver(receiver) 100 | } catch (e: Exception) { 101 | e.printStackTrace() 102 | } 103 | } 104 | 105 | } 106 | 107 | @OptIn(ExperimentalMaterial3Api::class) 108 | @Preview(showBackground = true) 109 | @Composable 110 | fun Home() { 111 | AppTheme { 112 | Column { 113 | Scaffold( 114 | topBar = { 115 | CenterAlignedTopAppBar( 116 | colors = TopAppBarDefaults.topAppBarColors( 117 | containerColor = MaterialTheme.colorScheme.background, 118 | titleContentColor = MaterialTheme.colorScheme.primary, 119 | ), 120 | title = { 121 | Text(text = stringResource(id = R.string.app_name)) 122 | } 123 | ) 124 | }, 125 | ) { innerPadding -> 126 | Column(modifier = Modifier.padding(innerPadding)) { 127 | CardGuide() 128 | CardPermission() 129 | CardAbout() 130 | } 131 | 132 | } 133 | } 134 | } 135 | } 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/components/CardAbout.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.components 2 | 3 | import android.widget.Toast 4 | import androidx.compose.foundation.BorderStroke 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.Column 9 | import androidx.compose.foundation.layout.Row 10 | import androidx.compose.foundation.layout.fillMaxWidth 11 | import androidx.compose.foundation.layout.padding 12 | import androidx.compose.foundation.layout.wrapContentHeight 13 | import androidx.compose.material.ripple.rememberRipple 14 | import androidx.compose.material3.CardDefaults 15 | import androidx.compose.material3.Icon 16 | import androidx.compose.material3.MaterialTheme 17 | import androidx.compose.material3.OutlinedCard 18 | import androidx.compose.material3.Text 19 | import androidx.compose.material3.ripple 20 | import androidx.compose.runtime.Composable 21 | import androidx.compose.runtime.getValue 22 | import androidx.compose.runtime.mutableIntStateOf 23 | import androidx.compose.runtime.mutableLongStateOf 24 | import androidx.compose.runtime.remember 25 | import androidx.compose.runtime.setValue 26 | import androidx.compose.ui.Alignment 27 | import androidx.compose.ui.Modifier 28 | import androidx.compose.ui.draw.clip 29 | import androidx.compose.ui.platform.LocalContext 30 | import androidx.compose.ui.platform.LocalUriHandler 31 | import androidx.compose.ui.res.painterResource 32 | import androidx.compose.ui.res.stringResource 33 | import androidx.compose.ui.tooling.preview.Preview 34 | import androidx.compose.ui.unit.dp 35 | import com.iumlab.fxxk1installer.R 36 | import com.iumlab.fxxk1installer.utils.SystemUtils 37 | 38 | @Preview 39 | @Composable 40 | fun CardAbout() { 41 | val uriHandler = LocalUriHandler.current 42 | val context = LocalContext.current 43 | var clickTimes by remember { mutableIntStateOf(0) } 44 | var clickMoment by remember { mutableLongStateOf(0L) } 45 | OutlinedCard( 46 | colors = CardDefaults.cardColors( 47 | containerColor = MaterialTheme.colorScheme.surface, 48 | ), 49 | border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), 50 | modifier = Modifier 51 | .clip(shape = MaterialTheme.shapes.extraLarge) 52 | .wrapContentHeight() 53 | .fillMaxWidth() 54 | .padding(20.dp) 55 | ) { 56 | Column( 57 | modifier = Modifier 58 | .background(color = MaterialTheme.colorScheme.surface) 59 | .fillMaxWidth() 60 | .padding(20.dp) 61 | ) { 62 | Text( 63 | text = stringResource(R.string.about), 64 | style = MaterialTheme.typography.headlineLarge, 65 | modifier = Modifier.clickable( onClick = { 66 | clickMoment = System.currentTimeMillis(); 67 | clickTimes++ 68 | if (clickTimes == 7) { 69 | SystemUtils.setupVisibleInLauncher(context) 70 | clickTimes = 0 71 | } 72 | if (System.currentTimeMillis() - clickMoment > 2000) { 73 | clickTimes = 0 74 | } 75 | clickMoment = System.currentTimeMillis(); 76 | }, 77 | interactionSource = remember { MutableInteractionSource() }, 78 | indication = ripple(),) 79 | ) 80 | Row( 81 | verticalAlignment = Alignment.CenterVertically, 82 | modifier = Modifier 83 | .padding(0.dp, 10.dp, 0.dp, 0.dp) 84 | .clickable( 85 | onClick = { 86 | uriHandler.openUri("https://github.com/Ium-Lab/Apk.1-Installer") 87 | }, 88 | interactionSource = remember { MutableInteractionSource() }, 89 | indication = ripple(bounded = false), 90 | 91 | ) 92 | ) { 93 | Icon( 94 | painter = painterResource(id = R.drawable.ic_github_fill), 95 | contentDescription = "Github" 96 | ) 97 | Column { 98 | Text( 99 | text = "Github", 100 | modifier = Modifier.padding(20.dp, 0.dp, 0.dp, 0.dp) 101 | ) 102 | Text( 103 | text = "Ium-Lab/Apk.1-Installer", 104 | style = MaterialTheme.typography.bodySmall, 105 | modifier = Modifier.padding(20.dp, 0.dp, 0.dp, 0.dp) 106 | ) 107 | } 108 | } 109 | /* Row ( 110 | verticalAlignment = Alignment.CenterVertically, 111 | modifier = Modifier 112 | .padding(0.dp, 10.dp, 0.dp, 0.dp) 113 | .clickable( 114 | onClick = { 115 | uriHandler.openUri("https://github.com/Ium-Lab/Apk.1-Installer") 116 | }, 117 | interactionSource = remember { MutableInteractionSource() }, 118 | indication = rememberRipple(bounded = false), 119 | 120 | ) 121 | ){ 122 | Icon( 123 | painter = painterResource(id = R.drawable.ic_github_fill), 124 | contentDescription = "Update" 125 | ) 126 | Text(//https://api.github.com/repos/Ium-Lab/Apk.1-Installer/releases/latest 127 | text = "Update", 128 | modifier = Modifier.padding(20.dp, 0.dp, 0.dp, 0.dp) 129 | ) 130 | }*/ 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/components/CardGuide.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.components 2 | 3 | import androidx.compose.foundation.BorderStroke 4 | import androidx.compose.foundation.background 5 | import androidx.compose.foundation.layout.Column 6 | import androidx.compose.foundation.layout.fillMaxWidth 7 | import androidx.compose.foundation.layout.padding 8 | import androidx.compose.foundation.layout.wrapContentHeight 9 | import androidx.compose.foundation.shape.RoundedCornerShape 10 | import androidx.compose.material3.CardDefaults 11 | import androidx.compose.material3.MaterialTheme 12 | import androidx.compose.material3.OutlinedCard 13 | import androidx.compose.material3.Text 14 | import androidx.compose.runtime.Composable 15 | import androidx.compose.ui.Modifier 16 | import androidx.compose.ui.draw.clip 17 | import androidx.compose.ui.res.stringResource 18 | import androidx.compose.ui.text.font.FontFamily 19 | import androidx.compose.ui.unit.dp 20 | import com.iumlab.fxxk1installer.R 21 | 22 | @Composable 23 | fun CardGuide() { 24 | OutlinedCard( 25 | elevation = CardDefaults.cardElevation( 26 | defaultElevation = 10.dp 27 | ), 28 | colors = CardDefaults.cardColors( 29 | containerColor = MaterialTheme.colorScheme.surface, 30 | ), 31 | border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), 32 | modifier = Modifier 33 | .clip(shape = MaterialTheme.shapes.extraLarge) 34 | .wrapContentHeight() 35 | .fillMaxWidth() 36 | .padding(20.dp) 37 | ) { 38 | Column( 39 | modifier = Modifier 40 | .background(color = MaterialTheme.colorScheme.surface) 41 | .padding(20.dp) 42 | ) { 43 | Text( 44 | text = stringResource(R.string.guide), 45 | style = MaterialTheme.typography.headlineLarge 46 | ) 47 | Text( 48 | text = stringResource(id = R.string.app_guide), 49 | style = MaterialTheme.typography.bodyLarge, 50 | modifier = Modifier.padding(0.dp,10.dp, 0.dp, 0.dp) 51 | ) 52 | 53 | Text( 54 | text = stringResource(id = R.string.guide_steps), 55 | modifier = Modifier 56 | .fillMaxWidth() 57 | .padding(top = 10.dp) 58 | .background( 59 | color = MaterialTheme.colorScheme.surfaceVariant, 60 | shape = RoundedCornerShape(10.dp) 61 | ) 62 | .padding(10.dp), 63 | fontFamily = FontFamily.Monospace, 64 | style = MaterialTheme.typography.bodyMedium 65 | ) 66 | 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/components/CardPermission.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.components 2 | 3 | import android.content.Intent 4 | import android.provider.Settings 5 | import androidx.compose.foundation.BorderStroke 6 | import androidx.compose.foundation.clickable 7 | import androidx.compose.foundation.interaction.MutableInteractionSource 8 | import androidx.compose.foundation.layout.Row 9 | import androidx.compose.foundation.layout.fillMaxWidth 10 | import androidx.compose.foundation.layout.padding 11 | import androidx.compose.foundation.layout.wrapContentHeight 12 | import androidx.compose.material.icons.Icons 13 | import androidx.compose.material.icons.outlined.KeyboardArrowRight 14 | import androidx.compose.material3.AlertDialog 15 | import androidx.compose.material3.CardDefaults 16 | import androidx.compose.material3.Icon 17 | import androidx.compose.material3.MaterialTheme 18 | import androidx.compose.material3.OutlinedCard 19 | import androidx.compose.material3.Text 20 | import androidx.compose.material3.TextButton 21 | import androidx.compose.runtime.Composable 22 | import androidx.compose.runtime.mutableStateOf 23 | import androidx.compose.runtime.remember 24 | import androidx.compose.ui.Modifier 25 | import androidx.compose.ui.draw.clip 26 | import androidx.compose.ui.platform.LocalContext 27 | import androidx.compose.ui.platform.LocalUriHandler 28 | import androidx.compose.ui.res.stringResource 29 | import androidx.compose.ui.unit.dp 30 | import com.google.accompanist.permissions.ExperimentalPermissionsApi 31 | import com.iumlab.fxxk1installer.R 32 | 33 | @OptIn(ExperimentalPermissionsApi::class) 34 | @Composable 35 | fun CardPermission() { 36 | val uriHandler = LocalUriHandler.current 37 | val context = LocalContext.current 38 | val request = remember { mutableStateOf(false) } 39 | val popUp = remember { mutableStateOf(false) } 40 | val isGranted = remember { mutableStateOf(false) } 41 | 42 | if (popUp.value) { 43 | AlertDialog( 44 | onDismissRequest = { 45 | popUp.value = false }, 46 | title = { 47 | Text( 48 | text = stringResource(R.string.get_permission), 49 | style = MaterialTheme.typography.titleLarge 50 | ) 51 | }, 52 | text = { 53 | Text( 54 | text = stringResource(R.string.desc_permission), 55 | style = MaterialTheme.typography.bodyMedium 56 | ) 57 | }, 58 | dismissButton = { 59 | TextButton(onClick = { 60 | popUp.value = false 61 | }) { 62 | Text(text = stringResource(R.string.cancel)) 63 | } 64 | }, 65 | confirmButton = { 66 | TextButton(onClick = { 67 | popUp.value = false 68 | request.value = true 69 | }) { 70 | Text(text = stringResource(R.string.ok)) 71 | } 72 | } 73 | ) 74 | } 75 | if (request.value) { 76 | request.value = false 77 | popUp.value = false 78 | val intent = Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES) 79 | context.startActivity(intent) 80 | } 81 | val interactionSource = remember { MutableInteractionSource() } 82 | val cardColor = if (isGranted.value) 83 | MaterialTheme.colorScheme.surface 84 | else MaterialTheme.colorScheme.errorContainer 85 | OutlinedCard ( 86 | colors = CardDefaults.cardColors( 87 | containerColor = MaterialTheme.colorScheme.surface, 88 | ), 89 | border = BorderStroke(1.dp, MaterialTheme.colorScheme.outlineVariant), 90 | modifier = Modifier 91 | .clip(shape = MaterialTheme.shapes.extraLarge) 92 | .wrapContentHeight() 93 | .fillMaxWidth() 94 | .padding(20.dp) 95 | ) { 96 | Row( 97 | modifier = Modifier.clickable { 98 | popUp.value = true 99 | 100 | }.padding(20.dp) 101 | ) { 102 | Text( 103 | text = stringResource(R.string.get_permission), 104 | modifier = Modifier.weight(1f, true) 105 | ) 106 | Icon(Icons.Outlined.KeyboardArrowRight, contentDescription = stringResource(R.string.get_permission)) 107 | } 108 | } 109 | // val installPkg = rememberPermissionState(Manifest.permission.REQUEST_INSTALL_PACKAGES) 110 | // val requestPermissionLauncher = rememberLauncherForActivityResult( 111 | // ActivityResultContracts.RequestPermission() 112 | // ) { isGranted -> 113 | // if (isGranted) { 114 | // // Permission granted 115 | // } else { 116 | // // Handle permission denial 117 | // } 118 | // } 119 | // LaunchedEffect(installPkg) { 120 | // if (!installPkg.status.isGranted && installPkg.status.shouldShowRationale) { 121 | // // Show rationale if needed 122 | // } else { 123 | // requestPermissionLauncher.launch(Manifest.permission.CAMERA) 124 | // } 125 | // } 126 | 127 | 128 | 129 | } -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/components/SystemUI.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.components 2 | 3 | import androidx.compose.foundation.isSystemInDarkTheme 4 | import androidx.compose.foundation.layout.Column 5 | import androidx.compose.foundation.layout.padding 6 | import androidx.compose.foundation.layout.wrapContentHeight 7 | import androidx.compose.foundation.layout.wrapContentWidth 8 | import androidx.compose.material3.AlertDialog 9 | import androidx.compose.material3.ExperimentalMaterial3Api 10 | import androidx.compose.material3.MaterialTheme 11 | import androidx.compose.material3.Surface 12 | import androidx.compose.material3.Text 13 | import androidx.compose.material3.TextButton 14 | import androidx.compose.runtime.Composable 15 | import androidx.compose.runtime.mutableStateOf 16 | import androidx.compose.runtime.remember 17 | import androidx.compose.ui.Modifier 18 | import androidx.compose.ui.res.stringResource 19 | import androidx.compose.ui.unit.dp 20 | import com.google.accompanist.systemuicontroller.rememberSystemUiController 21 | import com.iumlab.fxxk1installer.R 22 | 23 | @Composable 24 | fun SetSystemBar(useDarkTheme: Boolean = isSystemInDarkTheme()){ 25 | val systemUiController = rememberSystemUiController() 26 | if(useDarkTheme){ 27 | systemUiController.setSystemBarsColor( 28 | color = MaterialTheme.colorScheme.background, 29 | darkIcons = false 30 | ) 31 | }else{ 32 | systemUiController.setSystemBarsColor( 33 | color = MaterialTheme.colorScheme.background, 34 | darkIcons = true 35 | ) 36 | } 37 | } -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.example.compose 2 | import androidx.compose.ui.graphics.Color 3 | 4 | val md_theme_light_primary = Color(0xFF5256A9) 5 | val md_theme_light_onPrimary = Color(0xFFFFFFFF) 6 | val md_theme_light_primaryContainer = Color(0xFFE1E0FF) 7 | val md_theme_light_onPrimaryContainer = Color(0xFF090764) 8 | val md_theme_light_secondary = Color(0xFF5D5D72) 9 | val md_theme_light_onSecondary = Color(0xFFFFFFFF) 10 | val md_theme_light_secondaryContainer = Color(0xFFE2E0F9) 11 | val md_theme_light_onSecondaryContainer = Color(0xFF191A2C) 12 | val md_theme_light_tertiary = Color(0xFF1160A4) 13 | val md_theme_light_onTertiary = Color(0xFFFFFFFF) 14 | val md_theme_light_tertiaryContainer = Color(0xFFD3E4FF) 15 | val md_theme_light_onTertiaryContainer = Color(0xFF001C38) 16 | val md_theme_light_error = Color(0xFFBA1A1A) 17 | val md_theme_light_errorContainer = Color(0xFFFFDAD6) 18 | val md_theme_light_onError = Color(0xFFFFFFFF) 19 | val md_theme_light_onErrorContainer = Color(0xFF410002) 20 | val md_theme_light_background = Color(0xFFFFFBFF) 21 | val md_theme_light_onBackground = Color(0xFF1C1B1F) 22 | val md_theme_light_surface = Color(0xFFFFFBFF) 23 | val md_theme_light_onSurface = Color(0xFF1C1B1F) 24 | val md_theme_light_surfaceVariant = Color(0xFFE4E1EC) 25 | val md_theme_light_onSurfaceVariant = Color(0xFF46464F) 26 | val md_theme_light_outline = Color(0xFF777680) 27 | val md_theme_light_inverseOnSurface = Color(0xFFF3EFF4) 28 | val md_theme_light_inverseSurface = Color(0xFF313034) 29 | val md_theme_light_inversePrimary = Color(0xFFC0C1FF) 30 | val md_theme_light_shadow = Color(0xFF000000) 31 | val md_theme_light_surfaceTint = Color(0xFF5256A9) 32 | val md_theme_light_outlineVariant = Color(0xFFC7C5D0) 33 | val md_theme_light_scrim = Color(0xFF000000) 34 | 35 | val md_theme_dark_primary = Color(0xFFC0C1FF) 36 | val md_theme_dark_onPrimary = Color(0xFF222478) 37 | val md_theme_dark_primaryContainer = Color(0xFF3A3D8F) 38 | val md_theme_dark_onPrimaryContainer = Color(0xFFE1E0FF) 39 | val md_theme_dark_secondary = Color(0xFFC5C4DD) 40 | val md_theme_dark_onSecondary = Color(0xFF2E2F42) 41 | val md_theme_dark_secondaryContainer = Color(0xFF454559) 42 | val md_theme_dark_onSecondaryContainer = Color(0xFFE2E0F9) 43 | val md_theme_dark_tertiary = Color(0xFFA1C9FF) 44 | val md_theme_dark_onTertiary = Color(0xFF00325B) 45 | val md_theme_dark_tertiaryContainer = Color(0xFF004880) 46 | val md_theme_dark_onTertiaryContainer = Color(0xFFD3E4FF) 47 | val md_theme_dark_error = Color(0xFFFFB4AB) 48 | val md_theme_dark_errorContainer = Color(0xFF93000A) 49 | val md_theme_dark_onError = Color(0xFF690005) 50 | val md_theme_dark_onErrorContainer = Color(0xFFFFDAD6) 51 | val md_theme_dark_background = Color(0xFF1C1B1F) 52 | val md_theme_dark_onBackground = Color(0xFFE5E1E6) 53 | val md_theme_dark_surface = Color(0xFF1C1B1F) 54 | val md_theme_dark_onSurface = Color(0xFFE5E1E6) 55 | val md_theme_dark_surfaceVariant = Color(0xFF46464F) 56 | val md_theme_dark_onSurfaceVariant = Color(0xFFC7C5D0) 57 | val md_theme_dark_outline = Color(0xFF918F9A) 58 | val md_theme_dark_inverseOnSurface = Color(0xFF1C1B1F) 59 | val md_theme_dark_inverseSurface = Color(0xFFE5E1E6) 60 | val md_theme_dark_inversePrimary = Color(0xFF5256A9) 61 | val md_theme_dark_shadow = Color(0xFF000000) 62 | val md_theme_dark_surfaceTint = Color(0xFFC0C1FF) 63 | val md_theme_dark_outlineVariant = Color(0xFF46464F) 64 | val md_theme_dark_scrim = Color(0xFF000000) 65 | 66 | 67 | val seed = Color(0xFF414374) 68 | val AvailableColor = Color(0xFF94C54A) 69 | val WarnColor = Color(0xFFFFC790) 70 | val light_AvailableColor = Color(0xFF446900) 71 | val light_onAvailableColor = Color(0xFFF0FCE2) 72 | val light_AvailableColorContainer = Color(0xFFBFF372) 73 | val light_onAvailableColorContainer = Color(0xFF121F00) 74 | val dark_AvailableColor = Color(0xFFA4D659) 75 | val dark_onAvailableColor = Color(0xFF213600) 76 | val dark_AvailableColorContainer = Color(0xFF324F00) 77 | val dark_onAvailableColorContainer = Color(0xFFBFF372) 78 | val light_WarnColor = Color(0xFF8A5100) 79 | val light_onWarnColor = Color(0xFFFFEDEB) 80 | val light_WarnColorContainer = Color(0xFFFFDCBD) 81 | val light_onWarnColorContainer = Color(0xFF2C1600) 82 | val dark_WarnColor = Color(0xFFFFB86E) 83 | val dark_onWarnColor = Color(0xFF492900) 84 | val dark_WarnColorContainer = Color(0xFF693C00) 85 | val dark_onWarnColorContainer = Color(0xFFFFDCBD) 86 | -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/theme/Theme.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.theme 2 | 3 | import android.os.Build 4 | import androidx.compose.foundation.isSystemInDarkTheme 5 | import androidx.compose.material3.MaterialTheme 6 | import androidx.compose.material3.lightColorScheme 7 | import androidx.compose.material3.darkColorScheme 8 | import androidx.compose.material3.dynamicDarkColorScheme 9 | import androidx.compose.material3.dynamicLightColorScheme 10 | import androidx.compose.runtime.Composable 11 | import androidx.compose.ui.platform.LocalContext 12 | import com.example.compose.md_theme_dark_background 13 | import com.example.compose.md_theme_dark_error 14 | import com.example.compose.md_theme_dark_errorContainer 15 | import com.example.compose.md_theme_dark_inverseOnSurface 16 | import com.example.compose.md_theme_dark_inversePrimary 17 | import com.example.compose.md_theme_dark_inverseSurface 18 | import com.example.compose.md_theme_dark_onBackground 19 | import com.example.compose.md_theme_dark_onError 20 | import com.example.compose.md_theme_dark_onErrorContainer 21 | import com.example.compose.md_theme_dark_onPrimary 22 | import com.example.compose.md_theme_dark_onPrimaryContainer 23 | import com.example.compose.md_theme_dark_onSecondary 24 | import com.example.compose.md_theme_dark_onSecondaryContainer 25 | import com.example.compose.md_theme_dark_onSurface 26 | import com.example.compose.md_theme_dark_onSurfaceVariant 27 | import com.example.compose.md_theme_dark_onTertiary 28 | import com.example.compose.md_theme_dark_onTertiaryContainer 29 | import com.example.compose.md_theme_dark_outline 30 | import com.example.compose.md_theme_dark_outlineVariant 31 | import com.example.compose.md_theme_dark_primary 32 | import com.example.compose.md_theme_dark_primaryContainer 33 | import com.example.compose.md_theme_dark_scrim 34 | import com.example.compose.md_theme_dark_secondary 35 | import com.example.compose.md_theme_dark_secondaryContainer 36 | import com.example.compose.md_theme_dark_surface 37 | import com.example.compose.md_theme_dark_surfaceTint 38 | import com.example.compose.md_theme_dark_surfaceVariant 39 | import com.example.compose.md_theme_dark_tertiary 40 | import com.example.compose.md_theme_dark_tertiaryContainer 41 | import com.example.compose.md_theme_light_background 42 | import com.example.compose.md_theme_light_error 43 | import com.example.compose.md_theme_light_errorContainer 44 | import com.example.compose.md_theme_light_inverseOnSurface 45 | import com.example.compose.md_theme_light_inversePrimary 46 | import com.example.compose.md_theme_light_inverseSurface 47 | import com.example.compose.md_theme_light_onBackground 48 | import com.example.compose.md_theme_light_onError 49 | import com.example.compose.md_theme_light_onErrorContainer 50 | import com.example.compose.md_theme_light_onPrimary 51 | import com.example.compose.md_theme_light_onPrimaryContainer 52 | import com.example.compose.md_theme_light_onSecondary 53 | import com.example.compose.md_theme_light_onSecondaryContainer 54 | import com.example.compose.md_theme_light_onSurface 55 | import com.example.compose.md_theme_light_onSurfaceVariant 56 | import com.example.compose.md_theme_light_onTertiary 57 | import com.example.compose.md_theme_light_onTertiaryContainer 58 | import com.example.compose.md_theme_light_outline 59 | import com.example.compose.md_theme_light_outlineVariant 60 | import com.example.compose.md_theme_light_primary 61 | import com.example.compose.md_theme_light_primaryContainer 62 | import com.example.compose.md_theme_light_scrim 63 | import com.example.compose.md_theme_light_secondary 64 | import com.example.compose.md_theme_light_secondaryContainer 65 | import com.example.compose.md_theme_light_surface 66 | import com.example.compose.md_theme_light_surfaceTint 67 | import com.example.compose.md_theme_light_surfaceVariant 68 | import com.example.compose.md_theme_light_tertiary 69 | import com.example.compose.md_theme_light_tertiaryContainer 70 | 71 | 72 | private val LightColors = lightColorScheme( 73 | primary = md_theme_light_primary, 74 | onPrimary = md_theme_light_onPrimary, 75 | primaryContainer = md_theme_light_primaryContainer, 76 | onPrimaryContainer = md_theme_light_onPrimaryContainer, 77 | secondary = md_theme_light_secondary, 78 | onSecondary = md_theme_light_onSecondary, 79 | secondaryContainer = md_theme_light_secondaryContainer, 80 | onSecondaryContainer = md_theme_light_onSecondaryContainer, 81 | tertiary = md_theme_light_tertiary, 82 | onTertiary = md_theme_light_onTertiary, 83 | tertiaryContainer = md_theme_light_tertiaryContainer, 84 | onTertiaryContainer = md_theme_light_onTertiaryContainer, 85 | error = md_theme_light_error, 86 | errorContainer = md_theme_light_errorContainer, 87 | onError = md_theme_light_onError, 88 | onErrorContainer = md_theme_light_onErrorContainer, 89 | background = md_theme_light_background, 90 | onBackground = md_theme_light_onBackground, 91 | surface = md_theme_light_surface, 92 | onSurface = md_theme_light_onSurface, 93 | surfaceVariant = md_theme_light_surfaceVariant, 94 | onSurfaceVariant = md_theme_light_onSurfaceVariant, 95 | outline = md_theme_light_outline, 96 | inverseOnSurface = md_theme_light_inverseOnSurface, 97 | inverseSurface = md_theme_light_inverseSurface, 98 | inversePrimary = md_theme_light_inversePrimary, 99 | surfaceTint = md_theme_light_surfaceTint, 100 | outlineVariant = md_theme_light_outlineVariant, 101 | scrim = md_theme_light_scrim, 102 | ) 103 | 104 | 105 | private val DarkColors = darkColorScheme( 106 | primary = md_theme_dark_primary, 107 | onPrimary = md_theme_dark_onPrimary, 108 | primaryContainer = md_theme_dark_primaryContainer, 109 | onPrimaryContainer = md_theme_dark_onPrimaryContainer, 110 | secondary = md_theme_dark_secondary, 111 | onSecondary = md_theme_dark_onSecondary, 112 | secondaryContainer = md_theme_dark_secondaryContainer, 113 | onSecondaryContainer = md_theme_dark_onSecondaryContainer, 114 | tertiary = md_theme_dark_tertiary, 115 | onTertiary = md_theme_dark_onTertiary, 116 | tertiaryContainer = md_theme_dark_tertiaryContainer, 117 | onTertiaryContainer = md_theme_dark_onTertiaryContainer, 118 | error = md_theme_dark_error, 119 | errorContainer = md_theme_dark_errorContainer, 120 | onError = md_theme_dark_onError, 121 | onErrorContainer = md_theme_dark_onErrorContainer, 122 | background = md_theme_dark_background, 123 | onBackground = md_theme_dark_onBackground, 124 | surface = md_theme_dark_surface, 125 | onSurface = md_theme_dark_onSurface, 126 | surfaceVariant = md_theme_dark_surfaceVariant, 127 | onSurfaceVariant = md_theme_dark_onSurfaceVariant, 128 | outline = md_theme_dark_outline, 129 | inverseOnSurface = md_theme_dark_inverseOnSurface, 130 | inverseSurface = md_theme_dark_inverseSurface, 131 | inversePrimary = md_theme_dark_inversePrimary, 132 | surfaceTint = md_theme_dark_surfaceTint, 133 | outlineVariant = md_theme_dark_outlineVariant, 134 | scrim = md_theme_dark_scrim, 135 | ) 136 | 137 | @Composable 138 | fun AppTheme( 139 | useDarkTheme: Boolean = isSystemInDarkTheme(), 140 | isDynamicColor: Boolean = true, 141 | content: @Composable() () -> Unit) { 142 | val dynamicColor = isDynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S 143 | val colors = when { 144 | dynamicColor && useDarkTheme -> { 145 | dynamicDarkColorScheme(LocalContext.current) 146 | } 147 | dynamicColor && !useDarkTheme -> { 148 | dynamicLightColorScheme(LocalContext.current) 149 | } 150 | useDarkTheme -> DarkColors 151 | else -> LightColors 152 | } 153 | 154 | MaterialTheme( 155 | colorScheme = colors, 156 | content = content 157 | ) 158 | } -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/ui/theme/Type.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.ui.theme 2 | 3 | import androidx.compose.material3.Typography 4 | import androidx.compose.ui.text.TextStyle 5 | import androidx.compose.ui.text.font.FontFamily 6 | import androidx.compose.ui.text.font.FontWeight 7 | import androidx.compose.ui.unit.sp 8 | 9 | // Set of Material typography styles to start with 10 | val Typography = Typography( 11 | bodyLarge = TextStyle( 12 | fontFamily = FontFamily.Default, 13 | fontWeight = FontWeight.Normal, 14 | fontSize = 16.sp, 15 | lineHeight = 24.sp, 16 | letterSpacing = 0.5.sp 17 | ) 18 | /* Other default text styles to override 19 | titleLarge = TextStyle( 20 | fontFamily = FontFamily.Default, 21 | fontWeight = FontWeight.Normal, 22 | fontSize = 22.sp, 23 | lineHeight = 28.sp, 24 | letterSpacing = 0.sp 25 | ), 26 | labelSmall = TextStyle( 27 | fontFamily = FontFamily.Default, 28 | fontWeight = FontWeight.Medium, 29 | fontSize = 11.sp, 30 | lineHeight = 16.sp, 31 | letterSpacing = 0.5.sp 32 | ) 33 | */ 34 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/iumlab/fxxk1installer/utils/SystemUtils.kt: -------------------------------------------------------------------------------- 1 | package com.iumlab.fxxk1installer.utils 2 | 3 | import android.content.ComponentName 4 | import android.content.Context 5 | import android.content.pm.PackageManager 6 | import android.widget.Toast 7 | import androidx.activity.ComponentActivity 8 | import com.iumlab.fxxk1installer.MainActivity 9 | import com.iumlab.fxxk1installer.R 10 | 11 | object SystemUtils { 12 | fun setupVisibleInLauncher(context: Context) { 13 | try { 14 | val componentName = ComponentName(context, MainActivity::class.java) 15 | val setting = context.packageManager.getComponentEnabledSetting(componentName) 16 | 17 | val isHidden = setting == PackageManager.COMPONENT_ENABLED_STATE_DISABLED 18 | 19 | when (isHidden) { 20 | true -> { 21 | context.packageManager.setComponentEnabledSetting( 22 | componentName, 23 | PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 24 | PackageManager.DONT_KILL_APP 25 | ) 26 | Toast.makeText(context, 27 | context.getString(R.string.the_app_icon_is_visible_now), Toast.LENGTH_SHORT).show() 28 | } 29 | 30 | false -> { 31 | context.packageManager.setComponentEnabledSetting( 32 | componentName, 33 | PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 34 | PackageManager.DONT_KILL_APP 35 | ) 36 | Toast.makeText(context, 37 | context.getString(R.string.the_icon_is_hidden_now), Toast.LENGTH_SHORT).show() 38 | Toast.makeText(context, 39 | context.getString(R.string.it_may_not_take_effect_on_some_devices), Toast.LENGTH_LONG).show() 40 | } 41 | } 42 | } catch (e: Exception) { 43 | e.printStackTrace() 44 | } 45 | 46 | 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_github_fill.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Apk.1 安装器 3 | 由于在QQ和微信中发送apk文件时,文件名会被万恶的腾讯添加后缀.1,此App可以省去重命名步骤,直接安装apk。 4 | IumLab 5 | 关于 6 | 7 | 指引 8 | 获取权限 9 | 点击OK按钮后,手机将跳转到系统设置页面,请为Apk.1安装器打开开关。 10 | 取消 11 | OK 12 | App图标已显示 13 | App图标已隐藏 14 | 在一些机型上可能不生效 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #414374 4 | #5256A9 5 | #FFFFFF 6 | #E1E0FF 7 | #090764 8 | #5D5D72 9 | #FFFFFF 10 | #E2E0F9 11 | #191A2C 12 | #9C4048 13 | #FFFFFF 14 | #FFDADA 15 | #40000C 16 | #BA1A1A 17 | #FFDAD6 18 | #FFFFFF 19 | #410002 20 | #FFFBFF 21 | #1C1B1F 22 | #FFFBFF 23 | #1C1B1F 24 | #E4E1EC 25 | #46464F 26 | #777680 27 | #F3EFF4 28 | #313034 29 | #C0C1FF 30 | #000000 31 | #5256A9 32 | #C7C5D0 33 | #000000 34 | #C0C1FF 35 | #222478 36 | #3A3D8F 37 | #E1E0FF 38 | #C5C4DD 39 | #2E2F42 40 | #454559 41 | #E2E0F9 42 | #FFB3B5 43 | #60121E 44 | #7E2932 45 | #FFDADA 46 | #FFB4AB 47 | #93000A 48 | #690005 49 | #FFDAD6 50 | #1C1B1F 51 | #E5E1E6 52 | #1C1B1F 53 | #E5E1E6 54 | #46464F 55 | #C7C5D0 56 | #918F9A 57 | #1C1B1F 58 | #E5E1E6 59 | #5256A9 60 | #000000 61 | #C0C1FF 62 | #46464F 63 | #000000 64 | 65 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Apk.1 Installer 3 | Since when sending apk files in QQ and WeChat, the file name will be added by the evil Tencent with a .1 suffix, this App can help you skip the renaming step and directly install such apk files. 4 | IumLab 5 | About 6 | 7 | Guide 8 | Get permission 9 | After clicking the OK button, the mobile phone will be redirected to the system settings. Please turn on the switch for Apk.1 Installer. 10 | Cancel 11 | OK 12 | The app is visible in launcher now. 13 | The app is hidden in launcher now. 14 | It may not take effect on some devices. 15 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_path.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | id("com.android.application") version "8.6.0" apply false 4 | id("org.jetbrains.kotlin.android") version "1.9.0" apply false 5 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app's APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ium-Lab/Apk.1-Installer/b966979c416cff4c1ff4a62ea376fd7ff11eea2b/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Dec 20 11:53:57 CST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /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 execute 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 execute 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 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | 16 | rootProject.name = "Fxxk.1 Installer" 17 | include(":app") 18 | --------------------------------------------------------------------------------