waydroid_script/stuff/hidestatusbar.py

32 lines
983 B
Python
Raw Normal View History

2023-01-27 05:54:26 -08:00
import os
import shutil
2023-05-04 07:51:32 -07:00
from stuff.general import General
2023-01-27 05:54:26 -08:00
2023-04-29 08:00:42 -07:00
2023-01-27 05:54:26 -08:00
class HideStatusBar(General):
2023-04-29 08:00:42 -07:00
id = "hide status bar"
2023-07-01 10:50:19 -07:00
dl_links = {"11": ["https://github.com/ayasa520/hide-status-bar/releases/download/v0.0.2/app-release.apk",
"ff2fe63ddfb4b035e6720a1b195b2355"]}
2023-01-27 05:54:26 -08:00
partition = "system"
dl_file_name = "hidestatusbar.apk"
2023-04-29 08:00:42 -07:00
dl_link = ...
act_md5 = ...
2023-01-27 05:54:26 -08:00
files = [
2023-04-29 08:00:42 -07:00
"product/overlay/"+dl_file_name
]
def __init__(self, android_version="11") -> None:
super().__init__()
self.dl_link = self.dl_links[android_version][0]
self.act_md5 = self.dl_links[android_version][1]
2023-01-27 05:54:26 -08:00
def copy(self):
2023-04-29 08:00:42 -07:00
rro_dir = os.path.join(
self.copy_dir, self.partition, "product", "overlay")
2023-01-27 05:54:26 -08:00
if not os.path.exists(rro_dir):
os.makedirs(rro_dir)
2023-04-29 08:00:42 -07:00
shutil.copyfile(self.download_loc, os.path.join(
rro_dir, "hidestatusbar.apk"))
2023-01-27 05:54:26 -08:00
def skip_extract(self):
2023-04-29 08:00:42 -07:00
return True