Tag Archives: android

Updating Nexus 7 to Lollipop using sideload

This post is a note to remind myself how to manually flash Android firmware on a Nexus device.

Step 1, download the firmware to your computer. I downloaded Android 5 from:

Step 2, connect Nexus 7 to the computer. Mine runs Ubuntu 14.10, and I already downloaded Android SDK.
Make sure that “Developer Options” is enabled. If it’s not, go to Settings -> About tablet. Then click on “Build Number” 7 times.

~/apps/android-sdk/platform-tools $ sudo ./adb devices
List of devices attached
0XXd41d425XXXe14 device

Note: If you don’t run ‘adb devices’ with sudo, you’ll see the following message:

error: insufficient permissions for device
error: insufficient permissions for device

If that happens, kill adb service and start adb with sudo:

./adb kill-server
sudo ./adb start-server

Step 3, While the Nexus 7 is still connected, run:

./adb reboot bootloader

Step 4,

To be continue…

Ref: This entry was posted in Tips, Uncategorized and tagged , , on by .

Android Studio Cannot Resolve Symbol R

I just got this problem today when I opened an Android project with Android Studio. Basically, anywhere there’s a reference to R, for example R.layout.footer_view, Android Studio will complain that it cannot resolve symbol R.

The fix is surprisingly easy. All I need to do was running Gradle clean and Gradle build.

Ref: http://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-android-studio

Eclipse ADT Fatal Error on Linux

The Eclipse IDE that comes bundle with Android Development Tools (ADT) crashes when run on my laptop running Fedora.


The error message which logged to console is:

# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x0000003cc2270061, pid=9653, tid=140330452297472
# JRE version: Java(TM) SE Runtime Environment (7.0_55-b13) (build 1.7.0_55-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libsoup-2.4.so.1+0x70061]  soup_session_feature_detach+0x11
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

Fortunately, there’s a way to fix this problem by opening ‘eclipse.ini’ file, in my case:

vim /opt/adt-bundle-linux-x86_64-20131030/eclipse

and added this line to the end of that file:


Credit: Android – Solución Fatal Error del IDE Eclipse (ADT)

How to replace default fonts in MIUI rom

MIUI (1.7.22) uses Arial as the default font.  If you hate it as I do, here is how to change it.

I assume you have ‘adb’ working. We are going to replace only 2 fonts – Arial.ttf and Arial-Bold.ttf.

First, let’s back up the old fonts just in case thing didn’t go well as we want to. (I learned this the hard way, and keen to avoid it at all cost)

$ adb pull /system/fonts/Arial.ttf
$ adb pull /system/fonts/Arial-Bold.ttf

You should have a copy of the above 2 fonts on your local computer. Next is to connect to your phone and replace those fonts with DroidSans.ttf and DroidSans-Bold.ttf respectively.

$ adb shell
# cd /system/fonts
# cp DroidSans.ttf Arial.ttf
# cp DroidSans-Bold.ttf Arial-Bold.ttf

Restart your phone. Voila, your text doesn’t look as ugly as before; well at least that’s what I think.