[ROM][UNOFFICIAL][9.0][tb8704f/x] LineageOS 16.0 for Lenovo TAB4 8 plus

hunnia41

Member
Apr 16, 2015
22
7
23
How do you get /system to be writable?
In twrp one is given a choice, when one installs it and starts it for the first time.
Read
https://forum.xda-developers.com/thinkpad-tablet/general/twrp-root-tab-4-plus-tb-x704l-f-tb-t3664407

in it read
"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."
Since I did not know what the above meant ;), I installed Magisk first. before I installed twrp, rebooted to stock, rebooted to fastboot installed twrp, started up twrp, selected system alterable, wipe system and data, install (sideload pie) , gapps and magisk. Then rebooted into system, and I was lucky :)
 
Last edited:
  • Like
Reactions: robidick

mad4some

Senior Member
Dec 10, 2012
506
156
73
East TN
In twrp one is given a choice, when one installs it and starts it for the first time.
Read
https://forum.xda-developers.com/thinkpad-tablet/general/twrp-root-tab-4-plus-tb-x704l-f-tb-t3664407

in it read
"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."
Since I did not know what the above meant ;), I installed Magisk first. before I installed twrp, rebooted to stock, rebooted to fastboot installed twrp, started up twrp, selected system alterable, wipe system and data, install (sideload pie) , gapps and magisk. Then rebooted into system, and I was lucky :)
So just to understand about encryption.......Data format (typing "yes" and complete tablet wipe) is required to decrypt tablet before LOS 16 will boot, correct?? And when LOS 16 is booted it will not try to re-encrypt and shows "tablet decrypted" in settings > security.......correct?? Thanks
 

hunnia41

Member
Apr 16, 2015
22
7
23
So just to understand about encryption.......Data format (typing "yes" and complete tablet wipe) is required to decrypt tablet before LOS 16 will boot, correct?? And when LOS 16 is booted it will not try to re-encrypt and shows "tablet decrypted" in settings > security.......correct?? Thanks
I do not know because I am now actually encrypted, but now TWRP as I wrote somewhere, now decrypts the data.
 
Last edited:

robidick

New member
Jul 16, 2019
3
1
0
In twrp one is given a choice, when one installs it and starts it for the first time.
Read
https://forum.xda-developers.com/thinkpad-tablet/general/twrp-root-tab-4-plus-tb-x704l-f-tb-t3664407

in it read
"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."
Since I did not know what the above meant ;), I installed Magisk first. before I installed twrp, rebooted to stock, rebooted to fastboot installed twrp, started up twrp, selected system alterable, wipe system and data, install (sideload pie) , gapps and magisk. Then rebooted into system, and I was lucky :)
Thanks hunnia41 :good: LineageOS 16.0 is working now!
I reflashed my device with stock TB-8704F_S000024_170706_ROW, rebooted to stock, rebooted to fastboot, booted TWRP, installed latest magisk-v19.3.zip, installed magisk-tb8054-remount-v17.1.zip, rebooted into stock and confirmed in magisk manager that dm-verify was checked, again booted to TWRP via fastboot, mounted /system rw, wiped /system /data and /cache, sideloaded pie (no gapps and no magisk) and voila, booted succesfully into pie .
 
  • Like
Reactions: Sage

cashrox

Member
Apr 22, 2008
44
2
0
Is there any chance this could be ported to the TB-8504f/x (the non plus version of the Tab 4 8)? I finally managed to get it up to the official Oreo build but a custom rom would be really great.
 

mad4some

Senior Member
Dec 10, 2012
506
156
73
East TN
Thanks hunnia41 :good: LineageOS 16.0 is working now!
I reflashed my device with stock TB-8704F_S000024_170706_ROW, rebooted to stock, rebooted to fastboot, booted TWRP, installed latest magisk-v19.3.zip, installed magisk-tb8054-remount-v17.1.zip, rebooted into stock and confirmed in magisk manager that dm-verify was checked, again booted to TWRP via fastboot, mounted /system rw, wiped /system /data and /cache, sideloaded pie (no gapps and no magisk) and voila, booted succesfully into pie .
So you never had to format data, correct?? And is your tablet now encrypted or decrypted?? Thanks
 

