Category Archives: Android

Fire Tablet setup: How to skip Amazon registration

Fire tablets are great cheap Android tablets, but they’re tied to Amazon ecosystem, which sucks. You used to be able to skip Amazon registration during setup, but on newer devices you can’t anymore.

Except you still can.

During setup you’re presented with “Register your fire” screen, and “Continue” button, and no way to bypass it. Follow these steps:

  1. Tap “New to Amazon? Start here” link.
  2. “Choose Country or Region” screen appears – select any country
  3. “Create an Amazon Account” screen appears. Instead of entering name, email, and password just tap “Close” button

You’re back in the original “Register your fire” screen, but now in addition to “Continue” button you will see “Not now” that lets you skip the registration.

Now you’re free to install an appstore of your choice e.g. F-Droid or Google Play Store and use it as a regular Android tablet.

Full control of your Limitless LED/Milight bulbs from Amazon Echo

Limitless LED Limitless LED offers full color RGBW light bulbs that you can control over Wi-Fi/4G from your computer, phone or smartwatch. They’re an inexpensive alternative to Philips Hue and they look really cool.
But I, being lazy ass that I am, was wondering if you can control the lights from Amazon Echo by voice commands alone. Out of the box Echo and Limitless LED don’t recognize each other. Amazon can see and control Hue, but not Limitless LED. Fortunately geniuses of BWS Systems came up with a really cool piece of software – home automation bridge “HA-Bridge”. It’s free and written in Java so it can run pretty much in any environment under any OS. What it does – it emulates Philips Hue API so other devices on your network – like Echo – can see and interact with it. Continue reading →

Unblock my heart, i mean, iPhone for Pebble geocoding

Cobblestyle I’ve recently updated code for Cobblestyle Pebble Watchface to take advantage of very cool geocoding service called Nominatim by Open Street Maps.

Nominatim is used in two places: Direct lookup is used in watchface’s config page to lookup coordinates of a place by its name for custom location setting; reverse lookup is used to lookup location name by its coordinates to display name on actual watchface.

It was working fine – on Pebble watches connected to Android phones. It was failing miserably on iOS, so iPhone Pebble users were getting neither location nor weather updates. And it was pretty puzzling for a while until I obtained logs from running watchface thanks to invaluable help from Robin.

Turned out iPhone Pebble app was plain simple blocked by Nominatim service, every attempt to retreive location resulted in message being sent back “You have violated acceptable policy”. Which was kinda surprising since I just started using the service. When I contacted Nominatim support, they told me that apparently some Pebble app running from iPhone abused the service pretty badly, running hundreds of requests per second. And since the only way they can detect requesting app is by it’s User Agent string – all apps spotting iPhone Pebble UA were blocked.

Support suggested to set UA string specific to the app so it could be easily identifiable. Standard approach to set headers on xmlHttpRequest object is .setRequestHeader(..). Unfortunately by many browsers and clients it is considered unsafe to spoof UA via request headers. Fortunately iOS allows that, so all I have to do is catch and ignore erros in other clients. Basically this line of code solved the issue:

try {xhr.setRequestHeader("User-Agent", "Cobblestyle Pebble Watchface");} catch(e){}

Thanks to this as of version 2.19 Cobblestyle watchface correctly displays weather and location information. Yay.

Restore bricked HTC One M8

Today my trusty HTC One M8 informed me that OTA (over the air) update of system software is available. Android security updates. Naturally I let the system download and install the update. Unfortunately after install phone refused to boot – it was getting stuck on HTC logo on white screen. Bummer.

Now I researched “stuck on logo” topic in depth and tried different methods to unstick it. No dice. Moreover, after chat with HTC Support and following their advice phone would simple go to blank screen. Double bummer. Continue reading →

Root your Android device without flashing custom recovery

HTC Rooted
It is fairly straightforward to root an Android phone using SDK platform tools (adb, fastboot), for example this is a very nice guide how to root HTC One M8. Basically you download SuperSU superuser manager to your device, download custom recovery image onto your computer and flash it to your device via command

fastboot flash recovery your_custom_recovery.img

then reboot into newly flashed recovery and flash the SuperSU. Boom, you’re done.

The problem with this approach, once you phone receives OTA (over the air) update (e.g. new version of Android) it needs original stock recovery to install it. If you have custom recovery (e.g. TWRP) – OTA update will fail. The solution is, when you root your phone, not to flash custom recovery, but just to reboot into it without flashing. Instead of above command, use

fastboot boot your_custom_recovery.img

This command will reboot your phone into custom recovery without flashing it. Then you can flash SuperSU and after reboot your phone will be rooted and original stock recovery remains.

You can even save the original stock recovery (after you rooted the phone) in case you do need to flash custom one. This way you can have a backup of stock recovery in case you need to flash it back to install OTA update. Below steps are for HTC One M8, but other devices will have similar approach:

Assuming that your phone is connected to PC, you have correct drivers installed and USB debugging mode enable.

run  "adb shell" command on your PC
"su" (watch your phone and grant permission if needed)
"dd if=/dev/block/mmcblk0p43 of=/sdcard/stock_recovery.img"

This will copy stock recovery of your HTC One M8 into file “stock_recovery.img” on the SD Card.

Credits go to this XDA thread

Sideload APKs directly from your phone to FireTV/FireStick

ADP If you’re joining a grown crowd of cordcutters (people who disconnect their Cable TV services) you’re not a stranger to streaming. Devices like Roku and Chromecast go a long way to provide all your TV shows and movies need.

Amazon Fire TV and Fire Stick are the latest additions to the streaming gadgets. One advantage they have over other devices they run Android (albeit heavily modified). This gives you ability to install (sideload) ordinary Android apps onto these gadgets. There’re multiple tutorials on how to do it from desktop computers, but you have to download apps APKs onto desktop. Wouldn’t it be easier if you could do this directly from your phone?
Continue reading →

Developing first Pebble.js app

    

Pebble Smartwatch has offered SDK to develop watchfaces and watchapps in C language for a while now. But most recently they tried something different: Pebble.JS a project that lets you code for Pebble in JavaScript. Unlike native app – JS code runs on your phone, so it’s not as fast, and Bluetooth communication required to display any data, but there’re numerous advantages as well.

To test it I decided to write a simple app that would use basic, but important features of Pebble.JS: displaying of information card (a la Pebble notifcation), using menu and executing an AJAX call to bring information from the Net.

Enter AutoInsult for Pebble – application that is based on autoinsult.com – it generates a random insult based on style you selected.
Continue reading →

Solution for NFC not working on Samsung Galaxy phone

This has been bothering me for a while – NFC refused to work on my Samsung Galaxy phone. Service was enabled and running, no errors or warning were displayed, but phone was unable to detect any NFC presence – tags, stickers, point of sale etc.

I was wrecking my mind until I realized that a while back I replaced the original Samsung Battery with a higher capacity generic one to extend battery life. But original Samsung Battery acts as an NFC antenna as well!

As soon as I put original battery in – lo and behold NFC sprang to action.