yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] _guzzler_:
Works on Nexus 4: 4.2.1. Thank you!!

Waiting for USB connection...

Checking device...

Model: Nexus 4, build JOP40D, android 4.2.1 (API Level 16)

/system mounted on /dev/block/platform/msm_sdcc.1/by-name/system, mode ro

checking root access. root uid: 0, secure: yes, busybox: yes

Pulling app(s) ...

Pulling libs ...

Decompiling EmailGoogle.odex ...

Applying patch ...

Patching com/android/emailcommon/provider/Policy.normalize()V

Recompiling ...

Building EmailGoogle.apk ...

Decompiling Exchange2Google.odex ...

Applying patch ...

Patching com/android/emailcommon/provider/Policy.normalize()V

Patching com/android/exchange/adapter/ProvisionParser.hasSupportablePolicySet()Z

Recompiling ...

Building Exchange2Google.apk ...

Updating device ...

Rebooting device ...

Done.

NOTES! PLEASE READ!

* All shortcuts to the Email app will disappear and will need to be re-created.

The Email app will appear on the last page of the application drawer.

Press any key to continue . . .
[Galaxy S II Themes and Apps] emnesca:
thanks

Thanks great job. Works perfect on SII JB 4.1.2 I9100XXLS6
[Galaxy S II Themes and Apps] abvirus:
hI, probably are you have zip file for CWM? Need for sgs2.

tnx
[Galaxy S II Themes and Apps] CaspaTheGhost:
Worked great as usual, this time on Gnex MCR 4.2.1 based ROM.

What ROM? Works fine here but can't pull framework jars for you.

Are you rooted as it can't gain root?

Sent from my Galaxy Nexus
[Galaxy S II Themes and Apps] Sardo Numspa:
yes, my xoom has been rooted since day one. running CM 10.1 (JB 4.2.1 on it).
[Galaxy S II Themes and Apps] MN-Joe:
Keyguard on E4GT

This has worked in the past with older ROMs, but on the latest version of the leaked FK23 Android 4.1.2 I've not had any luck. With the version 'SPH-D710_FK23_549262_Rooted' loaded the patch won't run, and with SPH-D710_FK23_DEODEX_ROOT_BUSYBOX_V3 it looks like it works goes through everything just normal, but it breaks sync with Exchange. If the Exchange profile isn't setup it just fails and if iI have a profile it says "Sync Disabled" when I hit refresh in the client. I've tried replacing files as oulined by Jim.J, but that resulted in the email app just failing upon startup. Thanks - hopefully someone has some insight to point me in the right direction.
[Galaxy S II Themes and Apps] CaspaTheGhost:
Strange, it cant gain root so isn't able to write back to system which is read only.

As you said you just flashed CM10.1 have you opened su and updated the binaries?
[Galaxy S II Themes and Apps] Sardo Numspa:
su binary v3.2 (18)

what about supersu?

edit: installed SuperSU, and ran the script again. got the popup asking for root access and the reboot. and now im up and running.

time to make a backup of the .apks.

thanks for the script.
[Galaxy S II Themes and Apps] CaspaTheGhost:
Glad you're sorted, switching to supersu would have been my advice after seeing that screenshot.

Liking the lock screen widgets, work great with a pin but without the enforced policy.

Sent from my Galaxy Nexus
[Galaxy S II Themes and Apps] Sardo Numspa:
love the lock screen widgets. my xoom is now officially more updated than my sgsII.
[Galaxy S II Themes and Apps] best98:
Hi,

Just installed Jelly Bean 4.1.2 in my Samsung Galaxy Note (version 1) to Kernet Version JZO54K

While this hack has been flawless for all the other versions and I loved it, I must say that this would maybe need a fix here.. :)

If I run it manually, it prompts me for the Apk name.

Either if I enter Email.apk Exchange.apk or Exchange2Google.apk ... the same thing happens.

It pulls the libs, change them, compiles and push them back.

Next thing, when I try to run the Exchange Email app on the phone, I then register then I am asked to update the security profile (add a PIN/Password) which I would like to avoid for testing purposes as this device is !

Thanks for your help,

Pierrick
[Galaxy S II Themes and Apps] best98:
Hopefully.. If it can help.. no Exchange or Mail apk files under /system/app..

----

shell@android:/system/app # ls *mail* (or *Mail*)

ls *mail*

Gmail.apk

----

shell@android:/system/app # ls *ang*

ls *ang*

SecExchange.apk

----

Pierrick
[Galaxy S II Themes and Apps] masi0:
Seems that the patch does not fully work on i9300 4.1.1 and 4.1.2:crying:

