[UNOFFICIAL][Recovery][Stock][tissot] TWRP 3.2.1-0 for Mi A1 (New installer) - Xiaomi Mi A1 ROMs, Kernels, Recoveries, & Other De

What?
A TWRP bootable-image and installer ZIP for stock-based ROM's (i.e. not LOS 15.1) and maybe others (untested).
Based on:
Latest TWRP build provided by @pl_blaze
The official TWRP installation script for Pixel 2 by Dees_Troy (will install to both slots automatically - more resilient than the other TWRP script)
The IMG uses official kernel 8.1.10 so might be flashable (not tested!)
Not compatible with LineageOS 15.1 because it uses some custom update API that isn't in this TWRP. I considered using the LOS 15.1 TWRP build in this, but it's not compatible with stock encryption (it always thinks the passcode is wrong).
Full credits to @pl_blaze and Dees_Troy for this. I just packaged up something new and wrote clear instructions.
Why?
The old TWRP thread is not maintained and people keep asking/reporting the same questions/problems. I will try to keep this up to date as long as necessary. This is also a more robust installation script, using magiskboot binary to unpack/repack the boot image.
How?
Uninstall Magisk first if you have it installed, just to be safe. Or reflash stock boot.img. (Might not be necessary - a dirty flash worked OK for me but YMMV).
Fastboot boot (hotboot) any existing working TWRP image. Don't worry about working encryption/data, we only need kernel access. For example...
Code:
fastboot boot oreo_3.2.2_recovery.img
... which can be downloaded from Google Drive here (thanks to whoever shared this, I think it's a pl_blaze reshare).
Download attachment ZIP installer and flash in hot-booted TWRP (it will flash to both slots)
Reboot to Recovery and (re-)flash Magisk, if you use it.
Profit

@pl_blaze brother always thank you for the contributions that you do without coming to the light .and thanks for you @op to post working twrp for stock

this twrp will work on 7.1.2 ? i'm now on aex rom

Thanks @CosmicDan for starting this thread. I started to implement @pl_blaze changes into the official TWRP but I've been failing miserably (I'm a noob). Can you provide sources for the images?
I can't trust binaries floating all over the internet if it's not from a reliable dev. If you've compiled it yourself I'll give a try.

I reshare this twrp img on Telegram group,I tested it, works without problem
Flash of permaent twrp not tested by me
It's a good twrp!

CosmicDan said:
What?
A TWRP bootable-image and installer ZIP for stock-based ROM's (i.e. not LOS 15.1) and maybe others (untested).
Based on:
Latest TWRP build provided by @pl_blaze
The official TWRP installation script for Pixel 2 by Dees_Troy (will install to both slots automatically - more resilient than the other TWRP script)
The IMG uses official kernel 8.1.10 so might be flashable (not tested!)
Not compatible with LineageOS 15.1 because it uses some custom update API that isn't in this TWRP. I considered using the LOS 15.1 TWRP build in this, but it's not compatible with stock encryption (it always thinks the passcode is wrong).
Full credits to @pl_blaze and Dees_Troy for this. I just packaged up something new and wrote clear instructions.
Why?
The old TWRP thread is not maintained and people keep asking/reporting the same questions/problems. I will try to keep this up to date as long as necessary. This is also a more robust installation script, using magiskboot binary to unpack/repack the boot image.
How?
Uninstall Magisk first if you have it installed, just to be safe. Or reflash stock boot.img. (Might not be necessary - a dirty flash worked OK for me but YMMV).
Fastboot boot (hotboot) any existing working TWRP image. Don't worry about working encryption/data, we only need kernel access. For example...
Code:
fastboot boot oreo_3.2.2_recovery.img
... which can be downloaded from Google Drive here (thanks to whoever shared this, I think it's a pl_blaze reshare).
Download attachment ZIP installer and flash in hot-booted TWRP (it will flash to both slots)
Reboot to Recovery and (re-)flash Magisk, if you use it.
Profit
Click to expand...
Click to collapse
what does mean "hot boot", sorry am novice, Not even he could boot boot recovery from Minimal ADB and fastboot ,,, What am I doing wrong?
View attachment 4438212

teacapan said:
Fastboot boot (hotboot) anwhat does mean "hot boot", sorry am novice, Not even he could boot boot recovery from Minimal ADB and fastboot ,,, What am I doing wrong?
Click to expand...
Click to collapse
Hot boot means you are not flashing the recovery image just running it temporarily. Stock boot image is untouched in this process.
Run
fastboot devices
To check whether your device is connected.

alkesh95 said:
Hot boot means you are not flashing the recovery image just running it temporarily. Stock boot image is untouched in this process.
Run
fastboot devices
To check whether your device is connected.
Click to expand...
Click to collapse
thanks for reply, if you look at the screenshot it looks I am connected, the point is that it does not load the file, it does not find it, so if it does not start in recovery I can not do anything I'm stuck.

teacapan said:
thanks for reply, if you look at the screenshot it looks I am connected, the point is that it does not load the file, it does not find it, so if it does not start in recovery I can not do anything I'm stuck.
Click to expand...
Click to collapse
Did you put your recovery into the fastboot forder?
Did you unpack the zip ?
Also check if the name of recovery image is the same

It's possible to make password for twrp

DELETED.

lef7er1s said:
Did you put your recovery into the fastboot forder?
Did you unpack the zip ?
Also check if the name of recovery image is the same
Click to expand...
Click to collapse
1-yes
2-yes
3-yes
Anyway thanks for try help me.

Yeah well, I'm still stuck where, some help would be very appreciated.
View attachment 4438552
View attachment 4438553

Polluktus said:
this twrp will work on 7.1.2 ? i'm now on aex rom
Click to expand...
Click to collapse
Not sure, I've only tested on stock Oreo. Try and and let us know!
atttoush said:
Thanks @CosmicDan for starting this thread. I started to implement @pl_blaze changes into the official TWRP but I've been failing miserably (I'm a noob). Can you provide sources for the images?
I can't trust binaries floating all over the internet if it's not from a reliable dev. If you've compiled it yourself I'll give a try.
Click to expand...
Click to collapse
Indeed, no I have not compiled it myself - just ripped from pl_blaze.
I have a Oreo source repo cloned now for other reasons, but I might try and compile TWRP myself. Although it's been a couple years since I've tried to compile device-specific stuff from an AOSP tree so I don't know how long that will take.
teacapan said:
thanks for reply, if you look at the screenshot it looks I am connected, the point is that it does not load the file, it does not find it, so if it does not start in recovery I can not do anything I'm stuck.
Click to expand...
Click to collapse
Sounds like you just need to learn more about how to use console tools. You need to make sure the "fastboot boot filename.img" command will have a "filename.img" that matches the img filename in the current directory. This is just an example - substitute "filename.img" for the real filename. Use the CD command to change directory to where the img is.

