[GUIDE] Enable Camera2 API, EIS on stock Android Pie (temporary rooting) - Xiaomi Mi A1 Guides, News, & Discussion

this method worked for me, so i live it here
standart method didn't worked for me on pie, so i combined it with this method
You will need to download TWRP and Magisk Manager, Magisk
implied that you have installed ADB and Driver
Unlocking bootloader:
Developer Option
Go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.
Settings -> Developer Option and Enable OEM Unlock and USB Debugging.
Reboot to fastboot
Code:
adb reboot bootloader
Unlocking bootloader
Code:
fastboot oem unlock
device wil reboot and wipe. after setup repeat step 1-2
Rooting
Booting Recovery
this will boot twrp. be patient this is not instantly
Code:
fastboot boot twrp.img
Copy Magisk.zip to device
Code:
adb push Magisk-v18.0.zip /sdcard
output will be something like that
Code:
Magisk-v18.0.zip: 1 file pushed. 20.0 MB/s (4188255 bytes in 0.200s)
Flash Magisk
go to Install -> Select Magisk-v18.0.zip
Rebooting
Code:
adb reboot
Enabling Camera2 API
After device boot
Install Magisk Manager.apk
Code:
adb shell
Code:
su
Confirm superuser rights on device
Code:
setprop persist.camera.HAL3.enabled 1
Code:
setprop persist.vendor.camera.HAL3.enabled 1
Code:
setprop persist.camera.stats.test 5
Code:
setprop persist.vendor.camera.stats.test 5
Code:
setprop persist.camera.eis.enable 1
Code:
exit
Code:
exit
reboot device and check if all ok -> run Camera2 probe and check results
Model:Mi A1
Manufacturer:Xiaomi
Build:9
SDK:28
SupportLevel:3
SupportLevel HR:Level_3
Manual exposure:1
Auto exposure:1
Auto exposure, always flash:1
Auto exposure, auto flash:1
Auto exposure, auto flash redeye:1
AF Lock:1
Manual focus:1
Auto focus:1
Auto focus macro:1
Auto focus continuous picture:1
Auto focus continuous video:1
Auto focus EDOF:0
Whitebalance off:1
Automatic whitebalance:1
WB: cloudy day:1
WB: day:1
WB: fluorescent:1
WB: incandescent:1
WB: shade:1
WB: twilight:1
WB: warm fluorescent:1
AWB Lock:1
RawCapture:1
Unroot device
Run Magisk Manager and press Uninstall -> Complete Uninstall
Lock bootloader
Code:
adb reboot bootloader
Hold volume buttom -
it is very important to avoid wipe
Code:
fastboot oem lock
divice will reboot to bootloader
Code:
fastboot reboot
I intentionally missed obvious steps such as renaming files twrp.img or magisk.zip and installing adb and drivers

Thanks, I can confirm it works. Will this method actually preserve OTA updates?

giobooo said:
Thanks, I can confirm it works. Will this method actually preserve OTA updates?
Click to expand...
Click to collapse
It should be, oem stays locked

Which GCam mod do you suggest with pie? haven't tried yet, but I see there's an autofocus bug....

this method works fine for one of my mi A1. Gcam works good but I can't lock phone. After putting the command fastboot oem lock and reboot phone doesn't reboot fully. It starts and even first white screen flash but then screen turns black and phone doesn't response at all. I can still send comand unlock and than it is rebooting without wiping data so Gcam works but it remains unlocked.
With second phone I'm stuck in the recovery. After booting to twrp touch seems to be not working well or it doesn't work at all. Phone doesn't response, I can back to fastboot and repeat run recovery but it is the same again and again
Any advice?
Sent from my Mi A1 using Tapatalk

arc4d14n said:
Which GCam mod do you suggest with pie? haven't tried yet, but I see there's an autofocus bug....
Click to expand...
Click to collapse
I am using Arnova's GoogleCamera_6.1.021.220943556.apk in 16:9, autofocus works until you touch viewfinder after that motion focus is activating and camera not focusing correctly.

There is a simpler method:
-Unlock bootloader (with vol- trick if you want to preserve data)
-boot Pie's patched_boot
-install Magisk Manager
-with a terminal emulator (after granting root access from Magisk Manager) type "setprop persist.camera.HAL3.enabled 1" without quotes and uppercase HAL
-Only if you want to you can relock bootloader (with vol- trick if you want to preserve data)
Enjoy

sipollo said:
There is a simpler method:
-Unlock bootloader (with vol- trick if you want to preserve data)
-boot Pie's patched_boot
-install Magisk Manager
-with a terminal emulator (after granting root access from Magisk Manager) type "setprop persist.camera.HAL3.enabled 1" without quotes and uppercase HAL
-Only if you want to you can relock bootloader (with vol- trick if you want to preserve data)
Enjoy
Click to expand...
Click to collapse
Could you elaborate? How/where do you get pie's patched boot? How do you boot it?
Thanks.
Inviato dal mio Mi A1 utilizzando Tapatalk

Does unlocking/relocking of bootloader and booting to twrp still wipes data?

raiden_1115 said:
Does unlocking/relocking of bootloader and booting to twrp still wipes data?
Click to expand...
Click to collapse
Yes, unlocking bootloader wipes data. Locking should wipe data, but trick with volume- key helps to avoid it

shaman_ said:
Yes, unlocking bootloader wipes data. Locking should wipe data, but trick with volume- key helps to avoid it
Click to expand...
Click to collapse
What about booting to twrp?

raiden_1115 said:
What about booting to twrp?
Click to expand...
Click to collapse
it doesn't wipe data. only locking/unlocking oem

sipollo said:
There is a simpler method:
-Unlock bootloader (with vol- trick if you want to preserve data)
-boot Pie's patched_boot
-install Magisk Manager
-with a terminal emulator (after granting root access from Magisk Manager) type "setprop persist.camera.HAL3.enabled 1" without quotes and uppercase HAL
-Only if you want to you can relock bootloader (with vol- trick if you want to preserve data)
Enjoy
Click to expand...
Click to collapse
Does this also enable EIS?

manpildo said:
Does this also enable EIS?
Click to expand...
Click to collapse
Yes, but if you want to be 100% sure you can type "setprop persist.camera.eis.enable 1" after the first command.

need help
After doing this step "Run Magisk Manager and press Uninstall -> Complete Uninstall" my device restart and stuck on screen with logo Android doll die. So I can't move to next step for lock bootloader. What must I do to fix this, thx and sorry for bad English.

raiden_1115 said:
What about booting to twrp?
Click to expand...
Click to collapse
The first time you boot to twrp after "vol- trick" phone will be formatted. At least in Oreo 8.1 I don't know if it's true after Pie update.

Works!!
I can confirm that the method actually works. Device-Mi A1 Stock,9.0 Pie December 5 patch. Screenshots are below.

@shaman_
Please Can you make a video of the process and share that...
I did not understand the process

Eshwar123 said:
@shaman_
Please Can you make a video of the process and share that...
I did not understand the process
Click to expand...
Click to collapse
not sure what will happen but I'll try

sipollo said:
The first time you boot to twrp after "vol- trick" phone will be formatted. At least in Oreo 8.1 I don't know if it's true after Pie update.
Click to expand...
Click to collapse
wiping data doesn't related to booting twrp. it is related to oem lock/unlock

Related

Cubot King Kong custom ROM or Android go?

