improve App Store installation

merge-requests/23/head
Christopher Roy Bratusek 5 years ago
parent 7d98823cc5
commit d863942184

@ -873,51 +873,54 @@ install_apps () {
}
install_store () {
STORE_APPNAME=""
STORE_CHOICE=${nanodroid_play:0:1}
FAKE_STORE=${nanodroid_play:1:1}
[ "${FAKE_STORE}" -eq 1 ] && STORE_CONFLICT="Phonesky" || STORE_CONFLICT=""
# install Yalp Store or Play Store whichever requested
# install Yalp, Aurora or Play Store whichever requested
case "${STORE_CHOICE}" in
1 )
STORE_APPNAME="Phonesky"
# force unselect Fake Store when user has choosen Play Store
STORE_CONFLICT="FakeStore"
FAKE_STORE=0
ui_print " << with Play Store"
nanodroid_install_apk Phonesky
# if android.permission.FAKE_PACKAGE_SIGNATURE is not a runtime-permission
# (read: ROM is not pre-patched), remove that permission from pre-sets
if ! search_fake_package_signature; then
search_fake_package_signature || \
sed '/android.permission.FAKE_PACKAGE_SIGNATURE/d' \
-i ${INSTALLER}/system/etc/default-permissions/phonesky-permissions.xml
fi
nanodroid_install_file etc/default-permissions/phonesky-permissions.xml
;;
2 )
STORE_APPNAME="YalpStore"
ui_print " << with Yalp Store"
nanodroid_install_apk YalpStore
nanodroid_install_file etc/permissions/com.github.yeriomin.yalpstore.xml
;;
3 )
STORE_APPNAME="AuroraStore"
ui_print " << with Aurora Store"
nanodroid_install_apk AuroraStore
nanodroid_install_file etc/permissions/com.dragons.aurora.xml
;;
esac
if [ ! -z "${STORE_APPNAME}" ]; then
ui_print " << with ${STORE_APPNAME}"
nanodroid_install_apk "${STORE_APPNAME}"
else
ui_print " << without App Store"
fi
* )
ui_print " << without App Store"
;;
esac
# Only install Fake Store if requested and Play Store is not installed
if [ "${FAKE_STORE}" -eq 1 ]; then
ui_print " << with Fake Store"
nanodroid_install_apk FakeStore
search_fake_package_signature && \
nanodroid_install_file etc/permissions/com.android.vending.xml
else ui_print " << without Fake Store"
fi

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 ale5000
This file was created by ale5000 (ale5000-git on GitHub).
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version, w/ zip exception.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<!-- 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. These grants are managed by the platform.
Fixed permissions cannot be controlled by the user and need a special
approval. Typically these are to ensure either legally mandated functions
or the app is considered a part of the OS.
Granting these permissions could prevent issues on some ROMs or
on non-clean installations.
-->
<permissions>
<privapp-permissions package="org.fdroid.fdroid.privileged">
<!-- Signature Spoofing -->
<permission name="android.permission.FAKE_PACKAGE_SIGNATURE" fixed="false"/>
</privapp-permissions>
</permissions>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<privapp-permissions package="com.dragons.aurora">
<permission name="android.permission.INSTALL_PACKAGES"/>
</privapp-permissions>
</permissions>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<privapp-permissions package="com.github.yeriomin.yalpstore">
<permission name="android.permission.INSTALL_PACKAGES"/>
</privapp-permissions>
</permissions>
Loading…
Cancel
Save