Running MIDlet's which needs permission (phoneme_feature MR2 on ARM)
I'm running phoneme_feature on ARM. I wanted to have an automated mechanism in
which a MIDlet is invoked remotely. My MIDlet uses some network API's
(Datagrams), which makes the annoying user permissions promt appear; and thus
the automation is not possible (I have MIDlet-Permissions set to
javax.microedition.io.Connection.datagram in my JAD).
I would like to get rid of this. I could think of signing the MIDlet, but
before that, I would like to know whether there is any other mechanism of
accomplishing this without actually signing the MIDlet -- something like a
command-line parameter that's passed to the runMidlet or setting the
permissions before running my MIDlet.
If signing the MIDlet is the only option, I did give it a try as well; only to
see the annoying prompt appearing again :(. I shall list out the steps I
followed in signing my MIDlet. Please could somebody point out what went wrong
1. I created a keystore with the command:
$ keytool -genkey -alias mine -keystore my_keystore -keyalg RSA -storepass mykeystore -keypass myteam -validity 10000
(key tool is from j2se)
2. Imported the keys using MEKeyTool.jar:
$ java -jar MEKeyTool.jar -import -MEkeystore my_MEkeystore -keystore my_keystore -storepass mykeystore -alias mine
3. Added key information to my JAD:
$ java -jar /home/jeenu/tools/WTK2.5.2/bin/JadTool.jar -addcert -alias mine -storepass mykeystore -keystore my_keystore -inputjad TestMIDlet.jad -outputjad TestMIDlet.jad
$ java -jar /home/jeenu/tools/WTK2.5.2/bin/JadTool.jar -addjarsig -keystore my_keystore -alias mine -storepass mykeystore -keypass myteam -jarfile TestMIDlet.jar -inputjad TestMIDlet.jad -outputjad TestMIDlet.jad
4. Replaced midp/appdb/_main.ks with my_MEkeystore
5. Then I tried installing and running the MIDlet in midp/bin/arm/runMidlet, but
the prompt still appears!
Any help is highly appreciated.