Right before Christmas, I ordered a quad core iMX6 based Android stick called the Zealz GK802 from Geekbuying. Apparently there is a copy out there called the HI802 and they appear to be identical. Geekbuying claims they’re the first, and it sounded like people were waiting a long time to receive their HI802, so I went with Geekbuying instead. Surprisingly, they ship via DHL for free from Hong Kong or wherever and the unit arrived in about a week. Anyway, it worked fine right out of the box and booted up in 720p (you attach it to a HDMI port on your TV/monitor). I wanted to get going w/ some apps that require root figuring a device like this would come rooted, but unfortunately, that’s not the case. It took a while to root this myself since ADB is disabled, but it is possible to do, and I’ll document how I did it along w/ a bunch of downloadable stuff if you’d rather just get yours rooted.
This little stick comes with Android 4.0.4 installed, has a quad core Freescale iMX6 CPU, 1GB RAM and a 8GB micro SD card that it boots from, along with another microSD card slot that allows you to add in another card up to 32GB in size. You can also replace the other card with something larger too if you know what you’re doing. I didn’t bother since I don’t have anything larger than a 8GB card laying around, and I plan on snagging all my media via the network anyway (this does have wifi and Bluetooth built in too).
There are a couple of weird things with the GK802. Mainly, there isn’t a power button. I’m not sure if Android likes power being yanked while running, but w/o root, that’s all you can do, unless the little hard to press reset button might provide that functionality. Then there is the USB cable. Supposedly it’s some special cable (same deal w/ the 5V power adapter) that requires you to use their cable and power adapter to power the GK802 and have the USB host work as well. I haven’t tried other micro USB cables or power adapters to see if this is true, but I hope not. I don’t know what that accomplishes on their end.
Next, ADB doesn’t work, or rather, is disabled. Since you power the GK802 from its micro USB port, the only way to connect it to the PC for ADB stuff is via that same port. My laptop powered the GK802 just fine, but it may be different for others. Anyway, just plugging the stick into the PC via USB results in the stick booting into MTP mode, which allows you to put stuff on the internal card. By going through a hub, Windows was busy enumerating stuff and the GK802 was fooled into booting normally. Still, no luck w/ ADB, which means rooting becomes a pain in the butt.
Ok last annoying thing. To get into recovery mode, you have to stick a paperclip in a tiny hole next to the micro USB connector (not the one between the USB host and micro connector as shown in the Geekbuying firmware update guide, that’s the LED hole) to press a little button inside, while trying to plug in the tight fitting micro USB power adapter. I ended up hooking up a power strip and switching power to the thing that way. Anyway, once you’re into recovery mode, you can “flash” updates to the device via the 2nd micro SD card. Select the last option in the list by moving the plugged in USB mouse “down” to last option, then left click to select. Oddly, the keyboard is useless in this mode.
This is where rooting begins. Luckily, Geekbuying has released an “update” to Android, which includes the system.img, boot.img, recovery.img, and uboot.bin files. After reading about manually rooting, the system.img and boot.img files are of most interest. The system.img is mountable in linux, but the boot.img file is a specially packed file that requires some messing around to unpack what’s inside. If you want to skip all the stuff I’m going to talk about below on how to root the device and instead you’d just rather have the files to download and “flash”, you can grab the zip here and follow the instructions here to install the “update”. I just used a FAT32 formatted, blank microSD card and the recovery mode was happy with that.
The first step in the rooting process is getting the firmware update from Geekbuying. You can download that on their page here. It’s a password protected, 7Zip file, which is an odd, not too linux friendly format. Anyway, unzip that sucker and get boot.img and system.img to a linux machine. I used an ARM based box (a Dockstar/GoFlex works great for this) to ensure everything would be ok ARM-wise, but using a x86 machine for this should be fine too. Be careful of endianness if you use a machine whose processor is not a little endian system.
To mount system.img, make a directory somewhere (we’ll call it gk802_rooted), and run the following command (or run it as root omitting sudo):
sudo mount -t auto system.img gk802_rooted
If you don’t get any errors, you can ‘cd’ into gk802_rooted and have access to the android system. All we need to do in here is put busybox and su into ‘bin’ under ‘gk802_rooted’ and Superuse.apk into the ‘app’ directory under gk802_rooted (actually Superuser.apk may have already been there). You can get this stuff from the ‘Root_with_Restore_by_Bin4ry_v18‘ script 7zip file here if you don’t know where to get those from on your own. Inside that 7zip file (bleh 7zip, what a pain), you’ll find su, busybox, and Superuser.apk in the ‘stuff’ folder. Get su and busybox into gk802_rooted/bin and put Superuser.apk into gk802_rooted/app. Change the permissions on busybox and su with the following (2000 is the guid of the ‘shell’ group in case you were wondering):
sudo chmod 6755 su
sudo chown root:root su
sudo chmod 755 busybox
sudo chown root:2000 busybox
do a ls -l and you should see the following for su and busybox:
-rwsr-sr-x 1 root root 64412 Dec 18 04:22 su
-rwxr-xr-x 1 root 2000 1634104 Sep 21 01:28 busybox
Change the permissions on Superuser.apk as follows:
sudo chmod 644 Superuser.apk
sudo chown root:root Superuser.apk
Do a ls -l and you should see the following:
-rw-r–r– 1 root root 996704 Dec 25 01:29 Superuser.apk
I also modified build.prop under gk802_rooted, but this most likely gets updated by default.prop on bootup, which is contained in the boot.img file. Anyway, open up build.prop in some text editor like vim and add/change the stuff after ‘#end build properties’ so that it shows the following:
Now unmount system.img:
sudo umount gk802_rooted/
Next, make a new directory, say ‘android_4.0.4’. Download seandroid-4.0.4 from here (click the Branches tab) and extract the contents into the folder you just created (nothing special about this version of Android, it just so happens the little bit of stuff you need is in these system core source downloads). Make sure your system is capable of compiling stuff, and follow the directions here or see below for the same:
cd to android_4.0.4/cm_system_core and run the following:
gcc -c *.c -I../include
ar rcs libmincrypt.a *.o
gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
gcc mkbootfs.c -o mkbootfs -I../include
Make a new directory somewhere (we’ll call it bootimg_tools) and copy the compiled mkbootimg and mkbootfs binaries to that folder. Now, download the script zip from Step 2 here and extract that stuff into your bootimg_tools folder. Make sure the mkbootfs and mkbootimg binaries are at the same directory level as packboot and extractboot. Delete the .exe files. Also copy the boot.img file from the GK802 firmware update 7zip file from the beginning from this guide to this folder. Follow the directions on the page you downloaded the bootimg script from (you need perl installed). Since we’re in linux already, don’t do the cygwin stuff. You can simply run extractboot from the bootimg_folder (change permissions if needed)
If all went well, you’ll see a screen something like what is shown in the image in Step 4 in the link above. Now go into the bootimg_tools/out/ramdisk folder. Edit the ‘default.prop’ file with root permissions and change the contents to match the following:
Save, and go back to the bootimg_tools folder. Now run
You’ll see very little output, but you shouldn’t see any errors. packboot automatically figures out where the base address was from boot.img, and sets the base address accordingly for the new boot image. If all went well, the new boot image file was created and is now called boot_new.img (under the bootimg_tools folder). Delete/rename the boot.img file from the GK802 firmware update and copy/paste the boot_new.img with the other files for the firmware update. Rename boot_new.img to boot.img.
The last thing we need to do is generate new md5 sums for system.img and boot.img (dunno if Android recovery uses those or not). Do the following to create new md5sums:
md5sum system.img > system.md5
md5sum boot.img > boot.md5
Inside the md5 files, make the formatting similar to the other original md5 files (all caps, no other text besides the sum). Again, I’m not sure if this matters, but it’s what I did and everything seemed to be happy.
Once you’re done, copy all the firmware update files to a formatted microSD card (I used a FAT32 formatted card), and enter recovery mode on the GK802 as outlined in the beginning of this guide. The “flashing” takes a few minutes and then goes back to the android recovery menu. Choose reboot (you can leave in your microSD card). Get access to the Play store. Download busybox, run it, and allow it to update the system. Update the SuperSU app, and allow it to update the su binary. You should now be completely rooted. Download an app requiring root or checkroot to make sure that you are indeed rooted.
This may also enable being able to use ADB, but I have yet to test that. I think you’ll need to plug the stick into your PC and find a way to prevent the stick from going into MTP mode (see how I accidentally got around that at the top of this guide).
Enjoy your rooted GK802!