TWRP and ROOT for Tab 4 8/10 (Plus) (TB-8704X/F/V,TB-X704L/F, TB-8504X/F, TB-X304L/F)

Search This thread

matshias

Senior Member
Jan 20, 2015
224
254
TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.

Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.

A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM

WARNING!!! Be careful what you do here. One mistake and the device is soft-bricked. I take no responsibility for bricked devices, lost warranty or even OTAs not working!! Booting and/or flashing files from this post is on your own risk.

Requirements
  • Unlocked bootloader
  • Lenovo Tab 4 Plus with and without LTE and both 8 and 10 inch versions (TB-X704L/F, TB-8704X/F) are supported

Known Issues
  • WARNING! Our device uses dm-verity (verified boot). The system partition should remain read-only. Otherwise a bootloop will occur. You can flash SuperSU to resolve this but OTA's are no longer possible! You have to restore a factory image or clean system backup to receive OTAs

Download

Instructions
  1. Install fastboot and adb on your PC, e.g. from here
  2. Enable developer options and in there select to unlock your bootloader by enabling OEM unlock and enable USB debugging
  3. Connect your PC to your tablet and run
    Code:
    adb reboot bootloader
    using adb on command line. The tablet will reboot into bootloader mode where you will only see the Lenovo logo. Now you use
    Code:
    fastboot oem unlock-go
    to unlock. This will factory reset your device
  4. Setup the tablet again and reboot again to the bootloader
  5. Then run
    Code:
    fastboot boot twrp-3.2.3-0-<your-filename>.img
    to temporarily boot into TWRP. You can also flash if you are sure ;)
  6. Select to keep system read only when TWRP starts to avoid modification which will make OTAs impossible
  7. Backup at least system and boot partitions. Choose "System Image" for the system partition backup. Keep this backup for OTA updates.
  8. Optionally flash SuperSU or Magisk in TWRP which should install system less. Keep OEM unlock enabled if you flash or modify anything

Writable System Partition
Some mods and root apps require write access to the system partition. By default the system partition is read-only to prevent any modification. Please note that if your system partition is modified in any way it needs to be restored to its original state before a system update (OTA) can be applied.

  • @dywersant has created a Magisk module here to achieve write access
  • @KreAch3R has updated the Magisk module to the latest version here



System Updates (OTA)
In order to successfully apply Lenovo system updates after root you have to restore the original boot, recovery (if you flashed TWRP) and system partitions from your current installed version (e.g. S000037) for your variant of the tablet. This will NOT delete your apps and data but will unroot. Note that OTAs are block based and always check the contents of most of the partitions. This means that all of these partitions (except your data) have to be original and have to be on the exact same version (e.g. S000037) for the update to succeed.

Credits
@wonderfulme - for testing the 8" version
@Teddy01 - for testing the 10" version
@3m1k - for providing the 8" Verizon version
TeamWin


Source
TWRP Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-7.1
Device Tree (TB-8704X): https://github.com/Matshias/twrp_android_device_tb_8704x/tree/android-7.1
Device Tree (TB-8704V): https://github.com/3m1k/twrp_android_device_tb_8704v
Device Tree (TB-X704L): https://github.com/Matshias/twrp_android_device_tb_x704l/tree/android-7.1
Device Tree (TB-8504X): https://github.com/Matshias/twrp_android_device_tb_8504x/tree/android-7.1
Device Tree (TB-X304L): https://github.com/Matshias/twrp_android_device_tb_x304l/tree/android-7.1


Changelog
v3:
  • Update to TWRP 3.2.3-0
v2:
  • Update to TWRP 3.2.1-0
v1:
  • Initial Release
 
Last edited:

w0rdie

Senior Member
Jan 26, 2007
492
76
Austin, TX
TWRP for Tab 4 8/10 without "Plus"

I built TWRP for both devices and need testers. Here are experimental versions:
Tab 4 8 (TB-8504X/F): twrp-3.1.1-0-tb_8504x_testing1.img
Tab 4 10 (TB-x304L/F): twrp-3.1.1-0-tb_x304l_testing1.img

I can test the 8 inch tomorrow. Thanks for building this btw.

