2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

CommonInstaller: (WIP #3) automatic privapp-permission whitelist creation

This commit is contained in:
Christopher Roy Bratusek 2019-05-23 19:13:13 +02:00
parent b50a068388
commit 07d3e98dbe

View File

@ -343,6 +343,8 @@ unpack_zip () {
error "failed to prepare environment!"
rm -rf ${TMPDIR}/framework-res
rm -f ${TMPDIR}/*.xml
rm -f ${TMPDIR}/*.list
}
nanodroid_finalize () {
@ -784,7 +786,7 @@ dump_system_privapp_permissions () {
SYS_LIST="${TMPDIR}/privapp-permissions.list"
# XXX this looks shitty
"${AAPT}" d --values xmltree /system/framework/framework-res.apk \
"${AAPT}" dump xmltree /system/framework/framework-res.apk AndroidManifest.xml \
tr -d '\n' | sed -e 's/E:/\n/g' | grep '(type 0x11)0x12' | \
awk -F\" '{print $2}' | sort > "${SYS_LIST}"