反编译查看源码

这种直接拉到android studio或者idea里面就可以直接看到反编译的文本内容。

反编译查看class内容

命令:javap -verbose 类文件名

  1. ls [21/09/17|22:13:32]
  2. JniLibLoader.class RTMPJni.class RTMPX264Jni.class X264Jni.class
  3. javap -verbose X264Jni [21/09/17|22:13:33]
  4. 警告: 二进制文件X264Jni包含com.hwilliamgo.livertmp.jni.X264Jni
  5. Classfile /Users/HWilliam/AllProject/AndroidStudioProjects/open-source/fuzzy-video-drill/LiveRtmp/livertmp/build/intermediates/javac/debug/classes/com/hwilliamgo/livertmp/jni/X264Jni.class
  6. Last modified 2021-9-14; size 611 bytes
  7. MD5 checksum ab3ec02076fa9768774f2868cac2c845
  8. Compiled from "X264Jni.java"
  9. public class com.hwilliamgo.livertmp.jni.X264Jni
  10. minor version: 0
  11. major version: 51
  12. flags: ACC_PUBLIC, ACC_SUPER
  13. Constant pool:
  14. #1 = Methodref #4.#24 // java/lang/Object."<init>":()V
  15. #2 = Methodref #25.#26 // com/hwilliamgo/livertmp/jni/JniLibLoader.loadLibOnce:()V
  16. #3 = Class #27 // com/hwilliamgo/livertmp/jni/X264Jni
  17. #4 = Class #28 // java/lang/Object
  18. #5 = Utf8 <init>
  19. #6 = Utf8 ()V
  20. #7 = Utf8 Code
  21. #8 = Utf8 LineNumberTable
  22. #9 = Utf8 LocalVariableTable
  23. #10 = Utf8 this
  24. #11 = Utf8 Lcom/hwilliamgo/livertmp/jni/X264Jni;
  25. #12 = Utf8 init
  26. #13 = Utf8 setVideoCodecInfo
  27. #14 = Utf8 (IIII)V
  28. #15 = Utf8 encode
  29. #16 = Utf8 ([B)V
  30. #17 = Utf8 destroy
  31. #18 = Utf8 onEncode
  32. #19 = Utf8 encodeData
  33. #20 = Utf8 [B
  34. #21 = Utf8 <clinit>
  35. #22 = Utf8 SourceFile
  36. #23 = Utf8 X264Jni.java
  37. #24 = NameAndType #5:#6 // "<init>":()V
  38. #25 = Class #29 // com/hwilliamgo/livertmp/jni/JniLibLoader
  39. #26 = NameAndType #30:#6 // loadLibOnce:()V
  40. #27 = Utf8 com/hwilliamgo/livertmp/jni/X264Jni
  41. #28 = Utf8 java/lang/Object
  42. #29 = Utf8 com/hwilliamgo/livertmp/jni/JniLibLoader
  43. #30 = Utf8 loadLibOnce
  44. {
  45. public com.hwilliamgo.livertmp.jni.X264Jni();
  46. descriptor: ()V
  47. flags: ACC_PUBLIC
  48. Code:
  49. stack=1, locals=1, args_size=1
  50. 0: aload_0
  51. 1: invokespecial #1 // Method java/lang/Object."<init>":()V
  52. 4: return
  53. LineNumberTable:
  54. line 8: 0
  55. LocalVariableTable:
  56. Start Length Slot Name Signature
  57. 0 5 0 this Lcom/hwilliamgo/livertmp/jni/X264Jni;
  58. public static native void init();
  59. descriptor: ()V
  60. flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
  61. public static native void setVideoCodecInfo(int, int, int, int);
  62. descriptor: (IIII)V
  63. flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
  64. public static native void encode(byte[]);
  65. descriptor: ([B)V
  66. flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
  67. public static native void destroy();
  68. descriptor: ()V
  69. flags: ACC_PUBLIC, ACC_STATIC, ACC_NATIVE
  70. public static void onEncode(byte[]);
  71. descriptor: ([B)V
  72. flags: ACC_PUBLIC, ACC_STATIC
  73. Code:
  74. stack=0, locals=1, args_size=1
  75. 0: return
  76. LineNumberTable:
  77. line 47: 0
  78. LocalVariableTable:
  79. Start Length Slot Name Signature
  80. 0 1 0 encodeData [B
  81. static {};
  82. descriptor: ()V
  83. flags: ACC_STATIC
  84. Code:
  85. stack=0, locals=0, args_size=0
  86. 0: invokestatic #2 // Method com/hwilliamgo/livertmp/jni/JniLibLoader.loadLibOnce:()V
  87. 3: return
  88. LineNumberTable:
  89. line 10: 0
  90. line 11: 3
  91. }
  92. SourceFile: "X264Jni.java"