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/

Tuesday 13 September 2011

How to set up openxdata mobile client emulator to work with the Server-side development environment

Hi , this was inspired by the thread at openxdata developer discussion group.
I got through some steps to get the mobile client's code of the
emulator work with a server-side code in development mode.
Here are the chronicles.

1. Set up the mobile code(used 1.2.2 from the branch) as indicated on
the link https://trac.openxdata.org/wiki/MobileSetup
2. define download and upload urls as http://localhost:8888/mpsubmit
3. If using server-side code v1.2, you will want to throw the protocal
jars into the admin project . Put those jars into the folder admin/war/
protocal-jars

4. Run your mobile code through ant's tasks as outlined in the link in
step #1.
5. Run the server-side with mvn gwt:run, ofcourse from the admin
project on commandline.

Given the above steps, I pulled a list of studies on the emulator.
Don't hesitate to get back incase of any problems.


Cheers,
Simon.

Saturday 10 September 2011

A feel of GXT

http://www.extjs.com/examples/explorer.html#overview

 The link above gave me a practical exposure to the rich features of GXT. I have used them to develop an internet application.


It has beautiful code snippets.

:)
Simon.