New jlibtorrent/libtorrent 1.2.10.0 library

Code BitTorrent apps in Java for Android, Desktop and Servers with the official Java Wrapper for libtorrent 1.2.10.0

1.2.10.0

  • libtorrent 1.2.10 update (70f1de3f7ec4012aaea420ff150ef0135d397706)
  • lt: improve stat_file() performance on Windows
  • lt: fix issue with loading invalid torrents with only 0-sized files
  • lt: fix to avoid large stack allocations
  • lt: add macro TORRENT_CXX11_ABI for clients building with C++14 against
    libtorrent build with C++11
  • lt: removed deprecated wstring overloads on non-windows systems
  • lt: drop dependency on Unicode’s ConvertUTF code (which had a license
    incompatible with Debian)
  • lt: fix bugs exposed on big-endian systems
  • lt: fix detection of hard-links not being supported by filesystem
  • lt: fixed resume data regression for seeds with prio 0 files
  • compiler update: g++-5 -> g++-7

jlibtorrent-1.2.10.0-javadoc.jar 2.51 MB
jlibtorrent-1.2.10.0-sources.jar 408 KB

Java Classes (required)
jlibtorrent-1.2.10.0.jar 675 KB

Then include the jar with the JNI bindings as you need for your architecture

Android 32bit
jlibtorrent-android-arm-1.2.10.0.jar 2.36 MB
jlibtorrent-android-x86-1.2.10.0.jar2.72 MB

Android 64bit
jlibtorrent-android-arm64-1.2.10.0.jar 2.42 MB
jlibtorrent-android-x86_64-1.2.10.0.jar2.7 MB

Windows 64bit
jlibtorrent-windows-1.2.10.0.jar4.71 MB

macOS 64bit
jlibtorrent-macosx-1.2.10.0.jar 2.19 MB

Linux 64bit
jlibtorrent-linux-1.2.10.0.jar5.62 MB

[dev] How we got Travis Continuous Integration for multiple language projects in a mono repo

With every commit that makes it to the monorepo both the Android and Desktop project are built and tested. This post documents how we did that.

This post is intended to help developers on other projects where they need wish to start multiple travis jobs for completely different configurations.

Most documented examples on the web on how to use travis are usually focused only on building a single project in a single environment. But what if your repository has multiple projects that need to run under different contexts and programming languages.

At FrostWire we have a big monorepo which is host to multiple projects:

android/ # android client (java8, android-sdk environment gradle build)
desktop/ # desktop client and tests (java11+ gradle build)
common/ # common java sources for android and desktop projects


Travis allows you to define what we understand to be a “Job Matrix”, where each entry in this Matrix specifies an individual job (and they can run in parallel when you push your commit and travis gets word of it)

Here’s our first version of .travis.yml to build the android and desktop projects, and run tests jobs on a single git push:
matrix:
  include:
    # android build job
    - language: android
      dist: xenial
      android:
        components:
          - build-tools 29.0.2
          - android-29
          - extra-google-google_play_services
          - extra-google-m2repository
          - extra-android-m2repository
      licenses:
        - 'android-sdk-preview-license-52d11cd2'
        - 'android-sdk-license-.+'
        - 'google-gdk-license-.+'
      script:
        - yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;29.0.2"
        - cd android
        - pwd
        - ./gradlew assembleDebug
    # desktop build job
    - language: java
      jdk:
        - openjdk11
      script:
        - cd desktop
        - gradle build
    # desktop/common tests job
    - language: java
      jdk:
        - openjdk11
      script:
        - cd desktop
        - gradle test

New FrostWire 6.8.6 for Windows, macOS and Linux

Download the new release with the faster torrent downloads and improved search


Windows 64-bit:
frostwire-6.8.6.windows.github.exe38.2 MB

macOS 64-bit:
frostwire-6.8.6.dmg45.7 MB

Ubuntu/Debian 64-bit
frostwire-6.8.6.amd64.deb13.5 MB

Red Hat/RPM-based
frostwire-6.8.6.amd64.rpm14.9 MB

Java 11+ for any other OS
frostwire-6.8.6.amd64.tar.gz1 4.2 MB



