Welcome to my personal blog with main topics Android, Linux & Open Source!

I am doing software development in many areas, with my main fields of experience being cross-platform software (C++/Qt) and Android apps (native). In development teams I'm usually responsible for managing development services, setting up CI/CD jobs (usually paired with Bash/Python/Ruby scripts) and keeping everything uptodate.

Open Source is one of my passions -- I am a developer and maintainer of many open projects and regularly start contributing to additional ones. Support me on my mission! My other favourite activities include photography and being outdoor as much as possible. I am too volunteering at the local fire department. I went to school at HTL Braunau (Electronics / Software Engineering & Mobile Computing) and studied Mobile Computing at FH Hagenberg. I'm employed at Felgo as software engineer.
About me Support me Projects

Debugging is an essential part of software development. In case of Ubuntu Touch apps there are basically two ways to debug an app. This blog post showcases both ways.

Some basic knowledge of GDB is assumed as well as of Clickable which is the recommended tool to build Ubuntu Touch apps. If not, search the web for GDB tutorials and/or read the Clickable Documentation.

Desktop Mode

Clickable provides a desktop mode to run an Ubuntu Touch app on desktop. This mode also enables debugging via GDB. Again there are two ways:

1) Run GDB in a terminal 2) Start gdbserver and debug with your preferred IDE.

GDB on Command Line

From the project root directory run:

clickable desktop --gdb

This compiles the app with debug symbols (provided that CMake or qmake is used) and starts GDB inside a docker container. Use GDB commands like break main and run to start debugging. You can find more examples, like how to set breakpoints on a specific lines of code here.

Any IDE via gdbserver

From the project root directory run:

clickable desktop --gdbserver 3333

This starts the gdbserver on port 3333. Check for an option to do GDB Remote Debugging in your IDE and connect to localhost:3333.

On Device

Debugging in desktop mode is convenient, but it does not cover all use cases, e.g. those involving Content Hub, App Armor or arm specific issues. In such a case you need to debug directly on an Ubuntu Touch device.

You can always watch the logs from the device on your desktop via

clickable logs

This works independently of the debugging described below.

Preparation

Note: The steps described below make your rootfs writable and use apt to install packages. Do only proceed if you know what you are doing and how to reinstall Ubuntu Touch in case of trouble. Also note that your changes might get lost after system updates.

Make sure to install a debug build of your app, e.g. via Clickable:

clickable --debug

Make sure you have started the app at least once normally with that version.

Enter a shell on your device via SSH and run all subsequent commands on the device.

Remount the root filesystem writable and install gdb:

sudo mount -o rw,remount /
sudo apt update
sudo apt install gdb libc6-dbg

You may need to repeat this step after an OTA update. Installing libc6-dbg is necessary due to a bug that probably won’t be closed, soon.

Find the app’s desktop file in the ubuntu-app-launch cache

ls /home/phablet/.cache/ubuntu-app-launch/desktop/

Let’s use Webber as an example. In this example /home/phablet/.cache/ubuntu-app-launch/desktop/webber.timsueberkrueb_webber_0.5.1.desktop. You will need that path in a second.

Change directory to the installation path of the app, which can be found at /opt/click.ubuntu.com/<appname>.<maintainer>/current. In case of Webber

cd /opt/click.ubuntu.com/webber.timsueberkrueb/current

Look for the Exec line in the desktop file to find out how to start the app

cat /home/phablet/.cache/ubuntu-app-launch/desktop/webber.timsueberkrueb_webber_0.5.1.desktop | grep Exec

In case of Webber this returns Exec=webber %U. This means the app is started by the command webber (we can omit the %U). This executable may be located directly in the app installation directory or in the sub directory lib/<arch-triplet>/bin, where <arch-triplet is arm-linux-gnueabihf or aarch64-linux-gnu depending on your device. In case of Webber on a armhf device the executable is located at lib/arm-linux-gnueabihf/bin/webber.

Sourcing the app environment

When an app is started, some environment variables are set and the app may rely on them to work properly. That’s why you may or may not need to do this step before starting gdb on your app, too. In this sections you will learn how it can be done.

Start your app normally. Then find out the process ID (PID)

ps aux | grep <command>

where <command> is the executable that starts the app. Example for Webber:

phablet  32384  8.6  2.2 340256 62620 ?        Ssl  08:41   0:01 webber
phablet  32576  0.0  0.0   5684   812 pts/47   R+   08:41   0:00 grep --color=auto webber

We ignore the grep command we just ran and find the PID to be 32384. While the app is still running execute:

. <(xargs -0 bash -c 'printf "export %q\n" "$@"' -- < /proc/<PID>/environ)

replacing <PID> with the the PID identified above:

. <(xargs -0 bash -c 'printf "export %q\n" "$@"' -- < /proc/30649/environ)

Now the environment is set up as it would be on a normal app start. Close the app and start debugging as described in the next section.

Debugging

Now you are set up to start your debugging session:

gdb -ex "handle SIGILL nostop" --args <executable> --desktop_file_hint=<cached-desktop-file>

In case of Webber this is

gdb -ex "handle SIGILL nostop" --args lib/arm-linux-gnueabihf/bin/webber --desktop_file_hint=/home/phablet/.cache/ubuntu-app-launch/desktop/webber.timsueberkrueb_webber_0.5.1.desktop

The -ex "handle SIGILL nostop" part avoids stopping at a SIGILL signal caused by OpenSSL probing the abilities of the architecture. Use GDB commands like break main and run to start debugging.


Notice: Jonatan Hatakeyama Zeidler is the author of this article. The content was originally written in March 2020 and first published on this (gsantner’s) blog. ‘I’ refers to the original author.


Read more

Single-player blackjack game with optional basic strategy hints.
I started on the project in februrary 2020 to get 100% offline working crosstplaform apps running on a Ubuntu Touch / UBPorts phone and as a result uploaded the app to OpenStore.

Project description

NOTICE: Absolutely zero real money involved and no in-app-purchases or alike!
You always play with virtual coins, restart the game to get the initial amount of coins again.
The coin highscore is saved, you can view it in the left sidebar.

Rules

  • To keep the game simple, the initial bet is always one coin
  • 6 Decks, shuffled after 75% have been played
  • Blackjack pays 2-to-1
  • Dealer stands on any 17 (S17)
  • Double down on any two cards (D2)
  • Double down after splitting (DAS) (except Aces)
  • No resplitting (NR)
  • No insurance (NI)

The basic strategy suggestions are based on this ruleset.

Screenshots

 
 
 
 

– Please share this post & project in social networks and on UBPorts!
– Posted on Fediverse Friendica/diaspora/Mastodon
– Download from OpenStore

License

The app itself is MIT licensed, it’s a fork of kevinleedrum. My fork for Ubuntu touch has been changed to improve usability for mobile usage.

Read more

This project is a simple yet powerful Unit Converter.
I started on the project in early december 2019 to get 100% offline working crosstplaform apps running on a Ubuntu Touch / UBPorts phone and as a result uploaded the app to OpenStore.

Project description

A beautiful minimalistic, right to the point unit converter. Finding a simple unit converter that just works shouldn’t be that that hard. That’s the reason there is Simple Unit Converter.

Supports Weight, Length, Speed, Temperature, Area, Energy, Computer Storage, Time, Volume.
Enter the value to be converted on the top and get the result on bottom. Press enter or the Convert button to convert.

The utility is working 100% offline, does only load bundled files - files are not loaded over network. Also no ads or other bloat, just the app and nothing else.

Screenshots

 
 
 
 

– Please share this post & project in social networks and on UBPorts!
– Posted on Mastodon, diaspora*
– Download from OpenStore
Source Code (GitHub)

License

The app itself is MIT licensed, with it’s source code being available here, fork of ricardofabila. My fork for Ubuntu touch has been changed to improve usability for mobile usage. These libraries are used: AngularJS, clipboard.js, Bootstrap, jQuery (license info also available from GitHub)

Read more

2048 game added to Ubuntu Touch OpenStore

On 1. December 2019 I added the initial version of the popular 2048 puzzle game to OpenStore.
The code is based on the original 2048 implementation. I contributed to the 2048 project (upstream) as well - various improvements for mobile usage. Improvements where accepted, merged and now part of the project!


What is the game about?

Slide up/down/left/right to move all tiles. When two tiles with the same number touch, they merge into one! The goal is to reach a 2048 tile and score as high as possible!

The game is available in multiple languages: English, German & Russian. It also features night mode.