---------- Post added at 02:01 PM ---------- Previous post was at 01:58 PM ----------

Wait, these builds are for the Plus variants only? They will not work with ZA2B0009US, correct? :\
 
  • Like
Reactions: mark5150

boza12

New member
Mar 9, 2011
3
1
I have tested on X304L work perfectly.
Only one thing when i'm on power via usb TWRP still turning off screen in 2min and seems that all operations are put in wait state until screen turned on again.
:good::cool:
 
  • Like
Reactions: matshias

matshias

Senior Member
Jan 20, 2015
224
254
I have tested on X304L work perfectly.
Only one thing when i'm on power via usb TWRP still turning off screen in 2min and seems that all operations are put in wait state until screen turned on again.
:good::cool:

Thanks a lot for testing. I moved the TWRP to the first post.

In the TWRP settings you can switch off whether the screen goes off or not. Are you sure TWRP halts processing while the screen is off?
 

EggZenBeanz

Senior Member
Jul 21, 2005
286
91
Yes sure.

Is anyone able to make available a system image. I deleted my original back up after the update then messed the root up. I now getting setup app crash and can't get passed setup
 

matshias

Senior Member
Jan 20, 2015
224
254
Yes sure.

Is anyone able to make available a system image. I deleted my original back up after the update then messed the root up. I now getting setup app crash and can't get passed setup
Download the factory image for your tablet from the Russian Lenovo forum (lenovo-forums.ru) . In there you will find a fragmented system image. You have to puzzle it together with a script according to XML file in the Image directory. If you wanna flash via fastboot you will have to convert it with img2simg to sparse format. You can also use dd command line TWRP with the raw image file. If you tell me your exact model number I can also upload what you need.
 
  • Like
Reactions: swieder711

EggZenBeanz

Senior Member
Jul 21, 2005
286
91
Download the factory image for your tablet from the Russian Lenovo forum (lenovo-forums.ru) . In there you will find a fragmented system image. You have to puzzle it together with a script according to XML file in the Image directory. If you wanna flash via fastboot you will have to convert it with img2simg to sparse format. You can also use dd command line TWRP with the raw image file. If you tell me your exact model number I can also upload what you need.


Thanks! That would be awesome if you could. I think I may brick it if I do what you suggest! My model is
TB-X704L/F (10.1 inch plus) could you include the boot image too?
 
Last edited:

matshias

Senior Member
Jan 20, 2015
224
254
Thanks! That would be awesome if you could. I think I may brick it if I do what you suggest! My model is
TB-X704L/F (10.1 inch plus) could you include the boot image too?

Is it TB-X704L vor F? This is an important difference.

The boot image you can find as can be flashed in the factory image. You can start with this. When I have time I'll prepare the system image. Not sure when that is though.
 

w0rdie

Senior Member
Jan 26, 2007
492
76
Austin, TX
Last edited:

Matt1491

Member
Sep 2, 2017
5
0
On my Tab4 8 the touch is also not working with this image.
I think the following lines from dmesg.log are showing, that the touch driver ist not loading:

<4>[ 1.323216] [HXTP] Himax common touch panel driver init
<4>[ 1.323221] [HXTP][ERROR] himax_common_init failed, compare_tp_id = 1
 

matshias

Senior Member
Jan 20, 2015
224
254
The twrp-3.1.1-0-tb_8504x_testing1.img flashes and boots fine but there is no touch input.

Logs: https://www.dropbox.com/s/vo2dvi4frpsf9hf/logs.zip?dl=0

(I connected a mouse via USB and got SU flashed)

Do you have the TB-8504X or TB-8504F? Very strange that the touch driver won't load. if you have the F variant then maybe it has a slightly different hardware in which case I'll have to compile separate TWRP for this variant. Can you extract me your stock boot or recovery image and send it to me? I'd then build TWRP with the kernel from your tablet and we'll see what happens
 

speedyg0nz

