Saturday, April 24, 2010

Convert JPG files to PDF in linux

Install imagemagick package
apt-get install  imagemagick
Go to the command prompt and Go to that folder containing jpg
$cd path-to-your-jpg-files
Use Covert  comand to convert jpg to PDF
$convert path-to-your-jpg-files.jpg path-to-yournewfile.pdf
We can use *.jpg to include all jpg files into folder files

Tuesday, April 6, 2010

Debug Database with adb in Andoid

When I have created the sqlite database directly from my application. I am not getting where the database actually stored with application

Then I found that the system stores databases in the /data/data/package_name/databases folder by default.

To access that database We can use adb
Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device
  1. adb -s emulator-5554 shell
    adb -s <serialNumber> <command>
  2. sqlite3 /data/data/package_name/databases/database_name
Now you can access sqlite promt 
sqlite> .databases

which display 
seq  name             file                                                     
---  ---------------  ----------------------------------------------------------
1    main          data/data/package_name/databases/databasename