Project Treble GSI images on Smart Tab M10 (TB-X605F/L) and P10 (TB-X705F/L)

Search This thread

Lackooo84

Senior Member
Jun 13, 2016
149
25
Tatabánya
Got the same **** error message on pie rom too....

I'll give up...

1642942922070.png



Another anomaly.... I flashed this twrp on pie rom but when I tryin to enter twrp stock recovery loads up.... :/
 
Last edited:

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
Ok I think I got it. Now I'm back on pie, tried these commands but always get error:

View attachment 5516229
Try this command:
Code:
adb push modify_phh_gsi.sh /external_sd/modify_phh_gsi.sh
I think adb is complaining there was no destination filename. Make sure you are using the latest adb from google.
I'm a bit confused because in step 3. you said "download the file onto sd card", in step 4. copy file to sd card.
In step 3 you download the files from the internet to your PC. In step 4 you copy the downloaded files to your sdcard.
Okay, what do you mean by "load the rom in LMSA"? Do I start the rescue mode process (with click on the start rescue button) or what do you mean exactly?
Yes, start the rescue. That will load the stock ROM for you.
 

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
Got the same **** error message on pie rom too....

I'll give up...

View attachment 5516313
Did you run the modify_phh_gsi.sh script? Did it work?

If it worked, then what is the size of your system partition and your GSI image?
Another anomaly.... I flashed this twrp on pie rom but when I tryin to enter twrp stock recovery loads up.... :/
That sounds like a 3-button problem. Check the TWRP thread for this device for tips.
 

Lackooo84

Senior Member
Jun 13, 2016
149
25
Tatabánya
Did you run the modify_phh_gsi.sh script? Did it work?

If it worked, then what is the size of your system partition and your GSI image?
That sounds like a 3-button problem. Check the TWRP thread for this device for tips.
No, because it is not possible to have 2 different recovery in the same partition. adb reboot recovery also work to boot recovery.

So, can you tell me please step by step what to do? In step 3 you said download files to sd card, then in step 4 copy them to sd card, but why would I copy them when they already on the sd card? :/ This is why I'm confused with this guide. Also I'm on stock pie already do I need to re-flash it again? How do I run those scripts on the sd card?
 

Lackooo84

Senior Member
Jun 13, 2016
149
25
Tatabánya
Ok now I was able to flash android 10 GSI onto oreo rom (same room has bricked my tablet before when flashed it on pie). I tried several Android 11 GSI's, none of them worked. All of them gives me "size too large" error in fastboot, those GSI's about 3.4GB. Nvm I'll stay on android 10, all I wanted just a dark mode theme which is missing from stock roms on this tablet...

The funny thing is I cannot even install Gapps stock package it says not enough space on system partition... on a fully empty system... what a joke...

I just wonder how was anybody able to install Android 11 rom onto this device if I can't... I have a 32GB version is there any with bigger storage space out there?!
 
Last edited:

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
No, because it is not possible to have 2 different recovery in the same partition. adb reboot recovery also work to boot recovery.

So, can you tell me please step by step what to do? In step 3 you said download files to sd card, then in step 4 copy them to sd card, but why would I copy them when they already on the sd card? :/ This is why I'm confused with this guide. Also I'm on stock pie already do I need to re-flash it again? How do I run those scripts on the sd card?
The point of steps 3 and 4 is to get those files onto your sdcard. Once you've done that move on to the next step.

It is important that you run the script on your device when in twrp. One of the things it does is increase the size of the filesystem on the system partition.

If you are having problems installing twrp, read this device's twrp thread. There are tips there on how to get twrp booting.

If you did not root or modify the stock ROM, then there's no need to reload the stock ROM. The GSI just needs all partitions to be pure stock.
 

Lackooo84

Senior Member
Jun 13, 2016
149
25
Tatabánya
Just please tell me the noob friendly steps what to do to resize partition in twrp.

What I tried so far:

While was on stock pie, put those files onto sdcard, installed/entered twrp.

Now in your guide next step is to install new GSI, but I cannot because system partition is too small.

In your guide I need to run the script AFTER flashing new GSI, that is what I don't understand.

I tried to run those commands in adb sideload from PC, but always getting errors.

So please tell me step by step what to do to resize partition in twrp pls!
 

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
On Linux-based systems (like Android), the filesystem and partition are two separate things.

The script in the OP will expand the filesystem to the full size of the system partition. This usually results in enough free space to install GApps (usually nano or pico) after installing a vanilla GSI.

There are no instructions on this thread to change the size of the system partition. If your GSI is larger than the partition, then it will not fit. Compare the size of your GSI image with the size of the system partition.
 

