seeing files and directories from PC - not really B4A

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I have a question concerning the visibility of files and directories on an Android device when viewing from a Windows 7 PC via a USB connection. This is not truly a B4A question, but it is related to a B4A application I am developing. I have Googled and not found a definitive answer. Rooting the device has been mentioned, but I can not ask people using this app to root their devices. Can anyone provide some insight or guidance?

I have two android devices, a Samsung Vibrant phone and a Acer A500 tablet. I can connect both to a Windows 7 PC using a USB cable, then using Explorer on the PC view files and directories on the android device.

On the Vibrant, in Explorer, I can view the /android/data directory and see approximately 9 subdirectories, for example "Google.maps" and my application file storage directory. I can then open, edit, and replace my application's 5000 line text file.

On the A500 I can view the /android/data directory but the directories below that are hidden. On the A500 tablet using Astro file manager I can see that the hidden directories do exist.

Why are they hidden? Is this standard in Android and my Vibrant is just different?

I have seen suggestions of changing the USB connection mode, but my A500 tablet does not have any USB connection mode options other than "enable debug".

Thanks for any help.
Barry.
 

canalrun

Well-Known Member
Licensed User
Longtime User
The internal applications storage is not accessible from outside (except for rooted devices).
Some devices have an additional internal storage which acts like a sdcard but cannot be removed. This storage is public.

Thanks. This makes perfect sense now.

I guess my Vibrant has that extra public storage.

I see that I can create top level directories in my A500 tablet, but I cannot save files to the top level or in the directories I create.

Without rooting, is there a standard way to transfer user modified custom files to and from a PC?

Barry.
 
Upvote 0

aklisiewicz

Active Member
Licensed User
Longtime User
Yes. Searching through the documentation and forum last night I found the B4A server source and Async Streams tutorial. Looks like that is the way to go.

Barry.

I'm researching smiilar scenario, so I can copy back and forth SQLite database file. First of all there are two scenarios which arrise: 1) running an operation on the PC 2) runing an operation on DEV
The second would probably require some kind of network communication, and as advised by Erel B4A Bridge would be a source to do the research on. On the PC side is should be a little easier (at least for me). I was thinking about connection device, mapping the DEV folder as an external drive and copying the file to lacal HD. Better yet (but not sure if this is possible) operate on a database as it is located on a local HD (after properly mapping the DEVice). This would be pretty easy to do.
while working woth some other tools and software I noticed that sometimes even if you design your App to install on a external storage it still gets installed in device internal memory. I'm not sure is it specific to device or OS version, but it is a fact (no matter what you put in the Manifest).

Please let me know if you have more information on the topic.
Thanks - Art
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Please let me know if you have more information on the topic.
Thanks - Art

For my app I would like to be able to edit a rather large text file on a desk top computer then download the file to the device to use as an information store.

Using a desktop allows the file, about 5000 lines, to be more easily edited and also more easily shared among users. It would also be nice if the desktop could be a Windows, Mac, Linux, or anything other type of computer.

Using an FTP client on the desktop to communicate with the device satisfies these conditions. That means the device must have a very small server that understands FTP. The server can be very simplistic. All it needs to do is support normal FTP protocol to make a single connection, login, upload and download a file, and possibly list the contents of the target directory.

It would be nice to have a small B4A library to include in an app which implements this. I will be investigating if the B4A bridge can be modified for a simplistic FTP server.

Barry.
 
Upvote 0

boten

Active Member
Licensed User
Longtime User
....
Some devices have an additional internal storage which acts like a sdcard but cannot be removed. This storage is public.

So perhaps this is reason that "my" File.DirRootExternal is "mnt/sdcard" (the "internal" sd card of the Galaxys);
BUT if I want to access my "real" external card (Extra-External) I need to refer to "File.DirRootExternal/external_sd"
 
Upvote 0
Top