You will see here
research links sampel code predicates on packages and libraries
Gathered information typically is found towards the end.
satya - Wednesday, August 12, 2009 4:55:27 PM
what are android apk files?
what are android apk files?
satya - Wednesday, August 12, 2009 4:55:58 PM
How do you make an apk file from an android eclipse project?
How do you make an apk file from an android eclipse project?
Search for: How do you make an apk file from an android eclipse project?
satya - Wednesday, August 12, 2009 4:56:27 PM
Given an android apk file, how can I load it on an emulator?
Given an android apk file, how can I load it on an emulator?
Search for: Given an android apk file, how can I load it on an emulator?
satya - Wednesday, August 12, 2009 4:56:44 PM
How can you upload an apk file to the marketplace?
How can you upload an apk file to the marketplace?
Search for: How can you upload an apk file to the marketplace?
satya - Wednesday, August 12, 2009 4:57:02 PM
How can I get an apk file from a titanium project?
How can I get an apk file from a titanium project?
Search for: How can I get an apk file from a titanium project?
satya - Wednesday, August 12, 2009 4:57:42 PM
Read packaging documentation from titanium project
Read packaging documentation from titanium project
satya - Wednesday, August 12, 2009 4:58:02 PM
Soruces
Book
Android online
Titanium online
satya - Thursday, August 13, 2009 7:06:45 AM
article: How to install apk file on emulator
satya - Thursday, August 13, 2009 7:17:21 AM
aapt (asset packaging tool) is the internal tool that understands
Here is the link
aapt (asset packaging tool) is the internal tool that understands "apk" file
satya - Thursday, August 13, 2009 7:22:42 AM
You will use the adb install command to install an apk file
satya - Thursday, August 13, 2009 7:27:15 AM
How can I use eclipse to create an android apk file?
How can I use eclipse to create an android apk file?
Search for: How can I use eclipse to create an android apk file?
satya - Thursday, August 13, 2009 7:42:43 AM
Eclipse creates the apk file for your project under bin\ directory
Eclipse creates the apk file for your project under bin\ directory
satya - Thursday, August 13, 2009 7:48:54 AM
adb commands
adb install [-l] [-r] <file>
- push this package file to the device and instal it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its dat)
adb uninstall [-k] <package>
- remove this app package from the device
('-k' means keep the data and cache directorie)
satya - Thursday, August 13, 2009 7:49:43 AM
apk package name conflicts
apk package name conflicts
satya - Thursday, August 13, 2009 7:54:14 AM
what is the nature of android application apk data directory?
what is the nature of android application apk data directory?
Search for: what is the nature of android application apk data directory?
satya - Thursday, August 13, 2009 7:55:23 AM
android apk forward-lock the app
android apk forward-lock the app
satya - Thursday, August 13, 2009 8:01:16 AM
Structure of an android apk file
Structure of an android apk file
satya - Thursday, August 13, 2009 8:01:46 AM
Directory structure of an android application on the device
Directory structure of an android application on the device
Search for: Directory structure of an android application on the device
satya - Thursday, August 13, 2009 8:56:56 AM
apparently you can download well on wifi and not so on edge network
according to the pervious thread.
satya - Thursday, August 13, 2009 12:59:38 PM
Checkout ringdroid: http://code.google.com/p/ringdroid/
satya - Thursday, August 13, 2009 1:12:46 PM
The package name ought to be unique and specified in manfiest.xml
<manifest xmlns:android="....."
package="com.ai.android.OpenGL"
android:versionCode="1"
android:versionName="1.0.0">
.....
.....
</>
satya - Thursday, August 13, 2009 1:17:07 PM
Another approach to uninstall
1.Run the emulator
2.Go To the Menu and click the Dev Tools
3.Then open the prefered pacakage
4.Then select the package which u want to delete
5.Then click delete the package
Taken from the following discussion
satya - Thursday, August 13, 2009 1:19:53 PM
So the following code
adb install [-l] [-r] <file>
- push this package file to the device and instal it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its dat)
adb uninstall [-k] <package>
- remove this app package from the device
('-k' means keep the data and cache directorie)
Should be rewritten as
adb install [-l] [-r] <apk file name>
- push this package file to the device and instal it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its dat)
adb uninstall [-k] <complete java like package name>
- remove this app package from the device
('-k' means keep the data and cache directorie)
satya - Thursday, August 13, 2009 1:21:13 PM
Example
//install an apk file
adb install c:\somedir\OpenGL.apk
and
//uninstall the corresponding application
//based on its fully qualified package name
adb uninstall com.ai.android.OpenGL
satya - Thursday, August 13, 2009 1:22:10 PM
what is android emulator.exe -wipe-data?
what is android emulator.exe -wipe-data?
satya - Thursday, August 13, 2009 1:55:26 PM
How to self sign an apk file
1. use /jre/bin/keytool to create a key in a key store
2. use jarsigner to sign the apk file
satya - Thursday, August 13, 2009 1:58:08 PM
keytool
keytool
-genkey //generate a public/private key
-alias mykey //name of the key
-keystore c:\somekeystore.store //location of a store
-storepass abc //password
-keypass abc //password
-keyalg RSA //key algorithm
-validaty 14000 //how many days
satya - Thursday, August 13, 2009 1:59:27 PM
It will prompt you for the following
firstname
lastname
organization unit
organization
city
state
country code
satya - Thursday, August 13, 2009 2:01:11 PM
jarsigner args
jarsigner
-keystore c:\somestore
-storepass abc
-keypass abc
-myfile.apk
keyname
satya - Thursday, August 13, 2009 2:06:41 PM
Here is how to generate an unsigned apk file from eclipse ide
Highlight project in eclipse
right click
Android Tools
Export Unsigned Application Package
Choose a filename.apk
satya - Thursday, August 13, 2009 2:07:05 PM
You can use the same path for signed package as well
You can use the same path for signed package as well
satya - Thursday, August 13, 2009 2:09:20 PM
The signed route takes the following
keystore
keystor password
keyname (alias)
validity in years
first and last name
org unit
org
city
state
country code
satya - Thursday, August 13, 2009 2:09:41 PM
A very similar approach to the command line tools.
A very similar approach to the command line tools.
satya - Thursday, August 13, 2009 2:30:58 PM
Eclipse uses the following keys in dedug mode
Keystore name ? "debug.keystore"
Keystore password ? "android"
Key alias ? "androiddebugkey"
Key password ? "android"
CN ? "CN=Android Debug,O=Android,C=US"
satya - Thursday, August 13, 2009 2:31:28 PM
More on the topic
If you are developing in Eclipse/ADT and have set up Keytool as described above, signing in debug mode is enabled by default. When you run or debug your application, ADT signs the .apk with the debug certificate and installs it on the emulator. No specific action on your part is needed, provided ADT has access to Keytool.
satya - Thursday, August 13, 2009 2:32:00 PM
How to sign your applications
satya - Thursday, August 13, 2009 2:43:50 PM
One must read the article above
One must read the article above
satya - Thursday, August 13, 2009 2:45:31 PM
the private key is used in android for
1. sendign updates/reinstall
2. provide access to other apps with the same key etc.
So keep the store and key passwords in a safe place. Android recommends to use the same key for the same class of applications. Also it is recommended that you don't pass passwords on command lines as they can be stored in the shell.
satya - Thursday, August 13, 2009 2:46:30 PM
debug key store locations
The default storage location for AVDs is in ~/.android/avd on OS X and Linux, in C:\Documents and Settings\\.android\ on Windows XP, and in C:\Users\\.android\ on Windows Vista.
satya - Thursday, August 13, 2009 2:46:53 PM
The default debug keystore/keys expire in a year
The default debug keystore/keys expire in a year
satya - Thursday, August 20, 2009 9:03:47 AM
More on keytool. A real good read from sun
satya - Thursday, August 20, 2009 9:38:16 AM
Here is a refresher on starting the emulator manually
\tools\android list avd // lists avds available
\tools\emulator @avdname // start a specific avd
satya - Monday, May 17, 2010 10:35:08 PM
what happens when you sign a package
You will have three things in the delivered package. a) the actual data b) the public key c) the signature generated by the private key and the actual data.
Only this public key can verify the signature created by the private key and the data. This means even if someone is to get hold of the public key, they cannot put together a package with this copied public key and deliver you that package. Because when that package is opened and the public key is used to decipher the signature it will fail.
In other words that public key is useless without the private key that you safe guard.
If android comes across two packages with the same public key and it is able to decipher the signature as the same Android assumes that they came from the same organization and allows you to update software etc.
When two public keys match Android assumes you are the same person.
So each valid public key is treated as a real owner. when someone produces a package that publickey can decipher they are deemed the same owner.
However when they are self signed like this, you can put any name you want as your organization.
Also if you were to generate two separate public keys then you are two different organizations as far as Android is concerned even if you have the same name name and address.
satya - Monday, May 17, 2010 10:40:01 PM
exercise: prove that you can use keytool to generate multiple orgs in the same keystore
exercise: prove that you can use keytool to generate multiple orgs in the same keystore
satya - Monday, May 17, 2010 10:42:20 PM
exercise: sign two packages with the same public key
exercise: sign two packages with the same public key
satya - Monday, May 17, 2010 10:42:50 PM
exercise: sign two packages with two keys but the sameorg
exercise: sign two packages with two keys but the sameorg
satya - Monday, May 17, 2010 10:43:35 PM
Can I use jar signer to list the org, public key etc
Can I use jar signer to list the org, public key etc
Search for: Can I use jar signer to list the org, public key etc
satya - Monday, May 17, 2010 10:50:07 PM
For different public keys
A public key seem to be tied to the package for which it is originally created for.
Same package definition cannot have two different public keys.
In otherwords if you want to install with a publickey that is not in the system, it must come with a unique package name
satya - Monday, May 17, 2010 10:52:17 PM
exercise: verify you cannot have two packages with the same qualifier
exercise: verify you cannot have two packages with the same qualifier
satya - Monday, May 17, 2010 10:54:41 PM
Same public key but two packages
This is fine but not the other way around. This should be possible because a public key belongs to an institution and that institution should be able to release any number of distinct applications under their own packages
However going backwards. A given application cannot be shared by two institutions.
satya - Monday, May 17, 2010 10:58:19 PM
each apk file runs in its own process and gets its own linux userid (typicallly)
each apk file runs in its own process and gets its own linux userid (typicallly)
satya - Tuesday, May 18, 2010 10:42:58 PM
An interesting take on apk files
An interesting take on apk files
The article suggests command line utilities to explore the package structure.
satya - Tuesday, May 18, 2010 10:46:10 PM
Here is an example packages.xml
<package name="com.google.android.home" userId="10004" />
<package name="com.google.android.fallback" userId="10003" />
<package name="com.google.android.contacts" userId="10001" />
<package name="com.google.android.hello" userId="10006" />
<shared-user name="android.uid.system"
dummy-signature="android.signature.system" userId="1000" />
<shared-user name="android.uid.phone"
dummy-signature="android.signature.system" userId="1001" />
<shared-user name="com.google.android.core"
dummy-signature="com.google" userId="10002" />
satya - Tuesday, May 18, 2010 10:50:58 PM
How is apk user id allocated
How is apk user id allocated
satya - Tuesday, May 18, 2010 10:52:49 PM
Here is a clue in the manifest file. no answer yet
satya - Tuesday, May 18, 2010 10:54:40 PM
The package name is unique and is a java package name
The package name is unique and is a java package name
satya - Tuesday, May 18, 2010 10:55:36 PM
The package name is the default process name for the package to run
The package name is the default process name for the package to run
satya - Tuesday, May 18, 2010 10:57:45 PM
android:sharedUserId
The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID ? provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.
satya - Tuesday, May 18, 2010 11:00:28 PM
apk shared user id
apk shared user id
satya - Tuesday, May 18, 2010 11:04:06 PM
How to share code between two projects
satya - Tuesday, May 18, 2010 11:10:22 PM
shared user id needs to be probably qualified so as not to duplicate
shared user id needs to be probably qualified so as not to duplicate
satya - Tuesday, May 18, 2010 11:16:37 PM
share user id
share user id
Search Google for: share user id
Search Android Developers Group for: share user id
Search Android Beginers Group for: share user id
satya - Tuesday, May 18, 2010 11:20:18 PM
How to use resources from another package
satya - Tuesday, May 18, 2010 11:20:42 PM
A taste of the idea
Context currentCtx = ...;
Context otherCtx = currentCtx.createPackageContext(<package_name>,
Context.CONTENT_INCLUDE_CODE);
Resources otherRes = otherCtx.getResources();
satya - Tuesday, May 18, 2010 11:25:23 PM
Another example of shared contexts
satya - Tuesday, May 18, 2010 11:28:33 PM
Looks like you dont have to have the share userid to share data
Looks like you dont have to have the share userid to share data
quoting Dianne from that note
Actually you can do it with Context.createContextForPackage(), which will return a Context containing the resources and pointing to the data directories of the requested package. However, unless the other application has explicitly made some files in there world accessible or you are sharing the same user ID as it, there is no way for you to touch anything in that directory
satya - Tuesday, May 18, 2010 11:31:56 PM
sdcard seem to be another solution for data sharing
satya - Wednesday, May 19, 2010 11:27:42 AM
Understand self signed jar files better
satya - Thursday, June 24, 2010 9:51:09 AM
android:sharedUserId ( an element of the manifest node)
From the docs...
The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID ? provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.
satya - Thursday, June 24, 2010 9:54:50 AM
Issues with changing sharedUseId between releases
satya - Thursday, June 24, 2010 9:55:31 AM
Problems with adding a sharedUserId afterwards
satya - Thursday, June 24, 2010 9:58:59 AM
sharedUserId
sharedUserId
Search Google for: sharedUserId
Search Android Developers Group for: sharedUserId
Search Android Beginers Group for: sharedUserId
satya - Thursday, June 24, 2010 10:17:01 AM
android:sharedUserLabel
From docs...
A user-readable label for the shared user ID. The label must be set as a reference to a string resource; it cannot be a raw string. This attribute was introduced in API Level 3. It is meaningful only if the sharedUserId attribute is also set.
satya - Thursday, June 24, 2010 2:15:20 PM
CONTEXT_RESTRICTED
CONTEXT_RESTRICTED
Search Google for: CONTEXT_RESTRICTED
Search Android Developers Group for: CONTEXT_RESTRICTED
Search Android Beginers Group for: CONTEXT_RESTRICTED
satya - Thursday, June 24, 2010 2:20:34 PM
CONTEXT_INCLUDE_CODE
This seems to be a better question
CONTEXT_INCLUDE_CODE
Search Google for: CONTEXT_INCLUDE_CODE
Search Android Developers Group for: CONTEXT_INCLUDE_CODE
Search Android Beginers Group for: CONTEXT_INCLUDE_CODE
satya - Thursday, June 24, 2010 2:24:02 PM
A quote from Dianne
Um, I am pretty sure this does not work. If the two apps do not have a shared user ID, then the system is going to assign them different user IDs, and from most perspectives -- certainly filesystem access -- they are two unrelated applications. The only way one could access files in another is if the other makes those files world readable (and in that case it doesn't matter what the apps are signed with, -anyone- can access those files).
What the call you show here does let you do is load one application's coe into another's process. In this case certificates are ignored (it is VERY VERY dangerous to do), and the other application's code will be running in your own process, as you. It thus can now access your own files... but it can't access its files, because it isn't running as itself, it is running as you.
satya - Thursday, June 24, 2010 2:25:45 PM
The quote is taken from the following discussion
satya - Thursday, June 24, 2010 2:56:11 PM
context getClassLoader
context getClassLoader
Search Google for: context getClassLoader
Search Android Developers Group for: context getClassLoader
Search Android Beginers Group for: context getClassLoader
satya - Sunday, June 27, 2010 9:10:18 PM
content provider life cycle
content provider life cycle
Search Google for: content provider life cycle
Search Android Developers Group for: content provider life cycle
Search Android Beginers Group for: content provider life cycle
Search Google Code for: content provider life cycle
Search Android Issues Database for: content provider life cycle
satya - Sunday, June 27, 2010 9:26:01 PM
predicates of content providers
Interactin with content providers is synchronous
Uses a pool of threads
They have no lifecycle
For external clients they will not run on the main thread
Most likely process will come to life with the first call and gets closed when no clients are around
satya - Sunday, June 27, 2010 9:52:50 PM
stopping content provider
stopping content provider
Search Google for: stopping content provider
Search Android Developers Group for: stopping content provider
Search Android Beginers Group for: stopping content provider
Search Google Code for: stopping content provider
Search Android Issues Database for: stopping content provider
satya - Sunday, June 27, 2010 9:53:03 PM
starting content provider
starting content provider
Search Google for: starting content provider
Search Android Developers Group for: starting content provider
Search Android Beginers Group for: starting content provider
Search Google Code for: starting content provider
Search Android Issues Database for: starting content provider
satya - Friday, December 10, 2010 11:19:23 AM
PKI stands for Public Key Infrastructure
satya - Wednesday, November 16, 2011 11:08:42 AM
How to uninstall or remove packages through UI
satya - 1/17/2014 11:12:30 AM
To understand CONTEXT_RESTRICTED see the method isRestricted() in your android sources
To understand CONTEXT_RESTRICTED see the method isRestricted() in your android sources
satya - 1/17/2014 11:14:13 AM
Here is an example from view.java
case R.styleable.View_onClick:
if (context.isRestricted()) {
throw new IllegalStateException("The android:onClick attribute cannot "
+ "be used within a restricted context");
satya - 1/17/2014 11:19:11 AM
Here is in a menu inflater
if (itemListenerMethodName != null) {
if (mContext.isRestricted()) {
throw new IllegalStateException("The android:onClick attribute cannot "
+ "be used within a restricted context");
}
- 1/17/2014 11:21:16 AM
Looks like with this flag
you can inflate the resources in a new context but the target context may restrict whatever including, as in this case those xml attributes that may require code to be executed from the source context.
I suppose if this flag is not set then the including code should remove this restriction...
satya - 5/10/2014 9:44:36 AM
android apk package name and java root package
android apk package name and java root package