yashsingh1/xdaforums huggingface dataset:
[Thinkpad Tablet Android Development] Slack3r:
Sorry it took me so long to see this, but I had similar problems as you initially. It turns out you actually have to install TWRP to the tablet for it to mount /system properly, booting into it from fastboot doesn't work for some reason - that was what fixed it for me at least. It may be different for your device but I had to run the flash recovery command twice for it to stick..

Also want to say thanks to highwaystar_ru, the past few builds have been running great :)
[Thinkpad Tablet Android Development] BigBrother84:
Thank you for that important information!

You suggest it may work on my tb-8504f If I install twrp using:

fastboot flash recovery PATCHTO/twrp.3.x.x.img

After that am I able to boot into twrp using

fastboot reboot recovery

or buttons combination? Hmh i tried to install TWRP using booted TWRP but stock recovery was booting instead of it. Strange...

Ok so let's imagine theoretically that I did it, but my problems aren't ending on it, I have to modify script installing LOS as [MENTION=9500349]Plant[/MENTION] said. (TWRP ERROR 7 - your device is tb_8504f zip is for tb-8504f)

With all that steps you think it may work?

OK, so let's imagine theoretically that it crashed one more time (why not). Am I able to restore everything with twrp installed if I will twrp backup all partitions? Or just reflash everything using MiFlash. Will fastboot flash recovery, modify device recovery permanently? Does MiFlash restores stock recovery? (what is the name of .img that I have to find into system package. Something like recovery.img)? Am I able to unzip just that file, or backup it using some fastboot command and transfer it to my computer?

Thank you for caring! :)
[Thinkpad Tablet Android Development] Slack3r:
Yep, you'd need to flash TWRP via that fastboot command and boot to recovery by holding vol up/power. I put the ROM and gapps files on a MicroSD card which was picked up by TWRP.

I had similar problems with the ROM not being compatible after the first failed flash, you should be able to modify the updater-script file located at META-INF\com\google\android to include "tb_8504" as a compatible device. I didn't test this method however, as I reflashed the stock image which combined with installing TWRP on the device solved my issues.

If you need to, the full stock image can be flashed using QFIL and the instructions from here, but I'd recommend trying to restore the backup posted by Plant as the QFIL method can take some time to get figured out. I'm not sure how this compares to MiFlash but that would likely produce the same results.

Hope this helps!
[Thinkpad Tablet Android Development] jakub-g:
screen rotation

Does anybody have problem with auto rotation for screen? In mine TB-8504F it doesn't work. Installed some apps which are testing sensors and none sensor responsible for screen rotation is vsible after flashing this system.

---------- Post added at 04:43 AM ---------- Previous post was at 04:24 AM ----------

If you will brick your device as me :) you can always use Qualcomm Flash Image Loader (QFIL) with proper files for your device. Note for mine works QFIL v2.0.0.1. Newer versions won't work with my device. It will load stock android 7 then under TWRP you can wipe and flash Lineageos. Firstly was bricked while was going from And 8.0 and not flashed but only booted TWRP. As mentioned above need to flash TWRP :)
[Thinkpad Tablet Android Development] matthvh:
I tried restoring the backup, but after I tried booting into system I got a black screen I can't fix. Power buttons don't work, I can't boot into recovery / anything else. No logos or text. It's like the battery is dead, but I can't power it on. Tried charging it, because the battery was around 10% when I tried restoring the backup, but I don't think that will help. Any other ideas? I think I lost this device for good.
[Thinkpad Tablet Android Development] Wrighton:
Hi,

After coming from stock 8.0, I’ve got everything up and running which appears to run great.

However, I am struggling to get my PS4 controller working.

It will connect fine via Bluetooth, but no input is detected.

Any ideas?
[Thinkpad Tablet Android Development] BigBrother84:
Finally I installed successfully that beautiful ROM!

The problem was that I had to reboot to twrp using key combination directly after flashing it by fastboot (when you reboot after flashing, stock recovery replace twrp).

[MENTION=7737930]highwaystar_ru[/MENTION]

After that everything works great, (magisk flashed) with one exception - I cannot modify root partition on working os when I try it freezes...

It's important for me because I cannot e.g. install busybox or hide navbar adding qemu.hw.mainkeys=1 to build.prop on vendor.

I'll try adb remount partition, and see but it's new for me.

Edit: what I saw later, system has problem with plugging/unplugging headphones.

That one with 3 pin jack seems not to disconnect if you do it but 4 pin jack headset works good.