Lackooo84

Senior Member
Jun 13, 2016
149
25
Tatabánya
On Linux-based systems (like Android), the filesystem and partition are two separate things.

The script in the OP will expand the filesystem to the full size of the system partition. This usually results in enough free space to install GApps (usually nano or pico) after installing a vanilla GSI.

There are no instructions on this thread to change the size of the system partition. If your GSI is larger than the partition, then it will not fit. Compare the size of your GSI image with the size of the system partition.
Then how other flashed successfully android 11 GSI's if all of them bigger than 3GB and this tab has only 3GB of system space?? Then you can install only android 10 but not 11....

I asked you more than once to tell me step by step how to run these srcipts exacty but still no answer... thanks.
 

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
Then how other flashed successfully android 11 GSI's if all of them bigger than 3GB and this tab has only 3GB of system space?? Then you can install only android 10 but not 11....
I run AndyYan's LOS 18, which is about 2GB. It is vanilla A11. Then I install pico opengapps for A11 ARM64. There are other GSIs that fit on these tablets.

I asked you more than once to tell me step by step how to run these srcipts exacty but still no answer... thanks.
To run the script, the OP gives an example using ADB commands. You can also run the script in the TWRP terminal. Or you can open an ADB shell and run it there. If you are getting errors, what do they say?

The easiest way to install the zips is in TWRP. If you don't know how to do that, you could check the TWRP threads for instructions or google it.
 
Feb 3, 2021
14
7
20
Gensōkyo
Last edited:

JinbaIttai

Member
Jun 19, 2007
5
5
I just want to say thanks to @Yahoo Mike and everyone involved in this comprehensive thread.
I found it very useful when setting up my new TB-X705F with LineageOS 18.1

I just want to add a couple of notes on my experience.

I spent a long time trying to get "root" working, I couldn't figure out what to do with the "Magisk (for phhusson-based GSI ROMs)" in the OP.

Every time I tried to flash any of those I soft-bricked my device and had to use the Lenovo Rescue and Smart Assist to flash back to stock and start again.

I also had trouble using the Lenovo Rescue & Smart Assist, it kept failing to restore my device.
After using fastboot to reflash the stock boot image, the restore went perfectly.

Eventually I cottoned on to the fact my ROM was already rooted with phh su, and all I had to do was install the
me.phh.superuser_1.0.3.3 apk.
It's no longer available via Google Play but can be found on various apk mirrors.

Also, after getting everything else set up and working I wanted to use the included Smart Dock as a Bluetooth speaker. I could connect to it but not play any music through it.

It turns out I needed to do the initial configuration via the Alexa app first, otherwise it won't show up as a Bluetooth speaker. So (after backing up my /data partition via TWRP) I flashed stock again, configured the speaker with a throw-away Amazon account, then back to LineageOS.

So for future players - set up the speaker first - when configured properly it will show up in your Bluetooth devices twice. Once as a media device (headphones logo) and once as a generic device.
 

Eighthourblink

Senior Member
Has anyone ran into an issue where after flashing over one of the GSI images, it gets stuck at the inital booting animation? I let it go for hours with no progress

Tablet : Lenovo M10 x605f (3GB)
Image : lineage-18.1-20220715-UNOFFICIAL-arm64_bvS-vndklite
Android : 11
 

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
Has anyone ran into an issue where after flashing over one of the GSI images, it gets stuck at the inital booting animation? I let it go for hours with no progress

Tablet : Lenovo M10 x605f (3GB)
Image : lineage-18.1-20220715-UNOFFICIAL-arm64_bvS-vndklite
Android : 11
What you are describing will happen if
Disable_Dm-Verity and/or modify_phh_gsi.sh fail.

Do they report any errors? Make sure you run the latest versions.
 

Eighthourblink

Senior Member
What you are describing will happen if
Disable_Dm-Verity and/or modify_phh_gsi.sh fail.

Do they report any errors? Make sure you run the latest versions.
When running them both within TWRP, there are no red errors and each of them completes fine. The way that Im running modify_phh_gsi is using adb shell from computer, chmod'ing the file and running the script. Completes with no errors

Regarding modify_phh_gsi, is the one that is linked here (MEGA) the most updated one, or the one within Github (HERE).

Disable_Dm-Verity was grabbed from here (HERE)

Forgot to mention - although there is a newer version of TWRP out, im using the one from the guide here, TWRP 3.6.0
 

Yahoo Mike

Senior Member
Apr 3, 2011
468
221
Tamworth
When running them both within TWRP, there are no red errors and each of them completes fine. The way that Im running modify_phh_gsi is using adb shell from computer, chmod'ing the file and running the script. Completes with no errors
When boot is stuck on the Lenovo screen it is usually because the Android init process has aborted.