lunytune89

Member
Jul 22, 2019
7
1
0
I just can't get it to work.

TWRP 3.2.3.0 is already flashed - original backups are lost >:

Lineage 14.1 starts without problems.

After flashing from 16.0 the Lineage logo gets stuck.

I already tried under Mount/System -> and Checkbox at Mount system partition read-only disabled - System/Data/Cache wipe -> flash from 16.0

Also the variant with magisk-tb8054-remount-v17.1 doesn't bring any progress for me.

I'm getting desperate.

Is there any chance that someone might upload the Stock recovery + Stock ROM here so I can flash it again? Maybe flashing from stock ROM can help.
 

andyskelly

Senior Member
Mar 28, 2013
53
14
0
I just can't get it to work.

TWRP 3.2.3.0 is already flashed - original backups are lost >:

Lineage 14.1 starts without problems.

After flashing from 16.0 the Lineage logo gets stuck.

I already tried under Mount/System -> and Checkbox at Mount system partition read-only disabled - System/Data/Cache wipe -> flash from 16.0

Also the variant with magisk-tb8054-remount-v17.1 doesn't bring any progress for me.

I'm getting desperate.

Is there any chance that someone might upload the Stock recovery + Stock ROM here so I can flash it again? Maybe flashing from stock ROM can help.
You could try the moto smart assistant. I used it to put stock back on my tablet
 

Hemphiz

Senior Member
Sep 12, 2015
910
307
93
Bristol
m.9gag.com
I just can't get it to work.

TWRP 3.2.3.0 is already flashed - original backups are lost >:

Lineage 14.1 starts without problems.

After flashing from 16.0 the Lineage logo gets stuck.

I already tried under Mount/System -> and Checkbox at Mount system partition read-only disabled - System/Data/Cache wipe -> flash from 16.0

Also the variant with magisk-tb8054-remount-v17.1 doesn't bring any progress for me.

I'm getting desperate.

Is there any chance that someone might upload the Stock recovery + Stock ROM here so I can flash it again? Maybe flashing from stock ROM can help.
You could try flashing stock Nougat from here https://drive.google.com/file/d/1lvzWu4H2MdolKw6TnRtZEeR2bPE8Y8fZ/view?usp=drivesdk via twrp then take all the OTA updates, that would ensure your firmware is up to date. I think the key is to Format before flashing a custom rom - reboot back to recovery after formatting. If going back to Nougat and you can't format via twrp then you can also use the fastboot command. I think it's "fastboot -w" I used it before to return to Nougat backup from Oreo
Edit: you don't need stock recovery to take the OTA's
 
  • Like
Reactions: suhridkhan

robidick

New member
Jul 16, 2019
3
1
0
So you never had to format data, correct?? And is your tablet now encrypted or decrypted?? Thanks
You are right. After flashing stock firmware, /data wasn't encrypted. But now with LineageOS 16.0 /data is encrypted because forced encryption is active since Android Pie 9.0. This is OK for me because our TWRP 3.2.3-0 decrypts /data ... if you need to have access to ...
 

hunnia41

Member
Apr 16, 2015
22
7
23
Problem in switching between earplug and loudspeakers.



Code:
/*
 * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...). 
 * Please do some research if you have any concerns about features included in the products you find here before flashing it! 
 * YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you. 
 * Your warranty will be void if you tamper with any part of your device / software.
 * Same statement for XDA.
 */

LineageOS is a free, community built, aftermarket firmware distribution of Android 9 (pie), which is designed to increase performance and reliability over stock Android for your device.

LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.


