From the title it's weird that i've removed a system app and it's data folder from system and data locations by using this batch :

abd root 
adb remount 
adb shell rm -r /system/app/apkfolder
adb shell rm -r /system/app/apkfolder
adb shell rm -r /data/data/apk.package.name
adb shell rm -r /data/data/apk.package.name

I executed the last command twice to make sure that the folder was deleted entirely, and yes the shell reply was :

C:\Users\User>adb root

C:\Users\User>adb remount
remount succeeded

C:\Users\User>adb shell rm -r /system/app/apkfolder

C:\Users\User>adb shell rm -r /system/app/apkfolder
rm: /system/app/apkfolder: No such file or directory

C:\Users\User>adb shell rm -r /data/data/apk.package.name

C:\Users\User>adb shell rm -r /data/data/apk.package.name
rm: /data/data/apk.package.name: No such file or directory

Now I've tried to install an older version of the APK V1.0 build 1 (the removed version was 2.0 build 2) by using :

adb install -r apkfile.apk

And this is the response:

C:\Users\User\Desktop>adb install -r apkfile.apk
adb: failed to install apkfile.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

Now, I've copied the file to priv-app using :

adb push apkfile.apk /system/priv-app
adb shell chmod 644 /system/priv-app/apkfile.apk

And this is the response (tried this before with /system/app folder and got the same result) :

C:\Users\User\Desktop>adb push apkfile.apk /system/priv-app
apkfile.apk: 1 file pushed. 10.0 MB/s (1000000 bytes in 0.500s)

C:\Users\User\Desktop>adb shell chmod 644 /system/priv-app/apkfile.apk

And even launching the main activity by calling its launchable activity is not possible:

adb shell am start -n apk.package.name/apk.package.name.MainActivity


  • The device SoC is an MTK

  • The device has an engineer build.

  • Every reboot its weird that the original APK is restored to the system/app folder and is working!!!!

Any workaround / advice will be appreciated, thanks

  • Removing the APK file doesn't remove its entry from the database of installed packages, so the package installer thinks it's still installed. What you are doing is not how to uninstall an app. – Dan Hulme Feb 15 '18 at 14:15
  • So, how to deal with this situation? – M. Abdelhafid Feb 15 '18 at 14:19
  • Since every reboot the app gets re-installed, why not look inside /vendor (/system/vendor) and see if there's presence of the app in question there? If true, get rid of it so it won't come back after a reboot, then do what you are already doing, and finally issue a reboot so the package list can be updated properly. – Andy Yan Feb 15 '18 at 16:20
  • @AndyYan : Thanks, but unfortunately it's not found neither /system/vendor/app or /system/vendor/priv-app and also not in /system/vendor/operator/app ! other locations to check ? – M. Abdelhafid Feb 15 '18 at 16:27
  • Not sure, but you can always use a root-enabled file explorer to search inside /system. – Andy Yan Feb 16 '18 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.