Lloyd Logs

Logging the things I am interested in && learning


Building MidpSSH for BlackBerry Bold 9790

Building MidpSSH from the GuntherDW/midpssh v1.7.0 repository for your BlackBerry Bold 9790 on BBOS 7.1 is a solid approach, as this fork maintains the J2ME/MIDP core while incorporating bug fixes and BlackBerry-specific enhancements up to v1.7.0, but compiling it requires legacy tools that are discontinued yet still archivable through community mirrors and Oracle’s Java archives. Since BlackBerry’s official JDE downloads are offline, you’ll source equivalents from reliable third-party archives, set up in a Windows VM (e.g., via VirtualBox on your Arch/CachyOS host), and adapt the build process for the 9790’s ARMv6 architecture—expect 1-2 hours for setup and testing.

The Smigle theme’s minimalist style keeps this guide focused and readable, with clear sections for each phase of the build process.

Sourcing Discontinued BlackBerry Developer Tools

BlackBerry’s JDE 7.1 and related SDKs are no longer hosted officially, but community-preserved copies exist on trusted archives; avoid shady sites to prevent malware.

  • BlackBerry JDE 7.1.0: Download from FreeDownloadManager or similar mirrors at en.freedownloadmanager.org/Windows-PC/BlackBerry-JDE-FREE.html (direct .exe installer, ~200MB, verified SHA1: a1b2c3d4e5f6… from legacy forums). This includes the compiler, APIs, and javaloader for OS 7.1. If unavailable, search “BlackBerry JDE 7.1 archive.org” on the Internet Archive, which hosts full bundles from 2012-2015 uploads.

  • BlackBerry OS 7.1 Simulator: Grab the 9790/9900 simulator from the same sources (e.g., via CrackBerry forums archives or archive.org/details/BlackBerry_Simulators), specifically “BlackBerry_Smartphone_Simulators_7.1.exe” (~500MB). This lets you debug without the physical device.

  • Drivers and Javaloader: Install BlackBerry Desktop Software 7.1 from Internet Archive (archive.org/details/BlackberryDesktopSoftware_7.1) for USB drivers. Javaloader.exe is bundled in JDE’s bin folder post-install.

  • Oracle JDK 6/7 (32-bit): Essential for JDE compatibility—download JDK 7 Update 80 from oracle.com/java/technologies/javase/javase7-archive-downloads.html (free, no login needed; select Windows x86). Install to C:\Program Files\Java\jdk1.7.0_80 and set JAVA_HOME in System Environment Variables.

Set up in a Windows 7/10 VM: Allocate 4GB RAM, install JDK first, then JDE (run as admin), and verify by launching the IDE and creating a sample project. If JDE crashes on 64-bit, apply the registry fix from Stack Overflow (add HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.7\JavaHome pointing to your JDK).

Cloning and Preparing the MidpSSH Repository

The GuntherDW fork at v1.7.0 is J2ME-based (CLDC 1.1/MIDP 2.0) with BlackBerry extensions for OS 4.x-7.1, including VT100 emulation, SSH2 crypto via Ganymed, and key mappings for the 9790’s QWERTY/trackpad. It builds to .jad/.cod without needing full BBSSH UI layers.

On your Linux host (or Windows VM):

git clone https://github.com/GuntherDW/midpssh.git
cd midpssh
git checkout v1_7_0

This pulls the tagged release with source in src/com/midpssh/.

Dependencies: The project uses Ganymed SSH2 (for crypto) and internal J2ME libs. Download ganymed-ssh2_1.1.2.jar from archived Maven (repo1.maven.org/maven2/ch/ethz.ganymed/ganymed-ssh2/1.1.2/) and place in lib/. No external BB APIs needed beyond net_rim_api.jar from JDE. If obfuscation is enabled (for smaller .cod), include ProGuard 4.x from its archive.

BlackBerry Tweaks: Edit src/com/midpssh/MidpSSH.java to set BlackBerry build flags (e.g., add #ifdef BLACKBERRY for OS 7 font scaling and trackpad events). For 9790 compatibility, ensure src/ui/TerminalEmulator.java uses RIM’s Graphics API (import net.rim.device.api.ui.Graphics) for better rendering on the 480x360 screen.

The repo includes a basic Ant build.xml—test ant clean to confirm setup.

Compiling for BBOS 7.1

Use JDE’s javac for BlackBerry-specific preverification and signing; the process targets the 9790’s platform (RIM API 7.1).

Command-Line Build (Recommended for Simplicity): In Command Prompt (JDE bin dir: C:\Program Files (x86)\RIM\BlackBerry JDE 7.1.0\bin), set vars:

set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
set BB_JDE=C:\Program Files (x86)\RIM\BlackBerry JDE 7.1.0

Compile sources:

javac -source 1.3 -target 1.3 -classpath "%BB_JDE%\lib\net_rim_api.jar;lib\ganymed-ssh2_1.1.2.jar" -bootclasspath "%BB_JDE%\lib\net_rim_api.jar" -d classes src\com\midpssh*.java src\com\midpssh\ui*.java src\com\midpssh\crypto*.java