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.
For installing the app I tried uninstalling the previous one using
adb shell pm uninstall --user 0 org.telegram.messenger. The output came out as
SUCCESS and to verify the uninstallation I tried
adb uninstall --user 0 org.telegram.messenger. The output of it came as
SUCCESS as well. When I moved on to the next step to install the new APK with the command
adb install Telegram-5.7.1.apk it gave out
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!]
After further research I found out that I need to comment out the telegram package part of
/data/system/packages.xml 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
chmod 744 /data/system and the file
chmod 777 /data/system/packages.xml but with no effect since it all reverts back after the reboot.
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
/data/system/packages.xml file and stop the system from reverting it back.
Any sort of help or advice would be totally appreciable.