teacapan said:
Yeah well, I'm still stuck where, some help would be very appreciated.
View attachment 4438552
View attachment 4438553
Click to expand...
Click to collapse
Try renaming the img file to something simpler like oreo_twrp.img
Edit: ah yes, the file you are pointing to has to be in the same directory where you opened cmd window, as cosmicdan stated above

CosmicDan said:
Indeed, no I have not compiled it myself - just ripped from pl_blaze.
I have a Oreo source repo cloned now for other reasons, but I might try and compile TWRP myself. Although it's been a couple years since I've tried to compile device-specific stuff from an AOSP tree so I don't know how long that will take.
Click to expand...
Click to collapse
Glad you open this thread. I'll wait for your compiled version to give it a try
teacapan said:
Yeah well, I'm still stuck where, some help would be very appreciated.
Click to expand...
Click to collapse
I don't know man, these adb and fastboot binaries look old (2014?). Try to get recent ones. And repeat the process.

silv3rfox said:
Glad you open this thread. I'll wait for your compiled version to give it a try
I don't know man, these adb and fastboot binaries look old (2014?). Try to get recent ones. And repeat the process.
Click to expand...
Click to collapse
Thanks, i will.

teacapan said:
Yeah well, I'm still stuck where, some help would be very appreciated.
Click to expand...
Click to collapse
Before flashing recovery
CD C:\Users\YOUR_USERNAME\Desktop\Adb

teacapan said:
Yeah well, I'm still stuck where, some help would be very appreciated.
Click to expand...
Click to collapse
The name of the file is ending with .img, delete ending " .img ", see below that patched_boot without .img in the end

Thanks for this. I checked out the differences between this and the flashable zip I was using (twrp-3.2.1-1-installer-tissot-FIXED_By_DroiDMester) and found this:
Code:
# write the new boot image to boot block
write_boot() {
print "Writing new boot image to memory..."
cd "$tmp"
if $use_dd; then
dd if=boot-new-a.img of="$boot_block"_a
[ $? = 0 ] || abort "Failed to write boot image A! You may need to restore your boot partition"
dd if=boot-new-b.img of="$boot_block"_b
[ $? = 0 ] || abort "Failed to write boot image B! You may need to restore your boot partition"
else
flash_image "$boot_block" boot-new.img
fi
[ $? = 0 ] || abort "Failed to write boot image! You may need to restore your boot partition"
}
This also flashes it into boot_a and boot_b correct?
What other differences does this have over that?

Related

[RECOVERY] [NEW: CWM Graphics] CTR Recovery for Galaxy A5