It does his job in terms of no asking for the PIN however it's causing duplicated appointments in the calendar or not fully syncing emails (already read email in outlook is still unread in the phone)
[Galaxy S II Themes and Apps] pchtc:
yes, there is definately an issue is android 4.2

although it does stop the enforcing of pin

it still adds the device admin

as a test we tried to remote wipe the phone and it did

so for now on 4.2 the device admin still installs and still allows remote wipe

any plans for a new version?
[Galaxy S II Themes and Apps] sordna:
email doesn't sync on android 4.2.1

I'm having issues too on stock android 4.2.1... after the patch, while setting up email no longer asks to setup a PIN code, email gets stuck in sync mode with message "your email will appear shortrly" but it does not manage to sync it for me. Reverting to stock .apk (and putting back .odex files) makes syncing work again (but of course it forces locking the phone with PIN).

Also, the instructions should account for stock android 4.2, as there is no Email.apk or Exchange.apk but EmailGoogle.apk and Exchange2Google.apk and it's not clear if only one or both of them have to be patched. I tried all combinations (using apply-patch-nix.sh to patch only one ore both .apk's) but could never actually sync.

At some point, after many tries and reboots, even with reverting to stock .apk and .odex I couldn't sync anymore, my exchange email was busted beyond repair and had to do a nandroid restore to get exchange email to work again (not even a restore from titanium helped).

Thanks a lot for your efforts, and hopefully we'll get a new and improved version!
[Galaxy S II Themes and Apps] awalkerz:
I've noticed syncing issues too with the latest JB build for the Verizon GS3. JRO03L build.
[Galaxy S II Themes and Apps] Technowolf:
Where is the link to find the downloadable email apk. my Rainbox Rom the hack is not working. its unable to fine my email app
[Galaxy S II Themes and Apps] :
Cheers

Hi rustamabd,

Thank you very much for your contribution to the community, I signed up on this forum just to give you props for this. And also to share that it worked without any issue on my (Optus Australia, running Telstra sim, sourced) Galaxy SIII (S3) 4G i9305.

Incase anyone finds this post helpful and wants to know how to "root" their phone to use this tool please use the very simple program available here by mskip.

Both these programs have made my phone so much easier to use in life and work. Removing the Optus branding and removing the need for a 6 digit passcode have been amazing. Thank you to the community. I'm just offering what I can in return with the (hopefully) informative as well as appreciative review.:cowboy:

Notes:

After setting up the exchange account I wasn't asked to create a password or anything. However all my (contacts/email/calendar) content appears to be working without issue running 4.1.1
[Galaxy S II Themes and Apps] mm512670:
file too short Message

Running on Samsung GT-I9305 build JRO03C.I9305XXALI5 on 4.1.1 I get this message:

Cleaning up ...

Waiting for USB connection...

Checking device...

Model: GT-I9305, build JRO03C.I9305XXALI5, android 4.1.1 (API Level 16)

/system mounted on /dev/block/mmcblk0p13, mode rw

checking root access. root uid: 0, secure: yes, busybox: no

Pulling app(s) ...

Pulling libs ...

Decompiling SecEmail.odex ...

Error occured while loading boot class path files. Aborting.

org.jf.dexlib.Util.ExceptionWithContext: work\com.dropboxpartner.jar: file too short

at org.jf.dexlib.Util.ExceptionWithContext.withContex t(ExceptionWithContext.java:54)

at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClas sPath(ClassPath.java:190)

at org.jf.dexlib.Code.Analysis.ClassPath.initClassPat h(ClassPath.java:141)

at org.jf.dexlib.Code.Analysis.ClassPath.InitializeCl assPathFromOdex(ClassPath.java:103)

at org.jf.baksmali.baksmali.disassembleDexFile(baksma li.java:94)

at org.jf.baksmali.main.main(main.java:297)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at jpatch.emailPolicy.Run.runIsolated(Run.java:791)

at jpatch.emailPolicy.Run.applyPatch(Run.java:432)

at jpatch.emailPolicy.Run.main(Run.java:581)

Caused by: java.lang.RuntimeException: work\com.dropboxpartner.jar: file too short

at org.jf.dexlib.Util.FileUtils.readFile(FileUtils.ja va:103)

at org.jf.dexlib.DexFile.<init>(DexFile.java:286)

at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClas sPath(ClassPath.java:186)

... 11 more

Error while reading boot class path entry "com.dropboxpartner.jar".

Can anyone help me with this?

