Update extract.py

This commit is contained in:
gutosie
2022-12-23 21:10:50 +02:00
committed by GitHub
parent 9edf2f0d5b
commit 0dd6e00544

View File

@@ -1700,7 +1700,27 @@ def NEOBootExtract(source, target, ZipDelete, Nandsim):
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dinobot/u55'):
os.system('echo "Please wait. System installation dinobot w toku..."')
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dinobot/uu55; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dinobot/u55/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'
rc = os.system(cmd)
rc = os.system(cmd)
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dinobot/u55'):
os.chdir('u55')
if os.path.exists('' + getNeoLocation() + 'ImagesUpload/dinobot/u55'):
os.chdir('u55')
os.system('echo "Instalacja - ubi_reader w toku..."')
print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target")
cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py'
rc = os.system(cmd)
cmd = 'python ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py rootfs.bin -o ' + getNeoLocation() + 'ubi'
rc = os.system(cmd)
os.chdir('/home/root')
cmd = 'cp -af -p ' + getNeoLocation() + 'ubi/rootfs/* ' + getNeoLocation() + 'ImageBoot/' + target
rc = os.system(cmd)
cmd = 'chmod -R +x ' + getNeoLocation() + 'ImageBoot/' + target
rc = os.system(cmd)
cmd = 'rm -rf ' + getNeoLocation() + 'ubi'
rc = os.system(cmd)
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dinobot/u5pvr'):
os.system('echo "Please wait. System installation dinobot w toku..."')
cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dinobot/u5pvr; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dinobot/u5pvr/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1'