Downloading ZIP files via stock Email app... trying to fix... PLEASE HELP! - Nexus 7 (2013) Q&A

Dear All,
I recently discovered the atrocious 'security feature' Google is forcing upon it's Nexus users that disallows any downloading of certain compressed file types if they are sent to you via Email.
For those that don't know... send yourself a ZIP file (for instance) as an email attachment and your Nexus device will NOT let you download it once you receive the email within either the 'Email' or 'Gmail' app (other third party apps work fine).
I have searched high and low for a solution to this issue but it seems a fix hasn't been implemented even by the CyanogenMod community.
The closest I came to a fix is the following:
http://forum.xda-developers.com/galaxy-nexus/help/opeing-zip-files-email-t1377475/page3
I have tried the solution suggested in the above thread which involves decompiling Email.apk, modifying some code, recompiling and implementing the new apk but I am now struggling.
I have decompliled the systems email.apk using apk tool... found the correct lines of code for my version of android ( http://grepcode.com/file/repository...Utilities.0UNACCEPTABLE_ATTACHMENT_EXTENSIONS ) and modified the file in question accordingly.
It is here where it all goes wrong... I cannot for the life of me figure what I am doing wrong when trying to implement the new Email.apk.
I copy it into system/apps using root explorer and reboot (after removing the old apk)... nothing. Email app has in fact disappeared.
Could anyone shed some light on this please?
I know there are work arounds such as using webmail but that's no good to me... I am extremely surprised that even at this stage of Android development we still have this kind of restriction so would appreciate all thoughts on how to get this going.
Maybe someone out there has some more information about the issue that I haven't been able to find?
PLEASE HELP!

UPDATE:
Managed to get my modified email.apk loaded but the amendments have not been successful.
Does anyone know any other parts of the source code I should be looking at?

bump

Audio Oblivion said:
bump
Click to expand...
Click to collapse
Can't help you with the source code just wanted to say that I am able to download zip files with the newest version of the Gmail app (v 4.9) just fine. Sent a zip to my yahoo account and tried to use the Email app and keep getting "Couldn't download. Touch to retry." I thought they had fixed both but apparently not.

Related

2.2 FroYo and Gmail

I side loaded 2.2 onto my phone and it works wonderfully but, now when I try to email a photo it just continuously says sending and never actually sends it. Has anyone had this problem or can anyone point me in the direction of the correct corrective action.
Just tested going to Gallary, select a photo, then share, then Gmail and it was sent and delivered. Seems to work ok for me.
What method did you try?
-JD
ps. I am have build 3.16.32.15-g7507bb0 (Offical 2.2 with rmk-inc_froyo_fixes_v4 patch).
did you run the rmk froyo fixes v4 patch?
zerf said:
did you run the rmk froyo fixes v4 patch?
Click to expand...
Click to collapse
He has 1 post so obviously not...how many people come here asking for help in the dev when it needs to be in general when the fix is usually already out there?
I'd say roughly 90%...
Apply the [PATCH]2.2 fixes deal. It'll work.
Sorry for posting this in the wrong place and being part of the 90%! (Honestly77)
Could someone who would like to help direct me to the correct location for the fix.
I found the thread and DL the file but it says "Apply the zip via CWM as usual (can be re-run anytime, such as for updates)." what does "CWM as usual" mean?
CWM is clockwork recovery. Boot into recovery and apply zip from SD card.
Sent from my ADR6300 using XDA App
Do I need to rename it update when I put it on the SD card?
Nice!,thank you for the help with the terminology, I installed it and it is working like normal now. my gmail works again, thank you.
Does anybody know how I can get Gmail to show me my inbox with it's list of emails (old and new) instead of directly showing me the newest email (opened) when I tap on Gmail??
any help with the question above??
I think I figured it out. If you do not want Gmail to open up the new email directly when you tap on the Gmail icon.. do not exit Gmail using the back key.. Instead use the home button to exit Gmail.. that way next time when you open it.. it'll go to your inbox list instead of an opened/new email.
Thanks for the response but has nothing to do with my problem.
Sent from my ADR6300 using XDA App
I've had a similar issue with another app that seemingly took for ever to pass something thru the internet... just like the issue with send that you are having.. Uninstalling and reinstalling the particular app seemed to fix the problem for me.

[Q] NEED HELP installing apks onto rooted slide???

Hey I'm currently running the CyanogenMod-6.0.0-Slide-RC1 on my mytouch slide and was making attempts trying to install some stock apk files. From another thread (which I shall not mention just so the thread stays open) I was able to download the stock apk/odex files for the faves and friends widgets and the mt3gs swype (in my opinion the best working/looking version of swype out there that I've tried at least...).
The apk/odex files are saved onto my sdcard, in my downloads folder. I'm not sure if I'd actually need to rewrite some code or something to get the stock stuff to run on CM6. Any light anyone could shed on the subject for me would be GREATLY appreciated!
First, most of the HTC widgets will only run on a rom with sense, which CM6 is not. Second, I don't believe CM6 is an odexed rom (I haven't used it, so someone correct me if i'm wrong), so you can not use the apk/odex files from the stock build. Third, this post would be for Q&A not development.
falken98 said:
...Third, this post would be for Q&A not development.
Click to expand...
Click to collapse
Okay, well as you can tell, I'm obviously a noob when it comes to programming as well as this forum..so thanks for the heads up.
And thanks for the info about HTC widgets only running on sense, that really helped out a bunch.
If you want to add or remove system apps try this:
1 Get 7zip
2 open CM6 with 7zip
3 Navigate to /system/app folder with 7zip
4 Add or remove apk's you want,thats it you are done
Odex files are not required for 90% of apps in CM6
Hope this helps,i have made a barebones(minimal) rom-its posted on here,all you need to do is add your own apk's to it.Or just make your own rom,but adding google apps to a rom requires adding few more files to /lib and /xlib folders,if you new to android try my barebones rom it will save you few headaches adding google apps.
Hey
dustinkh said:
Hey I'm currently running the CyanogenMod-6.0.0-Slide-RC1 on my mytouch slide and was making attempts trying to install some stock apk files. From another thread (which I shall not mention just so the thread stays open) I was able to download the stock apk/odex files for the faves and friends widgets and the mt3gs swype (in my opinion the best working/looking version of swype out there that I've tried at least...).
The apk/odex files are saved onto my sdcard, in my downloads folder. I'm not sure if I'd actually need to rewrite some code or something to get the stock stuff to run on CM6. Any light anyone could shed on the subject for me would be GREATLY appreciated!
Click to expand...
Click to collapse
Could you point me in the right direction for the stock swype apk?
Thanks lviv, i'll try that and i'll let you know if it works, thanks!
And panda, I found the yhread somewhere in this development area..i'll look for it again and post a link?
On second thought, maybe i'll just pm it to you.
Sent from my T-Mobile myTouch 3G Slide using XDA App
BLEH.
I had trouble running the command line .zip version of 7-zip. I've extracted the files from the zip and try to run the program but it open and closes right back up. I've tried reinstalling and what not but it still doesn't work...I'm running Vista 32 bit if that helps at all.
Thanks again!
Oh, and here's the link to the stock stuff for the MT3GS, enjoy! (I do not take credit for any of the work put into the linked thread, I'm just passing along some great stuff!!!)
http://forum.xda-developers.com/showthread.php?t=729529&highlight=stock+apk
EDIT: I'm dumb and figured out how to use the 7-zip program. Super stoked...I hope my mods work.
Bleh, I tried putting the stock myfaves, friends, and skype .apk and .odex files into the apps folder and made my own custom rom...installed everything fine and then I looked through my apps and widgets to see if I could use it aaaaaand. They're nowhere to be found. Great. =/
So again i'm stuck without the slightest idea what to do next. Thanks in advance for the help!

