A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » General XP issues or comments
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

From Windows, how can we open a command line on the Android filesystem?



 
 
Thread Tools Display Modes
  #1  
Old October 20th 18, 12:38 AM posted to comp.mobile.android,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 185
Default From Windows, how can we open a command line on the Android filesystem?

On Thu, 11 Oct 2018 19:43:38 -0000 (UTC), Arlen Holder wrote:

From Windows, how can we run a DOS command on the Android filesystem?


Thanks to the purposefully helpful posters, here is a progress report,
where I apologize for the details, which are necessary to be successful,
and to comprehend the scope of the problem and solution sets.

Please note that I _already_ have a solution, both USB & Wifi, where the
goal was & is always a general solution for everyone - not just for me.
o There are many freeeware solutions over WiFi
o It's modern Android MTP over USB that has the lack of freeware solutions
================================================== ===========
Here's a summary of the status to date...
================================================== ===========
In the Windows ng, Frank Slootweg suggested "netdrive", located he
http://netdrive.net/download (trialware, so it's not a general solution)
Just in case the old freeware existed, I downloaded the following versions:
o NetDrive 3.6.571 http://netdrive.net/
o NetDrive 3.5.434 https://en.freedownloadmanager.org/Windows-PC/NetDrive.html
o NetDrive 2.6.2 https://filehippo.com/download_netdrive/64426/
o NetDrive 2.6.16 build 962 https://www.filehorse.com/download-netdrive/30799/download/
o NetDrive 2.5.7 https://netdrive.en.lo4d.com/
o NetDrive 1.3.4 https://filehippo.com/download_netdrive/15075/
etc.

I have one key question for anyone on this ng who knows Windows well, which
is whether my "assumption" is accurate that we need to "mount" the Android
filesystem as a "removable drive" (i.e., with a "drive letter") in order to
be able to run any Windows command on that Android filesystem?

I seem to be able to run DOS commands on both these types of connections:
o USB + "removable drive" (to get a drive letter)
http://www.bild.me/bild.php?file=1853998dir02.jpg
o WiFi + "network location" + "removable drive" (to get a drive letter)
http://www.bild.me/bild.php?file=6340420dir012.jpg
o WiFi + "network location" + "net use" (to get a drive letter)
http://www.bild.me/bild.php?file=8605173dir05.jpg

Is that assumption of the intermediate "need" for a drive letter correct?
If so, here's a summary of where we stand based on that assumption...
(If not, please correct where I err.)

The "problem" is that when you connect over USB an Android 4.3+ device
(mine is a $130 64GB LG Stylo 3 Plus, running Nougat, Android 7.0) as MTP,
you can't run any Windows command on the Android file system, as evidenced
by this "dir" of APKs that had to be done after copying to Windows:
http://www.bild.me/bild.php?file=9648761dir.jpg

The best solution is to "mount" the Android filesystm as a "removable
drive" (i.e., it gets a drive letter) over USB, which I can easily do with
payware/crippleware, but which I'm trying to make into a general solution
that _everyone_ can do.
http://www.bild.me/bild.php?file=8315262dir03.jpg

*For a general solution, we need bona-fide non-crippled Windows freeware.*
o The goal is a _universal_ solution (which necessitates _freeware_);
o which enables _any Windows command_ to run on the Android filesys;
o which means (I think) it has to be "mounted" as a _removable drive_;
o (or, in other words, it has to have a "drive letter" when on USB);
o (although a Windows "network location" can also work when on WiFi);
o which both MTPDrive (over USB) & NetDrive (over WiFi) payware seem to do

Given:
o USB solutions are faster & generally simpler (no Android software)
MTPDrive: http://www.bild.me/bild.php?file=1853998dir02.jpg
Linux: http://www.bild.me/bild.php?file=6181360dir01.jpg
o WiFi solutions (which generally require a "server" running on Android).
WebDav: http://www.bild.me/bild.php?file=8605173dir05.jpg
FTP: http://www.bild.me/bild.php?file=7687244dir06.jpg

