OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Gemini MassStorage App?
PJS
post Mar 10 2018, 11:09 AM
Post #1





Group: Members
Posts: 30
Joined: 21-February 18
Member No.: 818,128



Suggestion:

It occurred to me after hearing Dr. Janko mention one side
of the Gemini's USB ports supported being used in "slave"
mode, that it would be great if they'd provide an app
(driver?) which would allow for the Gemini to be used as a
USB MassStorage device.

Like the original Android phones did, before they pulled
the functionality in ~v1.5-1.6.

Thoughts?

Thanks,

PJS

Go to the top of the page
 
+Quote Post
Da_Blitz
post Mar 10 2018, 11:22 AM
Post #2





Group: Members
Posts: 1,579
Joined: 7-April 05
From: Sydney, Australia
Member No.: 6,806



QUOTE(PJS @ Mar 11 2018, 06:09 AM) *
Suggestion:

It occurred to me after hearing Dr. Janko mention one side
of the Gemini's USB ports supported being used in "slave"
mode, that it would be great if they'd provide an app
(driver?) which would allow for the Gemini to be used as a
USB MassStorage device.

Like the original Android phones did, before they pulled
the functionality in ~v1.5-1.6.



Was poking around with this earlier, try enabling dev mode by going to the about phone apge and tapping the version 7-8 times, you then have the option of specifying what the device shows up as when attached. i have tried it with the network adapter without luck but that may be a driver issue
Go to the top of the page
 
+Quote Post
PJS
post Mar 13 2018, 09:43 AM
Post #3





Group: Members
Posts: 30
Joined: 21-February 18
Member No.: 818,128




Yeah, I looked at that too. It looks like the only modes natively supported
by AndroidOS are: MTP, PTP, USB Ethernet and audio out. Pity.

MassStorage would be so much universal & compatible - no drivers needed, most
anything just works.

PJS

Go to the top of the page
 
+Quote Post
Varti
post Mar 14 2018, 12:20 AM
Post #4





Group: Admin
Posts: 867
Joined: 30-April 08
From: Italy
Member No.: 21,713



QUOTE(PJS @ Mar 13 2018, 06:43 PM) *
Yeah, I looked at that too. It looks like the only modes natively supported
by AndroidOS are: MTP, PTP, USB Ethernet and audio out. Pity.

MassStorage would be so much universal & compatible - no drivers needed, most
anything just works.

MassStorage has some limitations which MTP doesn't have: a separate partition must be used since, when mounted on the PC, it has to be unmounted on the Android side, and it has to be FAT32. I believe most modern OSes have MTP support already built-in, anyway. Here's an article explaining the reasons for the move from MassStorage to MTP:

https://www.howtogeek.com/192732/android-us...b-mass-storage/

Varti
Go to the top of the page
 
+Quote Post
Alius
post Mar 14 2018, 12:43 PM
Post #5





Group: Members
Posts: 52
Joined: 5-January 18
Member No.: 815,867



Thanks for the link to that article Varti, I always wondered why they did this. I used mass storage a lot in my old android phone(s).
Go to the top of the page
 
+Quote Post
vader
post Mar 14 2018, 07:18 PM
Post #6





Group: Members
Posts: 235
Joined: 21-January 18
Member No.: 816,775



It is not a mass storage driver as such, but if you want to get things from your phone you can set up a simple web server and then copy things from your phone. Alternatively run sshd, then rcp/scp them. I currently use termux for both, but I am sure there are apps which do the same. Doesn't matter about drivers or OS - so long as your PC has a web browser (or ssh/putty)
Go to the top of the page
 
+Quote Post
Dr. Watson
post Jun 13 2018, 03:03 AM
Post #7





Group: Members
Posts: 9
Joined: 4-June 18
Member No.: 823,795



If you want to use the Gemini like a USB stick or a CD drive, I have just successfully tested DriveDroid which allows for that.
I was able to download an Ubuntu ISO, present it to the PC via DriveDroid as a virtual USB storage device and boot my PC into Ubuntu.
It's even much faster than using a CD drive.
Since I need to use different boot media regularly, I really appreciate that the Gemini supports DriveDroid. My previous phone didn't.
Saves me a lot of time creating USB boot sticks or burning DVDs from downloaded ISO images.
This is about as useful to me as a swiss army knife.

If your intention is to transfer files between the Gemini and a PC that doesn't speak MTP:
Two operating systems can normally not mount the same file system at the same time. It's like two people simultaneously writing on the same line on a piece of paper.
That means that previously the "sdcard" file system had to be unmounted on the Android side, terminating all apps that were accessing any files or folders at that point, so that the PC was able to cleanly mount the filesystem without corruption and interference. Android apps had to "wait" until the PC unmounted the sdcard before they could access the sdcard again.
This was a very unreliable and dissatisfying mechanism.
Apart from that Windows could only handle NTFS and FAT file systems. Both had limitations which made them unsuitable for the Android system. I won't even mention the licensing issues.

