Apple Sherlocked my Android app DeskDock

Within the Apple community, “sherlocking” refers to an original third-party application being obsoleted by Apple integrating the same functionality directly into their operating system. The term originates from the first prominent occurence of this event, when Apple integrated the functionality of the third-party Watson software into their own Sherlock search tool that came bundled with Mac OS X 10.2.

Today, while watching the live stream of Apple’s yearly Worldwide Developer Conference, I to my surprise witnessed the sherlocking of my own piece of software. In this instance though, the event came as a joyous and humbling occasion, since my original software runs on Android, so it can peacefully coexist with the same functionality in the shiny new macOS Monterey and iPadOS 15 releases.

Specifically, I am referring to Apple’s new Universal Control functionality that allows users in the Apple ecosystem to use the mouse and keyboard of a macOS computer for controlling an attached iPad. The mouse can be moved between the devices just as if the iPad was connected as a secondary screen, but allows taking control of the native iPadOS applications running on the tablet. This kind of integration greatly simplifies workflows for people who constantly have to switch between tasks on their computers and mobile devices.

Back in 2016, I envisioned the same functionality, except that at the time, my work mostly concentrated on Android development. I wanted a way to seamlessly control my development machine and the target Android device with a single pair of mouse and keyboard. Since the only software that supported similar flexibility had at that time been abandoned and suffered from great usability problems, I decided to write my own tool for the job. After a few months of very intensive work, I had developed a working application that did exactly what I wanted as a user. Not only does it support sharing mouse and keyboard of a Windows, macOS or Linux computer with an unlimited number of connected Android devices, it also for the first time ever allowed conveniently dragging and dropping URLs and files from a computer to an Android device. Since its release in autumn of 2016, DeskDock has been downloaded by more than 100 000 users worldwide.

If you are an Android user jealous of Apple’s Universal Control functionality for iPadOS 15 and macOS Monterey, you’ll be happy to hear that DeskDock Free is available for free from Google Play and allows you to share your computer’s mouse with an unlimited number of connected Android devices. For even more functionality (including keyboard sharing), DeskDock PRO is available as a one-time purchase of only $5.49.

DeskDock Free: https://play.google.com/store/apps/details?id=com.floriandraschbacher.deskdock.free

DeskDock PRO: https://play.google.com/store/apps/details?id=com.floriandraschbacher.deskdock.pro

Cross-Compiling the Linux kernel for Raspberry Pi

I recently had to compile a custom kernel for my Raspberry Pi. Instead of compiling the kernel on the Pi itself, I wanted to speed up the process by running it inside a Ubuntu virtual machine on my MacBook Pro. Although I found some tutorials describing the process, I had to adapt and combine them in a few places, so I decided to publish the steps that eventually worked for me in a blog post.

I’m using Ubuntu 16.04 running inside a Parallels virtual machine. However, the steps should be the same independent of whether you’re using a virtual machine or not, running a different version of Linux, etc.

1. Set up the cross-compiling toolchain

In order to compile source code into machine code that is not native to the build machine, a cross-compiler has to be used. My MacBook uses the x86 processor architecture (as most modern computers do), and luckily, the Raspberry Pi Foundation has published an x86 cross-compiler toolchain for the Raspberry Pi.

In order to install it:

user@ubuntu$ git clone https://github.com/raspberrypi/tools ~/tools
user@ubuntu$ echo PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin >> ~/.bashrc
user@ubuntu$ source ~/.bashrc

2. Get the source code of the Linux kernel

Important! If you are using a virtual machine, clone the source code into a folder directly in the vm, not a shared directory. Build will fail with a very obscure error otherwise (7).

Create a folder for storing the Linux source code. Then, clone the kernel source code from Github:

user@ubuntu$ mkdir kernel
user@ubuntu$ cd kernel
user@ubuntu$ git clone https://github.com/raspberrypi/linux.git

You generally don’t need the commit history, so to speed up the process, you can alternatively use the --depth argument to only clone the most recent version of all the files:

user@ubuntu$ git clone --depth=1 https://github.com/raspberrypi/linux

The default branch will now be selected. This is usually the most recent stable branch. You can change to a different branch (instructions from 2):

user@ubuntu$ git init
user@ubuntu$ git fetch git://github.com/raspberrypi/linux.git rpi-4.18.y:refs/remotes/origin/rpi-4.18.y
user@ubuntu$ git checkout rpi-4.18.y

