Active Topics

 


Reply
Thread Tools
Posts: 344 | Thanked: 1,345 times | Joined on Aug 2012 @ Paris, FR
#1
Patchmanager
patchmanager is the continuation of my work on system tweaks on SailfishOS. It allows managing patches in the whole system. Patching system files can allow UI tweaks, and a lot of other features. Only the imagination of developers is limiting here.

With the new update, Pandora enabled lipstick is no longer needed.

Don't install lipstick-pandora if you are running 1.0.7.16 or later version.



Warning: system file patches can break your system, or worse, malicious patches can cause privacy / security issues

Use with care, apply patches at your own risk.

Warning: patching homescreen QML files can brick or damage your device. Use with care.

Recovery is helpful to recover from bricking. There should always be a backup of lipstick code inside /opt/patchmanager/backups. Use the following code to recover broken lipstick files
Code:
cd /opt/patchmanager/backups/usr/share/lipstick-jolla-home-qt5/qml/
cp -rf * /usr/share/lipstick-jolla-home-qt5/qml/
Some patches

Video thanks to @fravaccaro




Gallery video patch

I have developed a small patch that provides a better UI for the video player in gallery. See this blog post for more information. (Note that the package in this blog post is not using patchmanager)

Unlimited multitasking

Want to have more than 9 multitasking windows ? Well, you can ! Applying unlimited-multitask patch from sailfishos-patches-advanced package, you will enjoy several pages of multitask windows.

This patch is still being developed, and there are known issues. However, it can be used right now. Don't forget to restart lipstick after applying the patch (there is an option in patchmanager).



Control center

Replacing the right ambience switcher panel, you can find the control center. It will (at some point), be extensible with widgets, but right now, you can find the switches from jolla-settings app.



Vibrate when call established

A feature I wanted long time ago is to have a vibration when a phone call is established. A patch is now included in sailfishos-patches-base to perform this.

Get it

I will use OBS to build my packages, and use OpenRepos to distribute them. You can try OBS packages if you want, but I recommand OpenRepos. (Except for pandora enabled lipstick)

If you like my work, please also consider a donation

recommended builds

Not recommended ones
  • patchmanager 0.4.5: OBS
  • base patches 0.5.1: OBS
  • advanced patches 0.3.4: OBS

Installation process
  1. Install patchmanager from openrepos
  2. Install patch collections from OpenRepos (base, advanced).
  3. Apply patches, like unlimited-multitask
  4. Relaunch services using the pulley menu. This applies patches

Note that before uninstallation, please unapply all patches.

Troubleshooting

If you brick your device in pandora mode, follow these steps.
  1. Reboot in recovery, and chroot in SailfishOS
  2. Copy the backup files (see below)
  3. Reboot

Code:
cd /opt/patchmanager/backups/usr/share/lipstick-jolla-home-qt5/qml/
cp -rf * /usr/share/lipstick-jolla-home-qt5/qml/
Current issues

patchmanager
  • Cannot fix patches
  • Cannot cleanup patches

Patches
  • Unlimited multitask: you can enter housekeeping mode only from the first page
  • Control center: volume slider do not appear.
  • Do not unapply patches when uninstalling
  • Date on lockscreen seems to be broken, and breaks other patches
  • Events view have a swipe feedback while it shouldn't
  • Sort of feature: Vibration occurs from all successful calls connections, even from an incoming call


Patchmanager for developers

Patchmanager is hosted in the sailfishos-patches group on Github. Feel free to contribute, and bring more patches. All projects should have a decent README. If they don't, ask me here, on Twitter, or on IRC.
__________________
Developer of Friends Facebook client, patchmanager, Phonebot
Blogger at Jollafr and random thoughts on my personnal blog
Support my work

Last edited by Sfiet_Konstantin; 2014-11-23 at 17:45.
 

The Following 86 Users Say Thank You to Sfiet_Konstantin For This Useful Post:
Posts: 752 | Thanked: 2,808 times | Joined on Jan 2011 @ Czech Republic
#2
Thank you, great idea!

Maybe you already did, but in case you did not, I would suggest looking into how webOS community did this:
http://www.webos-internals.org/wiki/...ion_Technology

There are years of work behind their patch framework and given that webOS is pretty much all about patches, I'd call this infrastructure a state-of-art.

EDIT: Here is the code: https://github.com/webos-internals/ausmt

Last edited by nodevel; 2014-03-26 at 12:56.
 

The Following 9 Users Say Thank You to nodevel For This Useful Post:
Posts: 344 | Thanked: 1,345 times | Joined on Aug 2012 @ Paris, FR
#3
Originally Posted by nodevel View Post
Thank you, great idea!

Maybe you already did, but in case you did not, I would suggest looking into how webOS community did this:
http://www.webos-internals.org/wiki/...ion_Technology

There are years of work behind their patch framework and given that webOS is pretty much all about patches, I'd call this infrastructure a state-of-art.

EDIT: Here is the code: https://github.com/webos-internals/ausmt
I didn't look about this, and this seems interesting. I need to take a look at it.
__________________
Developer of Friends Facebook client, patchmanager, Phonebot
Blogger at Jollafr and random thoughts on my personnal blog
Support my work
 