Hi everyone,
First post here. I purchased a Cubot Kingkong. I liked the toughness and the price. Has Android Nougat, 2gb of Ram, 16gb ROM, MT 6580 quad core processor.
What I don't like is that it's slow, in my opinion. I tried to find a custom ROM, but couldn't find one.
Do you a custom ROM that can work? Thought about Android go, but it would need to be updated to Oreo first.
Thanks for your help.
Slow? I have this phone and I find it very reasonably snappy for its specs. The MT6580 is a 2016 entry-level processor. Not any great performer and no firmware will do miracles.
Besides, its Nougat Android is 100% bloat-free (a good surprise I must say). And the 2 Gb of RAM are enough to run it correctly. Don't think Android One would make much of a change here.
Your expectations might be too high for a sub-100€ phone.
does anyone have a scatter file or custom recovery for this phone? how did you root?
CUBOT KING KONG B-1 (X511) Android 7.0 quick TWRP + rooting guide
WARNING: You do a factory reset! all data lost! unlocking - warranty lost!
edit: With locked bootloader, you can not flash from fastboot. BUT - Yippee! - SP Flash Tool is able to flash twrp.img for encrypted device with locked bootloader (and FRP / OEM lock!) without data loss. TWRP is then able to decrypt data with default_password. Before you unlock bootloader, flash TWRP, Back up your /data from TWRP and manually copy Internal Storage (/data/media/0) via USB-MTP (not included in TWRP Backup). Backup is not described in this Tutorial, but feel free to ask
- first you need adb and fastboot, in Windows represented as adb.exe and fastboot.exe which run in command line terminal (cmd.exe) - (for adb and fastboot Windows XP click here)
- install MediaTek MT65xx USB VCOM Preloader USB Drivers for Windows
- this phone is locked. to unlock the bootloader, enable usb-debugging:
Settings -> About Phone -> tap Build number seven (7) times
Settings -> Developer options -> OEM unlocking -> Turn on
Settings -> Developer options -> USB debugging -> Ok
WARNING: You do a factory reset! all data lost!
- connect the phone to pc and type in command console:
- confirm with Yes (Volume UP)
Code:
adb reboot bootloader
fastboot oem unlock
Phone is now in Orange State - warranty lost!
(if you wanna get rid of the waiting time flash the 'Orange State disabler' see below)
- reboot the phone:
Code:
fastboot reboot
i have created a scatter file using this very cool program WwR MTK v2.30 from Ilya Aleksandrovich
then i have ported this TWRP v3.2.2-0 from S. M. Nahid Emon Generic TWRP v3.3.1-0 from Samad Segmane meanwhile
- on Phone, download SR3-SuperSU-v2.79-SR3-20170114223742.zip flashable zip
- on PC, download the scatter file and the twrp-3-3-1-0-recovery from this thread
flash recovery with MediaTek SP Flash Tool
- in SP Flash Tool, go to Download and select the following files:
Download-Agent: MTK_AllInOne_DA.bin
Scatter-loading File: MT6580_cubot_king_kong_7081c_scatter.txt
Flash Mode: Download Only
- uncheck all checkboxes
- double click on recovery.img and select twrp.img
- press Download
- type in command console:
Code:
adb reboot bootloader
(flashing starts as soon as phone is connected in download mode)
- after successfully flashing, press and hold Volume UP, disconnect the phone, connect again, wait until you see the Orange State message appears, then release the Volume UP Button
- you can start TWRP each time from command console:
Code:
adb reboot recovery
edit: Fixed! unfortunately, when flashed and booted from recovery, touch screen is not working unless someone will fix the kernel (Patryk did with IDA Pro but this tutorial drives me crazy) - at moment you can only boot as boot.img
- boot into TWRP recovery from fastboot without flashing recovery (working touch screen)
Code:
adb reboot bootloader
fastboot boot "C:\Download\twrp.img"
<-- see here
- from TWRP you can now install SuperSU.zip flashable zip
- if you want install Busybox binary, download Busybox-1.29.0-YDS-UNIVERSAL.zip from github and install this flashable zip from TWRP
- if you don't like SuperSU better use Magisk i have tested successfully too, it is easy to install, no TWRP required. MediaTek SP Flash Tool has a readback mode where you can make a backup of boot.img and copy to phone (or use the one attached). Then, all you have to do is install the Magisk Manager apk and patch the boot image, then flash the patched_boot.img and you are rooted
- this phone is encrypted by default - disable encryption may increase performance
WARNING: You do a factory reset! all data lost!
first install adb and fastboot, connect the phone and unlock the bootloader,
then follow instructions for disable encryption (do everything in TWRP):
- on Phone, download Disable Force Encrypt zip and SuperSU zip files
- boot into TWRP recovery from fastboot without flashing recovery (see above)
- copy Disable Force Encrypt zip to cache partition
Advanced -> File Manager
navigate to /data/media/0/Download
select file Disable_Dm-Verity_ForceEncrypt_v1.4.zip
press Copy File
navigate to /cache
confirm blue check mark on the right bottom
Swipe to Confirm
- repeat this copy SR3-SuperSU-v2.79-SR3-20170114223742.zip to /cache
go back to main menu
- Wipe -> Format Data -> type yes
if Format Data fails, reboot TWRP and try again:
go back to main menu
- Reboot -> Bootloader
- boot into TWRP recovery from fastboot without flashing recovery (see above)
- Wipe -> Format Data -> type yes
go back to main menu
- flash Disable Force Encrypt zip and SuperSU zip files
Install -> (Up A Level) -> /cache
select file Disable_Dm-Verity_ForceEncrypt_v1.4.zip
uncheck all checkboxes
Swipe to confirm Flash
go back
select file SR3-SuperSU-v2.79-SR3-20170114223742.zip
uncheck all checkboxes
Swipe to confirm Flash
Reboot System
- finish the initial android setup assistant
- enable usb-debugging (see above unlock bootloader)
- boot into TWRP recovery from fastboot without flashing recovery (see above)
- clear cache partition
Wipe -> Advanced Wipe -> Cache -> Swipe to Wipe
instead of SuperSU you can flash Magisk after Disable Force Encrypt. The SuperSU v2.79 is the latest release from Chainfire and it is Pro-Version. Do not update to V2.82 from Coding Code (it is the same version)
- new: 'Orange State' disabler
if you wanna get rid of the waiting time flash the 'Orange State disabler'
WARNING: experts only! do not try this if you don't know how to unbrick your device
- make a backup of lk.bin (bootloader)
- install orange_state_disabler_v0.3.zip from TWRP
- flash lk.bin from SP Flash Tool (in case you bricked your device)
--- 'Orange State' disabler v0.3 ---
##### Created by XopmoH97 : ) #####
source: orange_state_disabler_v0.3.zip
aIecxs said:
Patryk did with IDA Pro but this tutorial drives me crazy
Click to expand...
Click to collapse
Please post here:
Result of:
Code:
echo 0 > /proc/sys/kernel/kptr_restrict
cat /proc/kallsyms | grep tpd_i2c_probe
Dump of:
Code:
cat /proc/kallsyms
Code:
CUBOT_KING_KONG:/ # echo 0 > /proc/sys/kernel/kptr_restrict
CUBOT_KING_KONG:/ # cat /proc/sys/kernel/kptr_restrict
0
CUBOT_KING_KONG:/ # cat /proc/kallsyms | grep tpd_i2c_probe
c07d2970 t tpd_i2c_probe
CUBOT_KING_KONG:/ #
see attachment
https://drive.google.com/file/d/1YmOF9IRJhOEHLFHXgjBcBi74kvKrna0s
What is the kernel architecture? (you can check that in CPU-Z) nevermind
Try this:
twrp-3.2.2.0-cubot_king_kong_7081c-20180831-2340.img (updated)
If it'll not work then this:
twrp-3.2.2.0-cubot_king_kong_7081c-20180831-2356.img
i have tested, both not booting. i think we should just give up. maybe this method does not working for MT6580. i have requested kernel source code from Cubot but they denied
Lannig said:
Besides, its Nougat Android is 100% bloat-free (a good surprise I must say).
Click to expand...
Click to collapse
Cubot King Kong has data mining spy app in OTA updater
https://www.xda-developers.com/report-android-phones-transmit-data-to-adups-a-chinese-firm
dont expect any firmware updates (they wont provide Oreo for sure) - better disable OTA updater instead:
Code:
pm disable --user 0 com.adups.fota
pm disable --user 0 com.adups.fota.sysoper
edit: do not update to V24 battery drain increases dramatically. Just stay at V16
Whats the touch driver here?
1. *#*#3646633#*#*
2. Other extra
3. Device info <-- result
LosTigeros said:
Whats the touch driver here?
1. *#*#3646633#*#*
2. Other extra
3. Device info <-- result
Click to expand...
Click to collapse
the code in dialer did not work, but i could enter Service Mode with MTK Engineering Mode apk. unfortunately there is no device info in Others. is there another way to check, maybe dump some file?
Use an app from google play called Device Info HW
Hey,
thanks for your support and time! I have downloaded this app and this are the results. it shows Touchscreen gt1x (i2c 1-005d)
Will it boot up after just decompressing and compressing it again? Try: twrp-3.2.2.0-cubot_king_kong_7081c-20180902-2017.img (not patched).
Thanks a lot for providing a usable TWRP, even if only one you can boot from fastboot and not flash. It serves its purpose of installing SuperSU or Magisk, good enough for me.
I'm no Android kernel wizard but I fail to see how booting from a flashed partition or in-memory through fastboot makes a difference as far as the touch driver is concerned?
EDIT : wanted to provide the requested information but it's been done already.
In gt1x its because of this:
So get_boot_mode() returns a different value depending on how TWRP was started, from the recovery partition or in-memory from fastboot? and the touchscreen driver basically disables itself in the former case? I've learned something new today, thanks for enlightening us (and I'm impressed by your knowledge of this source code BTW).
EDIT: @aIecxs: unfortunately you're right. Dr. Web has spotted them as the infamous Downloader adware. Guess I'll have to take care of these once I have root.
And what about custom ROMs? Is it possible to build Lineage OS for this device?
I'm thinking of buying one, but if there won't be any OS updates it'll be much worse than I expected.
aIecxs said:
CUBOT KING KONG B-1 (X511) Android 7.0 quick TWRP + rooting guide
- boot into TWRP recovery from fastboot without flashing recovery (working touch screen)
Code:
adb reboot bootloader
fastboot boot "C:\Android\Backup\Cubot King Kong\twrp-3-2-2-0-recovery-for-MT6580_cubot_king_kong_7081c.img"
Click to expand...
Click to collapse
I unlocked the bootloader and tried booting the recovery using this method, but the TWRP logo shows up and the phone is stuck in a bootloop (TWRP logo shows up and disappears over and over again) .
I have tried flashing with SPFlash tool with no results. Every other recovery in this thread simply does not boot at all. What can I do to debug it? I have tried every possible method to root this phone with no success (neither TWRP nor "one click root" apps work). If anyone knows something, please help. I really want to root this phone in order to remove the malware that is preinstalled on it (adups fota). Note that I am not a developer and don't know much about these things beyond flashing custom ROMs. Thank you in advance
please do a read back for boot.img and recovery.img with SP Flash Tool