For USB:
The best solution is a freeware equivalent to the MTPDrive functionality
o LibMTP freeware may work if we can figure out how to make it work, while
https://sourceforge.net/projects/libmtp/files/libmtp-win32/
o MTPDrive crippleware works (crippled to 30 files per session), and,
http://www.mtpdrive.com/download.html
o Dual booting to Linux works (which natively uses, apparently, LibMTP).
http://www.bild.me/bild.php?file=6181360dir01.jpg

For WiFi:
If a server must be run on Android, Windows probably handles SMB best, but:
o SMB server (on Android) solutions are problematic for two reasons:
(a) No known Play/F-Droid SMB server works on TCP port 445 unrooted
(b) Port forwarding on Windows is required if a nonroot server is found.
https://play.google.com/store/apps/details?id=com.icecoldapps.sambaserver

Where these general-use servers don't require rooting or port forwarding,
& where Windows "network location" & "removable drive" features are used:
o WebDav
https://play.google.com/store/apps/details?id=com.theolivetree.webdavserver
network location: http://www.bild.me/bild.php?file=8605173dir05.jpg
o FTP
https://play.google.com/store/apps/details?id=com.theolivetree.ftpserver
http://www.bild.me/bild.php?file=7075400dir07.jpg
http://www.bild.me/bild.php?file=4731516dir011.jpg