Senior Member
Dec 6, 2010
159
67
Sony Xperia 1 III
Sorry if this is off topic, but is there a way to convert the Chinese versions of the Tab 4 / Plus to the Global rom? I'm thinking of getting one from China when I'm there but the lack of Google Play support is a major deal breaker.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 64
    TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.

    Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.

    A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM

    WARNING!!! Be careful what you do here. One mistake and the device is soft-bricked. I take no responsibility for bricked devices, lost warranty or even OTAs not working!! Booting and/or flashing files from this post is on your own risk.

    Requirements
    • Unlocked bootloader
    • Lenovo Tab 4 Plus with and without LTE and both 8 and 10 inch versions (TB-X704L/F, TB-8704X/F) are supported

    Known Issues
    • WARNING! Our device uses dm-verity (verified boot). The system partition should remain read-only. Otherwise a bootloop will occur. You can flash SuperSU to resolve this but OTA's are no longer possible! You have to restore a factory image or clean system backup to receive OTAs

    Download

    Instructions
    1. Install fastboot and adb on your PC, e.g. from here
    2. Enable developer options and in there select to unlock your bootloader by enabling OEM unlock and enable USB debugging
    3. Connect your PC to your tablet and run
      Code:
      adb reboot bootloader
      using adb on command line. The tablet will reboot into bootloader mode where you will only see the Lenovo logo. Now you use
      Code:
      fastboot oem unlock-go
      to unlock. This will factory reset your device
    4. Setup the tablet again and reboot again to the bootloader
    5. Then run
      Code:
      fastboot boot twrp-3.2.3-0-<your-filename>.img
      to temporarily boot into TWRP. You can also flash if you are sure ;)
    6. Select to keep system read only when TWRP starts to avoid modification which will make OTAs impossible
    7. Backup at least system and boot partitions. Choose "System Image" for the system partition backup. Keep this backup for OTA updates.
    8. Optionally flash SuperSU or Magisk in TWRP which should install system less. Keep OEM unlock enabled if you flash or modify anything

    Writable System Partition
    Some mods and root apps require write access to the system partition. By default the system partition is read-only to prevent any modification. Please note that if your system partition is modified in any way it needs to be restored to its original state before a system update (OTA) can be applied.

    • @dywersant has created a Magisk module here to achieve write access
    • @KreAch3R has updated the Magisk module to the latest version here



    System Updates (OTA)
    In order to successfully apply Lenovo system updates after root you have to restore the original boot, recovery (if you flashed TWRP) and system partitions from your current installed version (e.g. S000037) for your variant of the tablet. This will NOT delete your apps and data but will unroot. Note that OTAs are block based and always check the contents of most of the partitions. This means that all of these partitions (except your data) have to be original and have to be on the exact same version (e.g. S000037) for the update to succeed.

    Credits
    @wonderfulme - for testing the 8" version
    @Teddy01 - for testing the 10" version
    @3m1k - for providing the 8" Verizon version
    TeamWin


    Source
    TWRP Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-7.1
    Device Tree (TB-8704X): https://github.com/Matshias/twrp_android_device_tb_8704x/tree/android-7.1
    Device Tree (TB-8704V): https://github.com/3m1k/twrp_android_device_tb_8704v
    Device Tree (TB-X704L): https://github.com/Matshias/twrp_android_device_tb_x704l/tree/android-7.1
    Device Tree (TB-8504X): https://github.com/Matshias/twrp_android_device_tb_8504x/tree/android-7.1
    Device Tree (TB-X304L): https://github.com/Matshias/twrp_android_device_tb_x304l/tree/android-7.1


    Changelog
    v3:
    • Update to TWRP 3.2.3-0
    v2:
    • Update to TWRP 3.2.1-0
    v1:
    • Initial Release
    12
    I am happy to make probably the best announcement since we got TWRP: My X704F is running LineageOS 14.1. While some things are already working, two things keep me from releasing it now: Wifi and Usb don't work yet. Once I have solved these problems, I will create my own thread for it. So be patient ;)
    11
    Can someone please help I soft bricked my device And I'm unable to fastboot new rom QFIL is keep saying SAHARA FAILED can someone help me?

    You need to have install both the qualcomm drivers and the Lenovo drivers, both installed via executables in the drivers section in the russian .7z download. You need to be in a mode of disable driver signature checking, search how to do that for your OS.

    When you get that message, hit volume up key when it says that then hit download again and it keeps going.

    I spent a day trying to unbrick, I kept trying and hitting walls and trial+error and eventually succeeded, this is what worked for me, this is not necessarily the best approach and some steps may not be required, but it at least worked for me so I offer it.

    Download the Russian forum ROM for your device e.g. mine was the Lenovo Tab 4 8 Plus. If you didn't flash, only boot, TWRP, you can use the stock recovery. If you're not sure what is your model then have your tablet powered off and press and hold the volume up key and press the power button til you feel a vibration then let go both buttons. The recovery will then tell you the model. Mine was TB-8704F so my link is here

    http://lenovo-forums.ru/topic/24137-lenovo-tab4-a8-plus-proshivka-tb-8704f_s000024_170706_row_qfil/

    Change do your own model. Go up the forum and down to your model.

    You need a 7zip extractor.

    When you extract you need a password which is "lenovo-forums.ru"

    Inside the unzip is images, drivers, tools. We're using the images and the drivers, but ignoring the tools

    Go to drivers and run the Lenovo and the Qualcomm executables.

    Inside the unzip the tools has QFIL.exe but it doesn't work. Download the QFIL 1.0.02 from here

    https://androiddatahost.com/jj9ye

    Boot into a mode without device driver signing. I used Windows 7 32bit so I reboot and hit F8 as it came out of BIOS and selected disable driver sig. Once booted all the steps below are done.


    Run the qfil exec in the above.

    qf_4.png.f5797926619c16ad6a4b9f1a9b9032c7.png


    The top most browse point it to the images folder and it will show one file, select it. Then load XML select browse and point it to the image folder and it will select a file and then it will select another file "patch".

    Then unplug your tablet and turn it off (press hold and ensure screen is black for many seconds).

    Then this is a tricky part, took me many attempts. Press and hold the volume up key and plug in the USB-C cable and then let go of the volume up key. The QFIL tool should show a qualcomm port as being used. If you don't see anything active saying qualcomm in port then unplug table and repeat the vol up and power. You can get other modes like Lenovo diag mode, keep trying til it says qualcomm.

    Then hit the lowest download button. If it says error hit the table volume up key and press download again.

    If it is working you'll see a movement left to right above the text log status section. If it is working you'll see a "reset" message and the table shows activity it is doing something there is a moving bar on the tablet. Keep repeating it takes 2 or 3 time phases where the tablet stops showing progress so then hit the download button. Eventually you get a normal boot and you're unbricked.
    10
    Twrp 3.4.0-0 tb-8704

    Hi Everyone,

    As an experiment I wanted to see if I could compile TWRP for my TB-8704X so I started out using Matshias sources which worked fine. My next step was to see if updating the kernel would with the issue of not being able to see the internal storage with stock Android 8.1 so I then forked Matshias's Device Tree and updated kernel from 8704X_S001025_190606 and ran another compile test. With my build I'm now able to select Internal Storage with 8.1 so I believe the updated kernel fixes the issue where TWRP can't see and wipe partitions.

    Credits to Matshias for providing his device tree
    Thanks to plutothot for helping test this on the TB-8704F

    Updated to TWRP 3.4.0-0

    Sources
    TWRP Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-7.1
    Device Tree (TB-8704X): https://github.com/lancebukkake/twrp_device_lenovo_tb_8704/tree/android-7.1
    Device Tree (TB-8704F): https://github.com/lancebukkake/twrp_device_lenovo_tb_8704/tree/8704F
    Device Tree (TB-8704V): https://github.com/lancebukkake/twrp_device_lenovo_tb_8704v

    Downloads (TB-8704X and TB-8704F are separate so make sure you download the correct img for your device)
    Github

    Download for TB-8704V (shoutout to xsacx for testing it out)
    Github

    Please click Thanks if I helped you
    8
    I was having trouble flashing magisk-remount.zip from @dywersant on Magisk v17.1, so I updated the module on top of the 17 template. Find the file attached, I tried it and it flashes correctly and provides RW access.
    @matshias, you can update OP with a link to this post as well for users having the same problem.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone