Skip to main content

Running MIDlet's which needs permission (phoneme_feature MR2 on ARM)

1 reply [Last post]
Joined: 2008-04-30
Points: 0


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 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
with these?

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.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-09-22
Points: 0

To use signed MIDlet inside phoneME MR2 , you will have to compile phoneME with support for restricted crypto library (USE_RESTRICTED_CRYPTO=true). Restricted crypto is not bundled in MR2 release drop, but you can download it from svn repository.

And if you don't want to go for application signing for your specific requirement, then you can hack into AMS of phoneME. What you can do is set default domain for any installed midlet to [b]trusted[/b] (check ) . So once your MIDlet is installed as trusted , you will not prompted for any permission. But this practice is not for production environment as you will be bypassing complete security mechanism. So use at your own risk.

Hope this helps.