Android


Android Studio – No space left on device 1

Recently we tried to install some packages from the Android SDK through Android Studio 3.0.1 and we got the error that the PC ran out of space while downloading the necessary packages and could not perform the operation.

Full Error Log:

To install:
- Google APIs Intel x86 Atom System Image (system-images;android-27;google_apis;x86)
Preparing "Install Google APIs Intel x86 Atom System Image (revision: 2)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r02.zip
An error occurred while preparing SDK package Google APIs Intel x86 Atom System Image: Cannot download 'https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r02.zip': No space left on device
, response: 200 OK.
"Install Google APIs Intel x86 Atom System Image (revision: 2)" failed.
Failed packages:
- Google APIs Intel x86 Atom System Image (system-images;android-27;google_apis;x86)

Although the disk had a lot of free space, we got this error because the /tmp partition on our GNU/Linux Fedora 27 workstation was too small (~4GB).

$ df -h;
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 107M 3.8G 3% /dev/shm
tmpfs 3.9G 1.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/fedora-root 50G 35G 12G 75% /
tmpfs 3.9G 2.1M 3.9G 1% /tmp
/dev/sdb1 477M 179M 269M 41% /boot
/dev/mapper/fedora-home 178G 37G 132G 22% /home
tmpfs 794M 16K 794M 1% /run/user/42
tmpfs 794M 9.2M 785M 2% /run/user/1000

/tmp was not explicitly set so it was automatically configured to have half of the size of the RAM.
We didn’t not want to change the download path for the Java environment (and hence Android Studio and Android SDK tools) as after leaving the tmpfs folder it could mean that we would have to manually maintain the new path and clean it up. So we ended up in temporarily increasing the size of /tmp partition which did the trick and the virtual device was installed successfully.

Solution – temporarily increase the size of the /tmp partition:

The command we used to increase the size of the /tmp partition on Fedora 27 was the following:

sudo mount -o remount,size=8G,noatime /tmp;

After executing we, it we immediately saw that the results were applied without the need for a restart or any other operation and we could proceed to use the PC as normal.

$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 89M 3.8G 3% /dev/shm
tmpfs 3.9G 1.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/fedora-root 50G 35G 12G 75% /
tmpfs 8.0G 2.0M 8.0G 1% /tmp
/dev/sdb1 477M 179M 269M 41% /boot
/dev/mapper/fedora-home 178G 37G 132G 22% /home
tmpfs 794M 16K 794M 1% /run/user/42
tmpfs 794M 6.9M 787M 1% /run/user/1000

The information for tmpfs we got it from: https://wiki.archlinux.org/index.php/Tmpfs

Full Correct Execution Log:

To install:
- Google APIs Intel x86 Atom System Image (system-images;android-27;google_apis;x86)
Preparing "Install Google APIs Intel x86 Atom System Image (revision: 2)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86-27_r02.zip
"Install Google APIs Intel x86 Atom System Image (revision: 2)" ready.
Installing Google APIs Intel x86 Atom System Image in /home/xeirwn/Android/Sdk/system-images/android-27/google_apis/x86
"Install Google APIs Intel x86 Atom System Image (revision: 2)" complete.
"Install Google APIs Intel x86 Atom System Image (revision: 2)" finished.


Samsung Galaxy: Move device contacts to Google (GMail) account

The following guide is a step by step tutorial on how to make move your phone device contacts to your Google (GMail) account.

Step 0: Start the ‘Contacts’ Application

Start the 'Contacts' Application

Start the ‘Contacts’ Application

Step 1: Press the Menu button on your phone and press on ‘Move Device Contacts to’

Press the Menu button on your phone and press on 'Move Device Contacts to'

Press the Menu button on your phone and press on ‘Move Device Contacts to’

Step 2: Select ‘Google’

Select 'Google'

Select ‘Google’

Step 3: Press ‘OK’

Press 'OK'

Press ‘OK’

Step 4: Select the account where you want to move your device contacts to

Select the account where you want to move your device contacts to

Select the account where you want to move your device contacts to


Samsung Galaxy: Make sure contacts from all accounts are visible

The following guide is a step by step tutorial on how to make all contact visible on your phone device.

Step 0: Start the ‘Contacts’ Application

Start the 'Contacts' Application

Start the ‘Contacts’ Application

Step 1: Press the Menu button on your phone and press on ‘Settings’

Press the Menu button on your phone and press on 'Settings'

Press the Menu button on your phone and press on ‘Settings’

Step 2: Select ‘Contacts to display’

Select 'Contacts to display'

Select ‘Contacts to display’

Step 3: Make sure ‘All Contacts’ is selected

Make sure 'All Contacts' is selected

Make sure ‘All Contacts’ is selected


Samsung Galaxy: Synchronize Google (GMail) contacts with phone device

The following guide is a step by step tutorial on how to synchronize your Google (GMail) account contacts with your phone device.

Step 0: Start the ‘Contacts’ Application

Start the 'Contacts' Application

Start the ‘Contacts’ Application

Step 1: Press the Menu button on your phone and press on ‘Settings’

Press the Menu button on your phone and press on 'Settings'

Press the Menu button on your phone and press on ‘Settings’

Step 2: Select ‘Contacts’

02-select-contacts

Select ‘Contacts’

Step 3: Select ‘Accounts’

Select 'Accounts'

Select ‘Accounts’

Step 4: Select ‘Google’

Select 'Google'

Select ‘Google’

Step 5: Select the account you want to sync with

Select the account you want to sync with

Select the account you want to sync with

Step 6: Make sure that the ‘Sync Contacts’ option is enabled

Make sure that the 'Sync Contacts' option is enabled

Make sure that the ‘Sync Contacts’ option is enabled

Step 7: Press the Menu button on your phone and press ‘Sync Now’

Press the Menu button on your phone and press 'Sync Now'

Press the Menu button on your phone and press ‘Sync Now’


[Video] Android OpenCV – Face Detection and Recognition Demo

Android OpenCV – Face Detection and Recognition Demo using Android NDK/JNI to load OpenCV library.

Google Play: https://play.google.com/store/apps/details?id=net.bytefreaks.opencvfacerecognition

Get it on Google Play

Our application is based on the ‘Face Detection’ sample of OpenCV. The sample that is available for download from http://sourceforge.net/projects/opencvlibrary/files/opencv-android/, you will notice that there are many versions there, we used version 2.4.11. Refer to this (http://docs.opencv.org/2.4/doc/tutorials/introduction/android_binary_package/O4A_SDK.html) introduction for more information.