-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathvendorsetup.sh
More file actions
executable file
·85 lines (70 loc) · 2.69 KB
/
Copy pathvendorsetup.sh
File metadata and controls
executable file
·85 lines (70 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
# be strict on failures
set -e
echo "vendor/partner_gms/vendorsetup.sh called"
download_apk() {
local source_apk=$1
local component_name=$2
local destination_apk
destination_apk="$component_name"/"$component_name".apk
if [ -f "$destination_apk" ]; then
echo "$destination_apk exists: not downloading"
## To Do
# Deal with the situation where we have an OLDER version hanging around
# may have to be handled in the Docker image
else
# echo "downloading $source_apk to $destination_apk"
curl -L --output "$destination_apk" "$source_apk"
fi
}
get-fdroid-components() {
local fdroid_repo="https://f-droid.org/repo/"
local name apk_to_download versioncode id
# F-Droid client app
name="FDroid"
versioncode=$(cat "$name"/.version_code)
id="org.fdroid.fdroid"
apk_to_download="$fdroid_repo"/"$id"_"$versioncode".apk
# echo "$name apk_to_download: $apk_to_download"
download_apk "$apk_to_download" "$name"
# FDroid Privileged Extension
name="FDroidPrivilegedExtension"
versioncode=$(cat "$name"/.version_code)
id="org.fdroid.fdroid.privileged"
apk_to_download="$fdroid_repo"/"$id"_"$versioncode".apk
# echo "$name apk_to_download: $apk_to_download"
download_apk "$apk_to_download" "$name"
}
get-microg-components() {
local microg_repo_base="https://github.com/microg"
local name apk_to_download versioncode id
microg_release=$(cat ".microg_release")
# GmsCore
name="GmsCore"
versioncode=$(cat "$name"/.version_code)
id="com.google.android.gms"
apk_to_download="$microg_repo_base"/GMSCore/releases/download/"$microg_release"/"$id"-"$versioncode".apk
# echo "$name apk_to_download: $apk_to_download"
download_apk "$apk_to_download" "$name"
# FakeStore
name="FakeStore"
versioncode=$(cat "$name"/.version_code)
id="com.android.vending"
apk_to_download="$microg_repo_base"/GMSCore/releases/download/"$microg_release"/"$id"-"$versioncode".apk
# echo "$name apk_to_download: $apk_to_download"
download_apk "$apk_to_download" "$name"
# GsfProxy the file we want is
#`https://github.com/microg/android_packages_apps_GsfProxy/releases/download/v0.1.0/GsfProxy.apk`
name="GsfProxy"
versioncode=$(cat "$name"/.version_code)
apk_to_download="$microg_repo_base"/android_packages_apps_GsfProxy/releases/download/"$versioncode"/"$name".apk
# echo "$name apk_to_download: $apk_to_download"
download_apk "$apk_to_download" "$name"
}
# This script is called from the root dierctory, so we need to cd
cd vendor/partner_gms
get-fdroid-components
get-microg-components
# and back to the root directory
cd ../..
set +e