I'm annoyed by a simple feature lack in the stock android email application. As this application is released as open source I can fix this quite easily.
Question: How can I release this modification in such a way that me and other users can install the modified EMail application (without root access)? I tried the following:
I though about changing the package name of the application in the manifest, but it is not that simple: You also have to move all classes into the new package. Additionally, as you can see in the AndroidManifest, the application defines new permissions (com.android.email.permission.READ_ATTACHMENT
) and other things which lead to duplication errors when installing the modified package. These permissions are references as strings in the source.
Is modifining every file by hand and then debugging every error really the only solution to my problem? These modifications would also make pulling in new versions of the EMail application very difficult as I have modified and move every file.
I though about changing the package name of the application in the manifest
That will be required.
You also have to move all classes into the new package
Not necessarily. R
will be generated into the package declared in the manifest, and so you will need to arrange to import that R
class. And you will need to update the manifest itself to use fully-qualified class names instead of bare class names, if applicable.
Additionally, as you can see in the AndroidManifest, the application defines new permissions (com.android.email.permission.READ_ATTACHMENT) and other things which lead to duplication errors when installing the modified package.
It is entirely possible to define an existing permission. I have no idea where/how you are getting "duplication errors".
Is modifining every file by hand and then debugging every error really the only solution to my problem?
More or less. See the "not necessarily" paragraph above.
These modifications would also make pulling in new versions of the EMail application very difficult as I have modified and move every file.
You were the one who decided to embark on this quest, as opposed to contributing your changes to an existing open source mail app, such as K-9 Mail (which also forked the AOSP Email app, years ago), or the AOSP Email app itself (via the AOSP contribution process).
This topic may be stale, but I thought I'd share what I've done for posterity. I was able to use the above info to modify the Browser source and create my own version of the app (that can be installed in parallel to the stock app). What I did:
The last step took a few attempts, but it was just a matter of building, installing, launching, and checking LogCat for the erroneous references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With