thanks
[Galaxy S II Themes and Apps] Roland_SGN:
My first approach didn't work on my Samsung-Note Parandroid 2.56 (CM10, JB, 4.1.2). I was forced to make a factory-reset. I extracted the Email.apk and Exchange2.apk from the package and applied the patch on my computer directly (without interference of my device). And then uploaded the files via adb and now it works. Great :highfive:
[Galaxy S II Themes and Apps] mm512670:
Found solution....

com.dropboxpartner.jar has 0 bytes - also on phone. Delete file during transfer phase from phone to work dir. Script runs sucesfully and PIN has gone.

Thanks for this fix.
[Galaxy S II Themes and Apps] Technowolf:
Patched email apk required

Can you share the patched email apk. the patcher is not working in Rainbox rom.
[Galaxy S II Themes and Apps] war6763:
Seems to compile properly on my Galaxy S3 AT&T. One question, though. How do I know if it worked? Is there any way to check that the policy isn't being enforced?

Great work!! :good:
[Galaxy S II Themes and Apps] ahpatel:
Given that every enterprise security policy probably requires a password, the easiest way to confirm would be trying to diable the password requirement after the patch. If you can disable password access altogether, then it either worked or your enterprise security policy is lax enough that you likely don't need the patch in the first place!
[Galaxy S II Themes and Apps] Gerd3000:
Nexus 4 JB 4.2.1

Has someone tried on Nexus 4 running JB 4.2.1?
[Galaxy S II Themes and Apps] krayzie180:
this patch confirmed working for me running Chameleon rom V3.0 beta.. XXLSJ JB 4.1.2 :)
[Galaxy S II Themes and Apps] sordna:
I did but it failed to sync my email, I tried it on on stock (but rooted of course) 4.2.1.... so it still needs work I think.
[Galaxy S II Themes and Apps] extremefun:
this patch confirmed working for me running CM10.1 on galaxy S3
[Galaxy S II Themes and Apps] Roland_SGN:
I have now tried 5 resp. 6 times and it seems now to work with JB 4.1.2, Parandroid 2.56. I think it has to do if the Exchange-Account is set at the beginning of the patching or not. My unsuccessful attempts were all when I already configured the Exchange-Account. But I have had as well spurious confirmation, i.e. after a reboot of my device it failed once again.

I think I succeed now, cause it was clean, fresh new installation of PA, wiped data. Reboot works now and receiving an email works as well. I nevertheless observe the situation if it continues working at the very end :confused: I hope so....
[Galaxy S II Themes and Apps] BigsyBiggins:
3.2 patch works fine on my stock (rooted) nexus 4, although you do have to add it as a device admin, so gues it can still be remotly wiped etc, but it doesn't not enforce the pin policy.

Oddly if you use the 3.1 patch you don't have to add as device admin but I was getting a lot of email force closes all the time, but it did work and sync mail ok.
[Galaxy S II Themes and Apps] mgkumar:
I've got the same problem. I'm on SGH-i777 with supernexus 4.1.2 rom. It looked like the patch worked but then just got stuck in sync mode with the message "your email will appear shortly." I restored email.apk and exchange2.apk with titanium but email is still broken. any ideas to fix it?
[Galaxy S II Themes and Apps] tbns:
THANK YOU!

Works perfectly on my Verizon Note II running CleanRom 3.5.
[Galaxy S II Themes and Apps] galangdj:
Deleted
[Galaxy S II Themes and Apps] Shemploo:
If you read the info in the 1st post I think it was, the OP states that it looks like it's granted remote admin, but it really does not, look under your security > remote admin settings and you will not see anything listed there.
[Galaxy S II Themes and Apps] Bolick:
Please refer to these posts:

http://xdaforums.com/showpost.php?p=30270006&postcount=451

http://xdaforums.com/showpost.php?p=30311260&postcount=462

The first one says that in v3.2 (targeted to Jelly Bean devices and above) we now leave device admin (enforced by Exchange policy) in place - because email application checks if device admin exists and FCs if no admin was found.

The second post says:

========

The latest JB patch in fact does exactly that. It disables only the following restrictions:

PasswordMode

PasswordMaxFails

PasswordMinLength

PasswordComplexChars

PasswordHistory

PasswordExpirationDays

MaxScreenLockTime

RequireEncryption

RequireEncryptionExternal

RequireManualSyncWhenRoaming

DontAllowCamera

DontAllowAttachments

DontAllowHtml

Other things like RemoteWipe, MaxCalendarLookback, MaxEmailLookback, etc. are left unchanged.

Note - this new behavior is there only for JB. For ICS and GB, the complete policy is removed. But I'm thinking to change that, the rationale behind it is to only disable the most annoying and useless restrictions, but keep restrictions that are either not noticeable or have an impact on exchange server operation intact.