If you want to check what kernel version the compiled kernel of your current branch would have (as displayed in uname -r), you can read it from the Makefile (instructions from 3) by executing this from a kernel source directory:

user@ubuntu$ head Makefile -n 3

For comparing the version with an existing build, you can check the version on a running system:

pi@raspberrypi$ uname -r 

3. Configure the build

Next, you typically want to configure the kernel build. The easiest option is to just compile with the default configuration for your Raspberry Pi (instructions from 1).

For the Raspberry Pi 2/3, this means:

user@ubuntu$ cd linux
user@ubuntu$ KERNEL=kernel7
user@ubuntu$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig

For the Raspberry Pi 0/1, instead use:

user@ubuntu$ cd linux
user@ubuntu$ KERNEL=kernel
user@ubuntu$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig

Alternatively, you can copy the configuration from an existing build. You can use (instructions from 4):

user@ubuntu$ scp pi@raspberrypi:/proc/config.gz .
user@ubuntu$ gunzip -c config.gz > .config

This will establish an ssh connection to the Raspberry Pi (assuming both machines are in the same network) and copy the configuration from the default location at /proc/config.gz. This is a virtual location provided by a kernel module. If it doesn’t exist, you can add it by enabling the responsible kernel module on the Raspberry Pi:

user@ubuntu$ sudo modprobe configs

Once you have copied the configuration, you can apply it:

user@ubuntu$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- oldconfig

In addition to either of these two options, you can also modify an existing configuration via the menuconfig tool (instructions from 5). First make the desired config using one of the two options above, then run:

user@ubuntu$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

Details for this are described at 5.

4. Building the kernel

Now that everything is configured, we can start the actual build process. Run this command to build the kernel image and modules. Modify the -j parameter to approximately correspond with the number of CPU cores your host machine has. It will control the degree of parallelity in the build process. Higher values will lead to faster build times (instructions from 1):

user@ubuntu$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs -j 4

The build machine will now take a little while to compile your kernel. In my Ubuntu virtual machine on my MacBook Pro, it takes about 20-30 minutes until the build is finished.

5. Installing the kernel

Hurray, we’re almost done! All that’s left to do is copy the freshly compiled kernel onto the Raspberry Pi. In general, there are multiple ways to achieve that. You could just pull the micro sd card out of your Raspberry Pi, insert it into the computer, make sure the card is accessible from your virtual machine and copy the files over. However, if we already have remote (ssh) access to the Raspberry Pi, why not use that connection to transfer our kernel?

The kernel installation consists of three parts:

  • kernel.img (Pi 0/1) or kernel7.img (Pi 2/3): The kernel image itself
  • The modules folder: Contains all preinstalled kernel modules
  • Overlays: Configurations for the RPi board and peripherals

In general, we want to keep these three components consistent in order to ensure proper operation of the kernel. In theory, the old overlays should also work for the new kernel. However, the modules folder has to be replaced with our new versions, as the modules must match the exact kernel version.

In order to package the kernel modules (the modules folder) and send them to the Raspberry Pi, we have to run these commands:

user@ubuntu$ rm -rf ../modules
user@ubuntu$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=../modules make modules_install
user@ubuntu$ cd ../modules
user@ubuntu$ tar czf modules.tgz *
user@ubuntu$ scp modules.tgz pi@raspberrypi:/tmp

Next, in order to package and copy the overlays and the kernel.img/kernel7.img file to the Raspberry Pi, run these commands:

