Related
Alright, so I bought my Milestone II then realized what MOTO had done. What a shame.
So after looking around, I found Freemymoto.com. Droid X kexec module based off MS1 kexec code (look on google, the original is still available).
So this got me thinking and working. I got a development suite on to my MS2. (Debian chroot with Sid and GCC 4.2.1) Pulled the kernel sources from MOTO GPL and went to work. After a couple of mins, its clear the Droid X and MS2 kernel code bases are slightly different.
So after an hour of modifying the code for the MS2, I have been able to compile a kexec module and kexec-tools, insert the module and load the the "new" (from GPL sources) kernel in to the kernel space...
This is where I need some help/advise from the experts.
I get an /proc/atags not found. (not a huge deal just means I should not get bootargs, can work on that later with my setup) But when I go to hit the kexec -e to execute the new kernel, the usb disconnects and the screen freezes for 20 seconds or so. Then it takes me back to the moto bootloader and boots in to the standard kernel.
Bummer.
So any advice on catching the kernel panic and subsequent reboot in logs or serial? I'm not sure how to diagnose the problem. The problem compounds itself since I don't even know if I am producing a functional kernel.
I am pretty new at kernel hacking but amateur programming for years. Not to mention, I've only have had an android phone for about 2 months now.
Thanks
PizzaRoll
There there are not many (or not even a single) dev on this forum, you should take a look at the IRC of And-Developers: irc.freenode.net #milestone-modding
Scrylax_CZ (cant rly spell his name) hes a dev i believe
89% of them are MS1 modders, but they work on the MS2 aswell (just not that much) but still, they are good as i noticed, just try asking in their channel
PS: also visit and-developers.com
Thanks, I'll have a look.
Sent from my MotoA953 using XDA App
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
r2beta0 said:
PizzaRoll,
I don't know if this will be of any help, but I think you can apply the 2ndinit + sh hijack technique to have some logs stored in /data. I was able to apply this on the Motorola Stock ROM, so I can Overclock and Undervolt my Milestone2 at boot time. The binaries from Milestone1 works quite well on my Milestone2, even the overclocking modules.
I was also trying to Port MIUI for Milestone2 and used the 2ndinit technique to be able to read the logcat after the system failed reboot.
What I've done:
- Installed Droid2 Bootstrap: to have custom recovery and to be able to boot into this recovery mode after the system crashes.
- Installed 2ndinit and sh hijack manually.
- Copied original logwrapper binary to mylogwrapper and modified the init.rc in /system/etc/rootfs. This was needed because Droid2 Bootstrapper conflicts with sh hijack technique.
- In init.rc, after mounting /data and after booting or not into clockwork recovery I added a line like this: exec /log-init.sh. Where log-init.sh just runs "/system/bin/logcat >> /data/logcat.log &"
If you need more detailed info I can provide that later. I will need to review my steps.
Also, I too am a developer skilled in C/C++ and linux, but I have no experience at all in kernel development. Also I an quite busy, but I may be able to provide some help
Click to expand...
Click to collapse
would it be possible to port MIUI for the MS2? that would be awesome
Bigdaddy168 said:
would it be possible to port MIUI for the MS2? that would be awesome
Click to expand...
Click to collapse
Without the sources, I don't think so.
I was trying to Merge the Milestone1 MIUI version into the Milestone2 Stock ROM, but my efforts were not able to produce a stable version. It consisted into disassembling both frameworks and adding into MIUI's support for the Native methods required by motorola proprietary libs. I was able to boot into MIUI, but not for long. The system crashed a few moments after booting due to invalid calls to the graphics library. I was stuck at that point and gave up due to a lack of time. But the experience was good to increase my knowledge about android inner structure
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
oh rad, 2ndinit works on MS2? that's helpful to know
smacky_wolf said:
oh rad, 2ndinit works on MS2? that's helpful to know
Click to expand...
Click to collapse
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
r2beta0 said:
Yeps, it works on mine. I'll take some time to write a guide from the scratch and post it here on XDA. I'm also trying to help santiemanuel to get it to work on his ROM, but I may be missing some detail.
Click to expand...
Click to collapse
I just got the MS2 a couple days ago, so I'm really interested in custom ROMs for it, but I'm a total n00b when it comes to xda and custom ROMS, only having the experience of downloading and flashing ROMs for other phones in the past. With that said, I'd be VERY intersted in a guide for the MS2. Please let us know when its up! Thanks
PizzaRoll said:
Unfortunately, I haven't had much time this week to playground with 2ndboot and the sh hack. I like the idea. Im still working on what the problem is exactly.
The old saying is true. Defining your problem (root cause) is the most difficult part.
Sent from my MotoA953 using XDA App
Click to expand...
Click to collapse
I've just finished my guide on how to enable 2nd-init on MS2. You can check it out here. Maybe this can help you into defining the root cause of the problem, as you can add logcat and dmesg to custom init before calling the kexec. I store my logs at /data so I can read them on the next reboot (getting into clockwork recovery and being able to use adb shell).
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
Hey I have installed Oreo 8.0.0 stock and Nethunter Successfully and i want to install Nexmon to the device so I can use frame injections etc. and skip the external wifi dongle.
I have a problem, when i try to compile the nexmon app I get some errors on my PC so I can't compile it... I found a pre-compiled apk on the internet and installed it and it seems to work fine...
Here are my problems, I can't install the framework/tools form the app.
I have Magisk instead of SuperSU because when i rooted the phone with SuperSU the phone gets in a bootloop.
On the nexmon site (http://nexmon.org/) my phone says it supported with Oreo 8.0.0
I think it something weird with Magisk because it is installed in a different way then SuperSU and therefore I don't have the "su" folder in root.
So my question is if someone have a tutorial or backup/rom or something i can flash or if you could help me to install the nexmon and its framework.
Thanks.
*bump*
No one ?
I also have this issue. And no, you are not at all a minority opinion.
I would like say, however, that do not expect much in re packet injection with the wlan(0)... Ideally, you are always going to want to have the ability to inject, as your post said, FRAMES. Not gonna happen, from my experience with the Nexus 5/6/Raspi. The 6p does have a different wireless card, but still, it remains an issue.
Then again, perhaps some of that may come from using encryption mode enabled, and when you use magisk, it is by definition enabled. In fact, I now can't celebrate Kali Linux 2019.2 edition of Nethunter, because magisk doesn't show up {nethunter tries to force no-verity, magisk tries to force encryption} and SuperSU results in error. I've no solution and doubt entirely it'll be found here.
hubrisnxs said:
I also have this issue. And no, you are not at all a minority opinion.
I would like say, however, that do not expect much in re packet injection with the wlan(0)... Ideally, you are always going to want to have the ability to inject, as your post said, FRAMES. Not gonna happen, from my experience with the Nexus 5/6/Raspi. The 6p does have a different wireless card, but still, it remains an issue.
Then again, perhaps some of that may come from using encryption mode enabled, and when you use magisk, it is by definition enabled. In fact, I now can't celebrate Kali Linux 2019.2 edition of Nethunter, because magisk doesn't show up {nethunter tries to force no-verity, magisk tries to force encryption} and SuperSU results in error. I've no solution and doubt entirely it'll be found here.
Click to expand...
Click to collapse
https://forum.xda-developers.com/showpost.php?p=79606695&postcount=139
In principal you're right.
Especially Oreo and the 2019.2 release, which has the exact same kernel, aren't working fully or nearly that what they supposed to.
You can use Hijacker, which works so so.
So it's your decision.. ;/
If you're still interested in a working Nethunter build, which does not necessarily has a Oreo base, you gonna flip with this one.
Although I decided to limit my participation resp contributions, I am not so egomaniac that I keep my results for me..
From now and then (max. every 3rd day), I'll look into the according "Nethunter" thread.
Best of luck
UsPdSr said:
https://forum.xda-developers.com/showpost.php?p=79606695&postcount=139
In principal you're right.
Especially Oreo and the 2019.2 release, which has the exact same kernel, aren't working fully or nearly that what they supposed to.
You can use Hijacker, which works so so.
So it's your decision.. ;/
If you're still interested in a working Nethunter build, which does not necessarily has a Oreo base, you gonna flip with this one.
Although I decided to limit my participation resp contributions, I am not so egomaniac that I keep my results for me..
From now and then (max. every 3rd day), I'll look into the according "Nethunter" thread.
Best of luck
Click to expand...
Click to collapse
Wow thanks so much for the response, and for the not-necessary information. I don't know why most everyone keeps it like a secret, but, redundantly, thanks
hubrisnxs said:
Wow thanks so much for the response, and for the not-necessary information. I don't know why most everyone keeps it like a secret, but, redundantly, thanks
Click to expand...
Click to collapse
Don't mention it.
Every time I come a across a fellow Kali (Nethunter) user, I make a caper.
And, I agree with you, logically.
Wow, Update Central
UsPdSr,
I hope that I am the first one to inform you about the new beta release for nethunter, an extention of F-droid that operates, essentially, as the Kali Nethunter App Store.
It's supposedly still in Beta, but since they accidentally updated the news feed before almost immediately deleting it (though not the link itself), I have found that
A) The apps are absolutely useful... In our context, the Nexmon app and, in case I wasn't the only one, the nethunter terminal (since the 2019.2 update, I couldn't use up to display last command etc.)
B) If they didn't want anyone to use the store, they'd have brought down the store, not just the update that announced it.
https://store.nethunter.com/en/packages/
Do you know which Nethunter works? Trying different versions, it either is missing completely, or working, but only for a few minutes.
So, as has probably been spotted in various places, Google dropped an Android Q GSI here recently.
One thing it requires (which breaks because Huawei, of course) is AVB support. Looks like init is unable to find the vbmeta image to verify and so it throws it's hands up with a "screw you, I'm going home".
Fortunately, this is relatively easy to work around - I have it booting on a Mate 9 that's been upgraded to EMUI 9, and I wouldn't be surprised if others have the same issue.
In any case, if this might be the reason why you're not booting, copy the attached file into /system/lib64 using TWRP or something.
There's other things broken on it - but that'll get it booting at least.
EDIT:
Link to patched Q GSI (GMS arm64 QPP2.190228.021):
https://drive.google.com/open?id=1dnEKJbjoiGhHuL6BLM8qXXyBFOKkE1bD
The only thing changed from the Google distributed image is the replacement of /system/lib64/libfs_mgr.so.
I will give that a try..
What are you doing for the selinux deniels?
Great, where did you install twrp as ramdisk partition in emui 9 doesn't exist anymore?
THE MAXIMUM POWER said:
Great, where did you install twrp as ramdisk partition in emui 9 doesn't exist anymore?
Click to expand...
Click to collapse
You still have the recovery partition, which can be used to flash twrp??
What works/doesn't work for you?
MishaalRahman said:
What works/doesn't work for you?
Click to expand...
Click to collapse
In the bit of playing I did, wifi to unsecured networks works, secured does nothing. Most of the apps included seem to work - but I didn't get too far into playing with it.
Can't say anything about cellular, as the device I loaded it on has a dud modem. It does read imei 1 successfully, though, so it might work on another device.
deepsrd said:
I will give that a try..
What are you doing for the selinux deniels?
Click to expand...
Click to collapse
Nothing yet. Just made sure the lib I posted was in the right place with proper permissions.
Doesn't seem to work on the Huawei Mate 10 Pro.
MishaalRahman said:
Doesn't seem to work on the Huawei Mate 10 Pro.
Click to expand...
Click to collapse
Hmm. I've heard mixed reports.
I've only tried it on the one device - MHA-AL00, EMUI 9.0.1.150 base. I figured it might be relevant to other people since there were a fair number of people on the main website post commenting on problems with AVB, which led me to that workaround.
I installed it with twrp over adb:
adb push libfs_mgr.so /tmp
adb shell
mkdir /system_root
mount -t ext4 /dev/block/bootdevice/by-name/system /system_root
cat /tmp/libfs_mgr.so > /system_root/system/lib64/libfs_mgr.so
reboot
On reboot, after a long wait (seems to take a minute to get to boot animation, that's Huawei for you), it came up to the welcome screen.
Edit - changed cp / chmod / chcon to cat, as it doesn't replace the file, keeping it's previous permissions & security label.
I think it will be better if you make a Q IMG that include the fixes
THE MAXIMUM POWER said:
I think it will be better if you make a Q IMG that include the fixes
Click to expand...
Click to collapse
Check the first post, I've added a link to the patched image.
irony_delerium said:
Check the first post, I've added a link to the patched image.
Click to expand...
Click to collapse
And now it actually booted on the Mate 10 Pro. Nice!
Does it work on devices other than huawei?
AsusZenFone3Deluxe said:
Does it work on devices other than huawei?
Click to expand...
Click to collapse
There's no reason for it not to. All that the patch I applied does is make it so that Android doesn't go looking for vbmeta information, so if that's the reason it fails to boot elsewhere this might allow it to work. If the image from Google already works, or it otherwise gets to the Android boot animation, this build won't do anything for you.
It booted on my MediaPad M5 but with no wifi, it stuck at "saved" but never mind, i just wanted to see the Q 2 beta, your fix might work as well with other unbootable roms like Pixel experience.
I really appreciate your work
THE MAXIMUM POWER said:
It booted on my MediaPad M5 but with no wifi, it stuck at "saved" but never mind, i just wanted to see the Q 2 beta, your fix might work as well with other unbootable roms like Pixel experience.
I really appreciate your work
Click to expand...
Click to collapse
Yeah, I've only been able to connect to unsecured networks. Pretty sure that's HAL changes in Q to blame.
irony_delerium said:
Yeah, I've only been able to connect to unsecured networks. Pretty sure that's HAL changes in Q to blame.
Click to expand...
Click to collapse
Ohh, thank you for the hint, btw any way to install your mod through fastboot mode as MediaPad M5 doesn't have a good TWRP?
Thank you in advance
THE MAXIMUM POWER said:
Ohh, thank you for the hint, btw any way to install your mod through fastboot mode as MediaPad M5 doesn't have a good TWRP?
Thank you in advance
Click to expand...
Click to collapse
I don't know about using it on Pie builds - init on Q is dynamically linked, on Pie it's a static binary, so you'd have to patch /init to make that change. Whether it would help or not, I don't know.
MishaalRahman said:
And now it actually booted on the Mate 10 Pro. Nice!
Click to expand...
Click to collapse
Did you have to do any other than what's instructed? Id like to take it for a spin.
Also, unrelated, what's with some of our "avatars" are green while others yellow?
I'm pretty sure @fullofhell was looking for an actual bootable build, and not just hear say.
culiacanazo said:
Did you have to do any other than what's instructed? Id like to take it for a spin.
Also, unrelated, what's with some of our "avatars" are green while others yellow?
I'm pretty sure @fullofhell was looking for an actual bootable build, and not just hear say.
Click to expand...
Click to collapse
Haha yeah Bro i tried this yesterday thanks tho
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