Android and openSUSE: Who is connecting and how are you connecting?

I want to start a single thread to give openSUSE users options for connecting their Android devices to their openSUSE PCs and networks and options or ideas for using them with openSUSE.

I think this would be the proper forum, looked the various ones over, but I might be wrong. If so, mods can move it.

My questions to all openSUSE users with Android devices are:

  • Who has successfully connected their Android device to openSUSE and are currently connecting, either through LAN, WAN, or USB?

  • How did you connect (include with what programs and what protocol)?

  • Did you have to root your device? I would like results from those who rooted and who did not root.

  • How are you using it (mounted to sync, serving files, transferring files back & forth)?

  • What are your successes and what hurdles have you/are you running up against?

  • Who installed and is using CyanogenMod instead of Google Android?

If we post what we can here about our methods and how they work, how they are achieved, we can have a single collection for users to go through, get ideas and suggestions, and make choices that suit their own needs. We will also wind up helping each other get better productivity out of our devices paired with openSUSE by filling in this thread with the above details.

Once I have explored my own device and have done some research, I will post my connectivity successes in this thread. At the moment, I am just mucking around with various tests and apps.

For those of you who do not know about Developers options on the device and the USB debugging setting, hidden by default in the newer Android versions, check it out online (look up adb and USB debug on the internet).

To enable Developers options on smartphones, go to Settings, scroll down to About phone, go in there and scroll down to Build number. Tap the Build number 7 times, and as you approach the last few taps, you will see a message that you are about to turn on Developer options. On the 7th tap, it will tell you that you are now a Developer, and that option will now appear near the bottom of the list in the main Settings list.

Be carefull in there, though, only do as explicitly instructed by a reliable source and only as needed. Be certain you know what you are doing before you do it.:wink:

Oh, yes … and I would like you to identify if your methods require use of third party servers or the cloud, because many of us want privacy and security assured by connecting direct machine-to-machine – across the internet or WAN, within a LAN, or by cable – without a 3rd party involved.

For those who are not that concerned, they can look at the Cloud apps, etc., while those of us who are (paranoid? :)) concerned, we can choose the non-3rd-party connections.

On Sat 08 Oct 2016 06:46:02 AM CDT, Fraser Bell wrote:

I want to start a single thread to give openSUSE users options for
connecting their Android devices to their openSUSE PCs and networks
and options or ideas for using them with openSUSE.

I -think- this would be the proper forum, looked the various ones
over, but I might be wrong. If so, mods can move it.

My questions to all openSUSE users with Android devices
are:

  • *Who has successfully connected their Android device to openSUSE and
    are currently connecting, either through LAN, WAN, or USB?
  • How did you connect (include with what programs and what
    protocol)?
  • Did you have to root your device? I would like results from those
    who rooted and who did not root.
  • How are you using it (mounted to sync, serving files, transferring
    files back & forth)?
  • What are your successes and what hurdles have you/are you running
    up against?
  • Who installed and is using CyanogenMod instead of Google Android?

If we post what we can here about our methods and how they work, how
they are achieved, we can have a single collection for users to go
through, get ideas and suggestions, and make choices that suit their own
needs. We will also wind up helping each other get better productivity
out of our devices paired with openSUSE by filling in this thread with
the above details.

Once I have explored my own device and have done some research, I will
post my connectivity successes in this thread. At the moment, I am just
mucking around with various tests and apps.

For those of you who do not know about Developers options on the device
and the USB debugging setting, hidden by default in the newer Android
versions, check it out online (look up adb and USB debug on the
internet).

To enable Developers options on smartphones, go to Settings, scroll down
to About phone, go in there and scroll down to Build number. Tap the
Build number 7 times, and as you approach the last few taps, you will
see a message that you are about to turn on Developer options. On the
7th tap, it will tell you that you are now a Developer, and that option
will now appear near the bottom of the list in the main Settings list.

