can automatic update work when app is not installed from android marketplace?
This sounds like it might be better asked on stackoverflow.

The autoupdate is a feature of the market. If users haven't installed the app with the market you'll have to implement your own update feature. In Android 2.2 you could potentially take advantage of the push notification system for updates.