[Guide] How to Enable Miracast for Pixel - Google Pixel Guides, News, & Discussion

Introduction
Few weeks ago, I got a Pixel 1 as my backup phone, when I try to connect it to the Microsoft Wireless Display Adapter, it couldn't find the Adapter.
I haven't used Android phones for a long time. In my mind, Android natively supports Miracast. After some searching, I was frightened to find that Google has removed Miracast from Android.
I was really disappointed because I often cast my Windows devices easily by using Miracast. My Projector has only two HDMI ports, one for HDMI cable, and one for Wireless Display Adapter. I can't add a Chromecast unless a HDMI switch is used.
One possible solution is to add a line "persist.debug.wfd.enable=1" in "build.prop" to enable WiFi-Display, but many people say that it doesn't work since Android N, the phone can discover WiFi-Displays but unable to cast.
Since Android framework is open source, I did some searching and found that some WiFi-Display related code still exists. Android 9 still keeps the WifiDisplayAdapter in DisplayManagerService, but removed WifiDisplay from MediaPlayerService, that's why we can discover WiFi-Displays but can't cast.
I recovered some code from AOSP history commits, fixed the build errors, and debugged on my Pixel, finally the Miracast can work on my Pixel.
If you also want Miracast to work on your Google phones, you can follow my steps, but first make sure your ROM is open source so that you can change and rebuild it.
If you have a Pixel 1 running the same version of system, you can simply replace some files in your system with the files I built.
If you have other Google phones or running different versions, you can apply my patch to AOSP, and build it by yourself. I have built the latest version for all Google Pixel phones, but I haven't tested except Pixel 1.
If your ROM is not open source, I will no longer be able to help, since MediaPlayerService may have been changed by your ROM, you may can't replace it with the AOSP version.
Prerequisites
Pixel running Android 9.0.0 build number PQ1A.181205.002.A1 or PQ1A.190105.004.
Bootloader unlocked.
adb and fastboot tools and drivers are working for your device.
Note & Disclaimer
These steps will change files in your system, your Pixel should run the exact same version of system. Pushing files to different versions of system may cause unknown problems.
Please check carefully before running each command, a mistaken operation may result in unable to boot up, or destroy your data, or even damage your phone.
If you are not sure about what these steps are doing, but still want to go ahead, please backup your phone firstly, you may not be able to recover your phone to its original state.
I have only tested on Pixel 1 with build number PQ1A.181205.002.A1 and PQ1A.190105.004, for other phones or versions, you should build and test on your own.
Basic Steps
Flash the same version of factory image for your phone.
Download the prebuilt files from https://github.com/sbjbs/android-wfd-patch
Add this line into "build.prop", without it, we will not be able to enable WiFi-Display:
Code:
persist.debug.wfd.enable=1
Replace some files in system:
Code:
system/lib/libaudioflinger.so
system/lib64/libaudioflinger.so
system/lib/libserviceutility.so
system/lib64/libserviceutility.so
system/lib/libmedia.so
system/lib64/libmedia.so
system/lib/libwilhelm.so
system/lib64/libwilhelm.so
system/lib/libandroid_runtime.so
system/lib64/libandroid_runtime.so
system/lib/libstagefright.so
system/lib64/libstagefright.so
system/lib/libstagefright_wfd.so
system/lib64/libstagefright_wfd.so
system/lib/libmediaplayerservice.so
If you have magisk installed, you can refer to Phoenix Wright's post:
Phoenix Wright said:
using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent.
using magisk to overlay them on /system
Click to expand...
Click to collapse
Some extra steps that you may need
Remove dm-verity metadata of system.img
The dm-verity can prevent us from changing the system, and what's more it has a forward-error-correction(FEC) feature, which can detect and correct some corrupted data.
I spend a lot of time on attempting to change the build.prop but fail again and again, it just always correct the file, and I can't enable wifi-display.
I don't know how to disable it. Since the error-correcting info should be stored in the dm-verity metadata, I just removed the dm-verity metadata from the stock system.img, and flash the system.img.
I will list the steps to remove dm-verity metadata, but if you can disable dm-verity entirely, that should work too.
For phones that have a vbmeta partition (like Pixel 2), seems you can flash an special vbmeta.img to disable AVB. You can build the empty vbmeta image by this command, but I don't have a device to test if it works:
Code:
avbtool make_vbmeta_image --flag 2 --padding_size 4096 --output vbmeta.img
For Pixel 1, we need to remove dm-verity metadata that attached to system.img, first convert the sparse system.img to an ext4 image:
Code:
simg2img system.img system.ext4.img
read the block count to calculate the system size:
Code:
od -j 1028 -An -N4 -tu system.ext4.img
for Pixel 1, it should be 516099. You also can read it by a Hex Editor, e.g., WinHEX in Windows, read 4 bytes starting from 1028 bytes, as a little-endian hex value.
so the real system partition size is 516099 * 4096 = 2113941504 bytes.
we need to set the data to zero after that position. It's important to do this, since we need to overwrite the metadata in that area, rather than just truncate the size of system.img.
next get the ext4 image size, for Pixel PQ1A.181205.002.A1, it should be 2147483648.
so we need to write 2147483648 - 2113941504 = 33542144 bytes:
Code:
dd if=/dev/zero of=system.ext4.img seek=2113941504 count=33542144 oflag=seek_bytes iflag=count_bytes
we also can use some other tools to do this, e.g., WinHEX in Windows. Open the file in in-place mode, and jump to 2113941504, and select it as the begin, and jump to the end, and select as the end, and fill the selection with all zero.
after that, flash the changed system.ext4.img to Pixel:
Code:
fastboot flash system system.ext4.img
Test that you can boot up normally. If not, check what's wrong and fix it.
Temporary boot up by TWRP image
We don't have to install TWRP, but just use it to temporary boot up, so that we can mount the system partition for writing. If you have TWRP installed, you can just boot to TWRP.
Download TWRP image for pixel, just need the twrp.img, we won't install the zip file.
boot your device to bootloader:
Code:
adb reboot bootloader
and boot by the twrp.img
Code:
fastboot boot twrp.img
after TWRP booted up, just leave it there, no need to unlock or input password, we will change the system by adb.
Mount system partition for writing.
In the current version of TWRP for Pixel (twrp-3.2.3-1-sailfish.img), its fstab has an entry for system partition, we can directly mount it.
Code:
adb shell mount /system
run mount to check if successfully mounted:
Code:
adb shell mount
you should see an entry like this:
Code:
/dev/block/sda34 on /system type ext4 (rw,seclabel,relatime)
If not, you should stop now, and check the above steps.
after mount, we can use adb to push files into system.

Hey guy,
You helped me a lot to understand why it was not working with Pie. I tried several custom ROMs + the official Pie and it was not working.
There is Wireless display option in quick settings but it' doesn't find my Microsoft Wireless Display Adaptor also.
I so downgrade to Oreo. With Oreo it works without any issue. (there is an option "allow Wireless display" to tick and then your miracast dongle will appear).
You did a great job to make it working on Pie. Congratulations. I will anyway stay on Oreo. I think google will change that (many people already complained i guess).
Jean Michel

jean_michmich said:
Hey guy,
You helped me a lot to understand why it was not working with Pie. I tried several custom ROMs + the official Pie and it was not working.
There is Wireless display option in quick settings but it' doesn't find my Microsoft Wireless Display Adaptor also.
I so downgrade to Oreo. With Oreo it works without any issue. (there is an option "allow Wireless display" to tick and then your miracast dongle will appear).
You did a great job to make it working on Pie. Congratulations. I will anyway stay on Oreo. I think google will change that (many people already complained i guess).
Jean Michel
Click to expand...
Click to collapse
Thanks for your reply!
I have tested on Pie on my Pixel, I often play online games while cast is on, and didn't meet any problems last week.
I also hope that Google will support Miracast again in the future, but it seems unlikely in the near future.
Google has abandoned it since Android 6 (source: Wikipedia), and now they're deleting unused source code related to wifi-display.
I'm more worried about that there will be more build errors and potential issues when we try to enable it for future Android versions.

sbjbs said:
Thanks for your reply!
I have tested on Pie on my Pixel, I often play online games while cast is on, and didn't meet any problems last week.
I also hope that Google will support Miracast again in the future, but it seems unlikely in the near future.
Google has abandoned it since Android 6 (source: Wikipedia), and now they're deleting unused source code related to wifi-display.
I'm more worried about that there will be more build errors and potential issues when we try to enable it for future Android versions.
Click to expand...
Click to collapse
OK it's getting more clear. You are right. Wikipedia says : "but support was dropped with Android 6.0 Marshmallow in 2015 in favor of Google's own proprietary Google Cast protocol.[15] Some manufacturers of Android devices step in and support Miracast through their software"
I'm not an "official android ROM" user.
I always use Pixel Dust custom ROM. For this custom ROM, Miracast was supported for Oreo but not for Pie (not yet).

jean_michmich said:
OK it's getting more clear. You are right. Wikipedia says : "but support was dropped with Android 6.0 Marshmallow in 2015 in favor of Google's own proprietary Google Cast protocol.[15] Some manufacturers of Android devices step in and support Miracast through their software"
I'm not an "official android ROM" user.
I always use Pixel Dust custom ROM. For this custom ROM, Miracast was supported for Oreo but not for Pie (not yet).
Click to expand...
Click to collapse
I used to be a ‘latest official ROM’ user
For custom ROMs, since they may have changed the framework, we can't replace files with AOSP version, but as long as they're open source, we can try to contribute to it.
Adding Miracast support in Android is not difficult, and many manufactures have their own support.
I hope your custom ROM will support Miracast for Pie in the near future.

Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.

Hi @sbjbs
If I understand you right then you have patched the AOSP codebase. Would you mind sharing the repositories/commits on your GitHub? That would be highly appreciated. :good:
Regards
spezi
Sent from my Pixel 3 using XDA Labs

spezi77 said:
Hi @sbjbs
If I understand you right then you have patched the AOSP codebase. Would you mind sharing the repositories/commits on your GitHub? That would be highly appreciated. :good:
Regards
spezi
Sent from my Pixel 3 using XDA Labs
Click to expand...
Click to collapse
There's a link in the OP: https://github.com/sbjbs/android-wfd-patch/tree/master/patches/android-9.0.0

Phoenix Wright said:
Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.
Click to expand...
Click to collapse
Great to hear that!
You method is simpler and more elegant, that's awesome!