Be carefull in there, though, only do as explicitly instructed by a
reliable source and only as needed. Be certain you know what you are
doing before you do it.:wink:

Hi
I have an ASUS Transformer TF101 device;
Android 4.4.4 KatKiss-KitKat
Rooted: SuperSU

Tested with openSUSE 42.1, 42.2 Beta and Tumbleweed connect via
mtp/nautilus and via ssh [sshdroid];


lsusb
Bus 002 Device 003: ID 0b05:4e1f ASUSTek Computer, Inc.

ssh root@waldorf
SSHDroid
root@waldorf's password:
root@tf101:/data/data/berserker.android.apps.sshdroid/home # whoami
root

I prefer ssh, don’t really worry about bluetooth and mtp…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.31-30-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Have two Android phones.
Computers using openSUSE Leap 42.1

**HTC One S (ville)
** * Rooted as descibed on cyanogenmods homepage http://wiki.cyanogenmod.org/w/Ville_Info

  • Cyanogenmod ver. 20160523-NIGHTLY-ville (Cyanogenmod 12.1, Android 5.1)
  • bad SIM connection (doesn’t work as phone now)

Connects by USB, the phone needs to be unlocked to allow connection.
Connects with dolphin using mtp
Only file transfers
mtp info :

quinness@linux:~/Mallar> rpm -qa | grep mtp
libes**mtp**-1.0.6-16.1.x86_64
lib**mtp**9-1.1.9-4.2.x86_64
kio_**mtp**-0.75-5.2.x86_64
lib**mtp**-devel-1.1.9-4.2.x86_64
**mtp**fs-1.1-3.1.x86_64

Connects by USB at boot to update cyanogenmod.
Command prompt commands
On openSUSE the software is ADT (Android Development Tools, ver. adt-bundle-linux-x86_64-20140702) from google. Included is adb (Android debug) and fastboot . adb connects to phone giving a command prompt similar to (mayby is) bash.

Connects by WiFi using Airdroid from Google Play over http
Using Chromium on openSUSE (my default web browser)
Can control some of the phone’s function, edit contacts, send SMS, start call …

Samsung S6 (SM-920F)

  • Samsung’s Android 6.0.1 (Security :sarcastic: update 1 September 2016 )

Connects by USB, the phone needs to be unlocked to allow connection.
Connects with dolphin using mtp
Only file transfers

Connects by WiFi using Airdroid from Google Play over http
Using Chromium on openSUSE (my default web browser)
Can control some of the phone’s function, edit contacts, send SMS, start call …

Now I must check out sshdroid, thanks to malcolmlewis

Thanks for that, Malcolm. I will also be testing sshdroid.

I hope when I am done that I will be able to build a comprehensive SDB guide for connecting openSUSE and Android devices. I might even then start building some opensource Android apps especially targeted to openSUSE users. A mighty task(s) ahead of me, if I go ahead with it!:stuck_out_tongue:

Wow, quiness! Lovely, detailed information. Should help a lot of users.

Thank you for that!:slight_smile:

… I am using a Moto E I picked up cheap (and new). I have no intentions of actually using it on a cell network, so I keep it in airplane mode at all times. This still allows USB, Bluetooth, and WiFi connections with no restrictions.

I have only just begun to explore it, so that is why I have not yet posted my results.

I, too, am considering running Cyanogenmod, but have not decided fully on that at this point. Besides, I want to get a comprehensive list of methods I use without rooting, then after rooting, and – if I go that route (probably will) – a 3rd comprehensive list using Cyanogenmod.

I have found official releases of Android Tools for 13.1, 13.2, 42.1, & Tumbleweed in the openSUSE software search:
https://software.opensuse.org/package/android-tools

Note that the Android Tools could be found in the repositories with a Yast Software Management search, and that is actually how I installed it (from openSUSE-13.1-Update, in my case). It includes both Android Debug Bridge (adb) and Fastboot.