Source code(zip)
Source code(tar.gz)

frostwire (6.8.6) stable; urgency=high

  • New jlibtorrent 1.2.8.0 update
  • New 1337x search (thanks to @HimanshuSharma789)
  • New iDope search (thanks to @HimanshuSharma789)
  • Fixed Torrentz2 search dates (thanks to @HimanshuSharma789)
  • Fixed Sound Cloud search
  • Discontinues mplayer video playback, uses os default video player for videos
  • com.google.re2j:re2j:1.3 -> 1.4
  • com.squareup.okhttp3:okhttp:4.4.1 -> 4.8.1
  • com.h2database:h2:1.4.199 -> 200
  • lt: validate UTF-8 encoding of client version strings from peers
  • lt: don’t time out tracker announces as eagerly while resolving hostnames
  • lt: fix NAT-PMP shutdown issue
  • lt: improve hostname lookup by merging identical lookups
  • lt: fix network route enumeration for large routing tables
  • lt: fixed issue where pop_alerts() could return old, invalid alerts
  • lt: fix issue when receiving have-all message before the metadata
  • lt: don’t leave lingering part files handles open
  • lt: disallow calling add_piece() during checking
  • lt: fix incorrect filename truncation at multi-byte character
  • lt: always announce listen port 1 when using a proxy

— FrostWire Team contact@frostwire.com Sun, 23 Aug 2020 10:45:00 -0600

New FrostWire 2.2.3 for Android

Download frostwire-android-release-2.2.3-b648-plus.apk 19.5 MB now.

FrostWire 2.2.3 build 648 – AUG/23/2020

  • jlibtorrent 1.2.7.0 -> 1.2.8.0 update
  • com.squareup.okhttp3:okhttp:4.4.1 -> 4.8.1
  • com.mopub:mopub-sdk-banner:5.12.0 -> 5.13.1
  • androidx.browser:browser:1.3.0-alpha04 -> 1.3.0-alpha05
  • com.google.re2j:re2j:1.3 -> 1.4
  • com.google.android.material:material:1.3.0-alpha01 -> 1.3.0-alpha02
  • com.google.android.gms:play-services-ads:19.2.0 -> 19.3.0
  • com.applovin:applovin-sdk:9.12.6 -> 9.13.1
  • com.unity3d.ads:unity-ads:3.4.2 -> 3.4.6
  • 1337 search fixed

New FrostWire 2.2.2 for Android with new search engine

frostwire-android-release-2.2.2-b645-plus.apk 19.3 MB

FrostWire 2.2.2 build 645 – JUL/18/2020

  • New 1337x (LeetX) search (thanks to @HimanshuSharma789 for his contribution)
  • New iDope search (thanks to @HimanshuSharma789 for his contribution)
  • Fixed Torrentz2 search dates (thanks to @HimanshuSharma789 for his contribution)
  • com.google.android.material:material:1.2.0-alpha06 -> 1.3.0-alpha01
  • androidx.browser:browser:1.3.0-alpha01 -> 1.3.0-alpha04
  • com.google.android.gms:play-services-ads:19.1.0 -> 19.2.0
  • com.android.billingclient:billing:2.2.0 -> 3.0.0

Source code(zip)

Source code(tar.gz)

Upgrading to FrostWire 6.8.5 on Ubuntu (troubleshooting possible OpenJDK14 dependency issues)

Download frostwire-6.8.5.amd64.deb

As of FrostWire 6.8.5 we’re moving all of our builds to run on OpenJDK14.

They linux build will still run fine with OpenJDK11 on your ${PATH} but we highly
recommend you have OpenJDK14 to help you sort out any weird behavior and reduce
JRE fragmentation on the network.

If you don’t have openjdk-14-jre installed when you install the FrostWire 6.8.5 .deb file you will get an error like the following:


Unpacking frostwire (6.8.5) ...
dpkg: dependency problems prevent configuration of frostwire:
frostwire depends on openjdk-14-jre-headless; however:
Package openjdk-14-jre-headless is not installed.


In order to solve just issue the command:

sudo apt -f install


It will try to pickup on the last failed install and download all the missing dependencies for you.

