title: classes.dex generated by smali not working in .apk
body: <p>I tried to generate a .apk from a classes.dex generated by samli. But I get these erros:</p>
  
  <p><strong>Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]</strong> (when I try to install the .apk on the emulator)</p>
  
  <p><strong>Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]</strong> (when I try to install the .apk on my phone).</p>
  
  <p>Here are the steps what I have done:</p>
  
  <ol>
  <li>Extraced classes.dex from an existing .apk</li>
  <li>./baksmali classes.dex</li>
  <li>./smali out</li>
  <li>mv out.dex classes.dex</li>
  <li>Extracted the whole .apk content in a folder and replaced classes.dex which the new one</li>
  <li>Generated a .zip-file and renamed it to *.apk</li>
  <li>signed the app: jarsigner -verbose -keystore my-release-key.keystore MyFieldTest.apk mykey</li>
  </ol>
  
  <p>Here is the beginning of the manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:sharedUserId="android.uid.phone"
              package="com.htc.fieldtest"
              android:versionCode="1"
              android:versionName="1.0" &gt;
  
  &lt;application android:label="Field Test"&gt;
      &lt;activity android:label="@string/app_name" 
                android:name="FieldTestActivity" 
                android:process="com.android.phone" 
                android:launchMode="singleInstance"&gt;
  </code></pre>
  
  <p>I know that the app was first signed by a HTC devloper and now by me. But is there as possibility to fix the problem?</p>
  
  <p>Thanks!
  Felix</p>