Flashing the ODROID-U2’s eMMC card without a reader

Why?

In the quest for the ideal XBMC set-top box, I’ve bought an ODROID-U2. It’s a small devboard with an Exynos 4412 quad-core Cortex-A9 processor. Pretty much the same chipset as the Samsung Galaxy S3 or the Note 2, which should be more than enough to power XBMC I figured. (Note: At this point it doesn’t run XBMC flawless yet, the menus work great and much faster than on the RPi or the Pivos XIOS DS, 720p content seems to work fine, but 1080 still stutters a bit. However, that’ll supposedly get fixed once XBMC upgrades to multi-core ffmpeg or the video decoder will be implemented)

While the ODROID will boot from MicroSD perfectly, there’s another option called eMMC that is supposedly much faster. If you buy it from them, it’ll include a small converter to microSD so you can flash it with a computer. However, as it turns out this converter is absolute garbage. it’s too big to fit into a regular uSD-SD converter, and even after I filed it down to the appropriate size, it still didn’t work.

So I had this nice box, with Android 4.0 pre-installed, but the one method to upgrade was broken.

Luckily, there’s another way to upgrade by booting to Ubuntu from a microSD card, and access the eMMC module on-board from there. I’ll detail how I did it here.

Continue reading Flashing the ODROID-U2’s eMMC card without a reader

CyanogenMod modded

For my Nexus One, I’ve been trying a few new ROMs. One that is supposedly very good is CyanogenMod, and I personally kinda like it.
One downside however, is that the power widget colors for features turned on have been changed to an ugly light blue-ish color, that completely mismatches with any other android user interface parts. So I did what any respectable tinkerer would do, and changed them back to green. Here’s how I did it, hoping these instructions might help other people with the same or related problems. Note that all the tools I uesd should be easy to find using google 🙂

Apparently, the power widget is in Settings.apk. This file also contains a lot of other stuff, and not suprisingly the settings dialogs are among those. Seeing as CyanogenMod adds quite a bit to the settings dialogs, simply putting back a stock Settings.apk is not an option.
So instead, we should change something inside of Settings.apk. This is what I did to get the Settings.apk (and back it up) using the Android SDK:

adb remount
adb shell
cd /system/app
cp Settings.apk Settings.bak
exit
adb pull /system/app/Settings.apk Settings.zip

Then I opened Settings.zip with winrar, and browsed around. I found the files needed in res/drawable-hdpi under filenames appwidget_settings_ind_on_?.9.png and appwidget_settings_ind_mid_?.9.png (where ? is c, r and l).
My first attempt was simply to change the colors using GIMP, but that messed up the scaling of the pictures.
To fix that, I used a program called tweakpng, and removed all PNG chunks not in the original file, and copied the one chunk that the new file didn’t have from the old file.
This targets the scaling issues, but somehow I still had some weird blue lines through the images.
Instead of turning it to white as I wanted, I figured the normal Android green would be sufficient too. So I set out to get it from a stock ROM.
I found the stock Nexus ROM, and found the system.img. Apparently it’s a YAFFS2 filesystem, and after some googling, I found a tool unyaffs (needed to compile that on a linux box) to extract it. As said before I couldn’t just take the Settings.apk from there, so instead I renamed it to Settings_orig.zip, and with winrar moved the files I found earlier from the original into the modified zip file.
Then I used

adb push Settings.zip /system/app/Settings.apk

to push it back onto my device.
After re-adding the widget, the colors were green again 😀