$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
openjdk-14-jre-headless
Suggested packages:
fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei
The following NEW packages will be installed:
openjdk-14-jre-headless
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
Need to get 43.2 MB of archives.
After this operation, 190 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 openjdk-14-jre-headless amd64 14~18-1 [43.2 MB]
Fetched 43.2 MB in 9s (4,920 kB/s)
Selecting previously unselected package openjdk-14-jre-headless:amd64.
(Reading database ... 377184 files and directories currently installed.)
Preparing to unpack .../openjdk-14-jre-headless_14~18-1_amd64.deb ...
Unpacking openjdk-14-jre-headless:amd64 (14~18-1) ...
Setting up openjdk-14-jre-headless:amd64 (14~18-1) ...
update-alternatives: using /usr/lib/jvm/java-14-openjdk-amd64/bin/jfr to provide /usr/bin/jfr (jfr) in auto mode
update-binfmts: warning: current package is openjdk-11, but binary format already installed by openjdk-6
Setting up frostwire (6.8.5) ...


If this doesn’t work out, that only means your apt sources can’t find the OpenJDK-14 ubuntu packages.
We recommend that you update your ubuntu to the latest version, by the time we wrote this post we were running ubuntu eoan.


If you can’t or won’t upgrade to ubuntu eoan, you can always add the package repo and install the openjdk manually


sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt update
sudo apt install openjdk-14-jre-headless


Why is the new .deb almost twice as large as the previous versions.

In the past, OpenJDK would include a tool called “pack200” which would allow us to greatly compress our Java .class files prior to packing everything in the .deb/.tar.gz or .rpm files

Oracle removed the pack200 tools from the OpenJDK starting at version 14.

Perhaps there were some impossible tradeoffs they made when compiling and pack200 was no longer a viable tool.

New FrostWire 6.8.5 for Desktop with libtorrent/1.2.7.0 and OpenJDK 14

Free Download installer links, with no bundled offers

Windows frostwire-6.8.5.windows.github.exe
macOS frostwire-6.8.5.dmg
Linux Ubuntu/Debian frostwire-6.8.5.amd64.deb
Linux RPM frostwire-6.8.5.amd64.rpm
Source code (.zip)
Source code (.tar.gz)

This is big release with the fastest downloads we’ve ever experienced on our desktop client.

We’ve done maintenance to all of our search providers and added a new one (MagnetDL).
Now when downloads fail to start you have a new action to “Retry Transfer”

We’ve gone from libtorrent/1.2.3 all the way to the latest 1.2.7 version giving you hundreds of performance updates and bug fixes that end up bringing the fastest downloads of any FrostWire release we’ve done.

On top of that, this new FrostWire is running on the latest stable Java Runtime, the OpenJDK 14.

Here is the full changelog.

frostwire (6.8.5) changelog

  • New MagnetDL search provider
  • Fixed Torrentz2 search
  • Search improvements
  • New ‘Retry’ transfer for failed magnet/torrent downloads with not enough peers
  • Fixes bug getting source URL from TPB search result
  • Fixes broken Library local file search
  • updated: rej2:1.3, gson:2.8.6, okhttp:4.4.1
  • New jlibtorrent 1.2.7.0 update
  • jlibtorrent upgraded to build with boost 1.73.0
  • jlibtorrent upgraded to openssl 1.1.1g
  • OpenJDK 14 runtime (Windows, Linux, macOS)
  • lt: fix incorrect filename truncation at multi-byte character
  • lt: always announce listen port 1 when using a proxy
  • lt: add set_alert_fd in python binding, to supersede set_alert_notify
  • lt: fix bug in part files > 2 GiB
  • lt: add function to clear the peer list for a torrent
  • lt: fix resume data functions to save/restore more torrent flags
  • lt: limit number of concurrent HTTP announces
  • lt: fix queue position for force_rechecking a torrent that is not auto-managed
  • lt: improve rate-based choker documentation, and minor tweak
  • lt: undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet)
  • lt: increase default tracker timeout
  • lt: retry failed socks5 server connections
  • lt: allow UPnP lease duration to be changed after device discovery
  • lt: fix IPv6 address change detection on Windows
  • lt: fix peer timeout logic
  • lt: simplify proxy handling. A proxy now overrides listen_interfaces
  • lt: fix issues when configured to use a non-default choking algorithm
  • lt: fix issue in reading resume data
  • lt: revert NXDOMAIN change from 1.2.4
  • lt: don’t open any listen sockets if listen_interfaces is empty or misconfigured
  • lt: fix bug in auto disk cache size logic
  • lt: fix issue with outgoing_interfaces setting, where bind() would be called twice
  • lt: add build option to disable share-mode
  • lt: support validation of HTTPS trackers
  • lt: deprecate strict super seeding mode
  • lt: make UPnP port-mapping lease duration configurable
  • lt: deprecate the bittyrant choking algorithm
  • lt: add build option to disable streaming

