I modified "AttachmentInfo.java" and "AttachmentUtilities.java" from
android 4.4 source code, then I rebuild the "Email.apk" application.
The problem is that after all those source code modifications, the 5MB attachment restriction it is still there.
What other files need to be modified?
I did not want to decompile someone elses Email.apk because I wanted to be sure that it is malware clean (after all, I give it access to my email accounts), so I downloaded Android 4.4 source code (yes, 14GB of data downloaded only to compile my email app!)
So, the steps until today:
- Install all required software packages in my Debian linux partition to compile the WHOLE Android OS
- Download Android 4.4 source code (it has the Email app too in it)
- Modify Email app source code and make a lot of tests to see if the problem was solved
- Compile Email app and test the apk in my phone (it compiles and runs succesfull on my device)
- Still no success bypassing the 5MB limit...!!!
There are many places in Email source code wich refers to the message size limit, but I could not find the magic place wich is actually triggered.
The search continue...
I attached both source codes:
- original Email source code from Google
- the above source code, but with my modification (unsuccesful. the file limit is still NOT BYPASSED).
I modified the following files mainly: AttachmentInfo.java, AttachmentUtilities.java and VendorPolicyLoader.java