If you want, I can send you logcat? :)
[Thinkpad Tablet Android Development] setDefault:
http://www.lineageosdownloads.com/fix-error-7-lineage-os/

delete the getprop in the file then save it again as a zip
[Thinkpad Tablet Android Development] drizzle123:
I am trying to build with the following manifest

https://github.com/darran-kelinske-fivestars/local-manifest-lineage/blob/TB-8504/manifest.xml

But I'm getting the following exception:

error: vendor/lineage/build/soong/Android.bp:31:8: module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'
ninja: build stopped: subcommand failed.
18:08:14 soong bootstrap failed with: exit status 1

Is there a configuration step I missed?

---------- Post added at 12:21 AM ---------- Previous post was at 12:12 AM ----------

my bad - I needed to do

mka clean
breakfast TB8504
brunch TB8504
[Thinkpad Tablet Android Development] Onlylovecansetyoufree:
Hello!

I'm an ultra beginner but I would like to install this rom. I thought it was just follow the installation by the rom creator, however it seem to be some other tasks that has to be done than following his guide.

If someonr have the time, could you please give me an easy and very detailed step by step guide how to go through with the installation?

Thanks for your attention. I’m looking forward to your reply.
[Thinkpad Tablet Android Development] drizzle123:
Can you please update your post to include the steps / things you have done so far?
[Thinkpad Tablet Android Development] Onlylovecansetyoufree:
Thank you for your reply.

I haven't done anything yet, not even rooting it.

I'm a bit worried that I may mess my device up since the guide written by the creator of the ROM isn't 100%. At least that's my interpretion by reading other posts in this thread.
[Thinkpad Tablet Android Development] BigBrother84:
Hi,

Don't worry about your device.

In most cases you are able to fix it.

I did one step bad and damaged whole os. After some research and help got from members I restored everything and tried one more time and flashed successfully lineageos. I hope you know terminology like root, bootloader, recovery, partition blah blah. If no, type every word you don't understand.

So steps are:

1. Charge your device to 100% Backup files, passwords everything you have on your tablet. This process will wipe all your data apps settings

2. Install drivers and necessary tools. Adb fastboot, device drivers - very important if you are using Windows

3. Enable developer options in tablet settings and in it USB debugging and OEM unlock and use command adb devices to check if it works correctly.

4. Put twrp and lineage from this thread on SD card and insert it.

5. Use command adb reboot bootloader

6. Type fastboot devices to check if everything is ok

7. Use command fastboot oem unlock-go (here I don't remember if you have to reboot or it's not necessary, if yes, repeat steps from enabling USB debugging to adb reboot bootloader including)

8. With unlocked bootloader Use command fastboot flash recovery patchtorecovery

9. Using device keys combination reboot to recovery directly after flashing recovery don't boot to os because this removes flashed twrp

10. Allow modifications

11. Backup to SD EVERY PARTITION

12. Wipe or format mentioned in first post partitions in wipe section (If you are coming from stock, format data not only wipe)

13. Flash LineageOS zip

14. Reboot and enjoy

If something went wrong, try to rescue your device using MOTO Smart Assistant. If you can't, use MiFlash and kindly ask on second twrp threads for sending os package that MiFlash will use. (for me only MiFlash rescued my device)

I'm not responsible if your device won't boot up or something similar happen.

Read it 3 times and check if you understand everything. If no, don't do that cause only one step wrong and you have to play with rescuing process.

Last thing - I suggest you to wait for other member confirm I've written instructions without mistakes. I'm only a human ;)

Don't be afraid of rooting android. :good:
[Thinkpad Tablet Android Development] drizzle123:
The ROM is working really well for me. Thank you :)
[Thinkpad Tablet Android Development] dhsuwihevddb8294u:
Hello

Probably a stupid question... But is there any way to port this to x304l? any guide that maybe I could use... Any help will be appreciated!
[Thinkpad Tablet Android Development] dhsuwihevddb8294u:
Thanks for your reply

Sadly I dont have such a computer!

One last question! ( please bear with my ignorance)

Can I install a custom rom made for a different device with the same processor/hardware? I would be happy to just get it to boot somehow... so I can read my books and complete my studies in this lockdown ( I tried flashing stock firmware using qfil/mi flash tool but it always ends up in a boot loop)
[Thinkpad Tablet Android Development] BigBrother84:
So I have question what to do with os freezing when I try to write files with su on / partition.

