Skip to main content

Accessing Persistent Memory on Profile 1.0 BD player

5 replies [Last post]
mico88
Offline
Joined: 2008-01-24
Points: 0

Hi,

I am trying to read/write file to Persistent Memory of BD player (ADA). It is working well for me on a PC based players and on PS3. But testing on Panasonic DMP-BD10A the player throw SecurityException when I test file by myfile.exists().
Do anybody have any idea what can be wrong? Should accessing persistent memory on profile 1.0 players works? The application is signed by HDCookbook security tools and it looks this works as beside this I am direct reading files from disc etc.

Thanks for help.
~mirek

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mico88
Offline
Joined: 2008-01-24
Points: 0

I have found the problem. I left the
tag in the *.perm file from the hdcookbook samples... it is working now. Interesting is that PS3 and sw players ignored this.

thanks
~mirek

thunderdog
Offline
Joined: 2010-09-13
Points: 0

Hi mirek,
i am facing a similar problem... can u paste the content of your permission file here?

tsui
Offline
Joined: 2008-02-05
Points: 0

Hi Mirek,

I still keep on getting a
[code]
java.io.FileNotFoundException
[/code]
exception when trying to write to ADA.

I tried with the following implementations:
[code]
BufferedWriter->FileWriter
OutputStreamWriter->DataOutputStream->FileOutputStream
BufferedWriter->OutputStreamWriter->FileOutputStream
[/code]
to name a few.

My directory looks like this:
[code]
String s = System.getProperty("dvb.persistent.root");
String s1 = (String)myContext.getXletProperty("dvb.org.id");
String s2 = (String)myContext.getXletProperty("dvb.app.id");
String s3 = s + File.separator + s1 + File.separator + s2 + File.separator
[/code]

Everytime I do
[code]fos = new FileOutputStream(directory + filename); or
File f = new File(directory, filename); or
fw = new FileWriter(directory + filename); [/code]
I get the java.io.FileNotFoundException.

At first I have had the Security Exception, because of the same reason as mentioned above. With the added FileCredential everything was fine - but then I got the java.io.FileNotFoundException.

Bear in mind: All methods performed safely on Software Players and PS3. Only standalone-players (eg. Sony+Phlips) have that problem.
The method described in HDCookBook doesn't work for me neither.

When i put out the directory and filename variables and compare them to system.propertys everything looks fine.

Any suggestions?
Mirek, how are you accessing PS?
Maybe the file is write protected - but PRF FileCredential says write="true" - is there somewhere else, where I need to add that option, too?

Thanks a lot for your help!

Jochen

Message was edited by: tsui

Message was edited by: tsui

mico88
Offline
Joined: 2008-01-24
Points: 0

Hi Joachen,
I have no idea what can be your problem. Sorry. Just some notes about how I use to access PS.
I am constructing:
File f = new File(directory, filename);
where directory string is without last File.separator in my case. Trying f.exists() I got SecurityException in case I had “wrong” permission file. For accessing PS (ADA) should be enough only tag there.
Then:
If(!f.exists()) f.createNewFile();
BufferedWriter bw = new BufferedWriter(new FileWriter(f));
bw.write(“some string”);
bw.close();

And for reading:
If(f.exists()) {
BufferedReader br = new BufferedReader(new FileReader(f));
String s = br.readln();
br.close();
}
These work for me.
Regards
~mirek

tsui
Offline
Joined: 2008-02-05
Points: 0

Hi Mirek,

thanks for your answer. Since your way didn't work for me either, I will extract my file operations from the whole project and build a small filewriting xlet to test all different methods of writing on all players I have access to. Maybe the problem lies somewhere else (e.g.the signing process).

I'll keep you updated.

Jochen