[Q] Exchange Security Policy Post OTA

EDIT: Use the app from KShatzkes' post #24.
I installed the the OTA update, and like many 2.2 phones now, if you use the Email app to connect to exchange, you have to enter an annoying password just to unlock your phone, every time it locks. It's annoying and time consuming because you cannot use the pattern unlock --- you must choose an alphanumeric code at least four digits long.
There are email.apk files that bypass this, but since we cannot replace our email.apk permanently, that probably won't work for us.
The phone did not do this before the OTA, but now it does. Also, you can disable it via the databases in 2.1 (or use lockpicker), but these solutions seem to be broken in 2.2.
Any ideas?
Yes! This is bothering the heck out of me too! Hopefully some solution arises soon!
EDIT: I am guessing that the only option we have is to do something like Paul's Goggles Removal app. If we remove the Email that way, we can then install the other .apk just fine.
I emailed my company's IT department today about this, and got an interesting response:
[Me],
Activesync is set up for a production environment, since it sync's with your handheld which then contains [Company Name] material.
While not all handheld manufactures are have all come to the same level of programming, we've allowed underdeveloped handhelds containing a degree of activesync client to communicate with our servers, with the priority on greater protection. This is why the update of your device is now asking your for a 4 digit pin. The update to your device now has a full activesync client. This is by design.
We apologize for any inconvenience this may cause you.
Thanks
-[Technician]
Click to expand...
Click to collapse
So apparently, we got the "full" version of activesync. Sucks. I never before wanted something so underdeveloped. =(
Wish I could revert to the old version of the app as well.
I haven't noticed a difference since I installed the OTA.
I'm definitely not having to enter any password to unlock when I bring the phone to life.
I didn't have an unlock code before, and still don't. Maybe that's the difference. Did you have an unlock pattern before? Maybe it changes the type of code you can use.
I have the same annoying Pin requirement now after the OTA. I also did not have a pin before the update. It sucks.
I'll toss out an idea to get around this.
Root with Visionary.
Connect device via USB.
adb shell
su
pm disable com.android.email.policy
Our corporate Exchange server does not have these policies enforced so I cannot confirm whether it will do the trick. But either way, the change is persistent so you only need to do it once unless you wipe.
It can be undone by substituting the last command with "enable" instead of "disable.
smasraum said:
I haven't noticed a difference since I installed the OTA.
I'm definitely not having to enter any password to unlock when I bring the phone to life.
I didn't have an unlock code before, and still don't. Maybe that's the difference. Did you have an unlock pattern before? Maybe it changes the type of code you can use.
Click to expand...
Click to collapse
This is probably because your IT staff has not enabled the security (or more likely disabled it, since it is enabled by default in Exchange). I talked to our IT guys, and they say the national corporate office won't disable it, but they all hate it (local IT).
I showed them how to disable it in 2.1 Eclair, but those fixes don't work in 2.2 Froyo. The only fix for Froyo is to replace the Email.apk with a hacked version, but we cannot do this without permanent root.
rmk40 said:
I'll toss out an idea to get around this.
Root with Visionary.
Connect device via USB.
adb shell
su
pm disable com.android.email.policy
Our corporate Exchange server does not have these policies enforced so I cannot confirm whether it will do the trick. But either way, the change is persistent so you only need to do it once unless you wipe.
It can be undone by substituting the last command with "enable" instead of "disable.
Click to expand...
Click to collapse
I'll give it a shot, but my guess is that you won't be able to connect to the server at all without an email policy.
Edit: Doesn't work. You cannot send without the policy, and the password is still there. If you delete the account and recreate, it still forces you to create a password, and you still cannot send.
So to get this straight, the issue is with the Email.apk or the Email Policy file? Or both?
smasraum, can you upload your Email.apk and/or the com.android.email.policy that you say work for you? I doubt it is gonna work without perm root, but I'm so frustrated that I want to see if the system will allow me to downgrade the files.
Thanks in advance.
Here is the working (without password) Email.apk. I have this working fine on my Nexus with no password required. I don't think any changes to the policy are necessary. I believe this works by telling the Email app not to ask the server what its password policies are.
cparekh said:
Here is the working (without password) Email.apk. I have this working fine on my Nexus with no password required. I don't think any changes to the policy are necessary. I believe this works by telling the Email app not to ask the server what its password policies are.
Click to expand...
Click to collapse
I am assuming this apk won't remain on a reboot, will it? Will it revert back to the new apk?
If so, I guess we can make a visionary.sh script which can install the working apk on boot. Closest thing we will have.
EDIT: I tried to install that Email.apk, but I am getting an "Application not installed." Any ideas?
I don't think you can install it. I think you have to push it to the system/app directory. Then reboot, which is why it won't work on the G2. Also, I believe the ROM needs to be deodexed, so it would not work with the stock ROM anyways.
The steps I followed on my Nexus:
1) Delete Exchange account.
2) Remove password and go to regular lockscreen.
3) Replace existing email.apk with edited email.apk.
4) Reboot.
5) Add Exchange account.
All this was done on CM 6.1, which, I believe, is deodexed.
cparekh said:
I don't think you can install it. I think you have to push it to the system/app directory. Then reboot, which is why it won't work on the G2. Also, I believe the ROM needs to be deodexed, so it would not work with the stock ROM anyways.
The steps I followed on my Nexus:
1) Delete Exchange account.
2) Remove password and go to regular lockscreen.
3) Replace existing email.apk with edited email.apk.
4) Reboot.
5) Add Exchange account.
All this was done on CM 6.1, which, I believe, is deodexed.
Click to expand...
Click to collapse
Ah, okay so I see the real problem more clear now. And a visionary.sh script won't work because we need a reboot...
So I am guessing the only way to actually get this done is through Paul's Google Goggles method. Trick the system into deleting the current Email.apk, and then installing the old one. Anyone know enough to make that happen? =P
You can do that via Titanium backup with Paul's update. The problem is, if it doesn't work, then the change is permanent, and there is no current way of reverting.
I don't know if it would work, though, because it's not a market app, so it would not have the necessary signature to write itself to system/app and then run.
cparekh said:
You can do that via Titanium backup with Paul's update. The problem is, if it doesn't work, then the change is permanent, and there is no current way of reverting.
I don't know if it would work, though, because it's not a market app, so it would not have the necessary signature to write itself to system/app and then run.
Click to expand...
Click to collapse
Ah I didn't know Titanium Backup can do it now! Thats awesome.
But yes, I am wary that the change can be permanent if it doesn't work. Anyone pre-OTA (or a brave soul Post-OTA), willing to help us out and try this? Thanks!
I just caught the end of your last post. Yeah, I didn't think of it that way. I guess no matter what we aren't going to be able to make changes to the /system/app.
But, wait. If we deleted the Email.apk through TB, and then as long as the other Email.apk could be installed, then I think we would be good. Since we could make a visionary.sh script to install the good Email.apk on boot each time. But still, the problem I guess is we aren't too sure if the Email.apk would install in the first place...
KShatzkes said:
the problem I guess is we aren't too sure if the Email.apk would install in the first place...
Click to expand...
Click to collapse
Yeah, that's what I don't know. In effect, the NAND lock is not only keeping us from customizing our phones, it's keeping us from trying to customize our phones.
exchange problem after OTA update
i believe the problem i'm experiencing is related to everyone else here except i am not asked to enter any pin or pass codes. prior to the OTA update on 11/5 am for me, i was having absolutely no problems checking my work email via exchange. now after the update, i get this error message when i go into the app and try to retrieve email "unable to open connection to server".
anyone else experiencing this?
I got this once. The problem seems that after the OTA, it did not push the security policy to the phone. The solution for me was to delete the account and then re-enable it.

