Original URL: http://www.theregister.co.uk/2014/07/09/android_wear_paid_app_workaround/

YES, you CAN install paid-for apps on Android Wear – if devs rebuild them

Google Play crypto glitch means extra work for coders

By Neil McAllister

Posted in Developer, 9th July 2014 21:28 GMT

Google has published a workaround that allows paid-for apps to be installed on Android Wear devices, but it's hardly straightforward and it's nothing device owners can do themselves.

Early adopters who purchased LG G or Samsung Gear Live smartwatches have been stymied by a glitch in the Google Play store's app encryption scheme that makes it impossible to load store-bought apps onto their devices.

The Chocolate Factory has now acknowledged that the problem exists, and has proposed a solution. Unfortunately, however, the fix isn't a matter of Android Wear owners hacking their devices. Rather, it requires Android Wear app developers to repackage their apps and resubmit them to Google Play.

The difficulty stems from the fact that the installer on the Android Wear device can't access the assets/ directory of a paid app, which is where the APK file that's meant to be installed on the wearable is usually located.

Google's solution is for app developers to move the wearable APK file to a different directory, res/raw/, where the wearable installer can get at it. If they then upload the fixed versions of their apps to the store, Android Wear owners will be able to download and install them.

Doing that isn't as easy as it sounds, however. Android developers usually build and package their apps using Gradle, an automated build toolkit. But the "wearApp" Gradle rule that devs use to package Android Wear apps is set up to put the wearable APK file in the assets/ directory, which only works for free apps that don't use Google Play's crypto locking system.

That means building paid apps for Android Wear now requires some extra legwork from developers, including shuffling files around by hand and even hand-coding some XML properties files to let the app know where to find the wearable APK.

Google says a future update to the Android software development kit (SDK) will include a revamped version of the Android Gradle tooling that supports packaging paid wearable apps in the res/raw/ directory.

"We will be also be updating the documentation to reflect the above workaround," the online ad-slinger helpfully explains. "We're working to make this easier for you in the future, and we apologize for the inconvenience." ®