Phoenix Wright said:
Tested on Pixel 2 XL and working (for what it's worth, using "setprop" to set that property once is enough, no need to touch build.prop; given it's a "persist" property it'll be permanent). I built the .so files on my local aosp tree and I'm using magisk to overlay them on /system.
Click to expand...
Click to collapse
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin

nitin.chobhe said:
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin
Click to expand...
Click to collapse
I made a module with the .so files I compiled: https://workupload.com/file/pd4EUBdw
Note that I can't vouch for this to work on your ROM, it works on taimen on stock 9.0 with January security patches though.

nitin.chobhe said:
Can you elaborate how you did use "magisk to overlay them on /system"?
I pushed them using adb as mentioned on github but it is stuck at Google splash screen. I've taimen BTW and am on Pixeldust ROM. It booted while writing this post but the screen was not responding to touch.
Nitin
Click to expand...
Click to collapse
Did you build the so files for your ROM from source? the patch has changed the interface of IMediaPlayerService, if anything else in your ROM is using IMediaPlayerService.h, you'd better rebuild and replace them.
that's why I uploaded the libwilhelm.so and libandroid_runtime.so, even though I didn't change the source code of them.

Phoenix Wright said:
I made a module with the .so files I compiled: https://workupload.com/file/pd4EUBdw
Note that I can't vouch for this to work on your ROM, it works on taimen on stock 9.0 with January security patches though.
Click to expand...
Click to collapse
Thanks!
sbjbs said:
Did you build the so files for your ROM from source? the patch has changed the interface of IMediaPlayerService, if anything else in your ROM is using IMediaPlayerService.h, you'd better rebuild and replace them.
that's why I uploaded the libwilhelm.so and libandroid_runtime.so, even though I didn't change the source code of them.
Click to expand...
Click to collapse
I tried building with my ROM but I got build errors related to OMX.h, I need to find a solution for them. Thanks anyways!
Nitin

Someone tries on Pixel 3? Thanks

It works perfectly ! I used the prebuilt files on the march build.
Do you know if we can force the 16/9 ratio ?
Thanks
edit : I will try with second screens !

this works a treat on my Pixel 3 XL (Stock Pie) just overlayed the files from Phoenix Wright using magisk and it works now....sweet thanks, now just need to figure out how to fool sky sports app into letting me cast.....

marshyrob said:
this works a treat on my Pixel 3 XL (Stock Pie) just overlayed the files from Phoenix Wright using magisk and it works now....sweet thanks, now just need to figure out how to fool sky sports app into letting me cast.....
Click to expand...
Click to collapse
Can you explain more how did you do?
Did you just flash the zip from Phoenix Wright in Magisk?

EMJI79 said:
Can you explain more how did you do?
Did you just flash the zip from Phoenix Wright in Magisk?
Click to expand...
Click to collapse
Yes just copied the .zip file from Phoenix Wright's post to my device then used the module install option in Magisk like if you are installing a module found in Magisk (use the plus sign to add your own .zip file instead and browse to the file you just saved) then reboot. Then i went to the cast option in settings - connected devices - connection preferences, there i could tick in the top right corner under the 3 dots "enable wireless display" and it showed my Panasonic TV, chose connected and boom it connected. Needed to enable the mirroring option on my Panasonic but this is a TV setting nothing to do with the phone, you might need to do a similar step based on your TV as they need to be able to see each other.

marshyrob said:
Yes just copied the .zip file from Phoenix Wright's post to my device then used the module install option in Magisk like if you are installing a module found in Magisk (use the plus sign to add your own .zip file instead and browse to the file you just saved) then reboot. Then i went to the cast option in settings - connected devices - connection preferences, there i could tick in the top right corner under the 3 dots "enable wireless display" and it showed my Panasonic TV, chose connected and boom it connected. Needed to enable the mirroring option on my Panasonic but this is a TV setting nothing to do with the phone, you might need to do a similar step based on your TV as they need to be able to see each other.
Click to expand...
Click to collapse
It did work today with my Sony television.
Thanks!

OMG!!! You made my week. Few hiccups tho....
Can anyone else confirm that Hulu and HBO go and Amazon prime . YouTube works.
Hulu and amazon I can log on but when it plays all you get is audio. Haven't tried Netflix I don't sub them.
HBO go as soon as I try to play a video it says this video cannot be played. If I disable the mirror it plays perfectly. Same thing with Hulu and prime. Disable the mirror an it works perfectly on my phone.

Related

[TWRP][OFFICIAL] TWRP for LAVA Pixelv1

FEATURED ON THE PORTAL
Thanks @Doug Lynch for the mention!​
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
CHANGELOG for 3.0.2-0:
-Fix a bug with the input box that affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
-Add Greek translation to some builds.
CHANGELOG for 3.0.1-0:
-support new CM 13.0 pattern encryption (sultanqasim)
-fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
-libtar updated to latest upstream and fixes (jcadduono)
-fixes for loading custom themes (_that)
-TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
-translation updates - added Italian, Czech and Polish and significant updates to Dutch
-progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
-fix input box text display (Dees_Troy)
-reboot option after zip install complete (bigbiff)
-other mostly invisible bug fixes and improvements
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
CHANGELOG for 2.8.7.0:
-Initial ground work for software drawn keyboard (_that)
-Fix handling of wiping internal storage on datamedia devices (xuefer)
-Allow DataManager to set and read values from the system properties (xuefer)
-Fix crash when taking screenshots on arm64 devices (xuefer)
-Fix error message after an ORS script completes (Dees_Troy)
-Fix crashes / error when creating encrypted backups (_that, Dees_Troy)
-Add system read only option – more details below (Dees_Troy)
-Add resize2fs and GUI option to run resize2fs (Dees_Troy)
-Fix crash loop caused by empty lines in AOSP recovery command file (_that)
-Prevent duplicate page overlays such as multiple lock screens (mdmower)
Note: As always, be sure your custom theme is up to date (or remove your custom theme) before updating TWRP.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
This new version also marks our first set of full builds using our new jenkins build server. You can track the progress of builds at https://jenkins.twrp.me and we have taken additional steps to make it easier for device maintainers to step up and submit patches to our gerrit server at https://gerrit.twrp.me to help us keep devices up to date and working.
DOWNLOAD:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Images..." button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
You can find more information and download links on our website.
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
XDA:DevDB Information
TWRP 3.0.2-0 for LAVA Pixelv1, Tool/Utility for the OEM Cross Device Development
Contributors
MSF Jarvis, varun.chitre15
Version Information
Status: Stable
Created 2016-04-06
Last Updated 2016-04-20
Reserved
Credits
varun.chitre15 for his base trees
@DHARMESH17 for being a great tester
@arvinquilao for making me jealous!
Reserved
I would like you to recognize some misunderstanding.
On the official website of TWRP are 2 different Android One devices listed.
The first is "sprout" which stand for MTK powered devices
The other entry is called "2nd generation MTK (seedmtk)" which is simply wrong and might mislead some people. 2nd gen devices are powered by Snapdragon 410 CPUs.
You may want to change the listing on your website for a better understanding.
body150165 said:
I would like you to recognize some misunderstanding.
On the official website of TWRP are 2 different Android One devices listed.
The first is "sprout" which stand for MTK powered devices
The other entry is called "2nd generation MTK (seedmtk)" which is simply wrong and might mislead some people. 2nd gen devices are powered by Snapdragon 410 CPUs.
You may want to change the listing on your website for a better understanding.
Click to expand...
Click to collapse
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
@body150165 thanks for bringing up your concern. Official TWRP build for the Snapdragon variant is already available via dl.twrp.me/seed, but the website is yet to be updated (probably in the next couple of days). As soon as it's updated I'll make a new thread here for the Snapdragon variant.
Second Partitiin (SD partition) working??
Sent from my SM-J500F using XDA-Developers mobile app
Nur_Alom said:
Second Partitiin (SD partition) working??
Sent from my SM-J500F using XDA-Developers mobile app
Click to expand...
Click to collapse
Who needs it?
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
cuvetto said:
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
Click to expand...
Click to collapse
I'll get back to you in a while after checking these. And this is TWRP 3.0.2-0, not 3.0.0-2.
I would like to know what steps have you taken to port it to determine whether I can source build for the device and make it official.
cuvetto said:
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
Click to expand...
Click to collapse
@cuvetto : No, these bugs don't exist in my build. Tested as working fine by @DHARMESH17.
Will these work on 1st generation android one device i mean sprout 4 ?
DarkHeart Z said:
Will these work on 1st generation android one device i mean sprout 4 ?
Click to expand...
Click to collapse
It will not, sadly. TWRP seems to have not updated sprout devices for ages, so I'll run you guys a 3.0.2-0 build in some time and post it here.
MSF Jarvis said:
It will not, sadly. TWRP seems to have not updated sprout devices for ages, so I'll run you guys a 3.0.2-0 build in some time and post it here.
Click to expand...
Click to collapse
Then I am waiting for that
Bootloop
My device is lava pixel v1. After flashing this recovery from fastboot my device goes into bootloop. It always start with recovery and then says failed to mount /data etc and again reboots.
ashokvishnoi1994 said:
My device is lava pixel v1. After flashing this recovery from fastboot my device goes into bootloop. It always start with recovery and then says failed to mount /data etc and again reboots.
Click to expand...
Click to collapse
After fastboot flash recovery twrp-3.0.2-0-seedmtk.img, what exactly did you do?
You need to press both Volume Up + Power for about 15 seconds till device reboots back into bootloader mode and then go to recovery mode and open it. This has been tested as working. What steps did you take?
MSF Jarvis said:
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
Click to expand...
Click to collapse
It should be Infinix Hot 2. Also I tried flashing via flashify and the recovery does not boot on Hot 2.
anarchtic said:
It should be Infinix Hot 2. Also I tried flashing via flashify and the recovery does not boot on Hot 2.
Click to expand...
Click to collapse
That's bad.... Can you provide me with your boot image? I will have to end up deunifying this recovery if it isn't booting :/
I would recommend that you also try a fastboot flash to see if it's a flashify thing.
MSF Jarvis said:
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
Click to expand...
Click to collapse
MSF Jarvis said:
That's bad.... Can you provide me with your boot image? I will have to end up deunifying this recovery if it isn't booting :/
I would recommend that you also try a fastboot flash to see if it's a flashify thing.
Click to expand...
Click to collapse
I will when I get home, I am at work now which is why I used Flashify. Did you test using Hot 2?
anarchtic said:
I will when I get home, I am at work now which is why I used Flashify. Did you test using Hot 2?
Click to expand...
Click to collapse
Don't own one. I believed it would boot, just like it does for Android One first gen devices(One recovery for all devices)

Sailfish OS for the Samsung Galaxy S2 (i9100)

Initial post for Sailfish Os for the Samsung Galaxy S2 (i9100) device.
Code:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! W A R N I N G !!
!! !!
!!(Although I am using this on my backup phone)!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Everything you do, !!
!! you do at your own peril and risk. !!
!! !!
!! I do not bear any responsibility !!
!! for your faulty devices. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! !!
!! ROM IS NOT SUITABLE FOR DAILY DRIVE !!
!! ONLY FOR EXPERIMENTAL PURPOSES !!
!! !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Making this port was challenging because Sailfish OS, from version 3, doesn't support kernel version 3.0 which is apparently the kernel on the S2.
Fortunately, the SailfishOS-porter guys do very seriously know their business and they are extremely helpful.
From here I would like to emphasize my gratitude towards them for helping me in this project! Thank you!
Requirements:
Before you start to download anything, please read it carefully.
The first requirement is your device must be rooted and you should be able to install a custom recovery (preferably TWRP) onto it.
For this ROM you can either use the stock partitions or you can re-partition to give more space to /system and /data. It doesn't matter which one you chose, I tried and both worked well.
Or if you scroll down to the New partition layout, you can use a completely unique partition layout which gives the most of the internal storage to Sailfish OS. (I currently use my device with this setup.)
Installation instructions:
1. Download all files, CM12.1 zip, Sailfish OS zip, twrp2.8.7.img and kernel*.img to the external SD card on the phone
2. Reboot into TWRP (hold buttons: Power on + Home + Volume up)
3. Do a factory reset
At this point if you want you can repartition the S2 internal storage. (Later you can put the stock layout back if you want to go back to Android.)​
The steps for repartitioning are:​
​
Download the 'Repartition: System=1GB, Data=14GB, eMMC=8MB, /preload=7MB' or the 'Repartition: System=1GB, Data=4GB, eMMC=7GB, /preload=0.5GB' .zip file and put into the external SD card. (The difference between these two is explained down at the New partition layout section
Then boot into TWRP and flash the zip as any other zip file. The script first will warn you that it cannot do the partitioning with mounted partitions and it also copies the script itself into /tmp. You just simply need to flash the copied version from /tmp and that will do the trick. The script will format the new partitions accordingly, so once it is completed you can go ahead with the next step.
4. Still in recovery, flash the CM12.1 image
5. Still in recovery, flash Sailfish Os image
6. Still in recovery, flash twrp2.8.7.img to recovery partition
7. Still in recovery, flash kernel*.img to boot partition (this step is not required since sfos 4.4, kernel is installed by flashing the zip file)
8. Reboot
9. Enjoy the latest (4.4.0.68) Sailfish OS on your i9100.
You will need patience as the first boot will take for a while. Then you can go through the initial Sailfish OS set up.
This Sailfish OS Android HAL based on CM 12.1.
Downloads:
kernel12_mtp.img for Sailfish OS 3.2.1.20
kernel33016.img for Sailfish OS 3.3.0.16
kernel34024.img for Sailfish OS 3.4.0.24
kernel41024.img for Sailfish OS 4.1.0.24
kernel43015.img for Sailfish OS 4.3.0.15
twrp2.8.7.img for i9100
CM 12.1 for i9100
Sailfish OS 3.2.1.20 for i9100
Sailfish OS 3.3.0.16 for i9100
Sailfish OS 3.4.0.24 for i9100
Sailfish OS 4.1.0.24 for i9100
Sailfish OS 4.3.0.15 for i9100
Sailfish OS 4.4.0.64 for i9100
Sailfish OS 4.4.0.68 for i9100
Sailfish OS 4.4.0.72 for i9100
Odin v1.83
AOSP-LP-Kernel+_25-08-2015_TWRP-2.8.7.0.tar
Repartition: System=1GB, Data=14GB, eMMC=8MB, /preload=7MB
Repartition: System=1GB, Data=4GB, eMMC=7GB, /preload=0.5GB
Stock partition pit file
kernel07_flatpak (kernel with Flatpak support. Flatpak install/usage instructions.)
Some useful tips:
Low power mode aka ambient mode (in Fingerterm):
Code:
mcetool --set-low-power-mode=enabled
Disable lock screen animation (in Fingerterm):
Code:
mcetool --set-lockscreen-animation=disabled
Some useful patches:
Patchmanager 3.0
More folder icons
Operator name at bottom (Stopped working on 3.3.0.16)
Silica mail (transparent background) - Well documented here
Apps from Openrepos
Apart from the Jolla store there are plenty of other, community-made apps in Openrepos. There is a user-friendly app to install/remove apps from this source called Storeman. It can be downloaded and install from this location: Storeman
Debug/login/troubleshooting:
In Ubuntu, connect USB cable. telnet 192.168.2.15 2323 or SSH [email protected].
Notes:
On Sailfish OS, as it is a Linux system, you cannot install/run any android apps.
How to make a backup/restore with TWRP:
Now the old clunky method is no longer needed. Once you flashed the twrp2.8.7.img to the recovery partition you can boot into TWRP with the usual button combination (Hold buttons: Power on + Home + Volume up) and can make backup/restore.
Instructions for Bluetooth (On Sfos 4.3, BT works normally, don't need this magic)
BT works however turning it on/off is not as user friendly as I hoped. Here is a little instruction/troubleshooting.
Turn BT on (It only works from Settings/Bluetooth!!!!! DON'T try from TOP MENU!!):
If BT hasn't turned on since last boot:
go to Settings/Bluetooth
tap on the dot next to the Bluetooth option
If BT has turned on at least once since last boot:
go to Settings/Bluetooth and tap on the dot next to the Bluetooth option
go back to Settings
go to into Settings/Bluetooth again
tap on the dot next to the Bluetooth option (if it is not turned on repeat from Step 2! Eventually, BT should turn on.)
Turning BT off: Go to Settings/Bluetooth and tap on the white dot next to the Bluetooth option.
Notice: Never try to tap on the white dot twice without going back to the main menu of Settings.
Never try to turn BT on from Top Menu.
However, if you accidentally did any of these BT cannot be turned on again unless you:
reboot the device (this is the easiest) or
in a command line as root issue the following command 'systemctl restart bluetooth-rfkill-event.service' (this will restart the bluetooth-rfkill-event service)
I am not sure how pairing works with different devices.
New partition layout
I mentioned that I tried this Sailfish OS installation with the stock partitions and with another what created for Android 7.1.2. With the stock partitions however was a bit more sluggish than the other one. No wonder as in the stock partitions the /system has only 0.5GB and the /data has only 2GB storage and the rest 12GB is the separate internal storage (eMMC). In Sailfish the entire os (rootfs) including all directories (like /home) live on the /data partition so the 2GB was a bit tight. (The OS itself consumes about 1GB so not much left for apps and other stuff.)
With the other partition layout, the picture was a bit better as the /system had 1GB, the /data got 4GB and the rest 9GB remained for the internal storage. But the partition where the OS lives was separated from the 9GB partition. When I installed a few apps and copied some big files into the /home, I felt the limitation very soon.
Although this layout was sufficient for android but not good enough for Sailfish.
Therefore I have created my own partition table where I restructured the sizes accordingly to my need. (The lanchon repit zip file is available in the download section.)
In this new layout I gave 1GB for the /system (the prior 0.5GB was also fine as the CM12.1 base consumed only 400MB which let a 100MB free space, but I thought that might be not enough in the future so I have chosen 1GB here), I gave only 8MB for the internal storage (eMMC which is mounted into /android directory in this rom), and this made me possible to gave all the rest 14GB to the /data partition. So basically the Sailfish apps and /home can utilize the entire internal storage.
As an extra, on the S2 there is a 0.5GB /preload partition which is hidden and unused by default. In my partition setup I set 7MB to this and the rest almost 0.5GB is also added to the /data.
Go back to stock partitions
In case you would like to do this, you can download the stock partition pit file from the download section.
For this use Odin v1.83 which is also in the download section.
The steps are:
Boot the device into download mode and connect to the PC.
Open Odin v1.83 and tick the 'Re-partition' checkbox at the Option.
Then click on the PIT button and select the downloaded stock pit file.
Then click on the PDA button and select the downloaded TWRP (AOSP kernel) file.
Then click on start.
Done. You need to boot into TWRP and wipe all partitions (system, data, emmc) then you can install the stock rom back. (or if you select the stock rom at PDA instead of the AOSP kernel, it will do the repartition and install the stock rom as well. In this case, you don't need to wipe anything and the device will reboot into the stock Android at the end.)
Changelog:
15.02.2022
=========
General advice:
Patience! All (except camera) apps do start and work but they do need time. This is true for websites. When you clicked on something, wait patiently, eventually, it will start/load.
Work:
Same as previously
Improvement: Stock browser stable and works!
Do not work:
The camera app crashes the device into reboot.
03.09.2021
=========
Work:
Same as previously
Bluetooth does work, but once it is off, needs to be toggled a few times in Settings to make it turn on again.
14.06.2020
=========
Work:
Same as previously + Mobile data is fixed! (To make it work: change Protocol to IP in Settings/Mobile network/Data access point.)
Bluetooth doesn't work, it is still WIP
Do not work:
Same as previously
06.05.2020
=========
The latest version of Sailfish OS 3.3.0.16 is available to download. This requires a different kernel. Both of these can be found in the download section.
Note: With the new version the patch that displays the provider logo at the bottom on the lock screen stopped working. This issue is not related to the OS. The owner of the app should fix it.
Update: In openrepos Kodi is fixed for SFOS 3.3.0.16!
29.04.2020
=========
Work:
Screen
Touch
IMEI number is detected
Sensors (GPS, Rotation, Acceleration, Gyroscope, Magnetometer, Light & Proximity)
Wifi
MTP
Bluetooth (instruction is above)
Calls incoming/outgoing
Messages incoming/outgoing
External SD card detected and mounted to /run/media/nemo/_sdcard_name_ (where _sdcard_name_ is name of the sd card when it was formatted like 7C97-785B)
Internal SD card is mounted to /android
Pixel ratio and icons set to 1.00 (Can be changed to 0.82 which is more appropriate for the device's screen. to do this as root run the 'kimmoli-diyicons.sh 0.82' command. It will fail to install imagemagick but will set the ratio to 0.82 and as we have all icons in place it will work.)
Audio is routed to headphone if that presents
Camera front/rear (only for taking pictures)
Jolla store
findutils is installed by default (updatedb and locate commands work out of the box)
Torch
the charging icon does work properly, however, there is a little delay
can boot into TWRP recovery with the usual button combination (hold buttons: Power on + Home + Volume up)
kernel and recovery .img can be flashed from TWRP (no need for PC to flash Sailfish OS, kernel and recovery)
Low Power Mode (AKA "sneak peek" or "ambient display") works (install instruction is in this post)
The softkeys (each side of the home button) work as notification leds
Do not work:
Mobile data (WIP)
Video recording (It doesn't really work in other 3.x versions either. See my test results here.)
There is an extra little issue that is a delay in screen refresh which is related to how vsync is handled in v10 backend in qt5-qpa-hwcomposer-plugin. I managed to improve this but there is a little delay still. Probably this is the reason why we need to jump back to Settings every time before trying to turn BT on, but I am not sure.
04.04.2020
=========
Work:
Same as previously + Softkeys are used as notification leds
Bluetooth doesn't work, it is still WIP
Do not work:
Same as previously
23.03.2020
=========
Work:
Same as previously + with 'kernel12_mtp' the MTP works!
Bluetooth partially works (to switch on BT requires a reboot or issue a command manually, it is still WIP)
Do not work:
Same as previously
25.02.2020
=========
Work:
Same as previously + with 'kernel07_flatpak' the Low Power Mode (AKA "sneak peek" or "ambient display") works! (install instruction is in this post)
Do not work:
Same as previously
23.02.2020
=========
Work:
Same as previously + but from now on you don't need PC and heimdall to flash kernel and twrp
Do not work:
Same as previously
19.02.2020
=========
Work:
The same as listed earlier + with the new kernel (kernel06) I attached you can boot into TWRP with the usual button combination (hold buttons: Power on + Home + Volume up)
Do not work:
Same as previously except the TWRP/Sailfish OS boot which has fixed.
08.02.2020
=========
Work:
Screen
Touch
IMEI number is detected
Sensors (GPS, Rotation, Acceleration, Gyroscope, Magnetometer, Light & Proximity)
Wifi
Calls incoming/outgoing
Messages incoming/outgoing
External SD card detected and mounted to /run/media/nemo/_sdcard_name_
(where _sdcard_name_ is the name of the sd card when it was formatted like 7C97-785B)
Internal SD card is mounted to /android
Pixel ratio and icons set to 1.00 (can be changed, I set 0.82 which is more appropriate for the device's screen resolution see the download section)
Audio is routed to headphone if that presents
Camera front/rear (only for taking pictures)
Jolla store
findutils is installed by default (updatedb and locate commands work out of the box)
Torch
Do not work:
Mobile data
Bluetooth (the bt driver is in the kernel, so in theory, with some config file changes on the device it can work)
MTP
Video recording (It doesn't really work in other devices with CM12.1 base.)
Screen delay in refresh (related to how vsync is handled in v10 backend in qt5-qpa-hwcomposer-plugin)
the charging icon doesn't work properly: when the device is not on charger still shows it's charging (when I unplug the cable the message appears: "Charging..."
cannot boot into TWRP recovery (See Notes above)
Battery life:
In my experience the battery life is good. On standby, it can survive 10 days. (Almost 11.) I have checked once or twice daily during this period.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Pictures:
App drawer
Top menu
Settings
About product
In case somebody missed these I would like to highlight some improvements since day 1:
Now both the kernel and twrp can be flashed as an .img from twrp (no need for PC and heimdall anymore)
Plus I uploaded a kernel with Flatpak support
With kernel07_flatpak, I have installed Flatpak and Angelfish but got an error when started Angelfish.
It looks like this is a limitation of the old kernel, but there might be a workaround.
I'll keep you posted.
With kernel12_mtp, MTP works. (and bluetooth partially)
The soft keys each side of the home button are used as notification leds. As this device doesn't have leds, the softkeys can be re-used as "leds". They do blink if the device is fully charged or there is an unread incoming text message. When the device is on charger they are on, otherwise both of them are off.
Can you post your sources? I'm interested in getting an I9100 as my new phone, and was considering a port and I'm happy to see you've already done all the leg work and then some!
Also about the kernel on this phone, I've been trying to port to a tablet with weird kernel images, can you run "file (path to android base kernel image)" - if it says ForPro FPT or similar I will be very very interested in how you got this phone to boot into rootfs. Very interested in the progress you've made though :3 Thanks for the awesome rom!
Galaxyninja66 said:
Can you post your sources? I'm interested in getting an I9100 as my new phone, and was considering a port and I'm happy to see you've already done all the leg work and then some!
Also about the kernel on this phone, I've been trying to port to a tablet with weird kernel images, can you run "file (path to android base kernel image)" - if it says ForPro FPT or similar I will be very very interested in how you got this phone to boot into rootfs. Very interested in the progress you've made though :3 Thanks for the awesome rom!
Click to expand...
Click to collapse
Sorry for delay in my reply.
The necessary repos in github are:
local manifest
dhd (in here the dhd submodule has to be refreshed from mer-hybris repo upgrade-3.2.1 branch)
droid-hal-i9100
droid-hal-version-i9100
android_device
kernel
The file (path to android base kernel image) command gives me: "Linux kernel ARM boot executable zImage (little-endian)"
A new image has been generated and can be downloaded. This one includes the patch of reusing the two softkeys (each side of the home button) and they do work as a notification leds!
Currently I am working on the mobile data and bluetooth (this latter partially works but is not reliable yet).
You're a g! I just bought an i9100M (different radio ).
I do recall ofono being unfriendly towards older RIL versions, galaxy nexus afaik is unfixable in 2.0+. However, if you have any service that is exciting! I can't wait to setup my environment and play around with this! If i9100M has a different partition layout/mount points (you know how samsung is) I will blow my brains out. How is camera working? Does this image include gstreamer/droidmedia?
You've probably got this sorted way better than I could hope to sort it! I'm shocked this doesn't have more replies.
EDIT: I noticed you have a complex patch for the pixel ratio. Have you tried just setting it in your patterns?
Galaxyninja66 said:
You're a g! I just bought an i9100M (different radio ).
I do recall ofono being unfriendly towards older RIL versions, galaxy nexus afaik is unfixable in 2.0+. However, if you have any service that is exciting! I can't wait to setup my environment and play around with this! If i9100M has a different partition layout/mount points (you know how samsung is) I will blow my brains out. How is camera working? Does this image include gstreamer/droidmedia?
You've probably got this sorted way better than I could hope to sort it! I'm shocked this doesn't have more replies.
EDIT: I noticed you have a complex patch for the pixel ratio. Have you tried just setting it in your patterns?
Click to expand...
Click to collapse
I am not sure what you d understand under 'any service' but except the mobile data, everything else works fine (calls in/out, texts in/out).
I don't know the difference between the i9100 and i9100m but on the internet you probably can find something about it.
One suggestion, before you start porting, install an android onto and boot into that and note the mounting points. This can save a little time when you need to set the fixup_mountpoints in hybris-boot.
The camera works but only for pictures. The video recording doesn't work. I think this is down to the cm12.1 base what I used for my port. I think gstreamer/droidmedia are there but am not sure.
I think the reason why this doesn't get more hype because this is a very old device and except some old fashioned folks like us, not many are using anymore. I don't mind it because this is my hobby. I am going through a to-do list until all I wanted works.
Currently, as the new version 3.3.0.14 is out) I am working on to update my port to 3.3.0.14. Unfortunately currently there is no OTA but hope eventually it will be sorted.
Changing the pixel ratio is not essential as the default 1.0 is ok-ish. I have found the 0.82 better so I included the icons into my image. As the script (kimmoli-diyicons.sh) is also included, we just need to run one command as root. I may try to set the 0.82 out of the box but currently it is not my to priority. As I will need to re-build everything for 3.3.0.14, I will try to set 0.82 in the pattern file.
Please keep me posted with your progress.
edp17 said:
The camera works but only for pictures. The video recording doesn't work. I think this is down to the cm12.1 base what I used for my port. I think gstreamer/droidmedia are there but am not sure.
Click to expand...
Click to collapse
You'd 100% know if you built gstreamer, it's specified in the middleware section iirc and you have to uncomment it from your patterns. I hope it's easier to build nowadays. Also I noticed your port wasn't on the mer-wiki, if I remember my login is it okay if I add it :3 ?
EDIT: https://wiki.merproject.org/wiki/Adaptations/libhybris#Samsung - I added it to the bottom. creditted you in the edit note. you can create an account on the mer bug wiki and use it to edit the tables. I'll also be closely following this and editting it to match your progress. Tell me if you'd like any values changed!
Galaxyninja66 said:
You'd 100% know if you built gstreamer, it's specified in the middleware section iirc and you have to uncomment it from your patterns. I hope it's easier to build nowadays. Also I noticed your port wasn't on the mer-wiki, if I remember my login is it okay if I add it :3 ?
EDIT: https://wiki.merproject.org/wiki/Adaptations/libhybris#Samsung - I added it to the bottom. creditted you in the edit note. you can create an account on the mer bug wiki and use it to edit the tables. I'll also be closely following this and editting it to match your progress. Tell me if you'd like any values changed!
Click to expand...
Click to collapse
I remember that I built gstreamer and un-commented the related stuff in the pattern file. I don't know whether easier to build now because I don't know how difficult it was before. I only can compare this project against my hammerhead one a few months earlier. For the hammerhead I needed to build the image with MIC, now the rpm/dhd/helpers/build_packages.sh command does everything for you. (For this you need to export the RELEASE, EXTRA_NAME values in your .hadk.env)
Unfortunately I still don't have OBS account so I couldn't add this device into the wiki. Thank you for doing that! Unfortunately new account creation on the mer bug wiki is restricted at the moment.
I have checked the wiki you have added and if you don't mind I would like you to amend a few things:
LED works (the two softkeys have repurposed as notification leds)
GPS works
Sensors Gyro and Magnetometer both work
(I need to double check the RTC alarm and USB net.)
I updated the page. I was going to set up my build env but seeing your row in the adaptations page made me realise you're so far along, and there isn't anything I could really do to push things forward by much. Once you get data and camera working this is pretty much one of 2 daily driver stable samsung sfos ports. Congrats :3 !
Galaxyninja66 said:
I updated the page. I was going to set up my build env but seeing your row in the adaptations page made me realise you're so far along, and there isn't anything I could really do to push things forward by much. Once you get data and camera working this is pretty much one of 2 daily driver stable samsung sfos ports. Congrats :3 !
Click to expand...
Click to collapse
Thank you for the update and for the congrats but I think it is only partially my merits. I probably couldn't done this without the help of sailfishos-porter guys.
As I mentioned in the main comment, I am using my S2 with this image on it as a secondary phone already. Mobile data is not crucial as my main phone can be a hotspot and with my S2 I can connect to it via wifi. Of course this doesn't stop me trying to make that work. (The BT was almost done but I then broke something.)
The camera is a different story. Afaik the video recording generally is broken in the CM12.1 base that I chosen for this device. (That doesn't work on my hammerhead which is also using CM12.1 base.) So I think that will remain outstanding unless I try to port with a different android base.
I think will stop with this for while because the new version (3.3) is out soon and would like to upgrade to it first, then continue working on the missing bits.
Video recording works in the latest scm12.1 snapshot (YOG7D). I wish they hadn't tanked the old etherpad faq, I swear I saw something about hybris 12.1 specific video recording stuff.
If I can find another sub 20 USD i9100 I am definitely working on this, but since my i9100m is my daily driver and dualbooting isn't as easy as with other devices (espescially since YOG7D doesn't have isorec committed ). Thanks for getting so much done though, You have no idea how much it means to me that Sailfish OS is available for our device, and so stable too! :laugh:
Galaxyninja66 said:
Video recording works in the latest scm12.1 snapshot (YOG7D). I wish they hadn't tanked the old etherpad faq, I swear I saw something about hybris 12.1 specific video recording stuff.
If I can find another sub 20 USD i9100 I am definitely working on this, but since my i9100m is my daily driver and dualbooting isn't as easy as with other devices (espescially since YOG7D doesn't have isorec committed ). Thanks for getting so much done though, You have no idea how much it means to me that Sailfish OS is available for our device, and so stable too! :laugh:
Click to expand...
Click to collapse
I think the video recording also works in cm12.1 on the android side, but the problem is a, between the android and Sailfish or b, on the Sailfish side. I am not sure but when I tried to fix it on the hammerhead (same cm12.1 base) I was told the recording was broken in general with cm12.1 base. I'll see how it works (what I can do about it) after Sailfish 3.3 is out.
Have you thought about to purchase a cheap android phone to use as daily driver and using the i9100m for your Sailfish project? (You probably can get a decent second hand android phone for sub 20 maybe with better spec than the i900.)
Thanks again for the kind words. This phone (the S2) is my favorite old friend. It is indestructible . I have soft bricked so many times and managed to install many other OS but as couldn't find Sailfish OS, so I though worth a try to port. And with support of the Sailfishos-porters guys, my dream became real :good: .
Sailfish
Wow, great. I installed and the system works! Bluetooth does not work after installing the packages, but bluetooth-rfkill-event- * are not installed (error). There are few programs in the system, however. Especially browsers, the standard one hangs up (maybe there is a third-party?). Slightly slows down, but bearable.
By the way, are you not working with @linusdan? It also seems to be working on the port github com /sailfish-i9100 (link)
Sorry no link rights.
P/s By the way, I saw on the postmarket wiki site for i9100 about working kernels for our device. Available: kernel version 4.2 or mainline kernel
S2UserRU said:
Wow, great. I installed and the system works! Bluetooth does not work after installing the packages, but bluetooth-rfkill-event- * are not installed (error). There are few programs in the system, however. Especially browsers, the standard one hangs up (maybe there is a third-party?). Slightly slows down, but bearable.
By the way, are you not working with @linusdan? It also seems to be working on the port github com /sailfish-i9100 (link)
Sorry no link rights.
P/s By the way, I saw on the postmarket wiki site for i9100 about working kernels for our device. Available: kernel version 4.2 or mainline kernel
Click to expand...
Click to collapse
I am glad you managed to install it. Have you tried to re-partition the internal memory as I advised?
Yeah, the bt and mobile data is still WIP status. Hopefully will have some time to complete them soon.
For the browser, the native one doesn't hang for me. You can try to look for and install one from the openrepos. (I suggest to install the Storeman as you will find more useful apps for Sailfish OS.)
I don't know linusdan but have seen he has checked this post already. Hope he also found it useful.
I am aware of the postmarketos for the S2 and tested it on my S2. At that time (about a year ago) there was no mainline linux kernel option for the S2. Unfortunately the mainline kernel doesn't help with Sailfish because the Samsung proprietary blobs are missing from there. This means Sailfish wouldn't work. It needs the drivers from the Android layer.
S2UserRU said:
Wow, great. I installed and the system works! Bluetooth does not work after installing the packages, but bluetooth-rfkill-event- * are not installed (error). There are few programs in the system, however. Especially browsers, the standard one hangs up (maybe there is a third-party?). Slightly slows down, but bearable.
By the way, are you not working with @linusdan? It also seems to be working on the port github com /sailfish-i9100 (link)
Sorry no link rights.
P/s By the way, I saw on the postmarket wiki site for i9100 about working kernels for our device. Available: kernel version 4.2 or mainline kernel
Click to expand...
Click to collapse
I forgot to mention that there should be a folder '/edp17packages/bluetooth' where you can find the missing packages for the bt. Once you installed it, probably only need to tweak some config files and need to create some scripts. I currently started working on it.

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

This thread is for sharing your experiences with Project Treble GSI images on the Lenovo Smart Tabs M10 (TB-X605F/L) & P10 (TB-X705F/L). I'll update this post as more things are discovered.
You can load Android 10 and 11 GSI ROMs on top of Lenovo's stock Pie ROMs.
You can also load Android 10 and 11 GSI ROMs on top of Lenovo's stock Oreo ROMs. There are some graphics glitches when you use the stock Oreo ROMs.
WARNING 1: this procedure will wipe your whole device (including data). So do a backup first.
WARNING 2: this is experimental. If you don't know what you're doing, then you could brick your device. The risk is all yours.
Loading over stock Pie
unlock the bootloader (if not already unlocked)
download Disable_Dm-Verity_ForceEncrypt.zip (created by @Zackptg5). If you want your data partition encrypted, then rename the zip file to Disable_Dm-Verity_enfec.zip. We'll use this to disable dm-verity on boot.
download modify_phh_gsi.sh to your SDcard or OTG device. I wrote this script to by-pass phhusson's read-write mount of /system during boot, which freezes our tablets. The script also runs resize2fs to make the /system filesystem take up the whole /system partition. Don't forget to make this script executable with chmod.
copy those files to your SDCard or OTG device:
Code:
adb push modify_phh_gsi.sh /external_sd/
adb shell chmod a+x /external_sd/modify_phh_gsi.sh
adb push Disable_Dm-Verity_ForceEncrypt.zip /external_sd/
[B]only if you want an encrypted data partition[/B]: adb shell mv /external_sd/Disable_Dm-Verity_ForceEncrypt.zip /external_sd/Disable_Dm-Verity_enfec.zip
load the stock Pie ROM using LMSA rescue mode or QComDLoader
boot the device into fastboot (Power+VolDown)
flash the GSI image: fastboot flash system your_gsi.img (you can install the GSI image in twrp, if you prefer)
flash TWRP (for Pie): fastboot flash recovery pie_twrp.img
boot into twrp (pwr+VolUp+VolDown)
format Data partition
install Disable_Dm-Verity_enfec.zip or Disable_Dm-Verity_ForceEncrypt.zip
run modify_phh_gsi.sh and boot the GSI:
Code:
adb shell /external_sd/modify_phh_gsi.sh
adb reboot
(optional) if your GSI doesn't include Google Apps, then download and install a gapps zip (ARM64) in TWRP. I use "pico", but choose the one that suits you. Do this after running modify_phh_gsi.sh - to avoid running out of space.
reboot to system
Loading over stock Oreo
unlock the bootloader (if not already unlocked)
download and unzip the stock Oreo ROM
load the stock Oreo ROM using QComDLoader, and your device in EDL mode. When it's finished, do not boot into the system. QComDLoader configuration settings:
Code:
Download Mode: Upgrade
Chipset: 8953
eMMC Programmer: prog_emmc_firehose_8953_ddr.mbn
Raw program: rawprogram_unsparse_upgrade.xml
patch0: patch0.xml
boot the device into fastboot (Power+VolDown)
flash the GSI image: fastboot flash system your_gsi.img (you can install the GSI image in twrp, if you prefer)
flash TWRP (for Oreo): fastboot flash recovery oreo_twrp.img
boot into twrp (pwr+VolUp+VolDown)
(optional) if your GSI doesn't include Google Apps, then download and install a gapps zip (ARM64) in TWRP. I use "pico", but choose the one that suits you. OpenGApps isn't officially available for Android 11 yet.
(optional) to get the right pixel density, add "ro.sf.lcd_density=240" to vendor/build.prop. I wrote gsi4tablet.sh to do this for you. Run it in twrp adb shell. Make sure the script is executable (using chmod).
reboot to system
Here are some links to Lenovo's stock Oreo ROMs:
TB-X605F: TB-X605F_USER_S000022_20181026_Q00020_ROW_Bundle
TB-X605L: TB-X605L_USER_S000020_20180921_Q00020_ROW
TB-X705F: TB-X705F_USER_S000017_20180831_Q00020_ROW
TB-X705L: TB-X705L_USER_S000023_20180921_Q00020_ROW
Choosing a GSI image
@phhusson keeps a full list of Project Treble GSI images.
Our devices are all ARM64 A-only. This means that you should only get ARM64 and A-only GSI images. Anything else will not work.
If there is an ARM64 A-only "vndklite" GSI, you can use that.
But do not use AB (or AB vndklite) GSIs, because this tablet is non-System-As-Root (nonSAR).
Note for A11: there is no A-only GSI with vndklite. So just use the A-only GSI.
"This device is not Certified by Google"
If you get this message when you boot the GSI, use ADB and follow instructions under "How to bypass certified device after first boot?".
If you can't find sqlite3 in adb, then install the Device ID app from this XDA article to get the GSF number on your tablet.
"Insufficient storage space available in System partition"
If you get this error message when trying to install GApps, read this post.
What about Android 12 ?
There are no non-SAR A12 GSIs for these tablets, because of the vndk-lite implementation.
If you want to try Android 12, visit this thread about converting the tablet to system-as-root (SAR). It is also experimental.
How do I repartition my tablet?
You might want to do this to increase the size of the system partition. Google it, if you like. But there are no instructions on this thread. No one wants to support noobs who trash their partition tables.
Where do I find... ?
QComDLoader is downloaded during an LMSA rescue. You'll find it in C:\ProgramData\LMSA\Download\ToolFiles\QcomDLoader_1.3.2\QcomDLoader_1.3.2. Alternatively, @Chaser42 has a link and some instructions at the bottom of the first post in this thread.
EDL mode: the easiest ways to enter EDL mode are: adb reboot edl or in TWRP: Reboot->EDL Mode. Alternatively, from a powered-off device: insert USB cable while holding VolUp
TWRP for Oreo for TB-X605F/L.
TWRP for Oreo for TB-X705F/L.
Magisk (for phhusson-based GSI ROMs) lives here.
GApps lives here.
Disable_Dm-Verity lives here.
Last modified: 2 September 2022 (add note about A11 and vndklite)
Since you mentioned me, I've taken a brief look - can you boot ARM64 AB on Pie? On many devices, updating to Pie changes the arch to AB. Note that "A/AB" in GSI is not the same thing as physical partition layout.
AndyYan said:
Since you mentioned me, I've taken a brief look - can you boot ARM64 AB on Pie? On many devices, updating to Pie changes the arch to AB. Note that "A/AB" in GSI is not the same thing as physical partition layout.
Click to expand...
Click to collapse
On stock Pie, Hackintosh5's app reports it's an A-only device supported by VNDK 28 Lite. System properties confirm that.
I just tried to load an AB GSI ROM over Pie. The device boots to qcom diagnostic 900E mode.
So looks like it's definitely A-only on stock Pie. There's just something unusual about the treble implementation on stock Pie.
Loading an A-only GSI over stock Pie just hangs on reboot. It never gets to the boot animation. I've unsuccessfully tried different combinations of permissiver, disable_dm-verity and magisk. No luck.
(There is no vbmeta partition, by the way.)
But thanks for the suggestion about trying AB. It was worth a try.
Yahoo Mike said:
I have successfully loaded @phhusson 's AOSP 10.0 ("Quack") and @AndyYan 's LineageOS 17.x on my TB-X605F.
Click to expand...
Click to collapse
Hi Yahoo Mike,
is the LOS 17 fully functionnal on TB-X605F?
Thanks
Success and Failure
I went through the process above and this worked great. I do have one small problem......
Twrp loads with a black screen and is unusable from the tablet screen in recovery mode. Fortunately this isn't a big deal if you use adb from your pc to control twrp.
2. FLASHING GAPPS
Put the tablet into recovery from adb or through hardbuttons.
open cmd:
adb shell
twrp wipe cache
twrp wipe dalvik
twrp sideload
adb sideload <location_of_your_GApps.zip>, e.g. adb sideload C:\GApps.zip
kmh5147 said:
I went through the process above and this worked great. I do have one big problem and another not so big.
The not so big problem; twrp loads with a black screen and is unusable from the tablet screen in recovery mode. Fortunately this isn't a big deal if you use adb from your pc to control twrp.
The big problem; after loading linos 17 and also ASOP 10, I am unable to run the gapp suite. After installing the gapp suite using twrp on linos 17, linos almost becomes unusable. After installing ASOP with the integrated Gapps, it's also almost not usable upon startup. The problem is with certification of the device, I get millions of messages upon startup after installing the gapp suite or installing a rom with the gapp suite. The message effectively is "This device is not Certified by google"
Click to expand...
Click to collapse
TWRP for Oreo (8.1)
Here's a version of TWRP for Oreo (8.1) for TB-X605F/L. It doesn't mount the data partition, but everything else works. I'll try to fix the data partition next week.
Does anyone have a TWRP for Oreo for TB-X705F/L ?
This device is not Certified by Google
This seems to be a common problem with GSI images.
Use ADB and follow instructions under "How to bypass certified device after first boot?".
Note that the GSF can change whenever you do a factory reset. If it changes, you need to register the new GSF.
Monpseud0 said:
Hi Yahoo Mike,
is the LOS 17 fully functionnal on TB-X605F?
Thanks
Click to expand...
Click to collapse
I don't know if LOS is "fully" functional. I loaded it, but didn't thoroughly test it. Wifi worked.
I've been using Quack and it's stable. Wifi, camera, bluetooth, audio all work. NovaLauncher works fine. Some graphics flicker until they load. I haven't found the right settings under "Phh Treble Settings" to stop that.
kmh5147 said:
I went through the process above and this worked great. I do have one small problem......
Twrp loads with a black screen and is unusable from the tablet screen in recovery mode. Fortunately this isn't a big deal if you use adb from your pc to control twrp.
2. FLASHING GAPPS
Put the tablet into recovery from adb or through hardbuttons.
open cmd:
adb shell
twrp wipe cache
twrp wipe dalvik
twrp sideload
adb sideload <location_of_your_GApps.zip>, e.g. adb sideload C:\GApps.zip
Click to expand...
Click to collapse
I would recommend going with lineage os based on my testing so far. Some apps are a little buggy with flickering, and random minor issues hear and there. I'm thinking we need an updated bootloader, is a newer bootloader available???
Lineage OS 17
I just wanted to give an update with lineage 17, I was able to get passed the issues with the gapps by registering the google services id through their webpage.
Everything thing seems to work very well...... wifi, audio, and both front and rear camera work perfectly. The only problem I am still dealing with is flickering in overlay situations, and nothing I've tried from a developer settings perspective fixes the issue. If the flickering can be fixed, I think we'll have a really good option here.
One other thing I wish I could get working in this lineage OS is the google assistant ambient mode. I can't get the option to show up in the assistant settings. Have ambient mode on this tablet would be perfect with the original alex cradle.
kmh5147 said:
I'm thinking we need an updated bootloader, is a newer bootloader available???
Click to expand...
Click to collapse
I think we're stuck with this bootloader until we can work out how to load GSI over stock Pie.
kmh5147 said:
The only problem I am still dealing with is flickering in overlay situations, and nothing I've tried from a developer settings perspective fixes the issue. If the flickering can be fixed, I think we'll have a really good option here.
Click to expand...
Click to collapse
I'll have a look at the overlays on the weekend. Maybe that will fix our problems.
Which device do you have? They might all need slightly different overlays.
I tried HavocOS (2020-07-09) with GApps. It booted and was pretty smooth, but I couldn't enable root or adb. Might need to wait for the next release.
It also insisted on face unlock, which was annoying.
Here's a guide on how to fix the "Insufficient storage space available in System partition" when you try to install GApps.
solution
In TWRP:
press "Mount"
untick "Mount system partition read-only", then tick "System".
go back to main menu and select "Wipe". Don't panic. We're not going to delete any files from the system.
select "Advanced Wipe"
tick "System" and select "Repair or Change File System"
select "Resize File System". If that button is not there, then you mounted the system partition as read-only. Go back and untick that.
confirm that TWRP is asking "Resize System?" and then swipe to resize
now you can go back to main menu and install GApps
why does this happen?
The system partition is roughly 3GB in these devices. However, after flashing a GSI image, the filesystem size can be considerably less.
For example:
Code:
X605F:/ # df -H
Filesystem Size Used Avail Use% Mounted on
rootfs 1.3G 26M 1.3G 2% /
tmpfs 1.4G 188k 1.4G 1% /dev
tmpfs 1.4G 25k 1.4G 1% /tmp
/dev/block/mmcblk0p26 260M 172k 260M 1% /cache
/dev/block/mmcblk0p52 25G 46M 25G 1% /data
/dev/block/mmcblk1p1 128G 24G 104G 19% /external_sd
/dev/block/mmcblk0p24 1.9G 1.8G 60M 97% /system
X605F:/ # blockdev --getsize64 /dev/block/mmcblk0p24
3221225472
In this example, the partition size of /system is about 3.2GB (3221225472), but the filesystem size is 1.9GB with only 60M free. Because there's only 60M free, GApps fails with the message "Insufficient storage space available in System partition".
The solution is to resize the filesystem to include the unused 1.3GB on the partition. That's what TWRP does in the solution above.
Here's our example filesystem after following the steps above:
Code:
X605F:/ # df -H
Filesystem Size Used Avail Use% Mounted on
rootfs 1.3G 26M 1.3G 2% /
tmpfs 1.4G 188k 1.4G 1% /dev
tmpfs 1.4G 45k 1.4G 1% /tmp
/dev/block/mmcblk0p52 25G 46M 25G 1% /data
/dev/block/mmcblk1p1 128G 24G 104G 19% /external_sd
/dev/block/mmcblk0p24 3.2G 1.8G 1.3G 59% /system
There's now 1.3GB free on the filesystem because it's been resized to fill up the whole partition. TWRP saves the day (again) ... and GApps is happy!
Yahoo Mike said:
I think we're stuck with this bootloader until we can work out how to load GSI over stock Pie.
I'll have a look at the overlays on the weekend. Maybe that will fix our problems.
Which device do you have? They might all need slightly different overlays.
Click to expand...
Click to collapse
Hi Mike, I have the TB-X605F and its hardware version is 60.
Thank you for all of the effort in making this thing work!
I was also able to install AOSP 10.0 Quack on my TB-X705F using your guide. Thanks so much! Didn't install TWRP yet as I don't know if it supports Oreo. With regard to that, i'm assuming it refers to the vendor rather than the rom we're running, correct?
I did encounter a little bit of flickering for some graphics. It's very intermittent. Seems like it affects dark grays more than anything. Most everything works fine. Will try some others and report back.
Yahoo Mike said:
I tried HavocOS (2020-07-09) with GApps. It booted and was pretty smooth, but I couldn't enable root or adb. Might need to wait for the next release.
It also insisted on face unlock, which was annoying.
Click to expand...
Click to collapse
What 'smallest width' are you putting in the developer option. The standard DPI settings are for a phone i'm assuming because everything is huge lol. So far I feel like 600 & 790 are good settings depending on how large you want things.
---------- Post added at 07:29 PM ---------- Previous post was at 06:59 PM ----------
Running the July Build of Descendant X and so far its pretty awesome. I've noticed that the flickering seems to be limited to Google Applications. For instance if you scroll through the Play Store.
Mr. Jedge said:
...Didn't install TWRP yet as I don't know if it supports Oreo. With regard to that, i'm assuming it refers to the vendor rather than the rom we're running, correct?
Click to expand...
Click to collapse
That's correct. TWRP needs to be compiled with a kernel from a stock Oreo boot.img.
The TWRP for Pie seems to be incompatible with the stock Oreo vendor/firmware/bootloader we have to load before flashing a GSI. TWRP is functional, but the screen is blank. That's fixed by compiling TWRP for 8.1 with the stock Oreo kernel.
But you might want to try the X705 TWRP (for Pie). You might get lucky and it works.
Yahoo Mike said:
I think we're stuck with this bootloader until we can work out how to load GSI over stock Pie.
I'll have a look at the overlays on the weekend. Maybe that will fix our problems.
Which device do you have? They might all need slightly different overlays.
Click to expand...
Click to collapse
Do you think the flickering is an overlay issue, or an issue with the vendor? I was going to try flashing a different Oreo build to check, but it looks like there are no full images other than the original; only OTAs.
Mr. Jedge said:
Do you think the flickering is an overlay issue, or an issue with the vendor?
Click to expand...
Click to collapse
I built and installed a vendor overlay, but it didn't fix the flickering. I'm not really sure it did anything.
I started playing with the "smallest width" parameter you found. On stock Oreo it's set to 800dp. When I used 800dp on the GSI, most (but not all) of the flickering stopped. At 600dp, the flickering started again.
The "smallest width" also seems to affect calculations for the keyboard display. For some dp settings, the input dialog box is not drawn. It's there, but it's just not rendered. You can test it with the "smallest width" option. When you change the dp, just tap the option again. With some dp settings (like 700dp), the input text box is "invisible". You can use the keyboard to change the dp, but your input is not displayed while you are typing. Set it back to 800dp, tap on the option again and the input box is there.
While 800dp stops most of the flickering in PlayStore, the drawer (swipe from the left) writes over the whole screen.
843dp fixes the drawer problem, but does weird things to the soft buttons (back/home/recent).
840dp fixes soft buttons but the drawer problem returns.
And to make it even more complicated, portrait mode seems to prefer different dps. 721dp worked ok in portrait, but not in landscape.
It's going to be a matter of finding the sweet spot. Or perhaps there's a second setting that also needs to be changed at the same time ???
Anyway, give it a try.
New discovery. I downloaded a DPI changer to use instead if the smallest width option. Changing the DPI didn't yeild any difference in reference to flickering, but changing the resolution did. Default resolution is 1200 x 1920 which matches Lenovos specs. However I lowered it to 1180 x 1900 and the flickering has gone away completely....at least in the play store. Haven't noticed it anywhere else. The drawer blanks out the rest of the store however which is weird but acceptable. I'll keep playing around, but it's time to go-to bed.
Mr. Jedge said:
New discovery. I downloaded a DPI changer to use instead if the smallest width option. Changing the DPI didn't yeild any difference in reference to flickering, but changing the resolution did. Default resolution is 1200 x 1920 which matches Lenovos specs. However I lowered it to 1180 x 1900 and the flickering has gone away completely....at least in the play store. Haven't noticed it anywhere else. The drawer blanks out the rest of the store however which is weird but acceptable. I'll keep playing around, but it's time to go-to bed.
Click to expand...
Click to collapse
Interesting.
Only thing I can add is that if you add the following to /vendor/build.prop you don't get that big font during configuration when you install a GSI.
Code:
ro.sf.lcd_density=240
In stock that is set in /system/build.prop.
Most of the GSI images assume lcd_density of 480 (xxhdpi) for mobiles, but our tablets are 240 (hdpi).

OPEN BETA for 17.1 UNOFFICIAL LineageOS T550 rom

BEFORE YOU decide to try this rom, please read all of post 1 and 2.
The UNOFFICIAL LineageOS 17.1 T550 ROM
BACKUP YOUR DATA AND OLD ROM BEFORE trying my rom.
Let me be clear, I have the SM-P550, NOT the SM-T550.
So I built a SM-P550 rom which is almost the same as the SM-T550 except the "P" stands for Pen.
I believe my P550 rom with minor modifications will work on the T550, but I have no T550 to test it on. I believe it will work because I have used virsys T550 rom on my P550 and it works, but the X-axis touch is inverted.
So I built SM-P550 with code to fix the X-axis touch inverted problem and it's one of line code. If I leave that one line of code out, then the X-axis will be correct for the T550. I have tested my 17.1 T550 rom on my P550 and it works, but again with the X-axis inverted. Just remember I don't have a T550 to test it on so you may run into bootloops, stuck at boot animation, etc.
If you are NOT an expert in using fastboot, adb, odin, heimdall, twrp, DO NOT attempt this ROM. You must know how to use these tools to revert back to your old rom. I'm not a Windows user so do not expect any help from me. My main OS is Lubuntu 20.04 LTS and all my roms are built on this platform.
If you are new to flashing custom roms, do NOT attempt this.
If you need your tablet for work and something important, do NOT flash this rom. This rom could result in a bricked device or boot loop or non booting device or you not being able to revert back to your old rom.
Again, the T550 rom that I built does boot and function on my P550, but I have no T550 to verify.
BACKUP YOUR DATA AND OLD ROM BEFORE trying my rom.
The rom has the latest monthly 2021 security patches.
What works
1. bluetooth
2. wifi
3. brightness
4. external audio
5. GPS
6. audio through headphone jack
7. camera
8. touchscreen X-axis works properly
9. Google play store - use pico apps
10. flip flap smart cover
11. audio over bluetooth
What doesn't work
1. LineageOS FM Radio app does not work. The P550 and T550 don't have the LTE chipset for it to work.
2. The stock Jelly browser crashes a lot. Use a different browser. There's lots of better options that are more stable and reliable than the built in Jelly browser.
3. Home screen text may look fuzzy.
Text on home screen looks funny/fuzzy. This only seems to affect the home screen and nowhere else. I have seen the same problem on the SM-T350, SM-T560NU, SM-P550 and Nexus 7 2013.
Problem is with stock trebuchet launcher and/or its fonts. I tried rootless pixel launcher from fdroid as a quick and simple test and see no problems with home screen text. Rootless pixel uses a different font though. A future LineageOS update could resolve the problem?
FAQ - I spent hundreds of hours building this rom. The least you can do is spend a few minutes reading everything before posting.
Q1) Why are you releasing a ROM for a tablet that you do not own?
A1) I don't own the SM-T550, but have the SM-P550. I also build roms for the SM-T350 and SM-T560NU. All these platforms use the same msm8916 code base. As such, all my work from the SM-T350, SM-T560NU and SM-P550 could possibly benefit SM-T550 users. For one P550 owner, there are probably twenty T550 owners.
Q2) What if my app, xyz, doesn't work?
A2) I won't answer questions regarding why your app doesn't work. If your app, whatever it is, doesn't work, then go back to your old rom. It's difficult enough building and maintaining these roms. Remember, I'm an unpaid volunteer making a rom for free for your benefit, not mine as I don't even have the T550.
Q3) Your rom is laggy and buggy.
A3) If you find the above, then go back to your old rom. There's only so much software can do on a 2015 budget level tablet. Remember a budget tablet will have the slower SoC/CPU and less DRAM than a top of the line model. Your tablet will also run slower when you use gapps (google apps). You can run a lot of software without using gapps. Research newpipe, microg, youtube vanced, aurora store etc.
Q4) What TWRP should I use?
A4) Use 3.4.0.0. Get it at
Download TWRP for gt510wifi
Download TWRP Open Recovery for gt510wifi
dl.twrp.me
Q5) Why should I use this rom?
A5) You don't. I only offer it because I have built the SM-P550 and it was an easy change to make a SM-T550 rom. If you don't like this rom, then don't use it. Yes, it's that simple.
Q6) Can you build SM-T555 (LTE) or a crDroid version of the SM-T550?
A6) No. All the source code is open source and my changes are in the repo diff file. You can use these two with the roomservice.xml to build your own rom.
Q7) Will you offer monthly updates with security patches?
A7) That all depends on if I continue to have high speed Internet and on the reaction of the posts in this thread. If people are going to complain, then I have NO incentive to make an update. Remember, I don't have the T550 so I get zero benefit from making this rom for myself.
Q8) Can you help me? I'm a newbie. Can you provide step by step instructions?
A8) There are lots of tutorials, videos, etc on how to flash roms. Do your own research.
Q9) Can I report a bug with respect to the rom?
A9) Yes, but you need to supply a) how to recreate it b) a logcat c) a github commit showing how it was fixed. Even then, if I don't have the means to recreate it, I won't be working on it.
Q10) Can I build this rom? Where are the source and kernel source files?
A10) Yes. The kernel source files are at
Samsung MSM8916 Devices
Samsung MSM8916 Devices has 68 repositories available. Follow their code on GitHub.
github.com
aala27 - Repositories
aala27 has 7 repositories available. Follow their code on GitHub.
github.com
Q11) Okay, I understand the consequences and that this is beta rom and willing to take the risks outlined, now where can I find the rom?
A11) Downloads are at
retiredtab - Browse /SM-T550/17.1 at SourceForge.net
sourceforge.net
Hi rretiredtab
I have a T550 with the latest virsys image 16.0 from March 2020.
It is more or less stable, but I think, it will be always slowlier. Empty dalvic and cache does not help.
I'm ready for a new challenge. If I can help you, please let me know.
Best regards
Schaagi
Hi retiredtab,
I ready to try this rom
Schaagi said:
I have a T550 with the latest virsys image 16.0 from March 2020. It is more or less stable, but I think, it will be always slowlier. Empty dalvic and cache does not help.
Click to expand...
Click to collapse
My 16.0 rom for the SM-P550 is based on virsys repos. However, I was only able to make 2 builds using his repos before a LineageOS update in Sept 2020 caused it to get stuck at the boot animation.
Then I tried virsys 17.1 repo and it too gets stuck at the boot animation. I know virsys built crDroid Android 10 rom and uploaded it sometime June 2020, but his Android 10 repos on github are dated March 2020 so whatever patches he did to get crDroid working isn't on github.
I don't know if 17.1 will be faster than 16.0. The 17.1 builds, by default, use an overclocked CPU and GPU in the kernel code. However, I don't know if you will see any real world differences in performance from the overclocking.
In addition, I don't know if virsys March 16.0 March 2020 is overclocked or not. You can always download an utility like CPUinfo at
CPU Info | F-Droid - Free and Open Source Android App Repository
Information about device hardware and software
f-droid.org
to see if the CPU is running at 1.2Ghz or 1.6Ghz (overclocked).
@Schaagi and @Simone101, please let me know if the T550 ROM boots or not after you have installed it. I'm pretty sure it will, but would like to know ASAP.
Then, afterwards, you can let me know how it works over a 24 to 48 hour period. I'm interested to see if it randomly reboots or crashes.
As for speed and performance, just remember it's a 5 year old entry level tablet and unless LineageOS is written in assembler language, it will never match a top of the line model tablet.
Thank you.
I've installed your image as clean-install. It boots !!!
At the beginning of the setup process there is a bluetooth error, that repeats after every new boot.
First installation without opengapps -ok
Second one with opengapps - ok
Restore Data from previous image - ok
As next I will try to install magisk.
Wow, good job. I will check it for the next days and give feedback later.
Best regards
Schaagi
Schaagi said:
At the beginning of the setup process there is a bluetooth error, that repeats after every new boot.
Click to expand...
Click to collapse
Can you provide a screenshot of the error please?
I haven't seen the bluetooth error before on my SM-P550 and I reboot my SM-P550 a lot because I'm always flashing new builds.
I don't use bluetooth at all, but when I turn it on, I can see my neighbor's 65 inch TV. Also, I can pair two tablets together using bluetooth.
Meanwhile I have installed Magisk 21.1 and it works too
I've attached 2 screenshots from Bluetooth error.
Schaagi said:
I've attached 2 screenshots from Bluetooth error.
Click to expand...
Click to collapse
The above is why we need BETA testers.
Okay, I ran into the bluetooth error problem on the SM-T350 and it was due to a missing bluetooth library.
In my SM-T350, I have
Code:
# RT 17.1 copy bluetooth file otherwise bluetooth keeps crashing
PRODUCT_COPY_FILES += \
vendor/samsung/msm8916-common/proprietary/vendor/lib/libbtnv.so:$(TARGET_COPY_OUT_VENDOR)/lib/libbtnv.so
Those 3 lines of code are not in the T550 build. It's easy to add and I can create another BETA build. It's building right now and probably be done in the next 2 hours or so.
If you want to add the libbtnv.so file yourself, here are the instructions
1) Boot into TWRP 3.4.0.0.
2) Click Mount. Choose System.
3) On your computer, goto
proprietary_vendor_samsung/libbtnv.so at lineage-17.1 · Galaxy-MSM8916/proprietary_vendor_samsung
proprietary_vendor_samsung. Contribute to Galaxy-MSM8916/proprietary_vendor_samsung development by creating an account on GitHub.
github.com
4) Click download.
5) Goto the directory where the libbtnv.so is saved.
6) Plug in microusb cable to tablet.
7) Then use adb to push the file using the command
Code:
$ adb push libbtnv.so /system/vendor/lib/libbtnv.so
libbtnv.so: 1 file pushed, 0 skipped. 48.5 MB/s (16128 bytes in 0.000s)
8) Check to make sure file was pushed.
Code:
$ adb shell ls -al /system/vendor/lib/libbtnv.so
-rw-r--r-- 1 root root 16128 Dec 19 21:24 /system/vendor/lib/libbtnv.so
9) Reboot into system and bluetooth error should be gone.
OR
Just wait until my next build is done to get rid of the bluetooth errors. I'm confident the error is due to the missing bluetooth library file.
I will send you and Simone101 a PM when the new build is done.
The new BETA build is finished, but having problems uploading to host server right now. I will try again in a couple of hours to upload. I will PM when I get it uploaded.
I've installed the new image and bluetooth error has gone.But I'didn't test the functionality of bluetooth at the moment.
Will check more in detail and inform you about the results. Thank you.
Regards
Schaagi
@retiredtab
I want to test your ROM , where I can download it.
At the moment I use the cdroid 10 by virsys
My CPU runs at performance mode with 1600 MHz.
bierma32 said:
At the moment I use the cdroid 10 by virsys
Click to expand...
Click to collapse
Over at the T550 thread, it seems that some people who are using crDroid 10 are reporting
1) camera not working
2) brightness not working
3) browser crash (that's you)
#1 and #2 work on my build. As for #3, if you are using the built in Jelly browser, I have noticed that if you open more than 4 windows, it crashes sometimes.
While not perfect, I found that smartcookieweb app works better than Jelly.
Releases · CookieJarApps/SmartCookieWeb
A secure, open source web browser for Android. Contribute to CookieJarApps/SmartCookieWeb development by creating an account on GitHub.
github.com
The Brave browser seems to work the most reliable. You can use Aurora store to download it from play store or try downloading brave apk somewhere.
On a daily basis, I use smartcookieweb as it has built in adblocker and suits my daily browsing needs.
@retiredtab
Both cameras works on Cdroid for me.
Yes, browsers crashes after some times, I use opera mini.
Bluetooth works for, tested sending and recive images.
GPS is not working, will try it again next time.
Magisk 21 works.
WiFi works.
Hi retiredtab,
Nice to see that anybody has try to give us an update for this fossile
Please let me knoe where can I download and test your build.
regards,
L
bierma32 said:
GPS is not working
Click to expand...
Click to collapse
No need to retest GPS. I already know what's wrong. This is the same problem I had with the T350.
The T550 build is missing the commands
Code:
# GPS
PRODUCT_COPY_FILES += \
vendor/samsung/msm8916-common/proprietary/lib/libloc_api_v02.so:$(TARGET_COPY_OUT_VENDOR)/lib/libloc_api_v02.so \
vendor/samsung/msm8916-common/proprietary/lib/libloc_ds_api.so:$(TARGET_COPY_OUT_VENDOR)/lib/libloc_ds_api.so
Now I did test the T550 build on my P550, but it looks like when I made the final image, some of my scripts or commits didn't get copied, like the above, over when I initially changed some P550 naming/parameters to T550.
Some background. I had only 1 hard drive for the P550 and T550 code. I did test bluetooth and gps on my P550 and both work.
After I tested everything, I then later split the P550 onto one hard drive and the T550 to another so I wouldn't get confused when compiling and making changes. I suspect now that I forgot to copy over my T350 script to fix gps and bluetooth onto the new T550 drive.
To fix gps without having to re-download another 440MB file,
1) Boot into TWRP 3.4.0.0.
2) Click Mount. Choose System.
3) On your computer, goto
proprietary_vendor_samsung/libloc_ds_api.so at lineage-17.1 · Galaxy-MSM8916/proprietary_vendor_samsung
proprietary_vendor_samsung. Contribute to Galaxy-MSM8916/proprietary_vendor_samsung development by creating an account on GitHub.
github.com
and
proprietary_vendor_samsung/libloc_api_v02.so at lineage-17.1 · Galaxy-MSM8916/proprietary_vendor_samsung
proprietary_vendor_samsung. Contribute to Galaxy-MSM8916/proprietary_vendor_samsung development by creating an account on GitHub.
github.com
4) Download both files above (libloc_ds_api.so and libloc_api_v02.so).
5) Goto the directory where both are saved.
6) Plug in microusb cable to tablet.
7) Then use adb to push the file using the command
Code:
$adb push libloc_api_v02.so /system/vendor/lib/libloc_api_v02.so
libloc_api_v02.so: 1 file pushed, 0 skipped. 7.6 MB/s (116316 bytes in 0.015s)
$adb push libloc_ds_api.so /system/vendor/lib/libloc_ds_api.so
libloc_ds_api.so: 1 file pushed, 0 skipped. 29.5 MB/s (26132 bytes in 0.001s)
8) Check that both files exist.
$adb shell ls -al /system/vendor/lib/libloc_api_v02.so
-rw-r--r-- 1 root root 116316 Dec 7 2020 /system/vendor/lib/libloc_api_v02.so
$adb shell ls -al /system/vendor/lib/libloc_ds_api.so
-rw-r--r-- 1 root root 26132 Dec 7 2020 /system/vendor/lib/libloc_ds_api.so
9) Reboot into system and GPS should be work now.
I'm making a new BETA image again and before I upload it, I will retest everything again on my P550. It's a bit awkard as everything is mapped backwards on the X-axis.
I'll post here when it's up.
Well it was around 1AM in the morning when I saw the gps not working post and now it's 2:13AM. I'm just waiting for the last 5 minutes of my new build, but the host server is having major problems right now.
So I'm going to sleep and will try uploading the new image tomorrow after I retest everything with the P550 running the T550 image. Everything will be mapped backwards for me on the X-axis while testing.
Dec 21 BETA build up. Androidfilehost is having major problems so I put it up on sourceforge.net. No way I could go to sleep with this hanging over my head. It's 2:30AM. Now I'm going to sleep in tomorrow.
Dec 21 build has gps fix.
Ooh i want really like to test!