— FrostWire Team contact@frostwire.com Fri, 19 Jun 2020 19:55:00 -0600


New FrostWire 2.2.1 with libtorrent/jlibtorrent 1.2.7 is the fastest version ever

Download it now
frostwire-android-release-2.2.1-b641-plus.apk 19.3 MB

We went from jlibtorrent 1.2.3.0 onto 1.2.7.0 because we weren’t happy with how stable 1.2.4, 1.2.5 and 1.2.6 were, however the libtorrent 1.2.7 engine starts the downloads almost immediatly for decently seeded torrents and we’ve seen speeds above 7Mb/s on our testing environment.

Below the list of fixes, most coming from the libtorrent project.

FrostWire 2.2.1 build 641 – JUN/17/2020

  • jlibtorrent/libtorrent 1.2.7.0 update
  • OpenSSL 1.1.1g update
  • dev: jlibtorrent build with boost 1.73.0
  • Fixes bug getting source URL from TPB search result
  • lt: fix incorrect filename truncation at multi-byte character
  • lt: always announce listen port 1 when using a proxy
  • lt: add set_alert_fd in python binding, to supersede set_alert_notify
  • lt: fix bug in part files > 2 GiB
  • lt: add function to clear the peer list for a torrent
  • lt: fix resume data functions to save/restore more torrent flags
  • lt: limit number of concurrent HTTP announces
  • lt: fix queue position for force_rechecking a torrent that is not auto-managed
  • lt: improve rate-based choker documentation, and minor tweak
  • lt: undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet)
  • lt: increase default tracker timeout
  • lt: retry failed socks5 server connections
  • lt: allow UPnP lease duration to be changed after device discovery
  • lt: fix IPv6 address change detection on Windows
  • lt: fix peer timeout logic
  • lt: simplify proxy handling. A proxy now overrides listen_interfaces
  • lt: fix issues when configured to use a non-default choking algorithm
  • lt: fix issue in reading resume data
  • lt: revert NXDOMAIN change from 1.2.4
  • lt: don’t open any listen sockets if listen_interfaces is empty or misconfigured
  • lt: fix bug in auto disk cache size logic
  • lt: fix issue with outgoing_interfaces setting, where bind() would be called twice
  • lt: add build option to disable share-mode
  • lt: support validation of HTTPS trackers
  • lt: deprecate strict super seeding mode
  • lt: make UPnP port-mapping lease duration configurable
  • lt: deprecate the bittyrant choking algorithm
  • lt: add build option to disable streaming

Image credit to Marc-Olivier Jodoin
Royalty free image via Unsplash.com

New FrostWire for Android (2.1.10) fixes Music Playback on older Android Lollypop (5.x)

Sorry for the inconvenience to Lollypop users, not sure how music playback was broken, a last minute bug must have slipped in our last release. In any case, here’s a new installer that resolves music playback issues for all Lollypop releases.


frostwire-android-release-2.1.10-b638-plus.apk 19.4 MB

Running FrostWire with OpenJDK-Jre-13 binaries

Some of our friends not running FrostWire on Ubuntu have had LOTS of issues getting the old OpenJDK 11 JRE to install with their package managers, won’t name on what Linux distribution.

When your package managers fail, you can either compile the source, or if you can get a binary distribution from a reputable signed source you can add it to your PATH and FrostWire will use the `java` binary that’s on the linux PATH.

