How to setup ADB on Linux

Posted: 16 Φεβρουαρίου 2022 in Uncategorized

  • Download the Android SDK platform tool on your pc. Download link in the below section. (Link to download section)
  • Extract the file you can accessible easily For example (Desktop)
  • Open terminal on your LINUX
  • In the terminal, go to the folder where you just extracted ADB. enter the following command cd /path/to/extracted/folder/
  • For example cd /Users/Doug/Desktop/platform-tools/
  • Connect your smartphone to your computer with a USB cable. On your smartphone change the usb mode to “file transfer (MTP) mode. 
  • Next, Go to the command prompt and enter the following command to start adb daemon.
  • adb devices
  • On your smartphone popup the  “Allow USB debugging” option. Allow to connect your device to MAC OS
  •  After re-enter command: adb devices
  • If everything went right, the serial number of your Android device will appear at the MAC OS terminal.

Successfully! Now You are able to run any ADB command on your android device!

If you use any type of Linux software based on Debian, Fedora or SUSE on your computer, you should know that there is an even easier way to install the ADB drivers on your computer.

For Debian-based systems, just open a Terminal instance and run the command “sudo apt-get install adb” – without the quotes – and enter the root password. For its part, to carry out the process in Fedora or SUSE the command will be “sudo yum install android-tools”.

As you can see, setting up ADB drivers is not a complicated process if you follow the steps mentioned. In some cases, you can also use tools that perform this process automatically, such as Universal ADB drivers. Whichever method you choose, it is always advisable to have ADB drivers ready when it comes time to perform any kind of advanced operation on an Android device.

Examples of ADB Commands

When you use the ADB commands, you obviously have to make sure that the device you want to interact with is actually connected to your computer. Enter adb devices command on your terminal/command prompt.

We have listed some of the most useful adb commands. Let it check out.

  • Shows the list of devices connected and recognized by the PC : adb devices
  • Restarts the connected device : adb reboot
  • Reboots the device in Recovery Mode : adb reboot recovery
  • Reboots the device in Download Mode : adb reboot download
  • Reboots the device into Bootloader : adb reboot bootloader
  • Reboot the device in Fastboot Mode : adb reboot fastboot

Install ADB & Fastboot on Ubuntu 18.04 / Linux Mint 19

Posted: 16 Φεβρουαρίου 2022 in Android, linux
Ετικέτες: ,

How to Install ADB & Fastboot on Ubuntu 18.04 / Linux Mint 19?. Android Debug Bridge (ADB) is a versatile command-line tool that enables you to communicate with a device from a client machine. With adb command, you can perform a variety of device actions, such as the installation of Applications, copying files, run shell commands, debug applications e.t.c.

ADB also provides access to a Unix shell for running commands on the device. ADB works in a client-server model and it includes three components:

  • adbd: This is a daemon running in the background and allows the running of commands.
  • A server: This is a background process running on your development machine to manage communication between the client and the daemon.
  • A client: The client is responsible for sending commands from you local machine to a device over USB connection.

Install ADB & Fastboot on Ubuntu 18.04 / Linux Mint 19

ADB comes included with Google’s Android SDK but the package can be installed independently on Ubuntu 18.04 / Linux Mint 19. Install both ADB & Fastboot by running the commands below.

sudo apt update
sudo apt-get install android-tools-adb android-tools-fastboot

Get ADB version details.

$ adb version
Android Debug Bridge version 1.0.36
Revision 1:7.0.0+r33-2

If you try list for connected devices, ADB server should be started if not already running.

$ adb devices
List of devices attached
daemon not running. starting it now on port 5037 *
daemon started successfully *

The Service can also be started by running:

sudo adb start-server 

How to Enable adb debugging on your device

You must enable USB debugging on your device to use adb over USB. Navigate to system settings, and enable it under Developer options.

To reset your adb host, run:

adb kill-server

Check help page with --help option.

install adb ubuntu linux mint

Check Google ADB documentation for more details.

Chirp Connection Issues using Ubuntu

Posted: 1 Νοεμβρίου 2018 in Uncategorized

These are not Chirp issues; they are operating system (Linux, Ubuntu) issues. If these notes do not help, get Ubuntu help either through a search or using the Ubuntu support sites.

Symptom with a USB connection

  1. Click Radio then Download from Radio at the top menu bar; a window appears with Port, Vendor and Model
  2. Click Port and from the pull-down list pick the USB option. Usually that is at the bottom of the list with a name like /dev/tty/USB0
  3. An error window appears with words like An error has occured.
  4. Below the error words is something like Permission denied

Symptom with a serial (RS232) connection

  1. Click Radio then Download from Radio at the top menu bar; a window appears with Port, Vendor and Model
  2. Click Port and from the pull-down list pick the serial port (TTY) with a name like /dev/ttyS0. You may have to experiment to find which port number is active. Another common connection is /dev/ttyS4.
  3. An error window appears with words like An error has occured.
  4. Below the error words is something like Permission denied


