System encrypted, /dev/block is read-only - Redmi Note 9 Questions & Answers

Hi, I have a redmi note 9 that I wanted to mod but I had a lot of problems modding it. I initially installed crDroid 8.7 but the control center animation was lagging and the battery drains fast, so I decided to change the ROM with Project Elixir (Android 12 all ROMs). I saw that crDroid 8.9 came out (September 22, 2022) and there had been some notable changes, as the battery did not run out anymore the animations were fluid, but i was not able to get working google apps.
I tried everything and it wasn't right. (Nik, OpenGapps, MTG nothing) indeed I installed the gapps I had on 8.7 and them didn't work .. So I decided to move to pixel experience android 12 but I had these problems:
On all the roms that I have installed (except I think MIUI) the system is encrypted. I tried flashing a zip, via commands, via recovery but nothing the system is encrypted. I can't access it and in addition I wanted to change the bootanimation but I can't move the zip because it says it's read only and following these commands too I couldn't do it:
adb root
adb disable-verity
adb reboot
adb remount
adb shell
mount -o rw,remount /system
for these commands i also used ADB Sideload (ofc) but also some zips
It says the /dev /<number>/block is read-only and I have not been able to unlock it. (I tried with all these recoveries: TWRP, SHRP (SkyHawk, OrangeFox [UNOFFICIAL but is only for A11]). (If I go from TWRP to sdcard / I have all the files encrypted. I have the phone rooted with magisk.
In addition, I also had problems formatting the phone because the system with both TWRP and SHRP was not deleted or if I restarted the phone after formatting the ROM would open again so to format it I used Pixel Experience which has worked very well so far.

But custom rom already have ability to rw
Anyway you're lucky there thread available google it like
Universal method to get rw

Idk. I have installed Project Elixir, crDroid and this Pixel Experience and are encrypted.
I already googled it....

/dev/* will be always read-only.

And how i can modify the boot animation? Files are encrypted and the zip is in /system/product/media/.zip

/dev/ and /system/ are not same.
Stock MIUI is system read-only.
If you want to mount system as read-write, you need "universal mount system r/w" by @lebigmac
[Closed] Universal SystemRW / SuperRW feat. MakeRW / ro2rw (read-only-2-read/write super partition converter)
Welcome to the one and only, the original, universal, System-RW / Super-RW feat. Make-RW / ro2rw (read-only-2-read/write super partition converter) by lebigmac Also known as: THE-REAL-RW, FULL-RW, EXT4-RW, EROFS-RW, EROFS-2-RW, F2FS-RW...
forum.xda-developers.com

Oh ok, it will work on A12?

I'm not sure.

Ok so tried flashing systemrw_flashable (Universal RW) with sideload bcs i have crypted files.
This is the error that it gave me:
Extracting ...
There was an error extracting the file. Please install unzip and try again.
I tried flashing with SHRP (TWRP based) bcs twrp can't work with adb sideload (for me).
Edit: searched on xda the problem, i installed the BusyBox module in magisk (From Fox Modules Manager) but nothing to do, still same error.

Deltwin said:
Oh ok, it will work on A12?
Click to expand...
Click to collapse
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.
Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...
If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!

lebigmac said:
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.
Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...
If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!
Click to expand...
Click to collapse
But how can be you make sure without some beta testers you neef guys like me and this op who have device in hand to test it and give you feedback

lebigmac said:
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.
Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...
If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!
Click to expand...
Click to collapse
Oh so it cant work in sideload... Good tip if it will work u made a very good script

To be honest I've never used this sideload feature before... What are the advantages of sideloading versus flashing the .zip as usual?
Mr Hassan said:
But how can be you make sure without some beta testers you neef guys like me and this op who have device in hand to test it and give you feedback
Click to expand...
Click to collapse
That's a good idea. I should release an open beta before releasing the final program.
That way we can make sure it works on as many devices as possible

lebigmac said:
To be honest I've never used this sideload feature before... What are the advantages of sideloading versus flashing the .zip as usual?
That's a good idea. I should release an open beta before releasing the final program.
That way we can make sure it works on as many devices as possible
Click to expand...
Click to collapse
Thanks for appreciating the idea
Hope we'll get beta soon but is there any idea date how many days still need to release it
Ok let me show my progress
I make my vendor sys odm to ext4
And ser the logs according to logs
I have rw now
OnePlus8:/ # mount | grep "dm-0"
/dev/block/dm-0 on / type ext4 (rw,seclabel,relatime)
OnePlus8:/ # mount | grep "dm-19"
/dev/block/dm-19 on / type ext4 (rw,seclabel,relatime)
OnePlus8:/ # mount | grep "dm-3"
But the weird thing is still not able to edit
Any file in these parts.

lebigmac said:
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.
Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...
If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!
Click to expand...
Click to collapse
How i can run ur script directly from android?
Like on magisk?

Deltwin said:
How i can run ur script directly from android?
Like on magisk?
Click to expand...
Click to collapse
Hi. Please check the Manual Installation and Examples section of the thread in my signature
And if you're running Android 12+ don't forget to disable the sdkCheck() function in the systemrw.sh script file @ line # 425 like this #sdkCheck
It should work if your only problem is the shared_blocks read-only feature. If your device got the new erofs read-only protection feature then you must wait for next version of my script or try your luck one of the copycat imitations that are floating around.
Good luck!

So after an hard brick at work (so i leaved it for 5 hours with redmi logo on lol) and after many steps i reinstalled MIUI with root... it's running A11 so how i can install it? I need to disable the sdkCheck? I think no if you need it on A12...
Second question i need to flash it before the first boot or i can do it after the first boot?

Deltwin said:
So after an hard brick at work (so i leaved it for 5 hours with redmi logo on lol) and after many steps i reinstalled MIUI with root... it's running A11 so how i can install it? I need to disable the sdkCheck? I think no if you need it on A12...
Second question i need to flash it before the first boot or i can do it after the first boot?
Click to expand...
Click to collapse
I thought hard bricks were unrecoverable?
If your Xiaomi device is running Android 10 or 11 then you don't need to disable the sdkCheck() function in my old script.
Ok here are all the necessary steps in chronological order for you
unlock bootloader
flash stock ROM
install systemrw_1.32
root
debloat
customize
enjoy

No it's possible, i tought not but here i am with my redmi note 9..
jk apart i unbrick with SP Flash tool but i had other problems like NVRAM warning (it fixed automatically with updates idk lol..) and the IMEI was deleted but fortunately i had a flashable backup..
I need to flash the stock rom? I have pixel experience with A12/13
Edit: I tried to flash it (i have the file on the microSD) but it gave me this error:
There was an error extracting the file. Please install unzip and try again.

Well my script was designed for stock A10, A11 ROMs ( or A12 if you're lucky and your device only uses the infamous shared_blocks read-only feature + you must disable sdkCheck() function in script itself ) but I don't see why it shouldn't work on a custom ROM as well
Ok let me try this again but only because it's you
Boot phone into Android OS and make sure it's properly rooted
download the systemrw_1.32_BUNDLE_proper.zip and extract it
extract the systemrw_1.32_flashable.zip
copy the systemrw_1.32 folder into /data/local/tmp/ on your phone
open adb shell or terminal app and type
Bash:
adb shell
su
cd /data/local/tmp/systemrw_1.32
chmod +x ./systemrw.sh
./systemrw.sh in=`realpath /dev/block/by-name/super` size=50
Good luck!

Related

Needed: stock "install-recovery.sh"

can someone please upload the stock "install-recovery.sh"?
It's located in /system/etc.
I forgot to backup it, while rooting the device.
I need it for the OTA updates.
thanks
@vel_tins
Do not flash the ota if you are rooted, you might get bootloop. Full unroot your device before attempting to update. Anyhow, the ota will most likely fail since you already modified your system partition. Your best option is to unroot your device and capture the ota link, modify the ota updater-script and remove the lines that are showing "unexpected contents" errors. The original "install-recovery.sh" is still there, supersu renamed it to something like "/system/etc/install-recovery_original.sh". Keep in mind, you might loose your custom recovery if you renamed it back to "install-recovery.sh".
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
^^
??
vel_tins said:
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
Click to expand...
Click to collapse
If you still have the original OTA zip, can you please post it for future reference?
As for TWRP mounting /dev/block/platform/7824900.sdhci/by-name/system, what error message did you get? Try running "ls -l /dev/block/platform/7824900.sdhci/by-name/" in both normal Android and TWRP, then compare the results.
pawitp said:
If you still have the original OTA zip, can you please post it for future reference?
Click to expand...
Click to collapse
No problem
pawitp said:
As for TWRP mounting /dev/block/platform/7824900.sdhci/by-name/system, what error message did you get? Try running "ls -l /dev/block/platform/7824900.sdhci/by-name/" in both normal Android and TWRP, then compare the results.
Click to expand...
Click to collapse
Stock and Cyanogen recovery are working with this partition naming scheme.
But in TWRP, I get the following error message:
Code:
ls: /dev/block/platform/7824900.sdhci/by-name: No such file or directory
For TWRP I have to use the following syntax in recovery.fstab:
Code:
/cache ext4 /dev/block/mmcblk0p29
/system ext4 /dev/block/mmcblk0p25
/data ext4 /dev/block/mmcblk0p31 length=-16384
.........etc.
vel_tins said:
No problem
Stock and Cyanogen recovery are working with this partition naming scheme.
But in TWRP, I get the following error message:
Code:
ls: /dev/block/platform/7824900.sdhci/by-name: No such file or directory
For TWRP I have to use the following syntax in recovery.fstab:
Code:
/cache ext4 /dev/block/mmcblk0p29
/system ext4 /dev/block/mmcblk0p25
/data ext4 /dev/block/mmcblk0p31 length=-16384
.........etc.
Click to expand...
Click to collapse
On TWRP, try running "find /dev/block/platform" and see if anything is created there.
The directory should have been populated by init. See https://android.googlesource.com/pl...0ab94b7d5a888f0b6920b156e5c6a075fa0741a^!/#F0.
That code should also be in TWRP, but something might have prevented it from working properly on this device. You might find some clues in dmesg or TWRP's logs.
Well, eventually I've got it.
In TWRP, the naming is a little bit different from stock or Cyanogen recovery.
I had to change:
Code:
/dev/block/platform/[COLOR="Red"]7824900.sdhci[/COLOR]/by-name/cache <--- STOCK
to
/dev/block/platform/[COLOR="Blue"]soc.0[/COLOR]/by-name/cache <--- TWRP
However, the "/dev/block/mmcblk0p" naming worked also in TWRP, so this was only a minor issue.
vel_tins said:
Well, eventually I've got it.
In TWRP, the naming is a little bit different from stock or Cyanogen recovery.
I had to change:
Code:
/dev/block/platform/[COLOR="Red"]7824900.sdhci[/COLOR]/by-name/cache <--- STOCK
to
/dev/block/platform/[COLOR="Blue"]soc.0[/COLOR]/by-name/cache <--- TWRP
However, the "/dev/block/mmcblk0p" naming worked also in TWRP, so this was only a minor issue.
Click to expand...
Click to collapse
IMO, you should fix TWRP so that it has the same naming convention. Otherwise OTA packages using the "stock" naming convention can't be flashed on TWRP.
Personally, I prefer the "by-name" mapping rather than the "/dev/block/mmcblk0p" because it is harder to make mistakes if you use a name. With numbers, if a wrong number is typed, then you might end up flashing the wrong partition and bricking the device.
EDIT: It might have something to do with the "system/core" repository you've used to build your recovery. Which Android tree did you use to build Cyanogen Recovery and which one did you use to build TWRP?
vel_tins said:
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
Click to expand...
Click to collapse
Hi sir ,
Please share to us , how you do this , because I have status 7. Install-recovery.sh problem
I have stock recovery , and I'm only make a root for my device by kingroot .
Please share update.zip file and tel me how to make ota update
pawitp said:
IMO, you should fix TWRP so that it has the same naming convention. Otherwise OTA packages using the "stock" naming convention can't be flashed on TWRP.
Click to expand...
Click to collapse
Exactly this is the point...
pawitp said:
EDIT: It might have something to do with the "system/core" repository you've used to build your recovery. Which Android tree did you use to build Cyanogen Recovery and which one did you use to build TWRP?
Click to expand...
Click to collapse
I have to correct myself, Cyanogen has exactly the same problem.
I've used the latest CM 12.1 and Omnirom source trees to build TWRP, but with the same result.
TWRP/Cyanogen only detects "soc.0" instead of "7824900.sdhci" and that will break compatibility with OTA packages (Until you patch "updater-script").
So how you made this ota update after all ?
theeteempire said:
So how you made this ota update after all ?
Click to expand...
Click to collapse
OTA doesn't work with rooted devices.
Do a full un-root and try again.
vel_tins said:
OTA doesn't work with rooted devices.
Do a full un-root and try again.
Click to expand...
Click to collapse
I did it , full unroot , I couldn't update even that with full-unroot , I used kingroot for root ,
Also error status 7 , install-recovery. Sh shown on the update after full-unroot my device !!!
can you help me please !!!!!
theeteempire said:
....I used kingroot for root ,
Also error status 7 , install-recovery. Sh shown on the update after full-unroot my device...
Click to expand...
Click to collapse
I would strongly suggest, to open an new thread, because I guess a lot more people will or had run into these issues.
I don't know what Kingsoft (never used it) has modified/replaced, so in your case I would search for a stock "install-recovery.sh" and replace the modified.
Everything else would be too complicated. (You have read my post on the first page).
vel_tins said:
I would strongly suggest, to open an new thread, because I guess a lot more people will or had run into these issues.
I don't know what Kingsoft (never used it) has modified/replaced, so in your case I would search for a stock "install-recovery.sh" and replace the modified.
Everything else would be too complicated. (You have read my post on the first page).
Click to expand...
Click to collapse
So I need the stock install-recovery. Sh ,.
Are you have it ?
vel_tins said:
Exactly this is the point...
I have to correct myself, Cyanogen has exactly the same problem.
I've used the latest CM 12.1 and Omnirom source trees to build TWRP, but with the same result.
TWRP/Cyanogen only detects "soc.0" instead of "7824900.sdhci" and that will break compatibility with OTA packages (Until you patch "updater-script").
Click to expand...
Click to collapse
This is just a guess. Try adding "TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/" to BoardConfig.mk.
If you know C, you might want to try mucking around in system/core/init/devices.c and see why it's behaving that way.
pawitp said:
This is just a guess. Try adding "TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/" to BoardConfig.mk.
.....
Click to expand...
Click to collapse
Seems to work, thanks!
PS: A google search for "TARGET_PLATFORM_DEVICE_BASE" threw only six results, so it doesn't seem to be a very popular flag.
vel_tins said:
Seems to work, thanks!
PS: A google search for "TARGET_PLATFORM_DEVICE_BASE" threw only six results, so it doesn't seem to be a very popular flag.
Click to expand...
Click to collapse
From my experience, you can't rely too much on Google for ROM development. I've found the flag by reading the source file I've previously mentioned.
Sent from my Nexus 4 using XDA Free mobile app

How can I make changes to /system in nougat?

Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
ccaappton said:
Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
Click to expand...
Click to collapse
Hopefully this might help:
1. revert back to unmodified boot image (in TWRP flash from here[/URL or restore your backup from the unmodified boot image] , leave anything else untouched (especially TWRP 3.1.0-0 for EMUI 5)
2. flash this [URL="https://forum.xda-developers.com/showpost.php?p=71588837&postcount=102"]SuperSU image in TWRP (read the comments in the post please ... single bootloop ... then everything is ok and rooted)
3. install JRummy's BusyBox from Google Play (Stephen's won't work)
You are done and good to modify /system.
Note: resulting earthquakes, thunderstorms and spring floods from this work are solely under your own responsibility :laugh:
hakaz said:
Hopefully this might help:
1. revert back to unmodified boot image (in TWRP flash from here[/URL or restore your backup from the unmodified boot image] , leave anything else untouched (especially TWRP 3.1.0-0 for EMUI 5)
2. flash this [URL="https://forum.xda-developers.com/showpost.php?p=71588837&postcount=102"]SuperSU image in TWRP (read the comments in the post please ... single bootloop ... then everything is ok and rooted)
3. install JRummy's BusyBox from Google Play (Stephen's won't work)
You are done and good to modify /system.
Note: resulting earthquakes, thunderstorms and spring floods from this work are solely under your own responsibility :laugh:
Click to expand...
Click to collapse
1. I did a backup of boot partition before phh root, so should be able to restore the backup, instead of download the boot partition from others?
2. Is systemless supersu binaries need be individualized for every phone? Can I download systemless supersu from somewhere more semi-official? I'm not exactly comfortable installing zips from random links. ()
Ad 1. Till now rooting on our P9 works through injection of the su mounting routine into the kernel in boot section (if using a modified kernel + su installation or modifying the kernel during su installation itself doesn't make a difference). So any su installation modifies the boot section and you mess things up if you try to install another su on top of the other. Therefore reverting to the original boot image is mandatory before installation of another su.
Ad 2. The su is compiled against different platforms​ not phones (in our case arm64). So @Chainfire has the different platform variations in his package. The "shady" package in our case is basically the v2.79 stable version of 12/20 2016 (you can unpack both packages and compare them against each other, they are bit for bit equal) but has an P9 specific injection routine to modify the kernel. After installation you have pure su v2.79 stable on board - not more, not less.
Sorry, "normal" SuperSU packages won't work due to lacking the kernel modification (phh uses a modified kernel instead you have to flash separately on P9).
Cheers!
hakaz said:
Ad 1. Till now rooting on our P9 works through injection of the su mounting routine into the kernel in boot section (if using a modified kernel + su installation or modifying the kernel during su installation itself doesn't make a difference). So any su installation modifies the boot section and you mess things up if you try to install another su on top of the other. Therefore reverting to the original boot image is mandatory before installation of another su.
Ad 2. The su is compiled against different platforms​ not phones (in our case arm64). So @Chainfire has the different platform variations in his package. The "shady" package in our case is basically the v2.79 stable version of 12/20 2016 (you can unpack both packages and compare them against each other, they are bit for bit equal) but has an P9 specific injection routine to modify the kernel. After installation you have pure su v2.79 stable on board - not more, not less.
Sorry, "normal" SuperSU packages won't work due to lacking the kernel modification (phh uses a modified kernel instead you have to flash separately on P9).
Cheers!
Click to expand...
Click to collapse
Thanks buddy! I flashed systemless supersu, and stucked in infinite bootloop(it is only once in your post), probably because my model is EVA-AL00. I have to restore the previous boot.img.
ccaappton said:
Quick summary, I can not:
mount -o remount,rw /system in normal mode even with root permission. Error is "Device busy"
modify files in /system in twrp and keep it persistent. It somehow roll back to the stock state after reboot into normal mode.
I'm a long-time linux user, and fairly familiar with rooting in pre-nougat versions. My previous phone is Oneplus-X in LineageOS-14, and I could do whatever I like with the system partition. Recently I received a P9 as present. I updated the rom to B377 and flashed OldDroid's TWRP-3.1.0+phh su. But I can not find a way to modify the /system partition. I need to change a lot of things, like /system/etc/hosts, adding apk into /system/priv-app, etc.
Could someone help?
Click to expand...
Click to collapse
Same here with Oneplus 3T.
I just posted in another post (Google Pixel).
There I just guess it was a new encription way, now Im sure, all three devices with Android 7.1.1.....

[MOD][RECOVERY] Working TWRP recovery for Pixel on Android O

EDIT:
My mod is not needed anymore!
Everything is fine now, the TWRP guys made the decryption in their latest version (3.2.1 at the time of this post) possible, even with android 8.1.
Go ahead and download it from twrp.me. and don't forget to thank them, because it was a LOT of hard work! Google made big changes under the hood, and it took a lot of patience and endurance to adapt.
Big up to @Dees_Troy and the rest of the team!
Hey People! It seems, that after weeks of trying, hundreds of reboots, countless tests, I can present you a working version of TWRP 3.1. for the Pixel with Android O Developer Preview 4.
Edit: and it also works on the final Android O.
But let's not rush into things.. First of all a DISCLAIMER:
This is a TEST release, you are using it at your own risk. If your phone gets damaged in any way, nobody else but you can be held responsible. If you do not agree, stop reading and don't use this mod!
I would like to give credits to the people who helped me, and made all this possible:
First of all, @Chainfire, who did more then you would think Among other things, he was the one who showed me how to use tune2fs and reset quotas on /data, which makes it possible to mount it. Without this , I couldn't even start. So thank you very much!
Of course where would we be without @Dees_Troy and the other TWRP guys (i.e.: CaptainThrowback, nkk71, steadfasterX, _that...), who created and maintain TWRP, and demonstrated some serious patience on IRC , where I was asking them for help. For days. For weeks Thank you guys! You helped a lot!
What is this "mod"?
This is stock, normal TWRP 3.1 compiled from source, for the Google Pixel (sailfish) with some small tweaks to make it possible to mount /data, and decrypt it.
Can you use it on the Pixel XL (marlin)?
I don't know... I don't have a Pixel XL to test. If you want, you can buy me one and I'll be glad to compile, prepare, and test it for you.
EDIT: Chainfire "tested a few zip installs" and those were working for him on the Pixel XL, so maybe it is worth a try guys! - thanks for this CF! -
What happens behind the curtains?
I made some modifications to a script that prepared stuff to make the decryption of /data possible. Now it does a bit more... It copies libraries and binaries from /system and /vendor partitions to /system and /vendor folders, so they can be un-mounted (needed for backup). Basically, the recovery uses the real files/commands of the currently installed android os to prepare and mount /data partition (to make it ready for decrypting).
I updated the fstab file, so TWRP knows what to mount where.
I also changed a few things in the order how services are started during TWRP boot.
This is mostly everything. I was only changing external parts/files/tools of TWRP. The original code, the core is left intact.
How well was it tested?
I have only 1 phone, the pixel. I have only tested on this one phone, and it works for me. Of course I can't be certain it will for you, but you will see if you try it
I tested decrypting of /data, flashing a zip file, making a backup. Didn't dare to test restore yet
How can you try it?
This is not a flashable zip, this is a bootable image. So to use it, you have to put the phone into fastboot mode, and fastboot boot the image.
1. reboot the phone into fastboot mode
- if you have adb: adb reboot bootloader
- if you don't, then turn off the phone and press volume down while turning it on
2. open a terminal and issue the following command:
Code:
fastboot boot <path to your twrp image here>
(for example: fastboot boot /home/you/twrp-3-1-pixel-bootable-mod.img)
What about a flashable zip?
I had some quick test runs only for now, and it was working for me (flashing the zip, rebooting to recovery) until I flashed supersu, or rebooted the phone to android. I will need some more time to work on this, and see what is going wrong. So please be patient, I will try to do something, but can't guarantee it will work. Soon. Anytime.
Enough of the talk, you can download the image file from here:
https://www.androidfilehost.com/?fid=745425885120753892
Good luck and don't forget to report back!
I will try to do my best to help you, but I have a family and I inted to spend most of my time with them. Please be patient!
If you like my work, you can buy me a beer, it is damn hot here right now, and I would love to drink one
Edit: Because I'm a noob and couldn't push my changes to the gerrits, I created a diff file with all my changes.
If you are checking it, please take into account, that I was in a hurry, and there was a point where I said "F*** it!" and I copied ALL the libs and bins from /system and /vendor
Anyway, here it is : https://www.androidfilehost.com/?fid=817550096634795329
reserved...
I've only tested installing a few ZIPs but that seems to work fine (on Pixel XL).
I've looked at your modified script and I see the tune2fs commands and copying /system and /vendor files, but I don't see where you actually mount/decrypt /data. Or is this still handled by the TWRP binary?
Chainfire said:
I've only tested installing a few ZIPs but that seems to work fine (on Pixel XL).
I've looked at your modified script and I see the tune2fs commands and copying /system and /vendor files, but I don't see where you actually mount/decrypt /data. Or is this still handled by the TWRP binary?
Click to expand...
Click to collapse
Hi Chainfire!
I'm happy to hear, that it works on the Pixel XL
Thanks for the confirmation!
Yes, decrypting the data partition is still being handled by TWRP. I added some debug lines to the C code, you can see it in /tmp/recovery.log.
The main issue was mounting /data first, and I had to enable file based encryption instead of vold...
Thanks, I'll have to make time in the very near future to prep my phone for a fresh install.
I haven't had a need to host Android files since I moved on from LG devices before my HTC 10 and Pixel, but I highly recommend Android File Host with optional FTP access on request.
If you prefer a regular cloud service, I recommend Mega. They give 50GB for free and they have an Android app as well as Windows. Possibly others (Mac?), not sure.
My God this is amazing. Thank you so so much.
bbender716 said:
My God this is amazing. Thank you so so much.
Click to expand...
Click to collapse
You are welcome! Try to imagine how happy I was when I first succeeded At that time I had to issue 5 commands after boot, and restart it twice to make it work
But I was already able to flash ARISE sound mod and I almost cried of joy
roirraW "edor" ehT said:
Thanks, I'll have to make time in the very near future to prep my phone for a fresh install.
I haven't had a need to host Android files since I moved on from LG devices before my HTC 10 and Pixel, but I highly recommend Android File Host with optional FTP access on request.
If you prefer a regular cloud service, I recommend Mega. They give 50GB for free and they have an Android app as well as Windows. Possibly others (Mac?), not sure.
Click to expand...
Click to collapse
Ahh I haven't thought of Android File Host! Although I downloaded gigbytes of roms, and mods from there already
Thanks for the tip!
is my path is cd/adb what command i write before twrp.img
gubacsek said:
Hey People! It seems, that after weeks of trying, hundreds of reboots, countless tests, I can present you a working version of TWRP 3.1. for the Pixel with Android O Developer Preview 4.
But let's not rush into things.. First of all a DISCLAIMER:
This is a TEST release, you are using it at your own risk. If your phone gets damaged in any way, nobody else but you can be held responsible. If you do not agree, stop reading and don't use this mod!
I would like to give credits to the people who helped me, and made all this possible:
First of all, @Chainfire, who did more then you would think Among other things, he was the one who showed me how to use tune2fs and reset quotas on /data, which makes it possible to mount it. Without this , I couldn't even start. So thank you very much!
Of course where would we be without @Dees_Troy and the other TWRP guys (i.e.: CaptainThrowback, nkk71, steadfasterX...), who created and maintain TWRP, and demonstrated some serious patience on IRC , where I was asking them for help. For days. For weeks Thank you guys! You helped a lot!
What is this "mod"?
This is stock, normal TWRP 3.1 compiled from source, for the Google Pixel (sailfish) with some small tweaks to make it possible to mount /data, and decrypt it.
Can you use it on the Pixel XL (marlin)?
I don't know... I don't have a Pixel XL to test. If you want, you can buy me one and I'll be glad to compile, prepare, and test it for you.
EDIT: Chainfire "tested a few zip installs" and those were working for him on the Pixel XL, so maybe it is worth a try guys! - thanks for this CF! -
What happens behind the curtains?
I made some modifications to a script that prepared stuff to make the decryption of /data possible. Now it does a bit more... It copies libraries and binaries from /system and /vendor partitions to /system and /vendor folders, so they can be un-mounted (needed for backup). Basically, the recovery uses the real files/commands of the currently installed android os to prepare and mount /data partition (to make it ready for decrypting).
I updated the fstab file, so TWRP knows what to mount where.
I also changed a few things in the order how services are started during TWRP boot.
This is mostly everything. I was only changing external parts/files/tools of TWRP. The original code, the core is left intact.
How well was it tested?
I have only 1 phone, the pixel. I have only tested on this one phone, and it works for me. Of course I can't be certain it will for you, but you will see if you try it
I tested decrypting of /data, flashing a zip file, making a backup. Didn't dare to test restore yet
How can you try it?
This is not a flashable zip, this is a bootable image. So to use it, you have to put the phone into fastboot mode, and fastboot boot the image.
1. reboot the phone into fastboot mode
- if you have adb: adb reboot bootloader
- if you don't, then turn off the phone and press volume down while turning it on
2. open a terminal and issue the following command:
Code:
fastboot boot <path to your twrp image here>
(for example: fastboot boot /home/you/twrp-3-1-pixel-bootable-mod.img)
What about a flashable zip?
I had some quick test runs only for now, and it was working for me (flashing the zip, rebooting to recovery) until I flashed supersu, or rebooted the phone to android. I will need some more time to work on this, and see what is going wrong. So please be patient, I will try to do something, but can't guarantee it will work. Soon. Anytime.
Enough of the talk, you can download the image file from here:
(If you know a good file hosting service, please let me know):
https://drive.google.com/open?id=0BycCshQzwZmBaUtialo5Y01Dc3c
Good luck and don't forget to report back!
I will try to do my best to help you, but I have a family and I inted to spend most of my time with them. Please be patient!
If you like my work, you can buy me a beer, it is damn hot here right now, and I would love to drink one
Click to expand...
Click to collapse
Any help don't want reistall all again!!!!
is my twro .img is on cd/adb what command i write to flash this beauty?
Well, I was able to boot to TWRP, and successfully flashed WETA audio mod. However, upon rebooting, the V4A app wasn't there.
gubacsek said:
You are welcome! Try to imagine how happy I was when I first succeeded At that time I had to issue 5 commands after boot, and restart it twice to make it work
But I was already able to flash ARISE sound mod and I almost cried of joy
Click to expand...
Click to collapse
Hilariously, the ARISE sound mod is exactly why I had flashed back from DP4. I'm close with those guys and they know their stuff for sure.
mngdew said:
Well, I was able to boot to TWRP, and successfully flashed WETA audio mod. However, upon rebooting, the V4A app wasn't there.
Click to expand...
Click to collapse
Same here
I just tried ARISE. This one installs, but failed to update the driver.
mngdew said:
I just tried ARISE. This one installs, but failed to update the driver.
Click to expand...
Click to collapse
Interesting. I also tried side loading the v4a apk packaged in WETA, granted root permissions and it attempted to install drivers but failed.
mngdew said:
Well, I was able to boot to TWRP, and successfully flashed WETA audio mod. However, upon rebooting, the V4A app wasn't there.
Click to expand...
Click to collapse
maflin18 said:
Same here
Click to expand...
Click to collapse
mngdew said:
I just tried ARISE. This one installs, but failed to update the driver.
Click to expand...
Click to collapse
maflin18 said:
Interesting. I also tried side loading the v4a apk packaged in WETA, granted root permissions and it attempted to install drivers but failed.
Click to expand...
Click to collapse
Guys! Check the free space on /system! On Android O DP4 I had about 100MB free space, and I had to remove some **** before flashing anything. Try /system/app and Pinyin input, Chinese input apks....
The recovery is fine...
What? I don't know what I did differently this time, but the the app keeps asking to install the driver again and again everytime I open the app even though there was a successful driver installation notification.
gubacsek said:
You are welcome! Try to imagine how happy I was when I first succeeded At that time I had to issue 5 commands after boot, and restart it twice to make it work
But I was already able to flash ARISE sound mod and I almost cried of joy
Click to expand...
Click to collapse
Can u pls send link for arise which u have flash...
kiran8631 said:
Can u pls send link for arise which u have flash...
Click to expand...
Click to collapse
It was this one:
https://drive.google.com/file/d/0BycCshQzwZmBRFRJSXAwTDhHcm8/view?usp=drivesdk
At last! I got it working.
gubacsek said:
It was this one:
https://drive.google.com/file/d/0BycCshQzwZmBRFRJSXAwTDhHcm8/view?usp=drivesdk
Click to expand...
Click to collapse
Facing this issue...

[solved] Uninstall Magisk module offline/without Magisk?

(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
Use mount-magisk.zip found in collection of modules thread and delete the folder via twrp in /magisk
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
zdimension said:
@duxishere Thanks so much!
I searched for "Magisk module offline uninstall" but did find anything. This was exactly what I needed! The culprit was App Systemizer. I've had it installed for some time and it didn't cause any problems. I uninstalled it, and it worked! Flashing it again restored the boot problem.
Click to expand...
Click to collapse
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Start reading the thread from the beginning and you'll find it.
gonsa said:
How did you uninstalled the troubled module?
I'm having the same problem with a module but I don't even have a /magisk folder.
Click to expand...
Click to collapse
Install "Uninstaller Mod Magisk" from TWRP. Then go in the TWRP terminal and type uninmod_magisk and follow the instructions.
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
nodio said:
please post the link to thread unistaller magisk module, to other users follow the solution!
edit:
there is https://forum.xda-developers.com/showpost.php?p=72542167&postcount=242
Click to expand...
Click to collapse
Not working for me!
I will uninstall "Audio Compatibility Patch" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
dewois said:
Not working for me!
I will uninstall "Audio Compatibility Pach" V1.0 from zackptg5 & ahrion
In Magisk Manger Status is always " Module will be updated at the next start"
If i use the "TWRP-Uninstaller" the Modul is not in List!
Click to expand...
Click to collapse
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
tobi14 said:
".... Go the module folder under /sbin/.core/img ..."
I dont have this folder in /sbin!
Click to expand...
Click to collapse
If you have a current version of Magisk installed, yes you do. Enable viewing hidden files and folders in your file explorer. The dot at the beginning of the folder name means it's hidden...
zdimension said:
(other thread here)
It seems that a Magisk module that I have recent installed (no idea which one) is preventing my phone to boot correctly. I know that because reflashing the latest OTA update removes Magisk and then it works perfectly. As soon as I flash Magisk, it doesn't boot anymore.
Even after flashing SuperSU, Magisk Manager doesn't let me see/remove installed modules.
Is there a way to do that?
Click to expand...
Click to collapse
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
mklee11224 said:
If you can launch TWRP then :
Check magisk.img exist
1. Go to "advanced" and then click on "File Explorer".
2. Check there is "magisk.img" file under "/data"
Backup magisk.img
1. Go to "advanced" and then click on "terminal command".
2. type following command
Code:
cp /data/magisk.img /data/magisk.img.bk
Mount magisk.img
1. Make a temp folder
Code:
mkdir /mktmp
2. Mount magisk.img to /mktmp
Code:
mount -o loop /data/magisk.img /mktmp
3. Navigate to mktmp and remove your module
Code:
cd /mktmp
rm -rf /mktmp/xxxx
Unmount magisk.img and reboot to check if it's work
1. Unmount magisk.img
Code:
umont /mktmp
2. Leave terminal and reboot the phone
3. Enjoy!
Click to expand...
Click to collapse
Thanks mate ! it worked like a charm !
just use "ls" command on step 3 after changing directory to mktmp , to show installed modules.:silly:
My Phone Specification : Moto X Play ------ 7.1.1 Stock Firmware -------- Squid kernel --------- rooted using Magisk ------ systemless xposed module "xposed_25" installed using magisk module(Uninstalled by this method !) .:victory:
Tanks a lot!
Crossbreeder lite made my phone unusable. Working fine again!
magisk.img not found in /data
This works like charm, if you can't find the magisk.img in `/data` check `/data/adb` ... I hope this work .
Didgeridoohan said:
https://www.didgeridoohan.com/magisk/Magisk#hn_Module_will_be_updated_at_next_reboot
Click to expand...
Click to collapse
Own domain huh? Business growing? Hehehe I only came for the uninstall zip, hey quick question, I'm on a micro sd-less phone (big news), still a flashaholic, kinda, but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go? Thank you sir, you almost get more thanks than posts! Talk about reputation!
culiacanazo said:
Own domain huh?
Click to expand...
Click to collapse
I keep a few of them around. It was nice to finally find a good use for that one...
but my phone so happens to require a data format every time for gsi's, where would you recommend keeping the "things to keep on your device" (Magisk related) so i don't have to carry an otg and drive everywhere i go?
Click to expand...
Click to collapse
Do you have to completely wipe the device? Or can you keep internal storage intact? If not, it sounds like you're out of luck.
Nice thread hijack, by the way... :laugh:
Didgeridoohan said:
Do you have to completely wipe the device?
Click to expand...
Click to collapse
Well i do a factory reset, flash system img and reboot, let it loop because it will, and then do a data format before it will boot, so system, caches, and data go... (Huawei, see)
Didgeridoohan said:
Nice thread hijack, by the way... :laugh:
Click to expand...
Click to collapse
I kinda stayed on topic didn't i? :crying:
You linked to your help guide which i read the beginning of that by the way has nothing to do with the help you offered to the op and reminded me of my struggles with a totally different device and problem!!
It's like how I'm related to my grandma's cousin's wife's sister's doctor's neighbor's son's friend, ain't it?
Sent from my Huawei Mate 10 Pro using XDA Labs
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Apply .disable_magisk
saturday_night said:
Would be cool if someone could share the adb solution. In the FAQ is just written "email me for this" wtf?!? It is ****ing anoying to reflash the whole system everytime a module isnt working (yeah thats what you need to do if your device doesnt have twrp, and a lot of a/b devices dont have twrp). Also you need to delete all user datas because you flashed the system new and the new system doesnt know the encryption key for the user datas. There need to be a better solution than using twrp or email the dev for adb solution.
The easiest way would be to make it possible that magisk manager can manage (remove/deactivate) the modules while there is no patched boot.img installed. This would solve all problems related to a/b devices without twrp and magisk modules (not booting or anything else) just flash stock boot.img remove the problematic module flash patched boot.img and done. This is not possible because the module section in magisk manager is hidden when there is no patched boot.img installed.
Second thing i noticed, magisk manager doesnt reset the active modules when you wipe the app data. This should be a MUST. Would also solve the problem of not booting modules without wiping the whole system on a/b devices without twrp.
Click to expand...
Click to collapse
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
---------- Post added at 05:51 PM ---------- Previous post was at 05:41 PM ----------
neromanello said:
Hi!. I have this user of XDA Dev. hanging out for a time... well the fact is I'm new. My problem (not the only one) maybe merge a kind of solution to this. And this could be putting the ".disable_magisk" blank file inside the cache partition as an ADB Sideload update.
Next to this. I've found that to do that it's not as simply as it seems to be cause I'm on a Samsung Galaxy S7 Nougat 7.0 Version. And all the examples with update-binary file I have, are from downgrade versions...
I'm stuck in a bootloop due to the Magisk Xposed SDK 24 module. I think this module & encription is not good (as I've read on the Xpose module thread).
So, here I'm asking how to make an script to run directly on the Stock recovery using ADB Sideload, which will put the blank ".disable_magisk" file inside the /cache partition. I need just this, and I think this could help some people who are stuck on this issue.
Now, I have this Thread. But really I need the advice of an expert telling me what to do in order to achieve this. As I think this is an easy labor, but you have to know how to do it... If someone is able to clarify please, I will appreciate so much.
Thanks!
Click to expand...
Click to collapse
I need to know how to locate the mount point of my /cache partition at the stock recovery ADB Sideload. Then, to mount it, transfer the blank file to it, and then unmount /cache. I think it's an easy labor. So here my incomplete updater-script:
ui_print("Trying to make an script with ADB Sideload..."); CRLF
ui_print("Creating file to disable Magisk Modules..."); CRLF
I NEED THE MOUNT POINT HERE CRLF
ifelse package_extract_file(".disable_magisk", "/cache/.disable_magisk") == "t", ui_print("OK!"), ui_print("Failed!"); CRLF
UNMOUNT COMMAND HERE. CRLF
--last blank line--
So, I need to complete that, BUT things gets difficult when I need the update-binary for my Nougat 7.0 version, and to sign the whole .zip file in order my stock recovery recognizes it. I think this last thing could be made by this Thread. But really I don't know. Please help.
Thanks!.

[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.

Categories

Resources