Sorry, but I'm a bit confused now.
You have a device for which the code doesn't work, right?
And a second device that executes the updated code on program start instead of after pressing the "1" button, right?
In post #18, when you say that it doesn't download the apk file, are you talking about the first device? Are you 100% sure that it's the downloading step at failure rather than the writing after the download (httpjob vs. File.Copy2)? Did you insert a few log statements in the cl_appupdate class to clearly spot the problematic step?
As for the retarded upgrading on device #2, what I can say is that the code just send an intent to the OS, which in turn asks the user to allow the installation of the new apk and (on positive) response broadcasts the "android.intent.action.PACKAGE_REPLACED" intent whose action is to wake up any app on the device which has it in the Manifest. Reading the content of the data in this latter intent, service newinst2 (in the library) knows that it's its turn to execute (we're now on the new apk) and launches Main.
Why all that doesn't happen a few seconds after pressing the "1" button but only closing the running app and starting it again, I don't know. Maybe you can try to give the OS more time after pressing the "1" button and see if it completes the loop described above.
ps: let me know if you'd like me to prepare a special version of the lib full of logs in order to better undesrtand the probolem about device #1 or whether you prefer to do it yourself.