vermut / sailfish-signature-spoofing

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
14 stars 12 forks source link

SailfishOS Android Signature Spoofing for Jolla/Xperia X

Compatibility

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

How this works

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:

Instructions

Starting Rsync daemon on Sailfish

cat > /root/rsyncd-alien.conf << 'EOF'
[alien]
 path=/opt/alien
 readonly=false
 uid=root
 gid=root 
EOF

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

Reverting the changes (if needed)

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/