One reason that happens is because the GSIs try to mount the system partition read-write, but this tablet's bootloader tells the kernel to stop loading when this happens. This is a security measure. The script modifies the GSIs to stop them from mounting /system r-w.

After you have flashed your GSI ROM and run the zip and script, in TWRP try this:
Code:
adb shell
umount /system         <== it's ok if this fails
mount -r /system
cat /system/bin/rw-system.sh |  grep "if mount -o remount,rw"
The output should start with a "#". If not, the script did not run properly.

If it does start with "#", then boot the GSI and let it sit for about 30 seconds at the Lenovo logo. Then grab the system and kernel logs. The kernel log should report why it was told to stop the init process. PM me a link to the logs:
Code:
adb logcat -d > system.log
adb shell su -c "dmesg -T" > kernel.log

Regarding modify_phh_gsi, is the one that is linked here (MEGA) the most updated one, or the one within Github (HERE).
A simple file comparison shows they are identical.

Forgot to mention - although there is a newer version of TWRP out, im using the one from the guide here, TWRP 3.6.0
The version of TWRP shouldn't matter. Your problem is that the init process is aborting.

One last question: after you tried the SAR conversion, did you run LMSA and get your tablet booting into the stock ROM again? You will need to do that before you can load an A11 GSI.
 

Eighthourblink

Senior Member
When boot is stuck on the Lenovo screen it is usually because the Android init process has aborted.
When i stated that its getting stuck at the booting animation, i meant the LineageOS "arch" booting animation. Sorry for not being clear about that.
One last question: after you tried the SAR conversion, did you run LMSA and get your tablet booting into the stock ROM again? You will need to do that before you can load an A11 GSI.
Yes I am running LMSA in Windows (gross) each time. Its been a lovely back-and-forth process. Let me try it one more time here after I study for my Sec+ exam.

Also, for A11. is lineage-18.1-20220715-UNOFFICIAL-arm64_bvS-vndklite the correct one for Lenovo x605f. There is no A-Only variant.

I appreicate you helping me on this matter
 
Feb 3, 2021
14
7
20
Gensōkyo
Has anyone ran into an issue where after flashing over one of the GSI images, it gets stuck at the inital booting animation? I let it go for hours with no progress

