Saturday 26 October 2013

How to work with a Samsung in Android Development on linux

http://stackoverflow.com/questions/9210152/set-up-device-for-development-no-permissions

Am pasting Greblon's response here just in case the link above breaks.

Nothing worked for me until I finally found the answer here: http://ptspts.blogspot.co.il/2011/10/how-to-fix-adb-no-permissions-error-on.html
I'm copying the text here in case it disappears in the future.
Create a file named /tmp/android.rules with the following contents (hex vendor numbers were taken from the vendor list page):
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
Run the following commands:
sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
sudo chmod 644   /etc/udev/rules.d/51-android.rules
sudo chown root. /etc/udev/rules.d/51-android.rules
sudo service udev restart
sudo killall adb
Disconnect the USB cable between the phone and the computer.
Reconnect the phone.
Run adb devices to confirm that now it has permission to access the phone.
Please note that it's possible to use , USER="$LOGINNAME" instead of , MODE="0666" in the .rules file, substituting $LOGINNAME for your login name, i.e. what id -nu prints.
In some cases it can be necessary to give the udev rules file a name that sorts close to the end, such as z51-android.rules.

Hope you've found this helpful.
Simon.

Tuesday 6 August 2013

CRUD operation for a file/photo upload in grails

http://grailsinaction.wordpress.com/2013/05/28/simplest-imagefile-grails-crud-using-a-data-base-as-a-storage/

Friday 29 March 2013

Huawei E3131 Modem on Ubuntu 10.04


Hello, am using an E3131 Huawei usb modem. I installed the mod-switch as advised. I ran
$ lsusb | grep 12d1
I get the output below
Bus 002 Device 005: ID 12d1:14fe Huawei Technologies Co., Ltd.
here is the list files in
$ ls /etc/udev/rules.d/
15-huawei-155x.rules
31-huawei-e3131.rules
Content of 15-huawei-155x.rules
———————————————————————————————————-
SUBSYSTEM==”usb”,
ATTRS{idProduct}==”14fe”,
ATTRS{idVendor}==”12d1″,
RUN+=”/lib/udev/modem-modeswitch –vendor 0x$attr{idVendor} –product 0x$attr{idProduct} –type option-zerocd”
———————————————————————————————————
Content of 31-huawei-e3131.rules
—————————————————————————
ACTION!=”add”, GOTO=”huawei_zerocd_end”
SUBSYSTEM==”usb”, ATTR{bDeviceClass}!=”ff” ,ENV{DEVTYPE}==”usb_device”, GOTO=”huawei_zerocd_disable”
SUBSYSTEM==”scsi”, ENV{DEVTYPE}==”scsi_device”, GOTO=”huawei_zerocd_disable”
GOTO=”huawei_zerocd_end”
LABEL=”huawei_zerocd_disable”
ATTRS{idVendor}==”12d1″, ATTRS{idProduct}==”14fe″, RUN+=”modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd”
LABEL=”huawei_zerocd_end”
—————————————————————————————————
I started the udev service.
Unfortunately, the e3131 modem does not perform. I made configurations for the APN, but no change whatsoever.
Would you possibly correct me?
Thanking you, Simon.

Sunday 20 January 2013

Running a midlet on command line interface

Thought of testing a mobile J2me app on your device before deployment? It can be done on your machine.

Make sure the wireless tool kit is installed.
Navigate to the bin directory via command line.
$ runmidlet your_midlet_name.jad

For references,
Visit http://www.electricmonk.nl/log/2008/02/14/run-mobile-midlets-on-your-pc/