Skip to content

Commit 414f742

Browse files
committed
chore: sync with microG unofficial installer
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 4b09213 commit 414f742

File tree

5 files changed

+127
-42
lines changed

5 files changed

+127
-42
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Google sync add-on
88
:Author: `ale5000 <https://github.com/ale5000-git>`_
99
:License: `GPLv3.0 or later <./LICENSE.rst>`_
1010

11+
.. image:: https://app.readthedocs.org/projects/google-sync-addon/badge/?version=latest
12+
:alt: Documentation status
13+
:target: https://google-sync-addon.readthedocs.io/en/latest/
14+
1115
.. image:: https://codecov.io/gh/micro5k/google-sync-addon/branch/main/graph/badge.svg
1216
:alt: Coverage
1317
:target: https://codecov.io/gh/micro5k/google-sync-addon

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ ZIP_SHA256="$(cut -d ' ' -f '1' -s 0< "${OUT_DIR:?}/${FILENAME:?}${FILENAME_EXT:
357357

358358
ZIP_MD5=''
359359
if test "${FAST_BUILD:-false}" = 'false'; then
360-
md5sum -b -- "${FILENAME:?}${FILENAME_EXT:?}" > "${OUT_DIR:?}/${FILENAME:?}${FILENAME_EXT:?}.md5" || ui_error 'Failed to compute the MD5 hash'
360+
# Weak hash used only as a secondary verification (on legacy Android custom recoveries); no security impact
361+
md5sum -b -- "${FILENAME:?}${FILENAME_EXT:?}" > "${OUT_DIR:?}/${FILENAME:?}${FILENAME_EXT:?}.md5" || ui_error 'Failed to compute the MD5 hash' # NOSONAR
361362
ZIP_MD5="$(cut -d ' ' -f '1' -s 0< "${OUT_DIR:?}/${FILENAME:?}${FILENAME_EXT:?}.md5")" || ui_error 'Failed to read the MD5 hash'
362363
fi
363364

docs/BUILD.rst

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ Includes all components (proprietary and open-source):
2424
2525
make buildota
2626
27-
Open-source flavour
28-
-------------------
29-
30-
Includes only open-source components:
31-
32-
.. code-block:: sh
33-
34-
make buildotaoss
35-
3627
Test the build
3728
--------------
3829

@@ -43,7 +34,7 @@ Emulates an Android recovery on the PC and runs the produced zip inside it:
4334
make test
4435
4536
.. note::
46-
Run ``buildota`` or ``buildotaoss`` first so that the zip exists in the ``output/`` folder.
37+
Run ``buildota`` first so that the zip exists in the ``output/`` folder.
4738

4839

4940
`Gradle wrapper <https://docs.gradle.org/current/userguide/gradle_wrapper.html>`_
@@ -58,15 +49,6 @@ Includes all components (proprietary and open-source):
5849
5950
./gradlew buildOta
6051
61-
Open-source flavour
62-
-------------------
63-
64-
Includes only open-source components:
65-
66-
.. code-block:: sh
67-
68-
./gradlew buildOtaOSS
69-
7052
Test the build
7153
--------------
7254

@@ -77,7 +59,7 @@ Emulates an Android recovery on the PC and runs the produced zip inside it:
7759
./gradlew installTest
7860
7961
.. note::
80-
Run ``buildOta`` or ``buildOtaOSS`` first so that the zip exists in the ``output/`` folder.
62+
Run ``buildOta`` first so that the zip exists in the ``output/`` folder.
8163

8264

8365
`VS Code <https://code.visualstudio.com/>`_
@@ -90,13 +72,6 @@ Includes all components (proprietary and open-source):
9072

9173
Open the project in VS Code and run the ``buildOta`` task.
9274

93-
Open-source flavour
94-
-------------------
95-
96-
Includes only open-source components:
97-
98-
Open the project in VS Code and run the ``buildOtaOSS`` task.
99-
10075
Test the build
10176
--------------
10277

@@ -105,4 +80,4 @@ Emulates an Android recovery on the PC and runs the produced zip inside it:
10580
Open the project in VS Code and run the ``installTest`` task.
10681

10782
.. note::
108-
Run ``buildOta`` or ``buildOtaOSS`` first so that the zip exists in the ``output/`` folder.
83+
Run ``buildOta`` first so that the zip exists in the ``output/`` folder.

docs/INSTRUCTIONS.rst

Lines changed: 92 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
1+
############
2+
Instructions
3+
############
14
..
25
SPDX-FileCopyrightText: (c) 2016 ale5000
36
SPDX-License-Identifier: GPL-3.0-or-later
47
SPDX-FileType: DOCUMENTATION
58
6-
============
7-
Instructions
8-
============
9+
You can `build it yourself <./BUILD.rst>`_ or download the prebuilt version.
910

10-
You can build it yourself or download the prebuilt version.
11+
.. contents:: Contents:
12+
:local:
13+
:depth: 2
14+
:backlinks: none
1115

1216

13-
Build
14-
-----
17+
Prerequisites
18+
=============
1519

16-
``./gradlew buildOta``
20+
- An Android device or emulator running **Android 4.4 or later**.
21+
- A custom recovery (see `Supported recoveries`_ below) or root access.
22+
23+
Supported recoveries
24+
--------------------
25+
26+
The following custom recoveries are supported:
27+
28+
- `TWRP <https://twrp.me/>`_ (Team Win Recovery Project)
29+
- `OrangeFox Recovery <https://orangefox.download/>`_
30+
- `PitchBlack Recovery Project (PBRP) <https://pitchblackrecovery.com/>`_
31+
- `SKYHAWK Recovery Project (SHRP) <https://skyhawkrecovery.github.io/>`_
32+
- `LineageOS Recovery <https://github.com/LineageOS/android_bootable_recovery>`_
33+
- `ClockworkMod Recovery (CWM) <https://en.wikipedia.org/wiki/ClockworkMod>`_
34+
- `PhilZ Touch Recovery <https://xdaforums.com/t/2015-10-09-cwm-6-0-5-1-philz-touch-6-59-0-libtouch_gui-1-42.2201860/>`_
35+
- `Omni Recovery <https://github.com/omnirom/android_bootable_recovery>`_
1736

1837

1938
Download
20-
--------
39+
========
2140

2241
You can find the stable releases here:
2342

@@ -26,3 +45,68 @@ You can find the stable releases here:
2645
Instead if you want to try the nightly builds you can find them here:
2746

2847
- `Nightly - Full flavour <https://gitlab.com/micro5k/google-sync-addon/-/jobs/artifacts/main/browse/output?job=build-job>`_
48+
49+
50+
Installation
51+
============
52+
53+
The methods below are **mutually exclusive**, choose **one** that matches your setup and follow only those steps.
54+
55+
.. tip::
56+
Regardless of which installation method you choose, you can pre-configure options before flashing by setting system properties on the device.
57+
For example, to enable a longer live setup timeout:
58+
59+
.. code-block:: sh
60+
61+
adb shell "setprop zip.google-sync-addon.LIVE_SETUP_TIMEOUT 8"
62+
63+
Via custom recovery
64+
-------------------
65+
66+
1. Transfer the flashable zip to your device's internal storage or microSD card.
67+
2. Reboot into recovery (hold **Power + Volume Down** — exact key combination depends on your device).
68+
3. In TWRP, tap **Install**, navigate to the zip file and select it.
69+
4. Swipe to confirm the flash.
70+
5. Follow the on-screen prompts for the live setup (e.g., choose which optional apps to install).
71+
6. Once the flashing is complete, tap **Reboot** → **System**.
72+
73+
Via ADB sideload
74+
----------------
75+
76+
1. Reboot into recovery.
77+
2. In TWRP, tap **Advanced** → **ADB Sideload**, then swipe to start.
78+
3. On your PC, run:
79+
80+
.. code-block:: sh
81+
82+
adb sideload google-sync-addon-*.zip
83+
84+
4. Follow the on-screen prompts for the live setup (e.g., choose which optional apps to install).
85+
5. Once the flashing is complete, reboot the device.
86+
87+
Via ``zip-install.sh`` (ADB or terminal, root required, no recovery needed)
88+
---------------------------------------------------------------------------
89+
90+
This method installs the zip from a running Android system using ``zip-install.sh``.
91+
92+
1. Connect your device via USB with USB debugging enabled *(ADB only — skip if using a terminal app on the device)*.
93+
2. Open a shell: run ``adb shell`` on the PC or open a **terminal app** directly on the device.
94+
3. Transfer the flashable zip to your device's internal storage or microSD card.
95+
4. Run:
96+
97+
.. code-block:: sh
98+
99+
cd <path/to/my_folder/>
100+
unzip ./google-sync-addon-*.zip zip-install.sh
101+
sh ./zip-install.sh ./google-sync-addon-*.zip
102+
103+
The script will flash the zip directly on the running system, without using the recovery.
104+
105+
5. Follow the on-screen prompts for the live setup (e.g., choose which optional apps to install).
106+
6. Once the flashing is complete, reboot the device.
107+
108+
109+
Uninstallation
110+
==============
111+
112+
To uninstall re-flash the zip, enable live setup and select **Uninstall**.

docs/conf.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# For the full list of built-in configuration values, see the documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
88

99
import os
10+
import subprocess
1011

1112
# Functions
1213
def get_version():
@@ -19,13 +20,33 @@ def get_version():
1920
return line.replace('version=', '').lstrip('v').strip()
2021
return '0.0.0-unknown'
2122

23+
def get_revision():
24+
# Try Read the Docs env vars first
25+
git_rev = os.environ.get('READTHEDOCS_GIT_COMMIT_HASH')
26+
git_id = os.environ.get('READTHEDOCS_GIT_IDENTIFIER')
27+
if git_rev:
28+
git_rev = git_rev[:8]
29+
return f"{git_rev} ({git_id})" if git_id else git_rev
30+
31+
# Local Git fallback
32+
try:
33+
return subprocess.check_output(
34+
['git', 'rev-parse', '--short=8', 'HEAD'], stderr=subprocess.DEVNULL
35+
).decode('utf-8').strip()
36+
except Exception:
37+
return None
38+
2239
# Project information
2340
project = 'Google sync add-on'
2441
author = 'ale5000'
2542
copyright = '2016-2019, 2021-%Y ale5000'
2643
release = get_version()
2744
version = release
2845

46+
revision = get_revision()
47+
if revision:
48+
copyright += f" | Revision: {revision}"
49+
2950
# General configuration
3051
needs_sphinx = '8.1'
3152
extensions = [
@@ -49,9 +70,9 @@ def get_version():
4970
# Options for HTML output
5071
html_theme = 'sphinx_rtd_theme'
5172
html_context = {
52-
"display_github": True,
53-
"github_user": "micro5k",
54-
"github_repo": "google-sync-addon",
55-
"github_version": "main",
56-
"conf_py_path": "/docs/"
73+
'display_github': True,
74+
'github_user': 'micro5k',
75+
'github_repo': 'google-sync-addon',
76+
'github_version': 'main',
77+
'conf_py_path': '/docs/'
5778
}

0 commit comments

Comments
 (0)