Skip to content

Running LineageOS update-payload-extractor on Debian 11

When you need to extract a LineageOS system image, you need its update-payload-extractor script, which is written in Python2. Debian 11 is a bit hostile to Python2, so you’ll need to install some packages (as root or sudo) via apt and pip.

Start here:

apt install python python2 python-six python2.7-dev liblzma-dev

Now get pip2:

curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py

Install it like a fool:

python2 get-pip.py

And then finally install the needed python modules.

pip2 install protobuf

pip2 install pyliblzma

Now you can unzip your .zip image and run extract.py on the payload.bin file. All the parts will wind up in an output/ subdirectory.

Happy rooting!