Category Archives: tutorial

Update Nexus device with the official image

*You must have previously installed the Android SDK on your computer and unlock the bootloader.

  1. Download the original image. here
  2. Uncompress it.
  3. Modify flash-all.sh file if you’re using linux / mac or flash-all.bat if you’re using Windows.
    Change the line that looks like this :
    fastboot -w update image-hammerhead-lmy48b.zip
    Remove the -w, w means wipe (erase) that’s what we want to avoid :
    fastboot update image-hammerhead-lmy48b.zip
  4. Open the file with name use by the previous fastboot command, in this example we will open : image-hammerhead-lmy48b.zip
  5. Erase userdata.img from this compress file.
  6. Close the edited zip file.
  7. Flash the phone with the flash-all.sh script if you’re using linux/mac or with flash-all.bat if your’re using Windows.

After rebooting, you can now root the phone if necessary.

Linux command line 101 #2 Bash Metacharacters

Linux command line 101 #1 : Here

Metacharacters are characters with a special use other than literal.

We have two types of metacharacters :

Substitution :

  • * – (star) replace any character or group of characters.
  • ? – (question mark) replace a character.

Protection :

  • \ – prevents the interpretation of a metacharacter.
  • ` – backticks force the interpretation of the character string included between two of these characters as a command.
  • ‘ – all metacharacters included between two

    apostrophes are interpreted as text.

Some examples of substitution :

I will use a directory containing the following files in my examples :

Sandrine-3:test sandrine$ ls -l
total 0
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 file_AA
-rw-r--r--  1 sandrine  staff  0  6 jul 21:13 file_Ab
-rw-r--r--  1 sandrine  staff  0  6 jul 21:13 file_Ac
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 file_bb
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 file_cc
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 files_1
-rw-r--r--  1 sandrine  staff  0  6 jul 21:15 files_2
-rw-r--r--  1 sandrine  staff  0  6 jul 21:15 files_3
Sandrine-3:test sandrine$ 

In this example, the “ls” command displays all files name with names starting with “files” with all possible endings :

Sandrine-3:test sandrine$ ls -l files*
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 files_1
-rw-r--r--  1 sandrine  staff  0  6 jul 21:15 files_2
-rw-r--r--  1 sandrine  staff  0  6 jul 21:15 files_3
Sandrine-3:test sandrine$ 

You can also do the opposite and find all files name that end with “_1” like this :

Sandrine-3:test sandrine$ ls -l *_1
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 files_1
Sandrine-3:test sandrine$ 

And with “?” you can search for all occurrences of files name beginning with “file_”, with an unknown character and ending with “b” like this :

Sandrine-3:test sandrine$ ls -l file_?b
-rw-r--r--  1 sandrine  staff  0  6 jul 21:13 file_Ab
-rw-r--r--  1 sandrine  staff  0  6 jul 20:49 file_bb
Sandrine-3:test sandrine$ 

Some examples of protective character uses :

If you wish to use the “echo” command to display a “*” you will get this :

Sandrine-3:test sandrine$ echo *
file_AA file_Ab file_Ac file_bb file_cc files_1 files_2 files_3
Sandrine-3:test sandrine$ 

To avoid interpretation of “*” as metacharacter precede it with the “\” :

Sandrine-3:test sandrine$ echo \*
*
Sandrine-3:test sandrine$ 

To force the interpretation of a character string placed it between backticks :

Sandrine-3:test sandrine$ echo ls
ls
Sandrine-3:test sandrine$ echo `ls`
file_AA file_Ab file_Ac file_bb file_cc files_1 files_2 files_3
Sandrine-3:test sandrine$

To avoid interpretation of a sting of metacharacters place it between quotes :

Sandrine-3:test sandrine$ echo ******
file_AA file_Ab file_Ac file_bb file_cc files_1 files_2 files_3
Sandrine-3:test sandrine$ echo '******'
******
Sandrine-3:test sandrine$ 

Tutorial 01 – Preparing Virtualbox for Debian 8.1 installation

Introduction

In this first tutorial, I‘ll show you how I configure a virtual machine with VirtualBox to install Debain 8.1.

To install VirtualBox => https://www.virtualbox.org/

To download the ISO file of your choice Debain here => https://www.debian.org/distrib/

I advise the image “netinst” for 64-bit PC.

Creation of the new Virtual Machine

After starting the application you should have the following window in front of you :

tuto01_en_img01

Click theNew” button, give it a name and select the type “Linux” and the version Debian” corresponding to your ISO file. Afterwards click “Next”.

tuto01_en_img02

Adjust the memory size to 1024MB, click “Next”.

tuto01_en_img03

Choose to create a virtual hard disk for our new installation. Click “Create”.

tuto01_en_img04

Choose the default format of VDI virtualbox. You can choose a different format that would be compatible with other virtualization solutions.  Other formats are useless for now, we will not transfer our virtual machine. Click “Next”.

tuto01_en_img05