сряда, 29 август 2012 г.

How to root your Xoom MZ601

Today, I just decided I need to root my Xoom. So here's how it went.
1. I updated to Android ICS 4.0.4 over the air. It was a pleasant surprise having this update, since it's the first update I get ever.
2. I search the net for a guide for rooting from 4.0.4 The files can be found on this one: http://www.xoomforums.com/forum/team-eos/16342-rom-ics-team-eos-ics-2-0-0-updated-2012-4-27-a.html and the tutorial in the second post of http://www.xoomforums.com/forum/motorola-xoom-development/15179-how-rookie-rooting-flashing-unrooting-under-one-roof.html .
I had some problem downloading the files since I couldn't find the file for my MZ601 so instead I downloaded one of the nightly releases i.e. EOS-umts_everest-20120826-109.zip
which along with gapps-ics-20120429-signed.zip were copied into my sdcard.
The file recovery-Tiamat-R4c-100611-1150-cwm.img went into two folders since I didn't know which one was the correct one: /opt/android-sdk-update-manager/platform-tools/ and /opt/android-sdk-update-manager/tools/
And then I just followed the instruction (note that I unlocked the device just after the Factory Reset using the way described in http://www.mokonamodoki.com/motorola-xoom-final-rescue : download the Motorola tools and run $./fastboot oem unlock ) 
3. Rooting was much easier that I expected. Generally, I followed the instructions to the word and it worked.
$./adb reboot bootloader
$./fastboot flash recovery recovery-Tiamat-R4c-100611-1150-cwm.img

Once you have verification on your device that this has been flashed:
Vol Up + Power.
Vol Down to enter the boot menue

After entering in "Android Recovery":
Hold Vol. Up to enter into recovery.

Then do:
 wipe cache,
 wipe factory data,
Advance->wipe dalvik cache

Then:
Iinstall zip from sdcard- > Choose zip from sdcard
Select the  EOS-umtsgapps-ics-20120429-signed.zipGapps and flash it and then reboot.
And that's it!
Everything was done in about 5 minutes. The system rebooted in about 3 - kind of slow, but I suspect it's because this is the first time it starts. Now, you have a glorious, customized, rooted Android 4.0.4.
YAAAAAY!
To unroot, you can use the third post in the same site.  There is an easier way to change curstom ROMs after the first root and it can be found on this site. It's done by using the goomanager.
Btw, I'm not sure if this ROM has a complete root or not, but one site suggests that you have to do (according to this site):
  • In the command window on your PC type; adb remount
  • Type; adb push su /system/bin
  • Type; adb shell
  • Type; ln -s /system/bin/su /system/xbin/su (this line starts with lower case “L”, like llama)
  • Type; chmod 4755 /system/bin/su
  • Type; exit
  • Type; adb push Superuser.apk /system/app
I have to try out my new Android first to see if those steps are needed, but it doesn't hurt having them posted here as well. 

неделя, 26 август 2012 г.

How to save data from a (soft) bricked Xoom

Well, even without trying to unlock or root my Xoom, I managed to brick it. I don't know how exactly it happened, I suspect it was the outcome of bad copying trough gMTP. Anyway, it got into this bootloader loop and it restarted over and over again. VERY ANNOYING!!! I was terrified, because I had some very important data on the tablet, since I use it for work. I asked and asked on the forums, but people obviously don't like answering such stupid questions. So, after tons of searching, here's what I did.

1. Install android-sdk-update-manager . If you happen to be on x64 system, install it twice - it should pull some Java emulation packages as well. Eventually, you have to run $env-update and $source /profile to sort out all the dependencies or whatever other problems.
2. Go in /opt/android-sdk-update-manager/tools and run $sudo ./android (you need to be root in order to install the stuff)
3. Install whatever you see fit, I installed Android 3.2 and the Tools
4. Afterwards, go into /opt/android-sdk-update-manager/platform-tools
5. There you'll find the ./adb and ./fastboot commands
6. Now, connect your Xoom trough the USB cable and just let it reboot and reboot and reboot - it doesn't matter
7. Run ./adb devices to see if your Xoom is listed. It should be, mine was listed.
8. To see your directory structure use ./adb -d shell and then you can use ls, cd and cd .. to look around (the -d option says to send the command to the only usb plugged in, so you shouldn't plug more than one device, otherwise you should use -s and the serial number)
9. After you find the directory that's important for you, just download it to your PC. I downloaded stuff from /sdcard doing:
$ ./adb -d pull /sdcard/folder /home/denijane/sdcard/folder
This way I pulled every directory in /sdcard one by one, because the Xoom kept on restarting and I didn't want to miss something, but maybe you can do it as a whole too, I don't know. Just make sure you have checked what you need has been copied to you PC.
10. After you download your stuff from the Xoom, you may Factory Reset it. To do so use: Power + Vol Up to reboot and while the screen displays Dual Core, press couple of times Vol Down to enter the boot menu and with Vol Down scroll until Android Recovery, then use Vol Up to select. After the weird screen shows up, you should press Power + Vol Up (I think) in order to get to the Recovery options. Then, choose Factory Reset and press Power to confirm. After it says Data Wiped, use Vol Up/Down to choose Reboot. That's it.

After you have reseted your Xoom, it's a good time to consider Unlocking it and eventually Rooting it. Unlocking would delete again all your data, so it makes sense to do it on a clean installation. Unlocking is easy, using the tools Motorola has published - you can find a description at http://www.mokonamodoki.com/motorola-xoom-final-rescue.
Yes, unlocking do void you of Warranty, but in some cases you can restore Stock OS and Relock, so I suspect you'll have your Warranty after all. Or maybe not, I don't know. But I was thinking, what's the point in having a cool device as Xoom, if you don't Unlock and Root it. It's just not fair. And it seems that complete Backups can be done only on a rooted device, so I think it's worthy the trouble.
Anyway, I'm so happy I could download my data from the Xoom. And the moral is good - always have important data stored at at least two places!
Have a good day!
Edit:
Here are some good wikis on ADB:
http://android-dls.com/wiki/index.php?title=ADB
http://developer.android.com/tools/help/adb.html
http://wiki.cyanogenmod.com/wiki/Howto:_Install_the_Android_SDK

петък, 17 август 2012 г.

How to install manually latex packages

Ok, TeX and LaTeX have wonderful wikis but still, I'd like to write down the steps I took today, so that I don't forget them.
So, to install those packages you need to:
1. Install TeX from wherever you like.
2. Download the packages from http://ctan.org/search/
3. Following this wiki, you need to unpack the zips to a folder.
4. Then you run latex filename.ins to unpack the styles (and you run it on every file in the folder)
5. If you want the div files with instructions, you can run latex filename.dtx, but I didn't bother with that.
6. Key part: where to put them. Thanks to this site, I found that you can check for the paths of your latex installation using:
kpsepath tex 
kpsepath bst
you can find the paths recognised by your tex installation, Then you need to put the folder with your packages into one of those paths. What I did was:
sudo cp -r ~/Latex/packages/ /usr/share/texmf/tex/latex/
sudo texhash
And that was it. I got all the packages working in no times. Yeah!

A nice way to check whether the installation is good is to run:
fmtutil-sys --all
After an update I had some problems, but it turned out that I had to remove two random files from my packages folder. 
 
Update, on my current installation, the tex files are in " /usr/share/texmf-dist/" so I had to do:
$sudo cp -r ~/Downloads/revtex.tds/* /usr/share/texmf-dist/
$ sudo mktexlsr
Note that Latex keeps the paths in  
$TEXMFCNF=/usr/share/texlive/texmf-dist/web2c:/usr/share/texmf/web2c:$HOME/texmf/web2c  
export TEXMFCNF
or $TEXMFHOME or elsewhere for Gentoo.