apk

Is it possible to add a prebuilt APK to an AOSP build as an user app?

坚强是说给别人听的谎言 提交于 2020-01-01 16:58:51
问题 I am looking to add a prebuilt APK to my AOSP build. I can already do this by doing the following: Add the APK to the $root_of_my_source_tree/packages/apps folder. Create an Android.mk file. The file has the following contents: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := <name of APK> LOCAL_SRC_FILES := <Name of APK>.apk LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := platform include

Is it possible to add a prebuilt APK to an AOSP build as an user app?

和自甴很熟 提交于 2020-01-01 16:58:49
问题 I am looking to add a prebuilt APK to my AOSP build. I can already do this by doing the following: Add the APK to the $root_of_my_source_tree/packages/apps folder. Create an Android.mk file. The file has the following contents: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := <name of APK> LOCAL_SRC_FILES := <Name of APK>.apk LOCAL_MODULE_CLASS := APPS LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) LOCAL_CERTIFICATE := platform include

What does PackageInfo.signatures return?

只愿长相守 提交于 2020-01-01 16:11:11
问题 Why there are multiple signatures in this value? Are these values the public key of the package? Can I uniquely identify a package using this signature instead of reading the files under META-INF, or calculating an MD5 on the whole APK file? 回答1: According to @hackbod, this is all the public keys the APK was signed with Despite its name, the contents of PackageInfo.signatures is the public keys your app is signed with. This absolutely, positively does not change between builds. This is the

Android studio 自定义打包apk名

末鹿安然 提交于 2020-01-01 12:55:50
Android Studio打包应用默认生成的apk名称是:app-release.apk 、如果我们要让生成的apk名跟我们版本包名有联系的话,那我们就要自定义生成的apk名了 需要在build.gradle(Module:app)文件下android{ }中添加: // apk name def android.applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File(output.outputFile.parent, defaultConfig.applicationId + "-" + buildType.name + "-v" + defaultConfig.versionName + "-" + defaultConfig.versionCode + ".apk" ); } } 这样我们打包的apk名就是:com.test.demo-release-v1.01-2.apk ,就自动带上我们的包名和版本号了,省去每次都要手动自己改了。 如果要生成如下版本号时间戳的apk包名,则可以用如下build.gradle代码:模块名-渠道名-版本号-版本名称-包名-编译时间.apk apply plugin: 'com.android

Setting android:extractNativeLibs=false to reduce app size

时光总嘲笑我的痴心妄想 提交于 2020-01-01 09:48:53
问题 I am not sure, if I got this right. It seems it is doing the oposite. If I keep the flag android:extractNativeLibs set to true, the app is taking about 70MB of user's space (yeah...) but if I set this flag to false, the size of the app installed on the device jumps to about 95MB. So I am not sure if user would appreciate this. 回答1: This is a bit tricky. Your APK size is going to be larger when extractNativeLibs is set to false. Old behavior When extractNativeLibs is set to true (default) or

Setting android:extractNativeLibs=false to reduce app size

拜拜、爱过 提交于 2020-01-01 09:48:31
问题 I am not sure, if I got this right. It seems it is doing the oposite. If I keep the flag android:extractNativeLibs set to true, the app is taking about 70MB of user's space (yeah...) but if I set this flag to false, the size of the app installed on the device jumps to about 95MB. So I am not sure if user would appreciate this. 回答1: This is a bit tricky. Your APK size is going to be larger when extractNativeLibs is set to false. Old behavior When extractNativeLibs is set to true (default) or

Conditional resource inclusion/exclusion for Android apk build

半城伤御伤魂 提交于 2020-01-01 09:09:12
问题 I keep coming back to this problem, since there doesn't seem to be a clean solution. Does anyone have a good strategy to exclude resources from a child project in Android? I have two scenarios: 1 - Base library project has localization files for en, es, etc. --Child project 1 uses all localizations, and everything is good --Child project 2 is only localized to English, but the final .apk would have a partial localization due to the parent resources (although ADT19 or so added Lint rules to

Getting “The AndroidManifest.xml of the uploaded APK could not be parsed. Was it compiled properly?” error after enabling Google App Signing

梦想与她 提交于 2020-01-01 08:59:50
问题 After enabling Google App Signing, everytime I try to upload a signed release APK to Play Store I get an error saying The AndroidManifest.xml of the uploaded APK could not be parsed. Was it compiled properly? . Here is the Android Manifest file got from the signed APK with the APK Analyzer tool <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="227" android:versionName="4.9" package="com.myproject"> <uses-sdk

android build release apk on jenkins, without storing my password in plain text

我们两清 提交于 2020-01-01 03:11:13
问题 I need to be able to build the release version of my apk, using a Jenkins job. From reading the following SO question How to create a release signed apk file using Gradle? I understand I can do it in one of two ways. Either get the user to enter the password at cmd prompt, or store my password details in a plain text file that doesn't get committed to git, and lives on my local machine. Neither of these will work when running the build job on jenkins though. 1) I can't gain user input because

android apk's silent installation

与世无争的帅哥 提交于 2020-01-01 02:36:07
问题 I'm searching for a way to program my application to install silently an apk file. I'm aware about the possibility to launch code looks something like this: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive"); startActivity(intent); but this code raising before the installation starts a dialog with the apk's require permissions and needs the user to authorization to start the installation. Is there any way to