There is a app for Linux it copies your original APK signature to the new rebuild APK but the new rebuild APK shouldn't have any signatures otherwise you will get an error - fail ! Is only my opinion.