Don't Let App Signature Problems Hold You Back - Huawei Developers

Common Problems
As a developer, you may have encountered situations when your app is rejected due to app signature problems, for example:
1. Your app signature is different from that of the app version already available for sale.
2. Your app signature is inconsistent with that configured in AppGallery Connect, that it does not support third-party sign-in or payment.
3. When using HMS Core services, your app fails to send push messages or cannot load a map due to inconsistent certificate fingerprints.
4. After release, your app cannot be updated on different platforms due to inconsistent app signatures.
There could be more.
You may wonder why your app is always rejected during app review, while the app signature is consistent and no problems occur during your local testing. In these cases, your app may be re-signed by the App Signing service of HUAWEI AppGallery Connect.
What Is an App Signature?
Before dealing with the problems, let's see what an app signature is.
Remember two points:
1. App signatures are important. Your app cannot be released without one.
2. App signatures cannot be changed. Otherwise, your app will be in a mess - its certificate fingerprint changes, its authentication information changes, app update fails, and many other problems occur.
We usually use Android Studio or run commands to sign an app.
What Is AppGallery Connect App Signing?
What AppGallery Connect App Signing has to do with it? Well, it provides another way for you to sign your app.
Now there are two options for you:
The first one is that AppGallery Connect generates a new signature for your app. The new signature is unique, and you need to keep using it since then.
Select Let AppGallery Connect to create and manage my app signature key in AppGallery Connect to use this method.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
However, you can only use this method for new app release. As I said, AppGallery Connect generates a new signature. This method does not work if you already have a released app version, which already has an app signature.
So, the second way is to upload a signature file. In this case, AppGallery Connect only signs your app using the file you uploaded. No matter what signature file you upload, AppGallery Connect will keep it safe and sound. Select Export and upload the key and certificate in AppGallery Connect to use this method.
Use a tool or commands to generate a ZIP signature file, upload the file to AppGallery Connect, and let AppGallery Connect sign your app. Make sure you upload the same signature file as that of your released app version. Otherwise, the signatures will be inconsistent.
But don't worry, AppGallery Connect now supports verification of app signature files. If you upload an inconsistent signature file, AppGallery Connect will display a message, indicating that the file cannot be uploaded.
Here's an example. You have signed an app using Android Studio. Assume that its app signature is A. Then you use App Signing to generate a new signature B. The final signature of this app will be B, which is different from A.
However, if you upload a ZIP file that is generated using signature A, the signature will remain unchanged during app review and release. In a word, you decide your app signature.
How Do We Decide Which Way to Use?
We don't want to face problems. So how can we choose the right way? It's simple.
If you wish to release an app only on HUAWEI AppGallery, you can let AppGallery Connect generate an app signature for you. If you wish to release the app on multiple platforms and keep the signature file consistent, or if you need to use the existing signature for authentication, just upload a file.
If you have released an app on AppGallery, you can only upload a file containing the same signature as that of the released version.
Now, we can see that the problems mentioned before are caused by an incorrect app signature. Perhaps you chose the wrong way to sign your app, or uploaded a wrong signature file. Unfortunately, an app signature cannot be deleted once it has been applied. The current solution is to delete the app, create it again, and then choose the right way.
PS:
1. App signature is not equivalent to App Signing. A signature is mandatory, while you can choose whether to use the App Signing service.
2. App Signing is optional for an APK package, but mandatory for an AAB package.
3. If an app signature changes, the corresponding certificate fingerprint also changes. In this case, you need to configure a new certificate fingerprint for related services.
For more details, check:
AppGallery Connect App Signing documentation:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-app_bundle

Related

