unix3dgforce / lpunpack Goto Github PK
View Code? Open in Web Editor NEWcommand-line tool for extracting partition images from super
License: GNU Lesser General Public License v3.0
command-line tool for extracting partition images from super
License: GNU Lesser General Public License v3.0
lpunpack is able to extract a Fairphone 4 super.img
file but --info
does not show any information:
$ python3 ~/compilethings/lpunpack/lpunpack.py --info super.nonsparse.img
$ python3 ~/compilethings/lpunpack/lpunpack.py super.nonsparse.img --format text --info
$ python3 ~/compilethings/lpunpack/lpunpack.py super.nonsparse.img test
Extracting partition [odm_a] .... [ok]
Extracting partition [odm_b] .... [ok]
Extracting partition [product_a] .... [ok]
Extracting partition [product_b] .... [ok]
Extracting partition [system_a] .... [ok]
Extracting partition [system_b] .... [ok]
Extracting partition [system_ext_a] .... [ok]
Extracting partition [system_ext_b] .... [ok]
Extracting partition [vendor_a] .... [ok]
Extracting partition [vendor_b] .... [ok]
Firmware download URL is https://support.fairphone.com/hc/en-us/articles/18896094650513-Installing-Fairphone-OS-Manually (Android 13, FP4-TP1V-factory.zip
)
$ python3 lpunpack/lpunpack.py -h
Traceback (most recent call last):
File "lpunpack/lpunpack.py", line 183, in
class UnpackJob:
File "lpunpack/lpunpack.py", line 186, in UnpackJob
parts: list[tuple[int, int]] = field(default_factory=list)
TypeError: 'type' object is not subscriptable
@unix3dgforce
LpMetadataPartition, LpMetadataExtent, LpMetadataPartitionGroup and LpMetadataBlockDevice are read from BackupMetadata instead from PrimaryMetadata.
Line 306 in 0d33cfa
Line 330 in 0d33cfa
Thanks
So I've been trying to unpack
OnePlus Nord 2 super images
But when extracting some partitions i get
python3 lpunpack.py -p odm super.img p
Traceback (most recent call last):
File "/storage/emulated/0/Download/update/lpunpack.py", line 450, in
LpUnpack(**vars(namespace)).unpack()
File "/storage/emulated/0/Download/update/lpunpack.py", line 405, in unpack
self.Extract(partition, metadata)
File "/storage/emulated/0/Download/update/lpunpack.py", line 369, in Extract
extent = metadata.extents[partition.first_extent_index]
IndexError: list index out of range
This happens both on PC and phone,
Just to add, if i don't specify any partition all files well be [OK] but they will be broken
Traceback (most recent call last):
File "/home/user/Apps/lpunpack/lpunpack.py", line 443, in <module>
LpUnpack(**vars(namespace)).unpack()
File "/home/user/Apps/lpunpack/lpunpack.py", line 377, in unpack
metadata = self.ReadMetadata()
File "/home/user/Apps/lpunpack/lpunpack.py", line 325, in ReadMetadata
group.name = str(group.name, 'utf-8').strip('\x00')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 8: invalid continuation byte
It's failing to read the group names because the offsets have been updated.
I run script to extract images, but it return error
File "/Users/bmx666/work/lpunpack/lpunpack.py", line 61
match attributes:
^
SyntaxError: invalid syntax
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.