Save features:

  • Highscore
  • Current game state - you can close 2048 when leaving the bus, restart the 2048 the next day and the game state gets loaded
  • Night mode - Day/Night mode setting is saved

The game is working 100% offline, does only load bundled files - files are not loaded over network. Also no ads or other bloat, just the game and nothing else.

Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer. The source code is available from Github and the project is MIT licensed.

Screenshots

 

Read more

Markor v2.2 update is out! Get the update from F-Droid, Google Play or GitHub!
Continue reading to find out what’s new, improved and fixed in this update.

Create Presentations with Markor & Markdown

Markor makes creating presentation slides with plaintext faster & easier than ever.
Presentations can be exported & shared as PDF & HTML. This means you can create & prepare for presentations fast with Markor, open it on a PC or share it via E-Mail & WhatsApp.

The example presentation (as seen in the video) is bundled with Markor. Press the + button at the file browser to create a new file, select the presentation-beamer.md template and you get the whole Abed Nadir presentation.
It’s the easiest way to start your presentation as most common slide styles are included. (Like custom slide background color & image, centered image, bullet points, title only slides, ..)

Excerpt of the presentation, includes information about the syntax:

---
class: beamer
---

-----------------
# Cool presentation

## Abed Nadir

{{ post.date_today }}

-----------------
## Slide title


1. All Markdown features of Markor are **supported** for Slides too
2. Start new slides with 3 more hyphens (---) separated by empty lines
3. End last slide with hyphens too
4. Slide backgrounds can be configured using CSS, for all and individual slides
5. Print / PDF export in landscape mode
6. Create title only slides (like first slide) by starting the slide (line after ---) with "# title"


-----------------
## Slide with centered image
* Images can be centered by adding 'imghcenter' in alt text & grown to page size with 'imgbig'
* Example: `![text imghcenter imgbig text](a.jpg)`

