This guide teaches you how to install PimpMystremio on your android device. Please keep in mind that this is just an expirement. I strongly recommend to use PMS on your computer when possible.
You do not need root access or a high end phone to follow this guide. The only thing you need is +-2.5GB of free storage and a basic understanding of linux.
First of all, go to the playstore and install termux (?). Temux is a terminal emulator that allows you to run basic linux commands on your android device. We will use this to install a Ubuntu chroot/proot container that will run PMS.
Secondly, go get the Hacker's Keyboard. It makes typing and navigation on termux way easier.
Configure SSH access (optional)
Typing long commands on a mobile device is a pain, so I recommend setting up a SSH server on your device so you can access termux through a SSH client on your PC. Run the following commands in termux to install the OpenSSH server:
pkg update
pkg install openssh
Next we need to edit the openssh configuration file so we can enable authentication and set the port number. Make sure you're in your home directory (cd $prefix
) and enter the following commands:
pkg install nano
nano ../usr/etc/ssh/sshd_config
Add/edit these lines:
PasswordAuthentication yes
Port 8022
Press CTRL + X, type the letter 'y' and then press ENTER to save the changes.
Now run passwd
to setup a password.
Next, get the private ip address of your device by running ifconfig
(your device is probably on wifi so it will most likely be the inet addr
of wlan0
). Note it down.
Then run whoami
and note down the username.
Finally, enter the command sshd
and you're finally ready to switch over to your PC!
On you PC, install a SSH client like putty. Connect to the ip address you just noted down and use port 8022
. When prompted, enter your username and the password you set up earlier.
Termux by itself is pretty limited and without root access we can't access or do as much as we like. This is why we need to install an ubuntu chroot/proot container, which is kinda like a sandbox with it's own 'virtual' permissions.
I figured ubuntu is a good option, but termux supports many distro's so feel free to experiment with this.
Run the following commands to install ubuntu:
pkg update && pkg install wget proot
mkdir ubuntu
cd ubuntu
wget https://raw.githubusercontent.com/Neo-Oli/termux-ubuntu/master/ubuntu.sh
bash ubuntu.sh
This will download & install the distro and it might take a while, depending on your internet connection.
When finished, start ubuntu by running ./start-ubuntu.sh
You will need to run this command everytime you want to access your ubuntu environment from termux.
Note: If you get a message saying something in the lines of groups: cannot find name for group ID 3014
, just ignore it. It's fine.
Run apt update
once after accessing your ubuntu environment for the first time. This will make sure we got access to all and the latest packages.
At the time of writing, PMS will skip internal modules when they are not found. You only have to install any of the modules listed below if you're installing an addon that depends on it.
PhantomJS is a headless browser mostly used for web automation and scraping. It can't be auto-installed by PMS yet so we have to install it ourself.
apt install -y phantomjs
export QT_QPA_PLATFORM=offscreen && echo "export QT_QPA_PLATFORM=offscreen" >> /etc/profile
Almost there!
apt install -y git nodejs npm
git clone https://github.com/sungshon/PimpMyStremio.git
cd PimpMyStremio/src
Finally, install the remaining dependencies: npm install --production
Start PMS with npm start
. Open 127.0.0.1:7777
in your browser to access the web page. From here on you can use it just like you would on PC and install addons for mobile Stremio!
You can create a shell script to start PMS in one go. If you want to start PMS at boot or from your homescreen, check out Termux:Boot and Termux:Widget.
To start, make sure your current working directory is the Termux home directory (cd ~
). If you're still inside the ubuntu container, you can exit it using the exit
command.
Create the script by executing the following:
touch start-pms.sh
echo "proot --link2symlink -0 -r ubuntu/ubuntu-fs -b /dev -b /proc -w /root /usr/bin/env -i HOME=/root PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/games:/usr/local/games TERM=xterm LANG=C.UTF-8 /bin/bash -c \"cd /root/PimpMyStremio/src && node index.js\"" > start-pms.sh
chmod +x start-pms.sh
unset LD_PRELOAD
Run it: ./start-pms.sh
.
Follow the Termux docs for your extension of choice. At some point, you'll have to add a shell script to a directory. To create a script that executes the autostart script we created earlier, execute the following commands:
touch start-pms.sh
echo "~/start-pms.sh" > start-pms.sh
chmod +x start-pms.sh
Help?
0 info it worked if it ends with ok
1 warn npm npm does not support Node.js v13.0.0
2 warn npm You should probably upgrade to a newer version of node as we
3 warn npm can't make any promises that npm will work with this version.
4 warn npm Supported releases of Node.js are the latest release of 6, 8, 9, 10, 11, 12.
5 warn npm You can find the latest version at https://nodejs.org/
6 verbose cli [
6 verbose cli '/data/data/com.termux/files/usr/bin/node',
6 verbose cli '/data/data/com.termux/files/usr/bin/npm',
6 verbose cli 'start'
6 verbose cli ]
7 info using [email protected]
8 info using [email protected]
9 verbose config Skipping project config: /data/data/com.termux/files/home/.npmrc. (matches userconfig)
10 verbose stack Error: ENOENT: no such file or directory, open '/data/data/com.termux/files/home/package.json'
11 verbose cwd /data/data/com.termux/files/home
12 verbose Linux 3.18.91-15877854-QB23329250
13 verbose argv "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/bin/npm" "start"
14 verbose node v13.0.0
15 verbose npm v6.12.0
16 error code ENOENT
17 error syscall open
18 error path /data/data/com.termux/files/home/package.json
19 error errno -2
20 error enoent ENOENT: no such file or directory, open '/data/data/com.termux/files/home/package.json'
21 error enoent This is related to npm not being able to find a file.
22 verbose exit [ -2, true ]
Edit:tried again.After the install i got this:
Building dependency tree
Reading state information... Done
phantomjs is already the newest version (2.1.1+dfsg-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libfprint0:arm64 (1:0.8.2-3) ...
Failed to scan devices: No such file or directory
dpkg: error processing package libfprint0:arm64 (--configure):
installed libfprint0:arm64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of fprintd:
fprintd depends on libfprint0 (>= 1:0.4.0); however:
Package libfprint0:arm64 is not configured yet.
dpkg: error processing package fprintd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-fprintd:arm64:
libpam-fprintd:arm64 depends on fprintd (= 0.8.1-1); however:
Package fprintd is not configured yet.
dpkg: error processing package libpam-fprintd:arm64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.29-0ubuntu2) ...