update EF under ADF in USIM in java card - applet

I am working on applet and I want to update a FIle (a LOCI file for example : 0x6f7e ) under USIM using SIM/UICC applet.
The first question is: can I read/update EF under the ADF using SIM JAVA API (using STK applet) ?
According to my reads (the 3GPP TS 43.019) The obvious answer is no, i am wrong did i miss somtehing that can let me read/update a file under the ADF using SIM applet ?
So i started working on UICC applet (release 6) based on the (ETSI TS 102 241) and the stepping stone (link here) the ADF can be a readed/updated only by getting the ADF reference (getTheFileView) using the AID. but for an unknown reason I am having and UICC exception (0003 : SECURITY_STATUS_NOT_SATISFIED ) in the update command (the selection goes well). The Applet is installed with full access and Admin Full access also (using GEMALTO tools).
you can find here the code that i am using (in the applet init):
AID adf_aid = new AID (uicc_aid, (short) 0x00, (byte) uicc_aid.length);
ADFView = UICCSystem.getTheFileView( adf_aid,
JCSystem.CLEAR_ON_RESET);
on this part i also use the AID as buffer without creation of the AID object.
update on the STK menu access
ADFView.select(FID_EF_LOCI);
ADFView.updateBinary((short) 0, eraseLoci, (short) 0,
(short) eraseLoci.length);
I tried almost everything that I thought about :
select the MF before selection of the AFD.
select directly the 7FFF
and i still having same exception, can you please tell what should i check ? must I change the code, use another release (Jar file) ? use a specific install parameter ? is there any other solution to update the files under the ADF ?
i checked the AID value and its same put in the first record of the EF_DIR (2F00).
Thanks in advance.

you might wanna try simalliance cat loader instead. it has privilege modification for FileView and AdminFileView.

Related

ImageReader Access violation with release config in gdcm

I want to use the x64 gdcm library in my c++ app and it works in debug builds, But when i make a build with release configuration then i have :
Access violation reading location 0x0000000000000008.
When calling getDataSet() function :
gdcm::File &file = reader.GetFile();
gdcm::DataSet dataset = file.GetDataSet();
Can anyone help me to i fix this problem?
Thanks
If everything is ok with your file object (and its reference), then
the right way to call GetDataSet method seems to be:
const gdcm::DataSet &ds = file.GetDataSet();
So you get the reference to the internals and don't try to copy them; at least this is how it works in my code.

FlexUnitApplication.html and FlexUnitApplication.swf not generated

Context
I have
a project Flex-Java in Eclipse Indigo service Release 2, (a web application)
and i use the plugin Flash-builder to work on it.
I use sdk 4.5.1
What i try to do
1) I try to make a simple test case with FlexUnit4. When i create a new Test Case) : New > Test Case Class, Eclipse by Default create :
package flexUnitTests + with my new Test case : (for example :
TestDoc.as)
package byDefault with one file : FlexUnitCompilerApplication.mxml
a html a swf file for FlexUnitCompilerApplication is auto-generated in bin-debug folder.
Till this point all seems to be good, so I try to execute the unit test :
2) I want to execute the unit test :
A FlexUnitApplication.mxml is created in the default package
The problem :
The compilator doesn't generate the files : FlexUnitApplication.hmtl and FlexUnitApplication.swf in bin-debug folder...
And there is an error written in the "error screen" :
description Impossible to resolve all the ressources "FlexUnitTestRunner"
place or Localisation : Unknown
sorry i try to translate the description from a French version
Other informations
I succeeded doing this in other projects... the FlexUnitApplication files are auto-generated.
Question(s)
It seems that, it is bound with something in this particular project. Maybe something is hindering the process to autogenerate these files ?? I cannot figure it out why??
Is it Possible to force the compilator doing these files (html and swf) ??
I am really lost.. and i tried things, i looked in the properties, in the metadata's ... i really don't understand.
Somebody maybe has an idea for that, what could i do, what could i check ?
Thank you in advance
I always have troubles with unit tests in eclips+FB plugin as well.
After the FlexUnitApplication.mxml is created goto your project settings and update the following:
remove the dynamic {locale} compiler flag and add a specific '-locale=en_US' only.
if you have custom locale files add those to the source path manually
in the library path find the entry that points to the dynamic locale library '..sdk/../{locale} and copy the path. click on add SWC to library path. Paste the copied path and replace '{locale}' with 'en_US'
Generally this turns out favorable for me.

Why would LayoutObjectNames return an empty string in FileMaker 14?

