A few fixes
This commit is contained in:
parent
4f3569cebc
commit
694fd922d5
0
Magisk-v23.0/LICENSE
Normal file → Executable file
0
Magisk-v23.0/LICENSE
Normal file → Executable file
@ -68,6 +68,7 @@ def downloadUpdate(device, version):
|
|||||||
for chunk in r.iter_content(chunk_size=4096):
|
for chunk in r.iter_content(chunk_size=4096):
|
||||||
fout.write(chunk)
|
fout.write(chunk)
|
||||||
|
|
||||||
|
time.sleep(2) # Hash check was failing
|
||||||
print('Comparing hashes...', end='', flush=True)
|
print('Comparing hashes...', end='', flush=True)
|
||||||
checkHash(filename)
|
checkHash(filename)
|
||||||
print(' [OK]')
|
print(' [OK]')
|
||||||
@ -130,13 +131,10 @@ def getCurrentSlot():
|
|||||||
return currentSlot
|
return currentSlot
|
||||||
|
|
||||||
|
|
||||||
def cleanUp():
|
def cleanUp(filename):
|
||||||
cmd = ['rm', 'payload.bin', 'boot.img']
|
cmd = ['rm', 'payload.bin', 'boot.img', filename]
|
||||||
subprocess.run(cmd, stdout=subprocess.DEVNULL)
|
subprocess.run(cmd, stdout=subprocess.DEVNULL)
|
||||||
|
|
||||||
cmd = ['rm', 'lineage-*.zip']
|
|
||||||
subprocess.run(cmd, shell=True, stdout=subprocess.DEVNULL)
|
|
||||||
|
|
||||||
magiskFilelist = ['kernel', 'kernel_dtb', 'ramdisk.cpio', 'new-boot.img',
|
magiskFilelist = ['kernel', 'kernel_dtb', 'ramdisk.cpio', 'new-boot.img',
|
||||||
'stock_boot.img']
|
'stock_boot.img']
|
||||||
for f in magiskFilelist:
|
for f in magiskFilelist:
|
||||||
@ -193,7 +191,7 @@ if __name__ == "__main__":
|
|||||||
print(' [OK]')
|
print(' [OK]')
|
||||||
|
|
||||||
print('Cleaning up files...', end='', flush=True)
|
print('Cleaning up files...', end='', flush=True)
|
||||||
cleanUp()
|
cleanUp(filename)
|
||||||
print(' [OK]')
|
print(' [OK]')
|
||||||
|
|
||||||
print('Rebooting device, enjoy Magisk! ;)')
|
print('Rebooting device, enjoy Magisk! ;)')
|
||||||
|
Reference in New Issue
Block a user