UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. lkroll
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Best 3
    • Controversial 0
    • Groups 0

    lkroll

    @lkroll

    5
    Reputation
    1
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    lkroll Unfollow Follow

    Best posts made by lkroll

    • RE: [HowTo] Alternate way of saving battery when using 4G/LTE

      Battery drain on standby with 4G is still a problem on focal, so I updated the script and created a small systemd service to automatically run the script at startup. Maybe this will be useful for some.


      The greeter in focal is called "com.lomiri.LomiriGreeter" instead of "com.canonical.UnityGreeter". So i changed that in the script and tested that it indeed still works.

      I placed the updated script in:
      /home/phablet/.local/bin

      #!/bin/bash
      
      primary_preference="lte"
      saving_preference="gsm"
      sim_slot="/ril_0"
      
      interface=org.freedesktop.DBus.Properties
      member=PropertiesChanged
      
      dbus-monitor --session "type=signal,interface='${interface}',member='${member}'" |
      while read -r line; do
              if [[ ${line} == *"com.lomiri.LomiriGreeter"* ]]; then
                      read; read; read -r line
                      if [[ ${line} == *"IsActive"* ]]; then
                              read -r line
                              [[ ${line} == *"true"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${saving_preference}" 1>/dev/null
                              [[ ${line} == *"false"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${primary_preference}" 1>/dev/null
                      fi
              fi
      done
      

      Don't forget to make it executable:

      chmod u+x /home/phablet/.local/bin/lte-battery-saver.sh
      

      Ubuntu 20.04 uses systemd instead of upstart so I created a systemd user service in:
      /home/phablet/.config/systemd/user/lte-battery-saver.service

      [Unit]
      Description=LTE battery saver
      Requires=dbus.socket
      After=dbus.socket
      
      [Service]
      ExecStart=/home/phablet/.local/bin/lte-battery-saver.sh
      
      [Install]
      WantedBy=dbus.socket
      

      Now to enable the service:

      systemctl --user enable --now lte-battery-saver
      

      Verify that it is running and up:

      systemctl --user status lte-battery-saver
      

      It should return active and enabled:

      ● lte-battery-saver.service - LTE battery saver
           Loaded: loaded (/home/phablet/.config/systemd/user/lte-battery-saver.service; enabled; vendor preset: enabled)
           Active: active (running) since Sat 2023-04-29 18:44:27 CEST; 1h 11min ago
      

      That's it, now everytime the phone is locked the connection will drop to 2G and back to 4G/LTE once unlocked.
      I tested and verified it on my Oneplus 5T, but it should work on other devices running focal.

      posted in Support
      L
      lkroll
    • RE: Package app for different architectures

      @lduboeuf That does work, thanks for the tip.

      I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

      posted in App Development
      L
      lkroll
    • RE: Signal Axolotl status in 2023?

      As long as it is still in the works, you could use Cinny or Element to access a matrix server that uses the signal bridge. That way you even get push notifications and combine multiple messengers into one app. I set up my own matrix server to use the whatsapp bridge, but it also work with Signal. If you do not want to self host I can recommend https://tchncs.de/matrix, which has the signal bridge already set up and instructions on their site on how to use it.

      posted in Support
      L
      lkroll

    Latest posts made by lkroll

    • RE: Signal App for UT

      @Tobi79 You can also use Matrix with a Signal Bridge as a workaround.

      posted in Support
      L
      lkroll
    • RE: OP5T failed to install UT using Ubuntu and Win10

      @armchairFF Did you upgrade to the latest Oxygen OS before installing UT? I'd also recommend using the snap version of the Installer, as I had the best of luck with that.

      posted in Oneplus 5/5T
      L
      lkroll
    • RE: Get an app to manage SSH, grant permission to use `/bin/sh`

      To spawn a shell the app needs to be unconfined afaik.
      You can accept the error by adding --accept-review-errors to your clickable command and see if it works.

      Keep in mind that unconfined apps need to be reviewed before they can be submitted to the OpenStore.

      posted in App Development
      L
      lkroll
    • RE: Package app for different architectures

      @lduboeuf That does work, thanks for the tip.

      I totally overlooked the cmake builder in the clickable docs but now it makes sense. I just added an extra step to use the right binary before building, but now I can specify for what architecture I want to build the click 👍

      posted in App Development
      L
      lkroll
    • Package app for different architectures

      Hello,

      I created a small app with QML + python that needs a precompiled binary to function properly. Therefore I wanted to restrict the architecture to only build for armhf for example. But now when I set the architecture in the manifest clickable prints out this error:

      Clickable is building for architecture "all", but "armhf" is specified in the manifest. You can set the architecture field to @CLICK_ARCH@ to let Clickable set the architecture field automatically.
      

      If I then set 'restrict_arch: armhf' in the clickable.yaml I get the following error:

      The "pure-qml-cmake" builder needs architecture "all", but "restrict_arch" was set to "armhf"
      

      That's probably because the builder is set to pure-qml-cmake in the clickable.yaml which expects the architecture to be set to 'all'.

      But how would I build the app for one arch only then? Do I need to use the 'precompiled' builder and do something else?
      Or can I just compile the app for 'all' and upload the click package for armhf for example.
      I mean technically the app compiles and runs on all architectures, it just won't work properly because it needs the bluepy-helper binary to be compiled for the specific architecture.

      I also thought about just including the binary for every architecture and then within the app detect the correct architecture and use the right binary, but I don't think that is a good approach.

      What would be the best / recommended way to deal with that?

      The code is on my gitlab for reference: https://gitlab.com/lkroll/lighthouse-control

      posted in App Development
      L
      lkroll
    • RE: Signal Axolotl status in 2023?

      As long as it is still in the works, you could use Cinny or Element to access a matrix server that uses the signal bridge. That way you even get push notifications and combine multiple messengers into one app. I set up my own matrix server to use the whatsapp bridge, but it also work with Signal. If you do not want to self host I can recommend https://tchncs.de/matrix, which has the signal bridge already set up and instructions on their site on how to use it.

      posted in Support
      L
      lkroll
    • RE: [HowTo] Alternate way of saving battery when using 4G/LTE

      Battery drain on standby with 4G is still a problem on focal, so I updated the script and created a small systemd service to automatically run the script at startup. Maybe this will be useful for some.


      The greeter in focal is called "com.lomiri.LomiriGreeter" instead of "com.canonical.UnityGreeter". So i changed that in the script and tested that it indeed still works.

      I placed the updated script in:
      /home/phablet/.local/bin

      #!/bin/bash
      
      primary_preference="lte"
      saving_preference="gsm"
      sim_slot="/ril_0"
      
      interface=org.freedesktop.DBus.Properties
      member=PropertiesChanged
      
      dbus-monitor --session "type=signal,interface='${interface}',member='${member}'" |
      while read -r line; do
              if [[ ${line} == *"com.lomiri.LomiriGreeter"* ]]; then
                      read; read; read -r line
                      if [[ ${line} == *"IsActive"* ]]; then
                              read -r line
                              [[ ${line} == *"true"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${saving_preference}" 1>/dev/null
                              [[ ${line} == *"false"* ]] && /usr/share/ofono/scripts/set-tech-preference "${sim_slot}" "${primary_preference}" 1>/dev/null
                      fi
              fi
      done
      

      Don't forget to make it executable:

      chmod u+x /home/phablet/.local/bin/lte-battery-saver.sh
      

      Ubuntu 20.04 uses systemd instead of upstart so I created a systemd user service in:
      /home/phablet/.config/systemd/user/lte-battery-saver.service

      [Unit]
      Description=LTE battery saver
      Requires=dbus.socket
      After=dbus.socket
      
      [Service]
      ExecStart=/home/phablet/.local/bin/lte-battery-saver.sh
      
      [Install]
      WantedBy=dbus.socket
      

      Now to enable the service:

      systemctl --user enable --now lte-battery-saver
      

      Verify that it is running and up:

      systemctl --user status lte-battery-saver
      

      It should return active and enabled:

      ● lte-battery-saver.service - LTE battery saver
           Loaded: loaded (/home/phablet/.config/systemd/user/lte-battery-saver.service; enabled; vendor preset: enabled)
           Active: active (running) since Sat 2023-04-29 18:44:27 CEST; 1h 11min ago
      

      That's it, now everytime the phone is locked the connection will drop to 2G and back to 4G/LTE once unlocked.
      I tested and verified it on my Oneplus 5T, but it should work on other devices running focal.

      posted in Support
      L
      lkroll