I'm seeing some very strange behavior with FileMaker 14. I'm using LayoutObjectNames for some required functionality. On the development system it's working fine. It returns the list of named objects on the layout.
I close the file, zip it up and send it to the client, and that required functionality isn't working. He sends the file back and I open it and get a data viewer up. The function returns nothing. I go into layout mode and confirm that there are named objects on the layout.
The first time this happened and I tried recovering the file. In the recovered file it worked, so I assumed some corruption had happened on his end. I told him to trash the file I had given him and work with a new version I supplied. The problem came up again.
This morning he sent me the oldest version that the problem manifested in. I confirmed the problem, tried recovering it again, but this time it didn't fix the problem.
I'm at a loss. It works in the version I send him, doesn't on his system. We're both using FileMaker 14, although I'm using Advanced. My next step will be to work from a served file instead of a local one, but I have never seen this type of behavior in FileMaker. Has anyone seen anything similar? Any ideas on a fix? I'm almost ready to just scrap the file and build it again from scratch since we're not too far into the project.
Thanks, Chuck
There is a known issue with the Get (FileName) function when the file name contains dots (other that the one before the extension). I will amend my answer later with more details and a possible solution (I have to look it up).
Here's a quote from 2008:
This is a known issue. It affects not only the ValueListItems()
function, but any function that requires the file name. The solution
is to include the file extension explicitly in the file name. This
works even if you use Get (FileName) to return the file name
dynamically:
ValueListItems ( Get ( FileName ) & ".fp7" ; "MyValueList" )
Of course, this is not required if you take care not to use period
when naming your files.
http://fmforums.com/forums/topic/60368-fm-bug-with-valuelistitems-function/?do=findComment&comment=285448
Apparently the issue is still with us - I wonder if the solution is still the same (I cannot test this at the moment).

Data.c file generation

i'm very new to matlab, i'm working on a software which needs the following files as input model.c,model.h,model_data.c for a particular simulink model. I have a model for which i can't generate model_data file using RTW, i have tried to get some information on the files generated by RTW, but i didnt get sufficient info. If there anybody who knows about the RTW please let me know the blocks which are required to generate model_data.c
thank you
model_data.c is a conditionally created file (i.e. it is only created if it is needed, which depends on the way the model is set up for code generation).
For a discussion of the Simulink Coder build process, and what files get generated when, search the doc for the section titled "Files and Folders Created by Build Process".
For others who need help in future.
Open the Configuration Parameters pane. Go to Code Generation -> Optimization and make sure that Default parameter behavior is set to Tunable.

How could I embedded socket in Lua internally, just like oslib, debuglib?

I want to implement the function like embedding the socket function in my Lua build.
So I don't need to copy socket.core.dll any more (just for fun).
I search the maillist, and see some guys discuss the topic,
http://lua-users.org/lists/lua-l/2005-10/msg00269.html
But I have question for the details steps, who could give me a detailed steps for changing the lua and luasocket code to make them work together (not with dll method).
I tried these steps in windows xp with VC2008:
1) copy luasocket code to Lua project.
2) add some code
static const luaL_Reg lualibs[] = {
{"", luaopen_base},
{LUA_LOADLIBNAME, luaopen_package},
{LUA_TABLIBNAME, luaopen_table},
{LUA_IOLIBNAME, luaopen_io},
{LUA_OSLIBNAME, luaopen_os},
{LUA_STRLIBNAME, luaopen_string},
{LUA_MATHLIBNAME, luaopen_math},
{LUA_DBLIBNAME, luaopen_debug},
{LUA_SOCKETLIBNAME, luaopen_socket_core}, // add this line
{LUA_MIMELIBNAME, luaopen_socket_core}, // add this line
{NULL, NULL}
};
3) build the project, and run it.
When I type print(socket._VERSION), it shows luasocket 2.0.2, it is correct.
When I type print(socket.dns.toip("localhost")), it shows 127.0.0.1 table: 00480AD0, it is correct too.
But when I try to use other features, for example bind, it can't work.
Who could tell me the reason?
you need put luasocket stuff into the package.preload table, in this way:
lua_getfield(L, LUA_GLOBALSINDEX, "package");
lua_getfield(L, -1, "preload");
lua_pushcfunction(L, luaopen_socket_core);
lua_setfield(L, -2, "socket.core");
// add mime.core yourself...
luasocket is a mixed C/lua module, you need to bundle both versions into your application if you want it to work without any extra files.
socket.lua loads socket.core (from socket/core.dll)
mime.lua loads mime.core (from mime/core.dll)
So in order for your application to work you will need to build all the .dll files and the .lua files into your application and manually load them (or set them up to be loaded correctly via custom package loaders).
The email you quoted is tweaking the package.preload table (in a way that appears a tad odd now but might work anyway) to get the built-in C code to be loaded correctly when require is called.
Try running
for k, v in pairs(socket) do print(k, v) end
and maybe we'll be able to help.