Fuzion24 / AndroidHostileEnvironmentDetection

Contains many different ways to identify hostile environments.
GNU Lesser General Public License v3.0
62 stars 19 forks source link

Check for substrate // xposed #3

Open Fuzion24 opened 8 years ago

Fuzion24 commented 8 years ago

Inspect the stack trace to see if you have xposed/substrate in it.

look for /system/xposed.prop look for the installer package : de.robv.android.xposed.installer

Fuzion24 commented 8 years ago
   StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();

                boolean found = false;
                for (StackTraceElement element : stackTraceElements)
                {
                    String name = element.getClassName();
                    if( name.contains( "XposedBridge" ) )
                    {
                        found = true;
                        break;
                    }

                }
                if( found )
                {
                    Log.d("foo", "you haz xposed.  no soup for you.");
                }
                else
                {
                    Log.d("foo", "you can have some soup.");
                }