Проверка байт-кода Java с помощью Bytecode Frameworks (Android)JAVA

Программисты JAVA общаются здесь
Anonymous
Проверка байт-кода Java с помощью Bytecode Frameworks (Android)

Сообщение Anonymous »


I am trying to achieve the following:
  • Inspect a Java method's byte codes for tampering or manipulation.

I came across the term bytecode framework and online searches led me to ASM, Byte Buddy etc. I tried to get a ClassReader object of java.lang.Object and I got a ClassNotFound exception in Android.

try { ClassReader classreader = new ClassReader("java.lang.Object"); } catch (IOException e) { throw new RuntimeException(e); } For various testing, I have included the following in my build.gradle file

implementation("net.bytebuddy:byte-buddy-android:1.14.12") implementation("org.ow2.asm:asm:9.4") implementation("org.ow2.asm:asm-util:9.2") For now, I want to be able to list or print the opcodes of the methods in a class.

Has anyone gotten this to work in Android? Any help is appreciated.

References

Источник: https://stackoverflow.com/questions/781 ... ks-android

Вернуться в «JAVA»