วันอังคาร, พฤษภาคม 20, 2557

Fixing libusbx: error [darwin_claim_interface] Using Heimdall 1.4 OSX


When I'm using Heimdall 1.4 for OSX, I got this error 

libusbx: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
ERROR: Claiming interface failed!
---

full log trace:
$ heimdall flash --kernel recovery.img

Heimdall v1.4.0


Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna

http://www.glassechidna.com.au/


This software is provided free of charge. Copying and redistribution is

encouraged.


If you appreciate this software and you would like to support future

development please consider donating:

http://www.glassechidna.com.au/donate/


Initialising connection...

Detecting device...

Claiming interface...libusbx: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access

ERROR: Claiming interface failed!

---

Here's how to solve the problem

1. Open the Terminal app

2. Execute command
$ kextstat | grep -v apple 

Index Refs Address            Size       Wired      Name (Version)

   82    0 0xffffff7f80ed6000 0x3000     0x3000     com.devguru.driver.SamsungACMControl (1.4.16) <36 3="" 4="">
   84    0 0xffffff7f80ec0000 0xc000     0xc000     com.devguru.driver.SamsungACMData (1.4.16) <83 36="" 3="" 4="" 5="">
   87    1 0xffffff7f80888000 0x43000    0x43000    org.virtualbox.kext.VBoxDrv (4.2.18) <7 1="" 3="" 4="" 5="">
   88    0 0xffffff7f808d1000 0x8000     0x8000     org.virtualbox.kext.VBoxUSB (4.2.18) <87 1="" 36="" 39="" 3="" 4="" 5="" 7="">
  142    0 0xffffff7f80c8d000 0x11000    0x11000    org.fuse4x.kext.fuse4x (0.9.2) <7 1="" 3="" 4="" 5="">
  143    0 0xffffff7f822d8000 0xa000     0xa000     com.initex.proxifier.macosx.kext (2.11.2) <5 1="" 4="">
  144    0 0xffffff7f822e2000 0x1b000    0x1b000    org.pqrs.driver.KeyRemap4MacBook (9.3.0) <31 1="" 3="" 4="" 5="">
  145    0 0xffffff7f80edc000 0x4000     0x4000     com.devguru.driver.SamsungComposite (1.4.16) <36 3="" 4="">

3. Notice the line that contain "Samsung"

4. Execute these command, to unload those Samsung's line
*execute the command line by line or the command will not working properly

$ sudo kextunload -b com.devguru.driver.SamsungACMControl
Password:

$ sudo kextunload -b com.devguru.driver.SamsungACMData

$ sudo kextunload -b com.devguru.driver.SamsungComposite

5. Try to execute heimdall to flash the recovery again
This time there's no libusbx: error :) 
---
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...
---
full log trace:
$ heimdall flash --pit Q1_20110914_16GB.pit --RECOVERY recovery.img --no-reboot
Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

reference: via lum7671 blog via blog.scott.wallace.sh

วันพฤหัสบดี, ธันวาคม 26, 2556

OSX: Solution: Virtualbox 4.x bridged network not working on OSX 10.9 Mavericks

Thai: แก้ปัญหา Virtualbox 4.2, 4.3 ใช้ bridged network บน OSX 10.9 ไม่ได้ 

    I'm using Virtualbox 4.2, 4.3 with OSX 10.9 the bridged network not working. The error message look like this 
'HostInterfaceNetworking-en0' (VERR_SUPDRV_COMPONENT_NOT_FOUND). 

    I'm googled, someone said if we uninstall and re-install it the problem will gone, but it's not working for me, after several reboot the problem still arise. 

    So, this is another solution. By using this script before start the Virtualbox would help/solve the problem :) 

#!/bin/bash
 
unload() {
  sudo ifconfig bridge0 down
  sudo ifconfig bridge0 unplumb
  kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxUSB
  kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
  kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 \
  && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
  kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && \
  sudo kextunload -b org.virtualbox.kext.VBoxDrv
}
 
load() {
  sudo kextload /Library/Extensions/VBoxDrv.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxNetFlt.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxNetAdp.kext -r /Library/Extensions/
  sudo kextload /Library/Extensions/VBoxUSB.kext -r /Library/Extensions/
  sudo ifconfig bridge0 plumb
  sudo ifconfig bridge0 inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255 up
}
 
case "$1" in
  unload|remove)
    unload
    ;;
  load)
    load
    ;;
  *|reload)
    unload
    load
    ;;
esac


the script was from this blog. I believed that the original script was from here, forums.virtualbox.org but this one is the improved & working one :)

วันอังคาร, ธันวาคม 24, 2556

OSX: Using Subversion 1.7 with OSX 10.9 Mavericks (use Wandisco distribution not port nor brew)

Thai: วิธีติดตั้ง subversion 1.7 ใน OSX 10.9 (Mavericks) ไม่ใช้ port หรือ brew

updated on 3 Jan 2014 : fix wrong path.

There's no Subversion package build for OSX 10.9 from the Wandisco website, and also else where.

I accidentally found this information, able to use 10.8's pkg to successfully install on 10.9.

1. Download vanilla Subversion from their website here.

2. Choose this link "Download Subversion 1.7.13 for OSX 10.8.x Client Only"

3. We will get a file, named look like this: Subversion-Client-1.7.13_10.8.x.pkg

4. Copy to home folder. Using Terminal
$cd 
$cp Subversion-Client-1.7.13_10.8.x.pkg ~/
(assume that we place the downloaded file in the home folder)

5. create a script on home folder
$cd ~/
use vi command or any familiar text editor
$vi svninstall.sh 

insert this code
#!/bin/sh -x

PKG_NAME=Subversion-Client-1.7.13_10.8.x.pkg

pkgutil --expand ${PKG_NAME} /tmp/${PKG_NAME}
/tmp/${PKG_NAME}/subversion.pkg/Scripts/preinstall
pushd /tmp/${PKG_NAME}/subversion.pkg
tar xf Payload
sudo mv opt/subversion /opt
popd
/tmp/${PKG_NAME}/subversion.pkg/Scripts/postinstall
rm -rf /tmp/${PKG_NAME}

use :wq save and quit the vi

6. make it executable
$chmod +x svninstall.sh

7. execute the script to install the subversion
$./svninstall.sh

The output look like this 
$./svninstall.sh

+ PKG_NAME=Subversion-Client-1.7.13_10.8.x.pkg
+ pkgutil --expand Subversion-Client-1.7.13_10.8.x.pkg /tmp/Subversion-Client-1.7.13_10.8.x.pkg
+ /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg/Scripts/preinstall
+ pushd /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg
/tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg ~/Temp
+ tar xf Payload
+ sudo mv opt/subversion /opt
+ popd
~/Temp
+ /tmp/Subversion-Client-1.7.13_10.8.x.pkg/subversion.pkg/Scripts/postinstall

+ rm -rf /tmp/Subversion-Client-1.7.13_10.8.x.pkg

$

8. check if we it's successfully installed
$ svn --version
svn, version 1.7.10 (r1485443)
   compiled Aug 13 2013, 15:31:22
...

from: wandisco's svnforum