adb allows me to do a lot of interesting things, including push/pull files, open a Linux CLI shell on the device ("Hey, I can use the standard Linux console commands here! Super!), and so on. Found how the user part of the SDCard has been manipulated in Android 6.0 and how to directly connect to it, in spite of Google’s playing around with attempts to control the user.

Also:

“unstable” or “unofficial” releases of android-file-transfer-linux (Android File Transfer For Linux) for those and 42.2:
https://software.opensuse.org/package/android-file-transfer-linux

I have tried it and it works reasonably well.

There are also 4 other package titles in the openSUSE Software Search, just search for “android”.

There are a few other items in the repositories, using Yast, search “android”. Note that by adding a tick to also search in Description, you will get more listings.

Also, in Yast, I found strongswan (StrongSwan is an OpenSource IPsec-based VPN Solution for Linux), which has popped up several times in Linux discussions about connecting android to Linux.

I plan to run tests with that (when I get around to it).

]Connects by USB, the phone needs to be unlocked to allow connection.

… have not had to unlock the phone to allow connection. Used the 7-press About Phone->Build Number release of the Developer options, which allowed me to turn on USB Debug. I then connected and enabled USB data to work. I do not know, though, if that was really necessary, might have worked anyway without doing that. My first attempts were with a cable that turned out to be a charge-only cable!

Without changing anything in openSUSE ahead of time, KDE in 13.1 detected the phone immediately when I switched to a data USB cable. For data transfer, I then simply pulled down from the top (notification showed USB for charging only), tapped on the notification, got a list of protocols and selected MTP. Voila, connected in Dolphin, could browse at ease.

I am moving files back and forth, testing the various methods, without any unlocking at all.

Connects by WiFi using Airdroid

I plan on giving that a spin, as well.

Now I must check out sshdroid, thanks to malcolmlewis

Great, come back & let us know your experiences. I plan on test-driving it, as well.

Again, thanks for you input.:slight_smile:

  • Who has successfully connected their Android device to openSUSE and are currently connecting, either through LAN, WAN, or USB?

​Me, currently a Samsung Galaxy Tab2 10.1" ( on CM12 ) and my OnePlus X ( on OxygenOS 3.1.1, which is Android 6.1 ). Through LAN, WAN and USB

  • How did you connect (include with what programs and what protocol)?

Various ways: sshdroid, kdeconnect,

  • Did you have to root your device? I would like results from those who rooted and who did not root.

No, never found the need
EDIT: Not true. I had to root the Samsung before getting Cyanogenmod on it ( actually, to get it back alive )

  • How are you using it (mounted to sync, serving files, transferring files back & forth)?

All of them. Plus as a remote control for set-top box.

  • What are your successes and what hurdles have you/are you running up against?e

Everything currently works as expected. I bought the Samsung with KitKat on it, IIRC I had to enable all kinds of developper settings before I managed to address it through MTP.

  • Who installed and is using CyanogenMod instead of Google Android?

​Like said, on the Samsung. OnePlus X has OxygenOS, OnePlus’ fork of Android ( pretty much stock though, I don’t use their launcher)

  • Did you have to root your device? I would like results from those who rooted and who did not root.

No, never found the need
EDIT: Not true. I had to root the Samsung before getting Cyanogenmod on it ( actually, to get it back alive )

Of course. And thanks for bringing that up again. Newcomers should realize that rooting is mandatory to install a new OS on the Android device, whether it is Cyanogenmod, Ubuntu for Androids, or openSUSE for mobile. By the time they make it through this thread, they will understand that.

  • How did you connect (include with what programs and what protocol)?

Various ways: sshdroid, kdeconnect,

I will be testing both. Right now, I am testing droid NAS, managed with little difficulty to mount the Android 6 device (without being rooted) using cifs so it is easily accessed by me as a User on openSUSE, and have run several fully successful tests with synchronizing using Unison. Beautiful. I have a couple of other things to test with that setup, and when done I will post back here with step-by-step how to do it (and how easy it is to do).

  • How are you using it (mounted to sync, serving files, transferring files back & forth)?

