Git Product home page Git Product logo

Comments (4)

ac-pm avatar ac-pm commented on July 22, 2024

Hi @incyclum I will check the problem. Thankyou.

from inspeckage.

incyclum avatar incyclum commented on July 22, 2024

I found only 3 usages of the class com.android.okhttp.internal.http.HttpURLConnectionImpl, in the file HttpHook.java:

(149-67) - final Class<?> httpURLConnectionImpl = findClass("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader);
(151-40) - findAndHookMethod("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader, "getOutputStream", RequestHook);
(152-40) - findAndHookMethod("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader, "getInputStream", ResponseHook);
try {
            if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
                findAndHookMethod("libcore.net.http.HttpURLConnectionImpl", loadPackageParam.classLoader, "getOutputStream", RequestHook);
            } else {
                //com.squareup.okhttp.internal.http.HttpURLConnectionImpl
                final Class<?> httpURLConnectionImpl = findClass("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader);
                if(httpURLConnectionImpl != null) {
                    findAndHookMethod("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader, "getOutputStream", RequestHook);
                    findAndHookMethod("com.android.okhttp.internal.http.HttpURLConnectionImpl", loadPackageParam.classLoader, "getInputStream", ResponseHook);
                }
            }
        } catch (Error e){
            Module.logError(e);
        }

Two Xposed helpers related to class loading are referenced in the api doc:

from inspeckage.

incyclum avatar incyclum commented on July 22, 2024
  • Apps are not crashing when the module is disabled.
  • Problem 1 XposedHelpers.ClassNotFoundError throwed by findClass at line 149
  • Problem 2 findAndHookMethod(okHttpClient, "open"... line 129 : the open method doesn't exists since OkHttp 2.x, see https://stackoverflow.com/questions/33311409/okhttpclient-open-method-missing-in-v2-0
  • Problem 1 fixed : Replacing com.android.okhttp.internal.http.HttpURLConnectionImpl by com.android.okhttp.internal.huc.HttpURLConnectionImpl in findClass fixed the catch error.
  • Problem 2 fixed : I commented out the findAndHookMethod block because I don't know what to do to fix it properly.

Still crashing

I don't what to do next... keep diggin'

from inspeckage.

incyclum avatar incyclum commented on July 22, 2024

Placed some XposedBridge.log at some points of the code.
It tells me that all _Foo_Hook.initAllHooks in the Module class executed without anymore log
message.

Had a JNI ERROR in the Xposed logs messages and Google-ed : http://forum.xda-developers.com/xposed/lollipop-module-crashes-art-jni-error-t3030586

Removed usage of FileSystemHook class and no more crash. but still crashing with other apps.

Going to bed now.
Need to clean up all those debug log messages.

from inspeckage.

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.