Installing Magisk Via ADB

Search This thread

IceGordol

Member
Jul 27, 2017
38
15
I have a Xperia z2 D6503 and I want to install magisk without modifying the recovery for one single reason: when I modify the recovery, the safety net will fail.
So I decided to follow this thread to create a new boot image to flash in fastboot: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
After making another post here I managed to pull the stock boot.img that I needed.
Now, the problem comes. I follow the instructions as intended and they work untill I get to " adb pull /data/local/tmp/magisk_inject/new-boot.img "
For some reason the adb didn't generate new-boot.img
Even stranger, the previous command didn't seem to complete nicely. ( " adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox" ")

"
- Unpacking boot image
MagiskBoot v13.6(1360) (by topjohnwu) - Boot Image Modification Tool

Parsing boot image: [/data/local/tmp/boot.img]

! Sony ELF32 format detected
! Please use BootBridge from @AdrianDC to flash Magisk
"

So I decided to look into BootBridge hoping that it would show me how to merge these two methods together.
I got to the BootBridge forum: https://forum.xda-developers.com/crossdevice-dev/sony/mod-boot-bridge-sony-elf-t3506883
But it only taught me how to do it via recovery.

The question comes:
Is there a way for me to combine these two methods?
What am I doing wrong?
Is there something I could do to figure this out?

I included a photo of my folder and this is the pastebin with everything I had in the console: https://pastebin.com/LUG067jc
S5Qf04a.png
 

Deic

Senior Member
Feb 4, 2012
540
984
Madrid
www.xiaomiadictos.com
I have a Xperia z2 D6503 and I want to install magisk without modifying the recovery for one single reason: when I modify the recovery, the safety net will fail.
So I decided to follow this thread to create a new boot image to flash in fastboot: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
After making another post here I managed to pull the stock boot.img that I needed.
Now, the problem comes. I follow the instructions as intended and they work untill I get to " adb pull /data/local/tmp/magisk_inject/new-boot.img "
For some reason the adb didn't generate new-boot.img
Even stranger, the previous command didn't seem to complete nicely. ( " adb shell "cd /data/local/tmp/magisk_inject; mv ../common/* .; chmod 755 *; sh ../update-binary indep boot_patch.sh ../boot.img; mv ../bin/busybox busybox" ")

"
- Unpacking boot image
MagiskBoot v13.6(1360) (by topjohnwu) - Boot Image Modification Tool

Parsing boot image: [/data/local/tmp/boot.img]

! Sony ELF32 format detected
! Please use BootBridge from @AdrianDC to flash Magisk
"

So I decided to look into BootBridge hoping that it would show me how to merge these two methods together.
I got to the BootBridge forum: https://forum.xda-developers.com/crossdevice-dev/sony/mod-boot-bridge-sony-elf-t3506883
But it only taught me how to do it via recovery.

The question comes:
Is there a way for me to combine these two methods?
What am I doing wrong?
Is there something I could do to figure this out?

I included a photo of my folder and this is the pastebin with everything I had in the console: https://pastebin.com/LUG067jc
S5Qf04a.png

Take the new-boot.img and install with the BootBridge stuff from recovery.
 
Last edited:

IceGordol

Member
Jul 27, 2017
38
15


Take the new-boot.img and install with the BootBridge stuff from recovery.

Firstly, it does not generate a new-boot.img.

C:\Users\Gordol\Desktop\Magisk>adb pull /data/local/tmp/magisk_inject/new-boot.img
adb: error: remote object '/data/local/tmp/magisk_inject/new-boot.img' does not exist

Secondly, I do not want to install a custom recovery since it will mess with the safety net.
 

pbanj

Senior Member
Dec 22, 2011
993
459
Firstly, it does not generate a new-boot.img.

C:\Users\Gordol\Desktop\Magisk>adb pull /data/local/tmp/magisk_inject/new-boot.img
adb: error: remote object '/data/local/tmp/magisk_inject/new-boot.img' does not exist

Secondly, I do not want to install a custom recovery since it will mess with the safety net.


I assume you have fast boot access? If yes you can just boot the custom recovery without installing it. Use the command 'fastboot boot recovery.img' it will let you boot into the custom recovery without flashing it.
 
  • Like
Reactions: Didgeridoohan

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Firstly, it does not generate a new-boot.img.

    C:\Users\Gordol\Desktop\Magisk>adb pull /data/local/tmp/magisk_inject/new-boot.img
    adb: error: remote object '/data/local/tmp/magisk_inject/new-boot.img' does not exist

    Secondly, I do not want to install a custom recovery since it will mess with the safety net.


    I assume you have fast boot access? If yes you can just boot the custom recovery without installing it. Use the command 'fastboot boot recovery.img' it will let you boot into the custom recovery without flashing it.