Where does the original boot.img for magisk restore needs to be put

Search This thread

Benjamin_L

Senior Member
Nov 30, 2010
2,612
922
I put the boot.img to the MagiskManager folder but this does not work. What do I need to do? I read something about gzipping but I'd be grateful for instructions
 

ckpv5

Inactive Recognized Contributor
Feb 11, 2008
14,357
18,302
Kuala Lumpur
AFAIK you don't have to put stock boot.img anywhere as Magisk should have a backup of the stock boot at \root\data

You just need to select uninstall - restore images in Magisk Manager to restore stock boot.img
 

Attachments

  • Screenshot_20180922-132205.png
    Screenshot_20180922-132205.png
    175.1 KB · Views: 4,690

Benjamin_L

Senior Member
Nov 30, 2010
2,612
922
AFAIK you don't have to put stock boot.img anywhere as Magisk should have a backup of the stock boot at \root\data

You just need to select uninstall - restore images in Magisk Manager to restore stock boot.img

Oh I forgot to say I used your images and fastboot but fastboot doesn't work currently for me so i tried to use the normal method.

Edit: Now i tried complete removal and now I am stuck on recovery screen with "no command". Fastboot is always reporting requested size more than allowed...
 
Last edited:

ckpv5

Inactive Recognized Contributor
Feb 11, 2008
14,357
18,302
Kuala Lumpur
Don't you have the magisk backup stock boot at that location ?
Just check my current 9.6.13.0 (as example), both stock boot.img & magisk backup are same.

No idea how to fix your fastboot issue.

Edit: Now i tried complete removal and now I am stuck on recovery screen with "no command". Fastboot is always reporting requested size more than allowed...
Shouldn't try that before restore images is done.
Sorry.. no idea how to fix it without fastboot.
 

Attachments

  • 0_Screenshot_20180922-133600.jpg
    0_Screenshot_20180922-133600.jpg
    58.1 KB · Views: 2,590
  • 0_Screenshot_20180922-133626.jpg
    0_Screenshot_20180922-133626.jpg
    60.4 KB · Views: 2,568
Last edited:
  • Like
Reactions: Benjamin_L

Benjamin_L

Senior Member
Nov 30, 2010
2,612
922
Don't you have the magisk backup stock boot at that location ?
Just check my current 9.6.13.0 (as example), both stock boot.img & magisk backup are same.

No idea how to fix your fastboot issue.


Shouldn't try that before restore images is done.
Sorry.. no idea how to fix it without fastboot.
Fixed it with another laptop. Thank you for the time
 
  • Like
Reactions: ckpv5

JDKerados

New member
Mar 3, 2020
1
1
How did you fix it ?

FIX IT:
1 - Create a gzip archive named: stock_image_0.img.gz
2 - Put the file in your "/data" folder.
3 - GoTo "/root/sbin/.magisk" folder (is an hidden folder so you need to enable hidden files)
3 - Open file "config" and edit SHA1 string to "0". Usually that string is a SHA1 of the img file but i used "_0" so my SHA1 must be equal to "0".
4 - Now you are able to restore your stock boot image and you can do all other stuff to install your OTA Updates.
 
  • Like
Reactions: amplatfus

rophiroth

Senior Member
Dec 11, 2010
504
32
Is this info updated? im on android 12 magisk 24.7 and couldnt find those file and folders root and hidden acivated
 

b_fizzle

Senior Member
Feb 22, 2010
188
11
FIX IT:
1 - Create a gzip archive named: stock_image_0.img.gz
2 - Put the file in your "/data" folder.
3 - GoTo "/root/sbin/.magisk" folder (is an hidden folder so you need to enable hidden files)
3 - Open file "config" and edit SHA1 string to "0". Usually that string is a SHA1 of the img file but i used "_0" so my SHA1 must be equal to "0".
4 - Now you are able to restore your stock boot image and you can do all other stuff to install your OTA Updates.

I needed to change that to /data/stock_boot_${SHA1}.img.gz ("boot" instead of "image") as found in Magisk sources.

Other than that it worked like a charm, thanks!

