Local software repository for apt-get

Leave a comment

We use to apt-get the packages to install in Debian derivative of Linux. The packages are mostly downloaded from internet based repositories and locally cached at /var/cache/apt/archives directory. In case we reinstall the Linux, we need to download the packages once again to install through apt-get or synaptic GUI tool. To avoid this situation we can backup the *.deb files available in /var/cache/apt/archives path in some other partition than root. After re-installation, we can create a local repository of these packages to avoid downloading again. Another advantage is that this repository can be shared with other computers too.

  • Identify the backup partition and directory for downloaded *.deb files (e.g.: /home/<username>/packages).
  • $ mkdir -p /home/<username>/packages/archives/dists/main/myrepo/binary-i386
  • $ cp /var/cache/apt/archives/*.deb /home/<username>/packages/archives/dists/main/myrepo/
  • $ cd /home/<username>/packages/archives
  • $ apt-ftparchive packages . > ./dists/main/myrepo/binary-i386/Packages
  • $ cd ./dists/main/myrepo/binary-i386/
  • $ gzip Packages
  • Re-install the Linux distribution.
  • Add the following entry in /etc/apt/sources.list file.
  • deb file:/home/<username>/packages/archives main myrepo
  • $ sudo apt-get update

That is it. Now you have all your last downloaded files as local repository. Use apt-get or synaptic to go ahead! Enjoy the beauty of apt-get from Debian.


Android NDK C++ Exceptions and RTTI Link Errors

Leave a comment

Android NDK C++ Exceptions and RTTI Link Errors

When using Android NDK to build performance-critical portions of Android apps in native C++ code, we may get C++ link errors such as:
undefined reference to `__cxa_end_cleanup’;
undefined reference to `__gxx_personality_v0′;
undefined reference to `vtable for __cxxabiv1::__si_class_type_info’;
undefined reference to `vtable for __cxxabiv1::__class_type_info’.
The first two errors are caused by no exceptions support in Android NDK toolchain, and the last two errors are caused by no RTTI support in the toolchain, according to the latest Android NDK release note STANDALONE-TOOLCHAIN.html under the docs directory. The documentation also mentioned any C++ STL (either STLport or the GNU libstdc++) with it are also not supported.

To get around the above linking errors, add compile flags
-fno-exceptions to disable exceptions
-fno-rtti to turn off RTTI

Google Voice Enhancement for ICS Phones

Leave a comment

Google has added a nice little update to its Google Voice app. The app will now feature your Google Voice messages next to your regular phone voicemail in the native phone app rather than having to logon to the Google Voice app.

This provides a deeper integration of Google Voice in your Android smartphone, similar to those found in certain Sprint Android handsets. This update provides a one interface for handling all your Google Voice messages as well as your regular phone number voicemail.

Google said:

Your voicemails will appear alongside your outgoing, incoming, and missed calls in your phone’s call log and you can just simply touch them to play them. You can slow down the playback of the message which is great for when someone is telling you their callback number, or you even speed playback up, so you can quickly listen to longer messages.

You can get this enhancement by Going to the Google Play Store and updating your Google Voice app. Please keep in mind that this update is only available for users of Android 4.0 Ice Cream Sandwich.

Building the JNI Source Code for Android in Eclipse

Leave a comment

When we develop a Android project includes the JNI technique, we should use the Android NDK tool for building these source code. But, the NDK is a command line tool that not convenient to use when we develop in the IDE.

In this article, I shows an example to explain the steps to build JNI source code in Eclipse.

The key is you have to create a new Builder used to execute the NDK tool for building JNI source code. So, at first, you have to create a new Builder in the Eclipse.

In my example, I try to add a new NDK Builder for OpenCV project in the Eclipse.

Step 1: Enter to the Project’s property window, and then click the “New” button to create a new Builder.


Using NDK to Call C code from Android Apps

Leave a comment

Android NDK (Native Development Kit) allows working with native C code using a shared C library. It includes the entire toolchain needed to build for your target platform (ARM). Native C code accessible via JNI still runs inside the Dalvik VM, and as such is subject to the same life-cycle rules that any Android application lives by. The advantage of writing parts of your app code in native language is presumably speed in certain cases.

BeagleBone: $89 dev board includes Cortex-A8 CPU, Ethernet, JTAG

Leave a comment

BeagleBoard.org announced a new open-platform, hobbyist-focused development board — priced at just $89 and equipped with a Linux distro that boots in ten seconds. The BeagleBone offers an ARM Cortex-A8 processor running at 720MHz, 256MB of RAM, two 46-pin expansion connectors, a USB host port and multipurpose device port, on-chip Ethernet, and a microSD slot.

Apple is Giving Samsung Semiconductor A Splitting Headache

Leave a comment

Apple started a legal process several months ago to keep Samsung Tablets out of worldwide markets because the product looked similar to the iPAD. Samsung is the only company in the world that can challenge Apple on a vertical cost basis and they have the added advantage of having corporate subsidies. Apple’s goal in the coming year is to make Samsung retreat from the consumer market and back into semiconductors or risk losing an excessive amount of money. See more in SemiWiki.

Older Entries