Tag Archives: android

After-root Android tip #2: AdFree

This is part of a series of posts about useful apps to use on a rooted Android device.

AdFree
AdFree removes most ads in the browser and other apps. It does this by nullifying requests to known host names in the system hosts file.

Tested version: 0.7.7

What problem does it solve?
Do you hate advertisement as I do? Get rid of it!
Technically speaking your hosts file will be modified to make apps requests to ad servers go to null pages.

The Good

  • speed up browsing (less data to load)
  • save some bandwidth
  • save you from unwanted flashing banners
  • prevent accidental touch on ads

The Bad and the Ugly

  • many free apps programmers live with ads, so make your choice
  • some apps will recognize the hack and they will refuse to start
  • you have to start the app to check for updates
  • you’ll find some black area in apps where there would have been ads
  • sometimes in apps, you’ll get spinning gif waiting for banners

After-root Android tip #1: ClockSync

This is part of a series of posts about useful apps to use on a rooted Android device.

ClockSync
ClockSync synchronizes device system clock with atomic time from Internet via NTP (Network Time Protocol).

Tested version: 1.1.3

What problem does it solve?
My phone tends to loose some seconds a day and this application silently solves the issue.

The Good

  • it can be configured to update the clock only when using a wifi connection
  • it can do it silently
  • it keeps stats
  • timezone auto detection
  • rootless mode (not very handy)
  • it’s a typical set and forget app

The Bad and the Ugly
Nothing to tell about it.

After-root Android tip #0

Hi, if you have root access to your phone, you’re probably asking what to do with this power.
I’m going to start a series of posts where I’ll write about the apps I use, but only for rooted devices.

If you are an owner of a Xperia X10 Mini Pro and if you need a not-too-simple-but-complete-guite to root your phone you can find it here.

HowTo: install xRecovery in Xperia X10 Mini Pro

Update: I got ClockworkMod Recovery working on my phone, that’s a better choice.

xRecovery is a custom Android recovery system for all variants of the Sony Ericsson Xperia X10, including Xperia X10 Mini Pro. If you want to take it to the next level by being able to take and restore full backups, flash custom ROMs, manage partitions and wipe not just data but cache and Dalvik cache as well, you have to install it.

It’s similar to ClockworkMod Recovery which cannot be installed on SE devices.

Here the steps I used to install xRecovery on a Xperia X10 Mini Pro.

Prerequisites

  1. check your handset details via “Settings” – “About phone”
    • Your “Baseband version” must be M76XX-TSNCJOLYM-53404015
    • Your “Build number” must be 2.1.1.A.0.6
  2. check if you have root access (you can use Root check app)
  3. you need Android Terminal Emulator app (install from the Market or apk download here)
If you need to root the phone you can follow my guide.
If you need busybox you can install it with Busybox installer
Software requirements

Install
Unrar the archive and from your pc type:

$ adb push AAIS/ /sdcard/

Use install.sh via Android Terminal Emulator (root user):

$ su
# cd /sdcard/AAIS
# sh install.sh

Choose 0 or simply push “Return”
At the end (3-10 seconds) phone will reboot.

All done.
A good idea: make a backup
Enter recovery:

  1. power off phone
  2. when booting your phone and when the “Sony Ericsson” letters appear, press and release continuously the “back” button
  3. once you are in the CW recovery, use the volume keys to navigate upwards / downwards, the “home” or “camera” button key to select, the “back” key to go back
  4. choose “Backup and restore” – “Backup”
  5. reboot

HowTo: use Link2sd with Cyanogenmod 7.0.3

Here’s how I got Link2sd working on Nexus One with Cyanogenmod 7.0.3.

Preamble

I tried everything I found on the web (see here for example), but I had no success.

First of all here are the device details I got from “CurveFish DeviceInfo” app:

[System]
Model: Nexus One
Manufacturer: HTC
Device: passion
Product: passion
Brand: google
Bootloader ver.: 0.35.0017
CPI ABI: armeabi-v7a
CPI ABI 2: armeabi
Hardware: mahimahi
Radio: unknown
Kernel Version: 2.6.37.4-cyanogenmod-01332-g7f230e8
shade@toxygene )
#1 PREEMPT Tue Apr 12 12:54:14 EDT 2011
Build Number: GRI40
Release: 2.3.3
SDK: 10