Current android uses a linux file system which is less prone to corruption, supports files>4G, stronger security and encryption.
MTP is the protocol that acts as an intermediary between the Android operating system/apps actively "working" on this linux file system and the PC wanting to read and write files.
Not a bad solution in my opinion. It minimizes conflicts, allows apps to keep doing what they are doing and reduces corruption to practically 0.
The only disadvantage is that the OS on the PC has to support MTP. But any sufficiently recent OS does ...

Other alternatives for transferring files:
-USB C SD adapter
-Install DroidSSH and copy files from Windows with WinSCP over WIFI. Or any sftp client.
-TotalCommander Wifi Plugin
-TotalCommander LAN Plugin to copy files from the Gemini to and from your PC over WIFI
-USB Tethering and DroidSSH + WinSCP
-Google Drive
-ADB
...
Go to the top of the page
 
+Quote Post
gidds
post Jun 13 2018, 08:37 AM
Post #8





Group: Members
Posts: 220
Joined: 13-January 18
From: UK
Member No.: 816,386



QUOTE(Dr. Watson @ Jun 13 2018, 12:03 PM) *
The only disadvantage is that the OS on the PC has to support MTP. But any sufficiently recent OS does ...


It does?  My Mac (with the current macOS) doesn't seem to… mad.gif