I was able to change bootanimation using adb booted in recovery without any problems but not build.prop located in the vendor partition, I think it is not avaliable in recovery.
[Thinkpad Tablet Android Development] BigBrother84:
[MENTION=9500349]Plant[/MENTION]

Thank you so much :) I haven't got similar problems on rest devices with lineageos16 so that's why I lost.

You mentioned magisk module, but is it prepared only for stock system or lineage I have currently on tab 4 8?
[Thinkpad Tablet Android Development] Akash23q2:
Dear developer, it is my kindly request to you ,

Please also make this rom for the lenovo tab 4 10.

Please reply me.
[Thinkpad Tablet Android Development] dhsuwihevddb8294u:
Thanks!
[Thinkpad Tablet Android Development] Bosszwo:
Same issue here. Did you manage to resolve it?
[Thinkpad Tablet Android Development] ValeraynM:
I just installed this and it worked just fine.

I flashed the twrp from to op, rebooted in the twrp recover, then factory reset, used advance format to clear data, then used adb sideload to install the lineage image and open gapps nano. It took it about 5 minutes to boot the first time.

---------- Post added at 05:28 PM ---------- Previous post was at 05:25 PM ----------

How much of a process is it to go from building version 16 to lineage 17 for this device? It would be really cool to get android 10 you know.
[Thinkpad Tablet Android Development] r00724:
I am a newbie here as well, tried this thread and made some progress. The tab did boot into the OS the first time, asked me to setup and then I realized I was missing gapps. Now, the tab is stuck in reboot loop... I see the startup screen with the little blue ring moving from right to left and then the tab boots into recovery mode. Cant get past this

Any suggestions?
[Thinkpad Tablet Android Development] weaa8675309:
Hey, just spent all day resolving this issue. I remembered seeing you two running into it as well, and wanted to make sure I came back here and follow up.

First, the solution: (I think these steps should work for both TB-8504f and TB-8504x variants, and honestly could be used with just about for any Lenovo device)

- Download and install Lenovo's "Rescue and Smart Assistant" software (Looks like it's Windows only, PM me if you're on Linux or MacOS and I'll try and share the stock image when I get time) https://support.lenovo.com/us/en/downloads/ds101291

- The program is pretty straightforward, but select "Rescue" -> "Lenovo Tablet" -> "Lenovo Tab4 8" -> etc. and select your device as precisely as you can.

- Download the stock image (mine was about 2gb) and when it finishes click "Rescue Now"

- Follow the instructions exactly - I tried to ignore parts about unplugging, turning it off, plugging it back in, etc because I thought they were walking me through booting into recovery. It seems like there really is some proprietary thing that kicks the restoration off when you plug the usb cable in with the device off while holding the "Volume Up" button.

- Once it finishes, you should boot back into the stock OS. It does take a while - I thought it was stuck in another bootloop, so I restarted my device once, but it eventually got past the boot screen.

From there, following the instructions in the OP should work.

- If you're reading this then you've probably already unlocked your bootloader, but just in case reboot into the bootloader and run "fastboot oem unlock-go"

- Then flash the version of TWRP linked in this post (v3.3.x, NOT the one linked in the large TWRP post for this device, which I believe is v3.2.x)

- Reboot into recovery (I had to physically do this, as the fastboot command kept rebooting me into the OS for some reason)

- Wipe Data -> Swipe for Factory Reset -> Advanced Settings -> Change "System", "Data", and "Cache" to use "F2FS" for the filesystem (this file system is a little faster than Ext4, but not at all necessary)

- From the home menu go to Advanced -> ADB Sideload and load the ROM, then load Gapps (I used Nano)

- That's it! It does take a little time to boot, so don't get scared and think you're in another boot loop. Eventually you'll see the setup wizard.

What I think happened is that somewhere earlier in the thread someone uploaded an ADB backup file for the TB-8504x with instructions on restoring it via ADB, and that messed something up in the vendor file for my TB-8504f.

