wnd's weblog

October 2012
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 1 2 3 4

ATA Secure Erase

12 October 2012 08:38:43 for future reference, hardware

tl;dr: ATA Secure Erase works even when your screen appears to be dead after sleep/resume cycle. No surprises there, really.

ATA Secure Erase is a great feature that offers (relatively) quick method of wiping a harddrive in (relatively) secure manner. However, actually being able to call it can be problematic. The problem with Secure Erase is that in IBM-PC-compatible PC world many BIOSes call ATA security freeze upon boot. There are several web pages that list the same "standard" methods of unfreezing your drive but as it often happens, I somehow manage to make things more complicated. For me, method of sleep/resume worked, but getting that far wasn't example straightforward.

It all started when smartd noticed that my primary harddrive had a situation developing. Relocated sector count had crossed threshold and S.M.A.R.T. declared my drive as failing. Thanks to my nightly backups, everything important was safe. Still, as I didn't want to lose my replaceable data, I got a new harddrive the next morning. Once I had all the data safe, it was time to wipe the old harddrive before returning it for a replacement.

Following the steps described in Linux ATA wiki I soon realised wiping the drive would not be that simple. As expected, BIOS had issued security freeze. Not ready to howswap non-hotswappable hardware, my only option was to try to sleep/resume my computer. Being a desktop workstation with an NVIDIA GPU I had never successfully put my computer to sleep and managed to wake it up again. I was out of options.

My fallback plan was to simply use software to overwrite data with random data for a few times. At first I thought of using Darik's Book and Nuke. I then realised a complete wipe would not finish overnight, and decided to look for alternatives that could be run from my live Linux installation. With a quick apt-cache search I found that nwipe would do a "DoD" erase and it would run in a live system. I decided that running DoD short wipe for a few rounds should be enough. However, after 24 hours and having finished just two passes (of three) of the first round I decided to give Secure Erase another try.

Talking of nwipe, if you're developing a tool to ERASE ALL YOUR DATA, please, please document the user interface and make it run with command line parameters. nwipe does NOT take device path as parameter and I could find zero instructions for its ncurses GUI. I had to read the sources to figure out how to do anything with it. Even then, I wouldn't dare to run it on real hardware before doing a test run in a virtual machine.

After yet another internet search I downloaded Parted Magic, which was supposedly able to put my computer to sleep and have some workarounds for NVIDIA GPUs. As expected, none of these worked. Issuing sleep command would put my computer to sleep just fine, but resuming wouldn't reinitialise my GPU. In fact, it didn't even give a signal and my monitor remained in stand by mode. Luckily I discovered that after waking up, my computer did respond to ICMP PING requests. What was even better, pmagic environment was running SSHD. After logging in I discovered sleep/resume had worked: my failing drive was no longer security frozen.