The most common cause is that the user(s) do not have permission to use the serial-USB connection. Permission must be established for the user. There is much more on this common issue in Linux or Ubuntu wikis and support websites.

  1. Start a terminal session.
  2. Enter this this command into the terminal session: sudo gpasswd --add ${USER} dialout


or on Debian based systems is usually solved by adding the user to the group dialout
e.g.: sudo adduser USER dialout



  1. Logout and login again on any sessions you want to see the new group.
  2. After executing the command, check that it worked with: groups ${USER}
  3. The user name will be followed by a list that includes dialout. Dialout means permission for the TTY set that includes serial and USB connections.

Another option you can employ is xkill. This is preinstalled in Ubuntu, but you can install it via the Terminal (which you can open with CTRL + ALT + T) if necessary. When called, xkill will enable you to close any desktop app. Install it with the following command:

sudo apt-get install xorg-xkill

Once this is done, run xkill by simply typing


Your mouse pointer will then display a cross (or a skull), and all you need to do is left-click on the offending application.

If it’s not possible to close your unresponsive app with any of these desktop-focused methods, the solution might be the command line…

1) Download a driver for linux from Samsung. Samsung M2070 Linux Printer/Scanner Driver (15.87 MB) is at

2) Unzip your downloaded file.

3) Make sure about the location of the directory which contains a file named » «. It must be in downloads/XXXX(You named!!)/ uld.

I repeat. » » is in ULD.

4) Open TERMINAL to go to the directory which has » » in it.

cd downloads


cd uld

5) Install a driver by command.

sudo ./

Note that you have to hit «Enter» many many times to reach the line which asks you to choose y/n. Go slow. Otherwise you’ll have to go back to the directory of ULD and command again.

Send Email when IP Address Changes

Posted: 6 Μαρτίου 2018 in linux
Ετικέτες: , , , ,

1. Setup Gmail and mSMTP

This time we are using mSMTP because it’s easy, and Gmail because it’s free.

I would prefer to create a new Gmail account specific only for this purpose. Use your creativity to create long and obfuscated password, e.g. with mkpasswd -m sha-512 yOuRp4ssW0rD you can get a long string which is should be very nice for password.

Next, install mSMTP and its mail “client”:

sudoapt-get install msmtp mailutils

Then edit the config file at /etc/msmtp/ssmtp.conf:

mSMTP is not a daemon, so don’t worry about starting the service or such.

Next, test your setup:

echo"test message"| mail -s "testing msmtp"

Note the blank like after the subject, everything after this line is the body of the email. When you’re finished, press Ctrl-D. mSMTP may take a few seconds to send the message before closing.

apt-get install curl

2. The Script

#Script to report public IP address change
#By: Soultidis D. Christos

curl > /home/username/emailscript/erxeteip.txt

oldip=`cat /home/username/emailscript/oldip.txt`
erxeteip=`cat /home/username/emailscript/erxeteip.txt`

if [[ $erxeteip = $oldip ]]

    #echo $oldip > /home/username/emailscript/oldip.txt
    echo "Kamia allagi"

    echo $erxeteip > /home/username/emailscript/newip.txt
echo $erxeteip > /home/username/emailscript/oldip.txt

    cat /home/username/emailscript/newip.txt | mailx -s "Dynamic Public IP Address"


This time we use Bash, because you might not realize that you’re already fluent with Bash.

Save this anywhere in your home folder. I personally have my own /home/username/emailscript/


3. Cron
To make this run periodically, add the script as a cron job. More detail on cron you can STFG (Search The Fine Google).

crontab -e

Then add this to run the script every 30 minutes

#*/30 * * * * /home/username/emailscript/ >/dev/null 2>&1

ΥΓ. θα πρέπει να δημιουργήσω το oldip.txt


Cron daemon is not running. I really screwed up with this some months ago.


pgrep cron 

If you see no number, then cron is not running. sudo /etc/init.d/cron start can be used to start cron.

EDIT: Rather than invoking init scripts through /etc/init.d, use the service utility, e.g.

sudo service cron start

How to install msmtp to Debian 10 for sending emails with gmail

 by caupo

I am making this post because last 2 days I tried to install msmtp to my Debian 10 server. Previously I used ssmtp where I did not have any problems but it cannot be installed at the time of making this tutorial. Because nobody is maintaining the package anymore or something like this as far as I understood.

I spend countless hours to the error that said my username and password is not accepted by Gmail. So here is my tutorial to how fully install it and configure it.

Step 1: Installing required packages.

sudo apt-get install msmtp msmtp-mta

Step 2: Create an app password in Google for msmtp

