Skip to content

Commit 2ad013a

Browse files
committed
aaa
1 parent de1e2c2 commit 2ad013a

File tree

5 files changed

+97
-4
lines changed

5 files changed

+97
-4
lines changed

README.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,69 @@
1-
# xapps2
2-
1+
# XAPPS v2
2+
3+
Uses github action to fetch and download latest apk from `config.yaml` and then packs it into `pakages.tar.gz` that can be easily extracted and installed via root or ADB
4+
5+
## Supports Downloading from:
6+
7+
- Github releases
8+
- F-Droid
9+
- PlayStore
10+
11+
## Usage
12+
13+
1. Fork And Edit config.yaml and choose addtional addons
14+
2. Start Github Action Manually
15+
16+
### APK Install Guide
17+
18+
<details>
19+
<summary><b>Expand</h3></summary>
20+
21+
Extract tarball to folder `pakages`
22+
23+
```bash
24+
tar -xvf pakages.tar.gz && rm pakages.tar.gz
25+
```
26+
27+
### Termux
28+
29+
**Note:** Use Latest [Termux from F-Droid](https://f-droid.org/en/packages/com.termux/)
30+
31+
- Root
32+
33+
```bash
34+
for app in pakages/*.apk; do
35+
pm install $app
36+
done
37+
```
38+
39+
- Non-root
40+
41+
```bash
42+
for app in pakages/*.apk; do
43+
termux-open $app
44+
sleep(8)
45+
done
46+
```
47+
48+
### ADB
49+
50+
Go to ADB folder, connect your phone and run the below commands in the terminal
51+
52+
> Powershell
53+
54+
```powershell
55+
Get-ChildItem "pakages/" -Filter *.apk |
56+
Foreach-Object {
57+
adb install -r $_.FullName
58+
}
59+
```
60+
61+
> Bash
62+
63+
```bash
64+
for app in pakages/*.apk; do
65+
adb install -r $app
66+
done
67+
```
68+
69+
</details>

config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,19 @@ custom:
7272
- app: Google Photos
7373
package: com.google.android.apps.photos
7474
source: playstore
75+
76+
- app: Termux
77+
package: com.termux
78+
source: fdroid
79+
80+
- app: Mi Remote controller
81+
package: com.duokan.phone.remotecontroller
82+
source: playstore
83+
84+
- app: Brave Private Browser
85+
package: com.brave.browser
86+
source: playstore
87+
88+
- app: Microsoft Teams
89+
package: com.microsoft.teams
90+
source: playstore

xapps2/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async def main():
3434

3535
sem = asyncio.Semaphore(6)
3636

37-
for addon in apps_conf["addons"]:
37+
for addon in set(apps_conf["addons"]):
3838
if func := getattr(apk_dl, addon, None):
3939
file_ext = ".zip" if "nikgapps" in addon else ".apk"
4040
tasks.append(
@@ -45,7 +45,7 @@ async def main():
4545
)
4646
)
4747

48-
for app in apps_conf["custom"]:
48+
for app in set(apps_conf["custom"]):
4949
apk_name = resolve_name(app["app"])
5050
source = app["source"]
5151
if source in ("fdroid", "playstore"):

xapps2/miscdl.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
from .config import DEVICE
1010
from .nikgappsdl import get_nikgapps
11+
import logging
12+
13+
LOG = logging.getLogger(__name__)
1114

1215

1316
class Sources:
@@ -82,12 +85,16 @@ async def nekox(self, varient: str = "mini") -> Optional[str]:
8285

8386
async def niksgapps(self, varient: str = "basic") -> Optional[str]:
8487
if DEVICE.arch != "arm64-v8a":
88+
print("Nikgapps: Device not compatible")
8589
return
8690
if link := await get_nikgapps(DEVICE.android_str, varient):
8791
async with self.http.get(link) as resp:
92+
print("Nikgapps: fetching link")
8893
assert resp.status == 200
8994
text = await resp.text()
95+
print("Nikgapps: getting text")
9096
if match := re.search(
9197
r"<a href=\"(?P<link>\S+)\">direct\slink</a>", text
9298
):
99+
print(match.group("link"))
93100
return match.group("link")

xapps2/nikgappsdl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ async def get_nikgapps(
1919
) -> Optional[str]:
2020
arch = "arm64" # Niksgapps has only arm64 varient
2121
gapp_choice = (f"nikgapps-{varient}-{arch}").lower()
22+
print("Searching Gapps")
2223
async for sf_link in iter_releases(android_str):
2324
if gapp_choice in sf_link.lower():
2425
break
@@ -28,4 +29,6 @@ async def get_nikgapps(
2829
"https://sourceforge\.net/projects/nikgapps/files/(?P<file>\S+\.zip)(?:/download)?",
2930
sf_link,
3031
):
32+
3133
return f"https://sourceforge.net/settings/mirror_choices?projectname=nikgapps&filename={match.group('file')}"
34+
print("no Gapps found")

0 commit comments

Comments
 (0)