[XAP]Share Box - DLNA and much more :) for Samsung with Interop Unlock

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And now application that we really missing. It lets you share contents with nearby devices via DLNA.
For devices with Interop Unlock
The application allows you to send your content to other devices connected to the same access point.
Additionally, you can download, play and save the contents of other devices to your device.
Something extra, you get the ability to remotely control the device, so you can you can play and share content to another device using your device.
Download Xap
Share_Box_1.0.1.5_windowsmania_pl.zip
Click to expand...
Click to collapse
More on:
Share Box - udostępnienie po DLNA i dużo więcej dla Samsunga z Interop
marass82 said:
And now application that we really missing. It lets you share contents with nearby devices via DLNA.
For devices with Interop Unlock
The application allows you to send your content to other devices connected to the same access point.
Additionally, you can download, play and save the contents of other devices to your device.
Something extra, you get the ability to remotely control the device, so you can you can play and share content to another device using your device.
Download Xap
More on:
Share Box - udostępnienie po DLNA i dużo więcej dla Samsunga z Interop
Click to expand...
Click to collapse
NOICEEE!!!
Since AllShare isn't available for WP8 devices, its the first free DLNA app! Thanks Man!! You're awesome!
Would it be entirely too much to ask that you upload it to a reputable site that doesn't try and spam you with malware and obvious scams (instead of sending you the file) when you click the download button? For example, there's this site, forum.xda-developers.com, which allows you to attach ZIP files of up to 20 megabytes. I bet you even already have an account there...
I mean, this sounds really cool and I'd love to take a look, but at this point I half assume it's malware itself, given the behavior of the site you linked.
EDIT: The third time I tried the download (after the second time triggered the XSS filter and the first time tried to serve me an EXE file instead) I did instead receive a ZIP file wrapping a XAP file (you know that's pointless, right? XAPs *are* ZIP files) to go with my popup ad suggesting a really sketchy "downloader" EXE file. No source code though, so I guess I'll have to decompile the app...
I added the xap.
GoodDayToDie said:
Would it be entirely too much to ask that you upload it to a reputable site that doesn't try and spam you with malware and obvious scams (instead of sending you the file) when you click the download button? For example, there's this site, forum.xda-developers.com, which allows you to attach ZIP files of up to 20 megabytes. I bet you even already have an account there...
I mean, this sounds really cool and I'd love to take a look, but at this point I half assume it's malware itself, given the behavior of the site you linked.
EDIT: The third time I tried the download (after the second time triggered the XSS filter and the first time tried to serve me an EXE file instead) I did instead receive a ZIP file wrapping a XAP file (you know that's pointless, right? XAPs *are* ZIP files) to go with my popup ad suggesting a really sketchy "downloader" EXE file. No source code though, so I guess I'll have to decompile the app...
Click to expand...
Click to collapse
Wow, forum.xda-developers.com? I've never heard of it! I'll check it out and report back.
Share Box and Samsung Link are now official
Hi guys,
Don't know if it's all news but now Share Box and Samsung Link are official for all Ativ S users on Samsung Apps.
Tnx,
Co'

HALF-ASSED ONEPLUS ONE TOOLKIT v1.0 BETA in Python - OSX, Linux, and Windows!

UPDATED!!!!!! 12/30/2014
i present to you the latest pre-release from vvn's secret underground laboratory.......
THE HALF-ASSED ONE PLUS ONE TOOLKIT v1.3.2 BETA!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
STILL IN BETA TESTING. tested most functions on my macbook pro (running OSX mountain lion) and they all seem to be working. haven't tested the newer functions like flashing the newer stock ROM images (XNPH38R and XNPH44S) but theoretically they should work if the others do.
USE AT YOUR OWN RISK. i'm not responsible for anything that might happen to your device as a result of using the toolkit. i assume if you are able to make it far enough to install python, the android SDK, and run the script, then you've got a pretty good idea of what you're doing already. if you need help, send me a message.
requirements: python 2.7, android SDK, opotoolkit.py, opointro.py, pyadb.py
NOW ON GITHUB!!!!
to install and run using git:
git clone https://github.com/eudemonics/1plus1toolkit.git 1plus1toolkit
cd 1plus1toolkit
python opotoolkit.py
*you might need to run as root, and make sure to have USB debugging enabled*
GITHUB project link: https://github.com/eudemonics/1plus1toolkit
installation:
download and install python 2.7: https://www.python.org/downloads/
download and install android SDK: https://developer.android.com/sdk/
it should work with the adb and fastboot binaries provided in the ZIP, but if not, you should install the android SDK. i recommend even MORE that you create an environmental path variable to the android SDK so you can run the commands from any directory.
setting up an environmental path variable (optional - recommended):
if you're on windows you can go to my pastebin, find the only powershell script on there, and steal/adapt the code to create your own environment path variable. but it's much easier to configure in system properties - i'm not on windows right now so these may not be exact instructions, but you should be able to right click on "my computer", select "properties", go to the "environment" tab in system settings, and add the environment path there. linux and OSX users just need to add the android SDK directory to their ~/.bash_profile or ~/.bashsrc or wherever environment paths are defined. if you still don't understand environmental path variables or symbolic links, i highly recommend google (or startpage.com, the private version).
if you don't want to go to the trouble of creating the environmental path variables, and you want to use the android SDK on your computer, then just extract all the files from the ZIP into your android SDK directory.
how to run the toolkit:
plug phone to computer via USB, turn on android debugging.
open command prompt or terminal window to scripts directory. start toolkit by entering:
"python opotoolkit.py"
if everything is installed and in the right places, you should see a menu like the attached screenshot.
i'll continue working on it and adding more when i can so keep checking this space, as well as the pastebin links (i'll add to github eventually). everything's open source; use, share, steal whatever you want from the code. some credit would be nice, though.
not gonna ask for donations - if you'd like to donate, please do so by purchasing my EP:
buy it here: http://dreamcorp.bandcamp.com
or search for it on itunes, google play, amazon, spotify, last.fm, cdbaby, blah blah blah.
there are also links in the description for my music video
https://www.youtube.com/watch?v=2i-F4jiKtGg
RESERVED
THIS IS NOW ON GITHUB!
get the latest version from here:
https://github.com/eudemonics/1plus1toolkit
sorry i rarely ever log on to xda-developers, email or facebook me if you have any problems!
Reserved again
***space reserved***
create an app or another to unlock root
Hello everyone is there any good developer can create an app or another to unlock root permissions to OnePlus One? Me with the Oppo N1, I used only app. Unfortunately I have no problems to the PC, and with the usual methods can not. I would be very grateful.
cassyjack said:
Hello everyone is there any good developer can create an app or another to unlock root permissions to OnePlus One? Me with the Oppo N1, I used only app. Unfortunately I have no problems to the PC, and with the usual methods can not. I would be very grateful.
Click to expand...
Click to collapse
What was the point in bumping a thread that hasn't had a reply for over 3+ months?
cassyjack said:
Hello everyone is there any good developer can create an app or another to unlock root permissions to OnePlus One? Me with the Oppo N1, I used only app. Unfortunately I have no problems to the PC, and with the usual methods can not. I would be very grateful.
Click to expand...
Click to collapse
hi, you should be able to root with SuperSU (latest version 2.40) using my toolkit. let me know if you have any problems, since i haven't tested flashing the latest SuperSU yet.
zephiK said:
What was the point in bumping a thread that hasn't had a reply for over 3+ months?
Click to expand...
Click to collapse
my apologies - this is why i named it the half-assed oneplus one toolkit
Lol

[Q] How to import self signed ssl certificate

I'm trying to build my own cloud server, namely owncloud... It works with plain http, but I want to convert it to ssl before going to "production" use... One of the problems is that I want to import a self signed certificate to my phone, without it complaining about "third party might be..." and without the complaint being visible all the time at status bar...
How do I import a self signed certificate to the phone? And get it to show in trusted credentials without the complaint? Other than the obvious settings -> security -> install from device memory/sd card. That is what I have tried so many times and this leads to the complaint I mentioned above.
Thanks!
Flexy_75 said:
I'm trying to build my own cloud server, namely owncloud... It works with plain http, but I want to convert it to ssl before going to "production" use... One of the problems is that I want to import a self signed certificate to my phone, without it complaining about "third party might be..." and without the complaint being visible all the time at status bar...
How do I import a self signed certificate to the phone? And get it to show in trusted credentials without the complaint? Other than the obvious settings -> security -> install from device memory/sd card. That is what I have tried so many times and this leads to the complaint I mentioned above.
Thanks!
Click to expand...
Click to collapse
Nothing? No ideas? Am I doing something so wrong that there is no "point" to answer?
I dont think anyone knows anything about this hence the lack of replies.
Perhaps reaching out to general android forum
Do you mean the warning in the browser that the connection is not trustable ?
By the way, have you tried using the owncloud app ? It doesn't verifies the identity of the server, thus doesn't complain if you don't have an validated ssl certificate.
Well. There's a way. First install your certificate normally. Then you just have to make it as a system included certificate (move it using aroma file manager).
To do that just look at my screenshot. Those are the directories that you will care about.
Of course don't forget to set correct permissions at the end.
Sent from Xperia Z2
mr.loverlover said:
Well. There's a way. First install your certificate normally. Then you just have to make it as a system included certificate (move it using aroma file manager).
To do that just look at my screenshot. Those are the directories that you will care about.
Of course don't forget to set correct permissions at the end.
Sent from Xperia Z2
Click to expand...
Click to collapse
Screenshot?
Flexy_75 said:
Screenshot?
Click to expand...
Click to collapse
Oh, sorry, the xda app didn't upload it again.
Here you go:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
mr.loverlover said:
Oh, sorry, the xda app didn't upload it again.
Here you go:
Click to expand...
Click to collapse
Did not get screenshot this time either, but I solved this with F-Droid -> Move Certs! app, which moved the self signed certification to system certs.
Thanks!
Flexy_75 said:
Did not get screenshot this time either, but I solved this with F-Droid -> Move Certs! app, which moved the self signed certification to system certs.
Thanks!
Click to expand...
Click to collapse
Idk what's happening here. I've uploaded pic to a remote server this time... maybe XDA doesn't like too big screenshots
However good to know that there's a program for that

Why Should We Use the App Bundle? Release App Bundle on AppGallery

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When we want to release Android projects, there are two distribution options.
generate app bundle or generate signed apk.
Although it is the app bundle that comes selected, most of us have to make an extra click and use the first usual method the generate signed apk. This method may seem more reasonable to share the app with a small pool of users without distributing it to any store.
But if your application appeals to large audiences in the store, using app bundle becomes more and more inevitable. So what is the app bundle and what is the difference?
Let’s take a look at these now
Faster installation, Less disk space!
APP Bundle
The apk file contains all the files and codes of the project. It has a certificate stating that it is signed. If we are distributing to the market with the .apk file, this certificate is very critical. This certificate must be retained for implementation purposes (eg update).
An apk file collects the project’s available resources (audio, video, photo, mandatory data) in one package. It does not accommodate Dynamic Features or Assets device group specific.
Reduced APK Size
When you publish your applications using application packages, you can reduce the size of your application, simplify versions, and enable advanced distribution features.
Application packages use a publishing model called Dynamic Delivery to create and publish APKs optimized for each device configuration.
Thus, it offers users more efficient applications.
This way, you only need to create, sign and upload a single build to support APKs optimized for a wide variety of device configurations.
So, can we use the app bundle on AppGallery?
Yes, you can distribute your application with the app bundle in the AppGallery, and you can move your existing apk to the app bundle.
Let’s see how to do this.
Publishing App Bundle in AppGallery
To release our project as app bundle on AppGallery, we must first create the app signing file on the AppGallery console.
AppGallery Connect provides you with two signature creation methods:
1. Let AppGallery Connect to create and manage my app signature key (recommended);
2. Export and upload the key and certificate. The first one is recommended. If it is unavailable, use the second method. Note that,
usepepk.jarfound over the Internet instead offrom Android Studio to export and upload the key and certificate.
In this article, I will add an app signing file using the method suggested in the first item.
If you want to add as in the 2nd way, I recommend you to read the following article
https://medium.com/huawei-developers/guide-of-create-app-signature-file-c3bcb1f3b5bd
For generate signed bundle continue
If you already have a keystore file you can continue with that. If you don’t have you should create a new
Choose your variant and generate your signed bundle
After generating the signed app bundle, we click on 1 to access the aab file, and 2 to access the exported key file. Click on the area specified in 2 and go to the file location where our private key was created. Open power shell in here and run the command below.
Code:
$ keytool -export -rfc -keystore upload-keystore.jks -alias upload -file upload_certificate.pem
Notarameters must be replaced as needed.
Click on browse and add the upload certificate and click to submit button.
Our application signature certificate is ready now, we can go to version control and add our app bundle and release it. If the signature key uploaded to AppGallery Connect is different from that of the released app, the new certificate fingerprint may be different from that generated locally during app development. If the services you are integrating need to depend on the SHA-256 certificate fingerprint, you need to add the new SHA-256 certificate fingerprint for your app.
For the release our bundle go to version information section
And add your generated signed . aab file to here. To find the bundle file, you can click the link indicated with 1 above and access the .aab file.
Final
Now you can publish your application as an app bundle. In this way, you can reduce the update sizes of your existing applications and provide a better experience to the end user.
It is very tempting for developers to repeatedly delete and install the entire package after each development.
I hope this article will be useful to developers who want to use app bundle and want to publish their app as app bundle in AppGallery.
Thank you for reading!
Resources
https://developer.huawei.com/consum...pGallery-connect-Guides/agc-appsigning-newapp
https://developer.huawei.com/consumer/en/doc/distribution/app/18527283
How do I change the signature key or upload key managed in AppGallery Connect?
Interesting method.

Coding-free Integration of AppGallery Connect Cloud Hosting into an Android App

When it comes to building a website, it’s always a hassle having to apply for a domain name, set up a website server, manage certificates, and perform other O&M operations.
HUAWEI AppGallery Connect provides easy-to-use app deployment capabilities, so that tedious tasks such as domain name application and page distribution are automatically performed for you, allowing you to focus on more important things, such as designing your app’s UI, UX, and service logic.
This post will show you how to use AppGallery Connect Cloud Hosting with an example of domain name hosting.
1. Enabling Cloud Hosting
Cloud Hosting is currently still in beta testing. To use the service, you’ll first need to send an application by email. Here’s the official documentation about enabling the service.
Once you’ve obtained the permission to use the service, sign in to AppGallery Connect, go to My projects, click your project, and go to Build > Cloud Hosting on the left.
On the Cloud Hosting page, click Enable now.
2. Creating a Site
A site is similar to a domain name. When you create a site, you’re also creating a domain name.
According to government regulations, each site in the Chinese mainland must have its own domain name. But sites outside the Chinese mainland can share the same domain name, as long as the name is unique.
2.1 Creating a Site in the Chinese Mainland​If the data storage location of your app is the China site, Cloud Hosting can only be used to host your custom domain names. The documentation illustrates the detailed requirements.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1. On the Site management tab page, click New site, enter a domain name, and click Next.
2. A dialog box is displayed to verify the ownership of your domain name,
as shown in the following figure.
1. In the dialog box, copy the value on the right.
2. Go back to the DNS console of the domain name provider. I’ll use HUAWEI CLOUD as an example. Go to Domain & Website > Domain Name Service > DNS Resolution > Private Zones, click your domain name, and click Add Record Set in the upper right corner.
3. Complete the domain name, set Type to TXT, and paste the copied value in the Value text box.
4. Click OK, go back to AppGallery Connect, and click Next.
3. If the verification is successful, the system will configure the CDN acceleration and SSL certificate for the domain name. This may take a while.
4. Configure the CNAME value in the same way. On your DNS console, set Type to CNAME — Map one domain to another.
2.2 Creating a Site Outside the Chinese Mainland​It is much easier to create a site outside the China site. For example, to create a site in Singapore, just click New site and enter a unique domain name, as shown in the following figure.
3. Managing Versions
1. On the Site management page, click Manage version in the Operation column of the site your just created.
2. Click New version. On the page that is displayed, click Browse and upload a compressed web page package you have developed.
3. Please remember that the HTML file must be in the root directory of the compressed package you upload. Also, as shown in the following example, the access entry or the default home page of your website must be named index.html.
4. If this message is displayed, the upload is successful. Now, click OK.
4. Releasing a Version
After you successfully upload a version, wait for 1 to 2 minutes and click Refresh. If the version status changes to Released, the version is successfully released.
Here’s a link to my website which uses Cloud Hosting: Github
https://station-test1012.dra.agchosting.link/
5. Summary and References
With Cloud Hosting, you can host a static page by just performing a few simple configurations on the console.
Here’s the website file I used in this example.
HUAWEI AppGallery Connect Cloud Hosting documentation:
https://developer.huawei.com/consum...-connect-Guides/agc-cloudhosting-introduction
Looks promising
Does it support India?
Basavaraj.navi said:
Does it support India?
Click to expand...
Click to collapse
Yes. of course you can. you only need to select the domain of singapore when you creating a site outside china.
Nameless Foe said:
Looks promising
Click to expand...
Click to collapse
Thank you for liking. i will more useful post about AppGallery Connect.

Categories

Resources