-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using latest Dex2Jar : Seeing this failure " Failed resolution of: Lres/Hex " #18
Comments
Not seeing this exception specific to okHttp library. Observed the same issue in another apk. Tried the same with the old version of Dex2Jar there this issue is not happening. Can you please look into it? |
Hello, sorry for not responding for quite some time. I needed to finish some work for University and academic purposes. I searched for the |
@ThexXTURBOXx No problem. Thank you for the response back. Yes your understanding is correct, we are disassemble the dex file in to jar and then reassembling the Dalvik . Here as you said this file "res/Hex" is not available in the final apk. Ideally my understanding, in this class dex-translator/src/main/java/com/googlecode/d2j/dex/Dex2Asm.java addHexDecodeMethod suppose to do that. But it didn't happen. I may be wrong here, I thought it will give you idea where to look out. Sorry If I am wrong here. We also observed this is not happening with Dex2Jar first version for the same apk. It's happening because of the changes done with Dex2Jar latest changes. |
@vramasam Thanks for additional information. Please try out v47 where I believe I have fixed this issue :) |
Sure. Thank you. Will test and update the results here. |
@vramasam Do you have any news on this or are there still any errors occurring regarding this? |
Hello @ThexXTURBOXx We observed below exception: |
Ah I see! I forgot one small thing. Give me a second :) |
Try again using version v48. Now, the method name should also be properly changed. |
Okay @ThexXTURBOXx . Thank you. Will test and let you know |
@vramasam Any news on this? :) |
Hello @ThexXTURBOXx Sorry for the delay response. The above error got resolved. We are seeing the following exception. 2022-04-07 12:30:05.898 21597-21597/? E/AndroidRuntime: FATAL EXCEPTION: main |
Thanks for your feedback! Nice to hear that this issue has been resolved. |
Thank you @ThexXTURBOXx . If you have any further updates on the ticket, please let us know. |
Yes, I will! I think the main problem is that dex2jar is not the right tool for a complete, 100% working disassembling and reassembling of dex files. |
Ohh okay. Thank you for the update and suggestion. Then this issue is not possible to be fixed ? |
Hello @ThexXTURBOXx
When we try to use https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.9.3 in the apk. It results in following error.
Process: com.sampleapp, PID: 13211
java.lang.NoClassDefFoundError: Failed resolution of: Lres/Hex;
at okhttp3.internal.http2.Huffman.$d2j$hex$c61541e3$decode_I(Unknown Source:16)
at okhttp3.internal.http2.Huffman.(Unknown Source:17)
at okhttp3.internal.http2.Hpack$Writer.writeByteString(Unknown Source:11)
at okhttp3.internal.http2.Hpack$Writer.writeHeaders(Unknown Source:264)
at okhttp3.internal.http2.Http2Writer.headers(Unknown Source:12)
at okhttp3.internal.http2.Http2Connection.newStream(Unknown Source:82)
at okhttp3.internal.http2.Http2Connection.newStream(Unknown Source:6)
at okhttp3.internal.http2.Http2ExchangeCodec.writeRequestHeaders(Unknown Source:25)
at okhttp3.internal.connection.Exchange.writeRequestHeaders(Unknown Source:16)
at okhttp3.internal.http.CallServerInterceptor.intercept(Unknown Source:29)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source:80)
at okhttp3.internal.connection.ConnectInterceptor.intercept(Unknown Source:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source:80)
at okhttp3.internal.cache.CacheInterceptor.intercept(Unknown Source:192)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source:80)
at okhttp3.internal.http.BridgeInterceptor.intercept(Unknown Source:171)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source:80)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(Unknown Source:37)
at okhttp3.internal.http.RealInterceptorChain.proceed(Unknown Source:80)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(Unknown Source:119)
at okhttp3.internal.connection.RealCall.execute(Unknown Source:27)
How we are calling the OkHttpClient from code: The problem is with 4.x.x http library
private static final String URL_STRING = "https://www.google.com/";
private void okHttpLib()
{
try {
new Thread(new Runnable()
{
@OverRide
public void run()
{
try {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(URL_STRING)
.build();
Response response = client.newCall(request).execute();
Log.i(LOG_TAG, "OK HTTP, " + URL_STRING + ", status code: " + response.code());
response.body().string();
}
catch (Exception e) {
Log.e(LOG_TAG, "Exception while making okhttp call");
}
}
}).start();
}
catch (Exception e) {
Log.e(LOG_TAG, "Exception", e);
}
}
Can you please check this issue?
The text was updated successfully, but these errors were encountered: