Showing posts with label root. Show all posts
Showing posts with label root. Show all posts

Saturday, 9 August 2025

Ekstrak boot.img dari file OTA v612 itel P55 5G

 

Siap Guru 👍
Berarti perintah lengkapnya di Ubuntu untuk ekstrak boot.img dari file itu adalah:


# 1. Pasang Golang (sekali saja)
sudo apt update
sudo apt install golang -y

# 2. Clone payload-dumper-go
cd ~
git clone https://github.com/ssut/payload-dumper-go.git
cd payload-dumper-go
go build

# 3. Ekstrak payload.bin
./payload-dumper-go "/home/dhwan/Downloads/itel/1DM/Compressed/P661N_V612_OTA/payload.bin"

📌 Setelah proses selesai:

  • Hasil ekstrak ada di folder output/ di dalam payload-dumper-go.

  • Ambil file boot.img dari folder itu.

  • Copy ke HP → patch di KernelSU Manager → hasil patch kirim balik ke PC → flash via fastboot.


Kalau mau, saya bisa langsung kasih lanjutan perintah flash ke HP setelah patch, supaya Guru langsung root tanpa bolak-balik tanya.
Mau saya tulis lanjutannya?

 

 

~/payload-dumper-go$ ./payload-dumper-go "/home/dhwan/Downloads/itel/1DM/Compressed/P661N_V612_OTA/payload.bin"
payload.bin: /home/dhwan/Downloads/itel/1DM/Compressed/P661N_V612_OTA/payload.bin
Payload Version: 2
Payload Manifest Length: 406896
Payload Manifest Signature Length: 267
Found partitions:
boot (42 MB), dpm (152 kB), dtbo (8.4 MB), gz (2.7 MB), lk (1.3 MB), logo (1.7 MB), mcupm (406 kB), md1img (64 MB), pi_img (8.2 kB), preloader_raw (434 kB), product (854 MB), scp (406 kB), spmfw (16 kB), sspm (660 kB), system (930 MB), system_ext (1.5 GB), tee (983 kB), tkv (532 kB), tr_carrier (348 kB), tr_company (348 kB), tr_mi (348 kB), tr_preload (1.5 GB), tr_product (733 MB), tr_region (348 kB), tr_theme (348 kB), vbmeta (12 kB), vbmeta_system (4.1 kB), vbmeta_vendor (4.1 kB), vendor (893 MB), vendor_boot (67 MB)
Number of workers: 4
Unhandled operation type: SOURCE_COPY
Unhandled operation type: BROTLI_BSDIFF
Unhandled operation type: BROTLI_BSDIFF
dpm (152 kB)   [=========================================================================================================] 100 %
boot (42 MB)   [=========================================================================================================] 100 %
dtbo (8.4 MB)  [=========================================================================================================] 100 %
dpm (152 kB)   [=========================================================================================================] 100 %
dpm (152 kB)    [========================================================================================================] 100 %
boot (42 MB)    [========================================================================================================] 100 %
dpm (152 kB)     [=======================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dtbo (8.4 MB)           [================================================================================================] 100 %
gz (2.7 MB)             [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dtbo (8.4 MB)           [================================================================================================] 100 %
gz (2.7 MB)             [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dtbo (8.4 MB)           [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dtbo (8.4 MB)           [================================================================================================] 100 %
gz (2.7 MB)             [================================================================================================] 100 %
dpm (152 kB)            [================================================================================================] 100 %
boot (42 MB)            [================================================================================================] 100 %
dtbo (8.4 MB)           [================================================================================================] 100 %
gz (2.7 MB)             [================================================================================================] 100 %
lk (1.3 MB)             [================================================================================================] 100 %
logo (1.7 MB)           [================================================================================================] 100 %
mcupm (406 kB)          [================================================================================================] 100 %
md1img (64 MB)          [================================================================================================] 100 %
pi_img (8.2 kB)         [================================================================================================] 100 %
preloader_raw (434 kB)  [================================================================================================] 100 %
product (854 MB)        [================================================================================================] 100 %
scp (406 kB)            [================================================================================================] 100 %
spmfw (16 kB)           [================================================================================================] 100 %
sspm (660 kB)           [================================================================================================] 100 %
system (930 MB)         [================================================================================================] 100 %
system_ext (1.5 GB)     [================================================================================================] 100 %
tee (983 kB)            [================================================================================================] 100 %
tkv (532 kB)            [================================================================================================] 100 %
tr_carrier (348 kB)     [================================================================================================] 100 %
tr_company (348 kB)     [================================================================================================] 100 %
tr_preload (1.5 GB)     [================================================================================================] 100 %
tr_mi (348 kB)          [================================================================================================] 100 %
tr_product (733 MB)     [================================================================================================] 100 %
tr_region (348 kB)      [================================================================================================] 100 %
tr_theme (348 kB)       [================================================================================================] 100 %
vbmeta (12 kB)          [================================================================================================] 100 %
vbmeta_system (4.1 kB)  [================================================================================================] 100 %
vbmeta_vendor (4.1 kB)  [================================================================================================] 100 %
vendor (893 MB)         [================================================================================================] 100 %
vendor_boot (67 MB)     [================================================================================================] 100 %
 

 

~/payload-dumper-go$ ls
chromeos_update_engine  extracted_20250809_213356  go.sum   main.go            payload.go  README.md
Dockerfile              go.mod                     LICENSE  payload-dumper-go  reader.go   update_metadata.proto
 

Sip, berhasil diekstrak 👍
Folder output-nya itu yang bernama:

extracted_20250809_213356

Lanjut begini ya:

cd ~/payload-dumper-go/extracted_20250809_213356
ls -lh | grep -E 'boot|vendor_boot|init_boot'

Harusnya ada boot.img (± puluhan MB). Lanjut:

# simpan cadangan
cp boot.img boot.img.orig

# kirim ke HP untuk dipatch di KernelSU Manager
adb push boot.img /sdcard/Download/

Di HP: buka KernelSU Manager → Install → Patch boot image → pilih Download/boot.img.
Hasilnya biasanya boot-patched.img di folder Download.

Balik ke PC dan flash:

# tarik hasil patch dari HP
adb pull /sdcard/Download/boot-patched*.img .

# cek slot aktif lalu flash ke slot tsb
adb reboot bootloader
fastboot getvar current-slot    # catat 'a' atau 'b'
fastboot flash boot_a boot-patched.img   # jika slot aktif 'a'
# atau: fastboot flash boot_b boot-patched.img  # jika 'b'
fastboot reboot

Buka KernelSU Manager → status harus Installed.
Kalau butuh, saya bantu cek isi folder extracted_... untuk memastikan file yang mana yang dipakai.

 

 :~/payload-dumper-go/extracted_20250809_213356$ ls
boot.img  lk.img      pi_img.img         spmfw.img       tee.img         tr_mi.img       tr_theme.img       vendor_boot.img
dpm.img   logo.img    preloader_raw.img  sspm.img        tkv.img         tr_preload.img  vbmeta.img         vendor.img
dtbo.img  mcupm.img   product.img        system_ext.img  tr_carrier.img  tr_product.img  vbmeta_system.img
gz.img    md1img.img  scp.img            system.img      tr_company.img  tr_region.img   vbmeta_vendor.img


~/payload-dumper-go/extracted_20250809_213356$ ls -lh | grep -E 'boot|vendor_boot|init_boot'
-rwxr-xr-x 1 dhwan dhwan   0 Aug  9 21:33 boot.img
-rwxr-xr-x 1 dhwan dhwan 64M Aug  9 21:33 vendor_boot.img

 

Sunday, 26 March 2023

root xiaomi redmi note 5 pro

 

Quick recap, at this point, you should have known and prepared:

  1. Whether your device has boot ramdisk
  2. Whether your device has a separate vbmeta partition
  3. A boot.img, init_boot.img or recovery.img based on (1)

Let’s continue to Patching Images.

Patching Images

  • Copy the boot/init_boot/recovery image to your device
  • Press the Install button in the Magisk card
  • If you are patching a recovery image, check the “Recovery Mode” option
  • If your device does NOT have a separate vbmeta partition, check the “Patch vbmeta in boot image” option
  • Choose “Select and Patch a File” in method, and select the boot/init_boot/recovery image
  • Start the installation, and copy the patched image to your PC using ADB:
    adb pull /sdcard/Download/magisk_patched_[random_strings].img
  • Flash the patched boot/init_boot/recovery image to your device;
    for most devices, reboot into fastboot mode and flash with command:
    fastboot flash boot[_x] /path/to/magisk_patched_[random_strings].img or
    fastboot flash init_boot[_x] /path/to/magisk_patched.img_[random_strings] or
    fastboot flash recovery /path/to/magisk_patched.img_[random_strings],
    where [_x] should be _a or _b or empty depending on your device
  • (Optional) If your device has a separate vbmeta partition, you can patch the vbmeta partition with command:
    fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img (note that it may wipe your data)
  • Reboot and launch Magisk app (you will see a stub Magisk app if you have wipped your data; use it to bootstrap to a complete Magisk app), and you will see a prompt asking for environment fix; click and wait for the reboot
  • Voila!

 

==========================

 

 $ adb shell ls -l /dev/block/by-name
total 0
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 abl -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 ablbak -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 apdp -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 bk1 -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 bk2 -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 bluetooth -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 boot -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cache -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cmnlib -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cmnlib64 -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cmnlib64bak -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cmnlibbak -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 cust -> /dev/block/mmcblk0p63
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 ddr -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 devcfg -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 devcfgbak -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 devinfo -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 dip -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 dpo -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 dsp -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 frp -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 fsc -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 fsg -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 hyp -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 hypbak -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 keymaster -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 keymasterbak -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 keystore -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 limits -> /dev/block/mmcblk0p4
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 logdump -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 logfs -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 mdtp -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 mdtpsecapp -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 mdtpsecappbak -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 misc -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 modem -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 modemst1 -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 modemst2 -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 msadp -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 persist -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 persistbak -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 pmic -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 pmicbak -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 rawdump -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 recovery -> /dev/block/mmcblk0p59
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 rpm -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 rpmbak -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 sec -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 splash -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 ssd -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 sti -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 storsec -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 storsecbak -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 switch -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 system -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 toolsfv -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 tz -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 tzbak -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 userdata -> /dev/block/mmcblk0p64
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 vbmeta -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-01-01 07:08 vbmetabak -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 vendor -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 xbl -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-01-01 07:08 xblbak -> /dev/block/mmcblk0p41
dhwan@dhwan-Aspire-A514:~$ adb pull /sdcard/Download/magisk_patched_25200_gzIBr.img
adb: error: failed to get feature set: no devices/emulators found
dhwan@dhwan-Aspire-A514:~$ adb pull /storage/emulated/0/Download/magisk_patched_25200_gzIBr.img
adb: error: failed to get feature set: no devices/emulators found
dhwan@dhwan-Aspire-A514:~$ adb devices
List of devices attached

dhwan@dhwan-Aspire-A514:~$ adb devices
List of devices attached

dhwan@dhwan-Aspire-A514:~$ adb devices
List of devices attached

dhwan@dhwan-Aspire-A514:~$ adb devices
List of devices attached

dhwan@dhwan-Aspire-A514:~$ adb devices
List of devices attached

dhwan@dhwan-Aspire-A514:~$ fastboot devices
4298e29b    fastboot
dhwan@dhwan-Aspire-A514:~$ fastboot flash boot magisk_patched-25200_gzIBr.img
target reported max download size of 536870912 bytes
sending 'boot' (13356 KB)...
OKAY [  0.436s]
writing 'boot'...
OKAY [  0.120s]
finished. total time: 0.555s
dhwan@dhwan-Aspire-A514:~$ fastboot reboot
rebooting...

finished. total time: 0.050s

Saturday, 22 October 2022

Root Magisk Pixel 3a

Dowload:
1) boot image corresponding to the build number installed on your Pixel device.
2) Latest Magisk Manager APK

3 langkah root:
The first step involves unlocking the bootloader on the Pixel device. Once unlocked, you can download the stock boot image for your phone and patch it using Magisk Manager. Finally, when all that is done, you can flash the patched boot image to root your Google Pixel  

Step 1: Unlock the Bootloader

    Go to ‘Settings’ > ‘About phone’ on your Pixel 3a.
    Continuously tap on the ‘Build number’ section for 5 times to enable the ‘Developer options’.
    Enable Developer Options on Google Pixel 3a/Pixel 3a XL
    Once enabled, you should see the ‘You’re now a developer!’ message on the phone’s screen.
    Now go back to the Settings menu and tap on ‘Developer options’.
    Enable OEM Unlocking on Google Pixel 3a/Pixel 3a XL
    Turn on the ‘OEM Unlocking’ option.
    After you have successfully enabled the option, power off your phone completely.
    Hold the Volume Down and Power buttons together to boot your Pixel 3a into the Bootloader Mode.
    Boot your Google Pixel 3a/Pixel 3a XL Bootloader Mode
    Bootloader Mode on Google Pixel 3
    Connect your phone to the PC using the USB cable.
    On your PC, go to the folder where the Android Platform Tools are installed (e.g. C:\adb).
    While holding the SHIFT key, right-click on any empty space inside the folder.
    Select the ‘Open PowerShell window here’ option.
    Enter the following command to ensure that your Pixel device is correctly being detected by the PC over fastboot:

    fastboot devices

    The command should return the device ID. If it does, make sure that you have installed the proper USB drivers for your phone.
    Now, enter the following command to initiate the bootloader unlocking process:

    fastboot flashing unlock

    As soon as the command is entered, you should see the confirmation message on your phone’s screen.
    Confirm Bootloader Unlock on Google Pixel 3a/Pixel 3a XL
    Tap the Volume button until the ‘Unlock the bootloader’ option shows up on the screen.
    Finally, press the Power button to confirm and unlock the bootloader on your Google Pixel 3a/Pixel 3a XL.

Once the bootloader unlocking process finishes, your phone will be wiped completely and will reboot into Bootloader Mode. Simply press the Power button once to boot your phone into the OS.

So now that the phone’s bootloader is unlocked, you can move over to step #2 to patch the stock boot image using Magisk Manager.
Step 2: Patch the Stock Boot Image

In order to root your Google Pixel 3a/Pixel 3a XL, you must download the stock boot image and patch it using Magisk Manager. To do so, follow the instructions laid below.

    Download the stock boot image for your Pixel 3a/Pixel 3a XL.
        Ensure that you download the boot image corresponding to the software build number presently installed on your phone.
    Connect your phone to the PC and transfer the downloaded boot image to the phone’s internal storage.
    Once transferred, disconnect the phone from the PC.
    Next, download the latest Magisk Manager APK and install it on your phone.
    Once installed, go to the app drawer and launch the Magisk Manager app on your Pixel 3a (XL).
    Tap on the ‘Install’ button and then again on ‘Install’.
    Patch Stock Boot Image on Google Pixel 3a (XL) using Magisk Manager
    Select the ‘Select and Patch a File’ option.
    Now navigate to the internal storage and select the stock boot image file.
    Magisk will now start patching the stock boot image.
    Magisk Manager Patching Stock Boot Image on Google Pixel 3a/Pixel 3a XL

Once the patching process finishes, the Magisk Patched Boot Image for your Pixel 3a/3a XL will be stored in [internal storage]/Download. Simply connect your phone to the PC and transfer the patched boot image (magisk_patched.img) file over.
Step 3: Flash the Patched Boot Image to Root Google Pixel 3a/Pixel 3a XL

Now that you have the Magisk Patched Boot Image, you can flash it using fastboot to root your Google Pixel 3a/Pixel 3a XL. Just follow the instructions below:

    Copy the patched boot image to the folder where the Android SDK platform-tools are installed (e.g. C:\adb).
    Hold the SHIFT key and right-click on an empty space inside this folder.
    Select ‘Open PowerShell window here’ to launch the PowerShell on your PC.
    Root Google Pixel 3a/Pixel 3a XL - Open PowerShell window here
    Power off your Google Pixel 3a/Pixel 3a XL completely.
    Boot your phone into Bootloader Mode by pressing and holding the Volume Down and Power buttons together.
    Once the phone is in Bootloader Mode, connect it to the PC via the USB cable.
    Enter the following command in the PowerShell window to ensure that your phone is successfully being detected by fastboot:

    fastboot devices

    The command should return a device ID. If it doesn’t, ensure that you have installed the appropriate USB drivers on your PC.
    Now, enter the command below to flash the Magisk Patched Boot Image and root your Google Pixel 3a/Pixel 3a XL:

    fastboot flash boot magisk_patched.img

    Flash Magisk Patched Boot Image to Root Google Pixel 3a/Pixel 3a XL
    Once flashed, reboot your phone using:

    fastboot reboot

Your Pixel 3a/Pixel 3a XL should now be rooted with Magisk. Once your phone boots into the OS, you should see ‘Magisk Manager’ in the app drawer.

Friday, 30 September 2022

the root filesystem requires a manual fsck

 

From there, you should be able to drop to some maintenance shell (if not already opened), where you may run fsck -yf /dev/sda1.

If there are any errors rerun fsck -yf /dev/sda1

To login as usual simply run exit and proceed normally.