Update extract.py

This commit is contained in:
gutosie
2023-01-10 12:25:11 +02:00
committed by GitHub
parent 127e63cf0d
commit 025d318632

View File

@@ -986,10 +986,6 @@ def NEOBootExtract(source, target, ZipDelete, Nandsim):
brand = ''
#NANDSIM
#if Nandsim == 'True' and os.path.exists('/lib/modules/%s/kernel/drivers/mtd/nand/nandsim.ko' % getKernelVersion()):
if not os.path.exists('/lib/modules/%s/kernel/drivers/mtd/nand/nandsim.ko' % getKernelVersion()):
os.system('cp -r /lib/modules/*/kernel/drivers/mtd/nand/nandsim.ko /tmp')
if Nandsim == 'True' or os.path.exists('/tmp/.isnandsim') or os.path.exists('/lib/modules/%s/kernel/drivers/mtd/nand/nandsim.ko' % getKernelVersion()):
for i in range(0, 20):
mtdfile = '/dev/mtd' + str(i)
@@ -1434,7 +1430,7 @@ def NEOBootExtract(source, target, ZipDelete, Nandsim):
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.system('mv -f ' + getNeoLocation() + 'ImagesUpload/e2/update/rootfs.ubi ' + getNeoLocation() + 'ImagesUpload/e2')
os.chdir('e2')
os.system('mv -f rootfs.ubi rootfs.bin')
os.system('echo "Instalacja - ubi_reader w toku..."')