Prerequisites

  • a PC (mine is powered by Ubuntu 11.04 Natty Narwhal)
  • an usb cable for your mobile
  • adb configured and running on the PC (find more info here)
  • a Nexus One set up with Cyanogenmod 7.0.3 ROM
  • Link2sd app installed from Android Market

The problem

If you try to run Link2sd, you’ll receive these outputs:

 

 

 

 

 

 

The exact message is

mount: mounting /dev/block/vold/179:2 on /data/sdext2/ failed: Device or resource busy

Step by step guide

From your pc, connect the phone via adb (I prefer use bash for easy navigation through terminal).
You have to go to the init scripts path and umount /sd-ext/:
$ adb shell
# bash
localhost / # cd /system/etc/init.d
localhost init.d # ls -lAtr
-rwxr-x--- 1 root shell 925 Aug 1 2008 20userinit
-rwxr-x--- 1 root shell 272 Aug 1 2008 06mountdl
-rwxr-x--- 1 root shell 1452 Aug 1 2008 05mountsd
-rwxr-x--- 1 root shell 201 Aug 1 2008 04modules
-rwxr-x--- 1 root shell 229 Aug 1 2008 03firstboot
-rwxr-x--- 1 root shell 27 Aug 1 2008 01sysctl
-rwxr-x--- 1 root shell 365 Aug 1 2008 00banner
localhost init.d # umount /sd-ext/
localhost init.d #

Now run Link2sd from your phone and repeat the procedure:

 

 

 

 

 

 

Exit app, but don’t restart.
It’s time to restore /sd-ext/ on the phone (via adb) and check if we have the new init script from the app:
localhost init.d # mount /dev/block/mmcblk0p2 /sd-ext/
localhost init.d # cd /system/etc/init.d
localhost init.d # ls -lAtr
-rwxr-x--- 1 root shell 925 Aug 1 2008 20userinit
-rwxr-x--- 1 root shell 272 Aug 1 2008 06mountdl
-rwxr-x--- 1 root shell 1452 Aug 1 2008 05mountsd
-rwxr-x--- 1 root shell 201 Aug 1 2008 04modules
-rwxr-x--- 1 root shell 229 Aug 1 2008 03firstboot
-rwxr-x--- 1 root shell 27 Aug 1 2008 01sysctl
-rwxr-x--- 1 root shell 365 Aug 1 2008 00banner
-rwxr-x--- 1 root root 154 Aug 11 16:26 11link2sd
localhost init.d # cat 11link2sd
#!/system/bin/sh
#added by link2sd
sleep 2
mount -t ext2 -o rw /dev/block/vold/179:2 /data/sdext2
mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sdext2
localhost init.d #

The script has to be modified as here:
#!/system/bin/sh
#added by link2sd
sleep 2
#mount -t ext2 -o rw /dev/block/vold/179:2 /data/sdext2
#mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sdext2
#
mount -t ext2 -o bind /sd-ext/ /data/sdext2/

Pay attention to the highlighted parts!

For this purpose you can use vi, but first grant read/write permissions to the filesystem:
localhost init.d # mount -o rw,remount /system/
localhost init.d # vi 11link2sd

Verify your work and restore filesystem permissions:
localhost init.d # cat 11link2sd
#!/system/bin/sh
#added by link2sd
sleep 2
#mount -t ext2 -o rw /dev/block/vold/179:2 /data/sdext2
#mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sdext2
#
mount -t ext2 -o bind /sd-ext/ /data/sdext2/
localhost init.d # mount -o ro,remount /system/
localhost init.d #

Run the script:
localhost init.d # ./11link2sd
localhost init.d #

Verify Link2sd

Choose an application with a widget (in standard Android system, apps with widget cannot be moved to SD).

For this test I used Evernote.
In Link2sd I clicked the “Create link” button.

 

 

 

 

 

 

Now try to use the widget

 

 

 

 

 

 

Done