External Packages
The WiFi Pineapple Pager is built on top of the OpenWRT embedded Linux distribution.
OpenWRT includes a package management tool - opkg - and a collection of third-party packages.
These can be installed on the Pineapple Pager to add additional tools, however there are some precautions to follow. Read on for more information!
Advanced users
Installing third-party packages is done via the command line, and may have unforseen consequences.
Payloads which require external packages may ask to install them automatically. Installing packages manually may cause issues with available space, compatibility, or enabling services which disrupt normal operation of your Pineapple Pager. Only install third-party packages if you know the implications of the tool and if you are willing to risk a factory reset if the package causes conflcits. While most packages are fine, it is impossible to know that every package is compatible!
NEVER use opkg to update pre-installed system packages! Doing so will most likely break your device or lead to unusable core features. OpenWRT isn’t designed like a normal Linux distribution, and bulk-upgrading system packages will nearly always cause problems!
Installation locations
By default, opkg installs to the root overlay of the device. The root overlay is the remainder of the internal boot flash, after the core firmware is installed. Typically this is a very limited amount of space: less than 32MB is available after the WiFi Pineapple Pager firmware is installed. Completely filling the overlayfs may cause problems with your device.
opkg can install to the mmc, which is a 4GB storage device where /root, payloads, loot, and themes are also installed. When installing large third-party packages, it is always a good idea to install to the MMC partition:
root@pager:~# opkg install -d mmc python3
Use opkg install -d mmc ... to install packages to the much larger mmc partition!
Packages and upgrading
Packages installed to the root overlay will not persist over a firmware upgrade. Upgrading the firmware rebuilds the internal flash partitions, saving only specific configuration files.
Packages installed to mmc will persist over a firmware upgrade. It is possible that an upgrade to a future major release will break installed packages, however, depending on changes in the firmware. If, after an upgrade to a future major release, installed third-party binaries return an error, it may be necessary to update or reinstall them.
Installing packages
To install packages with opkg from the OpenWRT repository, your Pager needs Internet access.
To install third-party packages, first you must update the package listing. This is similar, for instance, to performing an apt update command on Debian or Ubuntu.
root@pager:~# opkg update
Once the opkg database is updated, packages can be found via opkg list. Combine this with grep to find a specific package by name:
root@pager:~# opkg list | grep python3
Packages can then be installed using opkg install. Remember to use opkg install -d mmc to install packages to the larger MMC partition!
Python and PIP
When installing Python packages, always prefer a packaged solution for a module. OpenWRT includes many Python3 modules pre-packaged.
Installing a Python package via Pip may trigger compiling C native code or other dynamic components. Typically compiling on the Pager directly is not supported and will have mixed results at best.
Disclaimer
REMEMBER: Installing third-party packages via opkg is done at your own risk. Changing system configuration or packages outside of the Pineapple environment, or installing different versions of system packages, may break Pineapple services.
As always, Hak5 supports the idea that you should be able to do whatever you want with your own hardware - but we cannot guarantee that third party packages will be compatible.
As always, factory reset and in extreme cases, firmware recovery options exist if a package prevents your Pager from operating properly.