This only works with older Sailfish devices that uses the Android 4.4 runtime, e.g. the "Xperia X".
If you are using an newer Sailfish device, like the "Xperia XA2" which uses the Android 8.x runtime and LXC containers, please checkout this: sailfish-signature-spoofing-lxc
This is a compiled set of instructions and tools wrapped in Docker image to fetch, deodex, patch and upload back AlienDalvik files on Sailfish phones.
Most of the existing tools assume adb
as transport. In Sailfish it's a bit tricky so I replaced it with Rsync.
Please note that Rsync is run in completely insecure manner, so don't leave it running in public unprotected networks.
Overview of the steps performed by the scripts:
/opt/alien/system/{framework,app,priv-app}
hook
and core
patches from haystack/opt/alien/system/{framework,app,priv-app}.pre_haystack
Starting Rsync daemon on Sailfish
devel-su
cat > /root/rsyncd-alien.conf << 'EOF'
[alien]
path=/opt/alien
readonly=false
uid=root
gid=root
EOF
make sure your firewall accepts connections on port 873
iptables -A connman-INPUT -i wlan0 -p tcp -m tcp --dport 873 -j ACCEPT
run daemon in foreground with logging
rsync --daemon --no-detach --verbose --config=/root/rsyncd-alien.conf --log-file=/dev/stdout
Execute docker image
Make sure docker is available on you machine and running
docker run --rm -ti --env SAILFISH=<PHONE_IP_ADDRESS> vermut/sailfish-signature-spoofing
Final steps
cd /opt/alien/system
cp -r --reply=yes -v framework.pre_haystack/* framework/
cp -r --reply=yes -v app.pre_haystack/* app/
cp -r --reply=yes -v priv-app.pre_haystack/* priv-app/
cd /opt/alien/system_jolla
cp -r --reply=yes -v framework.pre_haystack/* framework/
cp -r --reply=yes -v app.pre_haystack/* app/
cp -r --reply=yes -v priv-app.pre_haystack/* priv-app/