Intex Cloud FX: Turn Debugging On

…and the tinkering shall begin!

Well it doesn’t work out-of-the-box and this post will help other developers get their hands dirty quickly.

One can debug either by using the “adb tools” by Google or “app-manager” by Mozilla.

#1: Enable Debugging on the phone

https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Developer_settings

On your phone go to: Settings -> Device Information -> More Information -> Developer

Set: ‘Remote debugging’ to ‘ADB and Devtools’

#2: Find out the USB Vendor ID

http://developer.android.com/tools/device.html

$ lsusb
Bus 005 Device 003: ID 1782:5d04 Spreadtrum Communications Inc.

From above we found out that the VendorID=0x1782 (running `lsusb -v` gives a verbose output and prints values in Hexadecimal)

#3: Tell adb to look at this new device of ours

A) UDEV

Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

$ sudo cat >> /etc/udev/rules.d/51-android.rules
# Paste:
SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666", GROUP="plugdev"
# CTRL+D to save the file

B) Restart UDEV

$ sudo /etc/init.d/udev restart

C) adb_usb.ini

$ cat >> ~/.android/adb_usb.ini
# Paste
# 1 USB VENDOR ID PER LINE.
0x1782

(You need to have adb installed before we move ahead: https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Installing_ADB)

#4: Tinkering shall begin

$ sudo adb devices

Will show you your device.

if you see something like

List of devices attached
????????????    no permissions

then

$ sudo adb kill-server
# now try adb devices again
$ adb shell
# enter the device

All well! 🙂

Intex Cloud FX:
OS Version: Intex_Cloud_FX_V07
Hardware revision: sp8810
Platform version: 28.1
Update Channel: release-spreadtrum
Buy: for INR1999/- on Snapdeal.com

Using the App Manager:
https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager

Sources:
http://developer.android.com/tools/extras/oem-usb.html
http://developer.android.com/tools/device.html
http://stackoverflow.com/questions/17763728/getting-manufacturer-vendor-id-for-adb
http://stackoverflow.com/questions/6484279/detecting-device-for-debugging-adb-does-not-work

Increase the size of vmdk or vdi (Virtualbox)

A major part of my PC experience is linked to Ubuntu. I’d always have Ubuntu installed on the machines I work on. No marks for guess that I am still using Linux and posting from inside it. Well in a way I am also a Linux evangelist; Sometimes even the office machines would secretly taste the flavor of Linux, thanks to the Boot from USB. Almost all my friends have Ubuntu installed (yeah coz of me) and I’d SSH to their machines and play songs etc remotely and things get all funny and haunting initially. I just love it.

Anyway there was this Virtual Disk File (VMDK of VMWare fame) that I created under VMWare and now it can even be used from VirtualBox (good stuff). So I booted inside it and it was running low on disk. I couldn’t install MS Office on it. So I figured it was time to RESIZE the disk.

#1 (clone the disk to a vdi format)

$ /usr/lib/virtualbox/VBoxManage clonehd “windows-xp-64bit.vmdk” “windowsXP.vdi” –format vdi

— windows-xp-64bit.vmdk = source vmdk

— windowsXP.vdi = target vdi

#2 (use the vdi disk and resize it to the desired capacity)

$ /usr/lib/virtualbox/VBoxManage modifyhd “windowsXP.vdi” –resize 10000

— here we are re-sizing it to 10Gb.

Now that we have a new vdi. Simply change the settings in the VirtualBox and use the new VDI.

Use the new VDI

Use the new VDI

Now, after we booted in the brand new OS, we have two options.

A) Use GParted to resize the partition (expand it).

download GParted ISO; And boot with that ISO instead of the VDI and resize the C Drive. Next reboot in the VDI and we are done!

B) Use Windows Disk Management Wizard and create a new partition with the recently inherited storage.

Create a new partition

Create a new partition

That’s all.

Take a bow!

 

 

Update:

How to merge snapshots together:

VBoxManage clonehd fullpath/{uuid-of-last-snapshot}.vdi thedisk-full.vdi

clonehd only the last snapshot.

The uuid can be found from VBoxManage list hdds | grep VmName | tail

In the GUI (on Windows), select the VM, select Snapshots from the top right, right click on the snapshot you want, select Clone…, and select Full Clone in the dialog.

unixODBC: Connect to .mdb in Linux?

Background:

Ah!! Like all the things which you leave and try to forget about .. come back and haunt you . .. there was this old project I was doing .. .(Tags: PDF creation, Servlets JSP, XML parsing, XLS reading) in the year 2007. Of late due to some unforeseen circumstances I had to exhume it & find what the ghost wanted.

Well the UI looked professional and I started exploring it but for some reason Eclipse on my Windows didn’t quite work properly… SVCHOST was eating up all the CPU. So I had to give it a thought to migrate to Ubuntu. But there was this big blocker… ODBC on Unix….     [and the story continues ….]

Stuff I told synaptic to download:

mdbtools
unixODBC

Configuration done using this Link.

/etc/odbcinst.ini

[MDBToolsODBC]
Description = MDB Tools ODBC
Driver = /usr/lib/libmdbodbc.so.0
Setup =
FileUsage =
CPTimeout =
CPReuse =

/etc/odbc.ini

[logindb]
Description = Microsoft Access Try DB
Driver = MDBToolsODBC
Database = /home/nikunj/programming/logindb.mdb
Servername = localhost
Username =
Password =
port = 5432

Done?: (not yet)

nikunj@ubuntu-desktop:~$ isql logindb
+-------------------------------+
| Connected!
| sql-statement
| help [tablename]
| quit
+-------------------------------+
SQL> select name from profile
+-------------------------------+
| name
+-------------------------------+
| Mukesh Kumar Lahoti
| Nikunj Lahoti
| OneTwoThreeFour
| OneTwoThreeee
| M K Lahoti Ji
+-------------------------------+
SQLRowCount returns 5
5 rows fetched

Now [TODO]

1) Connect Java to this ODBC

2) Use MS Excel Connector for Unix+Java.
The Java Excel API is an open source Java API which allows Java developers toread Excel spreadsheets and to generate Excel spreadsheets dynamically.