Howto - Root your bramble with Magisk

Voodoojonny

Senior Member
Dec 17, 2015
789
325
83
Dortmund
Hi everyone,

I just got my bramble today. And yes, the first thing I did, was unlocking the bootloader and rooting it.
Here I tell you how I did it.

You need a ADB/Fastboot suite installed and this rooted kernel.

Section 1: Unlocking your Bootloader Unlocking your Bootloader will erase all your data - so best case is a brandnew and clean bramble...:
1. Go to settings - "About phone" and tip 6 times on "Build number" until you see "congratulations, you are a developer"
2. Go to settings - "System", tip on "Advanced" and then on "Developer options". Now you can see "OEM unlocking". Enable it (yes it warns you about security and stuff... It´s your choice - I did it :D).
3. Install Adb and Fastboot suite and scroll to the adb-folder inside your windows explorer and when you are there, copy the rooted boot.img to your adb-folder (you need that for section 2).
4. Right click + shift on the white background of your adb-folder "open power shell window here"
5. Reboot your bramble holding vol- and you will enter the fastboot screen. Connect your bramble to your pc and type in your power shell window the following code:
Code:
./fastboot flashing unlock
and hit enter
6. Your bramble will warn you that unlocking your bootloader is insecure! And one really important thing again: This will format all your data
7. Use the vol-/vol+ keys to accept and violla, you unlocked your Bootloader!

Section 2: flashing the patched boot.img
1. Luckily you already copied the rooted boot.img to your adb folder and you are still in your power shell window. That gives you everything for 2.
2. type the following in your power shell window:
Code:
./fastboot flash boot boot.img
3. hit enter and
4. reboot to system (yes it has to be setup again since your data got wipede) and install Magisk manager after setting up your system

Congrats, your system is now rooted with Magisk!
 
Last edited:

bkdodger

Senior Member
Jan 30, 2011
1,452
735
143
Hey now ..thanks for posting .

I'm bootloader unlocked but when I run command to root ./fastboot flash boot boot.img.img

I get no such file or directory although I have it in my adb folder

If I take the last .img out I get okay PXL_20201120_001552819.jpg
 

lmt1979

Senior Member
Feb 23, 2010
105
40
58
Havelock
Hey now ..thanks for posting .

I'm bootloader unlocked but when I run command to root ./fastboot flash boot boot.img.img

I get no such file or directory although I have it in my adb folder

If I take the last .img out I get okay View attachment 5138473
He's got a case of the "didn't enable show file extensions" in windows. I downloaded my own system image and then patched the boot.img with magisk manager. I hate for you to have to piece it together, but I got my phone yesterday and worked through these things. Check it out here:
https://forum.xda-developers.com/pixel-4a-5g/help/magisk-boot-img-patching-flashing-t4191955
 

[Jan]

Member
May 21, 2019
9
9
3
Hof
Hey there,

after following your instructions Magisk Manager does not seem to detect Magisk (see Attachment). Can anyone help me figure out what am i missing?

Here's my consoleoutput:

Code:
$fastboot flashing unlock

OKAY [  0.290s]
Finished. Total time: 0.291s
-------------------------------

$fastboot flash boot ./boot.img

Sending 'boot_b' (98304 KB)                        OKAY [  2.850s]
Writing 'boot_b'                                   OKAY [  0.310s]
Finished. Total time: 3.520s
-------------------------------
Also: will there be a way to hide the 'device-is-unlocked-warning' on boot?

Thank you!
 

Attachments

Voodoojonny

Senior Member
Dec 17, 2015
789
325
83
Dortmund
Hey there,

after following your instructions Magisk Manager does not seem to detect Magisk (see Attachment). Can anyone help me figure out what am i missing?

Here's my consoleoutput:

Code:
$fastboot flashing unlock

OKAY [  0.290s]
Finished. Total time: 0.291s
-------------------------------

$fastboot flash boot ./boot.img

Sending 'boot_b' (98304 KB)                        OKAY [  2.850s]
Writing 'boot_b'                                   OKAY [  0.310s]
Finished. Total time: 3.520s
-------------------------------
Also: will there be a way to hide the 'device-is-unlocked-warning' on boot?

Thank you!
That´s really strange! I have exactly the same console output... And it works for me.
Might it be possilbe that you use another rom build? I used the November -b build.
Maybe you can first update to the last os and then retry flashing my boot.img.

About BL-Warning. I have the same... And I dont´t know how to remove it. We would need to manipulate the bl, what I would not do...! Just ignore it!
 

Simma

Member
Jul 30, 2010
11
1
23
;83961089']

That´s really strange! I have exactly the same console output... And it works for me.
Might it be possilbe that you use another rom build? I used the November -b build.
Maybe you can first update to the last os and then retry flashing my boot.img.
For me, it also didn't work with your pre-patched boot.img (also on latest November update). Had to download the factory image and patch it myself to make it work.
 

[Jan]

Member
May 21, 2019
9
9
3
Hof
That´s really strange! I have exactly the same console output... And it works for me.
Might it be possilbe that you use another rom build? I used the November -b build.
Maybe you can first update to the last os and then retry flashing my boot.img.

