Skip to content

Commit 6274232

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

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Description
1717
-----------
1818
Google sync add-on is a flashable zip created by ale5000 for a simple installation of Google sync adapters on Android from 4.4 to 16 (excluding Android 6.x).
1919

20+
**IMPORTANT:** In addition to the normal installation as a pure flashable zip, there are plans for the future (but not in the short term) to also support the installation as a *Magisk* module.
21+
22+
Although you may find various references to *Magisk* in the code, support is **NOT** yet ready.
23+
2024
This project is available on GitHub_, on GitLab_ as well as on XDA_.
2125

2226
.. _GitHub: https://github.com/micro5k/google-sync-addon
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
#MAGISK
2+
13
Dummy file, the real script is inside update-binary.
2-
This is kept for compatibility.
4+
This file is kept for compatibility.

zip-content/customize.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ detect_recovery_arch()
421421
detect_recovery_arch
422422

423423
if test "${INSTALL_MODE:?}" != 'Pure'; then
424-
ui_error "This ZIP currently cannot be installed as ${INSTALL_MODE?} module"
424+
ui_error "This ZIP currently canNOT be installed as ${INSTALL_MODE?} module, although it is planned for the future"
425425
fi
426426

427427
OUR_BB="${BASE_TMP_PATH:?}/busybox"
@@ -551,6 +551,12 @@ fi
551551
ui_debug ''
552552
disable_debug_log # Disable debug log if it was enabled and restore normal output
553553

554+
if test "${DEBUG_LOG:?}" -ne 0; then
555+
ui_msg "The log was created in: ${LOG_PATH?}"
556+
ui_msg "You can get it with this command: adb pull \"${LOG_PATH:?}\" ."
557+
ui_debug ''
558+
fi
559+
554560
export PATH="${PREVIOUS_PATH?}"
555561
delete_recursive_safe "${TMP_PATH:?}"
556562

zip-content/inc/common-functions.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,18 +507,22 @@ _execute_system_remount()
507507

508508
_remount_read_write_helper()
509509
{
510+
local _mount_rw_output
510511
test "${DRY_RUN:?}" -lt 2 || return 2
511512

512-
if test -n "${DEVICE_MOUNT-}" && PATH="${PREVIOUS_PATH:?}" "${DEVICE_MOUNT:?}" 2> /dev/null -o 'remount,rw' "${1:?}"; then
513+
_mount_rw_output=''
514+
if test -n "${DEVICE_MOUNT-}" && _mount_rw_output="$(PATH="${PREVIOUS_PATH:?}" "${DEVICE_MOUNT:?}" 2>&1 -o 'remount,rw' "${1:?}")" && is_mounted_read_write "${1:?}"; then
513515
:
514-
elif test -n "${DEVICE_MOUNT-}" && PATH="${PREVIOUS_PATH:?}" "${DEVICE_MOUNT:?}" 2> /dev/null -o 'remount,rw' "${1:?}" "${1:?}"; then
516+
elif test -n "${DEVICE_MOUNT-}" && PATH="${PREVIOUS_PATH:?}" "${DEVICE_MOUNT:?}" 2> /dev/null -o 'remount,rw' "${1:?}" "${1:?}" && is_mounted_read_write "${1:?}"; then
517+
:
518+
elif mount -o 'remount,rw' "${1:?}" && is_mounted_read_write "${1:?}"; then
515519
:
516520
else
517-
mount -o 'remount,rw' "${1:?}" || return "${?}"
521+
ui_debug 'Output:'
522+
ui_debug "${_mount_rw_output?}"
523+
return 1
518524
fi
519525

520-
is_mounted_read_write "${1:?}" || return 1
521-
522526
return 0
523527
}
524528

zip-content/module.prop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
id=google-sync-addon
66
numericId=928871
77
name=Google sync add-on
8-
version=v1.3.2.41-alpha
8+
version=v1.3.2.44-alpha
99
versionCode=6
1010
author=ale5000
1111
description=It installs Google sync adapters on Android.

0 commit comments

Comments
 (0)