[RECOVERY] ClockworkMod 6.0.3.7 for Xiaomi Mi3 tegra4 (pisces) - Mi 3 Android Development

This is a modified ClockworkMod recovery for the Xiaomi Mi3 tegra4 (pisces). It includes some changes from M1cha's CWM for Mi2 to support the dual-system design of the Mi2 (same thing on Mi3), while leaving out "true dualboot" feature for now. I think TDB is useless as long as there is only MIUI available for this device. See source for details.
Working so far:
adbd in recovery
nandroid backup/restore, including system1, boot1
running any update.zip (including AROMA)
choose system to install update to
set active system
Anything else untested.
Installing:
(1) Flash using fastboot:
adb reboot-bootloader
{wait for fastboot screen}
fastboot flash recovery cwm-*-pisces-*.img
(2) Boot new recovery:
Type fastboot reboot and press enter while holding Vol+ key should take you directly to CWM.
(3) Let CWM disable recovery flashing (offered automatically when selecting reboot)
I didn't test this method so far (feedback welcome) -- in case it doesn't work, try this instead:
Alternative installation method:
(1) Disable automatic recovery reflashing (while running MIUI, requires busybox installed and a root shell, eg "adb root; adb shell")
Code:
mount -o remount,rw /system
chmod 444 /system/etc/install-recovery.sh
mount -o remount,ro /system
(2) Flash using fastboot
Code:
adb reboot-recovery
{wait for fastboot}
fastboot flash recovery cwm-*-pisces-*.img
Use at your own risk, right now this is largely untested
Download: cwm-6.0.3.7-pisces-a20131110a.img
Older Releases: cwm-pisces
Source:
Device tree (stub)
Recovery
Note: As there's no kernel source available yet, the kernel is left out of device tree. For building yourself, extract stock kernel from your boot image and place it in the device tree (filename "kernel")
History:
a20131110a:
Integrated all fixes by M1cha that are not related to TDB -- backup/restore of boot1 now working
Set default storage to /sdcard/0, nandroid backups now accessible via MTP
a20131110:
Integrated boot-system selection and recovery-check for both systems
Used biggest font for readability on fullHD display
a20131109a: Integrated the first dualsystem support modification by M1cha
a20131109: Unmodified CyanogenMod source, no dualsystem support at all

This is my future phone.. So thanks

Thanks, but keep in mind this phone comes with 2 different SoCs, Tegra4 and Snapdragon800 -- this here is for Tegra4, which is found in TD-SCMA version... maybe I should update OP to explicitly state that.
Btw, it's not complete yet, it doesn't flash original ROM updates correctly, I think thats because named partition nodes are missing ... I'll add support for these soon
Gesendet von meinem MI 3 mit Tapatalk

No third-party ROM MI3 brothers now seems less useful but thank you
I did a card brush pack Share
Attachment Download:
recovery-clockwork-cwm-6.0.3.7-pisces-a20131110a.zip
http://115.com/lb/5lbdstd81pd#
recovery-clockwork-cwm-6....3.7-pisces-a20131110a.zip
115 network disk packs code:5lbdstd81pd

