Merge pull request #193 from AnBui2004/master

Bread
This commit is contained in:
An Bui 2025-01-17 11:12:44 +07:00 committed by GitHub
commit 318695c80a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 455 additions and 143 deletions

2
.idea/compiler.xml generated
View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
<bytecodeTargetLevel target="21" />
</component>
</project>

2
.idea/misc.xml generated
View file

@ -1,4 +1,4 @@
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK" />
</project>

View file

@ -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'
}

View file

@ -48,6 +48,10 @@
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".Minitools"
android:exported="false"
android:label="@string/mini_tools" />
<activity
android:name=".RomInfo"
android:exported="false"
@ -225,6 +229,10 @@
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3568137780412047~1296857222" />
<property
android:name="android.adservices.AD_SERVICES_CONFIG"
android:resource="@xml/gma_ad_services_config"
tools:replace="android:resource" />
</application>
</manifest>

View file

@ -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;
}

View file

@ -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"));
}

View file

@ -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;
}

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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));

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,560L480,560L480,560L480,560L480,560L480,560L480,560Q480,560 480,560Q480,560 480,560L480,560Q480,560 480,560Q480,560 480,560L480,560L480,560L480,560L480,560ZM80,800L80,400Q80,367 103.5,343.5Q127,320 160,320L280,320L280,240Q280,207 303.5,183.5Q327,160 360,160L600,160Q633,160 656.5,183.5Q680,207 680,240L680,320L800,320Q833,320 856.5,343.5Q880,367 880,400L880,800L80,800ZM320,600L320,640L240,640L240,600L160,600L160,720L800,720L800,600L720,600L720,640L640,640L640,600L320,600ZM160,400L160,520L240,520L240,480L320,480L320,520L640,520L640,480L720,480L720,520L800,520L800,400Q800,400 800,400Q800,400 800,400L160,400Q160,400 160,400Q160,400 160,400ZM360,320L600,320L600,240Q600,240 600,240Q600,240 600,240L360,240Q360,240 360,240Q360,240 360,240L360,320Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M280,920Q247,920 223.5,896.5Q200,873 200,840L200,120Q200,87 223.5,63.5Q247,40 280,40L680,40Q713,40 736.5,63.5Q760,87 760,120L760,840Q760,873 736.5,896.5Q713,920 680,920L280,920ZM280,800L280,840Q280,840 280,840Q280,840 280,840L680,840Q680,840 680,840Q680,840 680,840L680,800L280,800ZM280,720L680,720L680,240L280,240L280,720ZM480,640L320,480L376,424L440,486L440,320L520,320L520,486L584,424L640,480L480,640ZM280,160L680,160L680,120Q680,120 680,120Q680,120 680,120L280,120Q280,120 280,120Q280,120 280,120L280,160ZM280,160L280,120Q280,120 280,120Q280,120 280,120L280,120Q280,120 280,120Q280,120 280,120L280,160ZM280,800L280,800L280,840Q280,840 280,840Q280,840 280,840L280,840Q280,840 280,840Q280,840 280,840L280,800Z"/>
</vector>