Or, whatever firmware the tablet originally had was not fully compatible with this ROM or TWRP version, and whatever stock firmware Lenovo pushes through that recovery app is. Either way, I'm finally up and running. Wasted a whole day on it.
[Thinkpad Tablet Android Development] charlieforks:
Hoo boy. Another bites the dust. Wish I would have gone all the way through the forum before going Leeroy Jenkins. Thanks for posting the instructions though! I'll certainly be using the next time around. Would you happen to have the factory image? I'm on Linux, so no easy tools for me. Hope all is well!
[Thinkpad Tablet Android Development] Akash23q2:
Sir , please also make this rom for lenovo tab 4 10.
[Thinkpad Tablet Android Development] highwaystar_ru:
I dont have tab 4 10 and there is also no source code for lenovo avaliable. If it possible to adapt other tablets code for tab 4 10 need testing with real device.
[Thinkpad Tablet Android Development] MrDerp91:
I had to retrieve my old account just in order to say thanks to highwaystar_ru, so, thanks so much! I have been wanting to get Lineage OS on my tablet for a long time.

Also, if other people also have some issues installing, I really want to note that before I finally got the lineageos zip to install I had to flash (fastboot flash recovery twrp-3.3.1-1-TB8504.imf) twrp on my tablet, just using boot wasn't enough, it would never install the zips.
[Thinkpad Tablet Android Development] offbeatdave:
Brilliant ROM and thanks for the instructions throughout the thread re. specific steps/pitfalls. Working nicely apart from one app (The Times) which now displays text in a huge font regardless of device or app settings. Never occured as a problem on stock 7 or my other tablets, just since flashing with this. All other apps and text displays as expected. Changing settings in app and device doesn't help. Anything 'under the hood' I can try - quite happy to get my hands dirty.

Edit: Seems app doesn't work properly on my tablet beyond Android 7 - reflashed to stock 8 and font size is still a problem in the app.
[Thinkpad Tablet Android Development] hp25032003:
man thanks a lot i have been searching for a custom rom for my lenovo tab 4 8 finally i found it thanks for developing it we want some more custom roms for lenovo tab 4 8
[Thinkpad Tablet Android Development] bpatterson007:
Trying to install the Lineage .zip and I think it's stuck. Been staring at the TWRP bar with the blue going across it for like 30 minutes. It's been on this part:

Target: Lenovo/TB-8504X/TB-8504X:8.1.0/OPM1.171019.019/8504X_S001031_191204_ROW:user/release-keys

detected fileystem ext4 for /dev/block/bootdevice/by-name/system

Did I miss a step or something, or am I just being impatient? Do I need to reboot? Kinda confused what to do at this point.

UPDATE: I HAD to do this, otherwise the TWRP installation would NOT stay. Immediately after you flash twrp, DO NOT REBOOT, Press and hold volume up and power button.

The problem was that I had to reboot to twrp using key combination directly after flashing it by fastboot (when you reboot after flashing, stock recovery replace twrp).
[Thinkpad Tablet Android Development] Senyaka:
Okay, so I did mine a little different and used a whole bunch of different things there to do what I needed to do.

First off I downloaded TWRP the 3.1 version. Yes I know it's not the latest, but I didn't have issues like I did with the later ones linked in the first post.

I then downloaded all the files needed. *when I first tried to flash the rom I kept getting error 7 so I used the guide in the Lineage OS forum

I copied all files to my SD card including TWRP.

I then installed TWRP the way mentioned in the first post. After booting in TWRP I flashed the TWRP img file to permanently have TWRP on the device. I then rebooted back into recovery and flashed the Rom/Gapps/Magisk and everything turned out fine.

I also tried the ADB sideload method and that worked just fine too.

I don't know if this will help everyone or anyone, but this is what worked for me to get it working on the Tablet.

Thanks muchly to the dev for this great Rom.
[Thinkpad Tablet Android Development] hinxnz:
Gcam go works
[Thinkpad Tablet Android Development] adazem009:
Thanks for the ROM! Everything is working fine. It is much faster than stock. I would like to port Android 10 ROM to this device. Where can I find some tutorials for that? Thanks.
[Thinkpad Tablet Android Development] xegue:
Hi,

Just wondering, what is needed to make this rom official?
[Thinkpad Tablet Android Development] Aryan@123:
Back camera not Working Please fix it!!!
[Thinkpad Tablet Android Development] Birdman85:
I think I may have this issue. I finally got my tab to read the SD card and could actually find the zip files but when I tried to patch my 3 zips it kept saying after each file

updating partition details

FAILED TO MOUNT '/DATA' (DEVICE OR RESOURCE BUSY)

I read through the Lineage one and it said

E3004: this package is for device:tb-8504X etc, this device is tb_8504x

Updater process ended with ERROR: 7

Updating partition details...

Failed to mount '/data' (AGAIN)

If I unpack the zip on my PC and sort the meta stuff out I'm hoping it will work.

Is there some partition thing I'm meant to do?

