Android :: Accessing APK Signing Certificate From Inside Program

Oct 7, 2010

I've posted this on Android Security as well, but that group does not appear to have as much activity. Actually I guess my question belongs in this group anyway, even though it touches on some of the security aspects of android packages. My goal is to access the certificate that was used to sign the apk package; and ordinarily, I would do that from inside the program like this

Certificates[] signingCertificates = getClass().getProtectionDomain().getCodeSource().getCertificates();
Unfortunately it appears that getProtectionDomain() returns null on android - according to the specs
http://developer.android.com/reference/java/lang/Class.html#getProtec...

This method might return null (to converse space?) but only for system classes. Since I'm calling this from one of my own classes, I would expect to get a non-null value, but unfortunately not. I have tried from the emulator, and from an application deployed on my phone using adb through a USB cable. I'm using the latest SDK (2.2) and targeting android 1.6. So I guess I have two questions, the first being: why does getProtectionDomain return null, and have anyone had any success using this method from inside an android application. And the second: Is there some other way to access the certificate that a given apk package was signed with (I can live with the restriction that only a given package can know its own certificate).

Android :: Accessing APK Signing Certificate from inside Program


Android :: Accessing Ringer Mode Does Not Work Inside Service

Jul 9, 2010

I have an application that creates a notification with sound when a specific text comes in. To do this, I detect the current ringerMode, change the ringerMode to normal, play the sound, and then quickly return the ringer back to its original setting.

View 1 Replies View Related

Android :: Accessing Activity Methods Inside Click Listener

Aug 25, 2009

I have a click listener:
private OnClickListener onMyListener = new OnClickListener() {
public void onClick(View v) {
myMethod();
} };

And my Method:
private String myMethod() {
TextView tv = (TextView) findViewById(R.id.TextView1);
return (String) tv.getText();
}

