MTP problems (android – PC cable connection)

If you cannot connect your PC with an android device via usb cable, check first if your mobile device has mtp (media transfert protocol) set, and not charging or other USB possibilities.

In Likebook, for example, you have to set as in the following image:

Of course, you should have also installed all the needed MTP libraries.

css :hover on a mobile device

There lots of java-scripts to allow an effect such as mouse over on a mobile device (that is without mouse), but there is also a very, very simple solution: to use :active instead of :hover, as in the following example:

@media screen and (max-width: 580px) {
  .tooltip:active .tooltiptext {
  visibility: visible;
  opacity: 1;
}
}

while in desktop screen you can keep
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

connecting android to samba in Linux

You must add in smb.conf (in /etc/samba), at [global] section and at “allow hosts = row, the android device IP, otherwise you won’t be able to connect it to PC samba network.

Then you can use several android apps, like X-plore (G-Play, commercial, but good) or Material File Manager (F-Droid, open source, quite spartan, but fast and reliable), to set the samba connection with your PC and view the files shared on your PC.

Provided, obviously, that PC and android device are both connected at the same local network.

adb connect via wi-fi

  • Connect Android phone and host machine to same WiFi network
  • Connect Android phone to host machine using USB cable (to start with)
  • Run adb tcpip 5555 from a command prompt
  • Run adb shell “ip addr show wlan0 | grep -e wlan0$ | cut -d” ” -f 6 | cut -d/ -f 1″ to obtain the phone’s IP address
  • Disconnect USB cable and run adb connect < ip_address > :5555

speech to text in Linux con KDE connect

If you cannot speak-to-text directly from the smartphone to PC, you can before dictate a text within KDE Connect and then, after, send it to your PC (provided that your smartphone and your PC are both connected with KDE Connect):

KDE Connect (on smartphone) – > remote input -> small icon on high, as below

Then choose as keyboard, Google Voice Typing

Then you will be able to dictate your text (seeing it, before, on the smartphone [KDE connect] screen) and send it to your Desktop device.

no root uninstall system app in android

1) From smartphone enable debug USB (settings -> developer options or something similar);
2) enable MTP mode
3) istall and start adb  (adb start-server).
4) search for exact name of the apps you want to remove (i.g. Facebook is “com.facebook.katana”).
5) in (linux) terminal do this command: adb shell pm uninstall  –user 0 [appname]

It works!

As an example I made this bash file

#!/bin/sh
adb start-server
adb shell pm uninstall –user 0 com.facebook.katana
adb shell pm uninstall –user 0 com.facebook.orca
adb shell pm uninstall –user 0 com.asus.ephotoburst
adb shell pm uninstall –user 0 com.asus.task
adb shell pm uninstall –user 0 com.asus.gallery
adb shell pm uninstall –user 0 com.asus.microfilm
adb shell pm uninstall –user 0 com.asus.kidslauncher
adb shell pm uninstall –user 0 com.asus.fmradio
adb shell pm uninstall –user 0 com.asus.taskwidget
adb shell pm uninstall –user 0 com.google.android.apps.photos
adb shell pm uninstall –user 0 com.google.android.gm
adb shell pm uninstall –user 0 com.google.android.videos
adb shell pm uninstall –user 0 com.google.android.music
adb shell pm uninstall –user 0 com.google.android.talk
adb shell pm uninstall –user 0 com.google.android.youtube
adb kill-server