From 0dd6e00544b8bcd924d0f32d0c34f5b2884dc8fc Mon Sep 17 00:00:00 2001 From: gutosie Date: Fri, 23 Dec 2022 21:10:50 +0200 Subject: [PATCH] Update extract.py --- NeoBoot/extract.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/NeoBoot/extract.py b/NeoBoot/extract.py index e3a3b45..484060b 100644 --- a/NeoBoot/extract.py +++ b/NeoBoot/extract.py @@ -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'