Android P gestures are hidden in beta 3

I've just finished the setup wizzard, but for a second the navbar changed to the android p gestures one. It would be awesome if people could try to find it with adb so we could enable it, thanks.
Okay someone found a way to enable this, but you can only use the oneplus launcher or it will crash if you swipe up.
To enable it use this command in adb: adb shell settings put secure swipe_up_to_switch_apps_enabled 1
And to disable this do this command: adb shell settings put secure swipe_up_to_switch_apps_enabled 0
i will try to create a magisk module to enable it for people without easy acces to a pc,
Me too ! I think the same as you
yeah I would like to have the option. Does magisk support android p right now?
blanco613 said:
yeah I would like to have the option. Does magisk support android p right now?
Click to expand...
Click to collapse
Magisk 16.6 Works Fine
Same exactly. There must be some sort of way to enable the Android P gesture nav bar.
Other thing is when you freeze the OnePlus Launcher and install Pixel Launcher as system app new recents app is gone.
whe1998 said:
Magisk 16.6 Works Fine
Click to expand...
Click to collapse
I know how to root etc...
With the new seemless root its tricky...So
I am on 5.1.9 rooted with Magisk and No Twrp
How did you root once undated or did you do it through TWRP?
https://www.xda-developers.com/oneplus-6-google-pixel-gestures-android-p/
ArmyGurl2011 said:
I know how to root etc...
With the new seemless root its tricky...So
I am on 5.1.9 rooted with Magisk and No Twrp
How did you root once undated or did you do it through TWRP?
Click to expand...
Click to collapse
Boot to bootloader and fastboot twrp.img, don't reboot flash the twrp.zip and again don't reboot and flash magisk wipe cache and reboot.
Magisk 16.6 DOES NOT work fine...
You will get some error reading your email on gmail or inbox + other strange ****, but it seems to be better with 16.7
JahSam said:
Magisk 16.6 DOES NOT work fine...
You will get some error reading your email on gmail or inbox + other strange ****, but it seems to be better with 16.7
Click to expand...
Click to collapse
16.4 works perfect for me.
How to root OnePlus 6 Android 6 DP 3
Pls suggest me. Thanks
It worked! And You can even swipe in recents to switch between apps. Thanks!
ynsoe1 said:
Pls suggest me. Thanks
Click to expand...
Click to collapse
official twrp
Geoz said:
Boot to bootloader and fastboot twrp.img, don't reboot flash the twrp.zip and again don't reboot and flash magisk wipe cache and reboot.
Click to expand...
Click to collapse
Do a clean install of Android P Beta 3 1st then go through setup menu then follow your instructions...Boot Bootloader flash Twrp.img then no reboot flash Twrp installer. Zip and then flash Magisk 16.7.zip and clear cache reboot
Profit
Correct? ?
mingo_mgx said:
I've just finished the setup wizzard, but for a second the navbar changed to the android p gestures one. It would be awesome if people could try to find it with adb so we could enable it, thanks.
Okay someone found a way to enable this, but you can only use the oneplus launcher or it will crash if you swipe up.
To enable it use this command in adb: adb shell settings put secure swipe_up_to_switch_apps_enabled 1
And to disable this do this command: adb shell settings put secure swipe_up_to_switch_apps_enabled 0
i will try to create a magisk module to enable it for people without easy acces to a pc,
Click to expand...
Click to collapse
Waiting for your magisik module for this
You can use the command line in the "terminal emulator" app to get the gesture as well.
Although I am using Oneplus launcher. Using this google gesture will still let OP launcher FC sometimes.

Root and pixel gestures on your android P dp3

Here is correct way to root your android P developers preview builds for one plus 6 without bricking anything and also enable pixel navigation gestures.
This is video guide for tutorial for easy uder standing
https://youtu.be/fwwZXQ9cn1w
Download :
1) twrp 3.2.1.0 img file(poot it on any folder on computer and rename it to simple twrp. Img) donts use any version except this.
https://dl.twrp.me/enchilada/twrp-3.2.1-0-enchilada.img.html
2)download magisk 16.7 zip and twrp 3.2.1.0 installer zip and olace them on sd card of one plus 6( use only this magisk version)
https://forum.xda-developers.com/ap...systemless-t3473445/post77108384#post77108384
Now boot your phone in fastboot mode using volume up and power long press
Connect phone to computer
No click shift+mouse right click and select open command frompt here vua drop down menu
Then type these commands.
Fastboot devices enter
Fastboot boot twrp.img
Then your phone will boot in twrp in twrp flash twrp installer first then flash magisk 16.7
Then reboot.
2) enabling pixel gestures :
Fisrt enable usb debugging via developers option
Then connect device via cable to computer.
Then type and enter these commands
adb devices
adb shell settings put secure swipe_up_to_switch_apps_enabled 1
Now reboot your phone
Go to button and gestures in setting and enable fixed navigation bar.
Thats it
After the command to enable the gestures my phone keeps telling me ''Oneplus launcher has stopped'' when trying to use it
tristanva said:
After the command to enable the gestures my phone keeps telling me ''Oneplus launcher has stopped'' when trying to use it
Click to expand...
Click to collapse
It it will happen for few sec then it works as normal. Or you can clear data for laungher and see

LineageOS 16.0 appears to be live for the Essential Phone. Anybody try it yet?

