Sunday, November 24, 2013

Strange Problem Solved

Yesterday I was checking out somethings about my laptops processor, and noticed that Intel had downloads for Linux.  Specifically, microcode for a whole gaggle of i7 processors. 

I had gotten my laptop, a Y500, about 10 months ago. The first thing I did was rip Windows 8 out by the roots. Then calmly loaded Fedora 19. I was happy for about a day. Then this strange ever present issue would rear it ugly head at the worst times. The keyboard would go completely insane, and start typing by itself. It would also cause windows to open or close and Libreoffice to do all kinds of weird things. Lenovo's tech support was near useless, none of them had dealt with any form of Linux before. I called the tech support about this issue 3 times. The first 2 times I got blown off. The last a guy tried to help, but it was trying to repair the virtualized Windows 7 I have running on kvm/qemu.  Another story.  I pointed out that once he fixed the Windows side, the Linux side would still have the problem.  As you can guess, replacing the drivers in Windows and having a one year warrenty didn't help the situation at all. 

The fix it turns out was loading the latest version of the microcode in the processor. This task is easier said than done. 

The latest microcode can be downloaded here. After the tar/gzip file is downloaded you have to extract it with tar -zxvf <filename>. What you have after the extraction is a file called microcode.dat. microcode.dat need to be converted ucode. The powers that be were kind enough to provide the right tool for the job. intel-microcode2ucode is the program with no help, and no man page. The command is intel-microcode2ucode microcode.dat that creates a folder named intel-ucode with the working microcode inside of it. Now you can move the microcode to /lib/firmware/intel-ucode/ where the kernel will load the processor.

 I did a lot of research and found that microcode_ctl no longer loads the processor and the processor needs to be loaded with the new microcode every time the computer is started. If the microcode is corrupted then the processor will revert back to it's original microcode.

Friday, November 22, 2013

Instructions: How to use “adb sideload” in Linux


This guild was written because I could not find a linux version a 'How to use "adb sideload"'. I wanted to load Android 4.4 without having to root my Nexus 7 2012.  I found a Windows version here.

One word of warning: If you don't understand this guild don't do it. I'm also not responsible for you bricking your Nexus or any other device.

1.  First, you need to install the latest Android SDK. [Android SDK]
  • This isn’t a guide on how to get the SDK installed or basic adb. There is a rule that needs to be added to udev for the Nexus 7. 
  • ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", SYMLINK+="android_sideload", MODE="0666"
2.  Plug in your device to your Linux machine.  Make sure USB Debugging is enabled.

3.  To test that you have adb up and running, and that your device is recognized, open a command prompt.

4. Type the following”
"adb devices" in root. I found I was getting a "error: insufficient permissions for device" error trying to do the sideload as a normal user. Starting adb-server in root prevents this.
5.  You should get a serial number followed by “device.”
015d182f9a0aac28    device
6. If you see something along those lines, your adb is working properly, for now.

7.  Download the update.zip from Google to your PC that you would like to install on your Nexus.

8.  The file can be in any folder as long as adb is in the PATH

9.  Type the following:
  • adb reboot bootloader
10.  Your device will now reboot to the bootloader.

11.  Use Volume Down on your device to until you see “Recovery.”

12.  Select it with the Power button.

13.  Your device will boot to an Android logo with a exclamation mark.

14.  To jump past this, press Volume Up and Power at the same time.
  • This is not as easy as it sounds. It took me three times to do it right.
15.  You will now be in stock recovery.

16.  With Volume Down, highlight “apply update from ADB.” Press Power to choose it.

17.  Back to your PC, type the following command:
adb sideload <filename of update.zip>
  • I rename update files to something simple when I get them. I renamed the Android 4.4 update to KRT16S.zip , so my command was “adb sideload KRT16S.zip ”
18.  If your adb is working properly, you should see the file transfer to your device in adb.

19.  Once that finishes, your device will begin to update.

20.  Once it has finished, simply reboot and enjoy the update.