![imghcenter imgbig](file:///android_asset/img/flowerfield.jpg)


-----------------

Audio Recording / Voice Notes

Add voice notes to your documents (all formats)! You can find the audio recording option in the attachment menu.

Highest priority: Privacy!
Audio recording is always started and stopped manually by the user!
Audio recording requires the audio recording permission, it must be granted before recording can start.


  • Play the recording prior to saving with the left button
  • Starts and stop audio recording with the right button. If you did a spelling error and want to re-record just press the record button again. Only the last recording will be added to the document
  • Markor will suggest a time based filename for saving but you can choose any filename (*.wav) you want
  • Markor inserts the audio recording with HTML syntax. You can listen to it at Markor’s View Mode

Create Markdown tables fast

There is now a easy way to add tables to your Markdown documents!
Use the new editor table button to add tables!

  • Long press the table button to start a table (=create table header)
  • Short press the table button to add a new row to the table
  • You can choose the amount of columns as you wish. Max 5 recommended.
  • The last used column count is highlighted

Notice: Markdown tables must always have a header (---|---|---). If you don’t need the header text, remove the line above the header ( | | ).

Other new features, enhancements & bugfixes

Notice: Development changelog is always available from GitHub. See the commit history for code changes.

  • Added Presentations & Slides with Markdown
  • Added audio recording dialog which allows to add voice to documents. Manual interaction required to start & stop voice recording. Voice recording permission required for this feature
  • Added editor button to create Markdown tables
  • Markdown Footnotes support added
  • Added attachment button for all formats (insert color, link, image, file, audio, date)
  • Date/Time button long press now inserts text with last used format
  • Improved SD Card reading & writing
  • Added option to File-import-dialog to import to notebook instead of current folder
  • Reordered editor buttons so global actions are on same position at all formats
  • Source code highlighting for View mode
  • Added settings option to enable experimental features
  • New experimental feature: Convert epub to plaintext and replace current text with ebook
  • New experimental feature: Speed Reading for (text from) edit mode
  • New Special Keys option: Indent / Deindent current line
  • Copy textfile to clipboard from file browser
  • Added highlighting todo.txt due dates
  • Long press the todo.txt date button to insert due date
  • Sepia editor theme

Read more

Markor v2.1 update is out! Get the update now from Google Play, GitHub or F-Droid!
Continue reading to find out what’s new, improved and fixed in this update.

New features, enhancements & bugfixes in this release

  • Improved editor, highlighting and overall performance
  • New file dialog: Templates
  • New format: KeyValue - highlighting for json, ini, csv, yaml, vcard, ics, toml and other simple key-value like syntax
  • Long click on main view plus button -> open favourites/recents
  • Use lightweight Markdown heading highlighting on non-highend devices
  • Show SD Card dialog when opening file that is under SAF
  • Share: Rename PDF -> Print/PDF
  • Text action to sort todo by date
  • Keep view mode scroll position
  • Remove LinkBox from main screen to improve performance
  • Make filesystem selection dialog fill screen
  • Rework share into: Use file browser to select favourite/recent/popular files
  • Special keys added: Insert page break for PDF/Printing, ohm key, punctation mark arrows
  • Append linefeed on end when saving
  • Show error when trying to rename to existing file/folder
  • Add special handling for percent encoded filenames in nextcloud/owncloud folder
  • Link ‘More->Help’ to Project website FAQ
  • Debug Log settings option
  • Improve local/linked file opening when clicking link at preview
  • Add option to set font size in view mode
  • Share (multiple) files from file browser
  • PlaintextConverter: Put HTML into preview as is (allow to view html files)
  • Fix folder title not visible sometimes
  • Enable hex color highlighting for various prefix/postfixes (like colon, quote, …)

Read more

This a copy of the blog post Using Markor to Write (and More) on an Android Device, first published at The Plain Text Project blog on 16. July 2019 by Scott Nesbitt. The post content is licensed CC BY-NC-SA 4.0. ‘I’ and ‘me’ refers to the original author. Minor edits were done compared to the original post (references to LinkBox removed).


I have something of a like/dislike relationship with smartphones and tablet. On one hand, they can be very useful for getting some work done. Especially writing. And not having to lug a laptop around is a bonus.

On the other hand, smartphones and tablets can distract us from our lives. And they further blur the already blurry line between life and work. Because we can work from anywhere doesn’t mean we should.

As I wrote a couple of paragraphs ago, smartphones and tablets can be very useful when you need to do a little work. In my case, that work is usually writing. To do that, I need an editor.

Over the years, I’ve used a number of editors with a number of Android-powered devices. Right my, my editor of choice is Markor.

Read more

MemeTastic v1.6 update is out! Get the update now from Google Play, GitHub or F-Droid!
Continue reading to find out what’s new, improved and fixed in this update.

Usability

Create Memes faster

When you start editing a picture, the editor will now automatically select the top caption. This means the keyboard shows up immediately and you can start right away to enter text for the top caption.

Redesign

The app uses a brown-black as primary color now, which improves readability and recognizability of components and texts a lot compared to the previous blue color.

 
 
 
 

Apply Text settings to all captions

This is a new checkbox option inside the meme editor controls. When checked, all text settings are synced between all captions (size, font, colors etc.). It is checked by default and can be disabled in case you want to have e.g. different sizes for all captions.

Search replaces Tabs in Meme Template list

Previously the meme template list contained a tabbed view for groups of templates. There is already bottom navigation and search for template tags/categories so tabs were obsole and thus removed.

New Features

Rotation gesture for Image Viewer

The image viewer (created images & original unedited image) now a simple rotation gesture. The image viewer now support pinch to zoom, image movement and rotation.

The rotation happens on 90 degree steps and is applied only for the currently viewed image till closed.

Use MemeTastic as Image Viewer

There is a new toolbar menu option at meme editor to view the (untouched) original image.

Together with the new Rotation gesture for Image Viewer, you can use MemeTastic as a simple & lightweight picture viewer. (Without saving any images)

The image viewer uses full width & height of the screen and has complete black background.

List of sites for Meme Templates and Funny Images

MemeTastic now contains a list of links to sites with Meme Templates and Funny Images. You can show the list and get to these sites using the »Help« option in the bottom navigation »More« section.

You can suggest sites here if you are missing something.

Privacy: MemeTastic - your true Offline app

MemeTastic has no Internet permission, hence it can’t communicate with any network. There is no tracking, calling-home or picture upload in MemeTastic.

Use the share button to send edited images to other apps. You can also use any gallery/file manager app to view MemeTastic created images.

(This info was not included in any update blog post yet.)

Read more




Mastodon
-->