user@ubuntu$ rm -rf ../boot
user@ubuntu$ cd ../linux
user@ubuntu$ mkdir ../boot
user@ubuntu$ mkdir ../boot/overlays
user@ubuntu$ cp arch/arm/boot/zImage ../boot/$KERNEL.img
user@ubuntu$ cp arch/arm/boot/dts/*.dtb ../boot/
user@ubuntu$ cp arch/arm/boot/dts/overlays/*.dtb* ../boot/overlays
user@ubuntu$ cp arch/arm/boot/dts/overlays/README ../boot/overlays/
user@ubuntu$ cd ../boot/
user@ubuntu$ tar czf boot.tgz *
user@ubuntu$ scp boot.tgz pi@raspberrypi:/tmp

Now that we’ve copied these files to the Raspberry Pi, we just have to move them to the right places on the Pi itself. In order to do that, ssh into the Pi and obtain root privileges:

user@ubuntu$ ssh pi@raspberrypi
pi@raspberrypi$ sudo -s

If you want to keep a backup of your existing kernel, you can do so now:

root@raspberrypi$ cd /boot/
root@raspberrypi$ cp kernel7.img kernel7-backup.img  # For RPI 2/3
root@raspberrypi$ cp kernel.img kernel-backup.img     # For RPI 0/1

Lastly, replace the old kernel with the new one:

root@raspberrypi$ cd /
root@raspberrypi$ tar xzf /tmp/modules.tgz
root@raspberrypi$ rm /tmp/modules.tgz
root@raspberrypi$ cd /boot/
root@raspberrypi$ tar xzf /tmp/boot.tgz --no-same-owner root@raspberrypi$ rm /tmp/boot.tgz

Now, reboot and run your freshly installed kernel:

root@raspberrypi$ reboot

You can check whether you’re running the new kernel:

pi@raspberrypi$ uname -a

This should output the build date of a few minutes ago.

FastFileTransfer Icon Poll

In order to make FastFileTransfer’s icon better fit Android’s design patterns, I am planning to add a new icon to the app. I have thus created a set of new icons that you can see in the image below.
In order to vote for an icon, please select one of the options in the list below and press “Vote”.

Which icon do you like best? Poll ended.
If you have any remarks concerning a particular icon, please feel free to post a comment below!

(All icons (c) Florian Draschbacher)

PerfectGuitarSongBook 1.5

I’m glad to announce the release of a new update for PerfectGuitarSongBook!

PGSongBook 1.5 comes with a few bug fixes and one big new feature:

Recording

Ready for the release of IK Multimedia’s iRig Mic Studio, PGSongBook finally gets recording capabilities. Multiple recordings can be saved for every song stored in PerfectGuitarSongBook.

As shown on the screenshot to the left, there now is a dedicated recording tool bar on the song screen that can be toggled via a new microphone button in the main tool bar. The new bar allows to easily start and stop recording, start playback of a recording and skim within a recording. With a button of the toolbar, a list containing all previous recordings of the same song can be brought up.

PerfectGuitarSongBook stores recordings as m4a files that can be easily exported to other applications for further processing, shared via email or copied to a PC or Mac via iTunes file sharing for import into desktop audio editing software.

Recordings can now also be set as backing tracks of songs, which means it’s now possible to create your own backing tracks you can use to practise a song directly within PGSongBook.

Recording was tested to work with a variety of Microphones, including the iRig Mic Cast, iRig Mic Field and iRig Mic Studio. For best recording quality, the latter is recommended.

Please note there currently is a problem with the new version on iOS 5 and 6. If you are running one of these versions, please don’t update yet. A small bug fix update is coming soon.

The update is available now on the App Store!

PGSongBook and the iRig BlueBoard

I recently realized that I had promised to write a post describing how IK Multimedia’s iRig Blueboard works together with PerfectGuitarSongBook way back when version 1.47 was newly released.
As I somehow forgot to actually publish this post, I figured I’d post it now.

PGSongBook supported bluetooth and USB foot pedals almost since its very beginning. PGSongBook has a main focus on providing maximum control over the content without having to interrupt playing your music, and supporting foot pedals are a part of that experience.
However, PGSongBook’s foot pedal support never actually felt 100% complete until the iRig BlueBoard was released. As previous pedals only came with two buttons, control was limited and merely reduced to being able to scroll up and down within a song.

iRig BlueBoard

With the iRig BlueBoard, this has changed radically:
Using the board’s four buttons, you can actually navigate throughout the whole application only with the BlueBoard, without having to touch the screen. In order to achieve this full control, PGSongBook dynamically maps the board’s buttons to match the current screen:

(All mappings below assume you are using the BlueBoard in Program Change Mode from Bank 001 to Bank 004 on Channel 01)

In the songs, artists, playlists or playlists songs list, the following mapping is used:
A: Up
B: Down
C: Back / Switches to next tab
D: Enter

In the song screen the mapping is as follows:
A: Up
B: Down
C: Back / Back in playlist
D: Forth in playlist

If an additional volume pedal is connected to the BlueBoard, it can be used to control the absolute position in a list.

You can get more information on the iRig BlueBoard here

Please feel free to write in the comments below or send me an email if you have questions regarding PGSongBook or the iRig BlueBoard integration.

FastFileTransfer 2.0 Released

I’m very proud to announce the release of a huge update to FastFileTransfer into Google’s Play Store: FastFileTransfer 2.0 is a complete rewrite of the old application, with an entirely new engine, icon and user interface.

FastFileTransfer 2.0

Here are all new features:
• New transfer engine
• New UI
• New Icon

• Now supports sending via Wifi Direct or an existing Wifi Connection
• Send multiple files as ZIP
• Continues sending from background
• New super secure mode
• Send files from different folders
• Send whole folders
• More progress details
• Now translated to German, Spanish, French, Italian, and Turkish
• Support for Android 5.0 Lollipop
• And so much more

Many of you have asked for an ad-free version of the app, and here it is:

FastFileTransfer PRO:
• Receive files from devices that don’t have FFT installed
• Remove ads
• Let receivers download all files at once (Unzipped)

Here are some screenshots of the new version:

The app is free, so just try it out!

PGSongBook 1.4.7

I finally submitted a new update for PGSongBook with the well-deserved adaptations for iOS 7. The new update carries version number 1.4.7 (which is thought to indicate this is no update in functionality, but merely an update for improved compatibility with iOS 7).

Although there are not many new features, I still think that the new design has deserved being talked about a bit here.
In order to move away from the iOS6-y look of the old version and get the UI more streamlined with iOS 7,  I had to change nearly the whole design of the app.

And thus, here is the one change most of you will notice first once the update has been approved:

The new app icon

A new icon. This might seem like a radical change, but the old one heavily relied on that grainy texture and skeuomorphistic pages, which both don’t comply with the new flat look of the OS.

Going further, here are some screenshots of the new UI:

The other cool new feature of PerfectGuitarSongBook is full support for MIDI foot pedals like the iRig BlueBoard by IK Multimedia. I’ll write about that feature in another post.

Hope you all like the new design!

You will get the chance to get your hands on the update once it has been approved by Apple. From my experience, it takes roughly a week for Apple to review and approve updates, so expect the release on Sunday or Monday next week.

PerfectGuitarSongBook 1.4 available now !

Apple was a bit faster than expected and the new update for PGSongBook was reviewed and published yesterday.

Here is the full list of new features:

+ New chord charts system:
            Preinstalled chords database
            Add your own chords
+ Simple functions for converting PDF, Docx, Doc and Pages to ChordPro
           (but please don’t expect too much, especially DOC is a really complex format)
+ Notes system 
            For songs and playlist entries
+ Optical improvements
           New icon
           Tried to optically polish the whole app
+ Link MP3 file with a song
+ New AutoScroll tag allows setting different AS speeds for parts of a song
+ Swipe to get to next song of playlist
            With page-turning animation
+ Fully compatible with the iPhone 5
+ Change settings from inside the app
+ Batch import

+ Plenty of small improvements, e.g.
             Search in the most important lists
             Edit PDF/Doc/Docx/Pages in external app
             Double-tap screen to toggle full screen
             Tapping the screen while AS bar is visible toggles AS
             Song titles are centered now
+ New settings, e.g.
             Scale PDFs to fit
             Start MP3 and AS with one button
             Jump to next song of playlist after scrolled to bottom or MP3 ended
+ Tons of bug fixes
+ Help can now be updated without updating the app
+ Dropped support for iOS 4 

PerfectGuitarSongBook 1.4 Video Previews

I’ve created videos showing some of the new features of PerfectGuitarSongBook 1.4, three of which I’d like to present in this post.

The new chord charts system
As you could already see on a screenshot, the new update of PGSongBook comes with a preinstalled chord database than can even be extended by you.

 
 
The new notes system
In PerfectGuitarSongBook 1.4, you can add notes for a song and for a playlist entry. They can be viewed from the song screen, in an animated notes view at the top of each song.
 
 
 
Navigating in a playlist
The new version also includes a beautiful way of navigating in a playlist: Just turn the page in an iBook-style-way in order to get to the next or previous song.
 
 
 
These are only some of the great new features the new version brings.
More videos to come.