反编译查看源码
这种直接拉到android studio或者idea里面就可以直接看到反编译的文本内容。
反编译查看class内容
命令:javap -verbose 类文件名
❯ ls [21/09/17|22:13:32]
JniLibLoader.class RTMPJni.class RTMPX264Jni.class X264Jni.class
❯ javap -verbose X264Jni [21/09/17|22:13:33]
警告: 二进制文件X264Jni包含com.hwilliamgo.livertmp.jni.X264Jni
Classfile /Users/HWilliam/AllProject/AndroidStudioProjects/open-source/fuzzy-video-drill/LiveRtmp/livertmp/build/intermediates/javac/debug/classes/com/hwilliamgo/livertmp/jni/X264Jni.class
Last modified 2021-9-14; size 611 bytes
MD5 checksum ab3ec02076fa9768774f2868cac2c845
Compiled from "X264Jni.java"
public class com.hwilliamgo.livertmp.jni.X264Jni
minor version: 0
major version: 51
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Methodref #4.#24 // java/lang/Object."<init>":()V
#2 = Methodref #25.#26 // com/hwilliamgo/livertmp/jni/JniLibLoader.loadLibOnce:()V
#3 = Class #27 // com/hwilliamgo/livertmp/jni/X264Jni
#4 = Class #28 // java/lang/Object
#5 = Utf8 <init>
#6 = Utf8 ()V
#7 = Utf8 Code
#8 = Utf8 LineNumberTable
#9 = Utf8 LocalVariableTable
#10 = Utf8 this
#11 = Utf8 Lcom/hwilliamgo/livertmp/jni/X264Jni;
#12 = Utf8 init
#13 = Utf8 setVideoCodecInfo
#14 = Utf8 (IIII)V
#15 = Utf8 encode
#16 = Utf8 ([B)V
#17 = Utf8 destroy
#18 = Utf8 onEncode
#19 = Utf8 encodeData
#20 = Utf8 [B
#21 = Utf8 <clinit>
#22 = Utf8 SourceFile
#23 = Utf8 X264Jni.java
#24 = NameAndType #5:#6 // "<init>":()V
#25 = Class #29 // com/hwilliamgo/livertmp/jni/JniLibLoader
#26 = NameAndType #30:#6 // loadLibOnce:()V
#27 = Utf8 com/hwilliamgo/livertmp/jni/X264Jni
#28 = Utf8 java/lang/Object
#29 = Utf8 com/hwilliamgo/livertmp/jni/JniLibLoader
#30 = Utf8 loadLibOnce
{
public com.hwilliamgo.livertmp.jni.X264Jni();
descriptor: ()V
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 8: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this Lcom/hwilliamgo/livertmp/jni/X264Jni;
public static native void init();
descriptor: ()V
flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
public static native void setVideoCodecInfo(int, int, int, int);
descriptor: (IIII)V
flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
public static native void encode(byte[]);
descriptor: ([B)V
flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
public static native void destroy();
descriptor: ()V
flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
public static void onEncode(byte[]);
descriptor: ([B)V
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=0, locals=1, args_size=1
0: return
LineNumberTable:
line 47: 0
LocalVariableTable:
Start Length Slot Name Signature
0 1 0 encodeData [B
static {};
descriptor: ()V
flags: ACC_STATIC
Code:
stack=0, locals=0, args_size=0
0: invokestatic #2 // Method com/hwilliamgo/livertmp/jni/JniLibLoader.loadLibOnce:()V
3: return
LineNumberTable:
line 10: 0
line 11: 3
}
SourceFile: "X264Jni.java"