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

Search This thread

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
@Yahoo Mike
I have TWRP for my Moto G52 (same 680 processor). When observing similar trees, I found something
https://github.com/Yahoo-Mike/recov...e52/recovery/root/init.tb128fu_decrypt.rc#L45
Is this service actually needed? It's working fine for me in my G52 without that even though my stock vendor has that service.

Thanks
Possibly not.

When you first try to get decryption working, you try everything you can think of. When you finally get it working, you go back and cut out all the things you don't need. Maybe I missed this one.

Thanks for letting me know. Maybe I'll try taking it out at the next release for the TB128FU to see if the tablet really needs it.

Interesting that Motorola uses the same SoC for the G32, G42 & G52 and Tab G62.
 
  • Like
Reactions: HemanthJabalpuri

HansDampfi

Member
Jan 24, 2023
19
14
Hey

Can someone tell my why Snapdragons SoC´s are more populare for twrp and cfw ?

i have a TB125FU
and i think thats such a nice tablet but, i am a little bit desperate about twrp and cfw in future for this device
 

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
Hey

Can someone tell my why Snapdragons SoC´s are more populare for twrp and cfw ?

i have a TB125FU
and i think thats such a nice tablet but, i am a little bit desperate about twrp and cfw in future for this device
I wouldn't say "more popular". I'd say "easier" ...at least from a developer's point of view.

I support twrp versions for both Qcom and MTK devices. At the development stage, decryption is easier for Qcom SoCs because of the great library that TeamWin have written. There's no equivalent for MTK SoCs.

As for custom ROMs...I haven't had problems on QCom or MTK SoCs.

But don't be fooled - there are other features of Qcom SoCs that make development more difficult. Qcom's implementation of SecureBoot is one of them.
 
  • Like
Reactions: HansDampfi

AForan

Member
Aug 18, 2019
31
5
Hello. in twrp, it is not possible to make changes to the system section via update-script (patch) or the file manager built into twrp (screenshot below),
the system is patched in R/W, mounted the system section in the main menu, I am trying to move the folder to /system, which ends in failure). Install a script that, for example, will recursively delete a folder in the system section, it turns out only after such commands from a PC:
adb shell
twrp mount system
twrp remount rw system
exit

adb push patch.zip /tmp

adb shell
twrp install /tmp/patch.zip.

If you just install the patch from the install menu in twrp, it will not be able to make changes to the system section, although it will end with a successful installation. But if you do this after the commands described above (remount from a PC), then everything will be installed and the changes are applied in the system.
the standard mount that I use in the patch is: "run_program("/sbin/mount", "-t", "auto", "/system_root");"

Is it possible to repair this in TWRP?

IMG_20230205_214220_218_1.jpg
 

Attachments

  • patch.zip
    120.6 KB · Views: 11
Last edited:

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
...
But if you do this after the commands described above (remount from a PC), then everything will be installed and the changes are applied in the system.
the standard mount that I use in the patch is: "run_program("/sbin/mount", "-t", "auto", "/system_root");"
Thanks. It's good to know that we can use the remount workaround.
Is it possible to repair this in TWRP?
That's a question for the TeamWin team. Currently they don't support mounting /system r/w for dynamic partitions.
 
  • Like
Reactions: AForan

AForan

Member
Aug 18, 2019
31
5
Thanks. It's good to know that we can use the remount workaround.
Hello, it turned out to do without adb shell. To mount the partition in R/W after applying the appropriate patch to transfer the system to R/W (RO2RW) turned out like this:
Code:
mount("ext4", "EMMC", "/dev/block/boot device/by-name/system", "/system_root");
and unmount:
Code:
run_program("/system/bin/umount", "/system_root");
thus, after applying the RO2RW patch, it turns out mount the sections in the update-script for changes and make them into the system with patches.

I ran into this problem: in the process of restoring a backup made in TWRP, some partitions cannot be restored here is an error like this: when
 

Attachments

  • Screenshot_2023-02-07-06-10-55_1.png
    Screenshot_2023-02-07-06-10-55_1.png
    123.4 KB · Views: 19

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
...
I ran into this problem: in the process of restoring a backup made in TWRP, some partitions cannot be restored here is an error like this: when
Yes, modem and bluetooth are loaded read-only. That means you can back them up, but you can't restore them. I can't remember why I did that.

