Tuesday, September 24, 2019

nexus 7 - Unable to Install Certificate


I am trying to install this certificate on a Google Nexus 7 tablet.


I have copied the certificate file (from Win7x64) onto its internal storage and opened it in a file manager to install it. This procedure worked for the previous (now expired) version of the certificate (which I have removed on the device before attempting to install the new one).


However, for this new certificate, the following message appears:



Couldn't install because the certificate file couldn't be read.



The same file could be installed flawlessly into various certificate stores on the computer that I connected the tablet to (hence, the downloaded file is not corrupted). I copied the file several times to the tablet and tried again, always with the same result (hence, the copied file is most probably not corrupted, either).


The tablet had Android 4.4.4 at first, then I upgraded to Android 5.0.2. I am getting the same error message on both systems.



The administrators reponsible for providing the certificate had not received any such reports so far, and the certificate seemed to install flawlessly for other people on Android devices of different types.


I could not find many related issues on the web; googling for the error message quickly led to the localization resource files that specify that message (usually a bad sign with respect to frequency of users out there to encounter an error message). The most promising links still seem to be dead-ends:



  • The error message is mentioned in a Forum post, but the only reaction to it seems to be hmm...not really sure what that is. I'll look into it though (from December 2013). I couldn't find any follow-up to that issue, and the rest of the thread appears to be unrelated chatter.

  • There is an open SO question citing the same message (though referring to something called "Android Moto G") from March 2014, but no-one has provided an answer so far.


Hence, my questions are:



  • What issue does the error message actually point to?

  • How can I install the certificate file?



EDIT: Here is the log output of what happens when I try to open the certificate in a file manager app on the device:


I/ActivityManager(  540): START u0 {act=android.intent.action.VIEW dat=file:///storage/emulated/0/Download/infcacert.crt typ=application/x-x509-ca-cert flg=0x10000000 cmp=com.android.certinstaller/.CertInstallerMain} from uid 10083 on display 0

E/ActivityManager( 540): Invalid thumbnail dimensions: 720x720

I/ActivityManager( 540): Start proc com.android.certinstaller for activity com.android.certinstaller/.CertInstallerMain: pid=11644 uid=10008 gids={50008, 9997} abi=armeabi-v7a

E/CertInstaller(11644): Failed to read certificate: java.io.FileNotFoundException: /storage/emulated/0/Download/infcacert.crt: open failed: EACCES (Permission denied)


D/OpenGLRenderer(11644): Render dirty regions requested: true

D/Atlas (11644): Validating map...

I/Adreno-EGL(11644): : QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328

I/OpenGLRenderer(11644): Initialized EGL, version 1.4

D/OpenGLRenderer(11644): Enabling debug mode 0


I/ActivityManager( 540): Displayed com.android.certinstaller/.CertInstallerMain: +362ms (total +453ms)

V/RenderScript(11644): Application requested CPU execution

V/RenderScript(11644): 0xa330c400 Launching thread(s), CPUs 4

D/TaskPersister( 540): removeObsoleteFile: deleting file=7_task.xml

D/TaskPersister( 540): removeObsoleteFile: deleting file=7_task_thumbnail.png


The crucial part of which seems to be java.io.FileNotFoundException: /storage/emulated/0/Download/infcacert.crt: open failed: EACCES (Permission denied). I do not understand this message - I have successfully copied and opened other files to the device the very same way as I did now with the certificate file. Moreover, how would I even set these file permissions appropriately when copying them to the device via Windows Explorer?



Answer



Just had the same issue.


Go to Settings > Security > Install from storage.
Locate your certificate file and install it.


Edit:
If instead of Install from storage preference you have Install from SD card (this is what being displayed when you use API-19 emulator for example), then one extra step required. Because in this case the activity shows only Recent and Downloads menus without simple way to pick the certificate from the sdcard.
The workaround for me was to put the certificate on my desktop's local web server (mongoose for example). Then (on emulator) I used the stock browser to open the web directory, tapped on certificate (see below) and selected Save link. The file will be downloaded and shown in Downloads view and you will be able to pick it successfully.


save link screenshot


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...