mirror of
https://github.com/YTVanced/Vanced
synced 2024-11-10 21:05:06 +00:00
18 lines
830 B
Python
18 lines
830 B
Python
import bsdiff4
|
|
import shutil
|
|
from pathlib import Path
|
|
|
|
for path in Path('./nonroot/Arch').rglob('*.apk'):
|
|
bsdiff4.file_diff(str(path).replace('nonroot', 'root'), path, './patches/Arch/' + path.name.replace('.apk','.bsdiff'))
|
|
|
|
for path in Path('./nonroot/Language').rglob('*.apk'):
|
|
bsdiff4.file_diff(str(path).replace('nonroot', 'root'), path, './patches/Language/' + path.name.replace('.apk','.bsdiff'))
|
|
|
|
for path in Path('./nonroot/Theme').rglob('*.apk'):
|
|
bsdiff4.file_diff('base.apk', path, './patches/Theme/' + path.name.replace('.apk','.bsdiff'))
|
|
|
|
for path in Path('./root/Theme').rglob('*.apk'):
|
|
bsdiff4.file_diff('base.apk', path, './patches/root/' + path.name.replace('.apk','.bsdiff'))
|
|
|
|
for path in Path('./patches').rglob('*.bsdiff'):
|
|
shutil.copy(path, './patches/' + str(path).replace('/', '-')[8:])
|