Skip to content

Commit

Permalink
2.0 release
Browse files Browse the repository at this point in the history
Fixed most issues from the last commit, implemented default script examples, removed unneeded settings and disabled code formatting for now as it's unsafe
  • Loading branch information
ac3ss0r committed May 31, 2023
1 parent 4d90256 commit f55f584
Show file tree
Hide file tree
Showing 153 changed files with 1,169 additions and 591 deletions.
8 changes: 6 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 29

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
applicationId "acessor.droidfrida"
minSdkVersion 14
targetSdkVersion 29
versionCode 1
versionName "1.0"
versionCode 2
versionName "2.0"
}
buildTypes {
release {
Expand Down
30 changes: 30 additions & 0 deletions app/build/bin/aapt_rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# view res/layout/main.xml #generated:106
-keep class acessor.droidfrida.CodeView { <init>(...); }

# view res/layout/main.xml #generated:149
-keep class acessor.droidfrida.FixedSpinner { <init>(...); }

# view AndroidManifest.xml #generated:19
-keep class acessor.droidfrida.MainActivity { <init>(...); }

# onClick res/layout/main.xml #generated:40
-keepclassmembers class * { *** launchClicked(...); }

# onClick res/layout/main.xml #generated:124
-keepclassmembers class * { *** onJsOptionClicked(...); }

# onClick res/layout/main.xml #generated:131
-keepclassmembers class * { *** onOpenScriptClicked(...); }

# onClick res/layout/main.xml #generated:139
-keepclassmembers class * { *** onSaveScriptClicked(...); }

# onClick res/layout/main.xml #generated:223
-keepclassmembers class * { *** onWrapSettingClicked(...); }

# onClick res/layout/main.xml #generated:57
# onClick res/layout/main.xml #generated:66
# onClick res/layout/main.xml #generated:75
# onClick res/layout/main.xml #generated:84
-keepclassmembers class * { *** tabClicked(...); }

Binary file added app/build/bin/classes.dex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/build/bin/classesdebug/adrt/ADRTMetadata.class
Binary file not shown.
Binary file added app/build/bin/classesdebug/javalangEnum.class
Binary file not shown.
Binary file added app/build/bin/classesdebug/javalangIterable.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/build/bin/classesrelease/javalangEnum.class
Binary file not shown.
Binary file added app/build/bin/classesrelease/javalangEnum.dex
Binary file not shown.
Binary file added app/build/bin/classesrelease/javalangIterable.class
Binary file not shown.
Binary file added app/build/bin/classesrelease/javalangIterable.dex
Binary file not shown.
38 changes: 38 additions & 0 deletions app/build/bin/injected/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="acessor.droidfrida"
android:versionCode="2"
android:versionName="2.0">

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="29"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo"
android:resizeableActivity="true">

<activity
android:name=".MainActivity"
android:label="@string/app_name">

<intent-filter>

<action
android:name="android.intent.action.MAIN"/>

<category
android:name="android.intent.category.LAUNCHER"/>

</intent-filter>

</activity>

</application>

</manifest>

Binary file added app/build/bin/jardex/RootTools.jar.dex
Binary file not shown.
Binary file added app/build/bin/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/build/bin/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/build/bin/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/build/bin/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/build/bin/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/build/bin/resources.ap_
Binary file not shown.
6 changes: 6 additions & 0 deletions app/build/gen/acessor/droidfrida/BuildConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package acessor.droidfrida;

public final class BuildConfig {
public final static boolean DEBUG = true;
}
52 changes: 52 additions & 0 deletions app/build/gen/acessor/droidfrida/R.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package acessor.droidfrida;

public final class R {
public static final class array {
public static final int js_options=0x7f060000;
public static final int offline_scripts=0x7f060001;
}
public static final class attr {
}
public static final class drawable {
public static final int border_a=0x7f020000;
public static final int border_b=0x7f020001;
public static final int button=0x7f020002;
public static final int open_icon=0x7f020003;
public static final int save_icon=0x7f020004;
}
public static final class id {
public static final int codeTab=0x7f080001;
public static final int editorTabPanel=0x7f080005;
public static final int jsOptionMenu=0x7f080007;
public static final int ouputTabPanel=0x7f080008;
public static final int outputLog=0x7f080009;
public static final int outputTab=0x7f080002;
public static final int pkgName=0x7f080000;
public static final int scriptInput=0x7f080006;
public static final int scriptsList=0x7f08000b;
public static final int scriptsTab=0x7f080003;
public static final int scriptsTabPanel=0x7f08000a;
public static final int settingsTab=0x7f080004;
public static final int settingsTabPanel=0x7f08000c;
}
public static final class layout {
public static final int item=0x7f040000;
public static final int main=0x7f040001;
}
public static final class mipmap {
public static final int ic_launcher=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f050000;
}
public static final class style {
public static final int AppTheme=0x7f070000;
}
}
221 changes: 221 additions & 0 deletions app/src/main/assets/AntiRootDetection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
const commonPaths = [
"/data/local/bin/su",
"/data/local/su",
"/data/local/xbin/su",
"/dev/com.koushikdutta.superuser.daemon/",
"/sbin/su",
"/system/app/Superuser.apk",
"/system/bin/failsafe/su",
"/system/bin/su",
"/su/bin/su",
"/system/etc/init.d/99SuperSUDaemon",
"/system/sd/xbin/su",
"/system/xbin/busybox",
"/system/xbin/daemonsu",
"/system/xbin/su",
"/system/sbin/su",
"/vendor/bin/su",
"/cache/su",
"/data/su",
"/dev/su",
"/system/bin/.ext/su",
"/system/usr/we-need-root/su",
"/system/app/Kinguser.apk",
"/data/adb/magisk",
"/sbin/.magisk",
"/cache/.disable_magisk",
"/dev/.magisk.unblock",
"/cache/magisk.log",
"/data/adb/magisk.img",
"/data/adb/magisk.db",
"/data/adb/magisk_simple",
"/init.magisk.rc",
"/system/xbin/ku.sud"
];

const ROOTmanagementApp = [
"com.noshufou.android.su",
"com.noshufou.android.su.elite",
"eu.chainfire.supersu",
"com.koushikdutta.superuser",
"com.thirdparty.superuser",
"com.yellowes.su",
"com.koushikdutta.rommanager",
"com.koushikdutta.rommanager.license",
"com.dimonvideo.luckypatcher",
"com.chelpus.lackypatch",
"com.ramdroid.appquarantine",
"com.ramdroid.appquarantinepro",
"com.topjohnwu.magisk"
];



function stackTraceHere(isLog){
var Exception = Java.use('java.lang.Exception');
var Log = Java.use('android.util.Log');
var stackinfo = Log.getStackTraceString(Exception.$new())
if(isLog){
console.log(stackinfo)
}else{
return stackinfo
}
}

function stackTraceNativeHere(isLog){
var backtrace = Thread.backtrace(this.context, Backtracer.ACCURATE)
.map(DebugSymbol.fromAddress)
.join("\n\t");
console.log(backtrace)
}


function bypassJavaFileCheck(){
var UnixFileSystem = Java.use("java.io.UnixFileSystem")
UnixFileSystem.checkAccess.implementation = function(file,access){

var stack = stackTraceHere(false)

const filename = file.getAbsolutePath();

if (filename.indexOf("magisk") >= 0) {
console.log("Anti Root Detect - check file: " + filename)
return false;
}

if (commonPaths.indexOf(filename) >= 0) {
console.log("Anti Root Detect - check file: " + filename)
return false;
}

return this.checkAccess(file,access)
}
}

function bypassNativeFileCheck(){
var fopen = Module.findExportByName("libc.so","fopen")
Interceptor.attach(fopen,{
onEnter:function(args){
this.inputPath = args[0].readUtf8String()
},
onLeave:function(retval){
if(retval.toInt32() != 0){
if (commonPaths.indexOf(this.inputPath) >= 0) {
console.log("Anti Root Detect - fopen : " + this.inputPath)
retval.replace(ptr(0x0))
}
}
}
})

var access = Module.findExportByName("libc.so","access")
Interceptor.attach(access,{
onEnter:function(args){
this.inputPath = args[0].readUtf8String()
},
onLeave:function(retval){
if(retval.toInt32()==0){
if(commonPaths.indexOf(this.inputPath) >= 0){
console.log("Anti Root Detect - access : " + this.inputPath)
retval.replace(ptr(-1))
}
}
}
})
}

function setProp(){
var Build = Java.use("android.os.Build")
var TAGS = Build.class.getDeclaredField("TAGS")
TAGS.setAccessible(true)
TAGS.set(null,"release-keys")

var FINGERPRINT = Build.class.getDeclaredField("FINGERPRINT")
FINGERPRINT.setAccessible(true)
FINGERPRINT.set(null,"google/crosshatch/crosshatch:10/QQ3A.200805.001/6578210:user/release-keys")

// Build.deriveFingerprint.inplementation = function(){
// var ret = this.deriveFingerprint() //该函数无法通过反射调用
// console.log(ret)
// return ret
// }

var system_property_get = Module.findExportByName("libc.so", "__system_property_get")
Interceptor.attach(system_property_get,{
onEnter(args){
this.key = args[0].readCString()
this.ret = args[1]
},
onLeave(ret){
if(this.key == "ro.build.fingerprint"){
var tmp = "google/crosshatch/crosshatch:10/QQ3A.200805.001/6578210:user/release-keys"
var p = Memory.allocUtf8String(tmp)
Memory.copy(this.ret,p,tmp.length+1)
}
}
})

}

//android.app.PackageManager
function bypassRootAppCheck(){
var ApplicationPackageManager = Java.use("android.app.ApplicationPackageManager")
ApplicationPackageManager.getPackageInfo.overload('java.lang.String', 'int').implementation = function(str,i){
// console.log(str)
if (ROOTmanagementApp.indexOf(str) >= 0) {
console.log("Anti Root Detect - check package : " + str)
str = "ashen.one.ye.not.found"
}
return this.getPackageInfo(str,i)
}

//shell pm check
}

function bypassShellCheck(){
var String = Java.use('java.lang.String')

var ProcessImpl = Java.use("java.lang.ProcessImpl")
ProcessImpl.start.implementation = function(cmdarray,env,dir,redirects,redirectErrorStream){

if(cmdarray[0] == "mount"){
console.log("Anti Root Detect - Shell : " + cmdarray.toString())
arguments[0] = Java.array('java.lang.String',[String.$new("")])
return ProcessImpl.start.apply(this,arguments)
}

if(cmdarray[0] == "getprop"){
console.log("Anti Root Detect - Shell : " + cmdarray.toString())
const prop = [
"ro.secure",
"ro.debuggable"
];
if(prop.indexOf(cmdarray[1]) >= 0){
arguments[0] = Java.array('java.lang.String',[String.$new("")])
return ProcessImpl.start.apply(this,arguments)
}
}

if(cmdarray[0].indexOf("which") >= 0){
const prop = [
"su"
];
if(prop.indexOf(cmdarray[1]) >= 0){
console.log("Anti Root Detect - Shell : " + cmdarray.toString())
arguments[0] = Java.array('java.lang.String',[String.$new("")])
return ProcessImpl.start.apply(this,arguments)
}
}

return ProcessImpl.start.apply(this,arguments)
}
}


console.log("Attach")
bypassNativeFileCheck()
bypassJavaFileCheck()
setProp()
bypassRootAppCheck()
bypassShellCheck()

Loading

0 comments on commit f55f584

Please sign in to comment.