All of them. Plus as a remote control for set-top box.

  • What are your successes and what hurdles have you/are you running up against?e

Everything currently works as expected. I bought the Samsung with KitKat on it, IIRC I had to enable all kinds of developper settings before I managed to address it through MTP.

… in other words, “fully functional”, for all intents and purposes. Good to hear, and should encourage others to give it a shot. Yes, turning on the developer settings on the Android device (no need to root to do that) and turning on USB Debug for the initial contact and setup appears to be a necessity on some devices. But, not a difficult thing to do.

  • Who installed and is using CyanogenMod instead of Google Android?

​Like said, on the Samsung. OnePlus X has OxygenOS, OnePlus’ fork of Android ( pretty much stock though, I don’t use their launcher)

Good to know, thank you for your detailed information.:slight_smile:

Right now, I am testing droid NAS, managed with little difficulty to mount the Android 6 device (without being rooted) using cifs so it is easily accessed by me as a User on openSUSE, and have run several fully successful tests with synchronizing using Unison. Beautiful. I have a couple of other things to test with that setup, and when done I will post back here with step-by-step how to do it (and how easy it is to do).

Good to know it is working for you. From a convenience perspective, I like mounting samba shares on the fly with Dolphin (which is how I access remote shares for work as well), but as Droid NAS uses (unprivileged) port 7777, I don’t think it’s possible without mounting with a mountpoint first. Still, a good option for many.

… if I have understood the reams of copy I have read through while researching these things (as in – is my mind playing tricks, or did I really read this, or mixed up with something else?lol!) I do believe that using the unprivileged ports allows the NAS or other utility to work without the need to root the device (I have read that some of the other server apps allow the user to define the port, and that changing the port to an unprivileged one will allow the server to operate without the need to root). But, I have used the cifs mount for a stable mount point so I could work with Unison and other utilities as if it is a local directory. I have tested and been able to mount the samba share with Dolphin by using

smb://xxx.xxx.xxx.xxx:7777

and work with the files that way. However, Unison needs a path, AFAICT, and won’t accept the path I see displayed with that connection. Mounting with cifs allows me to run Unison, et al.

Yes, that’s right.

But, I have used the cifs mount for a stable mount point so I could work with Unison and other utilities as if it is a local directory.

Yes, that’s the advantage of creating a local mount-point.

I have tested and been able to mount the samba share with Dolphin by using

smb://xxx.xxx.xxx.xxx:7777

and work with the files that way.

I did wonder if that might work, and since you’ve found that it does, it makes it a whole lot more convenient to me for simple file access. :slight_smile:

FWIW, not Android, but for the far more restrictive iPhone, I did manage to achieve simple file sharing using ‘FileApp’ (free) employing FTP (on port 2121), which allowed easy transfer of files via Dolphin. Your thread may tempt me into getting my own Android device to play with.

Sometimes I use ssh sometimes mtp also bluetooth when I need to transfer a couple of files and there are no free usb ports!
I should give it a try to kdeconnect if you’re using kde!

Note that, with droidNAS, you can create a share that requires a login name and password, which slightly changes the commands for connecting. However, since I am only using it within my LAN, and I am the only person (multiple machines, but just me) in the LAN, I do not think it necessary in my case.

If I decide to go across the internet – I do not see me doing that – to connect, then it would definitely be something like SSH or VPN.

droidNAS was primarily written for Mac users, and the website declares something along the lines of that it “might probably not work in Linux” because of the unorthodox port 7777, but – of course – it does, because Linux smb can be aimed to that port, as shown above.

It might be a different situation for Windows users, because apparently Windows smb access cannot be easily changed to another port – I have not bothered going back to Windows to test that claim – but that can be overcome by port-forwarding or port-mapping in the router.