View file

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Minitools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/storeAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/loadingPb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true"
app:showAnimationBehavior="inward"
android:visibility="gone" />
</com.google.android.material.appbar.AppBarLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:animateLayoutChanges="true" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="16dp"
android:id="@+id/setupsoundfortermux"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/volume_up_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_sound"
android:layout_marginLeft="8dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="16dp"
android:id="@+id/cleanup"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/cleaning_services_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/clean_up"
android:layout_marginLeft="8dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="16dp"
android:id="@+id/restore"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/settings_backup_restore_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/restore"
android:layout_marginLeft="8dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="16dp"
android:id="@+id/deleteallvm"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/delete_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/delete_all_vm"
android:layout_marginLeft="8dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:padding="16dp"
android:id="@+id/reinstallsystem"
android:background="?android:attr/selectableItemBackground" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/system_update_24px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/reinstall_system"
android:layout_marginLeft="8dp"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -49,21 +49,9 @@
android:icon="@drawable/round_settings_24"
android:title="@string/settings"/>
<item
android:id="@+id/setup_sound"
android:icon="@drawable/volume_up_24px"
android:title="@string/setup_sound"/>
<item
android:id="@+id/cleanup"
android:icon="@drawable/cleaning_services_24px"
android:title="@string/clean_up"/>
<item
android:id="@+id/restorevms"
android:icon="@drawable/settings_backup_restore_24px"
android:title="@string/restore"/>
<item
android:id="@+id/deletealldata"
android:icon="@drawable/delete_24px"
android:title="@string/delete_all_vm"/>
android:id="@+id/mini_tools"
android:icon="@drawable/home_repair_service_24px"
android:title="@string/mini_tools"/>
<item
android:id="@+id/navigation_item_donate"
android:icon="@drawable/ic_patreon"

View file

@ -385,6 +385,10 @@
<string name="harmful_command_was_detected">تم اكتشاف أمر قد يتسبب في حدوث ضرر وتنفيذ سلوك غير مرغوب فيه وتم حظره. الرجاء التحقق من هذا الجهاز الظاهري مرة أخرى والمحاولة مرة أخرى.</string>
<string name="copy_file">نسخ الملف</string>
<string name="copy_file_content">قم دائمًا بنسخ الملف المحدد إلى الجهاز الظاهري بدلاً من استخدامه مباشرة.</string>
<string name="reinstall_system">إعادة تثبيت النظام</string>
<string name="reinstall_system_content">إذا وجدت أن النظام يواجه مشاكل خطيرة، فيمكنك إعادة تثبيت النظام. ويتم الاحتفاظ بجميع الآلات الافتراضية.</string>
<string name="reinstalling">إعادة التثبيت...</string>
<string name="mini_tools">أدوات صغيرة</string>
<!--======================TERMUX STRINGS====================-->
<string name="application_name">Vterm</string>

View file

@ -3,7 +3,7 @@
<string name="app_name">Vectras VM</string>
<!--======================VECTRAS STRINGS====================-->
<string name="app_version" translatable="false">v2.9.5 (3dfx - Almond cake)</string>
<string name="app_version" translatable="false">v2.9.5 (3dfx - Bread)</string>
<string name="qemu_version" translatable="false">Stable</string>
<string name="str_home">Home</string>
<string name="str_logger">Logger</string>
@ -387,6 +387,10 @@
<string name="harmful_command_was_detected">A potentially harmful command was detected and it has been blocked. Please check this virtual machine and try again.</string>
<string name="copy_file">Copy file</string>
<string name="copy_file_content">Always copy the selected file to the virtual machine instead of using it directly.</string>
<string name="reinstall_system">Reinstall system</string>
<string name="reinstall_system_content">If you find that your system is having serious problems, you can reinstall the system. And all virtual machines will be kept.</string>
<string name="reinstalling">Reinstalling...</string>
<string name="mini_tools">Mini tools</string>
<!--======================TERMUX STRINGS====================-->
@ -486,7 +490,7 @@
<string name="log_level_value">Logcat log level set to \"%1$s\"</string>
<string name="yes">yes</string>
<string name="no">cancel</string>
<string name="cancel">cancel</string>
<string name="cancel">Cancel</string>
<string name="back_to_the_display">Back to the Display</string>
<string name="x11_ui_environment">x11 ui environment.</string>
<string name="x11">X11</string>

View file

@ -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)
}

View file

@ -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

View file

@ -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": "<h2>v2.9.5-3dfx</h2><ul><li>Bring back 3dfx support.</li><li>Enhance app execution.</li><li>Added some linux programs in x11 display.</li><li>Added alpine linux (x11).</li><li>Russian language by <a href=\"https://github.com/OFGING\" target=\"_blank\">@OFGING</a></li></ul><br><br>New updates are live!",