HeiseHeise.com

The Personal Blog of Zach Heise

High School Orienteering, 2003
High School Orienteering, 2003

A random image. Reload page for more. Want more info?

Month: March 2013

  • Hacking a lockscreen password on a Kindle Fire

    Swipe that yellow bar to the left and you might see a password request

    2018 Note: These instructions are from 2013 – so unless you find a 2013 era Kindle Fire that has not had its software updated, the below instructions might not do you much good. I don’t know, as I don’t own a Kindle Fire personally.

    I recently came across a Kindle Fire nearby where I work at the university. A colleague and I assumed it must have been owned by a student or teacher who worked in our building, so she posted signs up around the building stating that a lost Kindle Fire (original, not HD) had been found and that the owner could pick it up in her office. Months went by, and I was tormented by the sight of it in her office, sitting unreclaimed on a stack of paperwork.

    She tried contacting Amazon, asking if they could help us locate the owner if we gave identifying numerical information about the device. They (perhaps wisely) refused to do so, but tempted to coax the information out of us anyway so that they could remotely brick the device and render it useless “for security reasons.” I assume then they’d ship us a postage-paid box that we could return the dead device in, and they’d take care of contacting the owner themselves.

    Hah, I thought to myself. What a roundabout journey this poor Kindle will have to take, when all we need is just to reset/delete a lockscreen password. So I rolled up my sleeves and got to work. It ended up being a lot more involved than I had thought it would, thanks to some variations between how Amazon has modified Android from Google’s original designs. The purpose of my blog post here is not to introduce new information or research (I’m a repair and maintenance guy, not a programmer) but instead to merely tie together a myriad of information that I had to use on my journey of discovery.

    1. First order of business was researching where Gingerbread (Android 2.3, or what came as stock on the original Kindle Fires) stores the database for lockscreen passwords. XDA-Developers reveals it here; to summarize:
      data/data/com.android.providers.settings/databases/settings.db
    2. It’s an SQLite database, so you will of course need the application sqlite3 to edit it. The problem is that while stock Android comes with this executable, the Kindle Fire does not. If you try to edit this file, even on a rooted Kindle Fire, it will merely tell you – I don’t know what to do with this file.
    3. I didn’t have any rooted Gingerbread-era phones lying around to rip the binary executable off of, so I downloaded and installed the Android developer SDK on my computer. If you have one, you can use that, and skip this extra time-consuming step. This site here has instructions for installing the SDK, and adding Gingerbread as an installed operating system/environment.
    4. Once you have Gingerbread open in a cute little window on your computer, you can use these instructions to find where the SQLite3 executable is found, and how to yank it off of the emulated Gingerbread virtual machine and onto your computer.
    5. Now, you know where the .db file is (theoretically) and you have a sqlite application ready to be put on your locked Kindle Fire. But of course, in order access your own Kindle Fire’s /data/data folder you will need to root it. But people should be rooting their own devices anyway, and it’s not like you can’t undo it, so I didn’t feel bad about rooting this lost Kindle Fire in order to find the owner. Plug the Kindle Fire in, and follow these instructions here for the original Kindle Fire Utility to root it – the interesting thing is that for all of the Kindle Fire’s weird eccentricities, like not including SQLite3, they still leave debug mode enabled by default, which is kind of key for this to work if you can’t get to the home screen and settings.
    6. Now that you’re rooted, you can use these instructions to get ADB (android debug mode) going in a terminal window on your computer. Use push to get that sqlite binary onto the Kindle Fire in the /data/data folder. I rebooted the Kindle after doing that, then opened up ADB in a terminal window again.
    7. Success! Now, going way back up to that first instruction website from step #1, you can get into the settings.db file and delete the lock screen password with the following commands:
      sqlite> update secure set value=0 where name=’lockscreen.password_salt’;
      sqlite> update secure set value=0 where name=’lockscreen.password_type’;
      sqlite> update secure set value=0 where name=’lockscreen.lockoutattemptdeadline’;
      sqlite> update secure set value=0 where name=’lock_pattern_visible_pattern’;
      sqlite> update system set value=0 where name=’lockscreen.lockexchange.enable’;

    I rebooted one last time, and this time, instead of the lock screen, the system rebooted right to the user’s home screen. I went to the “About Kindle” page on the device and found the user’s full name, looked him up on the Wisc database, and sent an email off of to him letting him know that we had recovered his device. I even dropped it off for him; he seemed surprised that I had taken the time and effort to track him down, but pleased to have it back. He was clutching an iPad when I came to his office, so something tells me that the temporary loss of a $199 device wasn’t devastating to him.

    Anyway, I hope that this amalgamation of instructions can prove helpful to someone who’s in a similar situation.

  • Bangkok and Back Home

    One of the largest reclining Buddhas in the world is at Wat Pho in Bangkok; he’s hard to fit into a picture, though!

    It seems I’m quite behind in posting the final entry from Christine and my trip to Asia two months ago, so I’ll bang (heh) this one about Bangkok out pretty quickly, as we didn’t see too much in the biggest city in Thailand. I’m happy to report that the train from Chiang Mai to Bangkok wasn’t bad at all, considering that our second class seats were only $26 a person versus the $80 apiece it would have cost to take yet another plane ride. Although the two toilets per train car were hideously disgusting and filthy, as I expected, the beds and sheets were clean and didn’t have questionable smells. Our 4-bed, 4-person berth space had us and our upper/lower bunks, and an elderly French couple took the other two. Out of character for me, I don’t think I spoke a word to them for the entire 10 hour trip, although secretly I wondered why they were cheaping out in 2nd class instead of 1st – there was a constant stream of railway employees coming to their bunks bringing them paid extras like dinner, more blankets, and little tables.

    Once in Bangkok, we took the subway northeast from the train station to the closest station I could find to our hostel. We passed under a large sign while descending underground that said in large letters, “NO EATING OF DURIAN ON SUBWAY, 1000 BAHT FINE”. I can believe it. As was getting to become par for the course on our trip, we staked out a cheap-looking restaurant that offered free Wifi access, got some coffee and crab rangoon (they didn’t mix too well together, but we were starving), and I pinned down the precise location of the hostel on my Android; thank goodness for offline caching. It’s definitely been nice to get 4-5 solid days of charge on my phone while out of the country though; thanks to turning off the cellular network since it doesn’t work over here anyway. It’s pretty obvious what was the most battery-sucking thing on the phone.

    Get your shrines here! Good for home or business. Just add flower leis and incense and you’re ready to get blessed

    Bangkok was definitely dirtier than Chiang Mai, but it wasn’t anywhere near as polluted as Cairo. We had heard horror stories about how filthy and disgusting Bangkok would be (and it is kind of the popular culture image of Bangkok being a sleazy, glitzy old metropolis) but besides the air smelling a bit funny and some sludgy trash in the gutters, it wasn’t terrible in most of the places that we saw. Of course, some areas were far worse – like the alleys off of the main streets selling every kind of intriguingly pungent meat you can and cannot imagine, alongside some healthy looking and equally weird vegetables, followed by hilariously incongruous vendors of ladies underpants and self-bottled limeade drinks. Mangy looking cats were everywhere in those alleys, looking somewhat worse for wear then their Jordanian equivalents. In the evenings, we saw a couple of kitten-sized rats scamper from gutters into piles of trash at the entrances of alleys like these.

    We stuck to the main roads and touristy areas of Bangkok most of the time.

    Like in Hong Kong, our hostel room was small and windowless, yet clean. They seemed to have some issues with electricity, as at one point the power went dead for twenty minutes while we were in the shared bathroom showers, but we had encountered the same problems in Phuket as well, so I wasn’t too surprised. But, as cozy as our room was, we were ready to get back out into the streets and find some palaces or temples or something. First, we swung north towards a major traffic circle in a half-hearted last-ditch attempt to find an Aeon ATM (we still hadn’t given up!) but, finding nothing of interest besides some pretty parks, coffee stands, and underwear vendors, we took a tuk-tuk a few kilometers southwest to the Grand Palace – we managed to talk a drive down from 200 baht to 90 baht, although it wasn’t until we were walking back to the curb away from him that he cried out “okay okay 90 baht! Fine fine.” He had been the fifth or sixth one that had turned us down at that price, but I guess even with the traffic he had to suffer through it was still worth it. I slapped him congenially on the back as I paid him at the outside of the palace wall, nodding towards the fat blonde tourists waddling around us with cameras and maps in hand. “Plenty of people here who are probably looking for a tuk-tuk…” He grinned knowingly and laughed.

    3 pairs for 50 baht? How can I lose!? As it turns out, Thai hips are different than Western hips.

    Unfortunately, the entire complex was closing down in only 45 minutes when we arrived, contrary to what I had read. For the equivalent of $20, it wasn’t worth it, so we meandered around the wall and over next door to Wat Po – I love this about Buddhist countries like Thailand; there’s always “another Wat” right around the corner. It was visible over its walls with tall, multicolored spires in the typical Thai fashion – sharp and pointy looking, with what looked like thousands of facets of cut glass or some other kind of shining ceramic embedded in mortar.

    The tourist in his natural habitat
    The central shrine to Buddha in the middle of the temple complex

    Most people come to see one of the largest reclining Buddhas in the world, and we were no exception. The big fellow is housed lengthwise in a long building in the corner of the complex, and we joined the line of tourists taking off our shoes and stuffing them into bags before going in. I think I heard more American accents here then anywhere else on the entire trip, but I suppose I shouldn’t be surprised – we were in Thailand tourist central here, being right next to the Grand Palace. As we made our way around the Buddha in a loop, admiring his shiny gold form from every angle, pilgrims had baht paper money split up into tiny baht coins (each ones probably worth fractions of a penny) and then would drop them into pots stationed along the outside walls of the building.

    Christine provides the scale of Buddha’s feet, each inlaid with mother-of-pearl depictions of the traits of a Buddha

    We were tempted to get an official foot massage from the official school of therapy inside the grounds, but both time and money were limited, and we already guessed from the prices that we’d seen plastered in windows near our hotel that this facility was catering to a more cash-flush clientele – the prices were easily three times anywhere else.

    We took a long, slow loop around the southern part of the old city, which took us through the flower-sellers section, only about two city blocks that were crammed full of possibly dozens of vendors selling beautiful arrangements of wildly colored flowers, including many that were designed to be hung from car or motorcycle mirrors. I debated buying one for the camaro back at home but figured without water, and in the temperatures of Wisconsin at this time of year, it probably would barely survive the trip, and even then, not long afterward. I’d have to content myself with that piece of souvenier rubber I got back in Malaysia from the rubber tree!

    It was dark by the time we reached the train and subway station, the same station that we had disembarked at that morning from Chiang Mai. We were both tired, and after getting as close as we could to our hotel via subway, decided to hail a taxi for the rest of the trip. I had a hunch though – a C-Town mall was only a few blocks away, so I had the taxi driver drop us off there instead. We climbed the escalators up to the top floor, hardly daring to hope…and…success! An Aeon ATM was waiting for us!

    Our long search is finally over. $5 bank surcharges no more!

    Now, our pockets flush with surcharge-free cash, we decided to reward the mall (who was probably paying Aeon a fee to put their surcharge-free ATMs in there; I’m sure Aeon had a very calculated reason they only put their ATMs in a shopping mall) by buying an all-we-could-eat sushi dinner – Christine’s eyes lit up when we saw the restaurant advertising the bonanza for the equivalent of $15 a person. It was only 9PM or so, but already the mall and the restaurants were strangely quiet; the only other people in the restaurant was another Western looking man and woman. The man looked like he had been enjoying all that he could eat for several hours; there were at least a couple dozen plates next to him. We took that as a good sign and dug in ourselves. I can’t speak for sushi prices on the east and west coasts of the United States, but back home in the Midwest, I would say it’s a pretty expensive splurge to eat sushi until you’re sated, but we definitely had a good time.

    Seriously, breath mint packaging company? Seriously?

    (more…)