========
[Galaxy S II Themes and Apps] Shemploo:
Thank you for clearing that up.

I hate to admit, remote wipe scares the crap out of me, is that for network admins? or only for the end user?
[Galaxy S II Themes and Apps] Bolick:
I'd say this is for security :)

Both Exchange user or admin may trigger remote wipe procedure.

But I don't think this is something that may happen without serious reason.

I think there's another thing you should know about - on your N-th (most probably 3-rd) unsuccessful attempt to enter incorrect pin to unlock pin/password locked screen you'll get device wiped as well.

And this may happen anytime you let you girl/wife/friend/pet/child to play with your smartphone)
[Galaxy S II Themes and Apps] pgonza02:
It depends what the app is requesting admin rights. In the case of Exchange, yes, it is your Exchange admin but in the case of something you control like SeekDroid, you control the server side and can remote wipe the phone for whatever reason, say lost or stolen.

BTW, this path has been working great for me through multiple revisions of the ROM I'm on.

I've been running the first version I downloaded, 3.2.

Hope that helps.
[Galaxy S II Themes and Apps] varuun:
worked..)

worked like charm on sghi777 with jelly bean 4.2.1.

excellent work.
[Galaxy S II Themes and Apps] SoRRoW_BR:
sheet systfin

A got this error, even the file SecEmail.apk exists, if I specify the Email app name, the procedure runs ok, but, the security pin still are necessary.
[Galaxy S II Themes and Apps] kraminc:
I keep getting this error no matter what I do. libvtmanagerjar.jar is in the work folder.

Cleaning up ...

Waiting for USB connection...

Checking device...

Model: GT-I9300, build Sac23_Rom_s3, android 4.1.1 (API Level 15)

/system mounted on /dev/block/platform/msm_sdcc.1/by-name/system, mode ro

checking root access. root uid: 0, secure: no, busybox: yes

Pulling app(s) ...

Pulling libs ...

Decompiling SecEmail.odex ...

Error occured while loading boot class path files. Aborting.

org.jf.dexlib.Util.ExceptionWithContext: Cannot locate boot class path file libv

tmanagerjar.jar

at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.jav

a:207)

at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:14

1)

at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(Cla

ssPath.java:103)

at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:94)

at org.jf.baksmali.main.main(main.java:297)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at jpatch.emailPolicy.Run.runIsolated(Run.java:791)

at jpatch.emailPolicy.Run.applyPatch(Run.java:432)

at jpatch.emailPolicy.Run.main(Run.java:581)

Press any key to continue . . .
[Galaxy S II Themes and Apps] sneaky55121:
help google policy

Hi, please help me,

I need to override the pin/password policy by a google account, how can aI do that?

I have an Xperia s
[Galaxy S II Themes and Apps] sssqueue:
Same issue here on Sprint Galaxy SIII. Running Gruesome's superior v2.
[Galaxy S II Themes and Apps] Optimus812:
Works Perfect

Many many thanks!!

Works perfectly on my Verizon Note II running Jelly Beans Build 4.
[Galaxy S II Themes and Apps] josephpatrick:
Not working on rooted SG2 4.1.2

I get the following error:

checking root access. root uid: 0, secure: yes, busybox: no

Pulling app(s) ...

> lib/adb.exe pull /system/app/Email.apk

remote object '/system/app/Email.apk' does not exist

< returned: 1

> lib/adb.exe pull /system/app/EmailGoogle.apk

remote object '/system/app/EmailGoogle.apk' does not exist

< returned: 1

> lib/adb.exe pull /system/app/com.android.email.apk

remote object '/system/app/com.android.email.apk' does not exist

< returned: 1

> lib/adb.exe pull /system/app/SecEmail.apk

remote object '/system/app/SecEmail.apk' not a file or directory

< returned: 1

> lib/adb.exe pull /system/app/Email2.apk

remote object '/system/app/Email2.apk' does not exist

< returned: 1

> lib/adb.exe pull /system/app/Email2Google.apk

remote object '/system/app/Email2Google.apk' does not exist

None of these files seem to exist in the system/app folder.

build: xxlsj rooted. Please help.
[Galaxy S II Themes and Apps] bisbers:
This is working for me on my Galaxy Nexus w/ CM 10.1. A potential alternative is below, may not work on other frameworks but in case people are having trouble, this might help.

Attached are the 2 compiled files, Email2.apk and Exchange2.apk. Download the files to your phone.

Download the tool ZipSigner2 from the Play Store.

Use ZipSigner2 to resign the apps