Pixel C Performance Modifications...

WARNING! I AM NOT RESPONSIBLE FOR ANYTHING DONE TO YOUR DEVICE. TRY AT YOUR OWN RISK!
Sup y’all!?! Just wanted to share these modifications. These are a collection of android mods that I have been using. Some are original and some are not. The attached ax562.zip contains files which need to be put in the corresponding directories with the corresponding permissions(Not recovery flashable!). I have also included FDEA.I magisk .zip module. This module is an Artificial Intelligence app. This is the first majisk module iteration of the .apk. Links to original works of some of these mods are listed below. Big shout out to followmsi, Feravolt, [email protected], the TWRP team and the LOS team!
PS. If anyone wants to help create a flashable .zip that would be great!
ALL THESE STEPS ASSUME YOUR ARE ON LINEAGE OS 18.1 AND USING MAGISK (They might work on other systems but I have not tested).
*
*
*
Steps:
1. Download and extract ax562.zip anywhere.
2. Copy /data and /system files to their proper locations and change permissions of all files to 755.
3. Copy contents of “build.prop” and put them at the end of /system/build.prop and save (might have to mount /system as rw).
4. In TWRP recovery, mount /vendor and replace /vendor/etc/mixer_paths_0.xml (I amplified the speaker output to 33, if too loud, adjust accordingly) with the mixer_paths_0.xml file provided.
5. Google “Chrome” users, in TWRP recovery, mount /vendor and rename /vendor/lib/libnvomx.so to “libnvomx.so.BAK”(This uses Google codecs instead of Nvidia codecs).
6. FDE.AI – I provided the majisk module in the ax562.zip for majisk users. Go into magisk and add the module manually. If you want to use only the .apk or want to dl the module directly, it’s available on Feravolt’s github page in releases (link below). I recommend "Performance mode", setting "Build Prop Tweaks: Nico's gpu tweaks" and finally executing "/aggressiveai on" in the "Elizabeth" AI Chat section. Lastly, I also recommend turning off "Battery Optimization" for the FDE.AI apk.
7. You can also update accordingly without needing to install a new "updated magisk module". The newest version is 12.6 which was released 10/26/21. I've tested this new version and it gives even more of a performance improvement. I did notice for about the first day of gaming it needs to machine learn but after it settles in, GREAT. There is a renamed function though, /aggressiveai does not exist anymore. Use "/advancedai on" to turn on this function. I also keep "Force Dozed Mode" active in the settings screen.
Release 12.6 · feravolt/FDE.AI-docs
Update changelog.md
github.com
8. Enjoy!
https://github.com/feravolt/FDE.AI-docs
https://forum.xda-developers.com/t/...-flashable-increase-your-performance.1353903/
If anyone has any questions, wants to add a script, or has found an error/improvement I'm all ears!
I will try this when the July 2021 build comes out!
EnginEAR said:
I will try this when the July 2021 build comes out!
Click to expand...
Click to collapse
Word.
Updated instructions. Enjoy!
Seems to be working well! It's always hard to say how much of a perceived improvement is the latest ROM improvements vs the tweaks but it very much feels snappier and more able to switch from app to app without long pauses.
I see the app could just run on the device without the content in the zip you provided, may I ask what's the differences about using the files provided? Sorry if it's a silly question, I'm too noob to understand the instructions :'(
thetample said:
I see the app could just run on the device without the content in the zip you provided, may I ask what's the differences about using the files provided? Sorry if it's a silly question, I'm too noob to understand the instructions :'(
Click to expand...
Click to collapse
2. Some of my custom scripts plus other scripts to improve performance.
3. More custom build.prop commands to improve performance
4. Improve the sound by amplifying the output through the mixer_paths0.xml modification.
5. Using googles codes vs the nvidia codecs which are not supported for watching vids in chrome.
6. Installing FDEai.apk as root app through magisk module installation. This ensures that the app does what it's supposed to do like initialize on startup with root privileges etc. Hope that helps.
Just updated the OG post to be able to update the FDAI.apk. Sorry for the lag but I didn't know the apk would install properly as long as the FDAI magisk module was installed first. Enjoy!
How much does it improve by using these "TWEAKS" ? what about battery consumption? is it any higher?
I'm tempted to try it.
Fonsocruise said:
How much does it improve by using these "TWEAKS" ? what about battery consumption? is it any higher?
I'm tempted to try it.
Click to expand...
Click to collapse
Honestly, I would say it's about 10-30% performance increase (most noticeable while gaming). The battery consumption is very efficient.
Any updates to this? With the more recent FDE updates advanced AI can only be enabled while using auto. Do your performance scripts still work on the most recent LOS? Ive been having heating issues trying to watch livestreams and I'm trying to figure it out
101010101001 said:
Any updates to this? With the more recent FDE updates advanced AI can only be enabled while using auto. Do your performance scripts still work on the most recent LOS? Ive been having heating issues trying to watch livestreams and I'm trying to figure it out
Click to expand...
Click to collapse
These mods were all tested on LOS 18.1 and do work. I am not on LOS 19 so I have not tested them on 19. I know FDEAI was updated recently and you could use the most updated APK found on his github above. I'm waiting for camera support to jump on LOS 19.

Categories

Resources