Is this info updated? im on android 12 magisk 24.7 and couldnt find those file and folders root and hidden acivated


I'm in the same boat - I read that Magisk was supposed to autocreate a backup, if it did; it doesn't know where it went and I've tried a number of places (boot.img and gz zipped) and still nothing.

Android 12, Magisk 25.1

Thanks for any help!
 

b_fizzle

Senior Member
Feb 22, 2010
188
11
I found this website:

I will post the edits I had to make below, but for the original, see the website.

** Load up Command Prompt on Windows**
# put stock boot.img into /sdcard/boot.img

# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 2)

# repack boot.img.gz
gzip -9f /sdcard/boot.img

# restore backup
mkdir /data/magisk_backup_${SHA1}
mv /sdcard/boot.img.gz /data/magisk_backup_${SHA1}/boot.img.gz
chmod -R 755 /data/magisk_backup_${SHA1}
chown -R root.root /data/magisk_backup_${SHA1}

I was able to follow the guide to update from there, though to be fair, it's still "optimizing". Crossing my fingers.
 
  • Like
Reactions: Phantom Thief

ZerkerEOD

Senior Member
Aug 1, 2009
146
13
OnePlus 8 Pro
Nothing Phone 1
I found this website:

I will post the edits I had to make below, but for the original, see the website.

** Load up Command Prompt on Windows**
# put stock boot.img into /sdcard/boot.img

# get sha1
adb shell
su
SHA1=$(cat $(magisk --path)/.magisk/config | grep SHA1 | cut -d '=' -f 2)

# repack boot.img.gz
gzip -9f /sdcard/boot.img

# restore backup
mkdir /data/magisk_backup_${SHA1}
mv /sdcard/boot.img.gz /data/magisk_backup_${SHA1}/boot.img.gz
chmod -R 755 /data/magisk_backup_${SHA1}
chown -R root.root /data/magisk_backup_${SHA1}

I was able to follow the guide to update from there, though to be fair, it's still "optimizing". Crossing my fingers.
This wanted me today on the Nothing Phone 1. Thanks so much!
 

v.konvict

Senior Member
Dec 1, 2012
1,669
929
Mwanza
1.Create a gzip archive named: stock_image_0.img.gz
Guys how are you making this gzip.what application are you using or is just renaming the boot.img file to that.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    AFAIK you don't have to put stock boot.img anywhere as Magisk should have a backup of the stock boot at \root\data

    You just need to select uninstall - restore images in Magisk Manager to restore stock boot.img
    1
    Don't you have the magisk backup stock boot at that location ?
    Just check my current 9.6.13.0 (as example), both stock boot.img & magisk backup are same.

    No idea how to fix your fastboot issue.

    Edit: Now i tried complete removal and now I am stuck on recovery screen with "no command". Fastboot is always reporting requested size more than allowed...
    Shouldn't try that before restore images is done.
    Sorry.. no idea how to fix it without fastboot.
    1
    Don't you have the magisk backup stock boot at that location ?
    Just check my current 9.6.13.0 (as example), both stock boot.img & magisk backup are same.

    No idea how to fix your fastboot issue.


    Shouldn't try that before restore images is done.
    Sorry.. no idea how to fix it without fastboot.
    Fixed it with another laptop. Thank you for the time
    1
    How did you fix it ?

    FIX IT:
    1 - Create a gzip archive named: stock_image_0.img.gz
    2 - Put the file in your "/data" folder.
    3 - GoTo "/root/sbin/.magisk" folder (is an hidden folder so you need to enable hidden files)
    3 - Open file "config" and edit SHA1 string to "0". Usually that string is a SHA1 of the img file but i used "_0" so my SHA1 must be equal to "0".
    4 - Now you are able to restore your stock boot image and you can do all other stuff to install your OTA Updates.
    1
    FIX IT:
    1 - Create a gzip archive named: stock_image_0.img.gz

    I needed to change that to /data/stock_boot_${SHA1}.img.gz ("boot" instead of "image") as found in Magisk sources.

    Other than that it worked like a charm, thanks!