Recovering Deleted Android System Apps
I was looking to upgrade my rooted Android from 4.4.2 to 4.4.3 when I ran into an interesting error:
"/system/app/BrowserProviderProxy.apk" has unexpected contents
That made sense -- I needed to do some dev work with the old version of the Browser app, so I backed up those files and installed Browser.apk. So I popped into adb shell to restore the files. Without thinking, I deleted the files. Oops!
Well, everything can be recovered, right? I searched google for "BrowserProviderProxy.apk download" and found a few dead links, or apks for previous versions, but nothing that would help me. I even got into #android on freenode, and nobody had 4.4.2 installed that would know how to get the file.
So what was I to do? Well it turns out, you can download all the Android factory images from google at https://developers.google.com/android/nexus/images. So I just downloaded on my linux box, extracted the images and mounted them on my computer. From there I could just pull the apks from the system/app directory and put them on my phone using adb. This amounts to the following script:
After I did this, the update applied just fine!