When it calls this method, at tv.getText() it breaks in the debugger.
With this in the stack --
ViewRoot.handleMessage(Message) line: 1571
ViewRoot(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 3948
Method.invokeNative(Object, Object[],
Class, Class[], Class, int, boolean)
line: not available [native method] Method.invoke(Object, Object...) line: 521 ZygoteInit$MethodAndArgsCaller.run() line: 782 ZygoteInit.main(String[]) line: 540 NativeStart.main(String[]) line: not available [native method]

View 2 Replies View Related

Android :: How To Register Some URL Namespace / For Accessing Your Program By Calling

Mar 12, 2010

So I want to create an Android app so it would be registered somewhere in android OS (or just would start on system start) and when phone user clicks on special button on a web page inside a web browser my app would pop up and run using the params sent in that URL.So how do I do such thing?

View 2 Replies View Related

Android : Signing Key Got Corrupted - Getting Invalid Keystore Format In Eclipse Signing Wizard

Aug 25, 2010

I have a paid application, that I recently published.

For one reason or another, I didn't make a backup copy of the key signature.

After fixing some bugs, I tried to sign the application again as an update, through Eclipse's export as a signed app wizard.

On the screen where the alias is usually selected, i get a message saying "Invalid Keystore Format."

My real issue is how to handle publishing the update as a new, separate application, with regard to the users who have already purchased the application.

Would I issue refunds for the original purchase for users that purchase the new, separate application?

View 4 Replies View Related

Android :: Digicert Signed Https Certificate Throwing SSLException (Not Trusted Server Certificate)

Jan 25, 2010

Anyone else experiencing this problem or know of a solution? I have a Digicert signed https certificate that is throwing an SSLException (Not trusted server certificate). This doesn't make any sense as Digicert is a recognized certificate authority. I can connect to my https url without a problem via IE, Firefox, and Safari so they appear to have no issue with the certificate. Here's the code I'm using. Very simple stuff......................

View 3 Replies View Related

Android :: Using External Source Inside Program (Eliminating Swing Components)

Dec 5, 2009

I am having a little trouble using some external source files. I am new to eclipse and the methods used to import external source files. Basically this is what I have done. Downloaded the source files for a java project called "TrueLicense" via CVS. Imported this library by going to "Projects" and adding the "TrueLicense" project (I am not sure if I should do this in "Source", "projects" or "Libraries"?) Imported the required classes into my android project without any compile errors.

When I run the program I get:
12-05 15:52:28.632: WARN/dalvikvm(724): VFY: unable to find class referenced in signature (Ljavax/swing/filechooser/FileFilter;)
Then a whole lot of other errors. This seems sensible as there is a sections of the TrueLicense package that used Swing. How do I only import the parts of TrueLicense that I need?

View 10 Replies View Related

Android :: ScrollView With Buttons Inside / No Response Until Second Click On Any Button Inside

Oct 30, 2010

I've been a couple of days trying to solve this thing but I can'f figure it out.The problem is, simple activity, with simple layout, ScrollView -> LinearLayout -> and a lot of buttons inside the layout (within the scroll content). Everything works just fine but one tricky thing. When I click a button let's say at the top of the scroll content and inmediatelly I scroll down to the bottom of the content and I click other button there, nothing happens until I click a second time and all come to normal again.This can be reproduced anytime and it's code independent (i've tried more than 20 scenarios). I've not much experience in android yet but looks like the scroll listener stops the onclick listener or something like that.

View 1 Replies View Related

Android :: ListView Inside LinearLayout Inside ScrollView

Jul 7, 2009

So I've been extremely frustrated by this for a long time now.I've posted before, but can't seem to find a good solution. My goal is to have something pretty much exactly like the installed application details page in the Android Market.I need a list of items displayed along with other content above the list, and would like the content above to scroll up along with the list (exactly like the application details does for the "My Review" and other descriptive info).Due to responses to my previous posts, I came to believe that it really wasn't possible to do this with a ListView.So rather than using a ListView, I refactored my code to use a simple LinearLayout and add individual View items to the list, thinking I could just set each View as clickable and add an OnClickListener to each View in the LinearLayout.That's not working at all though, and now I'm getting even more frustrated.If someone can help me get the OnClickListener working, then I think it'll work, but I do need a separator for the LinearLayout.How do I add a separator like the one used for ListView to my LinearLayout?

View 12 Replies View Related

Android :: New Certificate For Apk

Feb 23, 2010

I do not have the keystore that I used when I first created the app and I am wondering if I can create a new certificate using the same details that I used to create the earlier certificate. I have the details available with me.If I do so and update the app using this certificate, will the users get an update notification on their device?

View 9 Replies View Related

Android :: Signing The Application

Feb 2, 2009

I got the screens and code all worked out, I want to export and sign the application for public distribution but the documentation on this is overwhelming. Any hints on signing the app and all that jazz?

View 4 Replies View Related

Android :: Backing Up App Signing Key

Nov 17, 2009

I followed the instructions to create an application signing key and have signed my application and submitted it to the Android Market. Now I am trying to backup my key to make sure it doesn't get lost, but I can't figure out how to do this on Windows Vista.When I look in the directory where I ran keytool to create the keystore I can't find the keystore file. When I use eclipse to sign the application and browse to that directory it shows me that the file <my_company_name>.keystore is there and lets me select it as the keystore for signing my application. But when I look in the directory using windows explorer or a command prompt the file is not there (I do have it set to show me hidden and system files). I also tried looking in places like C:Users<my_user_name> and C:Users<my_user_name> Documents but could not see the keystore anywhere.

I ran the keytool command with "keytool -list -keystore <my_company_name>.keystore" and is does list the keystore and shows that it contains the alias <my_app_name>. However I tried running "keytool -keyclone -keystore <my_company_name>.keystore -alias <my_app_name> -destkeystore <my_usb_thumb_drive> <my_company_name>.keystore -dest <my_app_name> -keypass <the_alias_password>" and keytool tells me that "alias <my_app_name> does not exist. I tried different combinations for several hours but was unable to figure out how to get it to make a backup of my signing keystore on my usb thumb drive.I would greatly appreciate any help in pointing me in the right direction. After reading the warnings about not losing your signing key, I feel that making a backup is critical, but I can't figure out how to find the keystore or get keytool to make the backup. I searched but have not been able to find any instructions that work to do this. It seems like an issue that every developer needs to be concerned about.

View 8 Replies View Related

Android :: Aptana ADT Signing App

Oct 21, 2010

Got a little problem with Signing my Application.I'm Using Aptana (for those that don't know its Eclipse with some add- ons) I have the app working and just trying to add it to the market place but for some reason i'm hitting the wall,So here's a run though of what i do.

Right click on project

Hover over Android and click on Export Signed Application Package

Click Next

Select Use Existing KeyStone

Location is set to "C:/Program Files/java/jer6/bin/keytool.exe"

I set my password

Click Next

Select Create New Key

I fill out the form and click next

I browse to my desktop to save the *.apk to

Then i click Finish and GET

"Keytool Error: java.io.IOException: Invalid keystore format"

Can any one help please

View 2 Replies View Related

Android :: Error With Signing Apk

Aug 8, 2009

I created a little app and uploded it to the Market, it is online, its the "Locale Http Request Plug-in". I signed it with Eclipse using the build in creation of the key file, gave it 35 years lifetime. But when I install it with the Market on my phone, it downloads it and then gives the Error that it was not signed correctly.Is there anything besides whats in the Dev Guide what I could have made wrong?

View 6 Replies View Related

Android :: App Signing And Market

Jan 29, 2010

I have two paid apps in the Android market.My first app was selling a few units per day, I recently uploaded my second app.Both apps were signed with the same private key, both have different packages.
Since uploading the second app I haven't had a single transaction on the first app (as reported by Google checkout).Is that coincidence,or does the market report all transactions for apps that have the same private key as a single app? The market doesn't let a developer by his/her own apps, so I can't test my theory. Anyone else seeing this behavior?

View 2 Replies View Related

Android :: SSL Certificate HTTPClient

May 28, 2009

I had configure a Tomcat webserver with SSL and client autification. So I need a clienKey.p12 File to visit the site. If I import the key into Firefox, it works fine.

So I tried to develop a Client from "normal" Java. That works:

CODE:..........

Now I try to develope a Client into Android and I am getting crazy....

Here my two Android implementation:

CODE:...........

I always geht the following Exception:

CODE:................

But the key is the same that I use for the "normal" java Client and for the import into firefox. So the key is valid. But it is signed by me... I don't want to sign it by a commercial Company like verisign.

View 2 Replies View Related

Android : How To Sign An APK With More Than One Certificate?

May 21, 2010

How do I sign an APK with more than one certificate, so that I can do this when I publish to the Android Market...

View 1 Replies View Related

Android : Can I Resign An .apk With A Different Certificate?

Jul 16, 2010

If I have an apk can I remove the current signing and some how resign it with a different .keystore file and still have the application install?

View 1 Replies View Related

Android :: App Ad-hoc Distribution And Code Signing

Jul 16, 2010

Is there a way to code-sign (to allow it to open only on a device with specific ID) your Android app when using ad-hoc distribution (sending app to testers or clients as a subcontractor)?I know I can share apk file pretty easily, but what if I don't want other people to redistribute the app before it is ready? I don't want testers to be able to distribute not finished and buggy version of my app for example. Or I would like to show my client the final version of the app, but not allow them to distribute it until the payment is made.

View 1 Replies View Related

Android :: Permissions With Application Signing?

Sep 3, 2010

I have an application which has some of it's activities restricted via my own permission. The permission is published in the manifest of the application A and a second application B should request this permission and then be able to call an activity from app A. Both applications belong to me and are signed with the same certificate (they share the same keystore and alias/password from it). Application A gets granted the permission but app B gets never granted the permission! Logcat tells me about this during the installation and the app crashes with an security exception when trying to start the activity from app A. What the heck am I doing wrong? Could it be something with the application signing? Please help me, I'm totally out of ideas.

View 3 Replies View Related

Android :: Signing An Application On Linux

Feb 20, 2009

I've got a problem! I don`t know how to sign an application on Linux. Can you please help me?

View 9 Replies View Related

Android :: Application Signing Required?

Dec 16, 2009

I would like to know about Android application signing. IFAIK, blackberry and iphone application must be signed to work on the real device.For the Android, does application need to sign ?If so, how to sign the application?

View 2 Replies View Related

Android :: Signing Application With System Key

Sep 27, 2010

I have written video renderer application which is using surface flinger APIs to get access of it. I am developing and building application on eclipse. So when i build it , it is already signed default. But when i run it on emulator, i am getting access permission failure of surfaceflinger.On the some portal i have read that if i want to access surfaceflinger i need to signed my application with system key. Is it correct ? If it is correct, can anyone guide me how can i signed my application with system key to get access surfaceflinger.

View 4 Replies View Related

Android :: Signing And Publishing Application

Aug 26, 2010

I have my application run on development environment (eclipse - testing using device), then i do right click on my project folder - android tools - export signed application package, then i create new key store and add my information there, then it'll produce the .apk then i put it up on my own webserver (I intend to put it on my own web server and android market place as well) but then, once i try to download my .apk from my testing handset - it said:

"cannot download. the content the content is not supported on this phone"

this is weird, since i do my testing on this same handset as well. so my question are:

- what is the proper way to sign my app so it can be downloaded all the way through my own web server?
but I still can put it up on android market as well? - I have my android market account.

-is there any walk-through for it?

Well Hope someone can give me the answer, I really appreciate your help!

View 1 Replies View Related

Android :: Shared User ID And Signing

Nov 5, 2010

I am trying to have 2 applications which can access each other's data.I have a two test applications which I am experimenting with.I set the 'Shared user id' for each to 'com.gabysoft.sharedfiles'.However, when I sign the first app and try and install it, I get the error:

11-05 16:50:33.422: ERROR/PackageManager(61): Package com.gabysoft.sharedfiles1 has no signatures that match those in shared user com.gabysoft.sharedfiles; ignoring!

Clearly, I am not signing it correctly (I am using Eclipse's "Export signed application package" function).How do I properly sign the .apk file so that I don't have this problem?

View 7 Replies View Related

Android : Signing Out Of Google Maps

Jan 10, 2010

I got my phone a couple of days ago and i was wondering if i could sign out of google maps. the lady at verizon was setting up an account she spelt my name wrong. so i created a new name but i cant sign out on my phone to use the new account.

View 6 Replies View Related

Android :: How To Get MD5 Fingerprint Of App Certificate Through Code?

Mar 30, 2010

I'd like to be able to get the MD5 fingerprint of the certificate associated with my app (regardless of whether it's the debug cert or the release cert). You're probably aware that in order to get a Google Maps API key, you need to provide them with the certificate fingerprint of your app so that they can match the key with the fingerprint when you use it so as to ensure it's "really you". I've got a similar situation in which I'd like to make requests against a URL (my server) and would like to pass my app's fingerprint as part of the request. I've got no clue which classes I should be looking at.

View 10 Replies View Related

Android : How To Create A X509 Certificate?

Nov 17, 2010

Is there any way to create an X509 certificate on the android device?

View 5 Replies View Related

Android : Signing Error When Installing SDK Into Eclipse

Oct 19, 2009

I was installing the SDK today and it warned me that the package contained unsigned software.I followed installation instructions.is this normal?

View 2 Replies View Related

Android :: HTTPS With Self Signed SSL Certificate - Solution Or Better?

Apr 29, 2010

I need to do is download some basic text-based and image files from a web server that has a self-signed SSL certificate. I have been trying to figure out how to use HttpClient to do this, but getting the SSL to work is a nightmare that seems to be way too much trouble for such a simple task. Is there a better way to perform these file downloads? Perhaps through a WebView or Browser feature? Reinventing the wheel of making a simple HTTPS GET request is a major pain, and is significantly holding up my development schedule.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved