After some searching and looking around the filesystem it seems that there may be various ways of affecting the permissions that a midlet has.
/usr/lib/ezx/lib/libezxjaid-xscale-r.so.1.0.0 looks like it controls this access and has the following permissions specified
javax.microedition.io.Connector.http
javax.microedition.io.Connector.socket
javax.microedition.io.Connector.https
javax.microedition.io.Connector.ssl
javax.microedition.io.Connector.serversocket
javax.microedition.io.Connector.datagram
javax.microedition.io.Connector.datagramreceiver
javax.microedition.io.Connector.comm
javax.microedition.io.PushRegistry
javax.microedition.io.Connector.sms
javax.wireless.messaging.sms.send
javax.wireless.messaging.sms.receive
javax.microedition.io.Connector.cbs
javax.wireless.messaging.cbs.receive
javax.microedition.media.control.RecordControl
javax.microedition.media.control.VideoControl.getSnapshot
com.motorola.file.readaccess
com.motorola.file.writeaccess
com.motorola.phonebook.readaccess
com.motorola.phonebook.writeaccess
com.motorola.phone
javax.microedition.location.Location
javax.microedition.location.Orientation
javax.microedition.location.ProximityListener
javax.microedition.location.LandmarkStore.read
javax.microedition.location.LandmarkStore.write
javax.microedition.location.LandmarkStore.category
javax.microedition.location.LandmarkStore.management
javax.microedition.io.Connector.mms
javax.wireless.messaging.mms.send
javax.wireless.messaging.mms.receive
The untrusted domain appears to have access to all of these according to
/usr/setup/.policy/_devdomain.txt except:
javax.microedition.media.control.RecordControl
javax.microedition.media.control.VideoControl.getSnapshot
com.motorola.file.readaccess
com.motorola.file.writeaccess
com.motorola.phonebook.readaccess
com.motorola.phonebook.writeaccess
which need to be accessed from the Trusted Third Party or Manufacturer domains.
If I nfs mount 192.168.1.1:/tmp/test /usr/setup to be able to modify _devdomain.txt, it doesn't seem to make any difference what I put in there, so I'm not convinced it's used.
Alternatively, someone also mentioned that you can alter the midlet's registry.txt, so I took a midlet that uses an http connection:
# . /home/native/.profile
[snip output]
# PATH=/usr/SYSjava:$PATH
# kvm -launch 520
[snip]
{1} J2ME_JAID_APIs.cpp:2411 <J2ME_JAID_IsTrusted> It's untrusted MIDlet suite!
[snip]
# cd diska/.system/java/DownloadApps/MIDlet00520
# grep -i trust registry.txt
Is-Trusted: 0
Domain: untrusted
# cp registry.txt foo.txt;sed 's/Is-Trusted: 0/Is-Trusted: 1/' foo.txt > registry.txt
# grep -i trust registry.txt
Is-Trusted: 1
Domain: untrusted
# kvm -lanch 520
[snip]
{1} J2ME_JAID_APIs.cpp:2405 <J2ME_JAID_IsTrusted> It's trusted MIDlet suite!
[snip]
So that makes it appear to be trusted, but I'm not sure what it has achieved, I still get prompted to allow an http connection. Also, if I change the domain to Manufacturer or Trusted Third Party I get the same result.
The last thing I've read is that permfile.txt makes a difference, but I haven't seen anything to decode that yet.
So, does anyone have a definitive answer on what controls what?
Additionally, can anyone point me at some midlets that require extended permissions such as filesystem access so that I can see how they behave if I alter things? I'd also really like to see some signed midlets too, anyone got any of those?



Reply With Quote