The Following 3 Users Say Thank You to Sfiet_Konstantin For This Useful Post:
MSameer's Avatar
Posts: 605 | Thanked: 1,778 times | Joined on Feb 2008 @ Helsinki
#4
I had the same idea but mine was about patching the QML files embedded inside the binaries before they are handed over to the Qt declarative engine for parsing. I however never got to implementing it.

patching in memory might be a bit slower but it makes it possible to modify embedded QML files easily.

- applets in lipstick.
- you name it...
__________________
We need a coffee machine that doesn't ask for coffee beans every 10 hours
 

The Following 4 Users Say Thank You to MSameer For This Useful Post:
Mikkosssss's Avatar
Posts: 645 | Thanked: 519 times | Joined on Apr 2012 @ Finland
#5
So if you do UI tweaks check my most wanted tweaks.
http://talk.maemo.org/showthread.php?t=92920
__________________
────────────────────
Try:My N9 bootvideo
 

The Following User Says Thank You to Mikkosssss For This Useful Post:
Posts: 344 | Thanked: 1,345 times | Joined on Aug 2012 @ Paris, FR
#6
Originally Posted by MSameer View Post
I had the same idea but mine was about patching the QML files embedded inside the binaries before they are handed over to the Qt declarative engine for parsing. I however never got to implementing it.

patching in memory might be a bit slower but it makes it possible to modify embedded QML files easily.

- applets in lipstick.
- you name it...
I explored this before. However, QML files embedded in binaries are sometimes optimized so that they are not in plain text anymore. (use a qrc to compile several QML files in release mode and use strings)

EDIT: or do you want to do that in runtime ?
__________________
Developer of Friends Facebook client, patchmanager, Phonebot
Blogger at Jollafr and random thoughts on my personnal blog
Support my work
 

The Following User Says Thank You to Sfiet_Konstantin For This Useful Post:
MSameer's Avatar
Posts: 605 | Thanked: 1,778 times | Joined on Feb 2008 @ Helsinki
#7
Originally Posted by Sfiet_Konstantin View Post
I explored this before. However, QML files embedded in binaries are sometimes optimized so that they are not in plain text anymore. (use a qrc to compile several QML files in release mode and use strings)

EDIT: or do you want to do that in runtime ?
They are compressed AFAICT but not optimized but it's trivial to decompress them.

If we have an LD_PRELOAD that can get access to the actual QML data (I don't yet know how) then we can capture the data, modify it and return the modified data to the QML "compiler". It's not resource intensive. I have done something similar in a Qt4 app of mine (replace certain strings during runtime in the embedded QML files). Don't ask me why I did that

EDIT: One advantage for patching during runtime is we can tie the patches to a certain OS release easily.
__________________
We need a coffee machine that doesn't ask for coffee beans every 10 hours

Last edited by MSameer; 2014-03-26 at 21:51.
 

The Following 5 Users Say Thank You to MSameer For This Useful Post:
Posts: 344 | Thanked: 1,345 times | Joined on Aug 2012 @ Paris, FR
#8
Originally Posted by MSameer View Post
They are compressed AFAICT but not optimized but it's trivial to decompress them.

If we have an LD_PRELOAD that can get access to the actual QML data (I don't yet know how) then we can capture the data, modify it and return the modified data to the QML "compiler". It's not resource intensive. I have done something similar in a Qt4 app of mine (replace certain strings during runtime in the embedded QML files). Don't ask me why I did that

EDIT: One advantage for patching during runtime is we can tie the patches to a certain OS release easily.
I have looked about the possibility to LD_PRELOAD on lipstick. And sadly, this only happens if you manually launch lipstick as privileged. lipstick have a setgid that prevents LD_PRELOAD when started by systemd.

This means that we are seriously limited in this side. Another way to do is to patch and override some system packages, like lipstick-qt5.
__________________
Developer of Friends Facebook client, patchmanager, Phonebot
Blogger at Jollafr and random thoughts on my personnal blog
Support my work
 

The Following User Says Thank You to Sfiet_Konstantin For This Useful Post:
Posts: 144 | Thanked: 242 times | Joined on Nov 2007 @ Finland
#9
How about disabling lipstick.service and providing own customized lipstick service that makes systemd to start a wrapper which sets LD_PRELOAD and starts lipstick as privileged?
__________________
Copy offers 20 GB free cloud storage
Register via this link -> confirm your email address -> install Copy client (Linux, OS X, Windows, iOS or Android) and you'll get 20 GB storage space in cloud.
 

The Following User Says Thank You to Penguin For This Useful Post:
Posts: 344 | Thanked: 1,345 times | Joined on Aug 2012 @ Paris, FR
#10
Originally Posted by Penguin View Post
How about disabling lipstick.service and providing own customized lipstick service that makes systemd to start a wrapper which sets LD_PRELOAD and starts lipstick as privileged?
Tried this. Wasn't working that well. I found another solution that is even easier and more interesting, it is to patch lipstick-qt5. And this works much much better. Stay tuned
__________________
Developer of Friends Facebook client, patchmanager, Phonebot
Blogger at Jollafr and random thoughts on my personnal blog
Support my work
 

The Following User Says Thank You to Sfiet_Konstantin For This Useful Post:
Reply

Tags
patchmanager, sailfish os


 
Forum Jump


All times are GMT. The time now is 23:00.