This (Step 2.* in this tutorial) was the missing piece of the puzzle which weren’t in any of the msmtp tutorials I did through. I found out about it in one of the Postfix tutorials where it was included after many hours of trial and error. Because at first, I thought the msmtp config file where was password field had to be filled with the same password with what you log in as a person to your account.

Go to: and log into the email account you want to start sending the emails.

Step 2.1: Select Security from the side menu and turn 2-Step Verification ON.

Step 2.2: After that click on App passwords

Step 2.3: Next up select Other (Custom name)

Step 2.4: Fill in the name as msmtp for example

Step 2.5: Get the password for your msmtp configuration file

Save this password to some notepad temporarily so you can copy & paste it later to a configuration file because once you click DONE you cannot see the password again. At least I have not found a way to re-open this popup.

Step 3: Create a configuration file

sudo nano /etc/msmtprc

Step 4: Configure msmtprc file

auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log
account        gmail
port           587
user           username
password       password
account default : gmail

The has to be changed in the config file with the email you used to create an app password

The user field where is username has to be changed as well. For example, if your email is then change username to john.doe.

auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log
account        gmail
port           587
user           john.doe
password       fkelpwkdymcwslwo
account default : gmail

Step 5: Testing the email configuration

echo "Message" | mail -s "Title"

After that command, you should receive an email from your configured account.


Posted: 3 Μαρτίου 2018 in Uncategorized


Εμφάνιση και άλλων λειτουργικών στο grub

Posted: 14 Νοεμβρίου 2013 in linux

sudo update-grub

The easiest way to enable desktop icons is to use Gnome Tweak Tool. Run sudo apt-get install gnome-tweak-tool, then launch Gnome Tweak Tool from the Gnome Shell menu. It will be called Advanced Settings.

enter image description here

Then, click on the Desktop button. Enable the option that says «Have file manager handle the desktop. Now, any files placed in the Desktop folder inside your home folder should appear on ther desktop.

Για να επιστρέψουμε λοιπόν τα εικονίδια αρκεί να δώσουμε αυτές τις δύο εντολές.

gsettings set org.gnome.desktop.background draw-background true

gsettings set org.gnome.desktop.background show-desktop-icons true

Για να επιστρέψουμε στην άδεια επιφάνεια εργασίας που είχαμε προηγουμένως δίνουμε τις ίδιες εντολές, αλλά αντί για το true στο τέλος δίνουμε false.

Debian Linux Install OpenSSH SSHD Server

Posted: 24 Ιανουαρίου 2013 in linux
Ετικέτες: , , ,


How do I install OpenSSH sshd server under Debian GNU/Linux operating systems?

You need to use the apt-get or aptitude command to install OpenSSH server under Debian Linux. Open a terminal and type the following command to update package database as root user:
# apt-get update

Task: Install OpenSSH server Under Debian Linux

Type the following command:
# apt-get install openssh-server
Sample outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  ssh-askpass rssh molly-guard ufw
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 318 kB of archives.
After this operation, 717 kB of additional disk space will be used.
Get:1 squeeze/main openssh-server amd64 1:5.5p1-6+squeeze1 [318 kB]
Fetched 318 kB in 3s (89.0 kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 153448 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.5p1-6+squeeze1_amd64.deb) ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.5p1-6+squeeze1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Restarting OpenBSD Secure Shell server: sshd.

By default openssh will run on the TCP port 22. You can verify the same with the following command:
# netstat -tulpn | grep :22
Sample outputs:

tcp        0      0    *               LISTEN      3946/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      3946/sshd

You can connect to the Openssh server, type:
$ ssh user@localhost
$ ssh user@sever-ip-here

How Do I Start / Stop / Restart OpenSSH Server Under Debian Linux?

Type the following commands as root user:
# service ssh stop
# service ssh start
# service ssh restart
# service ssh status

# /etc/init.d/ssh stop
# /etc/init.d/ssh start
# /etc/init.d/ssh restart
# /etc/init.d/ssh status

Sample session:

Fig.01: OpenSSH under Debian LinuxClick to enlarge the image

How Do I Open Port 22 At The Firewall Level?

Edit your firewall script and append the following rule to restrict access to

/sbin/iptables -A INPUT -s -m state --state NEW -p tcp --dport 22 -j ACCEPT

Save and close the file. OR, you can type the command as follows and save it to your firewall config file:

# /sbin/iptables -A INPUT -s -m state --state NEW -p tcp --dport 22 -j ACCEPT
# iptables-save > /path/to/your.firewall.conf

How Do I Configure and Secure OpenSSH Server under Debian Linux?

You need to edit the /etc/ssh/sshd_config file using the text editor such as vi, run:
# vi /etc/ssh/sshd_config
See this article which explains config option to tweak in order to improve OpenSSH server security.

Πηγή :