yao85930101 said:
No third-party ROM MI3 brothers now seems less useful but thank you
Click to expand...
Click to collapse
Well, I need some time to improve it, because there's two possible uses with stock ROM:
- nandroid
- re-flashing mods after upgrade
I'm especially interested in the second, because I want some apps to reside in /system/app permanently. Unfortunately, it doesn't work yet, as it doesn't flash official upgrades (right now need updater app for this) -- as I said, probably the named device nodes for partitions, need time to work on this.
For 3rd-party ROM ... There COULD be. I assume stock kernel is somehow based on this:
http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=tree;hb=refs/heads/linux-tegra-nv-3.4
(seems to contain platform drivers for tegra pluto board, has android drivers and it's even exactly the same linux version)
So, it COULD be possible to build a working kernel from these sources. Well, I didn't even get anything to boot far enough for giving useful error info to me But if you want to "waste" hours and days, please try yourself A custom kernel would be an excellent start.
yao85930101 said:
I did a card brush pack Share
Attachment Download:
recovery-clockwork-cwm-6.0.3.7-pisces-a20131110a.zip
http://pan.baidu.com/s/1Dwmj9
Click to expand...
Click to collapse
Nice! :good: Is this installable from stock recovery, too?
A little remark: I'd prefer not to modify /system automatically from the installer but better boot directly into CWM and then let the user decide. Of course thist would require rebooting to recovery from updater-script. I didn't do edify script for quite some time -- is this possible? If not, maybe we could throw together a little arm7 binary for the boot to CWM for some kind of "final" release. I'd consider thios CWM version "final" as soon as it can flash official updates (from xiaomi)

Oh look forward to updating you again Come on you are the best

However, a day to focus on the brothers really no way to track it?

Hello, I don't have time for this right now. I'll get back to the project probably after christmas.
But, as I said, it's probably the missing partition names -- so this SHOULD be fixable in the device tree, adding init scripts to the recovery (no need to modify CWM itself further). Feel free to clone the repo (AND you need an original kernel image extracted from the phone)

Any reason this wouldn't work on Tegra Note 7?

e8hffff said:
Any reason this wouldn't work on Tegra Note 7?
Click to expand...
Click to collapse
At least two.
1. The kernel. It's taken from an original Mi3 tegra phone, unfortunately, there are no sources yet from Xiaomi. Although it's the same platform, the chances this kernel would boot on any other device are low.
2. "Dual-system". I don't know much about the Tegra Note 7, but I doubt it has 2 system and boot partitions. Most android devices don't -- the Xiaomi phones are the only ones I'm aware of. CWM code in this zip is modified/extended to handle this (mostly taken from modifications done by M1cha for the Mi2). It won't work on a normal single-system device. In fact, there's no need to modify CWM source for a standard single-system device, a device-tree would be enough for building a working CWM recovery.

Zirias said:
At least two.
Click to expand...
Click to collapse
Ok thanks for the reply.

any progress on this work? is this CWM fully working now?

Don't Copy Others Work
If u Copy some ones Post Then Plzzz........... Mention
http://forum.xda-developers.com/showthread.php?t=2521125

new cwm but in chinese dor tegra 4
i have find these two but i think it is in chinese
http://4pda.ru/forum/index.php?showtopic=541742&st=5360#entry32916655
http://www.miui.com/thread-2069908-1-1.html
if any one could help and translate them to english we can have true dual boot and try the new custom roms for tegra 4 xiaomi
Android - 5.0 Lollipop for tegra 4 xiaomi but this must be in chinese too
http://www.miui.com/thread-2111749-1-1.html

Related

LolBoot xD SGS2 dualboot - NEW 12.12.11: Easy-Setup App v2.51

(I wasn't really sure if this might fit into "Development", so I put it here, maybe a mod will move it, if it's a dev topic )
Anyways, here we go, I DUALBOOTED two different, independant ROMs on the S2
Video of dualboot in action: http://www.youtube.com/watch?v=l9-V_6Ua_D0
** THIS IS NOT (YET) COMPATIBLE **
** WITH ICS (ANDROID 4.0.x) ROMS! **
-- this goes for custom ROMs as well as stock ROMs --
Icey Sammich compatibility will be added once Sammy released their ICS kernel sources.​
!!! There now is an app for more convinient and easy setup of the dualboot !!!
(04.11.2011) DualBoot setup app v2.00: http://forum.xda-developers.com/showpost.php?p=19049047&postcount=94
(12.12.2011) App has been updated to 2.51, lot's of good new stuff! >> Free Version -- Donate Version <<
Click to expand...
Click to collapse
First off:
This is only a little experiment I did like "c'mon, has to be possible" - this is NOT (at least yet) tweaked for usability and anything the like, just a humble experiment.
That said, don't flame me if things are rather complexicated to do this ATM.
Maybe I'll come up with a more userfriendly way of setting this up, maybe someone else does, maybe no one does.
Also now that I found a base on what to do, there might be different ways (more easy ones maybe) to set this up, I'll keep toying around with it.
But let's cut to the chase, shall we
So, how was this set up? I'll give a brief rundown of what I did:
I edited a few .rc files in the initramfs of the kernel to make it actually perform a full boot when recovery mode was triggered and to fire up recovery mode when in battery-charging mode.
I also edited a few mounts in the boot .rc for the 2nd OS (in "recovery" mode) to use different partitions for /system and /data, so that we'd end up with really independant installs.
What partitions did I missuse for that:
partition 12 (mostly unused, only when installing a stock ROM AFAIK) for /system - that's a neat choice IMO as p12 is 512MB in size, just as p9 where /system usually sits on
partition 7 (which is usually /cache) for /data
gives us only 100MB of user data space, but for now that's OK, as said, it's only an experiment on how such a thing could be done.
with the original partition for /cache "gone", I mounted a tmpfs for it.
So the OS still has a usable /cache
Then I set up the two OSes:
(dualboot kernel not yet flashed)
Launchprep part 1:
I made a CWM backup of my normal installation I was running (stock XXKG6 at the time).
I installed DevNull-Test AOSP as to it's instructions
Some su'ed voodoo via a terminal while having the 2nd OS (the DevNull AOSP one, in this case) installed - best done in recovery mode via ADB:
rm -Rf /cache/*
cp -Rp /data/* /cache/
dd if=/dev/block/mmcblk0p9 of=/dev/block/mmcblk0p12 bs=4096
That did "set up" the 2nd OS to where it's supposed to go.
Launchprep part 2:
Then, "advanced restore" of the backup made a few minutes earlier:
- boot
- system
- data
Reboot
At this point OS #1 is running again and OS #2 is sitting in hiding, prepared to roll - so, let's roll:
Flashed the modified "dualboot kernel" (via an App or Odin or magic, doesn't matter).
---> DONE <---
reached the point to where everything works as shown in the video.
As said above already, yes it needs some manual work to set it up, yes there's a lot of things that might not work, yes there are other/better ways to set it up.
It's only a humble experiment - lot's of space for improvement.
Maybe you like it - for those who do, I wanted to share this
Attached to this post you find the modified kernel I used, it's based on my v1.20 custom kernel (see sig) but with the above mentioned changes.
I've seen the video m8, this is totally different approach, ur giving this device a new dimension. love u "in a straight way" hahaa
there currently an app called Bootmanager which also handle up to quadruple booting. But sadly currently only support HTC phones.
http://www.appbrain.com/app/bootmanager/com.drx2.bootmanager
well, one can hope!
Thanks OP this is an awesome concept! Very happy to see you posted it with a video! and nice boot animation!
sunwee said:
there currently an app called Bootmanager which also handle up to quadruple booting. But sadly currently only support HTC phones.
Click to expand...
Click to collapse
Yeah, that's the thing.... that app is HTC only.... but we have Samsung S-II and want dualboot as well.
I'm already brainstorming on how to enhance the actual usability of this, i.e. flashing a 2nd OS directely to it's place instead of first installing it to the main system partition. But there is problems when /data is not mounted to the original partition, at least stock doesn't like it on initial boot.... well, well....
That is great. Going to use this for sure. This should be in development for sure.
Congratulations already.
Sent from my GT-I9100 using Tapatalk
This is impressive bro sure will use it
but i want to ask one thing
SD card needed for this or not ?
That would be really cool (and definitely should goes to original development). Does it work with CM7/MIUI + custom rom?
vikas776 said:
SD card needed for this or not ?
Click to expand...
Click to collapse
No, so far this completely works with all internal storage.
But I have a few ideas I have yet to try to get mounted from other places - like images in /sdcard for example (I *so* hope that'll work.... )
Hi
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Sent from my GT-I9100 using Tapatalk
Tricky103 said:
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Click to expand...
Click to collapse
I made this build based on my v1.20 custom kernel, so it has everthing that one has - plus the touchfix already
exactly what i was hoping for.
great job - pls continue your work
Hi i tried this with instanity rom last night. When I use the three buttons to boot it just sits there not booting. My guess is the kernel is not compatible. Unless I made a mistake somewhere.
Sent from my GT-I9100 using Tapatalk
Hm, yah, might be that the kernel isn't fully compatible with that ROM, what kernel does the ROM usually use?
Did you boot it up fully at least once before copying /data to /cache ?
Yes I did fully boot up. But his kernel didn't have advanced activated in recovery so I flashed your kernel and moved the cache okay. But it said /data not found when I ran the 2nd command line.
I will flash aosp later. I like that rom.
I am not sure what kernel nitr8 uses. I think it is his own, Insane.tar would you like it to see if they can work together.
Sent from my GT-I9100 using Tapatalk
Tricky103 said:
But it said /data not found when I ran the 2nd command line.
Click to expand...
Click to collapse
Hm, yeah, that sounds like something didn't work.... make sure you run those commands as root, i.e. "su" as very first command (I'll add that to the first post).
Give me a direct link to the ROM and I'll try it.
Make take a few days though as I'm away from my computer a lot because of work the next two days, but I'll try once time permits.
Well yeah, and this still is in highly experimental stage, if I (or someone else) should ever get this to more stable and reliable state, I'll make an easy to use installer/setup tool
But I got a few other ideas on setting it up I have to try first....
http://goo.gl/2uZCh
This is the complete rom. Only 47mb. I thought you would like the whole rom
Tricky103 said:
Hi
Does this kernel include any of the Hellcat kernel tweaks or are they work in progress.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
May be someday WINDOWS Mo 7 and Android on our sweet beast
Hi
I tried again with Aosp Dev-null. I still get this error "cp: can't stat '/data/*': No such file or directory "
after running this command line " cp -Rp /data/* /cache/ "
Any Ideas ?
It still doesn't boot if I press 3 button it brings up the boot logo and then black screens until it boots to the 1st partition.
Thanks for the link, will download and try as soon as time permits.
Also, try this command sequence, I got an idea what the issue maybe might be, give it a shot:
Code:
su
rm -Rf /cache/*
busybox cp -Rp /data/* /cache/
dd if=/dev/block/mmcblk0p9 of=/dev/block/mmcblk0p12 bs=4096
(use "busybox cp" instead of plain "cp", maybe it helps)
And some update on my ongoing thoughts for those interested:
- got an idea on how to make a more easy to use App for prepping and setting up the dualboot environment
- managed to do a neat thing I didn't really think it would work: issued a "mount" command and the OS thought it was mounting a partition of the internal flash (/dev/block/mmcblk0p12 in this test, but was testing for later on actually doing it with p9 - you might see where I'm headed here ) but instead of the partition it actually mounted from an .img file! (loopback)
i.e. "mount /dev/block/mmcblk0p12 /somedir" actually mounted "/somepath/someimage.img" to "/somedir" instead of the partition from /dev/block/... (you just gotta love Linux and it's flexible way of handling things....)
NOW, imagine /dev/block/mmcblk0p9 (the partition carrying the system) and p10 (data) being (kinda) transparently mounted from an IMAGE FILE
I "only" have to find a way to sneak this in before init starts mounting stuff.
If there's a way to do THAT.... unlimited multiboot from OS images, anyone?
(so far this is kinda dreaming, but would be cool to get it working )

Flashtools (MiFlash4Linux, Recovery from QDL/DLOAD, Partition resize)

Introduction
This is a collection of Tools and Resources for Flashing Mi2(s)(c).
MiFlash4Linux
https://github.com/M1cha/aries-image-builder
Core Recovery Package for MiFlash
This is a small package to Recovery MI2 from any bricked state. It has the following advantages over the official ones from Xiaomi:
They don't flash any ROM, just the core system(bootloaders, modem and recovery)
They are small which means both Download and Installation are faster
It directly installs custom Bootloader and TWRP. That means you easily get your device back to a modded status.
Please follow the official MiFlash guidelines for installation with the following differences:
the DLOAD config is called rawprogram_core.xml
the fastboot script is called flash_core.bat(or flash_core.sh for linux)
there's a script called flash_partition_table_and_core which is a alternative to flash_core.bat/sh.
It can be used to change the partition table.
USE THIS WITH THE CUSTOM BOOTLOADER INSTALLED BY ONE OF THE CORE PACKAGES ONLY. Xiaomi's bootloader will format your whole MMC device. THIS WOULD ERASE YOUR EFS AND YOU CAN'T MAKE CALLS ANYMORE
Changing the partition table
There are multiple packages available:
separated: Xiaomi's original layout with a virtual internal sdcard
separated_single: same as separated but without Dualsystem and bigger system partitions
unified: Xiaomi's new layout with /data/media support
unified_single: same as unified but without Dualsystem and bigger system partitions
unified_single_xiaomi: Xiaomi's version of unified_single
SkiFire13 said:
aries_core_unified_single.zip -> only MIUI > 5.4.x or M1cha's CM12.1 or latest AOSP5 works (only they can see Internal Storage, that now is a virtual sd-card in /data/media/0)
aries_separated_single.zip -> other roms
Click to expand...
Click to collapse
Installation:
Backup all your data(including internal sdcard, and EFS just to be safe)
if you don't use the custom Bootloader yet, flash this package using flash_core.bat/sh first. See the big red warning above for more information
flash the package using flash_partition_table_and_core.bat/sh
boot into recovery(which is TWRP now), recreate the filesystems for all partitions(system,data,cache,sdcard to ext4) in the wipe menu and reinstall your ROM.
Version Information
Bootloader: https://github.com/M1cha/mi2_lk/commits/LA.AF.1.1-02810-8064.0
TWRP: v2.8.7.0
core partitions: aries_images_5.7.16_20150626.0000.4_5.0_cn_a63cddccfa.tgz
Download links for Mobile users:
aries_core_unified_single_xiaomi.zip
aries_core_unified_single.zip
aries_core_unified.zip
aries_core_separated_single.zip
aries_core_separated.zip
XDA:DevDB Information
Flashtools, Tool/Utility for the Xiaomi Mi 2
Contributors
m11kkaa
Source Code: https://github.com/M1cha/aries-image-builder
Version Information
Status: Stable
Created 2015-02-21
Last Updated 2015-07-27
First (as always)
Sent from my A0001
the singleboot packages causes the latest version of CM12 to fail booting because of SELinux enforcing. I'll upload a fixed package asap.
everything has been fixed and is up again.
Pls download everything again(especially MiFlash4Linux if u use that).
i think i will wait util the release of GRUB4Android....
acastrocab said:
i think i will wait util the release of GRUB4Android....
Click to expand...
Click to collapse
the purpose of this thread is not G4A
G4A doesn't allow u to change the partition table. I may publish a simple tool for it though.(so u don't need a computer).
m11kkaa said:
the purpose of this thread is not G4A
G4A doesn't allow u to change the partition table. I may publish a simple tool for it though.(so u don't need a computer).
Click to expand...
Click to collapse
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
MyNameIsKappa said:
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
Click to expand...
Click to collapse
On the top of the page just followed by the title, there is a "Download" tab, you could find the miracle at there ;p
MyNameIsKappa said:
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
Click to expand...
Click to collapse
I can't find the links too, but i saw this link in another thread... http://forum.xda-developers.com/devdb/project/?id=8360#downloads
ancics said:
I can't find the links too, but i saw this link in another thread... http://forum.xda-developers.com/devdb/project/?id=8360#downloads
Click to expand...
Click to collapse
You can see this with a computer only.(Tapatalk doesn't work)
http://puu.sh/gamlY/dd7e4904f9.png
Hey M1cha, thank you! Great job!
I have some issues about the procedure:
1. I am not sure if already had a custom bootloader, so first i'll flash the package flash_core.bat :
- turn on mi2s in fastboot mode
- plug usb, device should appear in miflash(the program should be configured as the photo?)
- and click flash
- reboot phone, enter in fastboot mode again and do the same procedure with flash_partition_table_and_core.bat
Is that right?
It's easy to recreate the ext4 filesystem in TWRP? always used CWM....
m11kkaa said:
You can see this with a computer only.(Tapatalk doesn't work)
http://puu.sh/gamlY/dd7e4904f9.png
Click to expand...
Click to collapse
Oh that's why, I'll download it from a computer, thanks!
Sent from my MI 2S using XDA Free mobile app
@m11kkaa: thnx for the linux tools/scripts, it made my migration from CWM to single-system partition + new bootloader + TWRP easier.
BTW, I just wanted to migrate and keep my current CM11 for the time being. I had to fight a bit with restore from backup because I was not aware of the incompatibility between CWM and TWRP, luckily enough it eventually was sufficient to:
reformat system, data and cache in TWRP
flash the old CWM temporarily and restore boot, system and data
flash TWRP again and make new backups.
Proposal:
It would be good if you can change the heading style of "Installation" in the OP to be the same as e.g "Introduction", because now it looks like part of "Singleboot Partition Layout" section only. It is confusing IMHO.
In my case (i.e. flashing both flash_core.sh and then flash_partition_table_and_core.sh), I had to recreate ext4 FS not only on the system partition in TWRP, but also on the data partition (it could not be mounted and TWRP announced 0 MB size) and eventually also on the cache partition. This seems to contradict the info in OP, part "Singleboot Partition Layout", which mentions that data will be preserved.
@cogano thx for your feedback
it's weird that u had to recreate the filesystems because the positions of these partitions still are the same. I resized system1, modem1 and boot1 to 2KB and system, modem and boot to 2*oldsize-2KB. I checked the offsets and they still are the same.
I have another phone and plan to do the same some time in the next week.
I'll try to avoid the trial&error approach and keep notes between the steps.
P. S. I am quite proficient with Linux administration. However I have to admit that upgrading android devices is usually a risky thing: I would have to read lot of guides - often unclear and confusing - or just give it a go and resolve the problems as they appear. The latter one eventually seems to be faster
cogano said:
I have another phone and plan to do the same some time in the next week.
I'll try to avoid the trial&error approach and keep notes between the steps.
P. S. I am quite proficient with Linux administration. However I have to admit that upgrading android devices is usually a risky thing: I would have to read lot of guides - often unclear and confusing - or just give it a go and resolve the problems as they appear. The latter one eventually seems to be faster
Click to expand...
Click to collapse
thx "parted /dev/block/mmcblk0 p" will help to debug these things.
If you don't have a ROM/Recovery with parted you can reboot to dload from the bootloader which will provide ur whole MMC as a usb drive to your computer.
i didn't see the download tab at first, so i downloaded the whole zip from the github and excuted the ./build.sh in Cygwin. Anyway, it works!
m11kkaa said:
you can reboot to dload from the bootloader which will provide ur whole MMC as a usb drive to your computer.
Click to expand...
Click to collapse
What a great feature!
superiyezi said:
i didn't see the download tab at first, so i downloaded the whole zip from the github and excuted the ./build.sh in Cygwin. Anyway, it works!
Click to expand...
Click to collapse
There's a Download "card" on top.
What are the partitions sizes after flashing the singleboot partition layout?

[HOW-TO] Convert to F2FS on Nexus 6 (ALMOST - Any Rom)

BE WARNED - THIS WILL ERASE EVERYTHING ON YOUR PHONE. DO NOT ATTEMPT THIS IF YOU HAVE NOT MADE A BACKUP AND/OR ARE NOT READY TO REINSTALL EVERYTHING ON YOUR PHONE FROM SCRATCH.
Credit goes to bbedward for his initial thread regarding this concept.
STATUS:
2017/01/08 - Not liking the performance of my Galaxy S3, so I've ordered a new phone (Huawei P8 Lite) for $58 from eBay! Supposedly brand new. I figured I'd have to give it a try just to see. Once I set this phone up I'll start tinkering with my Nexus 6 again. Phone should arrive around 17 Jan!
FOCUS:
Getting F2FS on ANY ROM, but for my purposes, I'm focused on getting F2FS with Flash Kernel to work on Nitrogen OS (if this can be done, then it can be done with any ROM!)
BASICS:
- Need recovery & kernel that support f2fs (tools + kernel driver version must match or be compatible - not sure what the specifics are yet)
Latest New Info:
- The Flash has said that his kernel and crDroid work with F2FS (I haven't tested it myself yet - this version of crDroid actually specifies F2FS support)
2017/01/08
- Found this thread by NABENDU1. It's for Nexus 4, but it gives some good insight on how F2FS works.
- @vprasad1 found another working combination (post #15) - franco.Kernel - r60 Anykernel 7.1.1 with Danvdh's Stock Lite N6F26Q 7.1.1
Explaining a few details:
The issue here is that the exact version of F2FS tools included in most modded recoveries isn't actually specified (that I have found) and the version of tools that end up in the ROM (/system/bin/), which come from the recovery unless built into the ROM, must be compatible. One of the following is true (not sure which one yet):
- the F2FS tools version must be the same or greater than the kernel driver support version
- the F2FS tools version must be the same or less than the kernel driver support version
- the F2FS tools version must match the kernel driver support version
Given that The Flash is consistently including the latest F2FS support in his kernel, and since I've had the most trouble getting F2FS support to work with his kernel and other ROMs that technically don't support F2FS (using bbedward's method mentioned above - link to thread included) I'm inclined to think that the F2FS tools must be the same or greater version compared to the kernel driver support, though I have no way of confirming this yet. Hopefully I'll have different luck with Flash Kernel v1.7!
========
I used:
- Nexus Root Toolkit v2.1.9
- Nitrogen OS 2016-11-19
- MagiKernel v1.1 Stable-1023
- TWRP 3.0.2-0 (modded by xanaxdroid - thread is here)
(TWRP v3.0.2-0 by xanaxdroid mirror) - the original link is down.
I'll take these down if xanaxdroid asks. I have yet to hear from him...
Steps for clean install (and initial install of F2FS recovery / conversion to F2FS):
1) revert to stock (Nexus Root Toolkit)
2) flash recovery with f2fs support (Nexus Root Toolkit)
3) boot into recovery on device
4) full wipe device (normal wipe)
5) convert /cache & /data to f2fs
6) copy over desired kernel and rom to /sdcard
7) install rom & then kernel
8) run adb commands:
# adb shell
# mount -o rw /system
# cp /sbin/fsck.f2fs /system/bin/
# cp /sbin/mkfs.f2fs /system/bin/
# chmod a+x /system/bin/*f2fs*
9) reboot
========
When changing ROMs/kernel (F2FS recovery already installed):
1) boot into recovery
2) do full wipe (f2fs should have stayed from the first time)
3) install rom & then kernel
4) run adb commands:
# adb shell
# mount -o rw /system
# cp /sbin/fsck.f2fs /system/bin/
# cp /sbin/mkfs.f2fs /system/bin/
# chmod a+x /system/bin/*f2fs*
5) reboot
========
More semi-lengthy explanation about fstab:
bbedward suggests a difference in the fstab as being the primary suspect causing the difference in compatibility. Here's the only difference I could find that seemed to be relevant:
- the fstab that worked (MagiKernel + TWRP v3.0.2-0 (by xanaxdroid) + Nitro OS)
/devices/*/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto
- the fstab that didn't work (Flash Kernel + TWRP v3.0.2-0 (by xanaxdroid) + Nitro OS)
*block/sda* auto auto defaults voldmanaged=usbdisk:auto,noemulatedsd
Both fstab files did clearly have the lines needed to mount /data and /cache as f2fs, but they were identical.
NOTE: I also tried TWRP v3.0.0-0 (by xanaxdroid) with Flash Kernel and still no dice. I'm a fan of Flash Kernel since it's my first custom kernel I've played with. I hope to be able to use it some day with Nitrogen OS! Until then, thanks MagiKernel! (maybe I'll convert??? ) <- MagiKernel development has halted for now
========
What I've tried before:
All of the following implies that I've used the previously mentioned adb commands to copy over the f2fs tools and set the proper permissions.
In my experience, it seems that f2fs requires just the right combination of kernel + recovery. For example I used Nitrogen OS (2016-11-19) + Flash Kernel + mod TWRP 3.0.2-0 and it hasn't worked for me, but Nitrogen OS + MagiKernel + mod TWRP v3.0.2-0 did work. The failure for f2fs to work with Nitro OS + Flash Kernel is very reproducible, as is the success with Nitro OS + MagiKernel. (Again using TWRP v3.0.2-0 modded by xanaxdroid).
Keep in mind that the developer of Flash Kernel (developed by The Flash) has tested his kernel with crDroid (a CyanogenMod base ROM) and it worked for him, but I don't know what version of modded TWRP he was using and what version of f2fs tools were in that recovery. From what I've noticed, there seems to be a fundamental difference with CyanogenMod based ROMs when it comes to f2fs support, either that or there's just a version mismatch of f2fs tools between certain recovery + kernel combos. I don't know enough to understand the difference yet, but it is clear that just because a kernel claims to support f2fs doesn't mean that it will work with any ROM, even if you follow bbedward's tutorial mentioned at the top of this post.
The kernel and the recovery must work together (as in what version of mkfs.f2fs / fsck.f2fs supported by kernel & recovery must match (i think - thanks to bbedward again for this info)). The main issue here is that most modded recovery zips/imgs (that I have found) don't list the version of f2fs tools they have. On the other hand usually you can see this info on the main page of any given kernel developer.
I haven't found any specific rhyme or reason yet, but for those looking for Nitrogen OS (2016-11-19 - Android 7.1 - Nougat) + f2fs, this will help you.
NOTE: I'm a clean-freak, so I enjoy clean flashes, so my instructions are geared toward clean flashes, not dirty flashes. Having said that, doing this with a dirty flash is possible, but it will depend on the ROM/kernel you choose as to the details in how you upgrade/switch the ROM/kernel. Done properly, you should only have to switch file systems once and forego any future wiping of your /sdcard or internal storage.
========
NOTE : You'll know your recovery + kernel combo isn't working right when it takes longer than usual to get off the bootloader screen and start with your ROM's animation boot screen. If it's taking too long, you're probably having everything converted back to ext4.
*** WARNING *** WARNING *** WARNING *** WARNING ***
DO NOT INTERRUPT THIS PROCESS DURING BOOT. If you do then you'll render your /data partition inaccessible. It's still fixable with Nexus Root Toolkit > revert to stock, but that's a pain and it takes a while.
This OP will be updated as new info is uncovered!
Thank you for the updated tutorial and information! Been reading up on the benefits and side effects of f2fs. But wasn't sure on whether to do it. Like you I am on nitrogen ROM, 12.4.26. and am a fan of flash kernel. Il will definitely look into this. Also I notice that the link you posted for magikernel isn't working. Either way huge thank you.
Edit - Just read the original thread. Want to thank you again for hoe you asked for his approval first before making a new thread. Very respectful. Not to say people don't respect devs or users in general. Just wanted to add I appreciate you taking the time to reach out him first prior to making this thread.
Thank you again.
Sent from my Nexus 6 using XDA-Developers mobile app
ozzmanj1 said:
Thank you for the updated tutorial and information! Been reading up on the benefits and side effects of f2fs. But wasn't sure on whether to do it. Like you I am on nitrogen ROM, 12.4.26. and am a fan of flash kernel. Il will definitely look into this. Also I notice that the link you posted for magikernel isn't working. Either way huge thank you.
Edit - Just read the original thread. Want to thank you again for hoe you asked for his approval first before making a new thread. Very respectful. Not to say people don't respect devs or users in general. Just wanted to add I appreciate you taking the time to reach out him first prior to making this thread.
Thank you again.
Click to expand...
Click to collapse
Thanks for the feedback!
I'm still researching a way to get Flash Kernel with Nitro OS + f2fs. I have some ideas. I'll update the first post with any new findings.
Edit: unfortunately MagiKernel is dead. So ill be hot on another trail soon. Also MagiKernel isnt as good as Flash out-of-the-box in my experience so far.
ozzmanj1 said:
Also I notice that the link you posted for magikernel isn't working. Either way huge thank you.
Click to expand...
Click to collapse
I actually just tested the link to MagiKernel on my PC and my phone (on XDA Labs) and it worked fine. Are you using another (older) version of XDA forum viewer?
EDIT: OP updated. The "issues" we all run into is a version mismatch between RECOVERY & KERNEL mostly. As long as RECOVERY & KERNEL f2fs tools match, then you can copy over (mkfs.f2fs & fsck.f2fs) from /sbin/ to /system/bin/ and get any ROM to be compatible with F2FS.
EDIT: modified links and removed "" in URL tags. The quotes were necessary for proper display in the XDA Labs app, but not compatible with XDA Legacy app. I've switched to use XDA legacy!
Will this fix low battery throttling and video recording
PunishedSnake said:
Will this fix low battery throttling and video recording
Click to expand...
Click to collapse
LOL, no.
This won't "fix".... ANYTHING.
In fact, this will very likely BREAK things.
Lol how so
No not breaking things here ... Not any more than usual tinkering under the hood... I'm just trying to flush out bbedward's old thread with some more info...
PunishedSnake said:
Will this fix low battery throttling and video recording
Click to expand...
Click to collapse
To give you an answer, no it won't. This info will only "possibly" help you get a ROM to run on f2fs that was not initially designed to do so.
@ozzmanj1
Well the Nitrogen OS ROM developer just let me know he has no plan to include F2FS tools. Looks like we gotta go with plan B...
TheArkive said:
@ozzmanj1
Well the Nitrogen OS ROM developer just let me know he has no plan to include F2FS tools. Looks like we gotta go with plan B...
Click to expand...
Click to collapse
That is a darn shame. Looking at the comparisons of Ext4 and F2FS and it makes me wonder why it has gone more popular. I appreciate your time and work looking into this. Sadly with my schedule I do not have to do a lot of digging with wife, and kids and works....blah blah....lol. Anyways, thank you for letting me know about Nitro.
Side note, any suggestions on another ROM that you are aware of that supports F2FS?
ozzmanj1 said:
That is a darn shame. Looking at the comparisons of Ext4 and F2FS and it makes me wonder why it has gone more popular. I appreciate your time and work looking into this. Sadly with my schedule I do not have to do a lot of digging with wife, and kids and works....blah blah....lol. Anyways, thank you for letting me know about Nitro.
Side note, any suggestions on another ROM that you are aware of that supports F2FS?
Click to expand...
Click to collapse
The Flash said that latest crDroid worked fine. I haven't been able to confirm yet. I have a new smartphone on the way to setup as my primary phone while I experiment on my Nexus 6. Won't get here until Jan 23rd
TheArkive said:
The Flash said that latest crDroid worked fine. I haven't been able to confirm yet. I have a new smartphone on the way to setup as my primary phone while I experiment on my Nexus 6. Won't get here until Jan 23rd
Click to expand...
Click to collapse
Just came across this new kernel that has f2fs support. Based on flash kernel and afew other kernels.
http://forum.xda-developers.com/showthread.php?t=3526034
Going to look into it as flash kernel may drop nexus 6 support soon due to school obligations
Sent from my Nexus 6 using XDA-Developers mobile app
ozzmanj1 said:
Just came across this new kernel that has f2fs support. Based on flash kernel and afew other kernels.
http://forum.xda-developers.com/showthread.php?t=3526034
Going to look into it as flash kernel may drop nexus 6 support soon due to school obligations
Sent from my Nexus 6 using XDA-Developers mobile app
Click to expand...
Click to collapse
Thanks for the news! I'll be checking that out as well.
FYI this works using franco.Kernel - r60 Anykernel 7.1.1 with Danvdh's Stock Lite N6F26Q 7.1.1
Code:
mount | grep f2fs
/dev/block/platform/msm_sdcc.1/by-name/userdata on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6)
/dev/block/platform/msm_sdcc.1/by-name/cache on /cache type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6)
I tried Aero 1.0 Linaro kernel with Danvdh's Stock Lite N6F26Q 7.1.1 but it kept forcing /cache and /data to return to ext4.
Could also be that the rom is coded not to allow it as it is not really stable enough. Main reason it is not implemented in Android.
zelendel said:
Could also be that the rom is coded not to allow it as it is not really stable enough. Main reason it is not implemented in Android.
Click to expand...
Click to collapse
Was that in response to my post???
Sent from my SM-N910T using Tapatalk
vprasad1 said:
FYI this works using franco.Kernel - r60 Anykernel 7.1.1 with Danvdh's Stock Lite N6F26Q 7.1.1
I tried Aero 1.0 Linaro kernel with Danvdh's Stock Lite N6F26Q 7.1.1 but it kept forcing /cache and /data to return to ext4.
Click to expand...
Click to collapse
Many thanks for the info! I'm definitely trying to find combinations that in fact do work, and hopefully derive a method for getting it to work on other combinations as well (hopefully).
Thanks again for the help!
TheArkive said:
Many thanks for the info! I'm definitely trying to find combinations that in fact do work, and hopefully derive a method for getting it to work on other combinations as well (hopefully).
Thanks again for the help!
Click to expand...
Click to collapse
Just a quick link I came across. Not sure if it's useful but as it pertains to f2fs I thought I'd share.
https://www.xda-developers.com/xda-...upersu-has-trouble-with-f2fs-data-partitions/
Sent from my Nexus 6 using XDA-Developers Legacy app
What is F2FS
Can Ya Here Me Now

