How to add system permission file/system library to Android
<p>I am attempting to follow Diane Hackborn's <a href="http://groups.google.com/group/android-porting/browse_thread/thread/4559c6864fc5fb80?hl=en" rel="nofollow">request</a>:</p>

<blockquote>
  <p><em>For a permission that allows an application to be root, it is okay to
  add the permission to the framework
  &lt;...>. However, there still must be
  some kind of shared library (even if
  it is a stub) for the application to
  request along with it, and the package
  manager should not allow the
  application get this permission unless
  they also request the shared library.</em></p>
</blockquote>

<p>So I used the sdk's sample example of TicTacToe:</p>

<ol>
<li>exported com.example.android.tictactoe.library to a /data/app/TTTLib.jar</li>
<li><p>added /system/etc/permissions/com.example.android.tictactoe.library.xml with lines:</p>

<p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;permissions&gt;
    &lt;library name="com.example.android.tictactoe.library"
            file="/data/app/TTTLib.jar" /&gt;
&lt;/permissions&gt;</code></p></li>
<li><p>And compile com.example.android.tictactoe.MainActivity by adding a class folder pointing to the library but not adding the library itself to the .apk</p></li>
</ol>

<p>It compiles, installs, starts running, but at the point when a library class were called crashes with error msg:</p>

<pre><code>W/dalvikvm(  464): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime(  464): FATAL EXCEPTION: main
E/AndroidRuntime(  464): java.lang.NoClassDefFoundError: com.example.android.tictactoe.library.GameActivity
E/AndroidRuntime(  464):    at com.example.android.tictactoe.MainActivity.startGame(MainActivity.java:51)
E/A
</code></pre>

<p>What do I miss? Thanks for your help.</p>
