Installing java applications on a Samsung phone in Ubuntu
Foreword
Not so long ago, I completely transferred my home computer and laptop to Ubuntu. And everything would be good if there was no desire to put a new game on the phone (L320) of his bride.
The “interesting” feature of Samsung phones is a very peculiar software, both for the phone itself and for the computer. It's no secret that computer software exists only for Windows.
Purpose: Install java-application
Obstacles on the Samsung phone Obstacles: No Windows for PC Studio (PCS). Like no PCS for Linux
What it is: There is a cord, PC Studio for Windows, a laptop with built-in bluetooth, the hands and head of a programmer
Ever since the days of Windows, I checked - through bluetooth or by connecting the phone with a cord like a USB flash drive, the application can not be installed on the phone. The only way, besides downloading via WAP (which we are not interested in principle), is to transfer it to the phone using software from the manufacturer - Samsung PC Studio. This method is described in detail in the manual and on the manufacturer's website.
It all started with an attempt to install PCS using Wine. The application was installed and launched without any problems.
Samsung PC Studio under the wine
USB
It turned out that wine of the standard assembly is not able to natively work with USB. Not long rummaging in Google, a solution was found . This is a patch for the source code for wine, with very old versions. What, what, but I really didn’t really want to patch a serious application with a patch for older versions and then build it, because I have the latest stable release 1.2 installed, and the latest release of the patch is dated August 31 last year and is aimed at version 1.1.28.This option has disappeared.
Bluetooth
Back in 2008, the idea of the need for bluetooth support was passed in the wine development community, but as far as I understood, this did not move beyond the idea. The reason for this was, allegedly, that 2/3 of the applications use their bindings to work with bluetooth and it is almost impossible to implement the API of all drivers on all adapters, i.e. There is no common interface that all applications would use. If I misunderstood something, please correct me in the comments.COM port
On the laptop I don’t have a COM port, but knowing about the features of * nix systems that each device is a file (in the / dev / folder), I started digging. The idea was simple - to redefine one of the available interfaces, usb or bluetooth, on a virtual COM port and teach wine how to use it.The correct query in the search engine led me to the topic on the English-language forum, which described a not entirely successful way of such a connection.
But "not entirely successful", because it does not mean bad, right?
I began to thoughtfully repeat the steps looking for possible errors or possible alternatives. All the actions were performed, but I still could not find a way to make wine see the dos device — the COM port I created. Yes, and yet, there was a problem - I did not find the device file described in the instructions with the mysterious name rfcomm0 . A little later, going to the finish line, I found how to create it, but more on that below.
If someone tells me how to connect such a port to wine, then all the manipulations will be simplified to the normal use of PCS under wine with emulation of communication through the COM port.
I and this attempt failed.
Linux way or Battle Won
Realizing that my native software would not help me, I began to experiment.Opening Synaptic, I began to look closely at the names and descriptions of packages related to bluetooth and look at the packages shown by the search for “wine”.
The package that saved me is called blueman .
sudo apt-get install blueman
The package puts a wonderful application - Blueman - GTK + Bluetooth Manager . This application makes it possible to work very thinly with the bluetooth adapter and the devices to which it connects. Screenshots of the program are on the project website.
So, first of all, having covered the program menu, interesting features were found, for example, “Serial Port Service” . It was this service that made it possible to create the above-mentioned device/ dev / rfcomm0 . But as is clear from the above, this method did not bring effective results.
Everything turned out to be much simpler - in the context menu of the device (after the phone with bluetooth turned on was found by the laptop) there was a very interesting item “ View device ”. After selecting it, the phone appeared on the list of storage media in Nautilus. At the same time, with standard security settings in the phone, for each operation on the computer, the phone responded
Addition
The rescue application was also very useful for working with a bluetooth mouse. In particular, it allowed me to establish a connection with her much faster if “I didn’t turn it on on time at boot time” or “took the laptop far, but forgot the mouse” - a trifle, but nice.Afterword - The battle is won, but not war
In military terminology, only this battle is won, but not war. There is still no way to fully interact with the phone from "non-Windows" systems. But the interaction does not end with the transfer of pictures, music or games to the phone or from the phone. Many still need contact synchronization functionality or the ability to send SMS using a computer. Of course, suitable devices should be used for specific tasks. The phone mentioned at the beginning, the L320, is not more than just a means of communication and a primitive music or radio player. But this does not mean that its owner does not have a desire to keep the phone book up to date, synchronizing it with other devices. And it’s not uncommon that a computer is used as a buffer device (or as a backup storage), which is not required to use Windows at all. I don’t think the whole thing is about some kind of marketing conspiracy or something similar, no. For me, this speaks only about who the product is aimed at, how the manufacturer relates to his customers. I do not think that the manufacturer was unable to implement software for other OSs or at least provide more humane capabilities in their devices.Probably the whole thing is in the strange belief that "the user will be comfortable just like this, and not otherwise."
Upd: User asm0dey , suggested that there is a Wammu application for working with phone data (a list of supported phones is here ). But for my case - installing the application on the Samsung L320 - the program did not fit. But judging by the descriptions, Linux can make friends with a mobile darling someone.
This post became a ticket to Habr for me. For which special thanks to jenyay . If this post after the sandbox is not lost, but I just could not find it ...