Thursday, February 28, 2013

Android Package File is Invalid

How to: "Android Package File is Invalid" message when attempting to install or update an app on the play store.  These steps worked temporarily on my device, but only worked for one or two installations.  

Later, even with no other changes, applications began to install properly.  It may be the PlayStore was having problems during this time and perhaps the best action would have been to wait a day or two.  I am unclear on this. 

Temporary Steps:

These steps temporarily allowed me to install applications.

1.  In Settings, Apps, select tabbed-item "Downloaded (apps)"
     Scroll down and locate "Google Play Store"; click to open

2.  In the list, about half-way down, click "Clear Cache".
3.  Click "Force Stop"

4.  From a PC or other workstation (or from your phone's browser), open
     "https://play.google.com/store"

5.  Scroll to bottom of screen; click "My Orders and Settings"
     Click the Settings Tab
     Give each "My Device" a Nickname by clicking the Edit link.
     Confirm "Show in Menus" is checked.
     Click "Update"  for each line-item changed.
     (These are probably good things to do anyway, for other reasons)

6.  From the phone, re-launch the App Store and attempt your update.

This resolved the problem on my phone.  If this fails, consider the following, which has reportedly also worked:

A.  In Settings, Apps, Select tabbed-item "Downloaded (apps)"
B.  Uninstall Updates and Clear Data and Cache.
C.  Re-install PlayStore Updates and try again

I noted in my testing on my phone, a hard-reboot of the phone fixed the problem one-time, but it re-occurred.


Not Recommended:
The blogosphere also has these geeky comments, should the above steps also fail.  I have tried these, but failed to find the file /etc/inet.d.  And one of the steps, "rebooting into 'recovery' (implying Rooting the phone) is a scary.  In any case, this is of some interest and may aid in further research and with this said, I am not recommending these ideas. 

Using app-store app "es File Explorer File Manager"
If you have troubles installing due to "Package File Invalid", repeat the steps above and attempt the install again.  You should be able to install at least one app at a time.

Launch "es File Explorer"
Press and hold the task-switcher button; this brings up the menu
Click Settings
File Settings, "[x] Show Hidden Files

Open folder /etc/init.d
Locate and delete file  01dalvik
From the Settings menus, Manage applications,  Erase cache and data from the Google Play/Android Market App. 
Then reboot into recovery (unclear on what this step implies)
Wipe dalvik cache, then wipe cache.
It will take a while for the phone to boot.


Monday, February 25, 2013

Android Phone Address Book Imports

Android Phone Address Book Imports - imperfect. At least on my HTC One X phone, running ICS,  exporting and re-importing address books had several problems as I moved to a new phone.  I suspect all Android phones have the same issues when importing.  This article discusses the problems and viable workaround.

To export an Android Address Book: 
1.  Open the Contacts list
2.  Click Menu, Manage Contacts
3.  Click Import/Export contacts.  You can choose SD cards, SIM, etc., depending on your phone.

However, when importing the address book back into the phone, I noticed two serious problems, which makes the address book considerably less useful than when it started:
  • Punctuation around phone numbers lost (4505551234 vs 450.555.1234)
  • Phone number metadata lost: numbers no longer are associated with "Work", "Home", "Mobile"
Additionally, some phones, such as my HTC One X, do not have a way to export to an SD card (this could be because my phone does not have an SD card slot), but there is still the menu.  When exported, the file /sdcard/pcsc_pcsc_0001.vcf attempts to write to the phone's internal storage, but fails with "there is no exportable contacts."  This alludes to one of two problems -- you are not given the opportunity to "select all" contacts for export and because there is no place to store it. 

Exporting to the SIM card (AT&T phones have a micro-SIM card) will transfer the address book, but when re-importing, you will have the problems above. The vcf file knows how to store numbers for "Work" or "Home", but the individual detailed items lose these distinctions and the import fails.  Also, emails have no Home or Work distinctions.



GMail - WorkAround

Gmail's Contacts Menu


You may not like this workaround:  Abandon the address book and re-type the names and address into GMail's address book (or import the vcf into GMail and fix the problems). 

Naturally, this requires a GMail account.  (You had to have an account in order to use the App Store.)  Even if you don't want to use GMail, consider using this for no other reason than to store the addresses.  It works transparently and is better than AT&T's address-book and it is certainly better than typing directly into the phone -- and you will find it a safer place to store the numbers than on the phone.


Entering names, numbers and addresses into GMail is cumbersome because the data-entry screens require numerous mouse-clicks to categorize and occasionally the screen malfunctions with minor problems I won't bother detailing.  But, it works and it keeps proper track of the different types of numbers and punctuation.

To Syncronize, go the the Phone's Address Book, Menu, "Accounts & Sync", confirm Google is set to Auto-Sync.  This should already be set:


Graceful in Practice


In the end, the most interesting thing happens:  The addresses magically appear on the phone.  Changes made, either on the phone or inGMail, sync in near-real-time.  I laughed. 

You can see the addresses lurking in this Contacts menu, note Google


Some Warnings

If you delete or change anything on the phone, it instantly deletes or changes in GMail. 

If you are erasing a phone in order to take it out of service, address-book deletes will reach up into the server and it will delete them everywhere.  I learned this from personal experience.  Do not manually select all addresses and delete.  However, choosing Settings, Storage, "Factory Data Reset" should be okay (not tested).  My recommendation would be to use Gmail to export the address book to a .csv file as a backup, then clear the phone and re-import if needed.

I do not recommend exporting to an SD or SIM card because of the problems listed above; it appears the .vcf format does not adequately track what type of phone number it is. Instead, use Gmail's .csv export.



Wednesday, February 6, 2013

Dell 15Z Dell Backup and Recovery

Discussion:  Dell Backup and Recovery "Recovery Media" hangs after building the first disk in Windows 8.  As of 2013.02.05, no solution.

Issue:
Building Recovery Media fails after writing the first DVD disk.
Disk 1 of 3 is built properly.
Prompted to insert Second disk, but disk immediately ejects without writing.
Prompted again to insert second disk.
Program appears to hang.

Solution:
No solution.

This is a known bug; Dell is blaming Microsoft.

Update:
I contacted Dell Technical Support, India and they admitted a problem with the software and sent a physical recovery disk by second-day air.  I will likely not pursue a software solution now that I have the media.  If you have a solution, post a comment here. 


Other Posts: Tried and failed

Some posts recommend applying all Microsoft Patches and this would solve the problem.  However, as of 2013.02.05, this did not resolve the issue.

Other posts recommend flashing to the latest Dell BIOS.  In the case of the Inspiron 15Z, no new BIOS is available and this did not resolve the problem.  However, I doubt a new BIOS would resolve this issue; it appears to be software.

Other posts recommend writing to a 16GB pen drive.  Keyliner was unable to test this, having only an 8GB flash drive.  The program detects this and will not allow you to write the recovery disks on a smaller media.  With this said, I do not recommend writing a recovery disk to a flash-drive.  Flash drives do not make good, long-term storage and should be refreshed occasionally.  Also, booting from Flash requires some fiddling in the BIOS.


Boot from CD on Dell 15Z with UEFI

How to:  Boot a Dell Inspiron 15z with UEFI Secure Boot.  Booting from CD / DVD instead of the hard disk with American Megatrends BIOS, Aptio Setup Utility.


Symptom: 
Using a known, bootable CD / DVD, the machine will not boot from CD and only boots from the hard drive.  The CD is ignored during boot
In the BIOS, it appears you can change the boot order, but the order does not take effect.


Problem:

Newer machines have a new style of motherboard/disk interface called UEFI.   A Unified Extensible Firmware Interface allows the BIOS to interact with larger hard drives and adds security to the Master Boot Record via a signed Certificate.  This keeps RootKits from infecting the boot device.  This works hand-in-hand with Windows 8.  Other capabilities can be found in this Wikipedia article

With the new UEFI Secure Boot, you cannot boot with an un-signed CD.  Vendor bootable disks, such as Acronis's Recovery Disks must be signed (certificates) by the vendor before they can be used on a Windows 8 machine (see below).

You can boot from a legacy CD by making the following changes to BIOS.  These changes should be considered temporary and you should return the BIOS settings to their Secure Boot mode when done. 

Important notes:
With these BIOS changes, be aware you can boot from a legacy (unsigned) CD/DVD, but the C: drive will not be available.

If you need to boot from a CD/DVD *and* you need to access the C: drive, then you must get a signed, bootable CD.  If you have made your own PXE bootable disk, getting a signature from Microsoft is beyond the scope of this article.

Legacy Boot Solution:
Changing Boot Order

See important note, above.
These instructions were written using a DELL 15Z laptop with a secure-boot bios, American Megatrends BIOS version A00.

1.  Ensure a bootable CD/DVD is in the drive before starting these procedures.

2. Boot the computer.

At the Dell BIOS splash screen, insistently and repeatedly but not wildly, press F12 until the BIOS menu is displayed.  Be aware on newer (2013) Dells, there is no prompt on the BIOS splash indicating F12 is an option. 

3.  Choose "Change Boot Mode Setting"

4.  Change the Boot Mode to "Legacy Boot Mode, Secure Boot Off".  The computer will reboot once selected.

5.  Again at the BIOS splash screen, note the changed menu. 

Press F2 for Setup.
(or, if F12, choose "BIOS Options")

6.  On the top-menu, arrow horizontally to "Boot".  These are the old-style boot menus that many of us are familiar with.  Change the Boot Priority

Set #1 to be CD/DVD/CD-RW Drive.
Set #2 to the Hard Drive
No opinion on other settings

7.  Press F10 to save and allow the workstation to reboot.

8.  The CD/DVD should boot.

You may be presented with a sub-menu.  For example, Acronis Disk Image prompts to boot into Acronis or into Windows.


Returning

Once you are done with the bootable CD/DVD, return to the BIOS screens and return the Boot Mode Setting to "UEFI Boot Mode, Secure Boot On".  I do not recommend staying with the Legacy Boot Mode and nor did I test booting into Windows with that setting.


Acronis Notes:

With these changes, my Acronis True Image Backup CD (Version 2013) would boot into the application.  But the software could not see the newer UEFI Hard Disk.  The solution was to upgrade to Acronis 2014..

For older versions, Acronis had a hotfix http://forum.acronis.com/forum/39714 [but I found it did not work on version 2013; again, an upgrade to 2014 seems to be the only real solution].

Related Keyliner Articles:
Acronis 2010 / 2011 hangs in Windows 8
Acronis 2010 Step-by-Step
Acronis 2010 Recover a single File from backup

Acronis 2010 Not the last disk in backup

Disk Imaging Cleanup Steps - Faster backups
USB Backup Drive Slow