It must be some idiotic thing that I am doing but I could not get it what is the problem...
My code snippet
try {
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet("http://somehost/WS2/Upload.aspx?one=valueGoesHere");
client.execute(request);//it fails at this line
} catch (Exception e) {
and in my manifest I have internet access permission
from console
W/System.err( 4210): java.net.UnknownHostException: somehost
W/System.err( 4210): at java.net.InetAddress.lookupHostByName(InetAddress.java:513)
W/System.err( 4210): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:278)
W/System.err( 4210): at java.net.InetAddress.getAllByName(InetAddress.java:242)
W/System.err( 4210): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:136)
W/System.err( 4210): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err( 4210): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err( 4210): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err( 4210): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err( 4210): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err( 4210): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err( 4210): at com.temp.services.httpclient.HttpGetDemo.onCreate(HttpGetDemo.java:29)
W/System.err( 4210): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
W/System.err( 4210): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
W/System.err( 4210): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
W/System.err( 4210): at android.app.ActivityThread.access$2300(ActivityThread.java:135)
W/System.err( 4210): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
W/System.err( 4210): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 4210): at android.os.Looper.loop(Looper.java:144)
W/System.err( 4210): at android.app.ActivityThread.main(ActivityThread.java:4937)
W/System.err( 4210): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 4210): at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 4210): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
W/System.err( 4210): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
W/System.err( 4210): at dalvik.system.NativeStart.main(Native Method)
I/ActivityManager( 120): Displayed activity com.temp.services/.httpclient.HttpGetDemo: 119 ms (total 304 ms)
Try to add the following before your http request code
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Don't forget to declare the INTERNET permission in the Android manifest:
<uses-permission android:name="android.permission.INTERNET"/>
You should make sure your are not running on your main thread, check if you get this exception:
android.os.NetworkOnMainThreadException
ok, What about trying this :
URL uri = new URL(rootUri);
HttpURLConnection connection = (HttpURLConnection) uri.openConnection();
connection.setRequestMethod("GET");
connection.setDoInput(true);
connection.connect();
Do you execute this request in the emulator or on an android device ?
if it's on the emulator, maybe the internet connection is not shared with it.
If it's on an android device, seems you don't have internet access ( not the permission, just the access )
Assuming that the URL is a valid one, I suggest that you should call :
try {
InetAddress address = InetAddress.getByName(url);
} catch (UnknownHostException e) {
e.printStackTrace();
}
This is DNS pre-fetching so that your device can resolve it URl to an IP address.
Although this isn't enough for it to guarantee to work. What actually worked for me is a retrying mechanism. Give it some good old F5 F5 F5 F5 till the website responds :D
The Problem is with URL.As it shows in Log Exception is
java.net.UnknownHostException: somehost
Try with your true URL.
& BTW www.google.com works fine
Related
I'm porting our application using QT to the Android platform. This is a kiosk-type application, the devices are rooted and we have full control over them. In order to modify some system settings (networking in particular), our app needs to be installed as a system app. To accomplish this, I use the following commands in an adb shell (after an adb remount):
1) pm install /data/my_app.apk
2) rm /data/my_app.apk
3) cp -p /data/app/com.me.my_app-1.apk /system/app
4) rm /data/app/com.me.my_app-1.apk
5) cp -p /data/app-lib/com.me.my_app-1/* /system/lib
6) rm -rf /data/app-lib/com.me.my_app-1
7) rm /data/data/com.me.my_app/lib
8) ln -s /system/lib /data/data/com.me.my_app/lib
9) reboot
After the reboot, when I launch the application I get a message box:
"Your application encountered a fatal error and cannot continue."
logcat shows the following exception and stack trace:
I/Qt ( 1272): qt start
D/dalvikvm( 1272): No JNI_OnLoad found in /system/lib/libmy_app.so 0x411f0a08, skipping init
W/System.err( 1272): java.lang.Exception: Can't find main library 'my_app'
W/System.err( 1272): at org.qtproject.qt5.android.QtNative.startApplication(QtNative.java:196)
W/System.err( 1272): at org.qtproject.qt5.android.QtActivityDelegate.startApplication(QtActivityDelegate.java:635)
W/System.err( 1272): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1272): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:252)
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:643)
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:872)
W/System.err( 1272): at android.app.Activity.performCreate(Activity.java:5104)
W/System.err( 1272): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
W/System.err( 1272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
W/System.err( 1272): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
W/System.err( 1272): at android.app.ActivityThread.access$600(ActivityThread.java:141)
W/System.err( 1272): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
W/System.err( 1272): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1272): at android.os.Looper.loop(Looper.java:137)
W/System.err( 1272): at android.app.ActivityThread.main(ActivityThread.java:5041)
W/System.err( 1272): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1272): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 1272): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
W/System.err( 1272): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
W/System.err( 1272): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 1272): java.lang.Exception:
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:253)
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:643)
W/System.err( 1272): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:872)
W/System.err( 1272): at android.app.Activity.performCreate(Activity.java:5104)
W/System.err( 1272): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
W/System.err( 1272): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
W/System.err( 1272): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
W/System.err( 1272): at android.app.ActivityThread.access$600(ActivityThread.java:141)
W/System.err( 1272): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
W/System.err( 1272): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 1272): at android.os.Looper.loop(Looper.java:137)
W/System.err( 1272): at android.app.ActivityThread.main(ActivityThread.java:5041)
W/System.err( 1272): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 1272): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 1272): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
W/System.err( 1272): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
W/System.err( 1272): at dalvik.system.NativeStart.main(Native Method)
libmy_app.so is located in /system/lib along with all the other QT libraries (libQt5AndroidExtras.so, libQt5Widgets.so, etc)
Googling for "Can't find main library" has led me to the QT source but that hasn't been helpful in tracking down why it can't find the library.
So any insight as to what's going on would be appreciated. Or if there a a better, totally different solution to running a QT app as a system app, I'm open to that too.
Thanks in advance!
UPDATE
After some more investigation, it appears the problem is because QTNative.startApplication() is using nativeLibraryPath to look for libmy_app.so. nativeLibraryPath is defined in /data/system/packages.xml:
<package name="com.me.my_app" codePath="/system/app/com.me.my_app-1.apk" nativeLibraryPath="/data/app-lib/com.me.my_app-1" flags="572999" ft="1471c4d74c0" it="1471c4d7c39" ut="1471c4d7c39" version="1" userId="10063">
but /data/app-lib/com.me.my_app-1 doesn't exist when my_app is a system app. My first though was it's because I removed it in step 6 after moving the libraries to the /system/lib folder. But even leaving that step out, after rebooting the device /data/app-lib/com.me.my_app-1 is gone. I guess some Android package management process cleaned it up. If I create a symlink from /data/app-lib/com.me.my_app-1 point to /system/lib after the reboot, my application runs.
So my question at this point is what is nativeLibraryPath in packages.xml used for? It appears that Android searches for libraries via /data/data/com.me.my_app/lib, which is a symlink to either /data/app-lib/com.me.my_app-1 or /system/lib depending if it's a user or system app. And I figured this out because if I don't move the Qt libraries to /system/lib and change the symlink (steps 5, 7 and 8) my application throws an exception even earlier because Android can't find the QT libraries.
But it appears QT is using the value of nativeLibraryPath from packages.xml to find my library. Is changing it to /system/lib the correct solution? Are there any other potential side effects? Or is this a misbehaviour on QT's part and it should use the same search path as the rest of Android?
I think the right solution is recreating the symlink from /data/app-lib/com.me.my_app-1 to /system/lib after the reboot. It's only removed on the first reboot after moving the app to the system folder and is stable from that point across reboots and app updates. So I'm going to mark this as the answer in case anyone else runs into the same problem. For reference, the process I ended up with to install a QT app as a system app from the adb shell is:
1) pm install /data/my_app.apk
2) rm /data/my_app.apk
3) cp -p /data/app/com.me.my_app-1.apk /system/app
4) rm /data/app/com.me.my_app-1.apk
5) cp -p /data/app-lib/com.me.my_app-1/* /system/lib
6) rm /data/data/com.me.my_app/lib
7) ln -s /system/lib /data/data/com.me.my_app/lib
8) reboot
Start the adb shell again and then:
9) ln -s /system/lib /data/app-lib/com.me.my_app-1
You can use this patchset as a temporary solution: https://codereview.qt-project.org/194507
All libraries from android-build/libs/ must be deployed at /system/lib folder on device (or firmware before it built)
I am new to android and I am trying to explore the AccessibilityService. I have extended the AccessibilityService class, which gets the AccessibilityEvents and I am able to use the events.
I see a problem when I run "uiautomator dump". My AccessibilityService gets destroyed and I do not get any Accessibility Events. Is there a way to work around this problem?
Any help or suggestion appreciated. Thank you very much in advance.
The stack trace is attached below:
W/System.err( 3832): at com.example.myservice.MyAccessibilityService.onUnbind(MyAccessibilityService.java:185)
W/System.err( 3832): at android.app.ActivityThread.handleUnbindService(ActivityThread.java:2629)
W/System.err( 3832): at android.app.ActivityThread.access$1800(ActivityThread.java:141)
W/System.err( 3832): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1348)
W/System.err( 3832): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 3832): at android.os.Looper.loop(Looper.java:137)
W/System.err( 3832): at android.app.ActivityThread.main(ActivityThread.java:5103)
W/System.err( 3832): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 3832): at java.lang.reflect.Method.invoke(Method.java:525)
W/System.err( 3832): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
W/System.err( 3832): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
W/System.err( 3832): at dalvik.system.NativeStart.main(Native Method)
UiAutomator can't be used along with an AccessibilityService. When you turn on the service the uiAutomator will crash.
However, as UiAutomator 2.0 is based on instrumentation you will probably be able to access the information you need without the service.
I faced the same problem & just found out the solution from here.
The answer was written in Kotlin so I modified mine here as I am writing in Java:
int flags = UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES;
Configurator.getInstance().setUiAutomationFlags(flags);
mDevice = UiDevice.getInstance(getInstrumentation());
Please try with uiautomator2 having version above 18 and make disable supress accessibility service flag as true, which ll run accessibility service as well as driver seamlessly without terminating.
You could switch to UiAutmator2 with following code from appium-uiautomator2-server:
private void setAccessibilityServiceState() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
return;
}
Configurator.getInstance().setUiAutomationFlags(
UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES);
} else {
// We can disable UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES
// only when we set the value as zero
Configurator.getInstance().setUiAutomationFlags(0);
}
}
I was getting this failure on a ICS device with latest Google Play Services when trying to call GoogleAuthUtil.getToken(args). The issue was resolved by removing and adding Google account to the phone. I wasn't able to reproduce the error. Google searching stack trace provided no insights. Any ideas on how this issue could be prevented and what it means are appreciated!
W/System.err( 3145): java.lang.SecurityException: Permission Denial: reading com.google.android.gsf.gservices.GservicesProvider uri content://com.google.android.gsf.gservices/prefix from pid=3145, uid=10055 requires com.google.android.providers.gsf.permission.READ_GSERVICES
W/System.err( 3145): at android.os.Parcel.readException(Parcel.java:1327)
W/System.err( 3145): at android.os.Parcel.readException(Parcel.java:1281)
W/System.err( 3145): at com.google.android.gms.internal.a$a$a.a(Unknown Source)
W/System.err( 3145): at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
W/System.err( 3145): at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
W/System.err( 3145): at com.xxxxx.Backend.obtainSheetKeyAndInitService(Backend.java:112)
W/System.err( 3145): at com.xxxxx.Backend.fetchColumns(Backend.java:103)
W/System.err( 3145): at com.xxxxx.ProgressActivity$DummySectionFragment$3.doInBackground(ProgressActivity.java:288)
W/System.err( 3145): at com.xxxxx.ProgressActivity$DummySectionFragment$3.doInBackground(ProgressActivity.java:1)
W/System.err( 3145): at android.os.AsyncTask$2.call(AsyncTask.java:264)
W/System.err( 3145): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err( 3145): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err( 3145): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
W/System.err( 3145): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err( 3145): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err( 3145): at java.lang.Thread.run(Thread.java:856)
EDIT
As of time of reporting the bug:
google_play_services-lib android:versionName="3.2.65 (834000-30)"
Google Play Services version on device 4.0.31
Updated library to 4.0.30 and added requested permission to Manifest which seems to have worked. Waiting for Google to confirm that new library version fixes this issue because adding a new permission is a highly undesirable fix.
Bug report: http://code.google.com/p/android/issues/detail?id=61934
You should add
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
to the AndroidManifest.xml file. Thats all.
Today 2013-11-14 there has been a large drop in the number of error reports we have received due to this exception. Also I see Google Play Services version 4.0.33 is out, I didn't notice exactly when that released but it looks like yesterday.
Perhaps Google released a fix in 4.0.33? That would be great!
If anyone has been able to reproduce this bug, please let us know if 4.0.33 fixes it for you. (We have never been able to reproduce the bug on a dev device, although we have have zillions of traces from our installed base.)
[UPDATE] Google has definitely pushed a fix, we had only a handful of reports on 11/15 and zero on 11/16
Why does the Android system throw this Exception?
05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is a directory
05-18 12:33:44.169 W/System.err( 8230): at org.apache.harmony.luni.platform.OSFileSystem.read(Native Method)
05-18 12:33:44.169 W/System.err( 8230): at dalvik.system.BlockGuard$WrappedFileSystem.read(BlockGuard.java:165)
05-18 12:33:44.169 W/System.err( 8230): at java.io.FileInputStream.read(FileInputStream.java:290)
05-18 12:33:44.169 W/System.err( 8230): at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:166)
05-18 12:33:44.169 W/System.err( 8230): at java.io.BufferedInputStream.read(BufferedInputStream.java:324)
05-18 12:33:44.169 W/System.err( 8230): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
05-18 12:33:44.169 W/System.err( 8230): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:573)
05-18 12:33:44.169 W/System.err( 8230): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:384)
05-18 12:33:44.169 W/System.err( 8230): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:412)
05-18 12:33:44.169 W/System.err( 8230): at dalvik.system.NativeStart.run(Native Method)
05-18 12:33:44.169 D/skia ( 8230): ---- read threw an exception
I am loading the images into memory like this:
return BitmapFactory.DecodeFile(fullPathToImage);
This is not causing failing problems, but it does cause unnecessary delays in the loading.
The image is stored on the Environment.ExternalStorageDirectory.AbsolutePath. The path is the full path including the image filename and extension. The image does load properly, so why does it do this?
I saw this SO: java.io.IOException: Is a directory Android, but this seems to be related to drawable resources, which I am not using.
I'd be curious to see if you still get the error if you wrapped your DecodeFile call in a check to see whether the file system thinks it's a directory:
File f = new File(fullPathToImage);
if (!f.IsDirectory)
{
return BitmapFactory.DecodeFile(fullPathToImage);
}
else
{
Console.WriteLine("This is a directory: " + fullPathToImage);
}
One other possibly useful thought. If you're dealing with very large images and you don't need them to be full resolution, you could possibly improve performance by reducing their size:
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.InSampleSize = 4; //Cut the image size to 1/4 the original
return BitmapFactory.DecodeFile(imgFile, opts);
Has anyone had any success getting an android device to participate in a two-way SSL hanshake? ie with a client cert involved on the device? After installing the client cert from the sd card - i cannot connect to the URL that requires a two way ssl handshake in either the browser or the mail app. (we secure our mail server behind a hardware appliance that establishes the SSL connection).
The Device just throws an SSL handshake error. Our setup works on all desktop browsers, iphones and WinMo devices with the client cert installed.
This is the error log from the device (HTC Desire with 2.1):
D/EAS_AppSvc( 422): 06021143 > testServer()
D/EAS_AppSvc( 422): 06021143 > initEASService()
V/EAS DeviceInfo( 422): GetDeviceID: 4020b869
D/EAS_AppSvc( 422): 06021143 (1)connect to > https://serverxxx.com.au/Microsoft-Server-ActiveSync?User=u415434&DeviceId=HTCAnd4020b869&DeviceType=htcbravo
I/AlertDialog( 422): [onCreate] auto launch SIP.
D/EASProgressDialog( 422): 06021143 onStart()
D/EAS_AppSvc( 422): 06021143 onServiceStateChanged :serviceState = 0 home Telstra Mobile (N/A) 50501 HSDPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EriInd: -1EriMode: -1RadioPowerSv: false
I/LockUtil( 422): 06021143 - acquire PowerLock - PARTIAL_WAKE_LOCK: EAS_NETWORK_CHANGE
D/EAS_AppSvc( 422): 06021143 isWifiNetwork: false
D/EAS_AppSvc( 422): 06021143 isWifiNetwork: false
D/EAS_AppSvc( 422): 06021143 isMobileNetwork: true
D/EAS_AppSvc( 422): 06021143 NETWORK_STATE_CHANGED: isWifi:false, isMobile:true
D/EAS_AppSvc( 422): 06021143 SvcHandler - Account not configured
I/LockUtil( 422): 06021143 - release PowerLock: EAS_NETWORK_CHANGE
D/TelephonyRegistry( 81): notifyDataConnection() state=2isDataConnectivityPossible()true, reason=null
D/TelephonyRegistry( 81): broadcastDataConnectionStateChanged() state=CONNECTEDtypes=default,supl, interfaceName=rmnet0
D/NetworkLocationProvider( 81): onDataConnectionStateChanged 8
D/MobileDataStateTracker( 81): replacing old mInterfaceName (rmnet0) with rmnet0 for supl
D/PhoneApp( 145): mReceiver: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
D/PhoneApp( 145): - state: CONNECTED
D/PhoneApp( 145): - reason: null
D/PendingMsgSendReceiverRegister( 372): onReceive, start to send QueuedMessage
D/PendingMsgSendReceiverRegister( 372): SmsReceiverService_handleServiceStateChanged() sendFirstQueuedMessage >>
D/PendingMsgSendReceiverRegister( 372): SmsReceiverService_handleServiceStateChanged() sendFirstQueuedMessage <<
V/MmsSystemEventReceiver( 372): Intent received: Intent { act=android.intent.action.ANY_DATA_STATE cmp=com.android.mms/.transaction.MmsSystemEventReceiver (has extras) }
E/OpenSSLSocketImpl( 422): Unknown error 1 during connect
W/System.err( 422): java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error
W/System.err( 422): error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1053 0x4b1778:0x00000003)
W/System.err( 422): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
W/System.err( 422): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
W/System.err( 422): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
W/System.err( 422): at com.htc.android.mail.eassvc.common.EASHostnameVerifier.verify(EASHostnameVerifier.java:34)
W/System.err( 422): at com.htc.android.mail.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:242)
W/System.err( 422): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
W/System.err( 422): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err( 422): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err( 422): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err( 422): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:283)
W/System.err( 422): at com.htc.android.mail.eassvc.EASAppSvc.testServer(EASAppSvc.java:3999)
W/System.err( 422): at com.htc.android.mail.eassvc.EASAppSvc$2.testServer(EASAppSvc.java:600)
W/System.err( 422): at com.htc.android.mail.easclient.ExchangeSvrSetting$TestServerThread.run(ExchangeSvrSetting.java:1188)
I/EAS_AppSvc( 422): 06021143 testServer(), IOException(1): SSL handshake failure: Failure in SSL library, usually a protocol error
I/EAS_AppSvc( 422): error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1053 0x4b1778:0x00000003)
V/EAS DeviceInfo( 422): GetDeviceID: 4020b869
D/EAS_AppSvc( 422): 06021143 (2)connect to > https://serverxxx.com.au/Microsoft-Server-ActiveSync?User=u415434&DeviceId=HTCAnd4020b869&DeviceType=htcbravo
E/OpenSSLSocketImpl( 422): Unknown error 1 during connect
W/System.err( 422): java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error
W/System.err( 422): error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1053 0x3f9e10:0x00000003)
W/System.err( 422): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
W/System.err( 422): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
W/System.err( 422): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)
W/System.err( 422): at com.htc.android.mail.eassvc.common.EASHostnameVerifier.verify(EASHostnameVerifier.java:34)
W/System.err( 422): at com.htc.android.mail.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:242)
W/System.err( 422): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:129)
W/System.err( 422): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
W/System.err( 422): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
W/System.err( 422): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
W/System.err( 422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
W/System.err( 422): at android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:283)
W/System.err( 422): at com.htc.android.mail.eassvc.EASAppSvc.testServer(EASAppSvc.java:3999)
W/System.err( 422): at com.htc.android.mail.eassvc.EASAppSvc$2.testServer(EASAppSvc.java:600)
W/System.err( 422): at com.htc.android.mail.easclient.ExchangeSvrSetting$TestServerThread.run(ExchangeSvrSetting.java:1188)
I/EAS_AppSvc( 422): 06021143 testServer(), IOException(2): SSL handshake failure: Failure in SSL library, usually a protocol error
I/EAS_AppSvc( 422): error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1053 0x3f9e10:0x00000003)
D/EASProgressDialog( 422): 06021143 onStop()
V/HtcAlertDialog( 422): onStop
I/HtcAlertDialog( 422): deinitSensor
Installing the cert really is making it available for VPN and WiFi, not generally to all applications.
An application can use client certificates by creating their own SSLContext and initializing it with a KeyManager as shown in this Java example: SSLContext and KeyManager example The SSLSocketFactory returned by SSLContext.getSocketFactory will provide the client certificate from the keystore during handshake.
From your stack trace, it seems like you are using an email app from HTC, I'm not sure if they support client certificates, if so, they probably need to be configured within the application. I do know that the third party app Nitrodesk Touchdown available on the Android Market supports client certificates but that the Android builtin Exchange support in Froyo does not.