Force stop and clear cache for both apps

Install both signed apps from File Browser

This process worked for myself (during flash of rom) and for a friend on a GSIII. I've noticed that when rebooting the phone, sometimes the patch isn't seen properly (exchange won't update or it will complain of a security issue). Force Stop, Clear Cache for both apps, then touch in File Browser to install again (no need to uninstall - all settings and data will persist).
[Galaxy S II Themes and Apps] Raitis:
In SG2 xxlsj

SecEmail.apk and SecExchange.apk exist but it can't be retrieved with adb pull, don't know why

I manage to patch them with patch-manual.cmd and works fine

You will also need to copy /system/framework directory

I Copied and overwrite them with es file explorer app (Thick Mount file system as writable under Root settings)
[Galaxy S II Themes and Apps] pradeepb:
Awesome

Hi,

I flashed today and it works awesome.. Thanks a lot friend :)
[Galaxy S II Themes and Apps] josephpatrick:
Thank you for ur response, I will try the patch-manual option. Not sure what you meant by 'copy /system/framework'. Thanks.
[Galaxy S II Themes and Apps] geekshow:
Great work Bisbers! I patched the Email2.apk and Exchange2.apk from my Nexus 7 running SmoothROM 4.2 and installed them again after signing using ZipSigner 2 - worked a treat, thanks! :D
[Galaxy S II Themes and Apps] JPD19:
How do you use this ZipSigner 2 app? Do you select the original email2/exchange2 apk as "input file" and the modified ones as "output file?" Should the Key/mode be auto-testkey as it is by default?
[Galaxy S II Themes and Apps] Raitis:
I mean that for patch manual you need also content of /system/framework/ directory
[Galaxy S II Themes and Apps] Widget21:
Does this apply to all versions of ICS and JB? Does size matter? :D

I need to use this hack for the Galaxy Note 10.1 - JB 4.1.1
[Galaxy S II Themes and Apps] metal_n:
Thank you!!!!!!! I tried million of times to solve this until I found your coment.

After instaling SuperSU (not super user as i thought at the begining), there were no more messages that i'm not rooted).

You made my day mate!

Thank you once again.
[Galaxy S II Themes and Apps] BazmanFoo:
do I need to repeat this process each time I download a new nightly for my ROM?
[Galaxy S II Themes and Apps] Sardo Numspa:
Yes, because the new rom will overwrite your current system/apps

or you can modify the nightly like i do

what i did was after i ran the script and confirmed email to be works, was i went to system/app and copied the email and exchange apk to my download folder.

then when i download a new nightly to my phone or xoom, using root explorer

1. long press the .zip file and extract all.

2. delete zip file (to save space - purely optional)

3. go to downloads folder and copy hacked email and exchange apks

4. go to speedsoftware/extracted/"insert rom nightly here/system/app and paste the hacked apk. this will overwrite the original files

5. back out to speedsoftware/extracted/"insert rom nightly here/ and select the META-INF folder, system folder, and boot.img files and zip. i use the original name

6. delete folder inside extracted (to save space - purely optional)

7. go to speedsoftware/zip find the zip file and move to sd card, then flash

ive done this process numerous times and it works for me. i do this so i do not have to re run the script every time, and re connect my exchange account every time i flash a rom update. this method works for me and may not for other.
[Galaxy S II Themes and Apps] Technowolf:
This step Work for me:

Settings> Developer Options> Root Access> Apps and ADB. I am also on CM 10 Avatar Rom
[Galaxy S II Themes and Apps] BazmanFoo:
thanks for the advice. I might try this when im home
[Galaxy S II Themes and Apps] pradeeprajr:
Thanks., it worked well without any errors for Galaxy SL i9003.
[Galaxy S II Themes and Apps] akheel.ahme@gmail.com:
compiled Email.apk

i tried your instructions but failed as my phone is not being recognized in USB Debugging enabled mode on my PC. I would appreciate if you could provide the modified Email.apk. Thanks in advance.
[Galaxy S II Themes and Apps] malhor:
in my rom (NeatRom 4.0 which is XXLJS based), they seem to be in preload directory and simlinked to system. That explains why adb finds them but cannot retrieve them (they are not apps).

overwriting the system directory is one solution :good: , another elegant one would be to push them back to preload :angel:

Forget the elegant method, it won't work with adb. I'm testing a CWM build to push in /preload and will see how things go
[Galaxy S II Themes and Apps] FredC94:
It works for me, thank you mate.

Anyway I had to install SuperSU, Superuser was not able to gives root permissions to the script.

Galaxy SII I9100 running CM10.1 20130108 nightly build