Overriding Android APK package name from GYP

332 views
Skip to first unread message

Lambros Lambrou

unread,
Feb 4, 2014, 4:36:07 PM2/4/14
to chromium-dev
Hi,

Does anyone know if it's possible to set the package name differently from the one in the AndroidManifest.xml when building an APK?

Our remoting/android/java/AndroidManifest.xml has:
package="org.chromium.chromoting"

but we'd like to change this string when building the remoting APK with the GYP flag branding=Chrome

It's currently possible to set some other things like android:versionCode and android:versionName but I can't find any way to set the package string.

I notice we've defined a GYP variable called manifest_package_name in these two files:

chrome/chrome_android.gypi:        'manifest_package_name': 'org.chromium.chrome.testshell',
content/content_shell.gypi:            'manifest_package_name': 'org.chromium.content_shell_apk',

However, it appears our tooling completely ignores this variable and always uses the package name from the AndroidManifest.xml

Could someone help me figure out the best way to achieve what I'm trying to do?

Thanks, Lambros

Chris Hopman

unread,
Feb 4, 2014, 4:45:55 PM2/4/14
to Lambros Lambrou, chromium-dev
For the Chrome apk, we build different channels with different package names by generating new .xml files for different channels.

It is possible that the apk building tools don't support specifying the package name in arguments (or outside of a manifest file). We do support merging of multiple manifests when building the apk, so it might be possible to use that to change the package name. See "library_manifest_paths" in java_apk.gypi.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Achin Verma

unread,
Feb 17, 2020, 4:08:05 PM2/17/20
to Chromium-dev, lambros...@chromium.org, cjho...@chromium.org
Hi, I am also working on chromium. 
I want to change the version to 1.0.0.0
Please can you tell me, how can I change the android:versionCode and android:versionName ?

CoatsDowDdaoj 69

unread,
May 27, 2022, 7:31:32 PM5/27/22
to Chromium-dev, Achin Verma, Lambros Lambrou, cjho...@chromium.org
Screenshot from 2022-05-27 11-44-52.pngI am also having the same problem as you. 
Have you found a way to solve it yet?

CoatsDowDdaoj 69

unread,
May 27, 2022, 7:31:32 PM5/27/22
to Chromium-dev, Lambros Lambrou
You change _default_package varibale in file: 
Reply all
Reply to author
Forward
0 new messages