About BL-Warning. I have the same... And I dont´t know how to remove it. We would need to manipulate the bl, what I would not do...! Just ignore it!
Hm.. actually been on the latest available build. Can you confirm this boot.img is working for build-id *.003.B1? (Also appended file-checksum, even though I doubt the file is damaged).

Code:
$shasum -a 256 ./boot.img                                

50fc81f5f59def3f366fcddd7976cbcbdc406172685c3e8a6cc24968d55c5964  ./boot.img
-------------------------------

$adb shell getprop | grep "ro.build.date\|ro.build.date\|ro.build.id\|ro.build.tags\|ro.build.product\|ro.build.version"        

[ro.build.date]: [Tue Oct  6 11:12:31 UTC 2020]
[ro.build.date.utc]: [1601982751]
[ro.build.id]: [RD1A.201105.003.B1]
[ro.build.product]: [bramble]
[ro.build.tags]: [release-keys]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [6886588]
[ro.build.version.min_supported_target_sdk]: [23]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.preview_sdk_fingerprint]: [REL]
[ro.build.version.release]: [11]
[ro.build.version.release_or_codename]: [11]
[ro.build.version.sdk]: [30]
[ro.build.version.security_patch]: [2020-11-05]
-------------------------------
For me, it also didn't work with your pre-patched boot.img (also on latest November update). Had to download the factory image and patch it myself to make it work.
Thanks, will try this as well!

UPDATE: Got it successfully rooted by patching the factory image.
 
Last edited:

bkdodger

Senior Member
Jan 30, 2011
1,452
735
143
Hm.. actually been on the latest available build. Can you confirm this boot.img is working for build-id *.003.B1? (Also appended file-checksum, even though I doubt the file is damaged).

Code:
$shasum -a 256 ./boot.img                                

50fc81f5f59def3f366fcddd7976cbcbdc406172685c3e8a6cc24968d55c5964  ./boot.img
-------------------------------

$adb shell getprop | grep "ro.build.date\|ro.build.date\|ro.build.id\|ro.build.tags\|ro.build.product\|ro.build.version"        

[ro.build.date]: [Tue Oct  6 11:12:31 UTC 2020]
[ro.build.date.utc]: [1601982751]
[ro.build.id]: [RD1A.201105.003.B1]
[ro.build.product]: [bramble]
[ro.build.tags]: [release-keys]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [6886588]
[ro.build.version.min_supported_target_sdk]: [23]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.preview_sdk_fingerprint]: [REL]
[ro.build.version.release]: [11]
[ro.build.version.release_or_codename]: [11]
[ro.build.version.sdk]: [30]
[ro.build.version.security_patch]: [2020-11-05]
-------------------------------


Thanks, will try this as well!

UPDATE: Got it successfully rooted by patching the factory image.
I don't know what I'm doing wrong I can't patch it .. unsuccessful..ughhh
 

[Jan]

Member
May 21, 2019
9
9
3
Hof
I don't know what I'm doing wrong I can't patch it .. unsuccessful..ughhh
My advice would be:
- ensure you got the factory image from developer.google.com corresponding to your buildnumber
- ensure you are using canary magisk manager (which is the only version as of today supporting redfin and bramble)
 

bkdodger

Senior Member
Jan 30, 2011
1,452
735
143
My advice would be:

- ensure you got the factory image from developer.google.com corresponding to your buildnumber

- ensure you are using canary magisk manager (which is the only version as of today supporting redfin and bramble)
I check the build is latest ...my Magisk is below Screenshot_20201120-154336.jpg
 

bkdodger

Senior Member
Jan 30, 2011
1,452
735
143
Magisk version fits.

What about the boot.img file? It should be originated from path '*/bramble-{buildnumber}-factory-{sha}.zip/bramble-{buildnumber}/image-bramble-{buildnumber}.zip/boot.img'.
Oh maybe I'm doing this part wrong ? I moved over the top file PXL_20201120_225248629.jpg
 

WhiteAsIce

Senior Member
Dec 1, 2010
74
3
0
I'm trying to install Magisk, but I need a custom recovery. I can't figure out how to install one. TWRP app keeps force-closing when I try to install it, and there's no Pixel 4a 5G listed in devices in the TWRP website. I also can't find anything from ClockworkMod.
 

Voodoojonny

Senior Member
Dec 17, 2015
789
325
83
Dortmund
Hey, there ist no custom recovery available yet, becouse this phone is brandnew! There will be TWRP and other recoveries in the future, until then, we need to be creative. One way is extracting and patching the boot.img and reflash it via fastboot. How to do that is described in OP!
 

lmt1979

Senior Member
Feb 23, 2010
105
40
58
Havelock
I got Magisk working. However, I cannot pass safetynet. I tried the props workaround mentioned in the 4a guide, but it still does not work.
Have you tried hiding the apps in Magisk? Do you want safetynet for a specific app that won't launch/complains about being rooted? Try MagiskHide in Magisk Manager if you haven't. Exclude those apps to hide root from them.