Update extract.py

This commit is contained in:
gutosie
2023-01-10 08:23:04 +02:00
committed by GitHub
parent 48455ef93a
commit 127e63cf0d

View File

@@ -1428,11 +1428,14 @@ def NEOBootExtract(source, target, ZipDelete, Nandsim):
#ARM
elif getCPUtype() == 'ARMv7':
os.chdir('' + getNeoLocation() + 'ImagesUpload')
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9/rootfs.ubi') or os.path.exists('' + getNeoLocation() + 'ImagesUpload/h8/rootfs.ubi'):
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9/rootfs.ubi') or os.path.exists('' + getNeoLocation() + 'ImagesUpload/h8/rootfs.ubi') or os.path.exists('' + getNeoLocation() + 'ImagesUpload/e2/update/rootfs.ubi'):
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9/rootfs.ubi'):
os.chdir('h9')
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h8/rootfs.ubi'):
os.chdir('h8')
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/e2/update/rootfs.ubi'):
os.system('mv -f ' + getNeoLocation() + 'ImagesUpload/e2/update/rootfs.ubi/rootfs.ubi ' + getNeoLocation() + 'ImagesUpload/e2')
os.chdir('e2')
os.system('mv -f rootfs.ubi rootfs.bin')
os.system('echo "Instalacja - ubi_reader w toku..."')
print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target")