android how can I export signed apk file programitically - android

I want to create an application creator. It means that I want user to create its own application using my application and export signed apk file on its device.
Is this possible in android?
If it is possible then please help me so that I can implement it.
Thank You.

This is possible but it requires Rooted Device.
Now you need to create script (android commands) for
compiling
packaging
creating key-store
signing to key-store into release mode
We are allowed to do above all things using command. Try to follow it one by one and you can generate .apk file.

Related

how to publish an apk that is signed with system signature?

I successfully created my android app that uses INJECT_EVENTS permission which is signed with the system signature using platform.pk8 & platform.x509.pem (key/certificate) ... with the help of this link
but unfortunately the two links in the 1st point are dead.Is there any other alternative to them ??
since,now I have an aligned apk,can I put on the play store without creating a keystore which we create when we export a signed application project right click on project >android tools >Export signed application project and also other things like creating an alias,password,my name,orgranization name & all that stuff!!
please help me with this!!!
Thanks in advance!!!

Automatic APK signing when running ADT projects

I'm used to develop and debug android apps on my phone, it's pretty faster.
When I'm ok, I export a signed APK to upload to the market.
Now I use Google Maps APIs, I must add a signature to the Manifest, this signature is associated with my key I use to sign APKs for release. So I am able to export a signed APK to test on my phone, but it's not automated and I cannot view LogCat anymore.
Can I just instruct ADT+Eclipse to auto-sign the APK before uploading it to my attached phone?
Am I missing a point?
I don't think you can do this via ADT directly. But you could use ant to build instead which supports signing (http://developer.android.com/tools/building/building-cmdline.html).
Just set the key.store, key.alias, and key.store.password, key.alias.password properties in the ant.properties file.
You can also trigger ant builds from within eclipse and add a new ant target to install/launch the app on your device

Testing on Real device

If i use the .apk file that is in the bin directory in the project in the workspace instead of generating the .apk by exporting the project does it make difference?
The apk file in the bin is signed using the debug key, which loses the benefit of signing your App. Your App should be signed using your own key (which is specified when you export the project) which kind of uniquely identify your Apps and protects (or tries to protect) your Apps from having someone alter your App and republish it. Also, when you upload an update for your App, it must be signed with the same key as the original App, so make sure to keep this key safe.
You can use the apk from the bin folder while debugging, but when publishing the app, you must export a signed apk, or sign the one from the bin folder manually.
However, an easier method would be to directly debug on a hardware device from eclipse, as this gives you access to various tools like the adb and LogCat, See this link for details.

Signing Android apk?

I was currently developing Android applications on a windows machine and signing with a "production.keystore" which I originally created on the windows machine. Now that I have migrated on Mac OS,can i use the old "production.keystore" or should I regenerate a new one? Will I still be able to sign the apk and release update on Android Market?
Many thanks
Yes you can still use that keystore. It's a universal format, as long as you keep that file and have a android SDK on that machine you can use it to sign your apk, independant of the platform you're using. (The android sdk tools will take care of that).
Updates of your application are only possible if you sign with the same you used for initial publishing. So no, you should not generate new key. Use the existing one and keep it safe from harm - should you lose it, you will not be able to update your application anymore.
I've been through this when moving from Win to linux. I was able to just copy the original keystore file over to your new machine and use that to continue to sign stuff. Eclipse/ADT will prompt you for a keytstore to use when you select Export Signed.
If you sign with a new keystore and try to upload the apk as an update to an existing app on Market it wont allow it.

Batch exporting of Android APKs

Let's say I have a whole lot of Android projects, how would I go about, export and digitally sign them all at once, is it even possible to do through eclipse?
Any thoughts of the matter will be greatly appreciated.
In Eclipse it's not possible to export multiple projects without human intervention.
You can script it by creating ANT build.xml files for all of your projects. The ANT build files allow you to specify the keystore path and key alias that you want to use to sign your APK.
You can create a simple script that goes through all of your projects, and calls the ant release target. This will generate a signed APK file.
That way, you can export all of your apps with a single script.
More information can be found on :
http://developer.android.com/guide/developing/building/building-cmdline.html

Categories

Resources