diff --git a/app/build.gradle b/app/build.gradle index 2dab335f..3dae9500 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,6 +65,7 @@ android { buildFeatures { viewBinding true aidl true + buildConfig true } packagingOptions.jniLibs.useLegacyPackaging true diff --git a/app/src/main/java/xtr/keymapper/activity/MainActivity.java b/app/src/main/java/xtr/keymapper/activity/MainActivity.java index 913c5788..74b9b157 100644 --- a/app/src/main/java/xtr/keymapper/activity/MainActivity.java +++ b/app/src/main/java/xtr/keymapper/activity/MainActivity.java @@ -19,6 +19,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.topjohnwu.superuser.Shell; +import xtr.keymapper.BuildConfig; import xtr.keymapper.R; import xtr.keymapper.Server; import xtr.keymapper.TouchPointer; @@ -38,7 +39,7 @@ public class MainActivity extends AppCompatActivity { static { // Set settings before the main shell can be created - Shell.enableVerboseLogging = false; + Shell.enableVerboseLogging = BuildConfig.DEBUG; Shell.setDefaultBuilder(Shell.Builder.create() .setFlags(Shell.FLAG_REDIRECT_STDERR) .setTimeout(10) diff --git a/app/src/main/java/xtr/keymapper/server/RemoteServiceHelper.java b/app/src/main/java/xtr/keymapper/server/RemoteServiceHelper.java index 0c06a5b2..9e766b44 100644 --- a/app/src/main/java/xtr/keymapper/server/RemoteServiceHelper.java +++ b/app/src/main/java/xtr/keymapper/server/RemoteServiceHelper.java @@ -16,6 +16,7 @@ import java.io.IOException; import rikka.shizuku.Shizuku; +import xtr.keymapper.BuildConfig; import xtr.keymapper.IRemoteService; public class RemoteServiceHelper { @@ -97,8 +98,8 @@ private static void bindShizukuService(Context context, RemoteServiceConnection new Shizuku.UserServiceArgs(new ComponentName(context, RemoteService.class.getName())) .daemon(false) .processNameSuffix("service") - .debuggable(false) - .version(12); + .debuggable(BuildConfig.DEBUG) + .version(BuildConfig.VERSION_CODE); Shizuku.bindUserService(userServiceArgs, connection); } diff --git a/keystore.properties b/keystore.properties new file mode 100644 index 00000000..275003d4 --- /dev/null +++ b/keystore.properties @@ -0,0 +1,4 @@ +storePassword=myStorePassword +keyPassword=mykeyPassword +keyAlias=myKeyAlias +storeFile=myStoreFileLocation