Tablet : Lenovo M10 x605f (3GB)
Image : lineage-18.1-20220715-UNOFFICIAL-arm64_bvS-vndklite
Android : 11
If you want to run Android 11 directly instead of SAR, you should use A-only images. I recommend you to restore your device with LMSA or QPST and follow this thread, the SAR has many issues to solve, whilst installing Android 11 A-only directly runs well.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    This thread is for sharing your experiences with Project Treble GSI images on the Lenovo Smart Tabs M10 (TB-X605F/L) & P10 (TB-X705F/L). I'll update this post as more things are discovered.

    You can load Android 10 and 11 GSI ROMs on top of Lenovo's stock Pie ROMs.

    You can also load Android 10 and 11 GSI ROMs on top of Lenovo's stock Oreo ROMs. There are some graphics glitches when you use the stock Oreo ROMs.

    WARNING 1: this procedure will wipe your whole device (including data). So do a backup first.
    WARNING 2: this is experimental. If you don't know what you're doing, then you could brick your device. The risk is all yours.

    Loading over stock Pie

    1. unlock the bootloader (if not already unlocked)
    2. download Disable_Dm-Verity_ForceEncrypt.zip (created by @Zackptg5). If you want your data partition encrypted, then rename the zip file to Disable_Dm-Verity_enfec.zip. We'll use this to disable dm-verity on boot.
    3. download modify_phh_gsi.sh to your SDcard or OTG device. I wrote this script to by-pass phhusson's read-write mount of /system during boot, which freezes our tablets. The script also runs resize2fs to make the /system filesystem take up the whole /system partition. Don't forget to make this script executable with chmod.
    4. copy those files to your SDCard or OTG device:
      Code:
      adb push modify_phh_gsi.sh /external_sd/
      adb shell chmod a+x /external_sd/modify_phh_gsi.sh
      adb push Disable_Dm-Verity_ForceEncrypt.zip /external_sd/
      [B]only if you want an encrypted data partition[/B]: adb shell mv /external_sd/Disable_Dm-Verity_ForceEncrypt.zip /external_sd/Disable_Dm-Verity_enfec.zip
    5. load the stock Pie ROM using LMSA rescue mode or QComDLoader
    6. boot the device into fastboot (Power+VolDown)
    7. flash the GSI image: fastboot flash system your_gsi.img (you can install the GSI image in twrp, if you prefer)
    8. flash TWRP (for Pie): fastboot flash recovery pie_twrp.img
    9. boot into twrp (pwr+VolUp+VolDown)
    10. format Data partition
    11. install Disable_Dm-Verity_enfec.zip or Disable_Dm-Verity_ForceEncrypt.zip
    12. run modify_phh_gsi.sh and boot the GSI:
      Code:
      adb shell /external_sd/modify_phh_gsi.sh
      adb reboot
    13. (optional) if your GSI doesn't include Google Apps, then download and install a gapps zip (ARM64) in TWRP. I use "pico", but choose the one that suits you. Do this after running modify_phh_gsi.sh - to avoid running out of space.
    14. reboot to system

    Loading over stock Oreo

    1. unlock the bootloader (if not already unlocked)
    2. download and unzip the stock Oreo ROM
    3. load the stock Oreo ROM using QComDLoader, and your device in EDL mode. When it's finished, do not boot into the system. QComDLoader configuration settings:
      Code:
        Download Mode: Upgrade
              Chipset: 8953
      eMMC Programmer: prog_emmc_firehose_8953_ddr.mbn
          Raw program: rawprogram_unsparse_upgrade.xml
               patch0: patch0.xml
    4. boot the device into fastboot (Power+VolDown)
    5. flash the GSI image: fastboot flash system your_gsi.img (you can install the GSI image in twrp, if you prefer)
    6. flash TWRP (for Oreo): fastboot flash recovery oreo_twrp.img
    7. boot into twrp (pwr+VolUp+VolDown)
    8. (optional) if your GSI doesn't include Google Apps, then download and install a gapps zip (ARM64) in TWRP. I use "pico", but choose the one that suits you. OpenGApps isn't officially available for Android 11 yet.
    9. (optional) to get the right pixel density, add "ro.sf.lcd_density=240" to vendor/build.prop. I wrote gsi4tablet.sh to do this for you. Run it in twrp adb shell. Make sure the script is executable (using chmod).
    10. reboot to system
    Here are some links to Lenovo's stock Oreo ROMs:

    Choosing a GSI image
    @phhusson keeps a full list of Project Treble GSI images.

    Our devices are all ARM64 A-only. This means that you should only get ARM64 and A-only GSI images. Anything else will not work.

    If there is an ARM64 A-only "vndklite" GSI, you can use that.

    But do not use AB (or AB vndklite) GSIs, because this tablet is non-System-As-Root (nonSAR).

    Note for A11: there is no A-only GSI with vndklite. So just use the A-only GSI.

    "This device is not Certified by Google"
    If you get this message when you boot the GSI, use ADB and follow instructions under "How to bypass certified device after first boot?".

    If you can't find sqlite3 in adb, then install the Device ID app from this XDA article to get the GSF number on your tablet.

    "Insufficient storage space available in System partition"
    If you get this error message when trying to install GApps, read this post.

    What about Android 12 ?
    There are no non-SAR A12 GSIs for these tablets, because of the vndk-lite implementation.

    If you want to try Android 12, visit this thread about converting the tablet to system-as-root (SAR). It is also experimental.

    How do I repartition my tablet?
    You might want to do this to increase the size of the system partition. Google it, if you like. But there are no instructions on this thread. No one wants to support noobs who trash their partition tables.

    Where do I find... ?
    • QComDLoader is downloaded during an LMSA rescue. You'll find it in C:\ProgramData\LMSA\Download\ToolFiles\QcomDLoader_1.3.2\QcomDLoader_1.3.2. Alternatively, @Chaser42 has a link and some instructions at the bottom of the first post in this thread.
    • EDL mode: the easiest ways to enter EDL mode are: adb reboot edl or in TWRP: Reboot->EDL Mode. Alternatively, from a powered-off device: insert USB cable while holding VolUp
    • TWRP for Oreo for TB-X605F/L.
    • TWRP for Oreo for TB-X705F/L.
    • Magisk (for phhusson-based GSI ROMs) lives here.
    • GApps lives here.
    • Disable_Dm-Verity lives here.

    Last modified: 2 September 2022 (add note about A11 and vndklite)
    3
    I just want to say thanks to @Yahoo Mike and everyone involved in this comprehensive thread.
    I found it very useful when setting up my new TB-X705F with LineageOS 18.1

    I just want to add a couple of notes on my experience.

    I spent a long time trying to get "root" working, I couldn't figure out what to do with the "Magisk (for phhusson-based GSI ROMs)" in the OP.

    Every time I tried to flash any of those I soft-bricked my device and had to use the Lenovo Rescue and Smart Assist to flash back to stock and start again.

    I also had trouble using the Lenovo Rescue & Smart Assist, it kept failing to restore my device.
    After using fastboot to reflash the stock boot image, the restore went perfectly.

    Eventually I cottoned on to the fact my ROM was already rooted with phh su, and all I had to do was install the
    me.phh.superuser_1.0.3.3 apk.
    It's no longer available via Google Play but can be found on various apk mirrors.

    Also, after getting everything else set up and working I wanted to use the included Smart Dock as a Bluetooth speaker. I could connect to it but not play any music through it.

    It turns out I needed to do the initial configuration via the Alexa app first, otherwise it won't show up as a Bluetooth speaker. So (after backing up my /data partition via TWRP) I flashed stock again, configured the speaker with a throw-away Amazon account, then back to LineageOS.

    So for future players - set up the speaker first - when configured properly it will show up in your Bluetooth devices twice. Once as a media device (headphones logo) and once as a generic device.
    2
    Hey there,
    I've found a method to install Android S GSI ROMs (Broadly speaking, the System-As-Root ROMs) on X605F. There's a patch called MakeMeSar by @erfanoabdi, which can make the device support System-As-Root. After apply it, we can flash A/B GSIs on this device just follow your way.
    For more information, I wrote a post: https://xdaforums.com/t/android-r-gsi-system-as-root-on-on-smart-tab-m10-tb-x605f.4400689/.
    Thanks for providing a way to install GSI ROMs on X605F.
    Regards,
    Jun ASAKA.
    2
    Here's a guide on how to fix the "Insufficient storage space available in System partition" when you try to install GApps.

    solution
    In TWRP:
    1. press "Mount"
    2. untick "Mount system partition read-only", then tick "System".
    3. go back to main menu and select "Wipe". Don't panic. We're not going to delete any files from the system.
    4. select "Advanced Wipe"
    5. tick "System" and select "Repair or Change File System"
    6. select "Resize File System". If that button is not there, then you mounted the system partition as read-only. Go back and untick that.
    7. confirm that TWRP is asking "Resize System?" and then swipe to resize
    8. now you can go back to main menu and install GApps

    why does this happen?

    The system partition is roughly 3GB in these devices. However, after flashing a GSI image, the filesystem size can be considerably less.

    For example:
    Code:
    X605F:/ # df -H
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                1.3G   26M  1.3G   2% /
    tmpfs                 1.4G  188k  1.4G   1% /dev
    tmpfs                 1.4G   25k  1.4G   1% /tmp
    /dev/block/mmcblk0p26 260M  172k  260M   1% /cache
    /dev/block/mmcblk0p52  25G   46M   25G   1% /data
    /dev/block/mmcblk1p1  128G   24G  104G  19% /external_sd
    /dev/block/mmcblk0p24 1.9G  1.8G   60M  97% /system
    
    X605F:/ # blockdev --getsize64 /dev/block/mmcblk0p24
    3221225472
    In this example, the partition size of /system is about 3.2GB (3221225472), but the filesystem size is 1.9GB with only 60M free. Because there's only 60M free, GApps fails with the message "Insufficient storage space available in System partition".

    The solution is to resize the filesystem to include the unused 1.3GB on the partition. That's what TWRP does in the solution above.

    Here's our example filesystem after following the steps above:
    Code:
    X605F:/ # df -H
    Filesystem            Size  Used Avail Use% Mounted on
    rootfs                1.3G   26M  1.3G   2% /
    tmpfs                 1.4G  188k  1.4G   1% /dev
    tmpfs                 1.4G   45k  1.4G   1% /tmp
    /dev/block/mmcblk0p52  25G   46M   25G   1% /data
    /dev/block/mmcblk1p1  128G   24G  104G  19% /external_sd
    /dev/block/mmcblk0p24 3.2G  1.8G  1.3G  59% /system
    There's now 1.3GB free on the filesystem because it's been resized to fill up the whole partition. TWRP saves the day (again) ... and GApps is happy!
    2
    Lineage OS 17

    I just wanted to give an update with lineage 17, I was able to get passed the issues with the gapps by registering the google services id through their webpage.

    Everything thing seems to work very well...... wifi, audio, and both front and rear camera work perfectly. The only problem I am still dealing with is flickering in overlay situations, and nothing I've tried from a developer settings perspective fixes the issue. If the flickering can be fixed, I think we'll have a really good option here.

    One other thing I wish I could get working in this lineage OS is the google assistant ambient mode. I can't get the option to show up in the assistant settings. Have ambient mode on this tablet would be perfect with the original alex cradle.