What works:
Calls/SMS/Mobile data
Wifi
Bluetooth
GPS
Camera
Audio
FM radio
Torchlight
LED
USB and WLAN tethering
Fingerprint sensor
Broken
Permissive selinux
You tell me

Source code:
device : https://github.com/lenovo-devs/android_device_lenovo_TB8704, https://github.com/lenovo-devs/android_device_lenovo_tb-common
kernel: https://github.com/lenovo-devs/android_kernel_lenovo_msm8953/tree/lineage-16.0-wip
vendor: https://github.com/lenovo-devs/proprietary_vendor_lenovo

2019-07-14
  • Initial release
mailru: lineage-16.0-20190721-UNOFFICIAL-TB8704.zip
gdrive: lineage-16.0-20190721-UNOFFICIAL-TB8704.zip

Previous versions:


How to install
You have to had TWRP installed from this thread TWRP and ROOT for Tab 4 8/10 (Plus) (TB-8704X/F/V,TB-X704L/F, TB-8504X/F, TB-X304L/F)

In TWRP clean Data if you coming from stock ROM and do Install of this ROM. If you have android 8 stock rom installed you have to format Data with data loss, because used encryption is incompatible with android 7.1

Thanks
Big thank to @mistersixt, who donated $$ for device.

XDA:DevDB Information
[ROM][UNOFFICIAL][9.0][tb8704f/x/v] LineageOS 16.0 for Lenovo TAB4 8 plus, ROM for the Lenovo Thinkpad Tablet

Contributors
highwaystar_ru
Source Code: https://github.com/lenovo-devs/android_kernel_lenovo_msm8953/tree/lineage-16.0-wip

ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: LineageOs

Version Information
Status: Testing

Created 2019-07-21
Last Updated 2019-07-21
Sorry this is not directly a porting problem, but after installing lineage 16 into my tb8704f, my device have problem switching between the earplug and loudspeaker. Usually it has problem switching back to the loudspeaker.
On the web some people say that this is a lineage/magisk problem, and if I remove Magisk, than problem is solved. I do not want to remove magisk, but I might have to. Anybody had thsi problem, and how he/she soved it?
I think I might have the solution. Lineage comes with an "Audio FX" application. Force stopping the application it seems, might have solved the problem
 
Last edited:

lunytune89

Member
Jul 22, 2019
7
1
0
You could try flashing stock Nougat from here via twrp then take all the OTA updates, that would ensure your firmware is up to date. I think the key is to Format before flashing a custom rom - reboot back to recovery after formatting. If going back to Nougat and you can't format via twrp then you can also use the fastboot command. I think it's "fastboot -w" I used it before to return to Nougat backup from Oreo
Edit: you don't need stock recovery to take the OTA's
Thank you so much for your help.

During the installation I get the error 7 back, because I have the X-version according to TWRP, but it says 8704F on the package.

Any solution for this?
 
Last edited:

hunnia41

Member
Apr 16, 2015
22
7
23
Thank you so much for your help.

During the installation I get the error 7 back, because I have the X-version according to TWRP, but it says 8704F on the package.

Any solution for this?
I used the boot, rcovety and system available through the link. (I had to sign up) to put back 8.1 stock using fastboot. Than I installed as describe by me and others the lineage Pie.
https://www.needrom.com/download/lenovo-tab-4-8-plus/
 
  • Like
Reactions: Hemphiz

lunytune89

Member
Jul 22, 2019
7
1
0
Thanks to you, I am back on the latest Stock ROM. Lenovo Moto Smart Assistant and customizing the Stock.zip both worked.

But I still have problems with the encryption.
After a factory reset and format data in TWRP again, even with mounted /data and /system I get stuck with the lineage logo.

Is it necessary to flash magisk before? Which steps did you take at Magisk in Stock Rom?

So far I have flashed the image via TWRP. Is the flash process via ADB Sideload more recommended?

Thank you in advance.