Update extract.py

This commit is contained in:
gutosie
2021-09-19 22:54:44 +03:00
committed by GitHub
parent 7ed8ede973
commit 33c7e9ce25

View File

@@ -1292,6 +1292,25 @@ def NEOBootExtract(source, target, ZipDelete):
rc = os.system(cmd)
cmd = 'rm -rf ' + getNeoLocation() + 'ubi'
rc = os.system(cmd)
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/lunix/cfe/oe_rootfs.bin'):
#os.chdir('' + getNeoLocation() + 'ImagesUploadupdate/lunix/cfe')
#os.system('mv -f oe_rootfs.bin rootfs.bin')
os.system('mv -f ' + getNeoLocation() + 'ImagesUpload/update/lunix/cfe/oe_rootfs.bin ' + getNeoLocation() + 'ImagesUpload/rootfs.bin')
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)
#vuplus________________________
elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/solo4k'):
os.system('echo "Please wait. System installation VuPlus Solo4K."')