I can't speak for the rest of you, but I've been waiting for LineageOS to support this phone since I bought it almost a year ago. I saw a post on /r/LineageOS indicating that mata was finally being supported and sure enough here it is:
https://download.lineageos.org/mata
Since there doesn't appear to be a thread on the topic yet, I figured I'd go ahead and create one so all interested parties can discuss it. I probably won't get around to flashing it myself until this weekend and I'd love to hear how it's working for other people prior to that (and if not, hell I'll flash it and roll the dice).
jaylittle said:
I can't speak for the rest of you, but I've been waiting for LineageOS to support this phone since I bought it almost a year ago. I saw a post on /r/LineageOS indicating that mata was finally being supported and sure enough here it is:
https://download.lineageos.org/mata
Since there doesn't appear to be a thread on the topic yet, I figured I'd go ahead and create one so all interested parties can discuss it. I probably won't get around to flashing it myself until this weekend and I'd love to hear how it's working for other people prior to that (and if not, hell I'll flash it and roll the dice).
Click to expand...
Click to collapse
I did it and so far looks good
jowandrys said:
I did it and so far looks good
Click to expand...
Click to collapse
Can you give us a link to the procedure that you followed in order to flash it?
Thanks !
Djalil87 said:
Can you give us a link to the procedure that you followed in order to flash it?
Thanks !
Click to expand...
Click to collapse
https://wiki.lineageos.org/devices/mata
jowandrys said:
I did it and so far looks good
Click to expand...
Click to collapse
Do you play any games? I'm having issues with touch in games only so far
joha386 said:
https://wiki.lineageos.org/devices/mata
Click to expand...
Click to collapse
I think the installation guide is wrong. To unlock the bootloader, the command "fastboot oem unlock" will not work.
MattCB72 said:
I think the installation guide is wrong. To unlock the bootloader, the command "fastboot oem unlock" will not work.
Click to expand...
Click to collapse
Yes it didn't for me. I used instead:
> fastboot flashing unlock
Not able to install Gapps. Always get Error 70...
dazeone said:
Do you play any games? I'm having issues with touch in games only so far
Click to expand...
Click to collapse
I've specifically noticed touch issues in Pokémon GO. Unable to reproduce the problem reliably, but it seems that after several hours of uptime single-finger touches no longer register (again, only in PoGO -- other apps work flawlessly). Strangely, using 1 finger as an anchor anywhere on the screen, then tapping the intended button with a 2nd finger will register correctly.
Fortunately, I've been able to resolve the intermittent issue with a simple reboot.
Edit: Looks like touch issues in games may have been present back in 15.1.
Steps that I followed to get it up and running
Djalil87 said:
Can you give us a link to the procedure that you followed in order to flash it?
Thanks !
Click to expand...
Click to collapse
Clean install steps, WILL destroy ALL data, make backups!! before performing any of this and as always YMMV
0: (optional) Update firmwares/radios etc. to latest
0.1: Download latest stock package. [URL: https://www.essential.com/developer/current-builds]
0.2: Unzip to a location and modify the install script flashall.sh(*nix)/flashall.bat(win) to remove the reboot line (last line)
0.3: Reboot to bootloader: Keep pressing vol down + power buttons OR adb reboot bootloader via a privileged OS terminal.
0.3: Run the install script with admin privs: sudo ./flashall.sh(*nix) OR (run as admin) flashall.bat(win)
0.4: Reboot bootloader: Keep pressing vol down, select using power button hen you see the option OR fastboot reboot-bootloader
1: Erase userdata: sudo fastboot -w
1.1: (very optional) check slot to make sure we are in slot a (sudo fastboot getvar current-slot), if not then boot to slot a.
2: Install twrp to boot (fastboot flash boot TWRP-SEP.img or latest twrp image) (Note: I use that specific twrp image because the touchscreen works for me YMMV)
3: Boot to twrp using vol up/down buttons and power button to make the selection.
Now we are within TWRP and hopefully touch works, if the touch doesn't work, try to use a different TWRP build or try to use adb shell commands, indicated below (where applicable)
4: Here we wipe and format everything (if no touch then adb shell twrp wipe <system/data>)
4.1: Format data (Any adb shell commands to achieve a similar result?, "adb shell twrp wipe data" maybe)
4.1.1: (optional) format data to f2fs
4.2: Wipe system (adb shell twrp wipe system)
5: We start copying and initial installing ROM files to device, (adb push <file> /sdcard/)
5.1: Copy and install file: Lineageos rom [URL: https://download.lineageos.org/mata]
5.2: Copy and install file: TWRP installer [URL: https://dl.twrp.me/mata/]
6: Reboot to recovery, this should boot back up to twrp (any adb shell command to achieve this?) (Note: This step is needed otherwise gapps installation *may* fail later)
7: Now we copy and install rest of the files to device in order. (adb push <file> /sdcard/) OR (if sideloading: adb sideload <file>)
7.1: Here you get to choose if you don't want google integration (Lucky You!)
7.1.1: (optional) Copy and install file: <nanodroid> if you are interested in going the microg route. [URL: https://nanolx.org/nanolx/nanodroid]
7.1.2: (optional) Copy and install file: <OpenGapps pico> (or whatever you want man). [URL: https://opengapps.org/]
7.2: (optional, needed if disabling forced encryption) Copy and install file: DM verity_forceencrypt zip file (download zip from github and remove .git files and recompress to .zip, making sure the filename is (without quotes): "Disable_Dm-Verity_ForceEncrypt_master" [URL: https://github.com/Zackptg5/Disable_Dm-Verity_ForceEncrypt/archive/master.zip]
7.3: (optional, needed if root is desired or if disabling forced encryption in 7.2) Copy and install file: <Magisk stable> [URL: https://forum.xda-developers.com/apps/magisk]
7.4: (optional, untested, may break OTA) Perform step 5.2 again if you want to maintain TWRP as recovery.
8: Reboot to system.
8.1: (optional) If device is consistently bootlooping (Note: 2-4 interim reboots are normal), then GOTO step 1.
8.2: (optional) If a system app is force closing, try to erase its data and cache first, otherwise GOTO step 1.
profit?? (and/or optionally cry over wasted time in this possibly pointless exercise)
psychic_quark said:
6: Reboot to recovery, this should boot back up to twrp (any adb shell command to achieve this?) (Note: This step is needed otherwise gapps installation *may* fail later)
Click to expand...
Click to collapse
Thanks for this excellent step by step guide. I didn't get touch to work on my TWRP (latest version from TWRP site) so I did use adb shell commands in TWRP but unfortunately I didn't manage to install GApps. I think I'm missing the step 6. you are describing. I have LOS running with root but no GApps.
Any guess on how I can manage to reboot to recovery while I'm in TWRP sideload mode to get back to TWRP again?
Thanks !
Another way to use twrp without touch is by using a mouse. If you have one with a type C connector, plug it in and you can flash LOS and the twrp installer. Then boot back to recovery and flash GAPPS. I had to do it this way but I had an adapter for the type C plug so I could use a regular mouse. The adapter came with my Pixel 2XL.
I kept getting error 70, so I used MindTheGapps, which installed fine. Don't know if there's any adverse effects of doing that though, by my phone seems to be working fine.
Wish there was some way to configure fullscreen on the notch though.
theycallmetony said:
I've specifically noticed touch issues in Pokémon GO. Unable to reproduce the problem reliably, but it seems that after several hours of uptime single-finger touches no longer register (again, only in PoGO -- other apps work flawlessly). Strangely, using 1 finger as an anchor anywhere on the screen, then tapping the intended button with a 2nd finger will register correctly.
Fortunately, I've been able to resolve the intermittent issue with a simple reboot.
Edit: Looks like touch issues in games may have been present back in 15.1.
Click to expand...
Click to collapse
is there a better solution? It no longer registers my touches after several minutes, so I need to reboot my phone to play games every time…Because of the bad optimization of the kernel, before my phone runs smoothly there is some annoying minutes…
And when I try to flash Neutrino Kernel and reboot, all my PH-1 does is stuck in "phone is starting" with a dialog reminding me that there is an internal error with my system, and it never truly enters the launcher… Has anyone tried yet?
Rachel030219 said:
is there a better solution? It no longer registers my touches after several minutes, so I need to reboot my phone to play games every time…
Click to expand...
Click to collapse
Been running the 20190614 nightly for ~13 hours straight without the need to reboot. Pokémon GO is still running smooth!
Edit: Touch problems started again a couple hours after posting this. Fortunately, a reboot still resolves the issue.
Anyone try LineageOS for microg? Keep trying to flash the rom but no dice, just get sent back to twrp.
Hero2457 said:
Anyone try LineageOS for microg? Keep trying to flash the rom but no dice, just get sent back to twrp.
Click to expand...
Click to collapse
Same here, unfortunately. The first time (this was a clean flash after a full wipe), it showed the boot animation for an hour before going back to twrp. I tried flashing it again after another wipe, and this time it stayed in the boot animation overnight, for at least ten hours. I'm not sure where to send a bug report or what info to attach to the bug report.
The regular (non-microG) LOS on the other hand, works fine.
Djalil87 said:
Thanks for this excellent step by step guide. I didn't get touch to work on my TWRP (latest version from TWRP site) so I did use adb shell commands in TWRP but unfortunately I didn't manage to install GApps. I think I'm missing the step 6. you are describing. I have LOS running with root but no GApps.
Any guess on how I can manage to reboot to recovery while I'm in TWRP sideload mode to get back to TWRP again?
Thanks !
Click to expand...
Click to collapse
I was on Q beta 4 and these steps worked for me:
Here's what worked for me:
fastboot flash boot <twrp image from twrp.me>
<boot into recovery>
Touch isn't working, so instead I do: adb shell twrp sideload
adb sideload <lastest lineage rom>
(again) adb shell twrp sideload
adb sideload <twrp installer zip>
adb reboot recovery
Touch worked in twrp!
Proceeded with installing opengapps/nanodroid and all that jazz.
TBH you don't need touch to achieve most (if not all) functionality of twrp.
To reboot back to recover from within twrp (assuming you have already flashed twrp installer after flashing rom), just do: adb reboot recovery
psychic_quark said:
Clean install steps, WILL destroy ALL data, make backups!! before performing any of this and as always YMMV
0: (optional) Update firmwares/radios etc. to latest
0.1: Download latest stock package. [URL: https://www.essential.com/developer/current-builds]
0.2: Unzip to a location and modify the install script flashall.sh(*nix)/flashall.bat(win) to remove the reboot line (last line)
0.3: Reboot to bootloader: Keep pressing vol down + power buttons OR adb reboot bootloader via a privileged OS terminal.
0.3: Run the install script with admin privs: sudo ./flashall.sh(*nix) OR (run as admin) flashall.bat(win)
0.4: Reboot bootloader: Keep pressing vol down, select using power button hen you see the option OR fastboot reboot-bootloader
1: Erase userdata: sudo fastboot -w
1.1: (very optional) check slot to make sure we are in slot a (sudo fastboot getvar current-slot), if not then boot to slot a.
2: Install twrp to boot (fastboot flash boot TWRP-SEP.img or latest twrp image) (Note: I use that specific twrp image because the touchscreen works for me YMMV)
3: Boot to twrp using vol up/down buttons and power button to make the selection.
Now we are within TWRP and hopefully touch works, if the touch doesn't work, try to use a different TWRP build or try to use adb shell commands, indicated below (where applicable)
4: Here we wipe and format everything (if no touch then adb shell twrp wipe <system/data>)
4.1: Format data (Any adb shell commands to achieve a similar result?, "adb shell twrp wipe data" maybe)
4.1.1: (optional) format data to f2fs
4.2: Wipe system (adb shell twrp wipe system)
5: We start copying and initial installing ROM files to device, (adb push <file> /sdcard/)
5.1: Copy and install file: Lineageos rom [URL: https://download.lineageos.org/mata]
5.2: Copy and install file: TWRP installer [URL: https://dl.twrp.me/mata/]
6: Reboot to recovery, this should boot back up to twrp (any adb shell command to achieve this?) (Note: This step is needed otherwise gapps installation *may* fail later)
7: Now we copy and install rest of the files to device in order. (adb push <file> /sdcard/) OR (if sideloading: adb sideload <file>)
7.1: Here you get to choose if you don't want google integration (Lucky You!)
7.1.1: (optional) Copy and install file: <nanodroid> if you are interested in going the microg route. [URL: https://nanolx.org/nanolx/nanodroid]
7.1.2: (optional) Copy and install file: <OpenGapps pico> (or whatever you want man). [URL: https://opengapps.org/]
7.2: (optional, needed if disabling forced encryption) Copy and install file: DM verity_forceencrypt zip file (download zip from github and remove .git files and recompress to .zip, making sure the filename is (without quotes): "Disable_Dm-Verity_ForceEncrypt_master" [URL: https://github.com/Zackptg5/Disable_Dm-Verity_ForceEncrypt/archive/master.zip]
7.3: (optional, needed if root is desired or if disabling forced encryption in 7.2) Copy and install file: <Magisk stable> [URL: https://forum.xda-developers.com/apps/magisk]
7.4: (optional, untested, may break OTA) Perform step 5.2 again if you want to maintain TWRP as recovery.
8: Reboot to system.
8.1: (optional) If device is consistently bootlooping (Note: 2-4 interim reboots are normal), then GOTO step 1.
8.2: (optional) If a system app is force closing, try to erase its data and cache first, otherwise GOTO step 1.
profit?? (and/or optionally cry over wasted time in this possibly pointless exercise)
Click to expand...
Click to collapse
Brillant post @psychic_quark that was the only guide which worked for me, coming from Q beta 3. Thanks.
Step 1.1 was needed for me to flash boot_a or _b in step 2 depending on the result in 1.1.
@jaylittle thanks also for telling us. I also waited for a year to get LOS on my PH-1. I got it from the amazon deal and was ran invisiblisk ROM of Dec.
I ran the June 15 ROM with opengapps pico and magisk in recent version and yestersay I updated via OTA to June 18 ROM without loosing root. Thats very cool. With other ROMs I had to install magisk after update again.
Did anyone tried to install twrp permanently?
And my second question is about removing the red warn during booting which has to be ack-ed. I found this https://mata.readthedocs.io/en/latest/ under topic "Removing the Red Verity Warning" did anyone tried this and will this remove root?
Thanks for your help.

[Guide] Root Pixel 5 with Magisk + Unlock Bootloader + Pass SafetyNet + More

[Guide] Root Pixel 5 with Magisk + Unlock Bootloader + Pass SafetyNet + More
Android Security Bulletin—June 2023
Pixel Update Bulletin—June 2023​
Introduction
This Guide is for Pixel 5 owners that want to Root their phone, and enjoy the benefits of rooting it. The Guide is divided into three parts: Information, Instructions, and Other.
~ ~ ~ Part I - INFORMATION ~ ~ ~
Disclaimer
I assume no responsibility for the malfunctioning/bricking of your phone.
If you choose to use a Custom Kernels, Custom ROM, etc. You should read the Installation Instructions in their thread before using this guide or attempting to install them. Additionally, the order of listed items i.e., Custom Kernels, Custom ROMS, etc. Does not indicate my preference for them. It is your responsibility to do the research before selecting them.
.
Prerequisites
A Pixel 5 phone with an unlocked bootloader.
The latest Android 13 Factory or OTA Image: "redfin" for Pixel 5
Factory Image
13.0.0 (TQ3A.230605.011, Jun 2023)
Which one should I use?
OTA Image
13.0.0 (TQ3A.230605.011, Jun 2023)
Which one should I use?
A Computer with the latest working SDK Platform-tools 33.0.3 installed.
Important Notes:
a. Before installing SDK Platform-tools, check for older versions of fastboot on your computer: Open a Command prompt and type fastboot --version at the prompt. If a adb/fastboot is found delete the folder containing them. Also, check the path environment for paths to them and remove it.​
b. Update Platform Tools, regularly, for optimal performance.​
c. Need Google's USB Drivers for your Pixel Phone?​
NEW
Both Slots Bootable
@badabing2003 has found a way to Have both slots bootable.
He has automated the procedure and added it to PixelFlasher.
@Lughnasadh tested the Both Slots Bootable procedure on his Google Pixel 7 Pro and Google Pixel 6 Pro phones: It works!
Android 14 Beta are up.
Builds are only available for the following Pixel devices:
Google Pixel 4a5(G)
Google Pixel 5 and 5a
Google Pixel 6 and 6 Pro
Google Pixel 6a
Google Pixel 7 and 7 Pro
* * * 64-bit-only system images * * *
Google Pixel 4a (5G)
Google Pixel 5
Google Pixel 6
Google Pixel 6 Pro
Android 14 GSI binaries and release
Pixel 4a5(G)
Pixel 5 and 5a
Pixel 6 and 6 Pro
Pixel 6a Pro
Pixel 7 and 7 Pro
Update(s)
Factory/OTA Images - 13 June
Android 14 DP
Factory images and OTA images
Android 14 GSI binaries and release
Magisk Alpha - app-release_709f25f6-26101.apk 12 Apr
Magisk Beta - Magisk v26.1.apk 11 Apr
Magisk Canary - app-release_a8c4a33e-26103.apk 23 Jun
Magisk Cygisk - Click Pages 5 for installation Instructions.
Magisk Delta -
app-release
Magisk Stable - Magisk v26.1.apk 11 Apr
SafetyNet - Displax's SafetyNet Fix, v2.4.0-MOD_1.3 17Jun
SDK Platform-tools 33.0.3 Aug 2022
Custom Kernels
a. Google Pixel 5 ROMs, Kernels, Recoveries, & Other​b. ElementalX Kernel Manager​
My Other Guides
Pixel 7 Pro
Pixel 6
Pixel 4a (5G)
Pixel 4 XL
Pixel 3 XL
Pixel 1 XL
Credits/Thanks/Recognitions
Those I may have, inadvertently, forgotten.
~ ~ ~ Part II - INSTRUCTIONS ~ ~ ~
(The Instructions listed below are not steps, they are individual sets of instructions.)
Unlock Bootloader/Return Phone to Stock/Lock Bootloader
Unlock Bootloader
This will erase all user data from the device!
Backup your data
Activate Developer Options: Tap Settings > About Phone > Tap Build Number 7 times or until you see you are a Developer. Tap back > System > Advanced > Developer Options. Enable OEM Unlock and, USB Debugging.
Boot fastboot mode
Connect the phone to the Computer with USB cord.
Open a Command Prompt on your computer and type fastboot flashing unlock and press enter.
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete and then type fastboot reboot at the Command Prompt and press enter.
When your phone reboots disconnect your usb cable.
Notes: After unlocking your bootloader, you'll see a warning: The bootloader is unlocked and... You will see this warning until, you relock the bootloader.
Do not relock your bootloader until you have returned the device to Stock.
Return Phone to Stock
Backup your data/Internal storage
Use the Android flash tool:
select Wipe => Force Flash Partitions => Lock Bootloader.
Lock Bootloader
If your phone is not 100 percent stock do Return Phone to Stock. If you don't you may brick your phone.
This will erase all user data from the device!
Boot fastboot mode
Open a Command Prompt and type this at the Prompt: fastboot flashing lock
You should see a request for confirmation on your phone, use the volume keys to scroll and the power key to select.
Allow the process to complete, then type this at the Command Prompt: fastboot reboot
Enable Developer Options: Settings > About phone > Tap Build number 7 times or until you see 'you are a developer'.
Tap Back > Developer options and toggle OEM Unlock off.
Manually Install/Update Factory Image keep data or wipe data
Important Note(s):
If you haven't updated your phones Factory image in awhile. It is not necessary to flash all the missed images in succession. Flash the latest Factory image.
If you are uncomfortable manually flashing the factory image. Try PixelFlasher by badabing2003.
If your phone was previously rooted, open Magisk manager and disable all Magisk modules. If you hid the Magisk manager app the default name for the hidden Magisk app is settings.
If you want to Upgrade to a new Android Version or update the Factory Image without wiping your phone: Do Flash Factory Image Keep Data (below).
Always verify you have the latest working version of SDK Platform-Tools installed on your computer before installing the Factory Image: Pixel 5 - redfin.
If you get an error: while flashing, try one of these options:
Change the USB port to a non charging USB port.
Change the USB cord.
Change Computers.
If your phone boot loops try one of the following options:
Flash the 'stock' boot.img to both slots: fastboot flash boot boot.img --slot all
Remove Modules
Press the Power button until the phone turns off.
Press the Power and Volume Down to boot the bootloader.
Open a Command Prompt in the SDK-Platform-tools folder or the folder that has adb.exe in it, and type adb wait-for-device shell magisk --remove-modules
then type
fastboot Reboot
Backup your data
Download the latest Factory Image: Pixel 5 - redfin to your Computer.
Go to Part II - INSTRUCTIONS => 4. Extract Files from the FactoryImage/Flash boot.img and extract the flash-all.bat file.
Flash Factory Image Keep Data
Installing/Upgrading Android Version/
* E D I T - flash-all.bat file *
Flash to current/Active Slot.
* * * S T A R T - E D I T * * *
@Echo off
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-redfin-a9-9.9-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-redfin-a9999-99999-999999-b-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot update image-redfin-aa9a.999999.999.zip
Note:The -w is removed to Keep Data.
echo Press any key to exit...
pause >nul
exit
* * * * E N D - E D I T * * * *
Note: It is a good idea to flash the Google factory image to both slots (A & B) when updating or upgrading to new Android version.
See Flash Other Slot bat file... below.
Flash Other Slot bat file - Save as flash-other.bat
Note: To run this file type flash-other at the Command Prompt.
ECHO OFF
PATH=%PATH%;"%SYSTEMROOT%\System32"
echo This is the slot you are currently on.
fastboot getvar current-slot
echo Press any key to continue...
pause >nul
fastboot --set-active=other
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
echo This is the slot you switched to.
fastboot getvar current-slot
echo Press any key to continue...
pause >nul
flash-all
exit
* * * * E N D File * * * *
After, you have edited the flash-all.bat file. Copy/Move these files to the Platform-tools folder:
bootloader-redfin-....img
flash-all.bat
image-redfin-....zip
radio-redfin-....img
On your phone: Boot the bootloader (Power off the phone => Press the Power and Down buttons until you see Start)
Connect your phone to the computer.
Open a Command Prompt on your computer in the Platform-tools folder and type: flash-all at the Command Prompt and press enter.
The phone will reboot when flashing is completed.
Go-to ~ ~ ~ Part II - INSTRUCTIONS ~ ~ ~, 5. Root/Reroot with Magisk and Pass SafetyNet, • Patching the boot.img - to root/reroot.
Flash Factory Image Wipe Data
This will wipe your phone's Data/Internal Storage.
Do not edit the flash-all.bat file,unless you need to disable Verity and Verification to use a custom kernel.
* E D I T - flash-all.bat file *
@Echo off
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot --set-active=other
fastboot reboot-bootloader
fastboot flash bootloader bootloader-redfin-a9-9.9-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-redfin-a9999-99999-999999-b-9999999.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update --disable-verity --disable-verification image-redfin-aa9a.999999.999.zip
echo Press any key to exit...
pause >nul
exit
Notes:
The first time you Disable Verity and Verification it will wipe your Data/Internal Storage.
When doing Subsequent updates and disabling Verity and Verification, the -w flag can be removed to Keep Data.
Once you start Disabling Verity and Verification you should continue doing it. If you skip disabling them one time. The next time you Disable Verity and Verification it will wipe your phone.
To flash both slots (A & B partitions) see Flash Other Slot bat file... above.
* * * * E N D - Edit * * * *
Open the folder you extracted the Factory Image to and Copy/Move these files to the Platform-tools folder:
bootloader-redfin-....img
flash-all.bat
image-redfin-....zip
radio-redfin-....img
On your phone: Boot the bootloader (Power off the phone => Press the Power and Down buttons until you see Start)
Connect your phone to the computer.
Open a Command Prompt on your computer in the Platform-tools folder and type: flash-all at the Command Prompt and press enter.
The phone will reboot when flashing is complete.
Setup phone
Enable Developer Mode and USB Debugging
Setup => About phone => Tap Build number 7 times or untill you see you are a 'Devloper'.
Setup => System => Developer options => Enable Developer options => enable USB Debugging
Go-to ~ ~ ~ Part II - INSTRUCTIONS ~ ~ ~, 5. Root/Reroot with Magisk and Pass SafetyNet, • Patching the boot.img - to root/reroot.
(NEW) Make Both Slots Bootable: Manually, Flash the OTA Image to Both Slots - One bootable and rooted, the other slot bootable without root.
Before you start
Backup your data
Make sure that there is no pending OTA update, by going to Settings > About phone > System updates, which should say Your system is up to date.
Download the latest Factory and OTA image for your device.
Verify the checksum of the Factory and OTA image. The last portion of the filename is the first 8 digits of its SHA-256 checksum; the full SHA-256 checksum is shown next to the download link.
Extract the boot.img from the Factory image:
Extract the Factory Image file that you downloaded (redfin-a9a9a.999999.999-factory-99a9a99a.zip) into a folder.
Open the folder you extracted the Factory image to and extract the Image file (image-redfin-aa9a.999999.999.zip) into a folder. The stock boot.img file should be in this folder.
Patch the boot.img:
Open the Magisk Alpha/Beta/Canary/Delta/Stable App
The Update Channel should be set to Alpha/Beta/Canary/Delta/Stable, depending on the version you installed.
Tap Install (next to Magisk)
Tap, Select and Patch a File
Select the boot.img file you extracted from the factory image.
Tap the ✓ (Check Mark)
Tap Let's Go
When you see done, the boot.img has been patched (magisk_patched_xxxxxx.img), and is stored in the download folder.
Reboot
Copy/Move the magisk_patched....img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it:
Sideload the OTA zip file
Boot Recovery mode
With the device powered on and USB debugging enabled, type: fastboot reboot recovery
If you're unable to use fastboot to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select the Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should be on the screen.
Access the recovery menu:
Type: fastboot reboot fastbootd and press enter.
The recovery text menu will appear.
If you're unable to use fastboot to boot the recovery menu, you can use the key combination for your device: Hold the Power button and press Volume button up once. The recovery text menu will appear.
Connect the phone to the PC via USB cable
Enter sideload mode:
Select the Apply update from ADB option from the recovery text menu
(Optional) Verify Computer sees your device:
Type: adb devices and press return.
Your device number should shows up with "sideload" next to it.
Sideload the OTA zip file
Type:
adb sideload redfin-ota-aa9a.999999.999-a99999aa.zip and press enter.
Once sideloading finishes, reboot the phone by choosing Reboot system now option on the The recovery text menu.
Note: This slot is bootable and NOT ROOTED
Sideload the OTA zip file to the other slot and Root it.
Boot Recovery mode
With the device powered on and USB debugging enabled, type: fastboot reboot recovery
The device is now in recovery mode an Android logo with red exclamation mark should appear on screen.
If you're unable to use adb to reboot into recovery, you can use the key combination for your device: Press and hold Volume Down button, then press and hold Power button then use the Volume Down/Up button to select Recovery option from the menu.
The device is now in recovery mode an Android logo with red exclamation mark should appear on screen.
Access the recovery menu:
Type: fastboot reboot fastbootd and press enter.
The recovery text menu will appear.
If you're unable to use fastboot to boot the recovery menu, you can use the key combination for your device: Hold the Power button and press Volume button up once.
The recovery text menu will appear.
Enter sideload mode:
Select the Apply update from ADB option from the recovery text menu
Sideload the OTA zip file
Type: adb sideload redfin-ota-aa9a.999999.999-a99999aa.zip at the prompt and press enter.
Once sideloading finishes, choose Reboot system now option on the The recovery text menu.
Flash boot.img to root
On the phone: Boot bootloader/fastboot mode
On the PC:
Open a Command Prompt in the SDK Platform-tools folder.
Type: fastboot flash boot magic_patched....img at the Prompt and press enter.
Type: fastboot reboot at the Prompt and press enter.
Disconnect the phone from the PC.
Note: This slot is bootable and rooted.
Done!
Extract Files from Factory Image flash-all.bat boot/init_boot.img
Extract Files from Factory Image
Extract flash-all.bat and boot.img file
Download the latest Factory image to your phone.
Extract the Factory Image file (redfin-r2d1a.999999.999-factory-99a9a99a.zip) to a folder. The, stock, flash-all.bat file should be in this folder.
Open the folder you extracted the Factory image to and, extract the Image file (image-redfin-aa9a.999999.999.zip) into the folder. The, stock, boot/init_boot.img file should be in this folder.
Flash boot/init_boot.img
Flashing the boot.img removes root.
Open the folder you extracted the 'image...zip' file to and copy the boot.img file to your computer's platform-tools folder or to the folder that has fastboot.exe in it.
Boot fastboot mode
Connect the phone to the Computer
Open a Command Prompt and type the following command at the prompt:
fastboot flash boot --slot all boot.img
Reboot
Root/Reroot with Magisk and Pass SafetyNet.
Android 13
Upgrade to Android 13: OP, Part II - INSTRUCTIONS, 2. Install/Update Factory Image keep data or wipe data, Keep data
Patching the boot.img - to root/reroot.
If your phone was previously rooted, DO NOT repeat DO NOT install another Magisk Manager app. Do this before you patch the boot/init_boot image:
Open the Magisk Manager app and disable all Magisk modules. If you hid the Magisk manager app the default name for the hidden Magisk app is settings.
If you gave it a different name and you've forgotten the name. Use TB checker to find the name of the hidden Magisk Manager. You can also use TB Checker to check if you have more than one Magisk Manager app installed.
Extract the boot/init_boot.img file from the Factory Image.
Download the latest Factory image to your phone.
Extract the Factory Image file (redfin-a9a9a.999999.999-factory-99a9a99a.zip) to a folder.
Open the folder you extracted the Factory image to and extract the Image file (image-redfin-aa9a.999999.999.zip) into the folder. The, stock, boot/init_boot.img file should be in this folder.
Install Magisk Canary - Download app-release.apk
or
Magisk Beta/Stable App
Open Magisk Beta/Canary/Stable App
The Update Channel should be set to Beta/Canary/Stable, depending on the version you Installed.
Tap Install (next to Magisk)
Tap, Select and Patch a File
Select the boot.img file you extracted from the latest factory image.
Tap the ✓ (Check Mark)
Tap Let's Go
When you see done, the boot.img has been patched (magisk_patched_xxxxxx.img), and stored in the download folder.
Reboot
Copy/Move the patched boot.img file to your computer's Platform-tools folder or the folder that has fastboot.exe in it:
Copy it to a USB drive and transfer it to your computer.
Move it to your computer using adb push
Boot fastboot mode
Connect the phone to the Computer with USB cord.
Open a Command Prompt in the folder you copied the patched boot.img to.
Type fastboot flash boot "name of patched boot".img without the quote marks at the Prompt and press enter.
Type fastboot reboot at the Prompt and press enter.
Important, if your phone boot loops try one of the following options:
Flash the 'stock' boot.img to both slots: fastboot flash boot boot.img --slot all
Remove Modules
Press the Power button until the phone turns off.
Press the Power and Volume Down to boot the bootloader.
Open a Command Prompt in the SDK-Platform-tools folder or the folder that has adb.exe in it, and type adb wait-for-device shell magisk --remove-modules
fastboot Reboot.
Important, if the Magisk Manager app has the Superuser and Module buttons greyed out:
Read @badabing2003 post
Pass Safety Net with SafetyNet Fix
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
Install Displax's safetyNet Fix
Open Magisk
Tap Modules icon
Tap Install from storage
Navigate to the Displax's SafetyNet Fix file you downloaded.
Tap the Displax's SafetyNet Fix file.
Tap the check mark (✓ at the bottom) to start the installation.
After it installs tap the Save icon to save the log
Tap Reboot.
Settings for Magisk Canary
Open Magisk App
Tap the Setup icon.
Scroll down to App and set the Update Channel to Canary.
Scroll down to Check Updates and enable it.
Scroll down to Magisk and enable Zygisk.
Enable Denylist
Tap Configure DenyList => Tap 3 Dot Menu => Check ✓ Show system apps => Check ✓ Google Play Store, Google Pay, Google Wallet etc.
(Optional) Scroll down to Superuser and enable Enable Biometric Authentication.
Get Device Certified
Turn Airplane mode on
Open Settings
Tap Apps & notifications
Tap see all...
Tap three dot menu
Tap Show system
Scroll to Google Play Store
Tap Storage and Cache
Tap Clear storage
Note: Repeat the 3 steps above for any app that needs Device Certification i.e., Google Play Services, Google Pay, Google Wallet, etc.
reboot
Turn Airplane mode off
Check Device Certification
Open Google Play Store app
Tap Menu - Circle top right
Tap Settings
Tap About
Check Play protect certification
It may take 24 hours for Device Certification to be updated.
Note: If after completeting Get Device Certified and Check Device Certification you've waited 24 hours your Device is not Certifed or your Device is Certified and certain Google Store apps (Google Pay, NetFliks, etc.) are not working. Use the Play Integrity API Checker app or the TB Checker - Safetynet and Root app to verify you are passing Play Integrity.
Set Magisk App Update Channel/Update Magisk
Set Magisk App Update Channel
Open Magisk App > Tap Settings icon > Update Channel > Select Stable, Beta, Canary or Custom.
Update Magisk
When Magisk App notifies you of an update:
Tap install.
Select, Direct Install (Recommended)
When it finishes installing
Tap, Save Log
Log location: /storage/emulated/0/Download
Tap, Reboot
Done!
Install/Update Magisk Modules
Download File(s)
Displax's latest SafetyNet Fix, a "fork" of kdrag0n safetynet-fix.
These are the NEW Magisk Module repositories:
Androidacy Module Manager
Androidacy Module Manager - Releases
Androidacy Download Center
This is the old Magisk Module repository:
https://github.com/Fox2Code/Fox Magisk Module Manager
LSposed Releases
Shamiko Releases
Install Modules from Storage
Open Magisk
Tap the Modules icon
Tap Install from storage
Navigate to the folder with the Module you want to install.
Tap the Module to highlite it and tap Select.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Install Modules from Androidacy Module Manager
Open Androidacy Module Manager
Tap the Modules icon
Locate the Module you want to install
Tap Install
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Update Modules
Open Androidacy Module Manager
You, will see the Modules that have Updates.
Tap the Module you want to update.
Tap install.
After it installs, tap the Disc Icon to save the install log.
Tap Reboot
Open a Command Prompt/Boot Fastboot Mode/Boot Recovery
Open a Command Prompt on Computer
Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type cmd and press enter.
Open a Powershell Command Prompt on Computer: Open File Explorer, click the platform-tools folder ==> click the folder icon (left side of address bar) to highlight it type powershell and press enter.
Notes:
Enable USB Debugging, on your phone: Settings ==> System ==> Advanced ==> Developer options ==> Scroll down to USB debugging and enable it.
When using the Powershell Command Prompt Commands must be preceeded with ./: i.e, ./fastboot devices
If you do not want to open a Command Prompt every time you want to use the fastboot command, add the path to the Platform-tools folder to Windows environment variables.
Boot fastboot mode (bootloader):
Power off phone, press and hold the power and volume down buttons until you see Start.
Boot Recovery
Power off phone, press and hold the power and volume down buttons until you see Start. Use volume up/down button until you see Recovery mode. Press power button.
Test fastboot
Enable Developer Options - Tap Settings > About phone > Build number 7 times or until you should see 'you are a Developer'.
Enable USB Debugging - Tap Settings > System > Advanced > Developer options >
Enable USB Debugging.
Open a Command Prompt on your computer in the Platform-tools folder.
Boot fastboot mode on your phone
Connect the phone to the Computer.
At the prompt type: fastboot devices to verify communication with phone. It should return your phone's serial number.
ADB Sideload
Stock Recovery
Full OTA Images for Nexus and Pixel Devices - Updating instructions
Custom Recovery TWRP
Waiting for Android 12 (S) T.W.R.P
~ ~ ~ Part III - OTHER ~ ~ ~
Custom ROMs
Need help with a Custom ROM?
If you are you are trying to install or have installed a Custom ROM, read and follow the Installation Instructions in the OP of the Custom ROM thread.
Search the thread of the Custom ROM you are trying to install or have installed for answer(s)/solution(s) to your question(s)/problem(s): If you don't find a answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM thread you are trying to install or have installed.
If you are trying to install a Addon(s) {Custom Kernel, Magisk, etc.} to the Custom ROM you installed: Search the thread of the Custom ROM you installed or the thread of the Addon you want to add to your Custom ROMfor answer(s)/solution(s) to your question(s)/problem(s). If you don't find an answer(s)/solution(s) to your question(s)/problem(s). Post your question(s)/request(s) for help in the Custom ROM or Addon (Custom Kernel, Magisk, etc.) thread.
ROMs
Google Pixel 5 ROMs, Kernels, Recoveries, & Other
Other Custom ROMs
lineageOS 20.0 for the Google Pixel 5 (redfin) Nightly
Themes, Apps, and Mods
Google Pixel 5 Themes, Apps, and Mods
T.W.R.P. Backup/Restore
Waiting for Android 13 T.W.R.P.
Thanks! Waiting for twrp now!
Sent from my Mi 9T Pro using Tapatalk
Hey, thanks for this super-detailed guide!
I just did this to my P5, however the guide was not clear on how to get Safetynet working.
After Magisk was installed and I confirmed that the device was rooted, I went to this other thread and followed the instructions for Safetynet at the very end of the first post. The downside seems to be that the device is identified as a Pixel 3A, but it got the Safetynet test to pass. I assume that this will be fixed someday.
kbaltodano said:
Hey, thanks for this super-detailed guide!
I just did this to my P5, however the guide was not clear on how to get Safetynet working.
After Magisk was installed and I confirmed that the device was rooted, I went to this other thread and followed the instructions for Safetynet at the very end of the first post. The downside seems to be that the device is identified as a Pixel 3A, but it got the Safetynet test to pass. I assume that this will be fixed someday.
Click to expand...
Click to collapse
I don't think so. Even this method is kinda kludged. Pixel 3a is the latest version not subject to the hardware check that prevented Safetynet check.
I'm assuming OTA updates will disable this root? So don't take any?
PRL77 said:
I'm assuming OTA updates will disable this root? So don't take any?
Click to expand...
Click to collapse
No OTA Update will not disable. Root
PRL77 said:
I'm assuming OTA updates will disable this root? So don't take any?
Click to expand...
Click to collapse
Yes, you will lose root if you take te OTA. The only way to keep root with OTA is do #7. D..
Jackie Coyote said:
No OTA Update will not disable. Root
Click to expand...
Click to collapse
Incorrect, Jackie. See Homeboy76's reply. I actually did a reset to factory defaults before posting this and it removed root. An OTA would do the same.
---------- Post added at 08:39 PM ---------- Previous post was at 08:11 PM ----------
Homeboy76 said:
Yes, you will lose root if you take te OTA. The only way to keep root with OTA is do #7. D..
Click to expand...
Click to collapse
Thanks for confirming my thoughts. And thanks for this guide, it is damn brilliant.
I'm not an expert but as far as i know that's not correct.
If you do a factory reset your boot image will not be overwritten so technically root is still there.
But the magisk app will be deleted because of the factory reset, the patched boot image should still be in place.
OTA overwrites those files so then it will be fully unrooted.
Pollie81 said:
I'm not an expert but as far as i know that's not correct.
If you do a factory reset your boot image will not be overwritten so technically root is still there.
But the magisk app will be deleted because of the factory reset, the patched boot image should still be in place.
OTA overwrites those files so then it will be fully unrooted.
Click to expand...
Click to collapse
I don't take OTAs . I flash factory images on Mondays. But I thought you can't even take OTAs without restoring the boot image first. Either through fastboot or Magisk itself?? Or I think you can flash the full OTA from Google's website. I'm pretty sure that will replace the boot image with stock.
My 3XL died, so I ordered a 5 unlocked from Amazon. In trying to unlock the bootloader with 'fastboot flashing unlock', I receive FAILED (remote: 'flashing unlock is not allowed'). How can I tell if I have an unlocked phone or is there something else I am missing?
vette8t7 said:
My 3XL died, so I ordered a 5 unlocked from Amazon. In trying to unlock the bootloader with 'fastboot flashing unlock', I receive FAILED (remote: 'flashing unlock is not allowed'). How can I tell if I have an unlocked phone or is there something else I am missing?
Click to expand...
Click to collapse
Did you toggle the unlock in developer settings? If you can't and it's greyed out, your out of luck. Are you on the bootloader screen when your fastbooting? You have updated platform tools?
vette8t7 said:
My 3XL died, so I ordered a 5 unlocked from Amazon. In trying to unlock the bootloader with 'fastboot flashing unlock', I receive FAILED (remote: 'flashing unlock is not allowed'). How can I tell if I have an unlocked phone or is there something else I am missing?
Click to expand...
Click to collapse
My bad, I enabled OEM Debugging, but not the Enable OEM Unlock. Bootloader is unlocked!
vette8t7 said:
My bad, I enabled OEM Debugging, but not the Enable OEM Unlock. Bootloader is unlocked!
Click to expand...
Click to collapse
Sweet! Glad you got it.
Jackie Coyote said:
I don't take OTAs . I flash factory images on Mondays. But I thought you can't even take OTAs without restoring the boot image first. Either through fastboot or Magisk itself?? Or I think you can flash the full OTA from Google's website. I'm pretty sure that will replace the boot image with stock.
Click to expand...
Click to collapse
The guide goes over this in Step 7D how it is possible on devices with A/B partitions but not those without them.
---------- Post added at 11:44 AM ---------- Previous post was at 10:54 AM ----------
Pollie81 said:
I'm not an expert but as far as i know that's not correct.
If you do a factory reset your boot image will not be overwritten so technically root is still there.
But the magisk app will be deleted because of the factory reset, the patched boot image should still be in place.
OTA overwrites those files so then it will be fully unrooted.
Click to expand...
Click to collapse
So you're saying that after I lost root on factory reset, all I needed to do was reinstall Magisk?
PRL77 said:
The guide goes over this in Step 7D how it is possible on devices with A/B partitions but not those without them.
---------- Post added at 11:44 AM ---------- Previous post was at 10:54 AM ----------
Unless I'm reading it incorrectly, that is no longer an option. Taking the OTA and installing Magisk to the inactive slot has been removed.
Click to expand...
Click to collapse
Jackie Coyote said:
PRL77 said:
The guide goes over this in Step 7D how it is possible on devices with A/B partitions but not those without them.
---------- Post added at 11:44 AM ---------- Previous post was at 10:54 AM ----------
Unless I'm reading it incorrectly, that is no longer an option. Taking the OTA and installing Magisk to the inactive slot has been removed.
Click to expand...
Click to collapse
I'm reading that some devices can be done that way while others cannot. This guide is linked in #7D: https://topjohnwu.github.io/Magisk/ota.html
I personally won't be doing it, I'll just re-root from scratch, but it does seem like an option.
Click to expand...
Click to collapse
PRL77 said:
Jackie Coyote said:
I'm reading that some devices can be done that way while others cannot. This guide is linked in #7D: https://topjohnwu.github.io/Magisk/ota.html
I personally won't be doing it, I'll just re-root from scratch, but it does seem like an option.
Click to expand...
Click to collapse
Yeah, I don't take OTAs. Just was wondering for clarification purposes. Install to inactive slot is not an option on my latest magisk canary build.
https://twitter.com/topjohnwu/status/1303574238796808192?s=19
Click to expand...
Click to collapse
Pollie81 said:
I'm not an expert but as far as i know that's not correct.
If you do a factory reset your boot image will not be overwritten so technically root is still there.
But the magisk app will be deleted because of the factory reset, the patched boot image should still be in place.
OTA overwrites those files so then it will be fully unrooted.
Click to expand...
Click to collapse
<Edit> You're right!
Homeboy76 said:
Are you sure the boot.img is not overwritten?
Why?
If the boot.img was not overwritten Magisk and Magisk Manager would still be on your phone.
The reason the boot.img is still there is it is stored on your computer i.e. C:/Platform-tools folder
A Factory reset wipes the phone's data & it's Internal Storage.
Click to expand...
Click to collapse
magisk manager is an app, the root itself is something that is changed in the boot image.
by a factory reset the system and boot image/partitions are not touched, only the data partition and internal storage if you choose so.
that clears everything exept the boot image, that's why if people would realy want to go back to stock they have to flash a stock/factory image.
because if you do that or OTA the boot image will be overwritten by the stock one.

Categories

Resources