Skip to content
/ Riddle Public

Riddle is debugger attach tracking agent for Android.

License

Notifications You must be signed in to change notification settings

mofneko/Riddle

Repository files navigation

Riddle

=============================================

Release

Riddle is debugger attach tracking agent for Android.

How to use

Java and Kotlin

Users of your library will need add the jitpack.io repository:

allprojects {
 repositories {
    jcenter()
    maven { url "https://jitpack.io" }
 }
}

and:

dependencies {
    compile 'com.github.mofneko:Riddle:0.1.1'
}

Step1. Handling DebuggerAttachDetectDelegate

            val detectCallback = object : RiddleCallback() {
                override fun onDetect() {
                    // Debugger Attach Detection.
                }
            }

Step2. Detect

        var riddle = Riddle()
        riddle.initialize(3000, detectCallback)
        button.setOnClickListener {
            riddle.start()
        }

NOTE: To improve performance, stop detection when it is not necessary.

            riddle.start()
C# (Unity)

Create a folder with the structure Assets/Plugins/Android and put *.aar in the Android folder.

and fact Delegate.

  public class DetectListener : AndroidJavaProxy
    {
        public DetectListener()
            : base("com.nekolaboratory.Riddle.RiddleCallback")
        {
        }
        void onDetect() {
            // Debugger Attach Detection.
        }
    }

and execute Detect.

    void Detect()
    {
        // Step1. Instantiate
        using (AndroidJavaObject Riddle = new AndroidJavaObject("com.nekolaboratory.Riddle.Riddle"))
        {
        // Step2. Detect
        Riddle.Call("initialize", 3000, new DetectListener());
        Riddle.Call("start");
        }
    }

To improve performance, stop detection when it is not necessary.

        // The stop function is an instance method.
        Riddle.Call("stop");

Development

$ git clone git@github.com:mofneko/Riddle.git
$ cd Riddle
$ ./gradlew assembleRelease

License

MIT License

Copyright (c) 2019 Yusuke Arakawa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.