mirror of
https://github.com/vectras-team/termux-x11.git
synced 2024-11-23 14:49:58 +00:00
Modifying both loader and main application to print base commit to logcat
This commit is contained in:
parent
94bf3d12b2
commit
5e0f484f9d
2
.github/workflows/debug_build.yml
vendored
2
.github/workflows/debug_build.yml
vendored
@ -110,7 +110,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: nightly
|
||||
name: 'Desktop/Android APP Nightly Release $$'
|
||||
name: 'Nightly Release $$'
|
||||
draft: false
|
||||
prerelease: true
|
||||
body: |
|
||||
|
@ -9,6 +9,7 @@ android {
|
||||
targetSdkVersion 33
|
||||
versionCode 14
|
||||
versionName "1.03.00"
|
||||
buildConfigField "String", "COMMIT", "\"" + "git rev-parse HEAD\n".execute().getText().trim() + "\""
|
||||
}
|
||||
|
||||
signingConfigs.debug {
|
||||
@ -31,6 +32,7 @@ android {
|
||||
externalNativeBuild.cmake.path "src/main/cpp/CMakeLists.txt"
|
||||
packagingOptions.jniLibs.useLegacyPackaging false
|
||||
buildFeatures.aidl true
|
||||
buildFeatures.buildConfig true
|
||||
buildTypes.debug {
|
||||
signingConfig signingConfigs.debug
|
||||
postprocessing {
|
||||
|
@ -44,6 +44,7 @@ public class CmdEntryPoint extends ICmdEntryInterface.Stub {
|
||||
* @param args The command-line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
android.util.Log.i("CmdEntryPoint", "commit " + BuildConfig.COMMIT);
|
||||
handler.post(() -> new CmdEntryPoint(args));
|
||||
Looper.loop();
|
||||
}
|
||||
|
@ -24,3 +24,4 @@ android.defaultConfig.buildConfigField "String", "packageNotInstalledErrorText",
|
||||
\"After this you should download \\"termux-x11-ARCH-debug\\" or \\"termux-x11-universal-debug\\" artifact and install apk contained in this zip file.\""""
|
||||
android.defaultConfig.buildConfigField "String", "packageSignatureMismatchErrorText",
|
||||
"\"Signature verification of target application " + android.namespace + " failed.\\nPlease, reinstall both termux-x11 package and Termux:X11 application from the same source\""
|
||||
android.defaultConfig.buildConfigField "String", "COMMIT", "\"" + "git rev-parse HEAD\n".execute().getText().trim() + "\""
|
||||
|
@ -20,7 +20,7 @@ public class Loader {
|
||||
assert targetInfo != null : BuildConfig.packageNotInstalledErrorText.replace("ARCH", android.os.Build.SUPPORTED_ABIS[0]);
|
||||
assert targetInfo.signatures.length == 1 && BuildConfig.SIGNATURE == targetInfo.signatures[0].hashCode() : BuildConfig.packageSignatureMismatchErrorText;
|
||||
|
||||
android.util.Log.i(BuildConfig.logTag, "loading " + targetInfo.applicationInfo.sourceDir + "::" + BuildConfig.CLASS_ID + "::main of " + BuildConfig.APPLICATION_ID + " application");
|
||||
android.util.Log.i(BuildConfig.logTag, "loading " + targetInfo.applicationInfo.sourceDir + "::" + BuildConfig.CLASS_ID + "::main of " + BuildConfig.APPLICATION_ID + " application (commit " + BuildConfig.COMMIT + ")");
|
||||
Class<?> targetClass = Class.forName(BuildConfig.CLASS_ID, true,
|
||||
new dalvik.system.PathClassLoader(targetInfo.applicationInfo.sourceDir, null, ClassLoader.getSystemClassLoader()));
|
||||
targetClass.getMethod("main", String[].class).invoke(null, (Object) args);
|
||||
|
Loading…
Reference in New Issue
Block a user