Skip to content

Commit

Permalink
Switch Mozilla UnifiedNlp Backend and Nominatim Geocoder Backend to t…
Browse files Browse the repository at this point in the history
…he new installation function
  • Loading branch information
ale5000-git committed May 30, 2023
1 parent 0d676fa commit a29a55d
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@
<!-- %FAKE_PACKAGE_SIGNATURE% -->
</exception>

<exception package="org.microg.nlp.backend.ichnaea">
<!-- Phone -->
<permission name="android.permission.READ_PHONE_STATE" fixed="false" />
<!-- Location -->
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false" />
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false" />
<!-- %ACCESS_BACKGROUND_LOCATION% -->
</exception>

<exception package="org.fitchfamily.android.dejavu">
<!-- Location -->
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false" />
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: none
SPDX-License-Identifier: CC0-1.0
SPDX-FileType: SOURCE
This file contains permissions to be granted by default.
Default permissions are granted to special platform components and to apps that are approved to get default grants.
The special components are apps that are expected to work out-of-the-box as they provide core use cases.
Fixed permissions cannot be controlled by the user.
Typically these are to ensure either legally mandated functions or the app is considered a part of the OS.
-->

<exceptions>
<exception package="org.microg.nlp.backend.ichnaea">
<!-- Phone -->
<permission name="android.permission.READ_PHONE_STATE" fixed="false" />
<!-- Location -->
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false" />
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false" />
<!-- %ACCESS_BACKGROUND_LOCATION% -->
</exception>
</exceptions>
2 changes: 2 additions & 0 deletions zip-content/origin/file-list.dat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ priv-app/GoogleServicesFramework|10||GoogleServicesFramework|com.google.android.
priv-app/FakeStore|9||Phonesky|com.android.vending|4bce32236ec486fe379cec91b36493626e13130f
priv-app/FDroidPrivilegedExtension|8||FDroidPrivilegedExtension|org.fdroid.fdroid.privileged|cb05a14c986f7c470c0eeb2b3f57c27fe2a72a23
priv-app/AuroraServices|21||AuroraServices|com.aurora.services|a5fde752b5c7526615699cd21424106fae46ee10
app/IchnaeaNlpBackend|10||IchnaeaNlpBackend|org.microg.nlp.backend.ichnaea|b853c1b177b611310219cc6571576bd455fa3e9e
app/NominatimGeocoderBackend|9||NominatimGeocoderBackend|org.microg.nlp.backend.nominatim|40b0917e9805cdab5abc53925f8732bff9ba8d84
app/LegacyNetworkLocation|9|18|NetworkLocation|com.google.android.location|8121295640985fad6c5b98890a156aafd18c2053
app/NewPipeLegacy|16|18|NewPipe|org.schabi.newpipelegacy|95413ee2bf576e4c7b0bdc9e9e79fd2187d444a9
app/NewPipeOld|19|20|NewPipe|org.schabi.newpipe|319efaac4eba849fd390cda3d4cc935394ddc01b
Expand Down
10 changes: 6 additions & 4 deletions zip-content/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ if test "${IS_INSTALLATION:?}" = 'true'; then
ui_msg_sameline_start 'Verifying... '
ui_debug ''
if verify_sha1 "${TMP_PATH}/files/app/DejaVuBackend.apk" '9a6ffed69c510a06a719a2d52c3fd49218f71806' &&
verify_sha1 "${TMP_PATH}/files/app/IchnaeaNlpBackend.apk" 'b853c1b177b611310219cc6571576bd455fa3e9e' &&
verify_sha1 "${TMP_PATH}/files/app/NominatimGeocoderBackend.apk" '40b0917e9805cdab5abc53925f8732bff9ba8d84' &&
verify_sha1 "${TMP_PATH}/files/framework/com.google.android.maps.jar" '14ce63b333e3c53c793e5eabfd7d554f5e7b56c7'; then
ui_msg_sameline_end 'OK'
else
Expand Down Expand Up @@ -188,6 +186,9 @@ if test "${IS_INSTALLATION:?}" = 'true'; then
move_rename_file "${TMP_PATH:?}/origin/profiles/lenovo_yoga_tab_3_pro_10_inches_23.xml" "${TMP_PATH:?}/files/etc/microg_device_profile.xml"
fi