Leap 42.2 is going to make it easy to connect a stock Android phone for casual file exchanges, without even resorting to the “USB 7-touch developer mode”. Leap 42.1 allows listing, copying and moving files, but is not able to open most formats directly on the phone.

Say you have Leap 42.2 Gnome (actually tested on 42.2 RC1) and a Samsung phone out of the box.
[NOTE: due to the proprietary Samsung interface, phone menus on a stock Android might be slightly different].

Connect your phone with an USB data cable. The phone connects as an MTP device and a pop-up announcing “SAMSUNG Android” offering to “Open with Files” shows.
In Files (AKA Nautilus) you see a drive named “SAMSUNG Android”, its main “folder” being “Phone”. Open that folder.
You should be able to move/copy files to/from the host computer, open documents stored on the phone, e.g. pdf docs with Document Viewer (AKA Evince), music or movie files with Movies (AKA Totem), images with Image Viewer (AKA EyeOfGnome, EOG) and maybe every file for which you have defined an associated application.
You can open a terminal, explore the file tree and do apparently whatever you want with the CLI, e.g.


bruno@LT_B:/run/user/1000/gvfs/mtp:host=%5Busb%3A003%2C010%5D/Phone> ls -la
total 0
drwx------ 1 bruno users 0  1 gen  1970 .
dr-x------ 1 bruno users 0  1 gen  1970 ..
drwx------ 1 bruno users 0  1 gen  2014 Alarms
drwx------ 1 bruno users 0  1 gen  2014 Android
drwx------ 1 bruno users 0 24 set 20.39 Bluetooth
drwx------ 1 bruno users 0 20 feb  2016 DCIM
drwx------ 1 bruno users 0  1 gen  2014 Documents
drwx------ 1 bruno users 0 25 set 22.37 Download
drwx------ 1 bruno users 0  1 gen  2014 Movies
drwx------ 1 bruno users 0  1 gen  2014 Music
drwx------ 1 bruno users 0 28 gen  2015 Nearby
drwx------ 1 bruno users 0  1 gen  2014 Notifications
drwx------ 1 bruno users 0  1 gen  2014 Pictures
drwx------ 1 bruno users 0 29 mar  2015 Playlists
drwx------ 1 bruno users 0  1 gen  2014 Podcasts
drwx------ 1 bruno users 0  1 gen  2014 Ringtones
drwx------ 1 bruno users 0  1 gen  2014 Samsung
drwx------ 1 bruno users 0 11 lug  2015 TMemo
bruno@LT_B:/run/user/1000/gvfs/mtp:host=%5Busb%3A003%2C010%5D/Phone> 

The MTP protocol apparently prevents showing thumbnails for image or video files. To see the thumbnails of the photos taken with your phone’s camera you have to tap the USB notification on your phone reading “Connected as a media device” and tick “Connect as > Camera (PTP)”.
Gnome Files (AKA Nautilus) will show your phone with a “camera” icon named “SAMSUNG Android” as before, but while you can navigate the filesystem tree as before, only jpg files are shown, now including thumbnails, and double-clicking on those thumbnails opens the selected image in your default image viewer application.
So for the benefit of seeing thumbnails, you are forced to ignore all the other file types.

All that was tested with Leap 42.2 RC1 connected to a Samsung S3 with Android 4.2.2 and to a Samsung Note3 with Android 5.1.1.
A quick test with Leap 42.2 KDE showed that you basically can do the same things with the corresponding applications, e.g. Dolphin, DragonPlayer, etc. but I did no extensive testing there so far, so I’m not accepting the blame if anything doesn’t work :wink:

Wow!

That is going to make for much improved connectivity! Looking forward to that.

Thanks for the information, Bruno!

Are you able to see the /storage directory in the main drive directory, “SAMSUNG Android”?

If not, in Android 6+, the user might have to first define the SD Card at the device end to be “Internal Memory” to be able access anything on the SD Card from another device or PC. Apparently, they have a series of links that hide external access to the SD Card when it is defined as “External Storage” (or whatever they all it, I forget at the moment.).

