EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how do i read storage files

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#22839
Posted: 12/17/2012 07:14:24
by swapna nyathani (Basic support level)
Joined: 11/29/2012
Posts: 8

Hi

I am using solfs application edition with android 4.2.
Am able to add files to storage. but how do i access them i mean read them.....

I tried to access through adb shell, tried in filesystem view in DDMS perspective (eclipse),
and also tried to access sdcard (emulator) .
But could not access it.

please help.

Thanks in Advance.

regards,
Swapna
#22840
Posted: 12/17/2012 07:19:25
by Eugene Mayevski (EldoS Corp.)

SolFS works with a huge container files, to which your files (the ones you add to container) are placed.

You can copy the storage file to desktop and use SolFS API in desktop application to read it. Locally you can use SolFS API to read files.

Other applications won't be able to access files in your container unless they also use SolFS API.


Sincerely yours
Eugene Mayevski
#22841
Posted: 12/17/2012 07:19:47
by Alexander Plas (EldoS Corp.)

Hell

Have you created the SolFS storage file on the Android device? If so, you should use same methods as you have used to add files into the storage.
#22851
Posted: 12/17/2012 23:32:31
by swapna nyathani (Basic support level)
Joined: 11/29/2012
Posts: 8

I created storage file in virtual android device,ie Emulator..
now, I understand that applications other than solfs, cannot read or list the storage file.

i dint get what is "Hell" ....when Plas says,

Anyhow,
Thanks Mayevski and Plas for your replies ...
#22854
Posted: 12/18/2012 04:50:28
by Alexander Plas (EldoS Corp.)

Hello

I kindly apologize, the Hell word was just mistyped Hello word.

The SolFS library give you access to the storage file, and ability to work with internal files inside the storage. As soon as other application is built with SolFS library and can access to the storage file it can open it and work with internal files. If your storage file is password protected, another application must know the password as well.

As far as I know, android applications can store the data in two places. Data can be stored in one of the subdirectories of application's directory where the system installs APK file. This directory is protected by system and other applications cannot access the data. Another place where the application can store the data is SD card or internal flash memory of the device. In this case any other application can access the storage file and you have to password protect it.
#22946
Posted: 12/20/2012 04:19:07
by swapna nyathani (Basic support level)
Joined: 11/29/2012
Posts: 8

Thanks for your reply Plas,
But i have set of questions regarding Android deployment and .st file opening.

In Deployment for Android documentation i see this line,
"You need to include eldos.solfs.jar and libjnisolfs.so as part of your application. Next, deploy libjnisolfs.so together with your application files to the device. "
a. I have included eldos.solfs.jar and libjnisolfs.so as part of mu application.
b. Exported my application to app.apk
Now How do i deploy libjnisolfs.so together with my application.
deploy means, do i need to put libjnisolfs.so file in some path of android memory where i install this app.apk?
If so where do i put this file...
Also i see SolFSExplorer.exe in my installation, how to use this in android.


Also,
I tried to install app.apk file in real device (samsung galaxy tab).
In this app,
1. i created a storage - This is fine- .st file is created in device.
2. downloaded a pdf file from url and write the file to storage file - fine.
Now at step 2, i have a question , how can i open this storage file and access files inside it. I could'nt open this file. so I moved to step 3.
3. tried to read this file and write to another location of sdcard where i can open it and check.
Here am able to write back this file, but i could not open it ...(device complains it is a corrupted file).

Please help.


Regards,
Swapna
#22947
Posted: 12/20/2012 10:18:04
by Alexander Plas (EldoS Corp.)

Hello

In order to deploy SolFS with your Android app you have to put .so file into lib directory inside your APK file. Then before using SolFS in your Java code you have to call System.loadLibrary("libjnisolfs");

SolFSExplorer.exe is a windows only GUI tool for working with SolFS storages, you cannot use it on Android.

To answer your next questions I need to see your source code. Post it here or open please new HelpDesk ticket.
#22952
Posted: 12/21/2012 07:17:19
by swapna nyathani (Basic support level)
Joined: 11/29/2012
Posts: 8

Thanks, for your reply Plas,

I dint load the library yet,
System.loadLibrary("libjnisolfs");

I have to use NDK (native) build to load this jni library.
So am working on it. I Hope this works......

Regards,
swapna
#23084
Posted: 01/09/2013 03:08:10
by swapna nyathani (Basic support level)
Joined: 11/29/2012
Posts: 8

Hi,

Am trying to read a (.jpg) image file from storage and display it in emulator.
i see this error:

"java.lang.OutOfMemoryError
at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:201)"


this is my code.


"
byte[] actual_bytes = null;
ByteArrayOutputStream out = new ByteArrayOutputStream();

while((actual_bytes = solstream.read(count))!=null)
{
out.write(actual_bytes,0,actual_bytes.length); //copy streams
}
byte[] final_ba = out.toByteArray();
bitmap = BitmapFactory.decodeByteArray(final_ba,0,final_ba.length);
imageview = (ImageView) findViewById(R.id.rtimageView);
imageview.setImageBitmap(bitmap);
"



How do i read this image file from storage or what is the right way.
i dint set any password for storage nor any encryption i used.


Thanks in advance.

Regards,
Swapna.
#23128
Posted: 01/10/2013 10:17:59
by Alexander Plas (EldoS Corp.)

Hello

Seems like there is an error in our Java class, so the question is moved to HelpDesk
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 6600 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!