gpt4 book ai didi

android - 直接下载安装一个android apk

转载 作者:太空狗 更新时间:2023-10-29 14:15:23 26 4
gpt4 key购买 nike

我开发了一个 android 应用程序,它不在 playstore 中,因为它仅供内部使用。所以我制作了一个下载页面,用户可以在其中下载 apk。问题是,下载后,用户无法安装 apk。

如果用户使用例如“Astro Filemanager”,这是可能的。但是我从亚马逊应用商店apk找到了下载页面: https://www.amazon.de/gp/mas/get/android/ref=mas_rw_ldg如果我下载了 apk,我可以通过点击下载通知直接安装它。

所以我试着找出我的 apk 和亚马逊 apk 之间的区别。所以我使用“aapt dumb badging {pathToAPK}”来检查这两个文件。

亚马逊文件:

package: name='com.amazon.venezia' versionCode='638000510' versionName='release-8.0005.557.1C_638000510'
sdkVersion:'8'
targetSdkVersion:'17'
uses-permission:'android.permission.GET_TASKS'
uses-permission:'android.permission.READ_LOGS'
uses-permission:'android.permission.INTERACT_ACROSS_USERS_FULL'
uses-permission:'com.amazon.mas.client.GLOBAL_BROADCAST'
uses-permission:'android.permission.INSTALL_PACKAGES'
uses-permission:'android.permission.DELETE_PACKAGES'
uses-permission:'com.android.amazon.dcp.ota.permission.INSTALL_PACKAGES'
uses-permission:'com.amazon.mas.client.install.CONTENT_PROVIDER_WRITE'
uses-permission:'com.amazon.mas.client.install.INSTALL'
uses-permission:'com.amazon.mas.client.install.KICKOFF_INSTALL'
uses-permission:'com.amazon.mas.client.install.RECEIVE_INSTALL_STATE'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.WAKE_LOCK'
uses-permission:'com.amazon.inapp.purchasing.Permission.NOTIFY'
uses-permission:'com.amazon.device.iap.physical.Permission.NOTIFY'
uses-permission:'com.amazon.mas.client.authentication.permission.DEREGISTRATION_BROADCAST_PERMISSION'
uses-permission:'com.amazon.mas.client.CONTENT_PROVIDER_READ'
uses-permission:'com.amazon.mas.client.malware.blockedapp.BLOCKED_APP_PROVIDER_WRITE'
application-label:'Appstore'
application-label-ja:'Apps'
application-label-de:'App-Shop'
application-label-zh:'亚马逊应用商店'
application-label-en:'Appstore'
application-label-fr:'App-Shop'
application-label-es:'Tienda Apps'
application-label-it:'App-Shop'
application-label-pt:'Appstore'
application-label-fr_CA:'Appstore'
application-icon-120:'res/drawable-ldpi/icon.png'
application-icon-160:'res/drawable-mdpi/icon.png'
application-icon-240:'res/drawable-hdpi/icon.png'
application-icon-320:'res/drawable-xhdpi/icon.png'
application-icon-480:'res/drawable-xhdpi/icon.png'
application: label='Appstore' icon='res/drawable-mdpi/icon.png'
launchable-activity: name='com.amazon.venezia.Venezia' label='' icon=''
uses-library-not-required:'com.amazon.webview'
uses-library-not-required:'com.amazon.dcp.contracts'
uses-library-not-required:'com.amazon.dcp.contracts.framework'
uses-library-not-required:'com.amazon.client.metrics.api'
uses-permission:'com.amazon.dcp.metrics.permission.METRICS_PERMISSION'
uses-permission:'com.amazon.dcp.config.permission.DYN_CONFIG_VALUES_UPDATED'
uses-permission:'com.amazon.dcp.settings.permission.READ_SETTINGS'
uses-permission:'android.permission.GET_ACCOUNTS'
uses-permission:'android.permission.USE_CREDENTIALS'
uses-permission:'android.permission.MANAGE_ACCOUNTS'
uses-permission:'android.permission.AUTHENTICATE_ACCOUNTS'
uses-permission:'com.amazon.identity.auth.device.perm.AUTH_SDK'
uses-permission:'com.amazon.identity.permission.GENERIC_IPC'
uses-permission:'com.amazon.dcp.sso.permission.USE_DEVICE_CREDENTIALS'
uses-permission:'com.amazon.dcp.sso.permission.EXPIRE_ACCESS_TOKEN'
uses-permission:'com.amazon.dcp.sso.permission.account.changed'
uses-permission:'com.amazon.dcp.sso.permission.MANAGE_COR_PFM'
uses-permission:'com.amazon.dcp.sso.permission.CUSTOMER_ATTRIBUTE_SERVICE'
uses-permission:'com.amazon.identity.permission.CAN_CALL_MAP_INFORMATION_PROVIDER'
uses-permission:'amazon.permission.COLLECT_METRICS'
uses-permission:'android.permission.ACCESS_WIFI_STATE'
uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested WRITE_EXTERNAL_STORAGE'
uses-feature:'android.hardware.wifi'
uses-implied-feature:'android.hardware.wifi','requested android.permission.ACCESS_WIFI_STATE, android.permission.CHANGE_WIFI_STATE, or android.permission.CHANGE_WIFI_MULTICAST_STATE permission'
uses-feature:'android.hardware.touchscreen'
uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'
uses-feature:'android.hardware.screen.portrait'
uses-implied-feature:'android.hardware.screen.portrait','one or more activities have specified a portrait orientation'
main
other-activities
other-receivers
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'ja' 'de' 'zh' 'en' 'fr' 'es' 'it' 'pt' 'fr_CA'
densities: '120' '160' '240' '320' '480'
native-code: 'armeabi'