I am a little fuzzy on this, at the moment, have done so many tests and explorations in Android 6 on my device that I will need to re-examine a few things to make certain my facts are accurate when I start my blog about it. But, I recall having to format the card as internal memory before I could remotely see the content. (I could remotely see the content if I turned on USB Debug and used the shell on the device, but only then – AFAIR.)

Hi Gerry, not sure to understand what you are looking for, but if I insert an SD card on the Note 3 (Android 5.1.1) I apparently have full access to it OOTB:


etabeta@linux-wxzw:/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D> ls -la
total 0
dr-x------ 1 etabeta users 0  1 gen  1970 .
dr-x------ 3 etabeta users 0 25 ott 15.07 ..
drwx------ 1 etabeta users 0  1 gen  1970 Card
drwx------ 1 etabeta users 0  1 gen  1970 Phone
etabeta@linux-wxzw:/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D> ls -la Card
total 10
drwx------ 1 etabeta users    0  1 gen  1970 .
dr-x------ 1 etabeta users    0  1 gen  1970 ..
drwx------ 1 etabeta users    0  1 gen  2014 Android
drwx------ 1 etabeta users    0 28 gen  2015 DCIM
drwx------ 1 etabeta users    0  1 gen  2014 LOST.DIR
-rw------- 1 etabeta users 9751 23 mar  2010 Meteore.odt
drwx------ 1 etabeta users    0  7 lug  2014 more
etabeta@linux-wxzw:/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D> ls -la Phone
total 0
drwx------ 1 etabeta users 0  1 gen  1970 .
dr-x------ 1 etabeta users 0  1 gen  1970 ..
drwx------ 1 etabeta users 0  9 set  2014 Alarms
drwx------ 1 etabeta users 0  9 set  2014 Android
drwx------ 1 etabeta users 0 10 feb  2016 DCIM
drwx------ 1 etabeta users 0  4 nov  2015 Documents
drwx------ 1 etabeta users 0 15 ott 14.58 Download
drwx------ 1 etabeta users 0 15 ott 14.59 Movies
drwx------ 1 etabeta users 0 15 ott 14.58 Music
drwx------ 1 etabeta users 0  9 set  2014 Notifications
drwx------ 1 etabeta users 0 23 mar  2015 PhotoEditor
drwx------ 1 etabeta users 0 24 apr  2015 Pictures
drwx------ 1 etabeta users 0  8 ott  2014 Playlists
drwx------ 1 etabeta users 0  9 set  2014 Podcasts
drwx------ 1 etabeta users 0 28 lug 17.31 Ringtones
drwx------ 1 etabeta users 0  9 set  2014 Samsung
drwx------ 1 etabeta users 0 10 ott  2014 SnoteData
drwx------ 1 etabeta users 0 17 ott  2014 Sounds
etabeta@linux-wxzw:/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C007%5D> 

Please remember this is a Samsung, so things might be slightly different on stock Android…

May I, now that we’re going into details, again draw attention to kdeconnect ?

Okay, that may be the SD card, but may not. I found that the symlinks (multiple ones, almost a maze, when I examined it in the Shell using USB Debug) went to internal and looks like it is the SD Card. But, a file and directory I created on the SD Card (I thought) did not actually show up on the SD Card. Also, a file I created on the SD Card (using the USB Debug link) did not show up on the device.

So, I think it is some kind of Security setup introduced in v6+ to protect your SD Card data?

Anyway, I then chose to set the SD Card as internal memory. After I did that, everything I saved to the SD Card showed up from openSUSE and everything I saved to the SD Card from openSUSE showed up on the device.

The other thing I would like to ask you: Can you mount the device as a local mount so that you can run programs such as Unison?

Or, do you have to set up a NAS on the device (which is what I am doing) or similar before you can mount it locally?