[RECOVERY][TB128FU][UNOFFICIAL] TWRP 3.7.x for Lenovo Tab M10 Plus (Gen 3)(SDM680) - Miscellaneous Android Development

This version of TWRP works on the Lenovo TB128FU: Tab M10 Plus (Gen 3) and Xiaoxin Pad 2022. It might also work on the TB128XU and Moto Tab G62 - to be confirmed.
Warning: this TWRP will not work for any of the Tab M10 Plus Gen 3 variants with Mediatek SoCs (TB125FU) or UniSoc SoCs (TB328FU,TB328FX).
Code:
#include <std_disclaimer.h>
/*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*/
Working:
Almost everything is working including:
data decryption
ADB/MTP
external SD card
OTG
Known issues:
vibration
when you unmount then remount the data partition, twrp forgets how to decrypt it
you tell me
This guide is not for noobs
There are two problems with the bootloader on these tablets:
Lenovo does not allow bootloader unlocking on some tablets
Lenovo has not enabled fastboot flash on some tablets
So it's not easy to install twrp on these devices. If you are a noob, don't ask for a step-by-step guide - you'll just have to learn more about Android before trying this guide. It's not my fault - blame Lenovo for making development on this tablet so difficult.
unlocked bootloader
You will need a tablet with an unlocked bootloader. Lenovo has not provided a method to unlock many of these tablets. The commands fastboot oem unlock-go, fastboot flashing unlock and fastboot flashing unlock_critical do not work.
You can check on the fastboot menu. The "DEVICE STATE" should be "unlocked".
Some Xiaoxin Pad 2022 models already come with an unlocked bootloader.
There is also a known method to unlock the bootloader. I have not tried it and can't provide any support for it. Use it at your own risk.
Hopefully Lenovo will provide a method in an upcoming OTA.
fastboot flash
If your tablet does not support fastboot flash, you will get an "unknown command" error like this:
Code:
C:\>fastboot flash recovery_a twrp_TB128FU_12.img
Sending 'recovery_a' (98304 KB) OKAY [ 2.288s]
Writing 'recovery_a' FAILED (remote: 'unknown command')
fastboot: error: Command failed
In this case you can use a tool like QFil or edl to EDL-flash twrp. Use the prog_firehose_ddr.elf program from the stock ROM.
Installation
With a stock ROM, it is recommended that you also install Magisk. This will ensure TWRP remains your default recovery. You can either use the boot image patch method, or flash the magisk apk in twrp.
ensure your bootloader is unlocked. On the fastboot menu, "DEVICE STATE" should be "unlocked".
download TWRP to your PC (see the Download section below)
flash the TWRP image:
Code:
adb reboot fastboot <== NOT "adb reboot bootloader"
fastboot flash recovery_a twrp_TB128FU_12.img
fastboot flash recovery_b twrp_TB128FU_12.img
fastboot reboot recovery
if fastboot flash does not work, then use Qfil or EDL to flash twrp to recovery_a and recovery_b
in TWRP: backup the boot, oem and persist partitions in TWRP, if you don't have backups already.
load Magisk by loading the patched boot image, or by installing the zip file. Instructions are linked above.
If you prefer to use button combos, rather than fastboot/ADB commands:
Vol Up + Power = fastboot mode
Vol Up + Vol Down + Power = recovery mode
Changelog
Code:
2023-02-13 - removed abl, bluetooth and modem partitions from twrp
2023-01-10 - fastbootd working
2023-01-06 - fixed "unable to locate parent partition" errors
2023-01-06 - TWRP 3.7.0_12-0: initial release (UNOFFICIAL)
Downloads
twrp-TB128FU_12.img
Source code
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-12.1
https://github.com/Yahoo-Mike/recovery_device_lenovo_TB128FU
Credits
The guys at TeamWin Recovery Project.
Everyone whose device trees I plagiarised from GitHub.
Contributors
Yahoo Mike
Created: 2023-01-06
Last Updated: 2023-02-23 - removed abl, modem and bluetooth from fstab

How to load a GSI using TWRP​prereqs​
unlocked bootloader
copy of vbmeta.img and vbmeta_system.img from your stock ROM
optional: backup of system, data and metadata partition
how to...
adb reboot fastboot
fastboot --disable-verity --disable-verification vbmeta vbmeta.img
fastboot --disable-verity --disable-verification vbmeta_system vbmeta_system.img
fastboot flash system system_arm64_b.img
fastboot -w
fastboot reboot
note: step #5 wipes userdata and metadata

New version just posted.
I fixed the "unable to locate parent partition" problem that resulted in multiple false positives for external partitions.
Now the "Select Storage" menu consists of only "Internal Storage", "Micro SDCard" and "USB-OTG". All are working.

It seems that few people are interested in this machine

Thank you!!!!

Thank you! You have greatly facilitated the tasks with the tablet

I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?

AForan said:
I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?
Click to expand...
Click to collapse
Thanks for reporting this.
I don't know why the re-formatted data partition is not mounting or allowing you to write to it. I will have a look at this over the next few days.
Are you using adb push to copy to the tablet? Or are you using Windows Explorer (MTP) to copy to the tablet?
Before you formatted the data partition, was it password protected? Or no password/pin/etc ?
You shouldn't need to disable force-encryption.
In the meantime, you could use an SDcard or OTG device to restore your partitions.
Restoring the data partition is a special case. When you format the data partition, there should be a warning in twrp. Something like: "You need to boot into Android before you can re-use the data partition". TWRP only re-formats the partition, it does not encrypt it. So you'll need to boot into Android to let it re-encrypt the partition. After the data partition is re-encrypted, you can restore your backup of the data partition.

Yahoo Mike said:
Thanks for reporting this.
I don't know why the re-formatted data partition is not mounting or allowing you to write to it. I will have a look at this over the next few days.
Are you using adb push to copy to the tablet? Or are you using Windows Explorer (MTP) to copy to the tablet?
Before you formatted the data partition, was it password protected? Or no password/pin/etc ?
You shouldn't need to disable force-encryption.
In the meantime, you could use an SDcard or OTG device to restore your partitions.
Restoring the data partition is a special case. When you format the data partition, there should be a warning in twrp. Something like: "You need to boot into Android before you can re-use the data partition". TWRP only re-formats the partition, it does not encrypt it. So you'll need to boot into Android to let it re-encrypt the partition. After the data partition is re-encrypted, you can restore your backup of the data partition.
Click to expand...
Click to collapse
I understand everything, thank you
I used MTP to transfer files. As for the password, no, the password was not set in the system

