adb no such file

Common adb errors and solutions

No such file or directory

/path/to/android-sdk-linux/platform-tools/adb: No such file or directory

Solution:

$ sudo apt-get install ia32-libs

Links:
https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/852101
http://askubuntu.com/questions/73491/no-such-file-or-directory-for-existing-executable
http://kenno.wordpress.com/2011/10/27/ubuntu-11-10-32-bit-applications-do-not-run-64-bit/

insufficient permissions for device

$ adb shell df
error: insufficient permissions for device

$ sudo adb kill-server
[sudo] password for aaron:

$ adb shell df
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Filesystem Size Used Free Blksize
/dev 338.7M 64.0K 338.7M 4096
/mnt/asec 338.7M 0.0K 338.7M 4096
/mnt/obb 338.7M 0.0K 338.7M 4096
/system 1007.9M 550.9M 457.0M 4096
/data 4.0G 172.8M 3.8G 4096
/cache 246.1M 4.1M 241.9M 4096
/mnt/sdcard 21.2G 912.8M 20.3G 32768
/mnt/secure/asec: Permission denied

“adb start-server ” is automatically run.

$ adb kill-server ;  sudo adb start-server ; adb devices
When to use “sudo” for adb? never needed?

1
  adb kill-server ;  sudo adb start-server ; adb shell df

2
 adb kill-server ;  adb start-server ; adb shell df

3
 adb kill-server ;  sudo adb shell df

Result 1 equals 3

2 will give
 error: insufficient permissions for device

case insensitive tab-completion or wild expansion

To let wildcard expansion case insensitive, enable this in bashrc

shopt -s nocaseglob

To let tab-completion case insensitive, you can bind the completion-ignore-case option for bash:

bind `echo set completion-ignore-case on`

This will be effective immediately.

Or add this in inputrc for readline;

$ echo 'set completion-ignore-case On' >> ~/.inputrc

Include the system inputrc file:

include /etc/inputrc

To show all binds:

bind -p

To let bash recognizes spelling mistakes, add this in ~/.bashrc:

shopt -s cdspell

For tcsh / zsh users:

set complete enhance

Reference:
http://www.caliban.org/bash/index.shtml#completion
https://wiki.ubuntu.com/Spec/EnhancedBash

ubuntu precise sources.list beijing

 

 

# deb http://packages.linuxdeepin.com/ubuntu precise main restricted universe multiverse # disabled on upgrade to precise

# deb http://packages.linuxdeepin.com/ubuntu oneiric-security main restricted universe multiverse # disabled on upgrade to precise

# deb http://packages.linuxdeepin.com/ubuntu oneiric-updates main restricted universe multiverse # disabled on upgrade to precise

# deb http://packages.linuxdeepin.com/ubuntu oneiric-proposed main restricted universe multiverse

# deb http://packages.linuxdeepin.com/ubuntu oneiric-backports main restricted universe multiverse

 

# deb-src http://packages.linuxdeepin.com/ubuntu precise main restricted universe multiverse # disabled on upgrade to precise

# deb-src http://packages.linuxdeepin.com/ubuntu oneiric-security main restricted universe multiverse # disabled on upgrade to precise

# deb-src http://packages.linuxdeepin.com/ubuntu oneiric-updates main restricted universe multiverse # disabled on upgrade to precise

# deb-src http://packages.linuxdeepin.com/ubuntu oneiric-proposed main restricted universe multiverse

# deb-src http://packages.linuxdeepin.com/ubuntu oneiric-backports main restricted universe multiverse

 

# deb http://packages.linuxdeepin.com/deepin precise main non-free # disabled on upgrade to precise

# deb-src http://packages.linuxdeepin.com/deepin precise main non-free # disabled on upgrade to precise

 

# deb http://packages.linuxdeepin.com/deepin oneiric-updates main non-free # disabled on upgrade to precise

# deb-src http://packages.linuxdeepin.com/deepin oneiric-updates main non-free # disabled on upgrade to precise

 

deb-src http://security.ubuntu.com/ubuntu precise-security main restricted

deb-src http://security.ubuntu.com/ubuntu precise-security universe

deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

 

deb http://extras.ubuntu.com/ubuntu precise main

deb-src http://extras.ubuntu.com/ubuntu precise main

 

deb http://archive.canonical.com/ precise-proposed partner

deb http://archive.canonical.com/ precise partner

deb http://archive.canonical.com/ precise-security partner

deb http://archive.canonical.com/ precise-updates partner

deb http://archive.canonical.com/ubuntu precise partner

 

# deb http://ftp.sjtu.edu.cn/ubuntu precise main universe multiverse restricted

# deb http://ftp.sjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe

# deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe

# deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

 

deb http://mirror.bjtu.edu.cn/ubuntu/ precise main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main restricted universe multiverse

 

deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse

 

# deb http://packages.medibuntu.org/ oneiric non-free free

# deb http://packages.medibuntu.org/ oneiric-staging non-free free

 

# deb http://download.virtualbox.org/virtualbox/debian precise non-free contrib # disabled on upgrade to precise

 

 

Flash CyanogenMod v10

Find your device image here:
Here is for Sony Ericsson Xperia Play, etc.
If you see boot-device_code.img for your prototype, also download it to use for the boot.img.
Push the image zip file to your phone storage.
Your device should be unlockable and unlocked, check here for Sony Ericsson Arc, etc
At least you should get fastboot and android driver to your PC.
If you work on a Linux system, it’s OK to just get a Linux version fastboot.
Steps:
Power on your device, while press the unlock button.
Some unlock button according to different devices.
·         Menu button (for Xperia™ arc, Xperia™ arc S, Xperia™ neo, Xperia™ neo V, Xperia™ pro).
·         Search button (for Xperia™ PLAY).
·         Volume up button (for Xperia™ mini, Xperia™ mini pro, Xperia™ ray, Xperia™ active, Live with Walkman™, Xperia™ S).
Check if fastboot can work on the device, version 0.3 means you can continue.
fastboot -i 0x0fce getvar version
version: 0.3
finished. total time: 0.000s
Then flash the boot image.
fastboot flash boot boot.img
sending ‘boot’ (5290 KB)…
(bootloader) USB download speed was 9707kB/s
OKAY [  0.562s]
writing ‘boot’…
(bootloader) Download buffer format: boot IMG
(bootloader) Flash of partition ‘boot’ requested
(bootloader) S1 partID 0x0000000C, block 0x00000280-0x00000BeC
(bootloader) Erase operation complete, 0 bad blocks encountered
(bootloader) Flashing…
(bootloader) Flash operation complete
OKAY [  1.109s]
finished. total time: 1.672s
Reboot your device, press volume done button many times during booting. (* indeed, once is OK just after the front keypad is lighten.)

Using the menu with volume up/down and back to navigate, and Home (on some devices it is Power) button to select, wipe your user data, wipe your cache, and then install update zip file. Wait for the update is finished, then back to upper menu and select to restart the device.
Now you have Jelly Bean, which is now Android 4.1.1.