For WiFi FTP, these are possible universal free drive-mapping solutions:
o FTPuse (freeware which I was not successful with in my recent tests)
https://www.ferrobackup.com/map-ftp-as-disk.html
FTP Server (free): http://www.bild.me/bild.php?file=3316456dir08.jpg
The Olive Tree: http://www.bild.me/bild.php?file=7355568dir09.jpg
Anonymous: http://www.bild.me/bild.php?file=4223201dir010.jpg
o DirectNet (freeware which I was successful with in my tests today)
http://www.directnet-drive.net/
http://www.bild.me/bild.php?file=4731516dir011.jpg
http://www.bild.me/bild.php?file=6340420dir012.jpg
o SFTP Net Drive (free for personal use but I was not successful today)
https://www.nsoftware.com/sftp/netdrive/ (it took a bogus name & email)
o NetDrive (trialware, untested because it's not a general solution)
http://netdrive.net/
o Web Drive (trialware, untested because it's not a general solution)
https://webdrive.com/download/

And where Linux solutions may work under some circumstances:
o Dual-boot to Linux works perfectly (which uses LibMTP natively)
https://groups.google.com/d/msg/alt.os.linux/oOfdMLmJ-oQ/jh_1DwTOBgAJ
o Termux (contains a mini Linux command environment)
https://play.google.com/store/apps/details?id=com.termux

As always, this effort is for everyone - so please improve where you can!
Ads
  #2  
Old October 20th 18, 03:37 PM posted to comp.mobile.android,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default From Windows, how can we open a command line on the Android filesystem?

Arlen Holder wrote:
[...]
I have one key question for anyone on this ng who knows Windows well, which
is whether my "assumption" is accurate that we need to "mount" the Android
filesystem as a "removable drive" (i.e., with a "drive letter") in order to
be able to run any Windows command on that Android filesystem?


You do not *need* a drive letter, because 'DOS' commands can also use
a Network Share (in contrast to a Network Drive). For example:

dir \\DISKSTATION\Frank

Where 'DISKSTATION' is my NAS.

The only limitation I'm aware of, is that you cannot 'cd' into a
Network Share, while you can 'cd' into anything which has a drive
letter:

C:\home\frankscd \\DISKSTATION\Frank
'\\DISKSTATION\Frank'
CMD does not support UNC paths as current directories.

C:\home\frankscd M:
M:\

That said, having a drive letter is a *nice* thing to have, as most of
the solutions you mention, need one anyway.

[...]

o WiFi + "network location" + "net use" (to get a drive letter)
http://www.bild.me/bild.php?file=8605173dir05.jpg


Hmmm! This seems to be a nice one! I can't remember seeing you use
'net use' by itself.

Does this setup mean you have:

- A WebDAV server - i.e. extra software - on your Android device.

- *No* *extra* software ('net use' is part of Windows) on your Windows
device.

?

If so, I think this is the best WiFi solution sofar (till you get a
(non-root) SMB server on Android to work).

I have no experience with 'weird' UNC paths such as the one you're
using ('\\192.168.1.6@8080\DavWWWRoot\'), but it would be interesting to
see if you can use such UNC paths directly in a 'DOS' command, i.e.
*without* assigning a drive letter with 'net use'.

I.e. like I can use (see above)

dir \\DISKSTATION\Frank

perhaps you can use something like

dir \\192.168.1.6@8080\DavWWWRoot

Note: Something *like* that. I'm not saying that exact syntax is
correct.

My suggestion might seem silly: Using a drive letter (X is much
cleaner than the '192.168.1.6@8080\DavWWWRoot' mess, but as you can put
this 'mess' into an environment variable, it can be made clean, i.e.

dir %Android%\Mobi_Usage_AppBackup

[...]

As always, this effort is for everyone - so please improve where you can!

  #3  
Old October 21st 18, 09:26 PM posted to comp.mobile.android,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 185
Default From Windows, how can we open a command line on the Android filesystem?

On 20 Oct 2018 14:37:20 GMT, Frank Slootweg wrote:

You do not *need* a drive letter, because 'DOS' commands can also use
a Network Share (in contrast to a Network Drive). For example:
dir \\DISKSTATION\Frank
Where 'DISKSTATION' is my NAS.


Hi Frank Slootweg,

Thanks for being purposefully helpful by answering that question about
whether the "network drive" (aka a "removable drive") versus a "network
share" (aka a "network location") is what we need to run any Windows
command on Android.

Here's my summary of which methods I've been able to do for each on Nougat:
o MTP over USB === removable drive
o WebDAV over WiFi === removable drive & network location
o FTP over WiFi === removable drive & network location

In the case of WebDAV, I can get "net use" syntax to work.
But I'm clueless about the "net use" syntax for FTP.
So the FTP "removable drive" success was with this third-party freeware.
https://groups.google.com/forum/#!topic/comp.mobile.android/JrWLPRYO-TU

The only limitation I'm aware of, is that you cannot 'cd' into a
Network Share, while you can 'cd' into anything which has a drive
letter:


This is interesting, as that means we should be able to do almost
everything, then, with a "network location" even if we can't always get the
Android filesystem to mount as a "removable drive" on Windows.


C:\home\frankscd \\DISKSTATION\Frank
'\\DISKSTATION\Frank'
CMD does not support UNC paths as current directories.
C:\home\frankscd M:
M:\


The one syntax I can't yet figure out is how to do FTP doublebackslashes.

For example, this works just fine to mount the following "network location"
net use X: \\192.168.1.6@8080\DavWWWRoot\
Where the Android WebDAV server defaults are set to:
IP = 192.168.1.6
Port = 8080
Share = DavWWWRoot (this is a hard-coded WebDAV default)

That doublebackslash syntax works _great_ with WebDAV servers on Android:
http://www.bild.me/bild.php?file=8605173dir05.jpg

But, I can't figure out the doublebackslash syntax for FTP servers!
http://www.bild.me/bild.php?file=4785408ftpshare01.jpg
http://www.bild.me/bild.php?file=8734999ftpshare02.jpg

This doubleslash syntax works just fine as a "network location"

Where the Android FTP server defaults are set to:
IP = 192.168.1.6
Port = 2221
Share = (I have no idea what the share is for the sdcard)
Login = francis
Password = francis
http://www.bild.me/bild.php?file=4785408ftpshare01.jpg

But I can't, for the life of me, figure out the doublebackslash syntax!
http://www.bild.me/bild.php?file=8734999ftpshare02.jpg
Since these syntax attempts fail every time for me:
dir :2221
net use \\192.168.1.6@2221\Root
etc.

I suspect DOS will work just fine, if we can just figure out the syntax.
Can you, or anyone, help us figure out the FTP doublebackslash syntax?

That said, having a drive letter is a *nice* thing to have, as most of
the solutions you mention, need one anyway.


The good news is that we can get a drive letter easily for Android.
o USB (setting Android to MTP + Windows MTPDrive crippleware works OK)
o WiFi (a WebDAV server on Android + native DOS "net use" works great!)

Two areas of improvement would be:
o USB (find freeware to mount Android over USB as a removable drive)
o WiFi (figure out FTP doublebackslash syntax to get "net use" to work)

o WiFi + "network location" + "net use" (to get a drive letter)
http://www.bild.me/bild.php?file=8605173dir05.jpg


Hmmm! This seems to be a nice one! I can't remember seeing you use
'net use' by itself.


Thanks Frank for realizing that the _simplest_ solution is generally the
best, where the simplest solution I can find that works for everyone is:
o WebDAV server freeware on Android + Windows "net use" syntax over WiFi

Since "DavWWWRoot" is a hard-coded keyword, this command works for all!
net use X: \\192.168.1.6@8080\DavWWWRoot\

My dilemma is that I don't see any reason why FTP syntax shouldn't work the
same as WebDAV but I just don't know enough about that doublebackslash
syntax to make FTP "net use" work.
net use X: \\192.168.1.6@2221\sdcard0\

This fails for me every time.
Does _anyone_ here know the FTP doublebackslash syntax?
Can you tell us how to mount the Android sdcard as a "removable drive"?

Does this setup mean you have:
- A WebDAV server - i.e. extra software - on your Android device.
- *No* *extra* software ('net use' is part of Windows) on your Windows
device.


Yup. Thanks for noticing the inherent beauty & genius in that solution!
As you know, I'm _always_ seeking the solutions that are sheer brilliance.

Anything _that_ simple - and yet still very powerful - is sheer brilliance!

That WebDAV solution is sheer brilliance. I hit upon it while I was
searching for FTP solutions, where I _still_ think the idea should work as
well for FTP servers as it does for WebDAV servers.

I just can't get the syntax correct yet for the FTP servers to mount
Android as a removable drive over WiFi. Can you?

If so, I think this is the best WiFi solution sofar (till you get a
(non-root) SMB server on Android to work).


What I like about you, Frank Slootweg, is that you think like I do.
o We both see the sheer brilliance of this WebDAV + "net use" solution
o It's not obvious - but - once you see it working - it's brilliant!
o I just wish I could get the syntax to work with FTP UNCs too!

I also like that you agree, a priori, that SMB _should_ work best.
o For one, SMB is the native Windows method
o But you know better than I do that SMB on Android is problematic
What's the best way to forward SMB TCP port 445 to something higher than 1024 on Windows?
https://groups.google.com/forum/#!topic/comp.mobile.android/3QQ8bAZeXNI
&
Non-root Android SMB/CIFs Samba server set to communicate on TCP ports higher than 1024
https://groups.google.com/forum/#!topic/comp.mobile.android/CZolwHVb0-c

I have no experience with 'weird' UNC paths such as the one you're
using ('\\192.168.1.6@8080\DavWWWRoot\'), but it would be interesting to
see if you can use such UNC paths directly in a 'DOS' command, i.e.
*without* assigning a drive letter with 'net use'.
I.e. like I can use (see above)
dir \\DISKSTATION\Frank
perhaps you can use something like
dir \\192.168.1.6@8080\DavWWWRoot
Note: Something *like* that. I'm not saying that exact syntax is correct.


I agree fully with the way you are thinking, Frank.
This UNC syntax should work across the board.

One of the problems I have with "UNC" syntax is figuring out how to
specifiy the root directory of Android to Windows.

When I started searching for the "net use" syntax for mounting WebDAV
servers, I found out that WebDAV has that hard-coded default keyword, named
"DavWWWRoot", which saves us the problem of having to figure out what
Windows thinks the Android top level directory is named.

My suggestion might seem silly: Using a drive letter (X is much
cleaner than the '192.168.1.6@8080\DavWWWRoot' mess, but as you can put
this 'mess' into an environment variable, it can be made clean, i.e.
dir %Android%\Mobi_Usage_AppBackup


Your suggestion is good where we need someone like Paul who has far more
knowledge in Windows than I ever will have to explain why the results below
are what they are in my tests just now:

C:\ dir \\192.168.1.7@8080\DavWWWRoot\
The network path was not found.

C:\ dir \\192.168.1.7@8080
The filename, directory name, or volume label syntax is incorrect.

C:\ dir \\192.168.1.7@8080\
The specified path is invalid.

C:\ dir \\192.168.1.7@8080\DavWWWRoot
The network path was not found.

C:\ net use X: \\192.168.1.7@8080\DavWWWRoot\
The command completed successfully.

C:\ dir X:\
Volume in drive X has no label.
Volume Serial Number is 0000-0000

Directory of X:\

10/19/2018 03:02 PM DIR .
10/19/2018 03:02 PM DIR ..
10/12/2018 08:42 PM DIR Download
10/11/2018 07:24 PM DIR Android
10/11/2018 07:24 PM DIR Music
10/11/2018 07:24 PM DIR Podcasts
10/11/2018 07:24 PM DIR Ringtones
10/11/2018 07:24 PM DIR Alarms
10/11/2018 07:24 PM DIR Notifications
10/11/2018 10:08 PM DIR Pictures
10/11/2018 07:24 PM DIR Movies
10/14/2018 07:02 AM DIR DCIM
10/18/2018 09:35 PM DIR .dwnld
10/11/2018 07:25 PM DIR LGBackup
10/19/2018 03:08 PM DIR Mobi_Usage_AppBackup
10/11/2018 10:20 PM DIR .estrongs
10/11/2018 10:20 PM DIR backups
10/11/2018 10:20 PM DIR dianxin
10/11/2018 10:21 PM 72 .userReturn
10/13/2018 11:24 AM 0 000storage-emulated-0
10/13/2018 12:12 AM DIR data0
10/13/2018 11:18 AM 1,041,153
prim-ftpd-log-2018-10-13-08-04-02.csv
10/19/2018 07:57 PM DIR .chat_temp
10/16/2018 07:28 PM DIR VoiceRecorder
3 File(s) 1,041,225 bytes
21 Dir(s) 743,829,987,328 bytes free
  #4  
Old October 22nd 18, 08:54 PM posted to comp.mobile.android,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Arlen Holder
external usenet poster
 
Posts: 185
Default From Windows, how can we open a command line on the Android filesystem?

On Sun, 21 Oct 2018 20:26:55 -0000 (UTC), Arlen Holder wrote:

What I like about you, Frank Slootweg, is that you think like I do.
o We both see the sheer brilliance of this WebDAV + "net use" solution
o It's not obvious - but - once you see it working - it's brilliant!
o I just wish I could get the syntax to work with FTP UNCs too!


I'm almost done with my experiments, where this is my tentative conclusion:
A. It's easy to mount MTP filesystems over USB as a "removable drive".
(Using MTPDrive crippleware.)
B. It's easy to connect WebDAV shares over WiFi as a "network location".
(Using native Windows.)
C: It's easy to connect WebDAV shares over WiFi as a "removable drive".
(Using native Windows - where the connection is "almost perfect".)
D. It's easy to connect FTP shares over WiFi as a "network location".
(Using native Windows - where the connection, inexplicably, is "less perfect".)
E. It's easy to mount FTP shares over WiFi as a "removable drive".
(Using DnD, ND, or, for some, FTPUse & SFTPNetDrive freeware).

Pretty much, this is the _simplest_ most _powerful_ solution I can find,
that uses (a) native Windows, or, if not, then (b) freeware, or, if not,
then (c) crippleware.

All I ask is for others to simplify the solution by (c) eliminating the
crippleware, or (b) eliminating the need for the additional freeware.

See also:
https://groups.google.com/d/msg/alt.comp.freeware/TaIlIMK2Nuw/IQQVQUkSBQAJ

I understand that what I request is not easy.
Likely 999 out of 1,000 people can't improve this solution from where I
leave it.

If anyone else _can_ move the technical ball forward, please do as the goal
is to enable _everyone_ to do what we can do with the least amount of
software possible, and always, with freeware if possible.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 05:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.