-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'org.jetbrains.kotlin.android' | ||
} | ||
|
||
android { | ||
namespace 'com.tin537.astool' | ||
compileSdk 34 | ||
|
||
defaultConfig { | ||
applicationId "com.tin537.astool" | ||
minSdk 24 | ||
targetSdk 34 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary true | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
buildFeatures { | ||
compose true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion '1.3.2' | ||
} | ||
packagingOptions { | ||
resources { | ||
excludes += '/META-INF/{AL2.0,LGPL2.1}' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
constraints { | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { | ||
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") | ||
} | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { | ||
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") | ||
} | ||
} | ||
implementation 'androidx.core:core-ktx:1.12.0' | ||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2' | ||
implementation 'androidx.activity:activity-compose:1.8.1' | ||
implementation platform('androidx.compose:compose-bom:2022.10.00') | ||
implementation 'androidx.compose.ui:ui' | ||
implementation 'androidx.compose.ui:ui-graphics' | ||
implementation 'androidx.compose.ui:ui-tooling-preview' | ||
implementation 'androidx.compose.material3:material3' | ||
implementation 'com.squareup.okhttp3:okhttp:4.9.1' | ||
implementation 'com.squareup.retrofit2:retrofit:2.5.0' | ||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0' | ||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' | ||
androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00') | ||
androidTestImplementation 'androidx.compose.ui:ui-test-junit4' | ||
debugImplementation 'androidx.compose.ui:ui-tooling' | ||
debugImplementation 'androidx.compose.ui:ui-test-manifest' | ||
compileOnly 'de.robv.android.xposed:api:82' | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# General ProGuard rules for an Android application | ||
-keepattributes *Annotation*, Signature | ||
-dontwarn okio.** | ||
-dontwarn javax.annotation.** | ||
|
||
# Keep application classes that extend Android components | ||
-keep public class * extends android.app.Activity | ||
-keep public class * extends android.app.Application | ||
-keep public class * extends android.app.Service | ||
-keep public class * extends android.content.BroadcastReceiver | ||
-keep public class * extends android.content.ContentProvider | ||
-keep public class * extends android.app.backup.BackupAgentHelper | ||
-keep public class * extends android.preference.Preference | ||
|
||
# Keep classes that use JNI | ||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
# Keep custom views and their setters | ||
-keepclasseswithmembers class * { | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
} | ||
-keepclasseswithmembers class * { | ||
public <init>(android.content.Context, android.util.AttributeSet, int); | ||
} | ||
-keepclassmembers class * extends android.view.View { | ||
void set*(***); | ||
*** get*(); | ||
} | ||
|
||
# Keep methods in Activity that could be used in the XML | ||
-keepclassmembers class * extends android.app.Activity { | ||
public void *(android.view.View); | ||
} | ||
|
||
# Keep enums | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
# Preserve all native method names and the names of their classes | ||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
# Prevent obfuscating Serializable classes and methods | ||
-keepclassmembers class * implements java.io.Serializable { | ||
static final long serialVersionUID; | ||
private static final java.io.ObjectStreamField[] serialPersistentFields; | ||
private void writeObject(java.io.ObjectOutputStream); | ||
private void readObject(java.io.ObjectInputStream); | ||
java.lang.Object writeReplace(); | ||
java.lang.Object readResolve(); | ||
} | ||
|
||
# Keep Xposed and related classes | ||
-keep class de.robv.android.xposed.** { *; } | ||
-keep class * implements de.robv.android.xposed.IXposedHookLoadPackage { *; } | ||
|
||
# Keep classes and methods that are used by reflection | ||
-keepclassmembers class yyyyy.xxxx.zzzzzz.Module { | ||
private void sendToTestDotCom2(java.lang.String); | ||
private java.lang.String bytesToHex(byte[]); | ||
public void handleLoadPackage(de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam); | ||
} | ||
|
||
# Keep OkHttpClient and related classes | ||
-keep class okhttp3.** { *; } | ||
-keep interface okhttp3.** { *; } | ||
|
||
# Keep classes for JSON processing | ||
-keep class org.json.** { *; } | ||
|
||
# Keep WebView methods | ||
-keepclassmembers class android.webkit.WebView { | ||
public void loadUrl(java.lang.String); | ||
public void loadData(java.lang.String, java.lang.String, java.lang.String); | ||
} | ||
|
||
# Keep encryption classes | ||
-keep class javax.crypto.** { *; } | ||
-keep class java.security.** { *; } | ||
-keep class javax.crypto.spec.** { *; } | ||
|
||
# Keep logging | ||
-keep class android.util.Log { *; } | ||
|
||
# Keep Base64 | ||
-keep class android.util.Base64 { *; } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.tin537.astool | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.tin537.astool", appContext.packageName) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" | ||
android:maxSdkVersion="32" /> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" | ||
android:maxSdkVersion="32" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.AndroidSecurityTools" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.AndroidSecurityTools"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<meta-data | ||
android:name="xposedmodule" | ||
android:value="true" /> | ||
<meta-data | ||
android:name="xposeddescription" | ||
android:value="Android security tools" /> | ||
<meta-data | ||
android:name="xposedminversion" | ||
android:value="30" /> | ||
|
||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.tin537.astool.Module |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.tin537.astool | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import com.tin537.astool.ui.theme.AndroidSecurityToolsTheme | ||
|
||
class MainActivity : ComponentActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
AndroidSecurityToolsTheme { | ||
// A surface container using the 'background' color from the theme | ||
Surface( | ||
modifier = Modifier.fillMaxSize(), | ||
color = MaterialTheme.colorScheme.background | ||
) { | ||
Greeting("Android Security Tools Loaded form LSPosed") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
fun Greeting(name: String, modifier: Modifier = Modifier) { | ||
Text( | ||
text = "Hello $name!", | ||
modifier = modifier | ||
) | ||
} | ||
|
||
@Preview(showBackground = true) | ||
@Composable | ||
fun GreetingPreview() { | ||
AndroidSecurityToolsTheme { | ||
Greeting("Android") | ||
} | ||
} |