setup_app "${INSTALL_MOZILLABACKEND:?}" 'Mozilla UnifiedNlp Backend' 'IchnaeaNlpBackend' 'app'
setup_app "${INSTALL_NOMINATIMGEOBACKEND:?}" 'Nominatim Geocoder Backend' 'NominatimGeocoderBackend' 'app'

# Store selection
market_is_fakestore='false'
if setup_app "${INSTALL_PLAYSTORE:-}" 'Google Play Store' 'PlayStore' 'priv-app' true ||
Expand Down Expand Up @@ -318,6 +319,9 @@ if test "${API}" -ge 23; then

if test "${API}" -ge 29; then # Android 10+
replace_line_in_file "${TMP_PATH}/files/etc/default-permissions/google-permissions.xml" '<!-- %ACCESS_BACKGROUND_LOCATION% -->' ' <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false" whitelisted="true" />'
if test -e "${TMP_PATH}/files/etc/default-permissions/default-permissions-IchnaeaNlpBackend.xml"; then
replace_line_in_file "${TMP_PATH}/files/etc/default-permissions/default-permissions-IchnaeaNlpBackend.xml" '<!-- %ACCESS_BACKGROUND_LOCATION% -->' ' <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false" whitelisted="true" />'
fi
fi
if test "${FAKE_SIGN}" = true; then
replace_line_in_file "${TMP_PATH}/files/etc/default-permissions/google-permissions.xml" '<!-- %FAKE_PACKAGE_SIGNATURE% -->' ' <permission name="android.permission.FAKE_PACKAGE_SIGNATURE" fixed="false" />'
Expand All @@ -342,8 +346,6 @@ fi
ui_msg 'Preparing 2...'

if test "${API:?}" -lt 18; then delete "${TMP_PATH}/files/app/DejaVuBackend.apk"; fi
if test "${API:?}" -lt 10; then delete "${TMP_PATH}/files/app/IchnaeaNlpBackend.apk"; fi
if test "${API:?}" -lt 9; then delete "${TMP_PATH}/files/app/NominatimGeocoderBackend.apk"; fi
if test -e "${TMP_PATH:?}/files/priv-app" && test "${PRIVAPP_FOLDER:?}" != 'priv-app'; then
copy_dir_content "${TMP_PATH:?}/files/priv-app" "${TMP_PATH:?}/files/${PRIVAPP_FOLDER:?}"
delete "${TMP_PATH:?}/files/priv-app"
Expand Down
2 changes: 2 additions & 0 deletions zip-content/settings-full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export LIVE_SETUP_DEFAULT=0 # visibility: local; type: numeric-boolean
export LIVE_SETUP_TIMEOUT=2 # visibility: local; type: integer
export DEBUG_LOG=0 # visibility: common; type: numeric-boolean

export INSTALL_MOZILLABACKEND=1
export INSTALL_NOMINATIMGEOBACKEND=1
export INSTALL_FDROIDPRIVEXT=1 # visibility: local; type: numeric-boolean
export INSTALL_AURORASERVICES=0 # visibility: local; type: numeric-boolean
export INSTALL_NEWPIPE=1 # visibility: local; type: numeric-boolean
Expand Down
2 changes: 2 additions & 0 deletions zip-content/settings-oss.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export LIVE_SETUP_DEFAULT=0 # visibility: local; type: numeric-boolean
export LIVE_SETUP_TIMEOUT=2 # visibility: local; type: integer
export DEBUG_LOG=0 # visibility: common; type: numeric-boolean

export INSTALL_MOZILLABACKEND=1
export INSTALL_NOMINATIMGEOBACKEND=1
export INSTALL_FDROIDPRIVEXT=1 # visibility: local; type: numeric-boolean
export INSTALL_AURORASERVICES=0 # visibility: local; type: numeric-boolean
export INSTALL_NEWPIPE=1 # visibility: local; type: numeric-boolean
Expand Down

0 comments on commit a29a55d

Please sign in to comment.