Giter VIP home page Giter VIP logo

Comments (5)

canyie avatar canyie commented on July 28, 2024

能提供一下 hook 的是哪个方法吗,我这里没有复现出来

from pine.

allenjq avatar allenjq commented on July 28, 2024
 String methodName = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT ? "openDexFileNative" : "openDexFile";
        XposedBridge.hookAllMethods(DexFile.class, methodName,new XC_MethodHook()
  XposedBridge.hookAllMethods(Camera.class, "native_setup",new XC_MethodHook() {}

from pine.

canyie avatar canyie commented on July 28, 2024

我尝试使用如下代码,未能复现闪退。麻烦确认一下同样的代码是否能在你那里复现闪退。
另外麻烦提供一下一些配置信息,比如应用是否 debuggable,是否打开了 pending hook.

        try {
            Pine.hook(Camera.class.getDeclaredMethod("native_setup", Object.class, int.class, String.class), new MethodHook() {
                @Override
                public void beforeCall(Pine.CallFrame callFrame) throws Throwable {
                    Log.e(TAG, "Calling with" + Arrays.toString(callFrame.args));
                }
            });

        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        }
        for (int i = 0;i < 2000;i++) {
            Camera camera = Camera.open();
            Log.e(TAG, "Opened " + i + " camera");
            camera.release();
        }
        Log.e(TAG, "Camera test done");

from pine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.