CTR Recovery for Galaxy A5​
Hi all,
I've ported CTR Recovery from the developer carliv (now bluefirebird) on our Galaxy A5.
This recovery is based on the old CWM, by koush, with some features you can find in the original post HERE, so if you are tired of the TWRP recovery and u are looking for something similar to the old CWM, don't hesitate to download this
NOTE: It should work in any A500 variant, but it's tested only on SM-A500FU variant, so flash on other variants at your own risk!
Desclaimer:
Code:
echo "I'm not responsable for bricked phones, overheat phones, for global warming, for phones that want to suicide without a reason and for imminent explosions"
DOWNLOADS: You can download the recovery here: https://www.androidfilehost.com/?w=files&flid=82499
HOW TO FLASH:
ON WINDOWS (Odin method)
1) Download Odin
2) Download the recovery (with .tar extension)
3) Go in download mode by pressing Power Button + Vol - + Home Button
4) Connect your smartphone to the PC
5) Open odin version 3.9 or 3.10
6) Select AP button and open the recovery file
7) Press start
8) Enjoy
ON LINUX (Heimdall method):
1) Extract tar file with:
$ tar xvf recovery_file.tar
You will find a recovery.img file
2) Open Heimdall Frontend
3) Select pit file (you can find it on sammobile)
4) Select recovery partition
5) Load the recovery.img file and flash
6 Enjoy
ON ANDROID (Need Root)
1) Download flashify or rashr
2) Extract recovery file with apps such as zArchiver and you will find a recovery.img file
3) Open flashify or rashr and select recovery file
4) Flash it
5) Enjoy
ON RECOVERY
IF YOU ARE ON TWRP:
1) Extract recovery file with apps such as zArchiver and you will find a recovery.img file
2) Reboot to recovery
3) Go to install zip menu
4) Select "Install Image" box
5) Select recovery.img file and flash in recovery partition
6) Reboot to recovery
6) Enjoy
ON TERMINAL
If you are on Android (any rom, TWRP, or CTR) (Need Root)
1) Open terminal. If you are on CTR you need Aroma FileManager
2) run:
$ dd if=/path/to/recovery.img of=/dev/block/bootdevice/by-name/recovery
If you are on adb run:
$ adb shell dd=/path/to/recovery.img (inside the phone, not the path of the recovery.img stored in the pc) of=/dev/block/bootdevice/by/name/recovery
3) Enjoy
[NEW] CTR with CWM graphics section
Well, since CWM support ended with cm-11.0, and no one resurrected it, I've decided to give my contributo to the best recovery (in my opinion) which written the begin of android customization, for flashing zip roms, take nandroid backups... So, as I said, since no one resurrected it, I've decided to modify ctr sources, which are based on CWM recovery and which are compilable in cm-12.1 and cm-13.0, for creating a recovery which has, CTR features, but which really like the old CWM.
-So, what does this version offer?
~If you want to know what does it include, please see read this (green highlighted text)
NOTE: If you want to compile with cwm recovery you need my fork which you can find here:
https://github.com/DeadSquirrel01/carliv_touch_recovery_new only cm-12.1 branch for the moment
Then you need to add in BoardConfig.mk (in the device tree) the following flag:
USE_CWM_GRAPHICS := true
otherwise it will compile standard CTR
Flashing instuctions:
Look at "HOW TO FLASH" section
Download Link: Same as CTR recovery link, but you have to download the ones wich have a name which begins with "[CWM]"
OTHER NOTE: Since I've compiled CTR with CWM graphich with an half crapped cm-12.1 source tree, and adb doesn't work (except in sideload), I couldn't take screenshot, so, I've uploaded some photos, instead, which are taken with my ~4 years ago Samsung Galaxy Pocket, so don't flame me for bad quality , and since I tried to upload in attachments, but it doen't show the photo when clicking on the attachment, I've upload a zip with 4 screenshots
HERE (Google Drive Link)
Credits:
@bluefirebird for recovery sources
@TheWhisp for device tree
Me (DeadSquirrel01) for porting the recovery , adding CWM graphics, editing images and adding some cwm features
Sources:
Device Tree: https://github.com/DeadSquirrel01/android_device_samsung_a5-common
CTR: https://github.com/carliv/carliv_touch_recovery_new
CTR with CWM graphics: https://github.com/DeadSquirrel01/carliv_touch_recovery_new branch cm-12.1 only for the moment and you need to add "USE_CWM_GRAPHICS := true" in BoardConfig.mk
Changelog
03/09/2016 (update N2):
_ Add menu color change: you can now change highligh+text color to 3 different colors: blue (default), green or orange.
See my github commit for info, I wrote some awesome comments
06/10/2017 (Update N3):
_Save menu color setting to /sdcard/clockworkmod/cwm_config, so that it's not lost on reboot, resulting a recovery which has always the blue color, even if the user has chosen orange or green.
Thanks for this contribution, try it just have time. For now, I walk with your version of TWRP working well. This CTR Recovery is compatible for install ROMs Marshmallow (Base Stock and CM13 Based)? Cheers.
Thank you DeadSquirrel01 it works perfectly on my A500G running stock marshmallow 6.0.1. Great work
oss_mosis said:
Thanks for this contribution, try it just have time. For now, I walk with your version of TWRP working well. This CTR Recovery is compatible for install ROMs Marshmallow (Base Stock and CM13 Based)? Cheers.
Click to expand...
Click to collapse
Yes you can install roms
meemb said:
Thank you DeadSquirrel01 it works perfectly on my A500G running stock marshmallow 6.0.1. Great work
Click to expand...
Click to collapse
Thanks for the support
you welcome brother
DeadSquirrel01 said:
Yes you can install roms
Thanks bro, unfortunately I have not been able to prove that the screen of my Galaxy A5 is broken and the phone is unusable for now, but I have already shared this Post on Facebook Group so that other users go testing, any news will be reporting here.
A hug. :good:
Click to expand...
Click to collapse
DeadSquirrel01 said:
Yes you can install roms
Thanks bro, unfortunately I have not been able to prove that the screen of my Galaxy A5 is broken and the phone is unusable for now, but I have already shared this Post on Facebook Group so that other users go testing, any news will be reporting here.
A hug. :good:
Click to expand...
Click to collapse
Thanks bro
Nice Recovery.. Succesfully rooted my stock 6.0.1 by flashing supersu (you can flash this file to root on any android which have custom recoveries) on this recovery. It is like stock recovery but with a lot of features.
@DeadSquirrel01 works well on A500F (Duos). Also i tried to get stuck in recovery mode with no succes . So i can say it`s better than twrp. I was waiting for this moment since i got the phone . Many many thanks! Cheers!
LE: Wait a second... So how this recovery has almost 3 months and isn`t that known?
LE2: Some feedback - mount usb storage doesn`t do anything (yes i have sdcard). Also no adb support. So is kinda impossible to push files into phone while it`s in recovery...
corsicanu said:
@DeadSquirrel01 works well on A500F (Duos). Also i tried to get stuck in recovery mode with no succes . So i can say it`s better than twrp. I was waiting for this moment since i got the phone . Many many thanks! Cheers!
LE: Wait a second... So how this recovery has almost 3 months and isn`t that known?
LE2: Some feedback - mount usb storage doesn`t do anything (yes i have sdcard). Also no adb support. So is kinda impossible to push files into phone while it`s in recovery...
Click to expand...
Click to collapse
You can only use sideload regarding adb and i think it isn't known coz everyone use only twrp now
DeadSquirrel01 said:
You can only use sideload regarding adb and i think it isn't known coz everyone use only twrp now
Click to expand...
Click to collapse
Personally i`m more with CWM.. Simple and yet so complex. TWRP is a bit more polished on the UI side, but that bug that keeps me in the recovery drives me crazy [emoji35] . This CTR recovery it`s able to reset the flag and push the device out of recovery... So it`s better IMO.
Anyway i read here and there that Nougat based roms can be flashed in CWM 6.0.5.x so i`ll try to port Philz latest recovery on our device, since i had it for years on my retired devices. Thanks for all your work and for the source!
LE: Sideload doesn`t work since adb isn`t enabled on the recovery..
corsicanu said:
Personally i`m more with CWM.. Simple and yet so complex. TWRP is a bit more polished on the UI side, but that bug that keeps me in the recovery drives me crazy [emoji35] . This CTR recovery it`s able to reset the flag and push the device out of recovery... So it`s better IMO.
Anyway i read here and there that Nougat based roms can be flashed in CWM 6.0.5.x so i`ll try to port Philz latest recovery on our device, since i had it for years on my retired devices. Thanks for all your work and for the source!
LE: Sideload doesn`t work since adb isn`t enabled on the recovery..
Click to expand...
Click to collapse
Windows adb? With linux adb works perfectly but with windows adb not ¯\_(ツ)_/¯
And... good luck with your philz port
DeadSquirrel01 said:
Windows adb? With linux adb works perfectly but with windows adb not ¯\_(ツ)_/¯
And... good luck with your philz port
Click to expand...
Click to collapse
Thanks... It`s on my todo list but i don`t have enough time to do anything now. About the adb - shouldn`t be same thing? What`s the difference between adb in linux and windows? Wait to switch linux to test. Could also be something specific to my device since you made the recovery for FU and i have F.. Cheers!
So i rebooted in linux and here`s the output:
Code:
[email protected] ~ $ adb devices
List of devices attached
???????????? no permissions
[email protected] ~ $ adb shell
error: insufficient permissions for device
And when tryin` to Mount USB Mass storage this is the output:
Code:
Error mounting /dev/sr1 at /media/hades/671D-12F5: Command-line `mount -t "vfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,utf8=1,showexec,flush" "/dev/sr1" "/media/hades/671D-12F5"' exited with non-zero exit status 32: mount: /dev/sr1 is write-protected, mounting read-only
mount: /dev/sr1: can't read superblock
I have 32gb class 10 sdcard formatted as fat32.. And from what i see it tries to mount as vfat, this for sure is from the fstab..
Any ideas?
corsicanu said:
Thanks... It`s on my todo list but i don`t have enough time to do anything now. About the adb - shouldn`t be same thing? What`s the difference between adb in linux and windows? Wait to switch linux to test. Could also be something specific to my device since you made the recovery for FU and i have F.. Will edit this post in a minute. Cheers!
Click to expand...
Click to collapse
Since it's a recovery it works with any a500xx variant (same chipset ) and also it's the same thing with roms for example on my pac-rom rom noone said it doesn't boot on a500xx. Regarding adb, bad drivers i think
I don't know how much i can thank you, when i use TWRP my phone won't boot into the system but it works perfectly with this recovery
Qcraft said:
I don't know how much i can thank you, when i use TWRP my phone won't boot into the system but it works perfectly with this recovery
Click to expand...
Click to collapse
So use thiz
What I like in it is while I am in this recovery and my phone is charging, and I select reboot, it boot to the system unlike other recovery.
I had installled custom ROMs, Flashed kernel image, and used ADB sideload so far
akil777 said:
What I like in it is while I am in this recovery and my phone is charging, and I select reboot, it boot to the system unlike other recovery.
I had installled custom ROMs, Flashed kernel image, and used ADB sideload so far
Click to expand...
Click to collapse
anyway if in twrp it doesn't reboot you can run $ reboot in advanced->terminal
DeadSquirrel01 said:
anyway if in twrp it doesn't reboot you can run $ reboot in advanced->terminal
Click to expand...
Click to collapse
Yep.. this terminal has commands nearly or exactly like linux ubuntu.
akil777 said:
Yep.. this terminal has commands nearly or exactly like linux ubuntu.
Click to expand...
Click to collapse
Yes, the commands of any linux distro, but they are less... only indispensable commands

[Experimental] [Unofficial] [2018-06-08] Lineage

Hi all,
Here is a Lineage GSI with opengapps integrated, which works on OP6.
https://drive.google.com/open?id=1ailBjWzmlY0F99EwB_14A7Hdx2hSHUUG
To flash it, please follow instructions at https://forum.xda-developers.com/oneplus-6/how-to/treble-mistery-solved-developer-t3800716
Here is also a RR GSI with opengapps integrated:
https://drive.google.com/open?id=1qAU-_4gJvOGFGZXX4iH_lK7uxtfnARIT
And for AOSP, you can look at:
https://forum.xda-developers.com/pr...-development/experimental-phh-treble-t3709659
This is actually just an early-release of my global Lineage GSI effort
So future updates of this post will basically mirror that thread
Credits to @Exelios for offering me an OP6 which made this possible
And also obvious credits to Lineage devs for, well... you know... Lineage.
What doesn't work?
- volte
- Night screen filter
- you tell me
How to root?
Install phh's Superuser from Play Store
This has been tested on OxygenOS 5.1.5
Note that this is a different version then the Lineage GSI in the Treble forums, that one does not work on the OP6 for now!
You need this version from this thread!
In case someone missed it.
won't magsik work?
I will trade you my soul and the name of my first child for a Remix Resurrection ROM adapted for OP6!
Edit: Apologies - forgot to add - awesome work guys!!
@phhusson
A great addition for 1+6, thanks a lot.
Thank you sir !
I am getting infinite loop on lineage boot logo.
tried reflashing using proper instructions 5 times
Nick502 said:
I am getting infinite loop on lineage boot logo.
tried reflashing using proper instructions 5 times
Click to expand...
Click to collapse
Same same, no boot
DocRambone said:
Same same, no boot
Click to expand...
Click to collapse
Boot for days
What does GSI stand for?
Been a couple of years since i used AOSP
I'm uploading a zip you guys can you to flash only works on Windows and it's pretty self explanitory
I have an 256GB version, only v18 aosp boot.
GSI Installer
GSI Installer OnePlus 6 V.1
FlashAllToBothSlots
Please place in the root of the folder
THIS WILL WIPE YOUR DATA
USAGE
1.Download any system image you want
2.Extract the zip and place it wherever
3.Place you system.img in the root of directory (it needs to be system.img so if its not named that it wont work.)
4. Run the flash-all.bat and wait for it to finish
5. Profit!.
5.a IF YOU ARE NOT BOOTING PLEASE RUN THIS COMMAND ON A FRESH REBOOT "adb logcat > logforgsi.txt" and give it atleast 30 seconds of not booting.
5.b Then hit CTRL+C to stop it then find the logcat (should be in the directory you were in cmd prompt with) and upload it and send it to @phhusson
This fastboot code for the vbmeta has to be with" img" at the end or without?.
disable-verification flash vbmeta vbmeta.img
chrisaw said:
I will trade you my soul and the name of my first child for a Remix Resurrection ROM adapted for OP6!
Edit: Apologies - forgot to add - awesome work guys!!
Click to expand...
Click to collapse
There you go
https://drive.google.com/open?id=1qAU-_4gJvOGFGZXX4iH_lK7uxtfnARIT
joemossjr said:
GSI Installer OnePlus 6 V.1
THIS WILL WIPE YOUR DATA
USAGE
1.Download any system image you want
2.Extract the zip and place it wherever
3.Place you system.img in the root of directory (it needs to be system.img so if its not named that it wont work.)
4. Run the flash-all.bat and wait for it to finish
5. Profit!.
5.a IF YOU ARE NOT BOOTING PLEASE RUN THIS COMMAND ON A FRESH REBOOT "adb logcat > logforgsi.txt" and give it atleast 30 seconds of not booting.
5.b Then hit CTRL+C to stop it then find the logcat (should be in the directory you were in cmd prompt with) and upload it and send it to @phhusson
Click to expand...
Click to collapse
Nogo, reboots to stock recovery.
DocRambone said:
Nogo, reboots to stock recovery.
Click to expand...
Click to collapse
what version do you have
joemossjr said:
what version do you have
Click to expand...
Click to collapse
8/256
please use the command fastboot getvar all and see which slot you are on then if your on a or b please use the command fastboot --set-active=_(whatever slot your on) then try
joemossjr said:
GSI Installer OnePlus 6 V.1
THIS WILL WIPE YOUR DATA
USAGE
1.Download any system image you want
2.Extract the zip and place it wherever
3.Place you system.img in the root of directory (it needs to be system.img so if its not named that it wont work.)
4. Run the flash-all.bat and wait for it to finish
5. Profit!.
5.a IF YOU ARE NOT BOOTING PLEASE RUN THIS COMMAND ON A FRESH REBOOT "adb logcat > logforgsi.txt" and give it atleast 30 seconds of not booting.
5.b Then hit CTRL+C to stop it then find the logcat (should be in the directory you were in cmd prompt with) and upload it and send it to @phhusson
Click to expand...
Click to collapse
Looking a the instructions in the OP it shows vbmeta should be flashed after system.
So Boot > System > vbmeta
In the .bat it is flashed before system
So Boot > vbmeta > system
I am just wondering if the order matters as I think it does if I am not mistaken.
I am going to try this later and just trying to clarify things a bit.

Flashing TWRP as Image - Possible?

TWRP 3.3 is out but only the IMG version is available in the TWRP site. Flashable ZIP file isn't available yet. I can fastboot boot into TWRP.img but since this is an A/B phone i guess i can't flash the image to any partition? Is there a way i can do that or do i have to wait until TWRP releases ZIP files for the update?
Thanks!
Helhound0 said:
TWRP 3.3 is out but only the IMG version is available in the TWRP site. Flashable ZIP file isn't available yet. I can fastboot boot into TWRP.img but since this is an A/B phone i guess i can't flash the image to any partition? Is there a way i can do that or do i have to wait until TWRP releases ZIP files for the update?
Thanks!
Click to expand...
Click to collapse
In order to flash the recovery as an image, you need to pack it inside a boot.img and then flash the boot partition.
The recovery itself is just the ramdisk from the boot.img. when you boot to recovery, the ramdisk gets unpacked and used as the root file system. When you boot to the os, the ramdisk is skipped and the system partition is mounted as the root partition.
There are some ROM kitchens that should be able to do this. I think there is a binary in the twrp installer that well let you do all this from your phone.
From the command line, you would use the unpackbootimage binary to dump your boot.img, gunzip and cpio to dump and repack the ramdisk, then mkbootimg to pack it all back up.
There might be an extra step to sign the boot.img, but you can take a look at the twrp installer to see if it does any extra magic at the end.
So yes it's possible, but certainly not a "flash it and forget it" kind of thing.
Lastly, isn't there an option to install twrp from inside twrp? I thought I read that in the change log. Maybe I should have lead with this?:good:
---------- Post added at 01:42 PM ---------- Previous post was at 01:36 PM ----------
Yup, it's in the XDA post.
Going forward, users will be presented with a new “install recovery ramdisk” option in recovery. This means that users can boot TWRP and then install it without downloading a separate ZIP file.
Click to expand...
Click to collapse
https://www.xda-developers.com/twrp-3-3-0-release/
I haven't flashed it yet, so I can't say if this is implemented in our version yet.
gee one said:
In order to flash the recovery as an image, you need to pack it inside a boot.img and then flash the boot partition.
The recovery itself is just the ramdisk from the boot.img. when you boot to recovery, the ramdisk gets unpacked and used as the root file system. When you boot to the os, the ramdisk is skipped and the system partition is mounted as the root partition.
There are some ROM kitchens that should be able to do this. I think there is a binary in the twrp installer that well let you do all this from your phone.
From the command line, you would use the unpackbootimage binary to dump your boot.img, gunzip and cpio to dump and repack the ramdisk, then mkbootimg to pack it all back up.
There might be an extra step to sign the boot.img, but you can take a look at the twrp installer to see if it does any extra magic at the end.
So yes it's possible, but certainly not a "flash it and forget it" kind of thing.
Lastly, isn't there an option to install twrp from inside twrp? I thought I read that in the change log. Maybe I should have lead with this?:good:
---------- Post added at 01:42 PM ---------- Previous post was at 01:36 PM ----------
Yup, it's in the XDA post.
https://www.xda-developers.com/twrp-3-3-0-release/
I haven't flashed it yet, so I can't say if this is implemented in our version yet.
Click to expand...
Click to collapse
Yes i got to know about the update with this Article, But I don't get a “install recovery ramdisk” option anywhere in my recovery when i boot into 3.3. Besides the article says this:
the team will offer installer ZIPs this time around to give people a chance to update from older versions, but future TWRP releases won’t have separate installer scripts.
Click to expand...
Click to collapse
Helhound0 said:
Yes i got to know about the update with this Article, But I don't get a “install recovery ramdisk” option anywhere in my recovery when i boot into 3.3. Besides the article says this:
Click to expand...
Click to collapse
I just spoke with the device TWRP device maintainer for the OnePlus 6T and he instructed me to make this change in the device tree.
Add
TW_INCLUDE_REPACKTOOLS := true
Into
boardconfig.mk
I'll try this out when i get back home later and post an update.
I've made a zip for it and attached it. What I did was download the zip for another device (fajita I believe), download the image for this device, extract the ramdisk from the image using magiskboot, replace the ramdisk inside the zip with the one from the image, and sign it using the default testkey. Steps to install the zip:
1. Update LineageOS so that I have a boot image with no older TWRP (may not be necessary, but better safe than sorry). I DID NOT REBOOT YET! (Although I don't think rebooting would've caused problems, I just didn't want to deal with rebooting twice)
2. Install the modded TWRP zip from Magisk Manager (not from TWRP itself). DO NOT REBOOT, THE ZIP REMOVES MAGISK, WE NEED TO REINSTALL IT FIRST.
3. Go to the main page of Magisk Manager, and install Magisk to the inactive slot
4. Reboot, everything should be fine
Note: this uses the TWRP image from the website, so it does not have the Install to Ramdisk or whatever option. It does however have the rest of the TWRP 3.3 features like being able to decrypt data for Android Pie.
Obviously, full credit goes to the TWRP team, all I did was replace the ramdisk in the zip with the one from the image.
Turns out an official build was released not long after I posted that, oops. There's a zip on the website now.
BeeWall said:
Turns out an official build was released not long after I posted that, oops. There's a zip on the website now.
Click to expand...
Click to collapse
Yeah i came to post about that in the thread. Thanks for your work tho
To anyone interested, they've uploaded a flashable ZIP file for Payton in their website.
You can download it here : https://dl.twrp.me/payton/

[Recovery][Stock OOS]Oxygen OS Stock recovery with ADB enabled

While waiting for a working TWRP for all those needful of the possibility to access their file system from recovery, e.g. for removing an offensive magisk extension preventing boot I repackaged the Stock OOS recovery but with ADB enabled.
Prerequisites:
Oneplus 8 Pro
unlocked bootloader
access to fastboot on the phone
adb and fastboot
Installation:
Reboot the phone to fastboot, then flash the recovery from fastboot with the command
Code:
fastboot flash recovery <filename>
(with <filename> being the name of the recovery in the format of "recovery.img" you wish to flash)
Uninstall:
Same as installation, but flash the original stock recovery instead.
Usage:
Boot up recovery, enter encryption key if file system is encrypted. Then connect the phone to PC and you are ready to go with adb. E.g. by using
Code:
adb shell
to open a shell and access the file system. Magisk modules are located in /data/adb/modules, deleting the corresponding directory there will remove the module in question.
Step-by-step this would be:
Code:
cd /data/adb/modules
to change to the Magisk modules directory
Code:
ls
to list the content of this directory, each module has its own directory, usually with a well-recognizable name
Code:
rm -r <directory>
to delete the directory in question. Tip: in console TAB-autocomplete works
Downloads:
10.5.4 BA Recovery
Modified 10.5.4 BA recovery from GDrive
Original 10.5.4 BA recovery from Gdrive
10.5.5 BA Recovery
Modified 10.5.5 BA recovery from GDrive
Original 10.5.5 BA recovery from Gdrive
10.5.6 BA Recovery
Modified 10.5.6 BA recovery from GDrive
Original 10.5.6 BA recovery from Gdrive
Notes of caution:
ADB security is disabled as I could not get the recovery to allow for authorizing a connected computer. As a consequence any computer connected is automatically authorized in ADB, although with encrypted filesystem at least no data is accessible without the key.
with direct ADB access to your file system you can easily wreck you phone requiring a factory reset or even reinstallation of the OS from fastboot - please be careful on what you are doing
Credits: Thanks to osm0sis for Android kitchen and all great developers for the Oneplus devices, specifically mauronofrio for his TWRP efforts.
Description of method to modify recovery by yourself:
Prerequisites:
Android Image Kitchen (credit to osm0sis for providing this tool)
the original recovery image file (henceforth called "recovery.img"). You can extract this yourself from an update zip file by unpacking "payload.bin" and then use a tool like payload_dumper (credit to vm03 for providing this) to extract the recovery.img file
Now do the following:
unpack image with Image Kitchen --> this will create a "ramdisk" and a "Split_img" directory with the unpacked content within
navigate into the "ramdisk" folder and use a text editor (on windows preferably Notepad++) to edit the file "prop.default"
look for entry "ro.adb.secure" and change entry value from "1" to "0". Note this entry can occur multiple times (I noticed twice), change each --> this will prevent adb from asking for authorization (the recovery does not provide such a dialogue)
look for entry "ro.debuggable" and change this from "0" to "1" --> this actually enables adb
look for entry "ro.secure" and change this from "1" to "0" --> may be unnecessary but I wanted to avoid brick in case a modified recovery would result in such a behaviour
save textfile
repack the image with Android Image Kitchen and voila:
you have a new modified recovery image you can flash
Thanks for this...
On fastboot we have to flash the modified recovery img?
EDIT : Nevermind haven't read the whole OP
I have a noob question: this won't affect data or magisk right?
To remove a module , command should not be :
( rm -rf < directory> ) ?...
cultofluna said:
To remove a module , command should not be :
( rm -rf < directory> ) ?...
Click to expand...
Click to collapse
Thanks for your comment, but technically no
The - f flag is used to omit prompts before each removal, which may or may not be helpful - depending in how sure the user is on what he does
I chose the safer variety in my example, confident that users with more knowledge can always look at the "rm" man page to decide what command they want to use...
But again thanks, I do appreciate your help!
HottieLinus said:
I have a noob question: this won't affect data or magisk right?
Click to expand...
Click to collapse
Correct, the recovery resides in a separate partition and flashing it doesn't do anything anywhere else.
In fact the recovery looks and behaves the same when booting into it, the change only becomes apparent by being able to use adb in recovery.
@s3axel can we use this recovery to escape bootloop due to install unsupported theme or any issue from substratum?
Or maybe just flashing stock boot IMG on fastboot is enough...
cultofluna said:
@s3axel can we use this recovery to escape bootloop due to install unsupported theme or any issue from substratum?
Or maybe just flashing stock boot IMG on fastboot is enough...
Click to expand...
Click to collapse
It should be possible as the recovery gives you full access to your file system and so, given you know what to remove/change, it should also be possible to recover from issues as you mentioned.
My problem: I have no idea where themes or substratum additions are installed directory-location wise, will need to research a bit. Or maybe someone else can chime in on this, then I could update OP with info on that as well...
Ok one more question..
Can we flash zips through the recovery?...
Via ADB sideload?.. maybe..
cultofluna said:
..Can we flash zips through the recovery?...Via ADB sideload?..
Click to expand...
Click to collapse
I don't know but I doubt it as to my knowledge ADB sideload is a special mode that needs to be activated e.g. in TWRP. So far I didn't have the need to use such a functionality and thus haven't tried it :angel:
s3axel said:
I don't know but I doubt it as to my knowledge ADB sideload is a special mode that needs to be activated e.g. in TWRP. So far I didn't have the need to use such a functionality and thus haven't tried it :angel:
Click to expand...
Click to collapse
Ok...
Because on pixel4 XL you can reboot to stock recovery and choose the the option ADB sideload...
And from there you can flash a custom ROM...etc..
Updated OP with 10.5.5 recovery..
s3axel said:
Updated OP with 10.5.5 recovery..
Click to expand...
Click to collapse
That recovery looks like it's for BA. Does that recovery work on AA as well?
---------- Post added at 08:50 PM ---------- Previous post was at 08:48 PM ----------
s3axel said:
I don't know but I doubt it as to my knowledge ADB sideload is a special mode that needs to be activated e.g. in TWRP. So far I didn't have the need to use such a functionality and thus haven't tried it :angel:
Click to expand...
Click to collapse
Is the OnePlus 8 pro system partition dynamic? Meaning it'll be an absolute nightmare to ever get TWRP like the OP 7T series? I really hope not, flashing through ADB for everything sucks.
Burt Squirtz said:
That recovery looks like it's for BA. Does that recovery work on AA as well?
---------- Post added at 08:50 PM ---------- Previous post was at 08:48 PM ----------
Is the OnePlus 8 pro system partition dynamic? Meaning it'll be an absolute nightmare to ever get TWRP like the OP 7T series? I really hope not, flashing through ADB for everything sucks.
Click to expand...
Click to collapse
Yep..
Definitely dynamic partitions...
Don't expecting a fully working twrp...
You can find a chinese twrp that boots and decrypt..
But sources are unknown...
cultofluna said:
Yep..
Definitely dynamic partitions...
Don't expecting a fully working twrp...
You can find a chinese twrp that boots and decrypt..
But sources are unknown...
Click to expand...
Click to collapse
do you have a link to that Chinese TWRP by chance? And how would I initially flash it, adb? Or Could I probably go through magisk manager?
Burt Squirtz said:
do you have a link to that Chinese TWRP by chance? And how would I initially flash it, adb? Or Could I probably go through magisk manager?
Click to expand...
Click to collapse
That Chinese TWRP violates glp so it cannot be shared here on xda..And if were you I woulnd be using that anyway..Just my two cents
pyry666 said:
That Chinese TWRP violates glp so it cannot be shared here on xda..And if were you I woulnd be using that anyway..Just my two cents
Click to expand...
Click to collapse
What an incredibly helpful response. Sorry but if there's something that'll decrypt and allow me to backup and recover, of course I'm going to try and find it. And I suspect most other people here would too.
Burt Squirtz said:
That recovery looks like it's for BA. Does that recovery work on AA as well?
Click to expand...
Click to collapse
I don't know presently, usually I compare recoveries or I (or other users) add recoveries for other regions which they made by themselves. When recoveries are the same of course they can be used
RIght now I cannot download the 10.5.5 AA firmware (download aborts after some time), I'll add the recovery once this is working... EDIT: seems OP pulled the downloads, so no luck at the moment...
If there is a working twrp in China then perhaps it's worth making contact with them to see if either:
A) they can let you have it
B) they can help you fix this one?
It's presume the former would make the most sense, with permission I see no problem in obtaining it or linking it, certainly not taking about it. Makes no sense to just avoid an obvious assist whilst we all struggle without twrp.

Magisk v21 on android 11: bootloop at bootloader when flashing magisk patched img

I've been waited for Magisk v21 released by John Wu this morning, but I ran into some problems
What I've done
- download stock image file from Google official site
- follow the instruction given by John Wu at GitHub wiki
- run command
Code:
adb shell magisk --remove-modules
- when i flash the patched boot.img file, it stuck on the *G logo* with progress bar under it.
- After a certain period of time, it comes back to bootloader with a prompt saying: "no valid slot to boot".
What i've tried:
- redo all processes, no working
- switch active slot to both a & b, none working
- re-patch the stock boot.img file use different Magisk Manager version. The ones i tried: v8.0.0-Beta(offers Magisk v21), v8.0.0-Stable(offers Magisk v20.4), Canary version (offers Magisk Canary who claims to support android 11)
- change the command
HTML:
fastboot flash boot ***.img
to
HTML:
fastboot flash boot_a ***.img
&
HTML:
fastboot flash boot_b ***.img
then run
HTML:
fastboot reboot
. same result as said before
Basic info:
- Device: Pixel 3 (blueline), android 11 (build number RP1A.200720.009), latest android security update & Google play system update.
- Magisk: Magisk Manager v8.0.0 (released hours ago), Magisk v21 is suppose to be installed
Is patched boot.img filesize ~32 or ~64mb?
I ran into the same problem. My phone is a Pixel 2 XL running Android 11. However, I was not patient enough to wait for the "no valid slot to boot" message. After waiting for 5-10 minutes, I did a factory reset.
I followed the installation instruction that were posted by John Wu.. (As a new user, I am not allowed to post an outside link)
The displayed Magisk installation messages do not suggest a problem:
- Device platform: arm64-v8a
- Copying image to cache
- Unpacking boot image
- Checking ram disk status
- Stock boot image detected
- Patching ram disk
- Repacking boot image
***************************
Output file is written to
/storage/emulated/0/Download/magisk_patched.img
***************************
- All Done!
The boot.img and magisk_patched.img files have both a file size of 41943040 bytes. This is a different from previous Magisk version. For instance, with Magisk 20.4 and Android 10, the file sizes of boot.img and magisk_patched.img were 41943040 and 25747456, respectively. Thus, the patched file was smaller than the original.
done
dmk16 said:
Is patched boot.img filesize ~32 or ~64mb?
Click to expand...
Click to collapse
the stock & patched boot.img are both 65535KB large, which is weird and also mentioned by @red stapler
red stapler said:
I ran into the same problem. My phone is a Pixel 2 XL running Android 11. However, I was not patient enough to wait for the "no valid slot to boot" message. After waiting for 5-10 minutes, I did a factory reset.
I followed the installation instruction that were posted by John Wu.. (As a new user, I am not allowed to post an outside link)
The displayed Magisk installation messages do not suggest a problem:
- Device platform: arm64-v8a
- Copying image to cache
- Unpacking boot image
- Checking ram disk status
- Stock boot image detected
- Patching ram disk
- Repacking boot image
***************************
Output file is written to
/storage/emulated/0/Download/magisk_patched.img
***************************
- All Done!
The boot.img and magisk_patched.img files have both a file size of 41943040 bytes. This is a different from previous Magisk version. For instance, with Magisk 20.4 and Android 10, the file sizes of boot.img and magisk_patched.img were 41943040 and 25747456, respectively. Thus, the patched file was smaller than the original.
Click to expand...
Click to collapse
Seems like we're in the same boat here lol, is this enough proof for a legit bug issue to John?
red stapler said:
The boot.img and magisk_patched.img files have both a file size of 41943040 bytes. This is a different from previous Magisk version.
Click to expand...
Click to collapse
DaddyTony said:
the stock & patched boot.img are both 65535KB large, which is weird and also mentioned by @red stapler
Click to expand...
Click to collapse
The patched boot image is supposed to be the same size as the original now.
From the v21 changelog:
[MagiskBoot] Pad boot images to original size with zeros
Click to expand...
Click to collapse
nogaff said:
The patched boot image is supposed to be the same size as the original now.
From the v21 changelog:
Click to expand...
Click to collapse
Glad to hear, hope this indicates patch is successfully done?
Why not:
adb reboot bootloader
fastboot boot twrp-xxxx.img
adb push magisk-xxxx.zip /tmp
adb shell twrp install /tmp/magisk-xxxx.zip
adb reboot system
Let the magisk zip update script figure everything out...
Its what i do on Pixel 2 XL, works every time...10/11
So far, what we've seen that is causing issues with Android 11 and Magisk is usually either having incompatible modules installed (the brand new Safe Mode should take care of that, see the FAQ for details), or having TWRP installed to your device (it'll cause a conflict and the device won't boot, install the stock recovery and only use TWRP booted).
I forgot to mention that I didn't install or use a custom recovery, such as TWRP. Using the stock recovery.
73sydney said:
Why not:
adb reboot bootloader
fastboot boot twrp-xxxx.img
adb push magisk-xxxx.zip /tmp
adb shell twrp install /tmp/magisk-xxxx.zip
adb reboot system
Let the magisk zip update script figure everything out...
Its what i do on Pixel 2 XL, works every time...10/11
Click to expand...
Click to collapse
Sorry but i don't think Pixel 3 have Teamwin (TWRP) support of android 11?
Didgeridoohan said:
So far, what we've seen that is causing issues with Android 11 and Magisk is usually either having incompatible modules installed (the brand new Safe Mode should take care of that, see the FAQ for details), or having TWRP installed to your device (it'll cause a conflict and the device won't boot, install the stock recovery and only use TWRP booted).
Click to expand...
Click to collapse
I forgot to mention that i run this command before install magisk patched boot.img
Code:
adb pm shell magisk --remove-modules
I didn't have TWRP installed on my device, don't seem to have TWRP for Pixel 3 on android 11.
DaddyTony said:
Sorry but i don't think Pixel 3 have Teamwin (TWRP) support of android 11?
Click to expand...
Click to collapse
Theres no TWRP support of my Pixel 2 XL either, but it works
We just dont install it, we fastboot to it
73sydney said:
Theres no TWRP support of my Pixel 2 XL either, but it works
We just dont install it, we fastboot to it
Click to expand...
Click to collapse
Just tried boot into TWRP img, failed. It just says:
Code:
FAILED (remote: 'Error verifying the received boot.img: Invalid Parameter')
Googled it & find out TWRP's a deprecated/no longer recommended way to install Magisk. And according to John Wu's installation instruction, it is no longer supported in modern models.
Due to this reason, we no longer recommend installing Magisk through custom recoveries on modern devices.
Click to expand...
Click to collapse
BTW he also said the "patch image" method is guaranteed to work 100% lol, should we let him know hhh
--------------------
edit:
Just find out Pixel 3 (blueline) has **NO** official support of TWRP v3.4+, but Pixel 3 XL (crosshatch) has it. How ironic.
and I wonder if TWRP v3.4+ support android 11?
DaddyTony said:
Just tried boot into TWRP img, failed. It just says:
Code:
FAILED (remote: 'Error verifying the received boot.img: Invalid Parameter')
Googled it & find out TWRP's a deprecated/no longer recommended way to install Magisk. And according to John Wu's installation instruction, it is no longer supported in modern models.
BTW he also says the "patch image" method is guaranteed to work 100% lol, should we let him know hhh
Click to expand...
Click to collapse
Hmmm, disappointing
Ive literally tried the image patch method once, a lot of faffing about, I always use the TWRP method, easy peasy at least for older device
....we no longer recommend installing Magisk through custom recoveries on modern devices. The custom recovery installation method exists mostly for legacy support.
Download the Magisk installer zip
Reboot to custom recovery
Flash the zip and reboot
Check whether Magisk Manager is installed. If it isn’t installed automatically, manually install the APK.
Click to expand...
Click to collapse
Guess ill be happy to remain a legacy device user
This saved my day:
Code:
fastboot --set-active=b
You might need to use "a" instead.
In my case the kernel was loaded and started and Android startup was hanging.
I guess we have to wait until this is fixed.
Edit: Pixel 3a XL, latest Android 11
Hey all, i have a pixel 2 XL and I'm also stuck in bootloop. However i can't find how to do a factory reset. Could you help me?
polyxn said:
Hey all, i have a pixel 2 XL and I'm also stuck in bootloop. However i can't find how to do a factory reset. Could you help me?
Click to expand...
Click to collapse
Which version of Android?
Do you have TWRP installed?
If you do people have been posting that going to Advanced, then tapping Fix Bootloop may work
Otherwise find the boot image of the ROM you have installed, and flash that to the device
If youre on Android 11 on the Pixel, as i found out myself via bootloop, do NOT install TWRP, just fastboot to it to flash zips
M66B said:
This saved my day:
Code:
fastboot --set-active=b
You might need to use "a" instead.
In my case the kernel was loaded and started and Android startup was hanging.
I guess we have to wait until this is fixed.
Edit: Pixel 3a XL, latest Android 11
Click to expand...
Click to collapse
I used this command (and tried to boot in slot a), the patched img still won't boot.
Did you managed to flash Magisk with patched boot file?

Categories

Resources