title: Getting signature error while installing a different version of the app
body: <p>Recently I installed a custom ROM named eelo. In that Telegram app comes pre-installed thus it can be regarded as a system app. But it is a custom built with a different it lacks a lot of features and it is outdated in nature. Hence, I wanted to install the official version of the app.</p>
  
  <p>For installing the app I tried uninstalling the previous one using <code>adb shell pm uninstall --user 0 org.telegram.messenger</code>. The output came out as <code>SUCCESS</code> and to verify the uninstallation I tried <code>adb uninstall --user 0 org.telegram.messenger</code>. The output of it came as <code>SUCCESS</code> as well. When I moved on to the next step to install the <strong><em>new APK</em></strong> with the command <code>adb install Telegram-5.7.1.apk</code> it gave out </p>
  
  <pre><code>adb: failed to install Telegram-5.7.1.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package org.telegram.messenger signatures do not match the previously installed version; ignoring!]
  </code></pre>
  
  <p>After further research I found out that I need to comment out the telegram package part of <code>/data/system/packages.xml</code> file. But after editing the file and after rebooting the file reverts back to the original contents previous to the editing. I even tried to change the permission of the folder with <code>chmod 744 /data/system</code> and the file <code>packages.xml</code> with <code>chmod 777 /data/system/packages.xml</code> but with no effect since it all reverts back after the reboot. </p>
  
  <p>I would like to uninstall the Telegram app from my system completely and install a new one. And how would it be possible to edit the <code>/data/system/packages.xml</code> file and stop the system from reverting it back.</p>
  
  <p>Any sort of help or advice would be totally appreciable.</p>