mirror of
https://github.com/QM4RS/FridaBox.git
synced 2026-09-30 21:12:09 +02:00
refactor: Refine crash log reporting details, update application ID, and add WorkManager dependency.
This commit is contained in:
@@ -2186,15 +2186,14 @@ public class BlackBoxCore extends ClientConfiguration {
|
||||
// Create temp file
|
||||
File cacheDir = getContext().getCacheDir();
|
||||
File tempLog = File.createTempFile("crash_log_", ".txt", cacheDir);
|
||||
|
||||
// Construct full caption
|
||||
String baseCaption = caption != null ? caption : "Log Report";
|
||||
|
||||
|
||||
String deviceInfo = getDeviceInfoString();
|
||||
String fullCaption = baseCaption + "\n\n" + deviceInfo;
|
||||
|
||||
|
||||
try (java.io.FileOutputStream fos = new java.io.FileOutputStream(tempLog)) {
|
||||
// Write Header
|
||||
String header = "Caption: " + baseCaption + "\n\n" + deviceInfo + "\n\n--- LOGCAT ---\n";
|
||||
String header = "Caption: " + "\n\n" + deviceInfo + "\n\n--- LOGCAT ---\n";
|
||||
fos.write(header.getBytes("UTF-8"));
|
||||
|
||||
// Dump Logcat
|
||||
@@ -2210,7 +2209,7 @@ public class BlackBoxCore extends ClientConfiguration {
|
||||
}
|
||||
|
||||
// Send
|
||||
String error = LogSender.send(chatId, tempLog, fullCaption);
|
||||
String error = LogSender.send(chatId, tempLog, deviceInfo);
|
||||
if (error != null) {
|
||||
Slog.e(TAG, "Log upload failed: " + error);
|
||||
// Show Toast on Main Thread
|
||||
@@ -2291,9 +2290,9 @@ public class BlackBoxCore extends ClientConfiguration {
|
||||
sb.append("64-bit ABIs: ").append(String.join(", ", Build.SUPPORTED_64_BIT_ABIS)).append("\n");
|
||||
}
|
||||
|
||||
// Build Fingerprint
|
||||
sb.append("Fingerprint: ").append(Build.FINGERPRINT).append("\n");
|
||||
|
||||
// // Build Fingerprint
|
||||
// sb.append("Fingerprint: ").append(Build.FINGERPRINT).append("\n");
|
||||
//
|
||||
// Memory Info
|
||||
try {
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
|
||||
+5
-1
@@ -9,7 +9,7 @@ android {
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
ndkVersion = "29.0.13846066"
|
||||
defaultConfig {
|
||||
applicationId "top.niunaijun.blackboxa"
|
||||
applicationId "top.niunaijun.blackbox"
|
||||
minSdk rootProject.ext.minSdk
|
||||
targetSdk rootProject.ext.targetSdkVersion
|
||||
versionCode rootProject.ext.versionCode
|
||||
@@ -91,4 +91,8 @@ dependencies {
|
||||
|
||||
|
||||
|
||||
|
||||
// WorkManager
|
||||
implementation 'androidx.work:work-runtime:2.7.1'
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ ext {
|
||||
// targetSdkVersion = 35
|
||||
minSdk = 21
|
||||
versionCode = 311
|
||||
versionName = "3.1.2-beta"
|
||||
versionName = "3.1.3-beta"
|
||||
xVersion = '1.1.0'
|
||||
hiddenApiBypass = '4.3'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user