Here’s an email we wrote to one of our most patient Linux users, Cheers Donald!

1. go to your home folder
$ cd
2. If you don’t have a “src” folder in your home, let’s create one in your home folder. I use a “src” folder for everything that I compile or download this way already compiled that’s outside the apt realm
$ mkdir src

3. Download the JDK 13 SDK (187MB), much better,faster than the 11. (the -4 switch is to use IPv4, I had issues downloading via IPv6), there’s already JDK 14, but I won’t test it until we do the next build since the unpack tool has been removed and the installer won’t work with JDK14 *sigh*.
~/src$ wget -4 https://download.java.net/openjdk/jdk13/ri/openjdk-13+33_linux-x64_bin.tar.gz
Saving to: ‘openjdk-13+33_linux-x64_bin.tar.gz’
openjdk-13+33_linux-x64_bin.ta 100%[====================================================>] 187.27M  3.90MB/s    in 50s     
2020-04-15 22:20:30 (3.72 MB/s) - ‘openjdk-13+33_linux-x64_bin.tar.gz’ saved [196363513/196363513]
4. Untar and unzip the .tar.gz file
~/src$ tar xvfz openjdk-13+33_linux-x64_bin.tar.gz

...

jdk-13/lib/server/classes.jsa
jdk-13/lib/server/libjsig.so
jdk-13/lib/server/libjvm.so
jdk-13/lib/src.zip
jdk-13/lib/tzdb.dat
jdk-13/release
5. Make sure java 13 runs
~/src$ ./jdk-13/bin/java --version
openjdk 13 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
6. Let’s fix your ${JAVA_HOME} env variable on your .bashrc to be now, PATH should stay the same, the beauty of JAVA_HOME variable. We don’t add the ‘/bin’ at the end because we can use JAVA_HOME/lib and other folders for other things when we’re coding.
export JAVA_HOME=${HOME}/src/jdk-13

export PATH=${JAVA_HOME}/bin:${PATH}
7. You can reload the variables of your terminal by executing the .bashrc file (or opening a new terminal window)
$ source ~/.bashrc
8. Now if you run `java –version` you should see openjdk 13. Notice how my PATH has the old Java 11, but the new one at the start is parsed first
$ echo ${PATH}
/home/gubatron/src/jdk-13/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/gubatron/src/cmake-3.16.2-Linux-x86_64:/home/gubatron/src/gradle-6.1/bin::/bin::/usr/lib/jvm/java-11-openjdk-amd64/bin:/home/gubatron/src/android-studio/bin

$ java --version

openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
9. Install the latest frostwire 6.8.4 (if you don’t have it get it from here) with
$ sudo dpkg -i frostwire-6.8.4.amd64.deb

Selecting previously unselected package frostwire.
(Reading database ... 381934 files and directories currently installed.)
Preparing to unpack frostwire-6.8.4.amd64.deb ...
Unpacking frostwire (6.8.4) ...
Setting up frostwire (6.8.4) ...
Unpacking libraries...
Unpacking frostwire.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Unpacking gettext-ant-tasks-0.9.7.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Unpacking jlibtorrent-1.2.3.0.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Done unpacking
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
10. Run FrostWire
$ frostwire
HOSTNAME IS gubatron-VirtualBox
Starting FrostWire...
Java exec found in PATH. Verifying...
Suitable java version found [java = 13]
Configuring environment...
Loading FrostWire:
os.name="Linux"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.frostwire.gui.theme.ThemeMediator (file:/usr/lib/frostwire/frostwire.jar) to method java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object)
WARNING: Please consider reporting this to the maintainers of com.frostwire.gui.theme.ThemeMediator
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FrostWire version 6.8.4 build 292
OpenJDK 64-Bit Server VM Oracle Corporation 13 Oracle Corporation
Peer Fingerprint: -FW6842-
User Agent: FrostWire/6.8.4 libtorrent/1.2.3.0
Apr 16, 2020 1:38:49 PM BTEngine 
INFO: Listen succeeded on endpoint: 0.0.0.0:51302 type:TCP
...
Screen Shot 2020-04-16 at 1.39.00 PM