diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index b589d56..b86273d 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index adb8ae0..f7608ed 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index d2cdc06..7153081 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,6 +1,5 @@
plugins {
id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
}
android {
@@ -13,7 +12,7 @@ android {
minSdk minApi
targetSdk targetApi
versionCode 21
- versionName "v2.9.5-3dfx-almondcake"
+ versionName "v2.9.5-3dfx-bread"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
@@ -71,35 +70,34 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation 'androidx.appcompat:appcompat:1.6.1'
+ implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
- implementation "androidx.annotation:annotation:1.7.1"
- implementation "androidx.core:core:1.13.1"
+ implementation "androidx.annotation:annotation:1.9.1"
+ implementation "androidx.core:core:1.15.0"
implementation "androidx.drawerlayout:drawerlayout:1.2.0"
implementation "androidx.preference:preference:1.2.1"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
- implementation "androidx.viewpager:viewpager:1.0.0"
- implementation platform('com.google.firebase:firebase-bom:33.0.0')
+ implementation "androidx.viewpager:viewpager:1.1.0"
+ implementation platform('com.google.firebase:firebase-bom:33.7.0')
implementation 'com.google.firebase:firebase-analytics'
implementation("com.google.firebase:firebase-auth")
implementation("com.google.firebase:firebase-database")
implementation 'com.google.firebase:firebase-storage'
- implementation("com.google.android.gms:play-services-auth:21.1.1")
+ implementation("com.google.android.gms:play-services-auth:21.3.0")
implementation("com.google.firebase:firebase-crashlytics")
- implementation 'com.google.android.gms:play-services-ads:23.1.0'
+ implementation 'com.google.android.gms:play-services-ads:23.6.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
implementation 'com.google.guava:guava:33.1.0-jre'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
- implementation "androidx.window:window:1.0.0-alpha09"
- implementation "commons-io:commons-io:2.5"
+ implementation "androidx.window:window:1.3.0"
+ implementation "commons-io:commons-io:2.13.0"
implementation 'org.zeroturnaround:zt-zip:1.16'
- implementation 'com.airbnb.android:lottie:6.3.0'
+ implementation 'com.airbnb.android:lottie:6.5.2'
implementation 'org.apache.commons:commons-compress:1.25.0'
- implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.9'
- implementation 'androidx.activity:activity:1.9.2'
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.20"
+ implementation 'com.google.firebase:firebase-crashlytics-buildtools:3.0.2'
+ implementation 'androidx.activity:activity:1.10.0'
+ implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.preference:preference:1.2.1'
compileOnly project(':shell-loader:stub')
implementation project(":terminal-view")
@@ -109,11 +107,11 @@ dependencies {
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
// Glide
- implementation 'com.github.bumptech.glide:glide:4.15.1'
+ implementation 'com.github.bumptech.glide:glide:4.16.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
// Test dependencies
testImplementation 'junit:junit:4.13.2'
- androidTestImplementation 'androidx.test.ext:junit:1.1.5'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
+ androidTestImplementation 'androidx.test.ext:junit:1.2.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 525de09..1b03757 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -48,6 +48,10 @@
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/vectras/vm/AppConfig.java b/app/src/main/java/com/vectras/vm/AppConfig.java
index fa266e4..44459fd 100644
--- a/app/src/main/java/com/vectras/vm/AppConfig.java
+++ b/app/src/main/java/com/vectras/vm/AppConfig.java
@@ -79,4 +79,6 @@ public class AppConfig {
" libusb ncurses-libs curl libnfs sdl2 gtk+3.0 fuse libpulse libseccomp jack pipewire liburing" +
" mesa-dri-gallium mesa-vulkan-swrast vulkan-loader mesa-utils mesa-egl mesa-gbm mesa-vulkan-ati mesa-vulkan-broadcom mesa-vulkan-freedreno mesa-vulkan-panfrost";
+ public static boolean needreinstallsystem = false;
+
}
diff --git a/app/src/main/java/com/vectras/vm/CustomRomActivity.java b/app/src/main/java/com/vectras/vm/CustomRomActivity.java
index 0dd3b78..428463d 100644
--- a/app/src/main/java/com/vectras/vm/CustomRomActivity.java
+++ b/app/src/main/java/com/vectras/vm/CustomRomActivity.java
@@ -1084,6 +1084,15 @@ public class CustomRomActivity extends AppCompatActivity {
} else {
JSONObject jObj = new JSONObject(FileUtils.readFromFile(MainActivity.activity, new File(AppConfig.vmFolder + vmID + "/rom-data.json")));
+ if (jObj.has("vmID")) {
+ if (!jObj.isNull("vmID")) {
+ if (!jObj.getString("vmID").isEmpty()) {
+ VectrasApp.moveAFile(AppConfig.vmFolder + vmID, AppConfig.vmFolder + jObj.getString("vmID"));
+ vmID = jObj.getString("vmID");
+ }
+ }
+ }
+
if (jObj.has("title") && !jObj.isNull("title")) {
title.setText(jObj.getString("title"));
}
diff --git a/app/src/main/java/com/vectras/vm/MainActivity.java b/app/src/main/java/com/vectras/vm/MainActivity.java
index 970cb60..58d9836 100644
--- a/app/src/main/java/com/vectras/vm/MainActivity.java
+++ b/app/src/main/java/com/vectras/vm/MainActivity.java
@@ -550,108 +550,14 @@ public class MainActivity extends AppCompatActivity {
Intent w = new Intent(ACTION_VIEW);
w.setData(Uri.parse(tw));
startActivity(w);
- } else if (id== R.id.setup_sound) {
- if (VectrasApp.isAppInstalled("com.termux", getApplicationContext())) {
- alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle(getResources().getString(R.string.setup_sound));
- alertDialog.setMessage(getResources().getString(R.string.setup_sound_guide_content));
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.start_setup), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
- ClipData clip = ClipData.newPlainText("Setup", "curl -o setup.sh https://raw.githubusercontent.com/AnBui2004/termux/refs/heads/main/installpulseaudio.sh && chmod +rwx setup.sh && ./setup.sh && rm setup.sh");
- clipboard.setPrimaryClip(clip);
- Intent intent = new Intent();
- intent.setAction(ACTION_VIEW);
- intent.setData(Uri.parse("android-app://com.termux"));
- startActivity(intent);
- Toast.makeText(getApplicationContext(), getResources().getString(R.string.copied), Toast.LENGTH_LONG).show();
- return;
- }
- });
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- } else {
- alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle(getResources().getString(R.string.termux_is_not_installed));
- alertDialog.setMessage(getResources().getString(R.string.you_need_to_install_termux));
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.install), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- Intent intent = new Intent();
- intent.setAction(ACTION_VIEW);
- intent.setData(Uri.parse("https://github.com/termux/termux-app/releases"));
- startActivity(intent);
- return;
- }
- });
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- }
- alertDialog.show();
- } else if (id == R.id.deletealldata) {
- alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle(getResources().getString(R.string.delete_all_vm));
- alertDialog.setMessage(getResources().getString(R.string.delete_all_vm_content));
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.delete_all), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- VectrasApp.killallqemuprocesses(getApplicationContext());
- VectrasApp.deleteDirectory(AppConfig.vmFolder);
- VectrasApp.deleteDirectory(AppConfig.recyclebin);
- VectrasApp.deleteDirectory(AppConfig.romsdatajson);
- File vDir = new File(AppConfig.maindirpath);
- vDir.mkdirs();
- errorjsondialog();
- }
- });
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- alertDialog.show();
} else if (id == R.id.navigation_item_get_rom) {
Intent intent = new Intent();
intent.setClass(getApplicationContext(), RomsManagerActivity.class);
startActivity(intent);
- } else if (id == R.id.cleanup) {
- alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle(getResources().getString(R.string.clean_up));
- alertDialog.setMessage(getResources().getString(R.string.clean_up_content));
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.clean_up), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- VMManager.cleanUp();
- errorjsondialog();
- Toast.makeText(getApplicationContext(), activity.getResources().getString(R.string.done), Toast.LENGTH_LONG).show();
- }
- });
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- alertDialog.show();
- } else if (id == R.id.restorevms) {
- alertDialog = new AlertDialog.Builder(activity, R.style.MainDialogTheme).create();
- alertDialog.setTitle(getResources().getString(R.string.restore));
- alertDialog.setMessage(getResources().getString(R.string.restore_content));
- alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.continuetext), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- VMManager.restoreVMs();
- errorjsondialog();
- VectrasApp.oneDialog(getResources().getString(R.string.done), getResources().getString(R.string.restored) + " " + String.valueOf(VMManager.restoredVMs) + ".", true, false, activity);
- }
- });
- alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- alertDialog.dismiss();
- }
- });
- alertDialog.show();
+ } else if (id == R.id.mini_tools) {
+ Intent intent = new Intent();
+ intent.setClass(activity, Minitools.class);
+ startActivity(intent);
}
return false;
}
@@ -1024,7 +930,10 @@ public class MainActivity extends AppCompatActivity {
if (VectrasApp.isThisVMRunning(itemExtra, itemPath)) {
Toast.makeText(activity, "This VM is already running.", Toast.LENGTH_LONG).show();
- activity.startActivity(new Intent(activity, MainVNCActivity.class));
+ if (MainSettingsManager.getVmUi(activity).equals("VNC"))
+ activity.startActivity(new Intent(activity, MainVNCActivity.class));
+ else if (MainSettingsManager.getVmUi(activity).equals("X11"))
+ activity.startActivity(new Intent(activity, X11Activity.class));
return;
}
diff --git a/app/src/main/java/com/vectras/vm/Minitools.java b/app/src/main/java/com/vectras/vm/Minitools.java
new file mode 100644
index 0000000..ed4cbc3
--- /dev/null
+++ b/app/src/main/java/com/vectras/vm/Minitools.java
@@ -0,0 +1,209 @@
+package com.vectras.vm;
+
+import static android.content.Intent.ACTION_OPEN_DOCUMENT;
+import static android.content.Intent.ACTION_VIEW;
+import static android.view.View.GONE;
+
+import android.content.ClipData;
+import android.content.ClipboardManager;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Environment;
+import android.provider.DocumentsContract;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.Toast;
+
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import java.io.File;
+
+public class Minitools extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_minitools);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ getSupportActionBar().setDisplayShowHomeEnabled(true);
+ toolbar.setTitle(getString(R.string.mini_tools));
+
+ LinearLayout setupsoundfortermux = findViewById(R.id.setupsoundfortermux);
+ LinearLayout cleanup = findViewById(R.id.cleanup);
+ LinearLayout restore = findViewById(R.id.restore);
+ LinearLayout deleteallvm = findViewById(R.id.deleteallvm);
+ LinearLayout reinstallsystem = findViewById(R.id.reinstallsystem);
+
+ setupsoundfortermux.setOnClickListener(v -> {
+ if (VectrasApp.isAppInstalled("com.termux", getApplicationContext())) {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.setup_sound));
+ alertDialog.setMessage(getResources().getString(R.string.setup_sound_guide_content));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.start_setup), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
+ ClipData clip = ClipData.newPlainText("Setup", "curl -o setup.sh https://raw.githubusercontent.com/AnBui2004/termux/refs/heads/main/installpulseaudio.sh && chmod +rwx setup.sh && ./setup.sh && rm setup.sh");
+ clipboard.setPrimaryClip(clip);
+ Intent intent = new Intent();
+ intent.setAction(ACTION_VIEW);
+ intent.setData(Uri.parse("android-app://com.termux"));
+ startActivity(intent);
+ Toast.makeText(getApplicationContext(), getResources().getString(R.string.copied), Toast.LENGTH_LONG).show();
+ return;
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ } else {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.termux_is_not_installed));
+ alertDialog.setMessage(getResources().getString(R.string.you_need_to_install_termux));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.install), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ Intent intent = new Intent();
+ intent.setAction(ACTION_VIEW);
+ intent.setData(Uri.parse("https://github.com/termux/termux-app/releases"));
+ startActivity(intent);
+ return;
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ }
+
+ });
+
+ cleanup.setOnClickListener(v -> {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.clean_up));
+ alertDialog.setMessage(getResources().getString(R.string.clean_up_content));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.clean_up), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ VMManager.cleanUp();
+ Toast.makeText(getApplicationContext(), getResources().getString(R.string.done), Toast.LENGTH_LONG).show();
+ restore.setVisibility(GONE);
+ cleanup.setVisibility(GONE);
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ });
+
+ restore.setOnClickListener(v -> {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.restore));
+ alertDialog.setMessage(getResources().getString(R.string.restore_content));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.continuetext), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ VMManager.restoreVMs();
+ VectrasApp.oneDialog(getResources().getString(R.string.done), getResources().getString(R.string.restored) + " " + String.valueOf(VMManager.restoredVMs) + ".", true, false, Minitools.this);
+ restore.setVisibility(GONE);
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ });
+
+ deleteallvm.setOnClickListener(v -> {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.delete_all_vm));
+ alertDialog.setMessage(getResources().getString(R.string.delete_all_vm_content));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.delete_all), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ VectrasApp.killallqemuprocesses(getApplicationContext());
+ VectrasApp.deleteDirectory(AppConfig.vmFolder);
+ VectrasApp.deleteDirectory(AppConfig.recyclebin);
+ VectrasApp.deleteDirectory(AppConfig.romsdatajson);
+ File vDir = new File(AppConfig.maindirpath);
+ vDir.mkdirs();
+ VectrasApp.writeToFile(AppConfig.maindirpath, "roms-data.json", "[]");
+ cleanup.setVisibility(GONE);
+ restore.setVisibility(GONE);
+ deleteallvm.setVisibility(GONE);
+ Toast.makeText(getApplicationContext(), getResources().getString(R.string.done), Toast.LENGTH_LONG).show();
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ });
+
+ reinstallsystem.setOnClickListener(v -> {
+ AlertDialog alertDialog = new AlertDialog.Builder(Minitools.this, R.style.MainDialogTheme).create();
+ alertDialog.setTitle(getResources().getString(R.string.reinstall_system));
+ alertDialog.setMessage(getResources().getString(R.string.reinstall_system_content));
+ alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.continuetext), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ MainActivity.isActivate = false;
+ AppConfig.needreinstallsystem = true;
+ VectrasApp.killallqemuprocesses(Minitools.this);
+ VectrasApp.deleteDirectory(getFilesDir().getAbsolutePath() + "/data");
+ VectrasApp.deleteDirectory(getFilesDir().getAbsolutePath() + "/distro");
+ VectrasApp.deleteDirectory(getFilesDir().getAbsolutePath() + "/usr");
+ Intent intent = new Intent();
+ intent.setClass(Minitools.this, SetupQemuActivity.class);
+ startActivity(intent);
+ finish();
+ }
+ });
+ alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ alertDialog.dismiss();
+ }
+ });
+ alertDialog.show();
+ });
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+
+ switch (item.getItemId()) {
+ case 0:
+ return true;
+ case android.R.id.home:
+ finish();
+ return true;
+ }
+ return super.onOptionsItemSelected(item);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/vectras/vm/SetupQemuActivity.java b/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
index cc01bdb..3895d56 100644
--- a/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
+++ b/app/src/main/java/com/vectras/vm/SetupQemuActivity.java
@@ -145,6 +145,16 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
}
linearcannotconnecttoserver.setVisibility(View.GONE);
}
+ if (AppConfig.needreinstallsystem) {
+ if (AppConfig.getSetupFiles().contains("arm64-v8a") || AppConfig.getSetupFiles().contains("x86_64")) {
+ setupVectras64();
+ } else {
+ setupVectras32();
+ }
+ textviewsettingup.setText(getResources().getString(R.string.reinstalling));
+ }
+ } else {
+ linearload.setVisibility(View.GONE);
}
}
diff --git a/app/src/main/java/com/vectras/vm/VectrasApp.java b/app/src/main/java/com/vectras/vm/VectrasApp.java
index e1e947a..40fc882 100644
--- a/app/src/main/java/com/vectras/vm/VectrasApp.java
+++ b/app/src/main/java/com/vectras/vm/VectrasApp.java
@@ -538,6 +538,12 @@ public class VectrasApp extends Application {
File _dir = new File(_pathToDelete);
if (_dir.isDirectory()) {
String[] children = _dir.list();
+
+ if (children == null) {
+ Log.e("ERROR", "Deletion failed. " + _dir);
+ return;
+ }
+
for (int i = 0; i < children.length; i++) {
File temp = new File(_dir, children[i]);
deleteDirectory(String.valueOf(temp));
diff --git a/app/src/main/res/drawable/home_repair_service_24px.xml b/app/src/main/res/drawable/home_repair_service_24px.xml
new file mode 100644
index 0000000..740d014
--- /dev/null
+++ b/app/src/main/res/drawable/home_repair_service_24px.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/system_update_24px.xml b/app/src/main/res/drawable/system_update_24px.xml
new file mode 100644
index 0000000..e36fd1d
--- /dev/null
+++ b/app/src/main/res/drawable/system_update_24px.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_minitools.xml b/app/src/main/res/layout/activity_minitools.xml
new file mode 100644
index 0000000..e6e3ff6
--- /dev/null
+++ b/app/src/main/res/layout/activity_minitools.xml
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/home_drawer_menu.xml b/app/src/main/res/menu/home_drawer_menu.xml
index 60cbd41..e1c1d48 100644
--- a/app/src/main/res/menu/home_drawer_menu.xml
+++ b/app/src/main/res/menu/home_drawer_menu.xml
@@ -49,21 +49,9 @@
android:icon="@drawable/round_settings_24"
android:title="@string/settings"/>
-
-
-
+ android:id="@+id/mini_tools"
+ android:icon="@drawable/home_repair_service_24px"
+ android:title="@string/mini_tools"/>
- تم اكتشاف أمر قد يتسبب في حدوث ضرر وتنفيذ سلوك غير مرغوب فيه وتم حظره. الرجاء التحقق من هذا الجهاز الظاهري مرة أخرى والمحاولة مرة أخرى.
نسخ الملف
قم دائمًا بنسخ الملف المحدد إلى الجهاز الظاهري بدلاً من استخدامه مباشرة.
+ إعادة تثبيت النظام
+ إذا وجدت أن النظام يواجه مشاكل خطيرة، فيمكنك إعادة تثبيت النظام. ويتم الاحتفاظ بجميع الآلات الافتراضية.
+ إعادة التثبيت...
+ أدوات صغيرة
Vterm
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 39f57ad..279d0a8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,7 +3,7 @@
Vectras VM
- v2.9.5 (3dfx - Almond cake)
+ v2.9.5 (3dfx - Bread)
Stable
Home
Logger
@@ -387,6 +387,10 @@
A potentially harmful command was detected and it has been blocked. Please check this virtual machine and try again.
Copy file
Always copy the selected file to the virtual machine instead of using it directly.
+ Reinstall system
+ If you find that your system is having serious problems, you can reinstall the system. And all virtual machines will be kept.
+ Reinstalling...
+ Mini tools
@@ -486,7 +490,7 @@
Logcat log level set to \"%1$s\"
yes
cancel
- cancel
+ Cancel
Back to the Display
x11 ui environment.
X11
diff --git a/build.gradle b/build.gradle
index f4506f8..8ab5ecb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,11 +6,10 @@ buildscript {
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.1.2' // Android Gradle plugin
+ classpath 'com.android.tools.build:gradle:8.8.0' // Android Gradle plugin
// Add other classpaths like Google Services and Firebase Crashlytics if needed here.
classpath 'com.google.gms:google-services:4.4.0' // assuming you need it for your project
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
- classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
// assuming you need it for project
}
}
@@ -26,8 +25,8 @@ allprojects {
}
ext {
- toolsVersion = properties.get('TOOLS_VERSION', '34.0.0')
- compileApi = properties.get('COMPILE_API', 34)
+ toolsVersion = properties.get('TOOLS_VERSION', '35.0.0')
+ compileApi = properties.get('COMPILE_API', 35)
targetApi = properties.get('TARGET_API', 28)
minApi = properties.get('MIN_API', 23)
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 54bc704..71c4d8a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/web/data/UpdateConfig.json b/web/data/UpdateConfig.json
index 3b753b3..34a60d5 100644
--- a/web/data/UpdateConfig.json
+++ b/web/data/UpdateConfig.json
@@ -1,6 +1,6 @@
{
"versionCode":"21",
- "versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake",
+ "versionName":"v2.9.5-3dfx,v2.9.5-3dfx-almondcake,v2.9.5-3dfx-bread",
"size": "46 MB",
"url": "https://github.com/xoureldeen/Vectras-VM-Android/releases/v2.9.5",
"Message": "
v2.9.5-3dfx
- Bring back 3dfx support.
- Enhance app execution.
- Added some linux programs in x11 display.
- Added alpine linux (x11).
- Russian language by @OFGING
New updates are live!",