January 23, 2012

How to get a bricked kindle fire back to live

I've rooted my kindle fire and then started playing with /system/build.prop file to get any app I wanted from android market. However I ended up with a bricked KF - it was stuck at the kindle fire logo.

I thought "luckily I've backed up the build.prop file, so I can just copy it back". But the process I went through wasn't that easy.. It took me a while to figure out how to revert build.prop file.

Here are the steps I followed t get KF back to live again:

1. First of all download latest android-sdk tools. This comes with ./adb and ./fastboot which will be your main tools to access KF.

# see all options
./adb --help  

# Common commands
./adb kill-server #kills
./adb devices #searches for devices
./adb shell  #goes to FK linux shell
./adb push from_file_dir_in_pc to_file_dir_in_kf

2. Next, make sure KF is recognized.  Go to KF shell and type su. If moves to # shell, great, you have root permissions. Move to step 4. If there is an error eg. segmentation fault, then move to step3.

3. Download fastboot, copy it to KF and execute. Then reboot and go to KF shell again. This time you should have root permissions. Try su. Refer to this post for further details.
$ ./adb push fbmode /data/local/tmp
$ ./adb shell chmod 755 /data/local/tmp/fbmode
$ ./adb shell /data/local/tmp/fbmode
$ ./adb reboot
$ ./adb shell
  $ su
4. At this point, you should have root permissions and can just go ahead and revert changes in build.prop. Copy stock build.prop in your work directory if does not exist. Download here.
$ ./adb push build.prop /system/

5. Next, follow instructions here. In my case, ./fastboot command never recognized the device and I ended up in cwm-based recovery screen. Since KF has only one button, I was only able to pick the first choice in each screen. At the beginning, this option is "install update" and in the next screen it is a "NO". So "install update" option looks for an update.zip file under /sdcard/ and then just installs if the file is there - even though you have to pick "NO" in the confirmation screen.
So to do this, first download the update.zip file here. Then just click on the power button on KF twice to install. Once installation is completed, reboot the KF.
# Copy update.zip to KF 
$ ./adb push update.zip /sdcard/
# Push on the reboot button twice to install.
# Once installed, reboot the KF.
$ ./adb reboot

And, it's done, the KF is back!

November 28, 2011

How to get android app store apps on kindle fire

It was not happy to realize that kindle fire does not allow access to android market place. Probably this is a well thought out marketing strategy of Amazon, but if you're tired of keep being redirected to "can not find app" message and don't want to root your kindle, keep reading :)

The default kindle fire browser (Silk) redirects all android market links to amazon app store. After googling a little bit, idea of getting another browser and using that to access android market seemed like to be a smart way. I tried accessing via dolphin - but failure, still redirect to amazon app store (btw - give a try to dolphin if you haven't done yet, it is a pretty cool browser.). So I'm left with the last option, sideloading apps through third parties such as freewarelovers.com and getjar.com. Just search for the apps online, download the apk file, and click on it to install. Before installing, make sure "allow applications from unknown sources" option is enabled through Settings->Device.

November 08, 2011

Scalable Manipulation of Archival Web Graphs

I was working on archival web graphs till last June. Actually, most of the Hadoop related posts on this blog are things I learned while working on this project.

We looked at the problem of processing large-scale archival web graphs and generating a simple representation for the raw input graph data. This representation should allow the end user to be able to analyze & query the graph efficiently. Also, the representation should be flexible enough - so it can be loaded into a database or can be processed using distributed computing frameworks, ie. Hadoop.
To achieve these goals, we developed a workflow for archival graph processing within Hadoop. This project is still going on and its current status has appeared at LSDS-IR '11 workshop at CIKM conference last month. I like to share the paper [acm] [pdf]  for those who are interested in further details. The abstract is following:
In this paper, we study efficient ways to construct, represent and analyze large-scale archival web graphs. We first discuss details of the distributed graph construction algorithm implemented in MapReduce and the design of a space-efficient layered graph representation. While designing this representation, we consider both offline and online algorithms for the graph analysis. The offline algorithms, such as PageRank, can use MapReduce and similar large-scale, distributed frameworks for computation. On the other side, online algorithms can be implemented by tapping into a scalable repository (similar to DEC’s Connectivity Server or Scalable Hyperlink Store by Najork), in order to perform the computations. Moreover, we also consider updating the graph representation with the most recent information available and propose an efficient way to perform updates using MapReduce. We survey various storage options and outline essential API calls for the archival web graph specific real-time access repository. Finally, we conclude with a discussion of ideas for interesting archival web graph analysis that can lead us to discover novel patterns for designing state-of-art compression techniques.
Also, the source code for "graph construction algorithm" is open sourced at GitHub.

October 09, 2011

Setting up EC2 Command Line Tools (API Tools)

Download the latest version of EC2 API from AWS website and unzip. All APIs are under the bin. Setting up the $EC_HOME It's better to add this directory to your $PATH. Here is how:
export EC2_HOME=/Users/yasemin/My-Apps/ec2-api-tools
export PATH=$PATH:$EC2_HOME/bin
Next is setting up the credentials for the aws account. Create & download a private key and the corresponding certificate from the account's "security credentials" page and link these files to EC2 CLI. Here is how:
export EC2_PRIVATE_KEY=/Users/yasemin/My-Apps/ec2-api-tools/credentilas/pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem 
export EC2_CERT=/Users/yasemin/My-Apps/ec2-api-tools/credentilas/cert-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem  
This is all - you should be good to go!
Notes:
- If the export commands are appended to ~/.bashrc file, then they will be executed automatically with every new bash session - which is nice to have.
- For detailed setup instruction, please see the official docs. - Make sure $JAVA_HOME is also set. Use '$ which java' to figure out the current path.

September 08, 2011

S3 Access

Two ways to access your S3 buckets: jets3t and s3cmd. Jet3set provides UI and s3cmd is only UI.
Here is how to get a file using s3cmd: First configure the account:
s3cmd --configure
Then, you can use s3cmd to access your buckets. eg: downloading a folder from s3:
s3cmd get --recursive s3://bucket_name/object_name to_local_file