I had to install Android File Transfer, but it's not very good: the window might look like a Finder window, but doesn't behave like one (sorts differently, can't see file info or move files within the drive &c).  Quite buggy, too: can't transfer files with characters like question marks, confuses ‘skip’ with ‘abort’, and freezes or crashes quite frequently.

I'm currently running sshd on the Gemini and scp on the Mac, to transfer files over wifi (which is more flexible as well as not requiring a cable) — but the Gemini sometimes can't preserve timestamps, which will cause problems.

What options might there be?


And a related question: although I've used the developer settings to tell the Gemini to connect in MTP mode, it always starts off with just USB charging, and I have to use the notification bar to switch.  Every time…  Am I doing something wrong?
Go to the top of the page
 
+Quote Post
petefoth
post Jun 13 2018, 10:39 PM
Post #9





Group: Members
Posts: 39
Joined: 13-January 18
Member No.: 816,405



QUOTE(gidds @ Jun 13 2018, 05:37 PM) *
QUOTE(Dr. Watson @ Jun 13 2018, 12:03 PM) *
The only disadvantage is that the OS on the PC has to support MTP. But any sufficiently recent OS does ...


It does?  My Mac (with the current macOS) doesn't seem to… mad.gif

I had to install Android File Transfer, but it's not very good: the window might look like a Finder window, but doesn't behave like one (sorts differently, can't see file info or move files within the drive &c).  Quite buggy, too: can't transfer files with characters like question marks, confuses ‘skip’ with ‘abort’, and freezes or crashes quite frequently.

I'm currently running sshd on the Gemini and scp on the Mac, to transfer files over wifi (which is more flexible as well as not requiring a cable) — but the Gemini sometimes can't preserve timestamps, which will cause problems.

What options might there be?


And a related question: although I've used the developer settings to tell the Gemini to connect in MTP mode, it always starts off with just USB charging, and I have to use the notification bar to switch.  Every time…  Am I doing something wrong?


On my main Android phone I use a server app on the phone called SSHelper and an app called CyberDuck on the Mac. Not got round to trying it on the Gemini yet, but it should work wink.gif

HTH

Pete
Go to the top of the page
 
+Quote Post
Dr. Watson
post Jun 17 2018, 07:56 PM
Post #10





Group: Members
Posts: 9
Joined: 4-June 18
Member No.: 823,795



QUOTE(gidds @ Jun 13 2018, 06:37 PM) *
QUOTE(Dr. Watson @ Jun 13 2018, 12:03 PM) *
The only disadvantage is that the OS on the PC has to support MTP. But any sufficiently recent OS does ...


It does?  My Mac (with the current macOS) doesn't seem to… mad.gif

I had to install Android File Transfer, but it's not very good: the window might look like a Finder window, but doesn't behave like one (sorts differently, can't see file info or move files within the drive &c).  Quite buggy, too: can't transfer files with characters like question marks, confuses ‘skip’ with ‘abort’, and freezes or crashes quite frequently.

I'm currently running sshd on the Gemini and scp on the Mac, to transfer files over wifi (which is more flexible as well as not requiring a cable) — but the Gemini sometimes can't preserve timestamps, which will cause problems.

What options might there be?


And a related question: although I've used the developer settings to tell the Gemini to connect in MTP mode, it always starts off with just USB charging, and I have to use the notification bar to switch.  Every time…  Am I doing something wrong?


Excuse my ignorance :-) Who would ever suspect that Apple does not wish to support owners of Android phones .....

The timestamp problem might happen due to different time resolution of Linux and MAC file systems:
https://superuser.com/questions/919127/rsyn...amp-off-by-1-se
https://unix.stackexchange.com/questions/34...n-running-rsync
Go to the top of the page
 
+Quote Post
gidds
post Jun 18 2018, 12:28 AM
Post #11





Group: Members
Posts: 220
Joined: 13-January 18
From: UK
Member No.: 816,386



QUOTE(Dr. Watson @ Jun 18 2018, 04:56 AM) *
The timestamp problem might happen due to different time resolution of Linux and MAC file systems


I doubt it -- SCP (the standard file transfer program that runs over SSH) seems highly unlikely to be filesystem-specific.

And I've seen other reports of problems with file timestamps on Android (though I haven't seen a decent explanation yet).
Go to the top of the page
 
+Quote Post
1668880
post Jun 21 2018, 08:36 AM
Post #12





Group: Members
Posts: 47
Joined: 3-January 18
Member No.: 815,735



QUOTE(Dr. Watson @ Jun 13 2018, 04:03 AM) *
If you want to use the Gemini like a USB stick or a CD drive, I have just successfully tested DriveDroid which allows for that.
I was able to download an Ubuntu ISO, present it to the PC via DriveDroid as a virtual USB storage device and boot my PC into Ubuntu.
It's even much faster than using a CD drive.
Since I need to use different boot media regularly, I really appreciate that the Gemini supports DriveDroid. My previous phone didn't.
Saves me a lot of time creating USB boot sticks or burning DVDs from downloaded ISO images.
This is about as useful to me as a swiss army knife.

If your intention is to transfer files between the Gemini and a PC that doesn't speak MTP:
Two operating systems can normally not mount the same file system at the same time. It's like two people simultaneously writing on the same line on a piece of paper.
That means that previously the "sdcard" file system had to be unmounted on the Android side, terminating all apps that were accessing any files or folders at that point, so that the PC was able to cleanly mount the filesystem without corruption and interference. Android apps had to "wait" until the PC unmounted the sdcard before they could access the sdcard again.
This was a very unreliable and dissatisfying mechanism.
Apart from that Windows could only handle NTFS and FAT file systems. Both had limitations which made them unsuitable for the Android system. I won't even mention the licensing issues.

Current android uses a linux file system which is less prone to corruption, supports files>4G, stronger security and encryption.
MTP is the protocol that acts as an intermediary between the Android operating system/apps actively "working" on this linux file system and the PC wanting to read and write files.
Not a bad solution in my opinion. It minimizes conflicts, allows apps to keep doing what they are doing and reduces corruption to practically 0.
The only disadvantage is that the OS on the PC has to support MTP. But any sufficiently recent OS does ...

Other alternatives for transferring files:
-USB C SD adapter
-Install DroidSSH and copy files from Windows with WinSCP over WIFI. Or any sftp client.
-TotalCommander Wifi Plugin
-TotalCommander LAN Plugin to copy files from the Gemini to and from your PC over WIFI
-USB Tethering and DroidSSH + WinSCP
-Google Drive
-ADB
...


Thank you for sharing the DriveDroid app, it is just what I needed.
Go to the top of the page
 
+Quote Post
speculatrix
post Jun 24 2018, 04:02 AM
Post #13





Group: Admin
Posts: 3,685
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



load up termux and scp the files between the Gemini and a Mac?
Go to the top of the page
 
+Quote Post
gidds
post Jun 25 2018, 12:09 AM
Post #14





Group: Members
Posts: 220
Joined: 13-January 18
From: UK
Member No.: 816,386



QUOTE(speculatrix @ Jun 24 2018, 01:02 PM) *
load up termux and scp the files between the Gemini and a Mac?


By an odd coincidence, that's exactly what I'm doing. smile.gif

One complication is that sshd is best run as root on the Gemini, to avoid issues with not being able to set timestamps or write to the external SD card. But there's no way to set up file permissions on SSH's config files so it's happy. (The entire Termux hierarchy is under a directory which is writable by your normal user, but to run as root SSH wants its config under a hierarchy not writable by anyone other than root.) The only solution I've fond so far is to disable SSH's strict checking (by adding the line 'StrictModes no' to /data/data/com.termux/files/usr/etc/ssh/sshd_config -- which seems dangerous).

However, this does have several advantages: you don't need to plug in a cable, you get full access to the entire filesystem, and you can script it.

I also found a neat way to set up a shortcut on the home screen which starts sshd as root: create a ~/.shortcuts directory, write a file in there with the line 'tsu -s sshd', install Termux:Widgets, and then that script can be selected as a widget from the home screen.

(Termux has no 'sudo' command, but it has a nice wrapper around 'su' called 'tsu', and its '-s' flag takes a shell to run. Turns out it doesn't have to be a shell!)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th March 2019 - 05:44 PM