The rest was easy. Following the steps in ATA wiki I set the security password, issued (enhanced Security Erase command and went to bed. In the morning the drive had finished the command. Security Erase had taken just 394 minutes instead of several days that would have been required for short DoD wipe. I powered off, unplugged the ill-fated drive, powered my system back on and went to work. I was finally good to return the drive for a replacement.

Permalink | Comments (0)

Introduction to cheap Android devices

1 October 2012 18:35:52 hardware

Buying a cheap Chinese Android tablet for no particular from Singapore may not have been my brightest idea, but what's done is done. This writing is sort of report on how things have turned out.

Ainol Novo 7 Fire

tl;dr: good but unfinished hardware with a load of software bugs

Dual core Cortex-A9 running at 1.5 GHz, dual core Mali-400 GPU, 1 GiB of DDR3 RAM, 16 GiB flash RAM, 7-inch IPS(?) panel with 1280*800 resolution, 5-point capasitive touchscreen with WiFi, Bluetooth, Android 4.0.4 and Google Play for 130 euro, including shipping. These specifications described the device on which I was going to spend my money. Little did I know what I was getting into.

I placed my order on August 28th and collected the package on September 8th. Having shopped cheap things on DealExtreme I was surprised how neat the sales package was. DX packs things well, there no doubt about that, but their products often have little or no packaging (which is fine unless you're buying the sales package instead of the thing inside). Excited about such a package I quickly opened it and powered on my first Android device ever.

As expected, I was greeted by a green Android figure. However, this time the screen module was not sitting on a prototype board and there was no serial cable connected to the device. I was booting up an actual product. Eventually an animated Ainol logo appeared, and after a few moments I was looking at the home screen. Now what?

The device felt physically well built. The seams were tight, it didn't make any squeaking sounds when I tried to bed it (and it didn't bend), there weren't any sharp corners, the screen felt nice under my fingers and the touch panel was really responsive. The device felt a bit heavy but this could also be seen as a good thing: it wouldn't feel like a cheap plastic toy.

Exploring the device and discovering (some of) its flaws

I started exploring the device by opening settings and going through every single option I could find. I tweaked screen brightness to something that wouldn't burn right through my eyes, played with developer options (and actually left "show touches" option checked for a few days) and tried different screen locking options. This is when I discovered first two issues with the device. Waking up the device from sleep wasn't without surprises.

When I first pressed the power button (after putting the device to sleep) nothing happened. Wondering what I was supposed to do the screen suddenly came back to life. It had only taken two seconds but I had already got worried. A loud, single "pop" sound that came from the speaker didn't help to ease my growing suspicion. I tried the same thing again and surely enough the same happened again.

I continued playing with settings until I found speech synthesis. After trying out some configurations the device fell completely silent. Gone were the touchscreen sounds (good riddance!) but gone were also the speech synthesis samples. I shrugged and browsed back to sound options. After confirming that everything looked fine there I gave up for time being and moved one. At one point the sounds simply came back. I don't know what caused this but it just happened.

Trying out the bundled Chinese applications I also watched two Ainol commercial videos that were on the internal memory card. This is when I really got to see how brilliant the screen was. I had little comparison for the screen, but I was amazed by how good it looked. The screen was bright, colourful and I didn't notice any ghosting. I even stopped paying attention to my own fingerprints on the screen.

During the evening I ended up creating a new Google account for the device. Being paranoid, I wasn't ready to give my "real" login to a cheap Chinese Android tablet. Besides that, I didn't want to connect my actual Google account to this device. Having the account created I launched Google Play application. I had never seen Android Marketplace or Google Play before so I didn't know what to expect. I soon discovered that many applications that I knew were not compatible with my device. Several days later I found this to be because of exotic system fingerprint and missing system configuration files. For example, Google Goggles was marked incompatible but would run perfectly fine if you somehow got it installed.

Next I remembered Humble Bundles that I had bought earlier. I downloaded and installed several games and eventually managed to fill up the system/application filesystem. I soon discovered an option to move the games to the internal memory card. While I was moving the games one by one, the system suddently showed a notification simply saying "SD card removed. Insert SD card." I noticed the games on the internal memory card were no longer available. After a quick reboot everything was back to normal and I continued with the task at hand. When the memory card disappeared again I did an internet search. I ended up reformatting the memory card to FAT32 (from Linux), which solved the issue.

Having installed YouTube application I decided to give it a try. Everything was smooth, an episode of Rap News was playing nicely until I decided try seeking. Seeking the video worked fine, but the sounds were gone again. Just like before, the sounds did however came back eventually. This behaviour really started to bother me, but there was nothing I could do. Interestingly enough, these issues with sounds have rarely happened after the first night. In fact, the only times I've had the same problem again has been with the YouTube application - but certainly not every time I use it.

During the first night I tried number of other things too. Here are some observations:

On the positive side

Despite its long list of flaws, I must say I don't regret my purhace. The device does just what I wanted: it satisfies my curiosity without causing loss of sleep or apettite. Device fingerprint and feature files can be changed to fake Nexus 7, which allows you to install pretty much any application from Google Play. I have to say having a compass would have been a nice addition for toys like Sky Map but I can live without.

The device doesn't have a GPS, but I didn't buy it for navigation anyway. With less than 50 metre error, network-based location works surprisingly well. If I internet tethering would work this would be mostly enough even in the field. With the above changes the device should also be able to use external BT GPS dongle.

I've already wasted several hours playing games on the device. It just seems to be something it does very well. My absolute favourite so far has been Anomaly: Warzone Earth (from Humble Bundle) and it works flawlessly. I've also spent some quality time with (Major) Mayhem and Spacechem.

Without any prior experience I can't compare battery life with other devices. For me, the battery lasts long enough. I can play Anomaly (or I could play, but having completed all challenges already...) for three hours without having to recharge the thing right after. I'd imagine it'd happily play videos for at least as long. It seems to consume quite a bit of juice in sleep mode, though.


In my opinnion the hardware is good value for money. Unfortunately the software doesn't live up to the same standards. Hardware isn't perfect either, but for this price I didn't expect it to be.

The manufacturer is providing updates for the OS and some hobbyists are also creating firmwares of their own. The most active project appears to be Pat Moss's Flambe, which provides Nexus 7 fingerprint and some fixes that are not included in the official package. Manufacturer has kind of promised to release an update to Android 4.1, but that remains to be seen.

Permalink | Comments (0)