Need help with APK manager please

Hi guys,
Long time stalker, first time poster.
I am trying to use APK manager to edit some third party app apk's themes.
When i use option 9 to decompile, i try using option 11 to compile again straight away just to see if everything works ok...
If i decompile and change an image in res/drawable hdpi, i always get an error message when i try and compile it again...
Even if i only change one image and then compile it, it will show an error.
Does anyone know why im getting this error?
Thanks for any help you guys can give, its really frustrating!
Does anyone know why?
use the older version of the apktool.jar file. You can get it from his google code page.
Also remember if the image your changing is a 9.png then you need to make sure the all black, and totally clear edges stay that way or else you'll get an error compiling them again.
Another good idea is to post the portion of your log.txt file showing what's causing the error, cause otherwise we're just guessing.
And a final good idea is to ask your question in the apk manager thread. You'll get better support there.

[Request] Secret Flag Modified Google Search Apk

Question is, can someone modify the apk as below???
http://www.androidpolice.com/2013/0...-enable-voice-prompt-in-search-results-video/
Turns out, there's a secret flag within Search that lets you use the hotword, set by default to 'Google,' anywhere in search results instead of just the home Activity. By default, Search will let you say "Google" to activate voice input only in the main Search screen, after which you'd have to tap the Back button in order to use it again. It's nice, but it's not very fluid, as you have to keep touching your device.
The secret flag enables it in search results, so you can perform search after search after search without ever touching your phone or tablet.
As for the technical details, the flag is located in res/values/bools and is called hotword_from_results. To activate it, one would flip it from false to true, like so:
<bool name="hotword_from_results">true</bool>
Sent from my Nexus 4 using xda app-developers app
Wezi said:
Question is, can someone modify the apk as below???
http://www.androidpolice.com/2013/0...-enable-voice-prompt-in-search-results-video/
Turns out, there's a secret flag within Search that lets you use the hotword, set by default to 'Google,' anywhere in search results instead of just the home Activity. By default, Search will let you say "Google" to activate voice input only in the main Search screen, after which you'd have to tap the Back button in order to use it again. It's nice, but it's not very fluid, as you have to keep touching your device.
The secret flag enables it in search results, so you can perform search after search after search without ever touching your phone or tablet.
As for the technical details, the flag is located in res/values/bools and is called hotword_from_results. To activate it, one would flip it from false to true, like so:
<bool name="hotword_from_results">true</bool>
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
I decompiled, made the above changes, recompiled with no errors, and got it to install but it force closes every time i try to open it. Maybe someone else can provide some insight. I used AutoAPKTool to make the edits
Cans someone resolve this? I'd do it myself but having tons of trouble getting my device to show on adb (after many tries, different methods)
I tried to make an Xposed module to patch it on the fly, but it is not working:
Code:
resparam.res.setReplacement("com.google.android.googlequicksearchbox", "boolean", "hotword_from_results", true);
upon starting the module, I get "Resource$NotFoundException", I tried other forms of the setReplacement method but none worked. I am still new to Xposed, so maybe I am doing this in a wrong way, attached are the sources of the Eclipse project in case someone can make it work.
If someone have the source of google now apk i can do something
I don't know if it's available, or also can be made from decompiling and recompile
firetrap said:
If someone have the source of google now apk i can do something
I don't know if it's available, or also can be made from decompiling and recompile
Click to expand...
Click to collapse
no you dont need source, just decompile. change the value, recompile. replace it
done.
Yes I know it's just iam working right now in my app and for me it's much easier to have the source I only had to import to eclipse than playing with apk tool etc in a few hours I will do that
Sent from my Nexus 4 using xda app-developers app
firetrap said:
Yes I know it's just iam working right now in my app and for me it's much easier to have the source I only had to import to eclipse than playing with apk tool etc in a few hours I will do that
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
you dont need to import to eclipse, all you do is just decompile it and change false to true.
you're making it so complicated on your part. i already did it, going to test it now it literally takes 30-45 seconds to do.
zephiK said:
you dont need to import to eclipse, all you do is just decompile it and change false to true.
you're making it so complicated on your part. i already did it, going to test it now it literally takes 30-45 seconds to do.
Click to expand...
Click to collapse
Yes but i was in the company desktop and here i don't have acess to apktool just because my company restricts the download site as dev host rapid share etc. now at home i had decompiled changed from false to true and recompiled and signed etc etc.. so i tested and the behaviour is the same are you guys sure that it's only change to do?! i think i had all perfect if you want i can upload the "modded apk"
EDIT: it doesn't work i don't know why here is the decompiled files and its true, i recompile sign and check manifest and all ok, but after install the behavior its the same
https://mega.co.nz/#!KZlVkIgS!FVLyrUXwtI4w5NHX22u7bWMcWZpEr5-7SydfU_fYX6M
Here the recompiled file i made you can test:
https://mega.co.nz/#!yJUjmYCC!fancLR6DwIlQHxYmX9JmNzCJEPBmpLgkIFsTFw4e_jw
Maybe the guy from the "30-45" seconds have more time to debugg this
I just modded this and got it running w/o issue.
I'm on CM 10.2 so I had to do some adjusting as there was an update installed to /data/app, with the original in /system/app.
I just uninstalled the update via the Play Store, and then moved the original (for CM it's QuickSearchBox.apk to QuickSearchBox.apk.bak), and adb pushed the newly modded apk (attached), to /system/app.
After doing all that, BOOM goes the dynamite.
Works for me, YMMV.
Hotword Quick Search
JsChiSurf said:
I just modded this and got it running w/o issue.
I'm on CM 10.2 so I had to do some adjusting as there was an update installed to /data/app, with the original in /system/app.
I just uninstalled the update via the Play Store, and then moved the original (for CM it's QuickSearchBox.apk to QuickSearchBox.apk.bak), and adb pushed the newly modded apk (attached), to /system/app.
After doing all that, BOOM goes the dynamite.
Works for me, YMMV.
Hotword Quick Search
Click to expand...
Click to collapse
Any way to do this without using ADB? (Having tons of trouble getting my SGS3 to be recognized). Tried installing the apk by itself but the installation fails.
trein91 said:
Any way to do this without using ADB? (Having tons of trouble getting my SGS3 to be recognized). Tried installing the apk by itself but the installation fails.
Click to expand...
Click to collapse
Are you rooted? I needed to make this a system app, as mentioned, to avoid signature conflicts, etc.
If so, I can make a zip to install to /system/app for you. I don't think it will work (as you have discovered), if you try and install as a standard app to /data/app, which is what clicking the download link and attempting to install is doing.
JsChiSurf said:
Are you rooted? I needed to make this a system app, as mentioned, to avoid signature conflicts, etc.
If so, I can make a zip to install to /system/app for you. I don't think it will work (as you have discovered), if you try and install as a standard app to /data/app, which is what clicking the download link and attempting to install is doing.
Click to expand...
Click to collapse
Please make a flashable zip, would love to try it
Sent from my Nexus 4 using xda app-developers app
OK. So I didn't have any files in data/app so I went ahead and just made quixksearchbox a .bak, and pushed new one after renaming it and setting permissions. Its working great.
I'm on PA
Sent from my Nexus 4 using Tapatalk 4
Here's a flashable zip. Though, because it has to place the APK in the /system/ folder (partition), the zip (out of the box), is only likely to work on the Nexus 4, since mount points are going to differ by phone. Any other phone you'll have to modify the script.
As mentioned previously, if you want to try and flash, FIRST, be sure to uninstall 'Google Search' from the play store.
Since I don't think there is a way to move a file in edify, and I'm too lazy to include a shell script to run a move command, I instead delete QuickSearchBox.apk if it is in your /system/app/ folder (instead of backing it up if you want to restore later), and then copy over qs.apk (the modded version).
I restored to original, ran the above process on CM 10.2, and got the results expected / desired (i.e. the attached zip is confirmed working in my setup).
It works on PA 3.99. However you'll need to set voice to US English or it won't work.
Sent from my Nexus 4 using Tapatalk 2
Anon87 said:
It works on PA 3.99. However you'll need to set voice to US English or it won't work.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Would be nice if this could be activated with any language.
Is it possible by changing any other flag?
JsChiSurf said:
Are you rooted? I needed to make this a system app, as mentioned, to avoid signature conflicts, etc.
If so, I can make a zip to install to /system/app for you. I don't think it will work (as you have discovered), if you try and install as a standard app to /data/app, which is what clicking the download link and attempting to install is doing.
Click to expand...
Click to collapse
Good Afternoon,
I am getting FCs after flashing the app. I am using a stock rooted ROM
I removed Google Search< restarted the phone<verify Googgle search was removed< flashed zip<rebooted phone<open app<set up account<FCs
anyone got a suggestion to get it working,
Lento10 said:
Good Afternoon,
I am getting FCs after flashing the app. I am using a stock rooted ROM
I removed Google Search< restarted the phone<verify Googgle search was removed< flashed zip<rebooted phone<open app<set up account<FCs
anyone got a suggestion to get it working,
Click to expand...
Click to collapse
Is the ROM odexed?
jarjar124 said:
Is the ROM odexed?
Click to expand...
Click to collapse
Deodex stock rom
Sent from my Nexus 4 using XDA Premium 4 mobile app

Categories

Resources