Last active
June 5, 2023 17:02
-
-
Save T8aZ/e8838e133823347c42bfb5578afe940c to your computer and use it in GitHub Desktop.
Root Kali Nethunter Oneplus 6 w/o removing dm-verity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dm-verity disabler got me into boot freeze. all you need to avoid "Required key not available" is to remove "session optional pam_keyinit.so force revoke" from : | |
| /etc/pam.d/su-l | |
| /etc/pam.d/login | |
| /etc/pam.d/runuser-l | |
| /etc/pam.d/sshd | |
| FULL PROCESS: | |
| # ROOT PHONE | |
| enable USB debugging, advanced reboot | |
| Get platform tools https://developer.android.com/studio/releases/platform-tools | |
| ./adb reboot bootloader | |
| ./fastboot oem unlock | |
| boot system | |
| Install magisk : sudo ./adb install Magisk-v26.1.apk | |
| Get oficial image: wget https://oxygenos.oneplus.net/OnePlus6Oxygen_22.J.52_OTA_052_all_2103022341_f3ff04643ea24e51.zip | |
| unzip it | |
| extract boot image with https://github.com/ssut/payload-dumper-go from payload.bin : payload-dumper-go -p boot payload.bin | |
| Push extracted boot.img to device: sudo ./adb push boot.img /sdcard/Download | |
| Patch boot.img with Magisk ("install") | |
| retreive patched image: ./adb pull /storage/emulated/0/Download/magisk_patched-26100_pvnzn.img | |
| reboot fastboot | |
| sudo ./fastboot flash boot_b magisk_patched-26100_pvnzn.img (if it boots on B, otherwise boot_a). | |
| ==> phone is now rooted. | |
| #Nethunter | |
| ./adb push nethunter-2023.1-oneplus6-twelve-kalifs-full.zip /sdcard/Download | |
| Install Nethunter with Magisk modules (long), reboot when finished. | |
| with termux on device: get root with su and edit the following files : | |
| /etc/pam.d/su-l | |
| /etc/pam.d/login | |
| /etc/pam.d/runuser-l | |
| /etc/pam.d/sshd | |
| within Kali chroot (should be in /data/local/nhsystem/kali-arm64) to remove "session optional pam_keyinit.so force revoke" | |
| start/restart Kali chroot in Nethunter, enable SSH within Kali services, connect with root:toor. | |
| enjoy. | |
| If you fuck up and cannot boot: | |
| boot fastboot | |
| sudo ./fastboot boot twrp-3.7.0_11-0-enchilada.img | |
| ./adb push OnePlus6Oxygen_22.J.52_OTA_052_all_2103022341_f3ff04643ea24e51.zip /sdcard/Download | |
| Install the zip, wipe Dalvik, reboot. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment