ipdev

MagiskbootExample

Nov 12th, 2021
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [ip@lost tmp]$
  2. [ip@lost tmp]$ ls -la
  3. total 16856
  4. drwxrwxr-x. 1 ip ip 26 Nov 12 14:41 .
  5. drwxr-xr-x. 1 ip ip 936 Nov 12 12:21 ..
  6. -rw-rw-r--. 1 ip ip 17258005 Nov 12 12:21 app-debug.apk
  7. [ip@lost tmp]$
  8. [ip@lost tmp]$ unzip app-debug.apk lib*
  9. Archive: app-debug.apk
  10. inflating: lib/arm64-v8a/libbusybox.so
  11. inflating: lib/arm64-v8a/libmagisk64.so
  12. inflating: lib/arm64-v8a/libmagiskboot.so
  13. inflating: lib/arm64-v8a/libmagiskinit.so
  14. inflating: lib/armeabi-v7a/libbusybox.so
  15. inflating: lib/armeabi-v7a/libmagisk32.so
  16. inflating: lib/armeabi-v7a/libmagiskboot.so
  17. inflating: lib/armeabi-v7a/libmagiskinit.so
  18. inflating: lib/x86/libbusybox.so
  19. inflating: lib/x86/libmagisk32.so
  20. inflating: lib/x86/libmagiskboot.so
  21. inflating: lib/x86/libmagiskinit.so
  22. inflating: lib/x86_64/libbusybox.so
  23. inflating: lib/x86_64/libmagisk64.so
  24. inflating: lib/x86_64/libmagiskboot.so
  25. inflating: lib/x86_64/libmagiskinit.so
  26. [ip@lost tmp]$
  27. [ip@lost tmp]$ ls -la
  28. total 16856
  29. drwxrwxr-x. 1 ip ip 32 Nov 12 14:41 .
  30. drwxr-xr-x. 1 ip ip 936 Nov 12 12:21 ..
  31. -rw-rw-r--. 1 ip ip 17258005 Nov 12 12:21 app-debug.apk
  32. drwxrwxr-x. 1 ip ip 58 Nov 12 14:41 lib
  33. [ip@lost tmp]$
  34. [ip@lost tmp]$ adb push lib/arm64-v8a/* /data/local/tmp/
  35. lib/arm64-v8a/libbusybox.so: 1 file pushed, 0 skipped. 104.7 MB/s (2041792 bytes in 0.019s)
  36. lib/arm64-v8a/libmagisk64.so: 1 file pushed, 0 skipped. 145.6 MB/s (219512 bytes in 0.001s)
  37. lib/arm64-v8a/libmagiskboot.so: 1 file pushed, 0 skipped. 185.0 MB/s (616832 bytes in 0.003s)
  38. lib/arm64-v8a/libmagiskinit.so: 1 file pushed, 0 skipped. 173.4 MB/s (659320 bytes in 0.004s)
  39. 4 files pushed, 0 skipped. 41.0 MB/s (3537456 bytes in 0.082s)
  40. [ip@lost tmp]$
  41. [ip@lost tmp]$ adb shell chmod 0755 /data/local/tmp/*.so
  42. [ip@lost tmp]$
  43. [ip@lost tmp]$ adb push /ip/oneplus/6T/11_1_1_1/OnePlus6TOxygen_34.J.61_OTA_0610_all_2109171644_bae59a9/boot.img /data/local/tmp/
  44. /ip/oneplus/6T/11_1_1_1/OnePlus6TOxygen_34.J.61_OTA_0610_all_2109171644_bae59a9/boot.img: 1 file pushed, 0 skipped. 87.7 MB/s (67108864 bytes in 0.730s)
  45. [ip@lost tmp]$
  46. [ip@lost tmp]$ adb shell
  47. OnePlus6T:/ $
  48. OnePlus6T:/ $ cd /data/local/tmp/
  49. OnePlus6T:/data/local/tmp $
  50. OnePlus6T:/data/local/tmp $ ls -la
  51. total 69032
  52. drwxrwx--x 2 shell shell 4096 2021-11-12 14:42 .
  53. drwxr-x--x 4 root root 4096 1972-03-07 23:01 ..
  54. -rw-rw-rw- 1 shell shell 67108864 2021-10-14 21:41 boot.img
  55. -rwxr-xr-x 1 shell shell 2041792 1981-01-01 01:01 libbusybox.so
  56. -rwxr-xr-x 1 shell shell 219512 1981-01-01 01:01 libmagisk64.so
  57. -rwxr-xr-x 1 shell shell 616832 1981-01-01 01:01 libmagiskboot.so
  58. -rwxr-xr-x 1 shell shell 659320 1981-01-01 01:01 libmagiskinit.so
  59. OnePlus6T:/data/local/tmp $
  60. OnePlus6T:/data/local/tmp $ ./libmagiskboot.so unpack boot.img
  61. Parsing boot image: [boot.img]
  62. HEADER_VER [1]
  63. KERNEL_SZ [12979968]
  64. RAMDISK_SZ [15871693]
  65. SECOND_SZ [0]
  66. RECOV_DTBO_SZ [0]
  67. OS_VERSION [11.0.0]
  68. OS_PATCH_LEVEL [2021-09]
  69. PAGESIZE [4096]
  70. NAME []
  71. CMDLINE [androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 rootwait ro init=/init buildvariant=user]
  72. CHECKSUM [5ba5371930a26ad244c2b59c7511661d508432df000000000000000000000000]
  73. KERNEL_DTB_SZ [1243996]
  74. KERNEL_FMT [gzip]
  75. RAMDISK_FMT [gzip]
  76. VBMETA
  77. OnePlus6T:/data/local/tmp $
  78. OnePlus6T:/data/local/tmp $ ls -la
  79. total 139196
  80. drwxrwx--x 2 shell shell 4096 2021-11-12 14:42 .
  81. drwxr-x--x 4 root root 4096 1972-03-07 23:01 ..
  82. -rw-rw-rw- 1 shell shell 67108864 2021-10-14 21:41 boot.img
  83. -rw-r--r-- 1 shell shell 32000024 2021-11-12 14:42 kernel
  84. -rw-r--r-- 1 shell shell 1243996 2021-11-12 14:42 kernel_dtb
  85. -rwxr-xr-x 1 shell shell 2041792 1981-01-01 01:01 libbusybox.so
  86. -rwxr-xr-x 1 shell shell 219512 1981-01-01 01:01 libmagisk64.so
  87. -rwxr-xr-x 1 shell shell 616832 1981-01-01 01:01 libmagiskboot.so
  88. -rwxr-xr-x 1 shell shell 659320 1981-01-01 01:01 libmagiskinit.so
  89. -rw-r--r-- 1 shell shell 38581248 2021-11-12 14:42 ramdisk.cpio
  90. OnePlus6T:/data/local/tmp $
  91. OnePlus6T:/data/local/tmp $ ./libmagiskboot.so repack boot.img
  92. Parsing boot image: [boot.img]
  93. HEADER_VER [1]
  94. KERNEL_SZ [12979968]
  95. RAMDISK_SZ [15871693]
  96. SECOND_SZ [0]
  97. RECOV_DTBO_SZ [0]
  98. OS_VERSION [11.0.0]
  99. OS_PATCH_LEVEL [2021-09]
  100. PAGESIZE [4096]
  101. NAME []
  102. CMDLINE [androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 rootwait ro init=/init buildvariant=user]
  103. CHECKSUM [5ba5371930a26ad244c2b59c7511661d508432df000000000000000000000000]
  104. KERNEL_DTB_SZ [1243996]
  105. KERNEL_FMT [gzip]
  106. RAMDISK_FMT [gzip]
  107. VBMETA
  108. Repack to boot image: [new-boot.img]
  109. HEADER_VER [1]
  110. KERNEL_SZ [12979972]
  111. RAMDISK_SZ [15811770]
  112. SECOND_SZ [0]
  113. RECOV_DTBO_SZ [0]
  114. OS_VERSION [11.0.0]
  115. OS_PATCH_LEVEL [2021-09]
  116. PAGESIZE [4096]
  117. NAME []
  118. CMDLINE [androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 rootwait ro init=/init buildvariant=user]
  119. CHECKSUM [eb99a0ab2bef2e1a750cd8889bb10eb3450f29de000000000000000000000000]
  120. OnePlus6T:/data/local/tmp $
  121. OnePlus6T:/data/local/tmp $ ls -la
  122. total 204736
  123. drwxrwx--x 2 shell shell 4096 2021-11-12 14:43 .
  124. drwxr-x--x 4 root root 4096 1972-03-07 23:01 ..
  125. -rw-rw-rw- 1 shell shell 67108864 2021-10-14 21:41 boot.img
  126. -rw-r--r-- 1 shell shell 32000024 2021-11-12 14:42 kernel
  127. -rw-r--r-- 1 shell shell 1243996 2021-11-12 14:42 kernel_dtb
  128. -rwxr-xr-x 1 shell shell 2041792 1981-01-01 01:01 libbusybox.so
  129. -rwxr-xr-x 1 shell shell 219512 1981-01-01 01:01 libmagisk64.so
  130. -rwxr-xr-x 1 shell shell 616832 1981-01-01 01:01 libmagiskboot.so
  131. -rwxr-xr-x 1 shell shell 659320 1981-01-01 01:01 libmagiskinit.so
  132. -rw-r--r-- 1 shell shell 67108864 2021-11-12 14:43 new-boot.img
  133. -rw-r--r-- 1 shell shell 38581248 2021-11-12 14:42 ramdisk.cpio
  134. OnePlus6T:/data/local/tmp $
  135. OnePlus6T:/data/local/tmp $ exit
  136. [ip@lost tmp]$
  137. [ip@lost tmp]$ ls -la
  138. total 16856
  139. drwxrwxr-x. 1 ip ip 32 Nov 12 14:41 .
  140. drwxr-xr-x. 1 ip ip 936 Nov 12 12:21 ..
  141. -rw-rw-r--. 1 ip ip 17258005 Nov 12 12:21 app-debug.apk
  142. drwxrwxr-x. 1 ip ip 58 Nov 12 14:41 lib
  143. [ip@lost tmp]$
  144. [ip@lost tmp]$ adb pull /data/local/tmp/new-boot.img
  145. /data/local/tmp/new-boot.img: 1 file pulled, 0 skipped. 34.6 MB/s (67108864 bytes in 1.852s)
  146. [ip@lost tmp]$
  147. [ip@lost tmp]$ ls -la
  148. total 82392
  149. drwxrwxr-x. 1 ip ip 56 Nov 12 14:43 .
  150. drwxr-xr-x. 1 ip ip 936 Nov 12 12:21 ..
  151. -rw-rw-r--. 1 ip ip 17258005 Nov 12 12:21 app-debug.apk
  152. drwxrwxr-x. 1 ip ip 58 Nov 12 14:41 lib
  153. -rw-r--r--. 1 ip ip 67108864 Nov 12 14:43 new-boot.img
  154. [ip@lost tmp]$
  155. [ip@lost tmp]$ adb reboot bootloader; fastboot boot new-boot.img
  156. < waiting for any device >
  157. Sending 'boot.img' (65536 KB) OKAY [ 2.855s]
  158. Booting OKAY [ 0.078s]
  159. Finished. Total time: 2.994s
  160. [ip@lost tmp]$
  161. [ip@lost tmp]$ adb shell ls -la /data/local/tmp/
  162. total 204736
  163. drwxrwx--x 2 shell shell 4096 2021-11-12 14:43 .
  164. drwxr-x--x 4 root root 4096 1972-03-07 23:01 ..
  165. -rw-rw-rw- 1 shell shell 67108864 2021-10-14 21:41 boot.img
  166. -rw-r--r-- 1 shell shell 32000024 2021-11-12 14:42 kernel
  167. -rw-r--r-- 1 shell shell 1243996 2021-11-12 14:42 kernel_dtb
  168. -rwxr-xr-x 1 shell shell 2041792 1981-01-01 01:01 libbusybox.so
  169. -rwxr-xr-x 1 shell shell 219512 1981-01-01 01:01 libmagisk64.so
  170. -rwxr-xr-x 1 shell shell 616832 1981-01-01 01:01 libmagiskboot.so
  171. -rwxr-xr-x 1 shell shell 659320 1981-01-01 01:01 libmagiskinit.so
  172. -rw-r--r-- 1 shell shell 67108864 2021-11-12 14:43 new-boot.img
  173. -rw-r--r-- 1 shell shell 38581248 2021-11-12 14:42 ramdisk.cpio
  174. [ip@lost tmp]$
  175. [ip@lost tmp]$ adb shell rm /data/local/tmp/*
  176. [ip@lost tmp]$
  177. [ip@lost tmp]$ adb shell ls -la /data/local/tmp/
  178. total 16
  179. drwxrwx--x 2 shell shell 4096 2021-11-12 14:45 .
  180. drwxr-x--x 4 root root 4096 1972-03-07 23:01 ..
  181. [ip@lost tmp]$
  182.  
RAW Paste Data