A comprehensive guide to the Lenovo Yoga Tab 3 Pro (YT3-X90*) and a Cooked ROM

THESE COOKED ROMS ASSUME YOU HAVE ALREADY AN UNLOCKED BOOTLOADER AND TWRP AS RECOVERY SYSTEM. You can flash them using TWRP, after wiping ART, cache, data, boot and system partitions.
FINAL RELEASE: Well... this is the final release from me and it is specifically for the WiFi model. I hope it is worth it for you. It is more stable and somewhat updated, anyway, if you use a X90F (wifi model) you will probably like it. The other versions are still up for whatever reason. Here's the link. Follow this guide by @Quardah if you are coming from a factory ROM. Go to post 46 if you can't get past the setup wizard. A barely tested (by @Nuihc88) version for the 3G (X90L) model can be found here.
NOTICE: If you find this work useful, mirror it. I won't be hosting it for free forever and it is becoming a burden to my Nextcloud installation. One would say this is a pretty much forgotten thread, but I'm seeing almost daily download activity. I'm putting the ROM files offline now and getting away from XDA for a while. Please don't DM me for the files. If you are looking for them, ask others in this thread. Good bye.
||||||||||||||||||| FROM HERE IS JUST INFORMATION YOU PROBABLY DON'T NEED |||||||||||||||||||
Spoiler: NEWS THAT ARE NOT ANYMORE.
APRIL 9, 2021: You can find in these links a new version of the cooked ROM.
The link for the updated cooked ROM is: https://centsoarer.ddns.net/s/Y8o3eoBK4Ryx5RP. This is a version with GAPPS updated: https://centsoarer.ddns.net/s/FPKjgQcmW3CHZCw. Feel free to mirror, unless you are afraid of Lenovo's lawyers, but don't forget to share the link.
My personal version... even more debloated (if you don't need chinese, japanese, korean, or russian input support/apps) and with CPU tweaks for my own usage: https://centsoarer.ddns.net/s/jcCDAgNedryGRjo
KNOWN ISSUES AND SOLUTIONS:
1) One random reboot after the first boot will happen and it is normal.
2) I'd reccommend to stay with Magisk 21.4 for a while, Magisk Manager >21.4 won't manage your extensions.
3) If you can't get past the initial Setup Wizard check post 46. Basically you have to boot into bootloader, erase the config partition and format it again.
4) Needs confirmation, but versions with signature spoofing patches seem to break Lenovo's SmartSide Bar.
JUNE 12: Fast update on the Cooked ROM and TWRP and KERNEL. They are not as universal as I implied before. Proceed carefully since they may not work four your device/firmware. Make a Nandroid backup and only flash with testing purposes.
JUNE 5: So, I know this is not what everybody who owns this tablet wants to have (that is Android 9 or 10 of course) but, in recent weeks Lenovo updated the firmware of this tablets. It still is a Marshmallow one and it still sucks big time but I took it as a base and cooked it to deliver a newer TWRP recovery with compression, a flashable modified kernel and a cooked flashable stock ROM to free the owners of this tablets from the treacherous path of making this hardware to work properly. If you want a better overall experience and are in stock firmware you just need to Unlock your bootloader, flash TWRP, Format data partition (not only wipe), Wipe Cache, Dalvik/ART, System and DATA and flash the Cooked ROM to put this tablet in a sweeter spot. For details go to post #2!
JUNE 3: Been trying to get to know some of the source code available for Cherry Trail devices and I am fairly lost at building TWRP from source. Anyway, I ported a newer TWRP recovery IMG file for the YT3-X90F (maybe L, X, Y and Z) from the TWRP image for the Chuwi Hi10 Pro tablet from here, using AIK-Linux. The result is in the second post labeled as beta, since I only tested in the YT3-X90F model, running lollipop firmware. So far, it works fine flashing ZIP archives, backing up and restoring backups. Advantages? Well, backups are way lighter if you enable compression (like half the size), higher resolution, twrp turns off the screen with a timeout and whatever made them bump from version 2 to 3. While I could port a newer TWRP version, I just wanted to have lighter backups with compression... so maybe it is what it is .
ORIGINAL POST STARTS HERE. This is general information that I collected for geeks or desperate users that bricked their tablets. When I started this post it wasn't intended to produce a cooked ROM that would include most of these hacks. You don't need this if your tablet boots to Android or TWRP. You also don't need this if you are ready to flash the cooked ROM.
(This is a lenghty post. I suggest you to navigate by section header and find the one you might need.)
There are several Lenovo Yoga 3 tablet models out there and, while some of them enjoy of prime community support as the Yoga Tab 3 Plus, this Intel Atom powered tablet is pretty much forgotten and, at the same time, users were recently buying this tablet, which is a great piece of hardware but has the most terrible support by Lenovo.
Spoiler: WHAT LENOVO TABLET(S) IS THIS GUIDE FOR?
Basically, this is that Lenovo tablet with an attached projector and an Intel Atom Cherry Trail x5 Z8500. There are several models, though, to my knowledge they vary in their code names in the last letter, the two most basic ones (2GB RAM, 32 GB ROM) are the YT3-X90F and the YT3-X90L, the former connects to the internet by WiFi and the latter being the one with LTE/Phone capabilities. There are other models, though, and they vary on the amount of RAM and internal storage. Apparently, the YT3-X90[YX] models (the 4/64 GB refresh) have some use for these firmwares we describe, but in a very specific way, if you own a Y or X model, keep reading, especially the next section.
Spoiler: EXPLAINING HOW TO FIND THE RIGHT STOCK FIRMWARE
Lenovo support has been terrible (there are no words to describe it, really), so they launched this tablet with Android 5.1 Lollipop and they maintained it for a while but were very slow to deliver Android 6.0 Marshmallow. In fact, there was already Android Nougat, when they sent the Marshmallow update. Nevertheless, the update was bad. Performance issues were always a thing and some functionality went lost in the update (less intuitive multiple windows, a crippled recents activity/screen, and a laggy overall experience). Bottom line, they launched a curated Android Lollipop 5.1 firmware with security updates until March 2016 (striked because the last lollipop update f*cks up my sensors, except the light one) and a half-assed Android Marshmallow 6.0.1 firmware.
Of course, at the time, I'm guessing most of us upgraded to Android Marshmallow 6.0.1, hoping the upgrade would fix the issues in Lollipop or with security patches in mind. The reality was that Android 6.0.1 wasn't nearly as maintained as 5.1 and security ambitions went nowhere. So, we got the upgrade all right, but at this point, both Android versions can be considered inherently insecure and we really shouldn't be using it for sensitive work.
OK, there are several Android 5.1 and 6.0 firmwares, you can recognize them because they are all over the internet typically in a compressed format. For example, this firmware hosted in androidhost.ru named:
YT3-X90F_ENG_S100265_1601281130_WW24_ROW
Is a firmware for the Lenovo Yoga Tab 3 (YT3) Pro (X90) Wifi Version (F). The ENG part is an indication of the build type, ENG is an engineer build while USR is probably a firmware for the end user (this is common now that I know a bit more about AOSP source code), it is a Lollipop firmware (S1, Marshmallow would be a S2) with update version (00265), date of compilation and a good estimate of its security patch (1601281130), the WW24 is the weekly release version of the Android kernel for Intel devices (the latest, in May 2020, being WW31 which is exactly the same as WW28 and not updated since 2016), the final part means it is the global ROM version (ROW, opossed to the Chinese version CN). This is the latest Lollipop firmware I am aware of, so, as an example, an imaginary Android Marshmallow Chinese firmware for the LTE version of the Yoga Tab 3 would look like:
YT3-X90L_USR_S200013_1610141535_WW24_CN
As an additional note the Chinese ROMS, I presume, are not trusty but they are also Google-free for what it's worth. On the other hand, they ship with a "Lenovo Services Framework" that should be as intrusive as the Google Play Services. Oh, also, baidu and yandex, and, really, any less traditional search engine can help you find a fitting firmware.
Spoiler: EXPLAINING HOW TO FLASH A STOCK FIRMWARE (DOWNGRADE TO LOLLIPOP AND UNBRICK)
I did test several firmwares, chinese and global, lollipop and marshmallow and the safest and easiest way to flash them is by using the Intel Platform Flash Tool Lite . I can't say I trust in this site, but it hosts a handy tutorial on how to use it, though, is pretty intuitive. The software exists for Mac, Windows and Linux, be sure you are in, at least, the 5.8.x version, this is important to avoid the need to install some special drivers separately as a pre-requisite. Grossly, Intel Flash Tool Lite works like this:
0) Turn off your tablet if it is on.
1) Launch Intel Platform Flash Tool Lite.
2) If your downloaded firmware is in zip format load it with the blue "Browse..." button.
2 bis) OR, if your firmware is in other compressed formats, uncompress it first. After this use the "Browse..." button to load the "flash.json" file.
3) In Configuration option select "blank" if it isn't set already. Optionally, un-tick the "On-demand flash" option to have more control of this process. Also, maybe you can use the "erase" configuration here.
4) Start your tablet in DNX mode. To do this, press Vol- and hold it, then Vol+ and keep holding both, then press the Power button until it turns on and you see the Lenovo logo and some text indicating you are in said mode.
5) Connect your Yoga Tablet with a USB cable and your Intel Platform Flash Tool Lite windows should show it as detected. Now you can proceed using the blue "Start to flash" button.
6) Keep an eye on your tablet, since some firmwares will prompt to set some more options. Unless you know what you are doing, answer "Yes" to any question.
7) Reboot and wait.
If a couple hours have passed and the tablet hasn't booted, maybe you should try another firmware.
IMPORTANT NOTE AND INSTRUCTIONS FOR YT3-X90Y AND POTENTIALLY YT3-X90X USERS: I don't know the rules in xda about linking to other forums but in certain forum there is an answered question about the Y model (the 4/64 GB WiFi only refresh) on how to flash a firmware. Instructions are the same as I gave in this section, except, apparently, you need to do it twice, first with the ENG version and the second time with the USR version except you are not using the flash.json file, this time you'll browse for the flash_factory_1st_stage.json one and the factory1st configuration in fastboot. It is not clear what are the consequences of not doing it this way or what if you combine different firmware versions (it would be interesting to have a tester here). Notice please, these firmwares are marked for the YT3-X90F model. So, clarifying:
1) Follow the instructions above to flash the YT3-X90F_ENG firmware.
2) Power off your tablet.
3) Boot into bootloader (not in DNX, you need to boot into bootloader by powering on while holding Vol+).
4) From the YT3-X90F_USR firmware folder use Intel Platform Flashing Tool Lite to load the flash_factory_1st_stage.json and select the factory1st configuration.
5) After flashing the USR firmware, reboot and you should be good to go.
METANOTE: This wasn't tested by me, please do this only when you are hopeless with your hardware. This is just an educated guess but I bet it works the same with the YT3-X90L (the LTE version 2/32 GB Yoga Tab 3 Pro) and the YT3-X90X (the 4/64 GB refresh).
ALTERNATIVE WAY TO FLASH A STOCK FIRMWARE (ADVANCED USERS, requires fastboot)
Well, there is no need, really, to use that Intel tool. In my search for a lollipop firmware (I wanted to downgrade from Marshmallow) I found the firmware YT3-X90F_USR_S100195_1512052308_WW24_ROW in www.firmware247.com or www.androidfilehost.com (IMPORTANT: please read the note on downgrading to Android 5.1 Lollipop in the note at the end of this section). This firmware was special since, if you are in Windows and have fastboot executable ready and in place, you can run a script (run_me.bat) in the Windows terminal (CMD) or Powershell to flash the firmware semi-automatically. I think this firmware was modified, though, since I found differences in the boot.img when compared with stock firmwares. This script is credited to XDA members @ionioni and @joesnose and you can replicate its steps if you:
0) Turn off your tablet if it is on.
1) Start your tablet in DNX mode. To do this, press Vol- and hold it, then Vol+ and keep holding both, then press the Power button until it turns on and you see the Lenovo logo and some text indicating you are in said mode.
2) Connect your tablet to your fastboot enabled PC using a USB cable.
3) Input "fastboot flash osloader loader.efi"
4) Wait 5 seconds to be sure the loader flash finishes.
5) Reboot into Bootloader. If you don't know how, one way is to hold Vol+ and Power on your tablet.
6) Input "fastboot oem unlock" and confirm using Vol keys to select the right option and the Power button to enter it.
7) Input "fastboot flash system system.img"
8) Input "fastboot flash boot boot.img"
9) Input "fastboot flash recovery recovery.img"
10) Input "fastboot flash bootloader bootloader.img"
Follow your instincts, since I don't know if these IMG files are always named the same. You can get these IMG files from downloaded sources or dump them yourself using dd command.
NOTE ON DOWNGRADING TO ANDROID LOLLIPOP 5.1: So, one of my main concerns has been to go back to Android Lollipop. There is a last version of Lollipop from where you can upgrade to Marshmallow with a security patch from March 2016. Nevertheless, you MAY end up loosing other sensors except the light one. If this happens, you need to use a complete firmware flash using Intel Platform Flash Tool Lite. In my experience, some boot images are not compatible with other weird partitions like country or misc.
Spoiler: TWEAKS ALREADY IN THE COOKED ROM
The first boot takes some time even amounting for the time of the setup itself. By the time you are in the launcher tapping on app's icons you think there's nothing wrong with our device, but after some apps are in memory, you notice some lag. You think "OK, it is updating, but soon it'll settle", but it does not. So, you reboot again after updates and fire up a terminal emulator and connect to your tablet using a USB cable with USB debugging turned on and issue a free command to find something like this:
Code:
total used free shared buffers
Mem: 1950372 1820964 129408 0 7756
Swap: 524284 10740 513544
Total: 2474656 1831704 642952
Which means you have a total of ~2.5 GB (this is the 2 GB model). So, did I download that extra half GB of RAM or Lenovo was feeling generous? Well, no. The issue here is Lenovo built the kernel with zRAM support which is a technology included in Linux that reserves space in RAM to quickly compress and uncompress pages of data exceeding our physical amount of RAM installed (2 GB). This is not Virtual Memory as in a swap file/partition or Windows' Page File inside storage media. zRAM literally reserves a fixed amount of physical RAM space (blocks) to expand it by compressing data. The consequence is you loose "fast RAM" (THE RAM) and gain some "slow RAM" (the zRAM). You also sacrifice some CPU power to compress/decompress data and, with this, some battery juice is also lost.
That does not sound like a terrible trade-off for a RAM-limited device, one would think. Another interesting thing would be WHEN to send this piling data in "fast RAM" to the compressed space and WHEN to get it back. Two parameters control the WHENS, one is called "swappiness" (when to send it to the compressed space, the "slow RAM") and the other may be the "vfs_cache_pressure" (when to uncompress it and send it back to the "fast RAM"). And this is where the main problem is, really, because the kernel, Linux, is pressing the RAM constantly to send some less prioritary data to "slow RAM" and, at the same time, is trying constantly to send compressed data back to the "fast RAM". Summarizing, this kernel behavior is practically minimizing the fast RAM amount and usage while maximizing the "slow RAM" usage. This is nuts, by default a swappiness and a vfs_cache_pressure of 100 are not even default for servers, these parameters extremely prioritize that processes can get done no matter how slow they get, and they are even more nuts when Android is designed to work without swap space.
What that free command is telling us is the tablet is using the "slow RAM" even when we only just turned it on. Fortunately there are two ways to fix this problem: one is to completely disable zRAM, the other one is to use ZRAM a whole lot less by tweaking the swappiness and vfs_cache_pressure parameters. This can be easily done with the following sentences in a rooted tablet:
Code:
# echo 5 > /proc/sys/vm/swappiness
# echo 50 > echo 5 > /proc/sys/vm/vfs_cache_pressure
Or, to regain the whole fast RAM:
Code:
# swapoff /dev/block/zram*
One caveat of the first method, reducing swappiness, is there is still a lot of RAM (one quarter of the whole RAM in a 2 GB device) reserved as "slow RAM".
SOME ROMS DID NOT ENABLE KERNEL SAMEPAGE MERGING, UNFORTUNATELY
Additional to the sorry implementation of zRAM, some firmwares support a fabulous Linux tool to reduce RAM usage called Kernel Samepage Merging (KSM) but they don't use it by default. This software runs at kernel level, so, it really is CPU-wise inexpensive and, opposite to zRAM it can actually recover some RAM usage by reducing the amount of data flagged as redundant in physical RAM by merging it. KSM is good for you and you should have it always enabled by issuing the following command as root:
Code:
# echo 1 > /sys/kernel/mm/ksm/run
STOP WRITING AND FIX MY RAM! PLEASE!
Well... are there any people interested on this? With the above information you can write a script to execute at boot. Something like this should work in any version of the firmware:
Code:
#!/system/bin/sh
# Mount system as rw
busybox mount -o remount,rw -t auto /system
# Tweaking swappiness in zram
echo "5" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
# Activating Kernel Samepage Merging
echo 1 > /sys/kernel/mm/ksm/run
# Remount system as ro. noatime option for faster and volatile system
# busybox mount -o ro,remount,noatime /system
busybox mount -o ro,remount /system
exit 1
Or, you can unpack the boot.img and modify the init.cht_ffd.rc (lollipop) or the init.r2_cht_ffd.rc (marshmallow) files to write these values as default... or, if there is interest for something easier, I can produce this boot.img files for you to flash using fastboot.
ROOTING THE LENOVO YOGA TAB 3 PRO (YT3-X90[FL])
Here I am not gonna write a lot. Instructions were given in this thread. I'd only recommend to put vm.targetutilization at 0.8 top 0.85 in system/build.prop
After rooting, debloat your firmware. I use the app "/system/app mover" from Fdroid to convert to user apps and uninstall them. Also, if rooting is not your cup of tea, you can install AppOps software to freeze all those apps that you don't use regularly. Also, I couldn't patch my services.jar for Signature Spoofing with Nanodroid patcher in the most recent lollipop firmware, but it did work in Marshmallow... anyway I'll do it manually.
ARE YT3-X90F AND YT3-X90L FIRMWARES INTERCHANGEABLE?
I own a WiFi only device (YT3-X90F) so I can't assert they are interchangeable. If I owned the LTE version and use a WiFi firmware I would expect to loose LTE functionality. Now, on the other direction is more interesting because I've been using a LTE firmware version for weeks (as a matter of fact, the one joesnose linked in his How-To debrick this tablet, flashed with the instructions I posted for advanced users it even updated to recent 2020 firmwares). The only tweak you need for this to work well is to add "ro.ril.disable=1" in the build.prop file. So, yes, firmware for the LTE version work in the WiFi version but kind of not vice versa.
Spoiler: YT3-X90(FL) UN-DEVELOPMENT
No news here. All capable people interested on developing for this device are all done with Lenovo and their attitude against Open Source. Don't expect your situation to change.
I'm happy to know there are still a couple of developers interested on this device. I won't cite them by linking their names but they are OOEvil and alquez, the first guy is trying to make a Generic System Image (GSI) ROM compatible with our tablet, I don't know the details so I wouldn't go further. Alquez has been active in this thread and, while he is trying to figure out how to build a kernel, he believes the best way to start having some alternative to official Lenovo firmware is by using a firmware kernel (a prebuilt kernel) to, first, build a more up-to-date TWRP recovery.img and from there try to build CyanogenMod 13, which was based on Android Marshmallow 6.0.1. My guess is newer Android versions wouldn't work if we can't build the kernel from source.
PHOTO ALBUM OF YT3/X90Y BIOS
This photo album documenting every screen option in the BIOS of the Yoga Tab 3 Pro may or may not help someone, but it contains a lot of useful hardware information and guidance for those attempting to boot something else than the original Android 5 or 6 firmware. Using this options, that are accessible through F2 at boot with an attached USB keyboard, you could try Linux distributions on the tablet or even attempt to run Windows, @alquez informs it works fine with a recent distro but the mainline kernel is lacking touchscreen and battery support. This is absolutely his work and he asked me to share it. I hope it serves someone. It is hosted in a rather obscure website but it was the only reasonable placeholder I could find for the 321 photos.
Hope this helps someone, I just didn't want to keep it to myself. Have a nice day!
Just remember, if your tablet is 3G capable I strongly suggest that you modify the line "ro.lenovo.tablet=wifi" to "ro.lenovo.tablet=3gdata" and remove the line "ro.radio.noril=true" to your build.prop file in /system. To do this you can use the section Build.prop Editor of the Kernel Adiutor app or you can do it manually if you have already a method to modify system files. If you do not use mobile data at all, you may leave the build.prop as it is, you'll save a lot of battery by using only wifi.
Spoiler: Some old info here, but maybe useful
ONLY FOR TESTING: Cooked ROM, newer TWRP and tweaked kernel
ONLY TRY THESE FOR TESTING PURPOSES, THE TWEAKS ARE ALL SAFE TO USE BUT ONLY FLASH FOR TESTING PURPOSES, PLEASE. FIRST, TRY TO USE FASTBOOT TO BOOT THE boot.img FILE WITHOUT FLASHING: IF IT BOOTS GO AHEAD AND TRY THE OTHER FILES (fastboot boot boot.img). THE TWRP IS NOT AS STABLE AS THE OTHER ONE HERE AT XDA BUT ALLOWS TO USE ZIP COMPRESSION IN BACKUPS. I AM NOT GONNA BE AROUND. IF YOU TRY SOMETHING MAKE A BACKUP FIRST. THIS DEVICE IS MESSY AS F*CK.
Spoiler: Some old info here, but maybe useful
I wrote a very detailed guide about these files I uploaded to my Nextcloud that include the newer TWRP-3.0.2, a TWRP flashable Cooked ROM and a separate kernel (boot.img) in case your system is already setup, but the post went to some XDA void and didn't upload. These are based on the YT3-X90L latest firmware, but they work on the X90F model too. The TWRP should work with Lollipop and Marshmallow firmwares.
I can't write everything again, so, the kernel contains better management of RAM and emmc (internal) memory, a 256 MB zRAM space instead of 512 and a more conservative approach to LowMemoryKiller.
The cooked ROM includes the described kernel and debloated apps, it's already rooted with Magisk (you can unroot with Magisk Uninstaller), an updated Busybox build, su.d support (I plan to use it with AFWall+), zipaligned apps, etc. It is for the X90L but possibly works for the other Yoga Tab 3 Pro models. It works for the X90F but it will reboot once after the first boot because the RIL configuration times out. To install the cooked ROM you need to:
0) Know that by doing this you will loose pretty much everything in your tablet. You start from scratch if everything goes smooth, if not you could possibly end up with a system without an OS. The usual stuff when you are customizing your system.
1) Boot into TWRP and make a Nandroid backup. IT IS IMPORTANT because @joesnose had problems with a "random reboot" and lost Bluetooth/WiFi after it. I am trying to look into this. The only difference is his tablet has 4 GB RAM and probably a different firmware.
2) Wipe cache, Dalvik/ART, System and Data in TWRP - Wipe, Advanced Wipe menu. If your tablet is encrypted, or in factory firmware you also need to explicitly use the button "Format Data partition" and confirm writing "yes" in the format procedure prompt. You will loose any configuration made to your tablet.
3) Install the superr_stockMM.zip wich is flashable by selecting the file from your Internal tablet memory, using the Install button in the main TWRP interface.
FOUR IMPORTANT NOTES TO COMMON ISSUES:
If you come from a stock firmware your data partition is encrypted. You need to pass a blank password in TWRP to continue to use the custom recovery. You also need to format data partition before flashing the cooked ROM.
If your tablet is WiFi-only I strongly suggest that you modify the line "ro.lenovo.tablet=3gdata" to "ro.lenovo.tablet=wifi" and add the line "ro.radio.noril=true" to your build.prop file in /system. To do this you can use the section Build.prop Editor of the Kernel Adiutor app or you can do it manually if you have already a method to modify system files. In Lollipop firmware you use "ro.ril.disable=1" instead of "ro.radio.noril=true" to get the same effect: sort of a conversion to WIFI-only tablet from LTE models. I'd argue this is useful to do if you are gonna be without LTE connection/service for long periods of time and I can think a couple of other uses.
Do not use stock Lenovo launcher unless you uninstall Magisk... they are incompatible for reasons I don't care to know and the Launcher will constantly FC (it is a pain in the arse).
If you are still expecting better performance I am sure there are some tweaks left in RAM management but it wont go too much further in 2 GB devices. Instead, you may consider to lower your display resolution and pixel density to something reasonable as 1400x2240 or even 1200x1920 maintaining the same aspect ratio. To do this you do not need to have root but you need to interact with the tablet using ADB. First change the size of your display:
Code:
adb shell wm size 1400x2240
Then adjust your density:
Code:
adb shell wm density 260
If still is not enough you can go even further with 1200x1920 and 224, use the same method to go back to stock with 1600x2560 and 300 to 302. This won't need a reboot but will probably cause an inconsistent UI that will lead to FCs and random reboot. You can just reboot after applying these tweaks. Unless you are really sight-gifted you won't notice a lot has changed but you will be dealing with 2.x Mpixels instead of 4.x Mpixels and that will help with your overall performance as well as your battery life sacrificing a pixel count that most of the people wouldn't even notice. If you did this correctly, in the next boot sequences you'll notice an offset on the Lenovo orange logo.
It is important to say that your display supports 1600x2560 pixels physically, but I'm assuming the GPU has no dedicated RAM and uses the device's, so, by reducing the quantity of pixels the GPU needs to deal with, the pressure on the device's RAM is also reduced.
EXTRA TIP: If boot annoys you just delete /system/media/boot.wav, bootanimation.zip and shutdownanimation.zip and you'll get a silent boot and the generic android boot animation.
Hope you enjoy your tablet!
TWRP-3.0.2.0- BETA: Again, this is not a flashable zip. Uncompress first and test the recovery system using "fastboot boot twrp_yt3-x90f_beta.img". If everything works for you, you may want to flash it permanently rebooting to bootloader and flashing with "fastboot flash recovery twrp_yt3-x90f_beta.img". Remember I did not test this in Marshmallow yet.
FEATURES:
- Fixed RAM issues (swapiness 10, vfs_cache_size 50 and disabled dynamic low memory killer tweaks and minfree values).
- Reduced zRAM size to only 256 MB.
- Tweaked interactive CPU scheduler to use other than min and max frequencies (but still responsive). The tweaks are based on the Advanced Interactive Governor Tweaks Guide. This may save battery life.
- Max frequency capped to 2.08 GHz (this is not great if you are a gamer). This tablet throttles when using max frequency for a long time, so, to save battery and keep it cooler I tweaked the CPU to run slower.
- Tweaked I/O schedulers to use deadline governor and read ahead cache to 640 kb (used benchmarks to get to this value).
- Force encryption disabled (to avoid applying ionioni script after flashing). Still needs to format data partition. You can encrypt your data partition later through Configuration -> Security user interface.
- Implemented native init.d support (not su.d anymore and no need to root the main OS).
- Busybox updated.
- Rooted with Magisk by default ( you can use Magisk uninstaller to unroot).
- Debloated apps. I also deleted Lenovo User Experience Program which was asking for root privileges even when you don't opt in to the Lenovo UE Program at setup wizard. I find this behavior shady.
-Multi-window mode is available in Developer Options and needs to be activated by you. In this mode if an app is compatible with multi-window mode you can double-tap on its title bar to enable Window mode. This function was more transparent in Lollipop firmware but it is still there in Marshmallow firmware if you change the build type to userdebug instead of user in build.prop (that's how I enabled it in the Cooked ROM).
- There are also other tweaks in VM and KSM.
And that's it, I'm not trying to change a lot, only the fundamental issues. But I suggest some other tweaks up there.
Such a shame. I love my Yoga Tab 3 Pro. Great hardware. But the software. Thanx anyway for your work.
Very nice write up. Thanks.
joesnose said:
Very nice write up. Thanks.
Click to expand...
Click to collapse
You're welcome. Thanks to you, while learning about this hardware your username pops everywhere.
jahfaby said:
Such a shame. I love my Yoga Tab 3 Pro. Great hardware. But the software. Thanx anyway for your work.
Click to expand...
Click to collapse
It really, really sucks. Let's hope something interesting happens after these strange and recent updates.
CENTSOARER said:
V1: The zip name boot_mod_mm.zip is based on the latest boot IMG provided by Lenovo. You need to first uncompress and flash it using fastboot (this is not a TWRP flshable zip). If you are uncomfortable flashing, you can test it only by issuing "fastboot boot boot_mm_march20_mod.img" once uncompressed, or, if you feel fine using it you can flash it permanently by using the command "fastboot flash boot boot_mm_march20_mod.img". This boot IMG will only work with Marshmallow firmwares in both YT3-X90(FL).
FEATURES:
- Fixed RAM issues (swapiness, vfs_cache_size and low memory killer tweaks).
- Reduced zRAM size to only 128 MB.
- Tweaked interactive CPU scheduler to use other than min and max frequencies (but still responsive). This saves battery life.
- Max frequency capped to 2.08 GHz (this is not great if you are a gamer). This tablet throttles when using max frequency for a long time, so, to save battery and keep it cooler I tweaked the CPU to run slower.
- Tweaked I/O schedulers to use deadline governor.
- Force encryption disabled (it's unnecesary to apply ionioni script now). Still needs to format data partition. You can encrypt your data partition later through Configuration->Security user interface.
Click to expand...
Click to collapse
Thanks for this. Going to take it for a spin.
joesnose said:
Thanks for this. Going to take it for a spin.
Click to expand...
Click to collapse
Please, please provide feedback and don't forget to wipe caches.
alquez said:
"No news here. All capable people interested on developing for this device are all done with Lenovo and their attitude against Open Source. Don't expect your situation to change."
https://github.com/intel/ProductionKernelQuilts this repository containts patches necessary to create base 3.14.55 and 3.14.64 uefi/cht-m1stable kernel tree. The same tree that was butchered by Lenovo in their OPEN_SOURCE "release".
Check this file https://github.com/intel/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/ChangeReport.md and the WW24 part in the "YT3-X90F_ENG_S100265_1601281130_WW24_ROW" will become more clear
Quilt manual: https://elinux.org/images/7/74/Maintaining_Multiple_Android_Linux_Kernels_at_Intel.pdf
If someone would be looking for a good piece to start: the best would be to recreate 3.14.55 or 3.14.64 from the quilts, use the x86_64 defconfig and build a kernel which can be booted. In order to test this, the best solution is to repack TWRP with the new kernel and do "fastboot boot" without flashing, until it boots and the touch screen is working. There's no other way i'm afraid.
I have prepared complete photo documentation of UEFI Bios, i can share, currently moving to different google photos account. Its over 300 photos.
Please, set up a Discord channel if you want to proceed. The first month will be quite boring and daunting because it's going to be build -> repack -> boot -> rant
Click to expand...
Click to collapse
In my defense, when I wrote that sentence was after taking a peek on your github profile, I figured you were just done with the Yoga Tab 3 Pro. I am really, really glad you're still trying and I recognize you are very capable of changing things for this device. I appreciate the sources you link but I am afraid I am useless as a developer, partly because of a lack of time and partly because of a lack of adequate training. I will try to help as much as I can, though. Thanks for the post.
alquez said:
No worries, however if anyone is interested how to actually crunch this one: we have a working prebuild kernel which can be pulled of boot image, and we have a working TWRP, however it looks like TWRP wasn't actually built from source, but cooked using android kitchen so we're still missing a device tree, which in my opinion is a good place to start, because you can use prebuilt kernel to build recovery and lineageos/aosp (it's deprecated but we're talking about android 6 aka cm-13.0/lineage 13.0). If I can create a most basic device tree which is capable of building recovery from scratch useing binary kernel and modules, i'd say were' good, because the next part would be adding more binary blobs from the official software, and we can skip the kernel source part for now until we have lineageos build 13 working). I started experimenting on xiaomi latte tree because it wasnt split like Z00A. It's not gonna be a proper port but it should work from now (i think)
@joesnose did you cook or compile TWRP? It's important
Ok, I'm at the stage i have two folders. The one is unpacked working TWRP, the other one is unpacked compilation i'm building, which means im able to build TWRP from source with binary kernel, but it's not working yet. The goal is make the left one look like the right one by adjusting various parts in BoardConfig.mk and copying files.. If someone has right partition sizes for BoardConfig.mk that would be really helpful, the values i calculated suck and don'y boot yet
Click to expand...
Click to collapse
Uhmmm, I've been there and took some notes with some "GNU shell Fu". What sizes are you using right now?
And regarding the WW part of the name I've noticed the recent updates are marked as WW17 opposed to WW28 which was the latest stable with any changes. Any idea why Lenovo used WW17 to update the Yoga Tab 3 Pro recently?
alquez said:
update, ive managed to boot vanilla android-x86 x64 6.0.1 build without touching the kernel yet and different TWRP (3.1.1.0) with kernel swap
Click to expand...
Click to collapse
Geez, I was excited because I read Ubuntu booted on this hardware but then I realized it was the Yoga 3 tablet but not the Yoga Tab 3, goddamnit. Keep up the good work!
alquez said:
Um Ubuntu 20.04 boots with working accelerometer so the screen rotation works + wifi, and probably audio i forgot to play youtube video, the stuff missing is battery, touchscreen and projector.
To test it you need to connect a usb hub using usb otg, put ubuntu and a keyboard in the hub, boot, and press f2 really fast if you haven't enabled slow boot yet. You can even boot
Xubuntu to ram and remove flash drive. It's a pc architecture after all and most of the processor related stuff is in the linux mainline since 4.11
Recently i was checking why the Windows 10 installer crashes on ACPI Error.
Click to expand...
Click to collapse
Oh, I will have fun doing this kind of stuff at the end of the year. It must run swiftly with i3, provided you won't get touchscreen support.
alquez said:
Geting TS and a battery running is a mandatory, the next is the projector. The rest is pretty much working. I'm building generic celadon x86 atm and the beast is huge it's like 18% now after two hours on -j8 on i7. Maybe we can give this old monster a new life
edit:
And i need to add 480gb drive ;/
Code:
/dev/sdc1 229G 210G 6,7G 97% /home/android
Click to expand...
Click to collapse
I am afraid those are the peripherals that will keep you in 3.14.55/64 Linux, at least for a while , unless you know something more (wouldn't be surprised).
Are those GB for source code or for cache? Both? Jesus... the thing is huge but reading the unpacked boot.img makes much more sense now.
It was ionioni who made the twrp for the device. I dont have the foggiest how he did it.
---------- Post added at 01:23 AM ---------- Previous post was at 01:18 AM ----------
Wow! I missed lot, looks like you have made some serious progress here. very well done.
alquez said:
I contacted my friend and he told me to compare these two folders:
https://github.com/alquez/lenovo_yt...l/cht/arch/x86/platform/intel-mid/device_libs
https://github.com/torvalds/linux/tree/master/arch/x86/platform/intel-mid/device_libs
the new files in "lenovo tree" are the modules we're after, mostly and it's a place to start
I need to ask inioni about twrp.
Click to expand...
Click to collapse
I will guess it was ported from the Yoga Tab 2. I will edit this post soon.
alquez said:
Nice! There's big chance the modules are reused somewhere. We can compare these. I think the two folders in
https://github.com/alquez/lenovo_yt3_x90_osc/tree/master/kernel/cht/drivers/input/touchscreen
which are missing from vanilla tree are two separate drivers and one is for "any pen" driver. Can you ask someone porting modules recently
to help us refresh my memory
[edit]
I've got in touch with TeamBliss of BlissRoms , they are working on cherrytrail tree
Click to expand...
Click to collapse
Nah, I couldn't confirm it was ported. A lot of posts were removed when XDA enforced the GPL measures to its developers.
About BlissRoms, it just makes sense they are working on Cherry trail. I hope you and those guys can achieve something soon. I mean, it's a 2 GB RAM device but the display, projector and dolby audio system are worth for a better fate than Lenovo's plans.
alquez said:
4GB of ram 4 cpu cores, Hardware virtualization support, fast gpu and fast emmc memory. It's a beast, way ahead of it's time.
Click to expand...
Click to collapse
Well, I have the 2 GB RAM model, so my expectations are conservative. Anyway, don't believe I'm a hardcore user, so it's plenty enough for me, considering I won't even flash Google apps. I am now settled with Lollipop, since I need apps not getting killed by damn Doze. It is a shame how OEMs can limit a device like this one. Crond, init.d, bad zRAM, shell, even busybox... frequently the OS is crippled. I read somewhere Doze can be disabled in build.prop or something but one thing I just hate is the recents screen in Marshmallow firmware (my God, is terrible!) and can't be easily changed for something like OmniSwitch. I mean, for a mobile device you have an unusual architecture, why limit it further? Damn, I wish BlissRoms come up with a working build.
Hey, @alquez, have you tried Linux 5.7 on the tablet? I saw this article and seems like the touchscreen may work with the next mainline kernel release. I mean, right now is on RC7, should be stable enough to compile and try (I'd try it, but can't get to my workstations thanks to the virus).
EDIT: Ah... I was looking into my device and it comes with a HiDeep touchscreen (cat /dev/input/event3), the linked news is for the Goodix driver / devices. At least, I guess, it will attract others to this platform... anyway, I was wondering and also confused, shouldn't touch screen work with the hideep driver using this config already?
Thanks for the new feel.
This is great, glad to see a developer picking up this tablet. It's a fine machine with an unfortunately small user base and has never really seen any development apart from ionioni s efforts and he didn't even own one, lol.
Edit: *Thank for the new twrp * auto correct!
I love this device! For me it's the perfect device for vacation just because of the projector!
I am so happy that you guys are working on it again. the ram and display tweak works like a charme for me. Had to reset my background screen though
thx for all your help. As soon as you guys have light rom, i'll install it on my 2GB device.
hello how to flash your twrp please ?
can someone upload adb drivers for the yt3-x90f please ? because i try to flash in dnx fastboot mode but commands don't work, even "fastboot devices" don't show me the yoga tab 3 pro

[Discontinued] Linux on the Acer Iconia Tab A500, 2022 edition

UPDATE: I discontinued work for this tablet model, due to the lack of NEON support for the Nvidia Tegra 2 CPU used in this model. Any existing work I uploaded will remain online, but I won't be uploading anything new. I'm also considering selling my tablet to anyone interested.
I have become successful with getting postmarketOS to run on this tablet for the past 2 months, running mainline Linux (5.8.0 as of this writing). This allows us to use this tablet model for a little longer, without getting stuck on older Linux kernel versions.
postmarketOS is an experimental, touch-optimized and pre-configured Alpine Linux. It can be installed on smartphones and other devices.
About postmarketOS, from their homepage:
We are sick of not receiving updates shortly after buying new phones. Sick of the walled gardens deeply integrated into Android and iOS. That's why we are developing a sustainable, privacy and security focused free software mobile OS that is modeled after traditional Linux distributions. With privilege separation in mind. Let's keep our devices useful and safe until they physically break!
Click to expand...
Click to collapse
Wiki page for this tablet: https://wiki.postmarketos.org/wiki/Acer_Iconia_Tab_A500_(acer-picasso)
Most features should work, except for the camera and 3D acceleration. Wi-Fi and Bluetooth work only if the non-free firmware is chosen to be installed.
How to install:
Follow the installation guide at https://wiki.postmarketos.org/wiki/Installation_guide, where theses specifics have to be specified when requested (this device is now in upstream pmaports):
Vendor: acer
Device code-name: picasso
Install non-free Wi-Fi + Bluetooth firmware: y
Only the mainline kernel is available for installation now, as downstream kernels no longer successfully compile. The user interface may be freely selected, as long as it is not one that requires 3D acceleration. To use KDE Plasma 5, add these lines to /etc/security/pam_env.conf:
Code:
QT_IM_MODULE=qtvirtualkeyboard
QT_QUICK_BACKEND=software
LIBGL_ALWAYS_SOFTWARE=1
Next, run the following commands in succession, after each one finishes, assuming the working directory contains the pmbootstrap.py script:
Code:
> ./pmbootstrap.py build device-acer-picasso
> ./pmbootstrap.py build firmware-acer-picasso
> ./pmbootstrap.py build linux-postmarketos-grate
From here on out, the generated chroot can be either installed to the eMMC, or a microSD card that must be inserted at or before boot time (the latter method allows for dual-booting Android already installed to the eMMC, although it can be directly accessed from the Linux system). The boot partition always has to be flashed to the eMMC in fastboot mode, as it is not possible to boot directly off of a microSD card.
If installing to the eMMC, run
Code:
> ./pmbootstrap.py install
> ./pmbootstrap.py flasher flash_kernel --partition secboot
> ./pmbootstrap.py flasher flash_rootfs
(optional) > ./pmbootstrap.py flasher boot
If installing to a microSD card, run
Code:
> ./pmbootstrap.py install --sdcard [path to the device for installation]
> ./pmbootstrap.py flasher flash_kernel --partition secboot
Depending on what user interface was chosen earlier in the installation process, there may not be enough packages installed to get a fully-loaded GUI. Besides the built-in Wi-Fi, it is also possible to use a USB ethernet adapter, or connect to another computer with a micro-USB cable and get RNDIS access that enables using SSH to the tablet.
Using another distro in place of postmarketOS
Advanced: Using another distro in place of postmarketOS
It is possible, if using the microSD card method, to use a different distro instead of postmarketOS, for those who want more software OOTB. I use the Ubuntu MATE rootfs from https://ubuntu-mate.org/ports/raspberry-pi/ as my daily driver, but other distros may take more effort to get working. Glibc limitations no longer apply, as the kernel version is no longer stuck at 3.1.0 (unlike with my earlier attempts). Carefully follow the instructions listed below, or the resulting system will become unbootable:
Use losetup or GNOME Disks (Utility) to mount the image in read-write mode.
Run GParted with the loop image and the target microSD card as the arguments.
Copy only the larger rootfs partition to the microSD card. Resize as necessary to get it to fit on the target microSD card.
Make sure on the target microSD card the boot partition is named 'pmOS_boot' and the rootfs 'pmOS_root'. The initramfs is hard-coded to search for partitions with these names by default for microSD cards. The loop image is not needed after this point, and can be safely detached.
On the copied rootfs, edit /etc/fstab to reflect the partition layout. To get access to Wi-Fi and Bluetooth, copy the kernel modules and firmware from the pmOS rootfs on the host system to the microSD rootfs.
Let me know if something wasn't understood from my instructions, or more clarification is needed. The instructions here can be somewhat overwhelming for those who have less Linux experience, but at least we're not forced to stay on old distro versions anymore.
Premade Linux images
I finally have managed to create a premade image to make the installation process easier for other people, especially for those who don't want to go through the hassle of compiling software. Every image I make can be found at https://drive.google.com/drive/folders/1pMqaS5GaM6N9TAKlNGQZWCG8UTiRn4pK?usp=sharing.
For all images:
Kernel version: 5.15.0-rc4
Includes all compiled kernel modules from postmarketOS builds, plus nonfree firmware enabled.
The postmarketOS splash screen will appear, although the underlying OS differs based the image used.
Images available:
Ubuntu MATE 20.04.1 (ubuntu-mate-20.04.1-desktop-armhf+acer-picasso.img.xz) (size: 1.3 GiB):
Based on 'ubuntu-mate-20.04.1-desktop-armhf+raspi.img.xz', available from https://ubuntu-mate.org/ports/raspberry-pi/
Underlying OS is Ubuntu 20.04.1, which is supported for 5 years until April 2025. However, Ubuntu MATE officially has support only until April 2023.
Requires at least an 8 GB or greater size microSD card (the image is 5.6 GiB decompressed).
The setup screen will open upon the first successful boot, where a username and password have to be set.
Most extra packages for the Raspberry Pi family of computers have been removed, including the kernels.
The battery icon in MATE cannot be enabled graphically, as the preferences window has been patched to permanently hide such an option (as the Raspberry Pis lack native battery support); instead run the command
Code:
gsettings set org.mate.power-manager icon-policy 'always'
to manually enable it.
The PPA at https://launchpad.net/~grate-driver/+archive/ubuntu/ppa is pre-configured to be accessed. Most packages from this repository, including the opentegra driver, come preinstalled. They currently are enough to get 2D acceleration working, but not for 3D acceleration.
Except for what has been mentioned above, any packages shipped may have to be updated once an internet connection is established.
Arch Linux ARM (ArchLinuxARM-armv7-latest+acer-picasso.img.xz) (size: 576.6 MiB):
Based on 'ArchLinuxARM-armv7-latest.tar.gz', available from https://archlinuxarm.org/about/downloads
Rolling release distro often with the latest versions of most packages. More recent software can be acquired at a small expense of instability.
Requires at least an 2 GB or greater size microSD card (the image is 1.9 GiB decompressed). Larger size is recommended for installing more packages.
To login into system:
Login as the default user alarm with the password alarm.
The default root password is root.
Initially command-line only; contains no desktop environment installed.
Use any image writing program with these images. If such a program does not support XZ compression, the image needs to be extracted instead, and that has to be used.
I hope the images will proves useful to some people. Let me know if any issue pops up during usage of this image!
hey Worldblender,
I have flashed the premade file you shared to an sdcard but I'm unsure as to how to boot into it?
tehno said:
hey Worldblender,
I have flashed the premade file you shared to an sdcard but I'm unsure as to how to boot into it?
Click to expand...
Click to collapse
The instructions were written assuming that the user has already flashed the custom bootloader as described here: https://forum.xda-developers.com/iconia-a500/a500-2019-2020-t4039271. Sorry for not making this clear anywhere, but that custom bootloader, along with flashing the boot image found in the first partition named "pmOS_boot" to either boot or secboot using fastboot, should get you set up to boot the SD card image.
Hi Worldblender,
Nice to see you work on this legacy device.
I definitely don't want to use android or can use it anymore on this tablet.
Nice to see some linux flavor being ported to it.
I had a look a the dedicated page on postmarketos.
Can you confirm the only GUI availbale as for now is the one called "Weston" ?
Or is MATE also working (from the screenshot) ?
Weston seem very basic, MATE more friendly.
How about performance ?
I'm considering reusing it to display a grafana dashboard in firefox for instance, maybe more if performance isn't too bad.
Worldblender said:
The instructions were written assuming that the user has already flashed the custom bootloader as described here: https://forum.xda-developers.com/iconia-a500/a500-2019-2020-t4039271. Sorry for not making this clear anywhere, but that custom bootloader, along with flashing the boot image found in the first partition named "pmOS_boot" to either boot or secboot using fastboot, should get you set up to boot the SD card image.
Click to expand...
Click to collapse
Thank you Worldblender for your work in writing up instructions and compiling the image too.
However, I'm still a bit lost as to what to do with your Ubuntu Mate image.
I've gotten the TWRP bootloader installed onto my Acer A500 tablet, but whether I use Rufus to expand your image onto an SD card, or just copy the compressed image onto the SD card, the [ Install ] does not see any images inside of the drive. Am I supposed to decompress your image in Windows and use the 0.img and 1.img in place of the nvflash's boot.img and recovery.img?
While I can see the two partitions in Ubuntu, I'm equally lost as to what to do with them, and how to get it onto the tablet.
coluwyvurne said:
Thank you Worldblender for your work in writing up instructions and compiling the image too.
However, I'm still a bit lost as to what to do with your Ubuntu Mate image.
I've gotten the TWRP bootloader installed onto my Acer A500 tablet, but whether I use Rufus to expand your image onto an SD card, or just copy the compressed image onto the SD card, the [ Install ] does not see any images inside of the drive. Am I supposed to decompress your image in Windows and use the 0.img and 1.img in place of the nvflash's boot.img and recovery.img?
While I can see the two partitions in Ubuntu, I'm equally lost as to what to do with them, and how to get it onto the tablet.
Click to expand...
Click to collapse
Wait for me to give out an update to the image, as there likely has been a new kernel version released that I would like to have updated first.
TWRP will not be used at all for this installation process, as the image is too big to flash with fastboot. Just flash the image to a microSD card, as the boot image that will be flashed will automatically pick it up shortly after booting. The only thing that does have to be flashed is the boot.img, which can be found in the first partition, and you will be only using fastboot for this process, not anything else.
I released a new version of the premade Ubuntu MATE image just now, named 'ubuntu-mate-20.04.1-desktop-armhf+acer-picasso.img.xz'. The following changes have been made since the last image:
Kernel version upgraded to 5.10.1-rc1
Based on Ubuntu MATE 20.04.1
Everything that changed since the beta1 image
Other than these changes, there are no other differences that can be noticed right away.
Direct link: https://drive.google.com/file/d/1mr-7e29KJYeagJju0Yo1qUpT2YRb61AR/view?usp=sharing
Many thanks for your work. I've entered today this forum just curious about something new and found this!
Second life for this old machine!
For those with problems installing, I've flashed precompiled image using balenaEtcher into the sdcard.
Then, extracted .xz image, extracted .img, then extracted 0.img and copied boot file from there. After that, renamed the file to boot.img and flashed it with fastboot.
As I've the old modified skrillex bootloader, the command is fastboot flash secboot boot.img.
It boots and works well for now!
Worldblender said:
[*] Add the PPA at https://launchpad.net/~grate-driver/+archive/ubuntu/ppa to get access to updated video drivers. They currently are enough to get 2D acceleration working, but not for 3D acceleration.
Click to expand...
Click to collapse
@Worldblender
Hi, i apt updated after adding grate-driver ppa, it seems it broken xorg because X don't start anymore
Can you detail how to proceed ?
pheex79 said:
@Worldblender
Hi, i apt updated after adding grate-driver ppa, it seems it broken xorg because X don't start anymore
Can you detail how to proceed ?
Click to expand...
Click to collapse
Can you still switch to a virtual terminal with Ctrl-Alt-[F1-F7]? You will need a USB keyboard to do this. Then try, after logging in with your username and password:
Code:
systemctl stop lightdm
startx
If startx does not bring something up, could you try running journalctl, and show me any log entries relating to lightdm?
If that still fails, you can try (if ppa-purge is not installed, install that first)
Code:
ppa-purge ppa:grate-driver/ppa
@Worldblender
one binary missing but i think this error is present before adding ppa
"/sbin/prime-switch: 22: /usr/bin/gpu-manager: not found"
Xorg log:
Require OpenGL version 2.1 or later
modeset(0): Failed to initialize glamor at ScreenInit() time
pheex79 said:
@Worldblender
one binary missing but i think this error is present before adding ppa
"/sbin/prime-switch: 22: /usr/bin/gpu-manager: not found"
Xorg log:
Require OpenGL version 2.1 or later
modeset(0): Failed to initialize glamor at ScreenInit() time
Click to expand...
Click to collapse
I never received such an error, but the specific package you must install is xserver-xorg-video-opentegra. No other Nvidia driver is going to work.
Worldblender said:
I never received such an error, but the specific package you must install is xserver-xorg-video-opentegra. No other Nvidia driver is going to work.
Click to expand...
Click to collapse
It works ! Thank you
xserver-xorg-video-opentegra was not installed
when adding ppa grate i only did an "apt upgrade" cmd i thought all grate items were installed (a few are installed when upgrading apt)
Nice work thank you so much.
Is there any chance for Manjaro arm? Or is it limited to debian based distros?
Note that after following the instructions for installing the Ubuntu MATE image from @Worldblender from a starting point of just the stock image, I have Ubuntu MATE installed on the external SD card and no OS installed on the eMMC because it was wiped during the bootloader replacement. Reading back through the posts suggests this is by design.
@Worldblender, so I'm very new at rooting devices, and have a little experience with Ubuntu but feel pretty lost. Any chance you could hook me up with a step by step install of the Nov2 image (unless you've put together another new version) from a stock(not rooted or anything) A500? I apologize if I overlooked something.
Edit: I got it working after doing this thing called reading, I definitely overlooked some things after reading closer. For someone else that might find themselves in my shoes here's what I did.
I followed this link: https://forum.xda-developers.com/iconia-a500/a500-2019-2020-t4039271 to get the bootloader installed
and then followed @whylly 's instructions:
whylly said:
For those with problems installing, I've flashed precompiled image using balenaEtcher into the sdcard.
Then, extracted .xz image, extracted .img, then extracted 0.img and copied boot file from there. After that, renamed the file to boot.img and flashed it with fastboot.
As I've the old modified skrillex bootloader, the command is fastboot flash secboot boot.img.
Click to expand...
Click to collapse
Hi there ! I have an iconia a500, rooted with lightspeed 4.8. Can I install this and then make it switch to Khali linux ? My ultimate objective is to get Khali on this tablet. I've worked my way down from ver 2.5x linuxdeploy all the way down to 2.0 lol So I'm thinking maybe if I apply your OS it will update the Kernal from 4.0.3 to 5 yes ? (That's a big jump for linuxdeploy) then I can apt-get khalifull ? Am I off base would this work ? Unless you have an image already of course in which case pleaaaaaaaaaaaaaase I'll pay for the bloody thing if I have to I've been pulling my hair out for days. Tried frikkin everything.
Unless anybody has a better method of course in which case feel free to suggest. If I have to make the image from scratch so be it
EDIT: UGhhhhhh after days of troubleshooting, I got to linuxdeploy2.0-1.16 installed kali (the native one on the app not from the repository as that gives kernel too old once you get the install working). Managed to term in and tried to start lxde, failed because lxde doesn't exist (sigh) tried to apt-get... kernel too old. game over sigh
Unless someone has a workaround I don't think it's possible to get Khali on a500.
Sound work?

Categories

Resources