AForan said:
I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?
Click to expand...
Click to collapse
The short answer
TWRP does not support MTP for our tablet on a re-formatted data partition. You must reboot your tablet before MTP will work properly again.
I can't change that, sorry. You could ask the Teamwin team to change it by raising an issue.
The long answer
TB128FU tablets use FBE (file-based encryption).
In October 2021, the TWRP team decided that TWRP does not support MTP on FBE devices after formatting data until you reboot into Android. This is because mtp uses /data/media as a mount point. TWRP does not recreate that directory for FBE devices:
Code:
void TWPartition::Recreate_Media_Folder(void) {
string Command;
string Media_Path = Mount_Point + "/media";
if (Is_FBE) {
LOGINFO("Not recreating media folder on FBE\n");
return;
}
...
That code has been in TWRP ever since FBE support was introduced in 2016.
Since that change in October 2021, when you reformat the /data partition on an FBE device, you will get the warning: "TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media."
When you reformat the /data partition, it will be unencrypted. When you reboot to Android, Android will re-encrypt the partition.
Before you reboot to Android, you can still adb push files to the unencrypted data partition. You can still use it in adb shell. It's just MTP that won't work properly.
When you reboot to Android, the data partition will be re-encrypted and you might lose everything you put on the (unencrypted) data partition. But MTP will work again for internal storage in TWRP.

Just updated OP with new version of TWRP. It fixes fastbootd. I've done basic tests, but if there are any issues let me know.
Theoretically you should now be able flash a GSI (even a signed one) from TWRP. Let me know if there are issues.
Edit: post #2 updated with instructions on how to flash GSI using TWRP. I successfully flashed Andy Yan's LOS19 using those instructions.

Yahoo Mike said:
The short answer
TWRP does not support MTP for our tablet on a re-formatted data partition. You must reboot your tablet before MTP will work properly again.
I can't change that, sorry. You could ask the Teamwin team to change it by raising an issue.
The long answer
TB128FU tablets use FBE (file-based encryption).
In October 2021, the TWRP team decided that TWRP does not support MTP on FBE devices after formatting data until you reboot into Android. This is because mtp uses /data/media as a mount point. TWRP does not recreate that directory for FBE devices:
Code:
void TWPartition::Recreate_Media_Folder(void) {
string Command;
string Media_Path = Mount_Point + "/media";
if (Is_FBE) {
LOGINFO("Not recreating media folder on FBE\n");
return;
}
...
That code has been in TWRP ever since FBE support was introduced in 2016.
Since that change in October 2021, when you reformat the /data partition on an FBE device, you will get the warning: "TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media."
When you reformat the /data partition, it will be unencrypted. When you reboot to Android, Android will re-encrypt the partition.
Before you reboot to Android, you can still adb push files to the unencrypted data partition. You can still use it in adb shell. It's just MTP that won't work properly.
When you reboot to Android, the data partition will be re-encrypted and you might lose everything you put on the (unencrypted) data partition. But MTP will work again for internal storage in TWRP.
Click to expand...
Click to collapse
Thank you for the detailed explanation!

Tell me, how can I unpack backups of this recovery? (.win) in view of the vendor update (zui 14.675), I would like to create patches for convenient firmware

OTA ZUI are not installed, there is a reboot in recovery to install and then boot into the system again

AForan said:
OTA ZUI are not installed, there is a reboot in recovery to install and then boot into the system again
Click to expand...
Click to collapse
Official OTA Updates and TWRP

We found that in the previous version there was this option (the system partition is read-only), here, on the latest version this option is missing

AForan said:
We found that in the previous version there was this option (the system partition is read-only), here, on the latest version this option is missing
Click to expand...
Click to collapse
Welcome to the wonderful world of dynamic partitions (aka super partition). TWRP does not support mounting dynamic partitions as read-write. You can flash dynamic partitions in twrp fastbootd mode, but you can't mount them r/w in twrp recovery mode.
On this device the following partitions are dynamic:
product
system (mounted at /system_root in twrp)
system_ext
vendor
The option you are talking about (Mount system partition read-only) should never have been in the old version. That was my fault. I forgot to tell TWRP that the device has dynamic partitions. I fixed my error in the new version. I apologise for the confusion.
Workarounds​There are workarounds that people have been using on other devices, but there's no guarantee they'll work on our devices. Use them with caution. If any of them work for you, let us know on this thread.
Here's one method.
Here's another method. Note: the developer has just been banned from XDA for 3 months.
If you have the skills, you can also use Magisk modules to write to dynamic partitions.

Must be useful this program: https://forum.xda-developers.com/t/...system-partitions-to-read-write-mode.4521131/
Use it on TB-J716F from TWRP, positive experience.

Yahoo Mike said:
Welcome to the wonderful world of dynamic partitions (aka super partition). TWRP does not support mounting dynamic partitions as read-write. You can flash dynamic partitions in twrp fastbootd mode, but you can't mount them r/w in twrp recovery mode.
On this device the following partitions are dynamic:
product
system (mounted at /system_root in twrp)
system_ext
vendor
The option you are talking about (Mount system partition read-only) should never have been in the old version. That was my fault. I forgot to tell TWRP that the device has dynamic partitions. I fixed my error in the new version. I apologise for the confusion.
Workarounds​There are workarounds that people have been using on other devices, but there's no guarantee they'll work on our devices. Use them with caution. If any of them work for you, let us know on this thread.
Here's one method.
Here's another method. Note: the developer has just been banned from XDA for 3 months.
If you have the skills, you can also use Magisk modules to write to dynamic partitions.
Click to expand...
Click to collapse
Thanks, it's clearer now

Could u makle it available for P11 5G (TB-J607Z) with Android 12???

Related

[RECOVERY] [TWRP] Android system recovery <3e> universal checksum disabler

This is a Flashable Zip for restoring backups created from different recoveries. No more problems with checksums, checksums will be ignored.
- Android system recovery <3e>
- CWM
- TWRP
- ADB Backup
- MIUI Backup
This is a alpha release, in this state you can test it for Android system recovery <3e> only!
I need testers for proof of concept. If you have a Mediatek Phone with encrypted userdata_20160823_100259.backup, please try to restore with bckp2raw.zip from TWRP. Please give feedback if failed or vote :good: if worked.
bckp2raw.zip (v1.0.3) 32-bit
bckp2raw.zip (v1.0.5) universal
(other backup formats following soon, feel free to request)
TUTORIAL - under construction
aIecxs said:
TUTORIAL - under construction
Click to expand...
Click to collapse
Is this solves problem of Android 7 stock recovery backup?
I got second phone stock recovery problem for 7 version
stock recovery do not want to recover his backup. complains - "it is corrupted, please reset your phone"
I install twrp recovery and try to install this .zip
bit it give error 134 (or something like that)
sorry this project is abandoned. in generally, backup can not restored to other device because of the checksum mismatch. Thats where this zip comes in game. If you upload recovery.log right after installing this zip i will try to fix the errors..
aIecxs said:
sorry this project is abandoned. in generally, backup can not restored to other device because of the checksum mismatch. Thats where this zip comes in game. If you upload right after installing this zip i will try to fix the errors..
Click to expand...
Click to collapse
I meant - I got another (second) phone looped reboot, same as in 2018. And try to stock recovery backup (55Gbyte and ) restore.
BTW - first phone is still waiting to restore 11Gbyte stock recovery backup!
last file: userdata_20191106_110350.backup27
Android 7 again same as in topic: https://forum.xda-developers.com/showthread.php?t=2528969&page=7
I copied lines from recovery.log:
I: operation_start: 'Flashing'
Installing zip file '/external_sd/bckp2raw.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
Archive: /external_sd/bckp2raw.zip
inflating: bckp2raw.sh
Archive: /external_sd/bckp2raw.zip
inflating: busybox-arm
Archive: /external_sd/bckp2raw.zip
inflating: tar-arm
CANNOT LINK EXECUTABLE "/system/bin/sh": "/system/lib/libc++.so" is 32-bit instead of 64-bit
Aborted
Updater process ended with ERROR: 134
I:Legacy property environment disabled.
I:Install took 0 second(s).
Error installing zip file '/external_sd/bckp2raw.zip'
Dont want to boring and get you, if you would give help - you can save many people with same problem with android-7
ah i see, script does not even start. i don't have a x64 device for testing, i assume twrp is not able to run mksh from /system. i have added paths please try this one instead...
update-binary
Code:
LD_LIBRARY_PATH=/system/lib64:/system/vendor/lib64:/system/lib:/system/vendor/lib
bckp2raw.zip (v1.0.5) universal
for those who want to quickly convert TWRP ADB backup.ab into data.ext4.win
usage for unpacking files (don't do this on windows disk)
Code:
bash twab.sh backup.ab
cd 20*
mkdir data
sudo tar --ignore-command-error --numeric-owner --selinux --xattrs -xpf data.ext4.win -ivC data 2> /dev/null
data partition is encrypted
Hi , I've been trying a lot of methods to get my data back from my .backup files. All with no results. Your bckp2raw script seems to be one of the most successfull , but it ends by a " data partition is encrypted" ... Do you think I can still recover my files ... The original phone is actually working but it has been factory wiped ...
that message just means that your current /data partition is encrypted (message for encrypted backup is different)
- do a backup of metadata partition (just in case)
- do a backup of /sdcard to PC (adb/mtp)
- format userdata partition
- reboot TWRP
- check userdata partition is unencrypted
- restore userdata*.backup from zip
- restore metadata partition from backup
- restore /sdcard backup
the restoring process will deny if userdata is not empty. please note if backup is encrypted it is most likely useless without corresponding backup of metadata partition
aIecxs said:
that message just means that your current /data partition is encrypted (message for encrypted backup is different)
- do a backup of metadata partition (just in case)
- do a backup of /sdcard to PC (adb/mtp)
- format userdata partition
- reboot TWRP
- check userdata partition is unencrypted
- restore userdata*.backup from zip
- restore metadata partition from backup
- restore /sdcard backup
the restoring process will deny if userdata is not empty. please note if backup is encrypted it is most likely useless without corresponding backup of metadata partition
Click to expand...
Click to collapse
Thank you very much for your quick reply. Ok so I tried it , the restoring part worked , but when I rebooted it asked me for my code and said "password is correct but data is corrupted" ....
Do you have any idea for me to get my data back .... at least my pictures ...?
sounds like the backup is encrypted, can you confirm? more important is this the source phone of this backup? or do you try to restore on other device?
aIecxs said:
sounds like the backup is encrypted, can you confirm? more important is this the source phone of this backup? or do you try to restore on other device?
Click to expand...
Click to collapse
I'm pretty sure it is encrypted. Yes the phone is the source phone of the backups
encryption should work in theory, but you need a copy of metadata partition from the day you created backup. you most likely don't have it, therefore your data is lost forever
aIecxs said:
encryption should work in theory, but you need a copy of metadata partition from the day you created backup. you most likely don't have it, therefore your data is lost forever
Click to expand...
Click to collapse
Yes I don't have the metadatas from that day, is there a chance that they have been backup with the android backup ?
Thanks for your help anyways, I'm sad
no, nothing you can do. even a old metadata from the first day when you buyed this device would probably do it. metadata partition is formatted on factory reset.
for some devices the crypto footer is not located at separate partition, but at the end of userdata partition instead. But this is not the case for your device, otherwise this zip would have restored. you can double check, search with hex editor in last -16384 bytes of last file for string aes-cbc-essiv:sha256 (or aes-xts)
aIecxs said:
no, nothing you can do. even a old metadata from the first day when you buyed this device would probably do it. metadata partition is formatted on factory reset.
for some devices the crypto footer is not located at separate partition, but at the end of userdata partition instead. But this is not the case for your device, otherwise this zip would have restored. you can double check, search with hex editor in last -16384 bytes of last file for string aes-cbc-essiv:sha256
Click to expand...
Click to collapse
Cannot find anything like this but i'm not used to HEX reading .... Is there a chance that the metadata is on the SD card i was using for (external) storage on the phone (not the ones for the backups) ?
Hello there and thanks for creating such a productive thread, just what I needed for my current situation. so am trying to retrieve .backup files on cxAir android 7.0 after root through twrp but apparently, when running the script from the zip file you've shared I get the Error: data partition not mounted.
I'm still new in the dev world but am totally excited about it and I may not understand a lot of things but am willing to work my ass off to figure out the most of what I can so please I'd really appreciate it if I could get some help on this one, thanks in advance
mount data partition and try again?

Advanced OTA keeping Magisk and TWRP (needs a computer)

History...
I originally wrote this guide to upgrade from 10.0.4.0 to 10.0.7.0.
I have also used this same guide to install every OTA from 10.0.7.0 to 11.0.11.0.
This guide assumes you have both Magisk and TWRP, that Magisk cannot "uninstall" (because of TWRP installation) and that you want to keep both Magisk and TWRP after installation. Parts of this guide may still be useful if you aren't in this exact situation.
If you only have Magisk, you should be able to follow these much simpler instructions: https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
Things to have on hand:
- vanilla_boot.img (for the version you currently have)
- patched_boot.img (your current boot image with Magisk)
- TWRP img and zip (see version info below)
I think that TWRP also causes the vendor partition to be modified. It may also touch system but I have a modified bootanimation.zip which modifies system, so I can't be sure. In any case, I also have a backup of system.img and vendor.img.
Because Magisk is installed after TWRP, Magisk's "backup" of the "stock boot image" is not vanilla. This means that in order to take the OTA, I have to flash the vanilla boot image.
0 - Update your patched_boot.img
If you don't have a patched_boot.img for your current Magisk (eg. my patched_boot.img was old, since I had installed several Magisk updates), you should build a new patched_boot.img so that when you boot it, the system will continue to work.
Push the vanilla image to the phone.
Code:
adb push vanilla_boot.img /sdcard
Then get Magisk to install using the "Select and Patch a File" method, select the file you uploaded. Then pull down the patched image.
Code:
adb pull /sdcard/Download/magisk_patched.img patched_boot.img
1 - Prepare to OTA
For some reason, my carrier does not like the OTA process so I always turn on Airplane mode + Wifi.
Get to fastboot and check the current slot.
Code:
adb reboot bootloader
fastboot getvar current-slot
My current slot was b
Flash the system and vendor partitions (if necessary).
Code:
fastboot flash system_b vanilla_system.img
fastboot flash vendor_b vanilla_vendor.img
Flash vanilla and boot the patched image (so that Magisk is active and the OTA can be applied).
Code:
fastboot flash boot_b vanilla_boot.img
fastboot boot patched_boot.img
2 - Do the OTA
Install OTA (DO NOT REBOOT)
If the OTA fails
If the OTA fails, you can find out which partitions it doesn't like from the logcat. If you have a fastboot image, you can reflash the affected partitions. As previously mentioned, I've had to flash all of boot, vendor and system for each OTA.
Code:
adb logcat | grep update_engine
...
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470683:ERROR:delta_performer.cc(990)] The hash of the source data on disk for this operation doesn't match the expected value. This could mean that the delta update payload was targeted for another version, or that the source partition was modified after it was installed, for example, by mounting a filesystem.
07-01 06:52:38.470 E/update_engine(935): [0701/065238.470931:ERROR:delta_performer.cc(995)] Expected: sha256|hex = A4AD686D7BF628486668446221D0089BF5915DBC1158C83D30A06222FE7D2ACB
07-01 06:52:38.471 E/update_engine(935): [0701/065238.471002:ERROR:delta_performer.cc(998)] Calculated: sha256|hex = 4CADBE88EC1C019913A0B416EB9031840D4BA6B2287A3FC814A2B8B7F9871F7D
07-01 06:52:38.473 E/update_engine(935): [0701/065238.471072:ERROR:delta_performer.cc(1009)] Operation source (offset:size) in blocks: 0:5221,5461:405,5869:1,5873:343,6221:589
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473233:ERROR:delta_performer.cc(1191)] ValidateSourceHash(source_hash, operation, source_fd_, error) failed.
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473340:ERROR:delta_performer.cc(298)] Failed to perform BROTLI_BSDIFF operation 187, which is the operation 0 in partition "boot"
07-01 06:52:38.473 E/update_engine(935): [0701/065238.473411:ERROR:download_action.cc(337)] Error ErrorCode::kDownloadStateInitializationError (20) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
07-01 06:52:38.739 E/SystemUpdate(15410): [Execution,NonStreamingAbApplyAction] Installation failed with error code: 20.
3 - Backup the vanilla boot image
Note that you need to pull from the other slot (in my case, a).
Code:
adb shell
su
dd if=/dev/block/by-name/boot_a of=/sdcard/vanilla_boot.img bs=1024k
Backup system.img and vendor.img too (if required).
Code:
dd if=/dev/block/by-name/system_a of=/sdcard/vanilla_system.img bs=1024k
dd if=/dev/block/by-name/vendor_a of=/sdcard/vanilla_vendor.img bs=1024k
4 - Magisk patch the other slot
Use Magisk to "Install to Inactive Slot (After OTA)" (DO NOT REBOOT)
5 - Backup the patched boot image
Note that you need to pull from the other slot (in my case, a).
Code:
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
exit
exit
# back on your computer
adb pull /sdcard/vanilla_boot.img
adb pull /sdcard/patched_boot.img
Pull down system and vendor images too (if required).
Code:
adb pull /sdcard/vanilla_system.img
adb pull /sdcard/vanilla_vendor.img
Now you can let Magisk reboot. This is the moment of truth...
At this point you should have an upgraded, Magisk-enabled system and backups of the vanilla and patched boot images. Congratulations on completing the OTA!
If the system fails to boot
There's a few things to try before giving up if the system fails to boot...
1) Boot without Magisk (fastboot boot vanilla_boot.img). Probably indicates that a Magisk module you have is no longer compatible.
2) Boot TWRP (fastboot boot twrp.img) and poke at things. As an example, I used the /sdcard/mm program (part of Magisk Manager for recovery) to disable EdXposed when the OTA to Android 10 failed to boot.
6 - Restore TWRP
It is possible to boot TWRP from fastboot so you don't strictly need to install TWRP. I like to have it available anyway.
Old version info...
I had been using the official TWRP 3.2.3, which worked great up until 10.0.9.0. With 10.0.9.0, I couldn't get to TWRP, I just got the system destroyed screen. I could fastboot boot it, but it couldn't mount /data (a problem it has always had).
I figured out that TWRP 3.3.1-dees_troy (from the official TWRP site) works with 10.0.9.0 and up. What's more, it works (can decrypt /data) if you fastboot boot it, not just after install. So you could in theory simply not install TWRP and fastboot boot if in the event that you actually need it.
I know that people have their own favourite versions, with the offain version being popular (didn't work for me). There's OrangeFox too (also didn't work for me).
In summary, I recommend Official TWRP 3.3.1-dees_troy but if you have a favourite alternative, feel free to use it instead.
TWRP thread: https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Download link: https://dl.twrp.me/daisy/
Restoring TWRP is the same as installing it the first time. This is the process that I use.
Flash vanilla boot, then install TWRP to it.
Code:
adb reboot bootloader
fastboot boot twrp-3.3.1-dees_troy-daisy.img
Install TWRP
Code:
adb push twrp-installer-3.3.1-dees_troy-daisy.zip /sdcard
Use TWRP to install twrp-installer-3.3.1-dees_troy-daisy.zip
I install my modified bootanimation.zip at this time.
Mount System from TWRP (it is normally already mounted for me).
From a shell:
Code:
adb shell
cd /sdcard
cp bootanimation.zip /system/system/media/bootanimation.zip
Umount System
You must re-install Magisk after installing TWRP.
Code:
adb reboot bootloader
fastboot boot patched_boot.img
Use Magisk to "Direct Install (Recommended)"
Reboot
For some reason, my carrier does not like the OTA process so at this point I normally power off the phone rather than just rebooting. When the phone boots, I can turn off airplane mode and check that a mobile data connection can be made.
7 - Confirm that everything works
Make sure the system comes up and Magisk Manager says that Magisk is installed.
Make sure you can get to TWRP. Boot while holding VOL+ or
Code:
adb reboot recovery
Make sure TWRP can see your files.
Congratulations! You have installed an OTA while keeping Magisk and TWRP!
8 - Backup boot.img with TWRP + Magisk (optional)
If you want a copy of the boot.img with both Magisk and TWRP. This pulls from the now-current slot (in my case, a). I'm not totally sure of the value of this, since I can't get fastboot to boot this image. It may come in handy if you upgrade TWRP and that breaks (since you can flash this back rather than having to install the old TWRP again).
Code:
adb shell
su
cd /sdcard
dd if=/dev/block/by-name/boot_a of=twrp_boot.img bs=1024k
exit
exit
# back on the computer
adb pull /sdcard/twrp_boot.img
Thanks. Could you upload or indicate where we can get the necessary files?
Will i loose all user data and internal storage wiped if i do this?
Thanks for sharing, looks complicated, also i think you should use a fixed twrp, since the official dont have acces to sdcard.
rossarnie said:
Thanks. Could you upload or indicate where we can get the necessary files?
Click to expand...
Click to collapse
If you have Magisk, you should already have the vanilla and patched boot.img files.
Of you don't already have Magisk, just follow the install procedure here. https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
If you're running 10.0.4.0 without magisk and need to extract your vanilla boot.img. Use fastboot to boot into twrp and then you can do the DD command to extract boot. Use adb pull to save it to PC.
I used official TWRP from here.
https://forum.xda-developers.com/mi-a2-lite/development/official-twrp-daisy-t3855396
Apparently there's a different twrp that can access the external SD card. I don't have an external SD card so I don't need it.
dr.bahaeddin said:
Will i loose all user data and internal storage wiped if i do this?
Click to expand...
Click to collapse
I didn't lose any data.
I've never had a problem with Magisk. TWRP does tend to bootloop after install, which is why I install magisk again.
You should be able to flash the patched or vanilla boot if twrp is boot looping to fix it too. Just won't have twrp anymore.
a1291762 said:
I didn't lose any data.
Click to expand...
Click to collapse
Mind you. I have a backup of my apps and data that's off of my phone so even if I do need to factory reset I can get it back. That's a longer and more complicated guide.
Txatxiquesi said:
looks complicated.
Click to expand...
Click to collapse
Before I had twrp the standard Magisk ota process was enough. But that loses twrp and with twrp in my magsik backup, the uninstall didn't work. So extra steps are needed. Plus some extra steps to make backups of important files for the next OTA
a1291762 said:
If you have Magisk, you should already have the vanilla and patched boot.img files.
Click to expand...
Click to collapse
Hmm... This may not be the case. I'm careful to make backups but it's easy to skip this.
If you don't have a patched boot image you can backup your current boot partition from a root shell. You need to find out if you are booting a or b slot. Then
dd if=/dev/block/by-name/boot_a of=/sdcard/patched_boot.img bs=1024k
Magisk puts old stock backups into /data. I had 4 files in there which makes it hard to know what each file is.
That's why I made sure to backup my vanilla boot image immediately.
If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
a1291762 said:
...If you're stuck without a vanilla 10.0.4.0 boot you can't do the OTA. I can upload mine somewhere when I get home tonight if it's not already online.
Click to expand...
Click to collapse
This would be very helpful, please
FunkmasterC said:
This would be very helpful, please
Click to expand...
Click to collapse
Here is the backup I made of the 10.0.4.0 vanilla boot.img. You'll need to decompress this before flashing.
URL REMOVED
What's new on 10.0.7.0 bro? Should me wait for 10.1 update if im on 10.0.4.0 rooted?
10.0.7.0 has the March security patches. I haven't noticed any actual changes.
Thank you, your Linux commands are sick, I never know I can get the vanilla and patched boot.img like that.
Cheer~
is there an update for file version 10.0.8.0??
I only just got the notification this morning. I'll do the upgrade tonight but I expect the same process will work.
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
a1291762 said:
I just used the same process to go from 10.0.7.0 to 10.0.8.0. This time I was installing to slot b instead of slot a, but otherwise, things were the same.
A side note... I hadn't got around to installing TWRP 3.3.0 so I did that but it couldn't mount /data. TWRP 3.2.3 can mount /data, so I installed that again.
Click to expand...
Click to collapse
I have successfully updated to 10.0.8.0 with Magisk 18.1, now on Magisk 19.1, everything is running fine. I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard. I wonder if the latter is fixed in the inofficial fixed version. I think the benefit of TWRP is not worth the effort of repeating a1291762 wonderful tricky procedure on the monthly OTA update basis.
However the procedure is very smart, a back-to-the-roots approach of former days... great, I like it.
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
[dd if=/dev/block/by-name/boot_a of=patched_boot.img bs=1024k] Locating the boot_a in </dev/block/by-name/> reveals a boot_a file with 0 bytes. Moreover, to unzip the zipped stock boot Image in </data/stock_boot*.img> or </sbin/.magisk/mirror/data/> I am looking for a command that just returns the boot file rather than expanding it to the full partition. Weird, can anybody help?
Thanks again to a1291762
grufty47
It appears that it is not possible to add some boot.img as attachment
grufty47 said:
I'd like to also install TWRP but refrain from doing so because of the problems (bootloops, crashes, etc) the official TWRP 3.2.3 shows with decryption in Pie and mounting external or even internal sdcard.
Click to expand...
Click to collapse
I use official TWRP 3.2.3. Only really to fix bootloop problems.
I don't have a SD and no problems mounting data.
Lots of people following the TWRP install guide seem to get bootloop. I solve that by patching boot with Magisk. Some people recommend installing an old about image.
If you have a backup of boot you can at least restore that if you have problems.
grufty47 said:
But I don't understand how a patched_boot.img can be created from an empty file (boot_a)?
Click to expand...
Click to collapse
Welcome to Unix, where nearly everything is a file.
Hard disk? /dev/sda
Partition? /dev/sda1
File? /mnt/sda1/file.txt
In this case, boot_a is a way to access a partition on the phone's flash. Actually a link (shortcut) to /dev/mmcblk0p52. Partition number 53 on flash chip 1. The size can't be seen because it's a device and not a file.
grufty47 said:
I am looking for a command that just returns the boot file rather than expanding it to the full partition.
Click to expand...
Click to collapse
dd is a command to read a device. The partition is 64M big so that's the size of the file. gzip can compress well because the actual image is only 24M big and the rest is empty.
Magisk knows how to do it. A tool called magiskboot but I don't know where it lives or how to run it.
I found this header from magiskboot. It shows how the boot.img is structured.
https://github.com/topjohnwu/Magisk/blob/master/native/jni/magiskboot/bootimg.h
I just did the 10.0.9.0 OTA. I added a section of updating your patched_boot.img (since the Magisk updates I did made my old one useless) and I changed the backup instructions due to changes in Magisk 19. If you know where the stock boot lives before reboot, please let me know.

[RECOVERY] Henk's TWRP Recovery

DISCLAIMER
Code:
The usual disclaimer with an extra warning, this recovery
WILL automatically modify your phone on first boot.
While this should be an entirely safe modification
it is always possible your phone is in a broken state
either on a software or hardware level causing further problems.
This recovery should under no circumstances be flashed
for the first time on a bricked phone
as the automatic changes might damage it further.
ONLY FLASH THIS ON A PHONE IN GOOD CONDITION!
By flashing this recovery you consent to a vendor partition
being created and to take full personal responsibility of any damage
the usage of this recovery may cause rather than blaming it on me.
ABOUT
This modified TWRP is the recovery image i have been using on my personal OnePlus 3T for the past month, with the increasing popularity of system-as-root roms and the issues this causes for older zip files (Such as Google Apps not flashing with wrong arm version errors) i have decided that it would be worth sharing with the community. This recovery image is a ramdisk modification of the TWRP supplied by the LineageOS Unofficial Treble Port Project (Similar to how SHRP is a ramdisk modification of existing TWRP images). Because this is not a source modification (and neither has TWRP been compiled from source) you can find the original source code in their topic. I hope this recovery will be useful to those who often flash multiple kinds of roms and want one recovery that does it all. It has been tested on the Oxygen OS 4, 5 and 9 firmwares and should have great compatibility with all of them.
Included Features
Automatic Vendor Partition Creation and full Treble support
WARNING: Because this recovery will automatically create the vendor partition it should exclusively be used on devices in good conditions. In the very rare case that bricks occur you can revert the change using the MSMDownloadTool (This can only be used on healthy hardware). If you are unsure about the condition of your device or if your device is currently in a bricked state it is best to use another recovery. I am not responsible for further damage to your phone.
Originally the TWRP image provided by the Treble project needs you to type in the 'treblize' command followed by manual reboots, I have automated this process. From the moment you first boot this recovery the vendor partition will automatically be created and the recovery reboots automatically in a new recovery session (This is not a crash and only happens once). If vendor partition has been detected you will be able to see /treblized as a directory on your phone (This is done in RAM and only visible during your recovery session). The vendor partition does not conflict in any way, you can use and pass safetynet on regular roms at will as it is invisible to a rom using a non treble kernel. Before flashing GSI roms please first flash a proper vendor partiton (This can be done by flashing the LineageOS treble rom the regular way).
/system and /system_root hybrid for maximum compatibility!
This is one of my main reasons for sharing this recovery publicly, i have modified the /etc/fstab file to be able to both mount to /system and to /system_root. This means that older zips that expect /system now work again without breaking compatibility with newer system as root or GSI roms. This is one recovery that can do it all! Inside the root folder you will find a flashable zip called Mount-System.zip. This can be used before incompatible zips to mount the /system partition correctly. This tool will automatically detect system-as-root if present and mount /system to /system_root/system, if not present it mounts /system to /system_root. You should prefer this method over the mounting options found in the menu, these should only be used for unmounting system. Keep in mind that by doing this you are messing around with scenario's the original developers have not foreseen and while flashing these previously broken zips is now possible you cause issues in your ROM. Always flash these previously incompatible zips with care and make a backup first! Do not use this Mount-System.zip to flash new roms, those are best flashed in an unmounted state. The same applies for Magisk and any other system-as-root compatible zips. If you are flashing regular roms my fstab changes will be enough and mount-system will not be needed.
Magisk + Magisk Manager on the ramdisk
In the / directory alongside the other zip files you will find Install-Magisk.zip and Manage-Magisk.zip, these can be used to both install and recovery from Magisk related issues. You no longer need to worry about keeping a copy of Magisk at hand after wiping the data or when you are in need of a downgrade, with this a copy of Magisk and a GUI management tool is always available to you directly from the recovery's root folder.
Persist Backup Tool
It is very important that you keep a spare backup of your persist partition, even the MSMDownloadTool will not be able to repair this as it is unique to your device. In addition devices with persist issues (Sensors, LTE, IMSEI, Wifi, not working / blank) should not use the MSMDownloadTool at all since it can leave you with an unbootable phone. Flash the Backup-Persist.zip file (Found in the recovery's root directory) to automatically create a copy of your persist partition stored on your sdcard so you can easily back this up to a secure location. Persist is even more important than backing up the EFS! An EFS backup alone will NOT recover your phone in the case of persist corruption!
Download
Modified Files
This project contains work from
TWRP Base Image and original Treblize scripts : The Unofficial LineageOS Treble Project
Install-Magisk.zip : Magisk
Manage-Magisk.zip : Magisk Manager Recovery Tool
Known issues
Before uploading i did extensive testing, in some scenario's i managed to cause a hard crash of the recovery image, this is not related to any of the included tweaks but seems to be an issue with flashing a rom when you have just formatted partitions. I advice to always reboot after a partition format or before flashing a system rom to ensure that everything is in a state it can be properly mounted. If you did trigger this white light crash do not fear, your device is not bricked (Unless whatever you flashed bricked it). You should be able to turn it off using the power button after which it will boot up just fine and you can try flashing again.
​
<deleted>
henk717 said:
Before uploading i did extensive testing, in some scenario's i managed to cause a hard crash of the recovery image, this is not related to any of the included tweaks but seems to be an issue with flashing a rom when you have just formatted partitions. I advice to always reboot after a partition format or before flashing a system rom to ensure that everything is in a state it can be properly mounted. If you did trigger this white light crash do not fear, your device is not bricked (Unless whatever you flashed bricked it). You should be able to turn it off using the power button after which it will boot up just fine and you can try flashing again.
Click to expand...
Click to collapse
Might not be restricted to just your recovery.
This happens to me on official TWRP as well, when I restore a system image from a backup. It gets stuck on a white light, and I have to hard reset it. The restore does seem to work though.
I flashed the backup persist but did not found the file it should create. Where is it located? Thanks in advance
It should be located in the main directory of your storage and be called persist.img.
However when i just did another test i noticed the zip gives a 255 error that does not happen on the zip on my gitlab.
I am unsure how this difference happened but generated a new img file where i tested and verified all the zip's manually, if you run into the 255 error please redownload and reflash.

[TWRP] TWRP 3.4-0-0 For Blu G90 G0310WW [MT6765][Android 10]

First released twrp for BLU G90 phone.
Whats working:
Adb
Mtp
USb-OTG
MicroSD
Flash Image
Mount System , Vendor, product (contents of SUPER).... mount allows reading the partitions, but was not able to write to them
Back-Up/Restore to/from usb (or micro sdcard).... Due to size of super.img needed to format card ext4
Logcat
Screenshot
Known bug:
**Solved with new tree file**--data decryption is not working, so not able to read or backup internal storage.--
Built with Minimum Manifest _branch 10.0 :
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni
Kernel source :
https://github.com/mrmazakblu/Blu_G90_G0310WW_stock_kernal
Device Tree :
New
GitHub - mrmazakblu/device_PBRP_BLU_G90_G0310WW at TWRP
Contribute to mrmazakblu/device_PBRP_BLU_G90_G0310WW development by creating an account on GitHub.
github.com
Download :
Releases · mrmazakblu/device_PBRP_BLU_G90_G0310WW
Contribute to mrmazakblu/device_PBRP_BLU_G90_G0310WW development by creating an account on GitHub.
github.com
Old
https://github.com/mrmazakblu/device_TWRP_BLU_G90_G0310WW
Download : https://github.com/mrmazakblu/device_TWRP_BLU_G90_G0310WW/releases
ADB Sideload is also broken.
Shananiganeer said:
ADB Sideload is also broken.
Click to expand...
Click to collapse
Most likely due to no able to read/ write to /data there is no place to temp store the zip.
Working on alternative options at the moment, as I am having trouble getting build correct to make decrypt.
Alternative is a modified /vendor.img, so device is not encrypted. But this of course is less secure.
I reformatted /data so it was unencrypted, but still couldn't use adb sideload. I was able to use adb push to put files onto the phone, but that didn't end up mattering as without rw to /system I can't install gapps XD. I'll have some time this weekend to take a look at things and try and help debug the decryption.
Appearently, this build is only missing data decryption.
Spoke with TWRP maintainer, they said this is working as intended. Super.img partitions are not currently meant to be mounted as r/w.
After I asked about flashing GApps, I was informed that there might be changes to TWRP source to allow mounting as r/w sometime sooner or later.
mrmazak said:
Appearently, this build is only missing data decryption.
Spoke with TWRP maintainer, they said this is working as intended. Super.img partitions are not currently meant to be mounted as r/w.
After I asked about flashing GApps, I was informed that there might be changes to TWRP source to allow mounting as r/w sometime sooner or later.
Click to expand...
Click to collapse
so it may seem we are waiting on how to affectively be able to modify the dynamic partitions before we can see a fully successful root. I am fairly new to these things so might be looking at it wrong.
Ivisibl3 said:
so it may seem we are waiting on how to affectively be able to modify the dynamic partitions before we can see a fully successful root. I am fairly new to these things so might be looking at it wrong.
Click to expand...
Click to collapse
To modify it "live" yes maybe.
You can modify the extracted system, as I did , using linux mount, and flash the system back modified, just like a gsi rom.
But for root, can't say.
On the latest build, was able to mount /system r/w. And successfully change the contents of it.
The patches in twrp source is not finished yet, so normal zip installs are not coded. But using adb shell (or TWRP terminal ) seem to be working.
This New build to be uploaded on github device source, as release "test build 9"
I have the G90 Pro and would love to be able to edit the build.prop file... the phone has a ridiculously low number of volume steps for media, 7.
Is there any way to boot into TWRP temporarily and edit the file, just to see if that will increase the steps? (by adding ro.config.media_vol_steps=30 for example)
johnsag49 said:
I have the G90 Pro and would love to be able to edit the build.prop file... the phone has a ridiculously low number of volume steps for media, 7.
Is there any way to boot into TWRP temporarily and edit the file, just to see if that will increase the steps? (by adding ro.config.media_vol_steps=30 for example)
Click to expand...
Click to collapse
Well, the first thing I'm concerned with here is , I'm not sure if THIS TWRP will work on the g90 pro.
But it might be possible. I was able to mount system as r/w on my g90 in TWRP.
You would need to fastboot flash --disable-verity vbmeta and vbmeta_system to prevent red state bootloader lockout.
Ok I've found one potential bug and have a question you may be able to answer. With your build of TWRP I cannot access fastbootd. Running adb/fastboot reboot fastboot just puts me back into recovery. To change images I've been doing the following:
1. Enter bootloader and flash stock recovery you provided in your other G90 thread
2. Enter fastbootd and flash the image
3. Re-enter bootloader and flash twrp
The question I have is, how can the super partition be increased? I tried to flash the LOSQ build with gapps, but the image is > half the size of the super partition. I want to take 1GB away from the userdata partition and add it to the super partition instead. Do I mount the stock super.img in Linux and modify it to be 5GB, adjust the partitions on the eMMC so the new img will fit, flash the new super.img from bootloader, and then go into fastbootd and flash LOSQ? Where does modifying BoardConfig.mk with the new size fit in? If you don't know or don't wanna bother answering that's cool, I've been doing some digging trying to get to the bottom and I'm just not understanding how to adjust the new dynamic partition scheme.
Shananiganeer said:
Ok I've found one potential bug and have a question you may be able to answer. With your build of TWRP I cannot access fastbootd. Running adb/fastboot reboot fastboot just puts me back into recovery. To change images I've been doing the following:
1. Enter bootloader and flash stock recovery you provided in your other G90 thread
2. Enter fastbootd and flash the image
3. Re-enter bootloader and flash twrp
The question I have is, how can the super partition be increased? I tried to flash the LOSQ build with gapps, but the image is > half the size of the super partition. I want to take 1GB away from the userdata partition and add it to the super partition instead. Do I mount the stock super.img in Linux and modify it to be 5GB, adjust the partitions on the eMMC so the new img will fit, flash the new super.img from bootloader, and then go into fastbootd and flash LOSQ? Where does modifying BoardConfig.mk with the new size fit in? If you don't know or don't wanna bother answering that's cool, I've been doing some digging trying to get to the bottom and I'm just not understanding how to adjust the new dynamic partition scheme.
Click to expand...
Click to collapse
The stock /product partition is not needed in non stock roms. Google gsi flashing guide tells show to delete logical partition product.
Code:
fastboot delete-logical-partition product
This is probably what is needed.
Don't know about your plan to increase stock super.img. no idea about why you mention boardconfig.mk
This TWRP is before the patch for TWRP fastbootd, so it is not included. I have resynced source, and will see if new build works, or not. If it does will post new release.
I mentioned BoardConfig.mk because the size of the super partition is listed there, but you were totally right about the product partition and I was able to flash LOSQ+gapps after deleting it. Thanks for the assist, and your work on porting TWRP to this awesome device! Will continue to keep an eye on your work as TWRP finalizes their support for Android 10.
Will this work for the G90 Pro? My guess is not but figured I'd ask
KryptekKnight said:
Will this work for the G90 Pro? My guess is not but figured I'd ask
Click to expand...
Click to collapse
I assume not. But if you send device stock recovery, I can try to bring it up. But cannot test it, I don't have the device.
mrmazak said:
I assume not. But if you send device stock recovery, I can try to bring it up. But cannot test it, I don't have the device.
Click to expand...
Click to collapse
Would you be able to compile a Gcam pretty for this phone? I would be willing to supply you with whatever is within my means to provide
KryptekKnight said:
Would you be able to compile a Gcam pretty for this phone? I would be willing to supply you with whatever is within my means to provide
Click to expand...
Click to collapse
I have no idea about gcam
johnsag49 said:
I have the G90 Pro and would love to be able to edit the build.prop file... the phone has a ridiculously low number of volume steps for media, 7.
Is there any way to boot into TWRP temporarily and edit the file, just to see if that will increase the steps? (by adding ro.config.media_vol_steps=30 for example)
Click to expand...
Click to collapse
Sorry OP.....
I need to get 01 post of your topic to report on custom recoveries on the G90 Pro.
For new users, you should know about the Android 10 permission structure.
In TWRP or PBRP, through the File Manager, it is not possible to copy files to the superpartition. But you can copy files from the superpartition to the internal SD card.
Therefore, to modify files from the super partition, it will be necessary to extract the super partition and extract system-product-vendor to then carry out the modifications and repackage.
Using Havocv3.11 the volume issue dissapears...........
Well all, thanks to @lopestom , we may soon have a new device tree to build recovery from , and data decryption is working on first test img. New recovery would be pbrp instead of twrp.

Samsung devices (2) stuck in system boot splash

HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
<EDITED>
Device 2: Galaxy S3 GT-I9300 - I solved this so i removed this section.
Thank you for any help.
Beeblebrox-BSD said:
HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
Device 2: Galaxy S3 GT-I9300, with working TWRP. This device is giving a "Failed to mount /efs (Invalid argument)" error. The previous setup was shared storage with sdcard and encryption on both internal and sdcard. The sdcard got corrupted, hence the error. This post suggests running
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
but the device does not have identifiable boot device under /dev/block. I think this might work if I can identify the boot partition name?
Thank you for any help.
Click to expand...
Click to collapse
Flash a custom ROM for i9300 via TWRP. Download a custom ROM for i9300 and the appropriate Gapps to go with the ROM, store them on external sdcard. When you are in TWRP, before you flash your ROM, select the "Wipe" option, then select "advanced wipes", on the next menu, choose the system partition, data partition, cache partition and dalvik cache partition then swipe the slider to wipe. Then go back to home screen in TWRP and choose the "Install" option, then choose your ROM file and your Gapps file then swipe to flash. When the flash is finished, select the "Reboot system" option and see if it boots into system.
If that doesn't work, we will take some steps further back and try starting from the beginning.
Keep in mind that some of the custom ROMs for i9300 may have a different partition structure and partition sizes than the stock firmware for i9300 has and may require resizing certain partitions such as the system partition by flashing a custom PIT file like the Galaxy S2 had to do before it flashed certain custom ROMs.
Hi, thanks for the input.
* I had already solved the GT-I9300 issue before your post (I should have added to thread rather than edit the original post). I solved issue with that device by including system partition in the wipe.
* For the SM-T800, I used a LineageOS-14.1 that I had stored somewhere. That also did not work, until I only flashed Lineage and did not include any GApps. If I really need it, I can always flash later. I assume the latest GApps 7.1 build conflicts with older ROMs.
An unexpected problem was the lack of current ROMs for the 2 devices. SM-T800 has nothing other than last build Lineage-14-1-20190205. The I9300 has several unofficial ROMs floating around for newer Android versions, but they are all debug/dev builds with enabled options that drain the battery very quickly.
If anyone comes across a decent ROM for either of these devices please LMK. Thanks.

Categories

Resources