diff --git a/app/build.gradle b/app/build.gradle index bd25456..230accb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -16,13 +16,17 @@ android { buildTypes { release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' - signingConfig signingConfigs.debug + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } + } + + signingConfigs { debug { - applicationIdSuffix '.debug' - minifyEnabled false + keyAlias 'androiddebugkey' + keyPassword 'android' + storeFile file('plugin.keystore') + storePassword 'android' } } @@ -31,29 +35,34 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - applicationVariants.all { variant -> - variant.outputs.each { output -> - def assembledTask = tasks.getByName("assemble${variant.name.capitalize()}") - - assembledTask.doLast { - def buildDir = output.outputFile.parent - def unsignedApk = output.outputFile - def signedApk = new File(buildDir, "KeyAssist.apk") - exec { - commandLine 'java', '-Djava.library.path=.', '-jar', 'signapk.jar', 'platform.x509.pem', 'platform.pk8', unsignedApk, signedApk - } - copy { - from signedApk - into buildDir - rename { "app-debug.apk" } - } + android.applicationVariants.all { variant -> + variant.outputs.all { + if (outputFile != null && outputFileName.endsWith('.apk')) { + outputFileName = "KeyAssist.apk" } } } } +//gradle.projectsEvaluated { +// tasks.withType(JavaCompile) { +// Set fileSet = options.bootstrapClasspath.getFiles() +// List newFileList = new ArrayList<>(); +// newFileList.add(new File("libs/framework.jar")) +// newFileList.addAll(fileSet) +// options.bootstrapClasspath = files( +// newFileList.toArray() +// ) +// } +//} + dependencies { + compileOnly files('libs/framework.jar') + implementation 'org.litepal.guolindev:core:3.2.3' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'com.google.code.gson:gson:2.8.9' + + } \ No newline at end of file diff --git a/app/libconscrypt_openjdk_jni.so b/app/libconscrypt_openjdk_jni.so deleted file mode 100755 index d4289b5..0000000 Binary files a/app/libconscrypt_openjdk_jni.so and /dev/null differ diff --git a/app/libs/framework.jar b/app/libs/framework.jar new file mode 100644 index 0000000..6005693 Binary files /dev/null and b/app/libs/framework.jar differ diff --git a/app/platform.pk8 b/app/platform.pk8 deleted file mode 100755 index e27a393..0000000 Binary files a/app/platform.pk8 and /dev/null differ diff --git a/app/platform.x509.pem b/app/platform.x509.pem deleted file mode 100755 index 087f02e..0000000 --- a/app/platform.x509.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIJALOZgIbQVs/6MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g -VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE -AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe -Fw0wODA0MTUyMjQwNTBaFw0zNTA5MDEyMjQwNTBaMIGUMQswCQYDVQQGEwJVUzET -MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G -A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p -ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI -hvcNAQEBBQADggENADCCAQgCggEBAJx4BZKsDV04HN6qZezIpgBuNkgMbXIHsSAR -vlCGOqvitV0Amt9xRtbyICKAx81Ne9smJDuKgGwms0sTdSOkkmgiSQTcAUk+fArP -GgXIdPabA3tgMJ2QdNJCgOFrrSqHNDYZUer3KkgtCbIEsYdeEqyYwap3PWgAuer9 -5W1Yvtjo2hb5o2AJnDeoNKbf7be2tEoEngeiafzPLFSW8s821k35CjuNjzSjuqtM -9TNxqydxmzulh1StDFP8FOHbRdUeI0+76TybpO35zlQmE1DsU1YHv2mi/0qgfbX3 -6iANCabBtJ4hQC+J7RGQiTqrWpGA8VLoL4WkV1PPX8GQccXuyCcCAQOjgfwwgfkw -HQYDVR0OBBYEFE/koLPdnLop9x1yh8Tnw48ghsKZMIHJBgNVHSMEgcEwgb6AFE/k -oLPdnLop9x1yh8Tnw48ghsKZoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE -CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH -QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG -CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJALOZgIbQVs/6MAwGA1Ud -EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBAFclUbjZOh9z3g9tRp+G2tZwFAAp -PIigzXzXeLc9r8wZf6t25iEuVsHHYc/EL9cz3lLFCuCIFM78CjtaGkNGBU2Cnx2C -tCsgSL+ItdFJKe+F9g7dEtctVWV+IuPoXQTIMdYT0Zk4u4mCJH+jISVroS0dao+S -6h2xw3Mxe6DAN/DRr/ZFrvIkl5+6bnoUvAJccbmBOM7z3fwFlhfPJIRc97QNY4L3 -J17XOElatuWTG5QhdlxJG3L7aOCA29tYwgKdNHyLMozkPvaosVUz7fvpib1qSN1L -IC7alMarjdW4OZID2q4u1EYjLk/pvZYTlMYwDlE448/Shebk5INTjLixs1c= ------END CERTIFICATE----- diff --git a/app/plugin.keystore b/app/plugin.keystore new file mode 100644 index 0000000..1dcc1d9 Binary files /dev/null and b/app/plugin.keystore differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json new file mode 100644 index 0000000..4b5838b --- /dev/null +++ b/app/release/output-metadata.json @@ -0,0 +1,20 @@ +{ + "version": 3, + "artifactType": { + "type": "APK", + "kind": "Directory" + }, + "applicationId": "com.fde.keyassist", + "variantName": "release", + "elements": [ + { + "type": "SINGLE", + "filters": [], + "attributes": [], + "versionCode": 1, + "versionName": "1.0.1", + "outputFile": "KeyAssist.apk" + } + ], + "elementType": "File" +} \ No newline at end of file diff --git a/app/signapk.jar b/app/signapk.jar deleted file mode 100755 index 4dd95e0..0000000 Binary files a/app/signapk.jar and /dev/null differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4b6a218..cba94cc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@ xmlns:tools="http://schemas.android.com/tools" package="com.fde.keyassist" android:sharedUserId="android.uid.system" - android:sharedUserMaxSdkVersion="32" tools:targetApi="tiramisu"> + + + + + + + + + + + + --> - + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/key_mapping_spinner.xml b/app/src/main/res/drawable/key_mapping_spinner.xml index 3161c88..71be80e 100644 --- a/app/src/main/res/drawable/key_mapping_spinner.xml +++ b/app/src/main/res/drawable/key_mapping_spinner.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/drawable/rect_background.xml b/app/src/main/res/drawable/rect_background.xml new file mode 100644 index 0000000..c20b25b --- /dev/null +++ b/app/src/main/res/drawable/rect_background.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/scale.png b/app/src/main/res/drawable/scale.png new file mode 100644 index 0000000..723998d Binary files /dev/null and b/app/src/main/res/drawable/scale.png differ diff --git a/app/src/main/res/drawable/scale_bg.png b/app/src/main/res/drawable/scale_bg.png new file mode 100644 index 0000000..93552f8 Binary files /dev/null and b/app/src/main/res/drawable/scale_bg.png differ diff --git a/app/src/main/res/drawable/scale_bg_1.png b/app/src/main/res/drawable/scale_bg_1.png new file mode 100644 index 0000000..d4bb6ec Binary files /dev/null and b/app/src/main/res/drawable/scale_bg_1.png differ diff --git a/app/src/main/res/layout/dialog_modify.xml b/app/src/main/res/layout/dialog_modify.xml index 7a64d70..223cdab 100644 --- a/app/src/main/res/layout/dialog_modify.xml +++ b/app/src/main/res/layout/dialog_modify.xml @@ -3,6 +3,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + \ No newline at end of file diff --git a/app/src/main/res/layout/dropdown_menu.xml b/app/src/main/res/layout/dropdown_menu.xml index 7328d84..4fe7fa6 100644 --- a/app/src/main/res/layout/dropdown_menu.xml +++ b/app/src/main/res/layout/dropdown_menu.xml @@ -3,18 +3,46 @@ android:orientation="vertical" android:gravity="center_horizontal" android:background="#123456" - android:layout_width="150dp" + android:layout_width="match_parent" android:layout_height="200dp"> - + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/key_mapping.xml b/app/src/main/res/layout/key_mapping.xml index 3d76fa9..eeace3c 100644 --- a/app/src/main/res/layout/key_mapping.xml +++ b/app/src/main/res/layout/key_mapping.xml @@ -1,47 +1,61 @@ - - + android:text="@string/apply" + android:textSize="12sp" + android:layout_width="0dp" + android:layout_height="30dp"/> + + android:layout_width="0dp" + android:layout_height="30dp"> + android:layout_height="35dp"> + android:layout_height="35dp"/> @@ -49,38 +63,43 @@