I'll have a look at this over the next week. Thanks for letting me know.
 
  • Like
Reactions: AForan

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
There's a new version of twrp in the OP. Two main changes:

1. removed an unnecessary HAL service - thanks to @HemanthJabalpuri for pointing this out
2. removed the bluetooth, modem and abl partitions from twrp UI

why were the partitions removed from twrp?
@AForan discovered that bluetooth and modem partitions were not restoring in twrp. It turns out they were not being backed up properly either.

The problem was related to how those two partitions are mounted. They are mounted as vfat format. There are known problems with the libraries that twrp uses to backup/restore vfat partitions. Twrp was unable to restore the modem partition - probably because the backup was corrupt.

I could workaround this problem by mounting the partitions in emmc format and taking a bitwise backup/restore. The backup/restore worked, but you couldn't mount the partitions in twrp. So then I thought - why bother? Both partitions can be restored by flashing them with the stock ROM anyway. Unless you are modifying those partitions, you don't need a twrp backup.

If you need to restore the bluetooth partition, flash the BTFM.bin from your stock ROM. If you need to restore the modem partition, flash the NON-HLOS.bin from your stock ROM. Remember to use the same stock ROM as your tablet.

The android bootloader partition (abl) was also removed from twrp. It can be restored by flashing abl.elf from your stock ROM.

If you really want to play with these partitions in twrp, you can still mount them manually from the terminal or in ADB etc.
 

AForan

Member
Aug 18, 2019
31
5
Hello, a new custom firmware has been released on our tablet, but we cannot install it via twrp. but it can be installed with lineage recovery, maybe you can fix something in twrp so that it supports the installation of such scripts?

 

Attachments

  • recovery_los20_0.zip
    32.1 MB · Views: 15

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
Last edited:

Yahoo Mike

Senior Member
Apr 3, 2011
466
213
Tamworth
No, it doesn't help, even after flashing super_1.img from ZUI (which helps on LOS-Recovery) - it doesn't help in TWRP. Even through sideload
(works in LOS-Recovery via sideload)
Then I'm confused. The ROM developer says "flash via twrp".

Maybe ask over on the LOS thread whether others are using twrp, and if so how? Also ask which version of twrp they are using.
 

Daenzn2323

Member
Apr 23, 2017
9
0
Hello, please help!
By manually updating I bricked the device. It's possible to come in to fastboot but it won't let me use flash commands like you described it.
Please, is there a chance to get it back to life?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    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:
    1. Lenovo does not allow bootloader unlocking on some tablets
    2. 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.


    1. ensure your bootloader is unlocked. On the fastboot menu, "DEVICE STATE" should be "unlocked".
    2. download TWRP to your PC (see the Download section below)
    3. 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
    4. if fastboot flash does not work, then use Qfil or EDL to flash twrp to recovery_a and recovery_b
    5. in TWRP: backup the boot, oem and persist partitions in TWRP, if you don't have backups already.
    6. 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

    Source code

    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
    3
    There's a new version of twrp in the OP. Two main changes:

    1. removed an unnecessary HAL service - thanks to @HemanthJabalpuri for pointing this out
    2. removed the bluetooth, modem and abl partitions from twrp UI

    why were the partitions removed from twrp?
    @AForan discovered that bluetooth and modem partitions were not restoring in twrp. It turns out they were not being backed up properly either.

    The problem was related to how those two partitions are mounted. They are mounted as vfat format. There are known problems with the libraries that twrp uses to backup/restore vfat partitions. Twrp was unable to restore the modem partition - probably because the backup was corrupt.

    I could workaround this problem by mounting the partitions in emmc format and taking a bitwise backup/restore. The backup/restore worked, but you couldn't mount the partitions in twrp. So then I thought - why bother? Both partitions can be restored by flashing them with the stock ROM anyway. Unless you are modifying those partitions, you don't need a twrp backup.

    If you need to restore the bluetooth partition, flash the BTFM.bin from your stock ROM. If you need to restore the modem partition, flash the NON-HLOS.bin from your stock ROM. Remember to use the same stock ROM as your tablet.

    The android bootloader partition (abl) was also removed from twrp. It can be restored by flashing abl.elf from your stock ROM.

    If you really want to play with these partitions in twrp, you can still mount them manually from the terminal or in ADB etc.
    2
    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.
    1
    It seems that few people are interested in this machine
    1
    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?
    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.