HELP
[Thinkpad Tablet Android Development] rohityadav07009:
:)

Yes my Back Camera is also not working and something lower sound of the speakers than the stock's sound

---------- Post added at 09:05 AM ---------- Previous post was at 08:48 AM ----------

for ERROR: 7 you can unzip the OS and then go to meta inf and try to find update script in any of the folder ,,, open it in notepad and edit the codes and replace tb-8504X with tb_8504X and then save it as it is ,, without having any extension ,, compress it again amd then try

for "Failed to mount '/data' " ,, In the menu of twrp recovery --> wipe -> Advance wipe-> select data -> click on repair and change partition -> click on repair partition and swipe -> come back and click on change partition and change to partition to FAT OR exFat by swiping -> and again change your partition to EXT4 -> come back to main menu ,, -> Reboot ->Recovery
[Thinkpad Tablet Android Development] Aryan@123:
Now I return to stock android of Lenovo tb-8504x but now back camera is still not working Help!!!!
[Thinkpad Tablet Android Development] Onenoff332:
Anybody working on LineageOS 16.1 with integrated MicroG?

Is there any development of this LineageOS 16.1 with integrated MicroG going on for the TAB 4? I have the 8504F.

---------- Post added at 04:17 AM ---------- Previous post was at 04:07 AM ----------

New to this setup. Found NanoDroid and question answered...duh
[Thinkpad Tablet Android Development] Birdman85:
So i sorted out the partition error thanks very much rohityadav and co.

Now im still stuck with this error.

Installing zip file '/blahblah.zip'

Checking for Digest file...

Skipping Digest Check: no Digest file found

Warning: No file_contexts

E3004: This package is for device; TB-8504X, TB-8504F, tb-8504x, tb-8504f; this device is tb_8504x.

Updater process ended with ERROR: 7

Error installing zip fil '/blahblah'

Updating partition details...done

When i unzip the file and open up the metadata in notepad (C:\....\Lineage\META-INF\com\android) it says

ota-property-files=metadata:69:366

ota-required-cache=0

ota-type=BLOCK

post-build=Lenovo/tb_8504x/tb_8504x:8.1.0/OPM1.171019.019/8504x_S001031_191204_ROW:user/release-keys

post-build-incremental=eng.tomin.20200319.173330

post-sdk-level=28

post-security-patch-level=2020-01-05

post-timestamp=1584610395

pre-device=TB-8504X,TB-8504F,tb-8504x,tb-8504f,tb_8504,tb_8504X,tb_8504x

Anyone offer any suggestions?
[Thinkpad Tablet Android Development] hinxnz:
Thanks for ROM, seems stable here, nice battery life..
[Thinkpad Tablet Android Development] lccr193:
Back camera is not working, any fixes?
[Thinkpad Tablet Android Development] village.guy:
I have just upgraded from the stock firmware to resolve a power consumption issue. The power issue is now resolved but unfortunately I believe I may have uncovered a bug. I use the tab as a dedicated remote control that runs RTIPanel and for the most part it works great. The anomaly I have found is that when the tab is woken up, although the screen accepts touch commands the screen is still sleeping except for the time in the top left hand corner. Commands are actually sent when the screen is touched but there is no visual feedback until either the home button or the app list button is pressed. After pressing either of these buttons the screen displays the current status.

Is there any chance of a fix for this issue?
[Thinkpad Tablet Android Development] shashank1:
Telegram!!

Is their any telegram group for this device ??
[Thinkpad Tablet Android Development] village.guy:
I really would like to resolve this issue and am capable of compiling new code if some kind person can point me in the right direction to find where the code are performs the wake up events.
[Thinkpad Tablet Android Development] SujeeshNannambra:
Hello,

Am getting "updater process ended with error:7

Please help
[Thinkpad Tablet Android Development] SujeeshNannambra:
Never mind, fixed
[Thinkpad Tablet Android Development] Aryan@123:
My WIFi and Bluetooth also not turning on after 2nd flash
[Thinkpad Tablet Android Development] fast9000:
I can't seem to login into my google account after flashing Rom and GAPPS, it just says something went wrong. Please try again but won't let me no matter how many times I try, what gapps do you guys use, please link them here if at all possible.

Otherwise guess I'll have to go back to stock Rom. :crying:
[Thinkpad Tablet Android Development] scorpion2782:
i installed the rom with the pico gapps (but also nano) but i can't add the account. as soon as I select next after entering the email the message is "something went wrong"