-
Notifications
You must be signed in to change notification settings - Fork 21
Nexus 7 (android)
#summary Nexus 7
= Nexus 7 =
http://www.google.com/nexus/a-images/tablet-n7-features-ushome-family.png
[http://en.wikipedia.org/wiki/Nexus_7 Nexus 7] is a 7'' tablet running Android. It is fairly compact, easy to unlock and root, powerful (quad-core Tegra 3 ) and cheap ($200 for 8Gb version).
== Required Hardware ==
Nexus 7 uses micro usb OTG cable for connecting USB devices. Such cables can be cheaply obtained from Amazon, for example this one: http://www.amazon.co.uk/gp/product/B005OOJPKS
== Preparing Device ==
Unlock and root device using this [http://forum.xda-developers.com/showthread.php?t=1766475 software].
Flash device using boot.img_nexus7_1_0 or boot.img_nexus7_1_0 _4_1_2 (depending on your Android version) from downloads. You can flash temporarily using
{{{ fastboot boot boot.img_nexus7_1_0 }}} or permanently using {{{ fastboot flash boot boot.img_nexus7_1_0 }}} see http://wiki.cyanogenmod.com/wiki/Fastboot
At that point, when Emotiv EPOC USB dongle is connected, it will be mounted in /dev/hidraw1 and can be read by SBS2 applications.
== Compiling Kernel ==
This procedure is optional and produces boot.img that is used in Preparing Device section.
This is written for Ubuntu, should work on any Linux flavor (within reason).
Download and unpack cross compiler, I'm using arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 (see [http://www.omappedia.com/wiki/Android:_Configuring_the_Host_PC#ARM_Cross_Compiler wiki here]).
{{{ git clone https://android.googlesource.com/kernel/tegra.git nexus7-kernel }}} Switch to newest grouper (Nexus 7 paltform) branch, currently {{{ git checkout android-tegra3-grouper-3.1-jb-fr2 }}} (you can find the newest branch for grouper at https://android.googlesource.com/kernel/tegra)
{{{ make ARCH=arm CROSS_COMPILE=/path/to/arm-2010q1/bin/arm-none-linux-gnueabi- menuconfig }}}
{{{ General setup -> Local version change to name of your kernel so you can easily tell stock and your kernel apart. }}} and {{{ Device Drivers -> HID Devices -> /dev/hidraw raw HID device support set to Y (star) }}} Save & exit.
{{{ make ARCH=arm CROSS_COMPILE=/home/arek/galaxy_note_kernel_build/arm-2010q1/bin/arm-none-linux-gnueabi- }}}
If the compilation succeeds you will end up with arch/arm/boot/zImage which is the kernel binary. Now it must be packed into a proper boot.img
Download the proper image from https://developers.google.com/android/nexus/images. Unpack and enter the directory.
Download boot.img-tools from http://forum.xda-developers.com/showthread.php?t=1241005
{{{ mkdir -p unpack tools/unpackbootimg -i boot.img -o unpack }}}
{{{ mkdir -p unpack/boot.img-ramdisk cd unpack/boot.img-ramdisk gzip -dc ../boot.img-ramdisk.gz | cpio -i cd ../../ }}}
{{{ tools/mkbootfs unpack/boot.img-ramdisk | gzip > unpack/boot.img-ramdisk.gz }}}
{{{
tools/mkbootimg --kernel /path/to/compiled/zImage --ramdisk unpack/boot.img-ramdisk.gz -o boot.img-repack --base cat unpack/boot.img-base
}}}
You end up with boot.img-repack which is the flashable boot.img as in Preparing Device section.
== Upgrading Android Version ==
If you have custom kernel flashed, you will not be able to do OTA update. Instead, you can go back to stock Android for your current version, upgrade and then install custom kernel for the new version. To come back to stock:
- Download proper stock image from [https://developers.google.com/android/nexus/images]
- Extract .tgz file and then extract the .zip file inside
- Flash boot.img from the extracted .zip file. Either temporary with ./fastboot boot boot.img or permanently (required to perform update) using ./fastboot flash boot boot.img. The device needs to be in the fastboot mode.