Add MindTheGapps

This commit is contained in:
2meito
2024-12-03 20:44:32 -05:00
parent f32b7fa605
commit 7ab0b8d2d5
4 changed files with 127 additions and 1 deletions

3
.gitignore vendored
View File

@@ -110,4 +110,5 @@ ndk
widevine widevine
houdini houdini
litegapps litegapps
Dockerfile mindthegapps
Dockerfile

View File

@@ -39,6 +39,12 @@ python redroid.py -g
python redroid.py -lg python redroid.py -lg
``` ```
## Add MindTheGapps to ReDroid image
```bash
python redroid.py -mtg
```
## Add libndk arm translation to ReDroid image ## Add libndk arm translation to ReDroid image
<img src="./assets/2.png" style="zoom:50%;" /> <img src="./assets/2.png" style="zoom:50%;" />

View File

@@ -4,6 +4,7 @@ import argparse
from stuff.gapps import Gapps from stuff.gapps import Gapps
from stuff.litegapps import LiteGapps from stuff.litegapps import LiteGapps
from stuff.magisk import Magisk from stuff.magisk import Magisk
from stuff.mindthegapps import MindTheGapps
from stuff.ndk import Ndk from stuff.ndk import Ndk
from stuff.widevine import Widevine from stuff.widevine import Widevine
import tools.helper as helper import tools.helper as helper
@@ -32,6 +33,10 @@ def main():
dest='ndk', dest='ndk',
help='Install libndk translation files', help='Install libndk translation files',
action='store_true') action='store_true')
parser.add_argument('-mtg', '--install-mindthegapps',
dest='mindthegapps',
help='Install MindTheGapps to ReDroid',
action='store_true')
parser.add_argument('-m', '--install-magisk', dest='magisk', parser.add_argument('-m', '--install-magisk', dest='magisk',
help='Install Magisk ( Bootless )', help='Install Magisk ( Bootless )',
action='store_true') action='store_true')
@@ -60,6 +65,10 @@ def main():
LiteGapps(args.android).install() LiteGapps(args.android).install()
dockerfile = dockerfile + "COPY litegapps /\n" dockerfile = dockerfile + "COPY litegapps /\n"
tags.append("litegapps") tags.append("litegapps")
if args.mindthegapps:
MindTheGapps(args.android).install()
dockerfile = dockerfile + "COPY mindthegapps /\n"
tags.append("mindthegapps")
if args.ndk: if args.ndk:
if args.android in ["11.0.0", "12.0.0", "12.0.0_64only"]: if args.android in ["11.0.0", "12.0.0", "12.0.0_64only"]:
arch = helper.host()[0] arch = helper.host()[0]

110
stuff/mindthegapps.py Normal file
View File

@@ -0,0 +1,110 @@
import os
import shutil
from stuff.general import General
from tools.helper import get_download_dir, host, print_color, run, bcolors
class MindTheGapps(General):
dl_links = {
"14.0.0": {
"x86_64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-x86_64-20240226.zip",
"a827a84ccb0cf5914756e8561257ed13",
],
"x86": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-x86-20240226.zip",
"45736b21475464e4a45196b9aa9d3b7f",
],
"arm64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-arm64-20240226.zip",
"a0905cc7bf3f4f4f2e3f59a4e1fc789b",
],
"arm": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-14.0.0-arm-20240226.zip",
"fa167a3b7a10c4d3e688a59cd794f75b",
],
},
"13.0.0": {
"x86_64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-13.0.0-x86_64-20240226.zip",
"eee87a540b6e778f3a114fff29e133aa",
],
"x86": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-13.0.0-x86-20240226.zip",
"d928c5eabb4394a97f2d7a5c663e7c2e",
],
"arm64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-13.0.0-arm64-20240226.zip",
"ebdf35e17bc1c22337762fcf15cd6e97",
],
"arm": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-13.0.0-arm-20240619.zip",
"ec7aa5efc9e449b101bc2ee7448a49bf",
],
},
"13.0.0_64only": {
"x86_64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-13.0.0-x86_64-20240226.zip",
"eee87a540b6e778f3a114fff29e133aa",
],
"arm64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240226/MindTheGapps-13.0.0-arm64-20240226.zip",
"ebdf35e17bc1c22337762fcf15cd6e97",
],
},
"12.0.0_64only": {
"x86_64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-x86_64-20240619.zip",
"05d6e99b6e6567e66d43774559b15fbd"
],
"arm64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-arm64-20240619.zip",
"94dd174ff16c2f0006b66b25025efd04",
],
},
"12.0.0": {
"x86_64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-x86_64-20240619.zip",
"05d6e99b6e6567e66d43774559b15fbd"
],
"x86": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-x86-20240619.zip",
"ff2421a75afbdda8a003e4fd25e95050"
],
"arm64": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-arm64-20240619.zip",
"94dd174ff16c2f0006b66b25025efd04",
],
"arm": [
"https://github.com/s1204IT/MindTheGappsBuilder/releases/download/20240619/MindTheGapps-12.1.0-arm-20240619.zip",
"5af756b3b5776c2f6ee024a9f7f42a2f",
],
},
}
arch = host()
download_loc = get_download_dir()
dl_file_name = os.path.join(download_loc, "mindthegapps.zip")
dl_link = ...
act_md5 = ...
copy_dir = "./mindthegapps"
extract_to = "/tmp/mindthegapps/extract"
def __init__(self, version):
self.version = version
self.dl_link = self.dl_links[self.version][self.arch[0]][0]
self.act_md5 = self.dl_links[self.version][self.arch[0]][1]
def download(self):
print_color("Downloading MindTheGapps now .....", bcolors.GREEN)
super().download()
def copy(self):
if os.path.exists(self.copy_dir):
shutil.rmtree(self.copy_dir)
if not os.path.exists(self.extract_to):
os.makedirs(self.extract_to)
shutil.copytree(
os.path.join(self.extract_to, "system", ),
os.path.join(self.copy_dir, "system"), dirs_exist_ok=True, )