还有我的文件:

package: name='mypackage' versionCode='41' versionName='5.1'
sdkVersion:'8'
targetSdkVersion:'17'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.READ_PHONE_STATE'
uses-permission:'android.permission.ACCESS_NETWORK_STATE'
uses-permission:'android.permission.GET_ACCOUNTS'
uses-permission:'android.permission.READ_CONTACTS'
uses-permission:'android.permission.ACCESS_FINE_LOCATION'
uses-permission:'com.google.android.c2dm.permission.RECEIVE'
uses-permission:'mypackage.permission.C2D_MESSAGE'
application-label:'Just for fun'
application-label-da:'Just for fun'
application-label-nb:'Just for fun'
application-label-de:'Just for fun'
application-label-he:'Just for fun'
application-label-se:'Just for fun'
application-label-fi:'Just for fun'
application-label-en:'Just for fun'
application-label-fr:'Just for fun'
application-label-es:'Just for fun'
application-label-it:'Just for fun'
application-label-pt:'Just for fun'
application-label-iw:'Just for fun'
application-icon-120:'res/drawable-ldpi/icon_android.png'
application-icon-160:'res/drawable/icon_android.png'
application-icon-240:'res/drawable/icon_android.png'
application-icon-320:'res/drawable/icon_android.png'
application: label='Just for fun' icon='res/drawable/icon_android.png'
launchable-activity: name='mypackage.MainActivity' label='Just for fun' icon=''
uses-feature:'android.hardware.location'
uses-implied-feature:'android.hardware.location','requested a location access permission'
uses-feature:'android.hardware.location.gps'
uses-implied-feature:'android.hardware.location.gps','requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature:'android.hardware.touchscreen'
uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'
uses-feature:'android.hardware.screen.portrait'
uses-implied-feature:'android.hardware.screen.portrait','one or more activities have specified a portrait orientation'
main
other-activities
other-receivers
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'da' 'nb' 'de' 'he' 'se' 'fi' 'en' 'fr' 'es' 'it' 'pt' 'iw'
densities: '120' '160' '240' '320'

但我不知道区别是什么。我的文件是用我们的 key 签名的。

最佳答案

好的。我想我修好了。问题是下载的 mime 类型。我将它从 force-download 更改为 application/vnd.android.package-archive现在可以了。

关于android - 直接下载安装一个android apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22682715/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com