Prevent home button from turning screen on? - AT&T Samsung Galaxy S 5

I'm trying to find a way to stop the home button from turning on the screen. My wife puts the phone in her purse and I constantly turns the screen on. I read this:
http://android.stackexchange.com/qu...-home-button-from-waking-my-samsung-galaxy-s5
on StackOverflow that had me edit gpio-keys.kl, but it did not work on lollipop. From what I understand the xposed modules don't work at all with lollipop and touchwiz either, so using wanam probably won't work. I have root, so any suggestions would help. Thanks!

shaklee3 said:
I'm trying to find a way to stop the home button from turning on the screen. My wife puts the phone in her purse and I constantly turns the screen on. I read this:
http://android.stackexchange.com/qu...-home-button-from-waking-my-samsung-galaxy-s5
on StackOverflow that had me edit gpio-keys.kl, but it did not work on lollipop. From what I understand the xposed modules don't work at all with lollipop and touchwiz either, so using wanam probably won't work. I have root, so any suggestions would help. Thanks!
Click to expand...
Click to collapse
Wanam actually does work for me. I'm currently on OF2. It also worked on OC4.
Or if you're comfortable decompiling/recompiling you can try: http://forum.xda-developers.com/showthread.php?t=2799050 has it somewhere in there. I haven't tried this mod specifically.
Edit:
[Guide How-To] DISABLE HOME KEY WAKE
This will prevent the Home Key from waking the phone.
android.policy.jar smali edit:
smali/com/android/interal/policy/impl/PhoneWindowManager.smali
.method private isWakeKeyWhenScreenOff(I)Z
Add the new lines in BLUE
Code:
:sswitch_1
move v0, v1
goto :goto_0
[COLOR="Blue"]:sswitch_4
return v1
nop
[/COLOR]
:sswitch_data_0
.sparse-switch
[COLOR="Blue"]0x3 -> :sswitch_4
[/COLOR] 0x18 -> :sswitch_0
0x19 -> :sswitch_0

Thanks! I'll give it a shot

Related

Remove Exchange lock on Captivate with 2.2 Stock ROM

I'm a Samsung Captivate user with the stock AT&T Froyo 2.2 ROM, rooted. After some playing around I think I have atomic reproducible steps for trimming out the Exchange security policies. Removed my post in the other thread on this and posting in the Captivate forum.
NOTE: I included the steps for BUILDING this APK (primarily for other phones that are similar but not identical), but many people won't want that. If you are only interested in using my pre-built .APK file, skip down to "II. INSTALLING the modified Email.apk". Download link provided there. You must still have rooted your phone and have a working busybox install (I usually just use Titanium Backup to fix my busybox install the first time after rooting).
As always, this is at YOUR own risk. YOU take responsibility for the fact you may be violating your corporate email policies.
CREDITS:
Initial thread giving me hints
This post for giving extra info on how to handle odexed APKs
This thread giving me the final clue on disabling the check
Smali/Baksmali project for deodexing and re-odexing files
NOTE: I don't actually know if the second code change (as shown below) was necessary or not. I did this change first and after it I still had to accept the security policy, delete the policy after email configuration, and I still got notifications about needing to accept the security policy every time I read mail (even though I didn't actually accept the policy again). To really make the APK work I had to add the first change below. However the APK is working for me so I'm going to keep it in there.
I. BUILDING the modified Email.apk on a Samsung Captivate Froyo 2.2 stock ROM using Windows 7
I tried to make the instructions detailed enough that you can do this on other builds, too. If you are using a custom ROM, chances are good you won't have an Email.odex file, which will significantly slim down the steps needed.
The first 2 items are left as exercises for the reader since they are well documented elsewhere.
root your phone and get busybox installed/working
get adb running in an otherwise empty subdirectory (I used "deodex")
grab a copy of baksmali and smali from http://code.google.com/p/smali/downloads/list
... make sure java is in your %PATH% as documented on the Smali site
NOTE: the following commands are run from your "cmd" window:
`adb pull /system/framework`
`adb pull /system/app/Email.apk`
`java -jar baksmali.jar -c:twframework.odex -x Email.apk`
... Samsung default ROM uses touchwiz, so we needed to include it for baksmali (note: leave out the "-c:twframework.odex" for AOSP-based ROMs like CM7)
... output of the odex should be in a new subdirectory
Edit "out\com\android\email\SecurityPolicy$Policy.smali (note, on CM7 and probably AOSP this is SecurityPolicy.smali)
... Find the line with "const/4 v5, 0x0" in it (for the Captivate APK it was line 641) in the ".method public isActive" section
... Replace "0x0" in that line with "0x1".
Edit "out\com\android\email\SecurityPolicy$PolicyAdmin.smali
... replace the contents of the "onDisabled" section with the contents of the "onEnabled" section
Original code:
Code:
.method public onDisabled(Landroid/content/Context;Landroid/content/Intent;)V
.registers 5
.parameter "context"
.parameter "intent"
.prologue
.line 647
invoke-static {p1}, Lcom/android/email/SecurityPolicy;->getInstance(Landroid/content/Context;)Lcom/android/email/SecurityPolicy;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/android/email/SecurityPolicy;->onAdminEnabled(Z)V
.line 648
return-void
.end method
New Code
Code:
.method public onDisabled(Landroid/content/Context;Landroid/content/Intent;)V
.registers 5
.parameter "context"
.parameter "intent"
.prologue
.line 639
invoke-static {p1}, Lcom/android/email/SecurityPolicy;->getInstance(Landroid/content/Context;)Lcom/android/email/SecurityPolicy;
move-result-object v0
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/android/email/SecurityPolicy;->onAdminEnabled(Z)V
.line 640
return-void
.end method
`java -jar smali.jar -o classes.dex out`
Using something like 7zip, open the "Email.apk" file and add your new "classes.dex" to the apk
II. INSTALLING the modified Email.apk
NOTE: If you chose to download my modified Email.apk, grab it here. You must still have rooted your phone and have a working busybox install (I usually just use Titanium Backup to fix my busybox install the first time after rooting).
NOTE: Next steps can be altered to fit your preferred method for removing and uploading the Email.apk. The important part is to make sure you delete "/system/app/Email.apk" and "/system/app/Email.odex", then push your new Email.apk to /system/app ... my steps follow.
NOTE: THE FOLLOWING IS GOING TO GET SPECIFIC TO THE SAMSUNG CAPTIVATE RUNNING STOCK FROYO 2.2, modify the shell commands to fit YOUR device.
from Windows command shell again: `adb push Email.apk /mnt/sdcard`
Force Email to stop (Settings -> Applications -> Manage Applications -> All -> Email -> Force Stop) ... while you're in there you may want to "Clear Data". Not sure if this was important or not.
Load your adb shell via "adb shell". The following commands are to be run directly in your adb shell:
`su` # become superuser
`mount` # see which partition YOUR /system is and use it in the next command if different!
`mount -o rw,remount -t yaffs2 /dev/block/stl9 /system` # /dev/block/stl9 may differ for you! NOT st19, stl9. Remounts writeable
`cp /system/app/Email.odex /mnt/sdcard/Email.odex-ORIGINAL` # back up your files just in case
`cp /system/app/Email.apk /mnt/sdcard/Email.apk-ORIGINAL`
`rm /system/app/Email.odex`
`rm /system/app/Email.apk`
`cp /mnt/sdcard/Email.apk /system/app` # copy the file from the sdcard, had failures when trying to push directly to /system/app
`chmod 644 /system/app/Email.apk` # give it normal APK permissions
`rm /mnt/sdcard/Email.apk` # remove from the temp location
`mount -o ro,remount -t yaffs2 /dev/block/stl9 /system` # remount to read-only
`exit` # get out of su
`exit` # get out of the shell
Add your Exchange account as normal.
NOTE: You will get a message saying you have to accept the server security policy, however I did not actually have to do so.
OPTIONAL: Add the "Email" icon back to the touchwiz launcher (unless you'd rather use something else):
Applications -> {Context menu} -> View Type -> "Customizable Grid"
{Context menu} -> Edit
Drag the Email icon down to the launcher bar where it used to be (or customize it with something else ... only the middle 2 launcher icons are configurable, Phone and Applications/Home will be locked)
{Context menu} -> Save
OPTIONAL: Switch back to Alphabetical List or Alphabetical Grid via the "View Type" setting.
To be sure you have things working, it is a good idea to reboot. See note below.
NOTE: Originally I had a few random shutdowns after finishing the above, might be unrelated (I'm a little worried I got -another- phone with that problem after warranty replacement). They went away after I did a battery removal and charged to 100% before powering on. If you get a random shutdown, do this. However I'm not adding this as a required step since I was later able to upgrade without even needing a reboot. It may have been something that corrupted when removing the initial .odex file, which was not needed as I kept testing new versions.
Thank you!
There are pre-built APKs posted all over XDA, some modified from Stock Android 2.2, some Android 2.3 and some from CM7. I have tried them all before. But all of them lacking a lot of exchange specific features like Out of Office settings, peak/off peak schedule and move mail to folders etc. The stock email client from Samsung actually quite feature packed.
calestus said:
Thank you!
Click to expand...
Click to collapse
Very welcome
As an update I've been running this email package since posting and have had zero issues. Just in case someone reading this is worried about problems.
Awesome, thanks...
I recently got a Captivate myself, and found when I updated to Froyo I could no longer add my Exchange account. I tried using the Email.apk you modded but was still unable to add my Exchange account. I had struggled with this same issue running Froyo on my old WinMo phone. In that instance using the mods from this post I was able to get Froyo to work with my Exchange server, so I incorporated those changes (along with my own) and followed your directions for the Captivate.
After studying the output from smali I changed the method ProvisionDocWbxml() in com\android\exchange\adapter\ProvisionParser.smali to the following:
Code:
.method private parseProvisionDocWbxml()V
.registers 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.prologue
const/4 v5, 0x1
.line 64
const/4 v1, 0x0
.line 65
.local v1, minPasswordLength:I
const/4 v2, 0x0
.line 66
.local v2, passwordMode:I
const/4 v3, 0x0
.line 67
.local v3, maxPasswordFails:I
const/4 v4, 0x0
.line 68
.local v4, maxScreenLockTime:I
const/4 v7, 0x1
.line 72
.local v7, supported:Z
const/4 v6, 0x0
.line 74
.local v6, isDevicePasswordRequired:Z
.line 139
new-instance v0, Lcom/android/email/SecurityPolicy$PolicySet;
invoke-direct/range {v0 .. v5}, Lcom/android/email/SecurityPolicy$PolicySet;-><init>(IIIIZ)V
iput-object v0, p0, Lcom/android/exchange/adapter/ProvisionParser;->mPolicySet:Lcom/android/email/SecurityPolicy$PolicySet;
.line 141
return-void
.end method
The original mod from the mentioned post worked in the past, but this should bypass the checking altogether and simply create a security policy with the default settings of nothing. I'm not anywhere near 100% sure this is clean, and it could probably be tweaked further (for one it appears like it's allocating 10 memory registers but only 8 are being used now, and v6 isDevicePasswordRequired isn't being used either). If the Email app would actually tell me what policy the phone doesn't support I would have just taken that one out instead of disabling the security entirely.
I continued following the directions in the first post. Once I added classes.dex into the apk I signed it following the instructions here and optimized it with the zipalign tool. On the WinMo Android I wasn't able to run the apk without signing it so I didn't even try here.
With the new apk I was able to add my Exchange account. It's been working now for a couple hours. The only issue I've noticed so far is the account name in the Mail app itself was showing [email protected] (I put this in as the email address when I added the account to get to the server settings screen, since my email address and username aren't related). I changed the account name in the account properties but it didn't update it. Removing the account and adding it back with the correct information fixed it.
All the standard caveats apply... like jahfry said, you may be violating your corporate email policies by doing this. At the very least set some sort of password on your device.
It works for the Verizon Samsung Fascinate too!!
Running EB01 Deoxed with EB16 kernel. rooted
Here's what I did:
1. removed exchange account and selected "none" under security setting.
2. using RootExplorer went to /system/app and renamed email.apk to email.apk.old.
3. copy op's email.apk to /system/app
4. reboot, then added exchange account, accepted both terms of use and administrative security agreements. I was NOT asked to set pin and when i wake up the phone it goes right to puzzle lock!!
No More PIN every time the phone sleeps.
Huge thanks to the OP for this!
Just wanted to add, settings stayed intact after another manual reboot!
Thanks again OP!
For what it's worth....
Just an FYI for you guys, I work in IT (as I'm sure many of you do) and we have Exchange policies pushed out to any phone getting email for HIPPA reasons. We recently had a user lose their phone, and after finding that they had disabled the security on they phone (we test to confirm functionality at time of configuration, so we knew it WAS working), they were immediately terminated (all users who receive email on their phones must sign an agreement that they understand the policies and will abide by them).
I know it's a bit of a pain, but weigh that against unemployment in this economy.
Luckily I don't have to contend with HIPPA issues (except for that tediously boring training seminar) or a signed agreement, though that by no means justifies disabling the security. I completely understand the ramifications of doing this and if I could leave the policies intact and continue to access email on my device I would. I too work in IT and at least once a month have to wipe a device for one reason or another.
The thing that really irks me is I was able to sync my phone when it was running 2.1. After installing the "official" Samsung update for 2.2 my phone no longer supports features it had previously. Granted 2.1 was probably not supporting whatever particular policy is failing on 2.2, but they should have either added true support for the policy or left the "bug" intact.
I know I could put 2.1 back on the phone (at one point I even did so to make sure I could), but I like 2.2. And even though I have a password on my phone I imagine at the very least I'd get a good spanking if discovered by the security czar. Hopefully I don't work with anyone here Currently I've given up on the patched app and am exploring some of the other available email applications. Maybe Samsung will release another update that will fix this issue in the future (but who am I kidding).
This syncs up my mail quite well, but I get occasional force close when viewing messages, and consistent force close when hitting reply. So it's not really usable for me, at the moment.
Has anyone else had this problem, and if so how did you fix it?
Thanks!
I'm still using this on the Captivate with happiness. I decided I wanted to have it on my Nook Color, too. Unfortunately I didn't see CrEOF's post until after I got it done ... and I have about 6 hours to get to the airport ... so my Nook package is my original. However its working beautifully for me so I'm not going to worry about it.
My Nook is running CM7 7.10 beta3.1 with Dalingrin's .32 kernel ... however it looks like Email.apk hasn't been changes significantly in a long time so I'm betting this .apk will work with any CM7 (CyanogenMod) device, possibly any CM device, and possibly any AOSP device. The Samsung devices needed Touchwiz libraries but this one doesn't have those.
If you have a Samsung device with stock ROM, see the TOP POST for your .apk. The following is for almost everyone else:
http://www.easy-share.com/1915675065/Email.apk
Again ... don't use the link directly above if you're using a stock Samsung device with Touchwiz ... go to the top post for that.
ohnoezmahfone said:
This syncs up my mail quite well, but I get occasional force close when viewing messages, and consistent force close when hitting reply. So it's not really usable for me, at the moment.
Has anyone else had this problem, and if so how did you fix it?
Thanks!
Click to expand...
Click to collapse
I haven't seen that problem at all, and haven't been getting reports of bad issues with the mod. Are you running the 2.2 Froyo version of the Samsung Captivate stock firmware? Might be library incompatibilities with the 2.1 Eclair version.
Otherwise I'd recommend:
* re-downloading and re-installing to make sure there was no corruption
* using Clockwork Mod or something similar to clear your Dalvik cache just to be sure
Not sure past that. Good luck
I just loaded Cognition 5 v2 (2.3.3) on my Captivate. Any chance this will work on it?
Wow. Sorry for the long delay in replying. It should work on Gingerbread ROMs just fine.
After jumping from 2.2 to a couple of ICS ROMs (which I knew this probably wouldn't work on ... and there are other mod'ed Email.apk versions out there for ICS ROMs anyway) ... I decided to go back to rooted stock. So, I just tested Email.apk out with my 2.3.5 stock install and ...
All seems to work just fine, without needing mods.
I don't think much changed in the Email app between 2.2 and 2.3.5 anyway, so I'm planning to just keep using this.

ROM AOKP JB 4.1.2 with Stock ICS Kernel (Droid 4 XT894)

AOKP JB Rom with Stock ICS Kernel
The one on rombot is a couple of days old so I have updated with one I build on 10/16.
Built from Hashcode and DHackers source. Give thanks to them!
Read this thread on how to install and thank Hashcode: http://forum.xda-developers.com/showthread.php?t=1886935
Link to Droid 4 folder with some roms, inverted gapps, safestrap, tools, etc:
https://www.dropbox.com/sh/mhmmrku5e4x8boj/hbd5BE-Nae or here: http://d-h.st/users/jsnweitzel
Use safestrap 3.05
Android 4.1.2
Working Camera now, no flash though.
As usually doing this stuff can break your device.
Thanks for this! Just finished DLing. Going to back up and test it out.
russia. megafon. No connection to the Internet. To create APN does not change anything.
hows the battery life?
For some reason every time I download the ROM then try to either install it safe-side on Safestrap 2.11 it won't open. I also notice that I'm unable to open the archive on my computer as thought the file is corrupt?
I just updated the op with a build I did this morning.
hi, i just flashed this ROM but i noticed my pictures from my SD card isn't showing up in my gallery, I tried googling it and its supposed to be a known issue for jellybean, i tried a few different things but nothing worked so now i'm using Quickpic.
but is there a way to connect the Quickpic app to the camera app or a way for the stock gallery app to rescan for all the pictures?
I don't seem to be having any trouble with reading my pics from the external sdcard.
The keyboard lights don't come on after the phone wakes up.
AOKP GSM edition, stock kernel. works fine.
http://d-h.st/rFH
olegfusion said:
AOKP GSM edition, stock kernel. works fine.
http://d-h.st/rFH
Click to expand...
Click to collapse
I didn't get mobile data with your build until editing build.prop.
Code:
--- build.pbak
+++ build.prop
@@ -139,7 +139,7 @@
# could use this property too. IKMAIN-732
#1 this is verizon wireless globle phone
#0 this is not verizon wireless globle phone
-ro.mot.phonemode.vzwglobalphone=0
+ro.mot.phonemode.vzw4gobalphone=1
# END Motorola, nfjb73, 21-jun-2010, IKMAIN-732
# BEGIN Motorola, nfjb73 23-jun-2010, IKMAIN-624
@@ -325,8 +325,7 @@
ro.cdma.subscribe_on_ruim_ready=true
persist.sys.moto_oem_telephony=false
persist.sys.moto_imsi_fix=false
-ro.config.not_world_phone=true
-
+ro.config.not_world_phone=false
#
# ADDITIONAL_BUILD_PROPERTIES
#
@@ -357,3 +356,13 @@
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
+
+ro.ril.hsxpa=3
+ro.ril.gprsclass=12
+ro.ril.hep=1
+ro.ril.enable.dtm=1
+ro.ril.hsdpa.category=28
+ro.ril.enable.a53=1
+ro.ril.enable.3g.prefix=1
+ro.ril.hsupa.category=7
+
Not sure the ro.ril settings were absolutely needed. But no APNs showed up until I changed the world mode settings.
Also something is wrong with your keymap. The capslock and OK buttons don't do anything in Connectbot. OK should be DPAD Enter. CapsLock could be ALT, since it's not really needed for itself. (Shift-Shift is already caps lock after all.)
I don't think the caps lock and ok key work in any of the jb roms. You can double click the shift key for all caps. Anyone have them working?
Never mind the build.prop settings, they may be a red herring. It looks like every other reboot, data fails because the RIL is unable to read the IMSI because the SIM card isn't ready yet when it tries.
I've also found that I can successfully reset the RIL and get data working by going into Airplane mode, then in a root shell kill the existing rild, which forces it to restart. After it restarts toggle back out of Airplane mode and data is working.
Back to keymaps - also the arrow keys are all set to the wrong directions. I've manually edited my omap4-keypad.kl file to fix these issues.
jsnweitzel said:
I don't think the caps lock and ok key work in any of the jb roms. You can double click the shift key for all caps. Anyone have them working?
Click to expand...
Click to collapse
After I straightened out the arrow keys, the OK key started working as usual in Connectbot. It must have been looking for a particular layout and giving up when it didn't see what it expected.
I've found that setting CapsLock to Alt doesn't actually do anything useful, probably because nothing in the Keymaps file has anything defined for its Alt position.
Oh, and the CapsLock key wasn't working because the file had "CAPS" but the correct keyword is "CAPS_LOCK" - so it's working for that on mine now.
The SYM key used to bring up a dialog box with special characters, now it just brings up a dialog to select Input Method. That appears to be a JB-specific thing. Makes it pretty useless.
highlandsun said:
After I straightened out the arrow keys, the OK key started working as usual in Connectbot. It must have been looking for a particular layout and giving up when it didn't see what it expected.
I've found that setting CapsLock to Alt doesn't actually do anything useful, probably because nothing in the Keymaps file has anything defined for its Alt position.
Oh, and the CapsLock key wasn't working because the file had "CAPS" but the correct keyword is "CAPS_LOCK" - so it's working for that on mine now.
The SYM key used to bring up a dialog box with special characters, now it just brings up a dialog to select Input Method. That appears to be a JB-specific thing. Makes it pretty useless.
Click to expand...
Click to collapse
Can you email me these changes so that I can merge them into the mainline? Or feel free to submit a pull request on github?
highlandsun said:
Never mind the build.prop settings, they may be a red herring. It looks like every other reboot, data fails because the RIL is unable to read the IMSI because the SIM card isn't ready yet when it tries.
I've also found that I can successfully reset the RIL and get data working by going into Airplane mode, then in a root shell kill the existing rild, which forces it to restart. After it restarts toggle back out of Airplane mode and data is working.
Back to keymaps - also the arrow keys are all set to the wrong directions. I've manually edited my omap4-keypad.kl file to fix these issues.
Click to expand...
Click to collapse
On the RIL settings for GSM:
I can enable the new build.prop values DHacker has been working on which add the same data toggles specifically for these fixes. Allows the user to enable/disable certain RIL features via settings until it works right.
Hashcode said:
Can you email me these changes so that I can merge them into the mainline? Or feel free to submit a pull request on github?
Click to expand...
Click to collapse
PM'd you the diff. Let me know if you'd prefer it some other way.
Hashcode has put a new build up here: http://goo.im/devs/Hashcode/maserati/aokp/STOCK-JB-aokp_maserati_unofficial_Oct-18-12.zip
Haven't found a changelog. Anyone tried this on GSM yet. Does it work, or do we have to wait for Olegfusion to do his magic?
Lum_UK said:
Hashcode has put a new build up here: http://goo.im/devs/Hashcode/maserati/aokp/STOCK-JB-aokp_maserati_unofficial_Oct-18-12.zip
Haven't found a changelog. Anyone tried this on GSM yet. Does it work, or do we have to wait for Olegfusion to do his magic?
Click to expand...
Click to collapse
Hope in the changelog the earpiece volume is fixed, it is way too low. I end up having to put people on speaker phone just to hear them.
Just wanted to give this thread a bump and say THANK YOU to jsnweitzel for throwing these new builds out and feeding my crack flashing addiction!

[MOD] Volume wake mod for Android 4.4

Hi! first sorry for my bad english
There is a modificate android.policy.jar to wake the device with volume keys.
Simply replace "/system/framework/android.policy.jar" with this and set permisions to 644 (Very important!)
Tested with AOSP KitKat 4.4 for Nexus S - alpha Build 2 and build 3
Volume wake mod for Android 4.4
I cannot make it stick. Can you be more specific with your step by step procedure please? Every time I change the permission and reboot, nothing happens. It just returns to it's original setting from 644 to 0770. I definitely need this feature on AOSP 4.4, coz I don't wanna burden my previously repaired button so much. Thanks, noobie btw. =)
Good job !
killswitch70 said:
I cannot make it stick. Can you be more specific with your step by step procedure please? Every time I change the permission and reboot, nothing happens. It just returns to it's original setting from 644 to 0770. I definitely need this feature on AOSP 4.4, coz I don't wanna burden my previously repaired button so much. Thanks, noobie btw. =)
Click to expand...
Click to collapse
I downloaded a file explorer with root options, es file explorer for example, mount your system partition with read/write permisions and replace this file in system/framework. then change the permisions in properties and reboot.
javi851 said:
I downloaded a file explorer with root options, es file explorer for example, mount your system partition with read/write permisions and replace this file in system/framework. then change the permisions in properties and reboot.
Click to expand...
Click to collapse
I'm now currently running the unofficial cm 11 on my nexus s, will it work on that too? Having used the aosp ver, I'll try this again if I still couldn't get the volume wake mod I'm trying to look for. Thanks for your patience.:good:
Not working on unofficial cm11
Sent from my Nexus S using Tapatalk
DarkShadow69 said:
Not working on unofficial cm11
Sent from my Nexus S using Tapatalk
Click to expand...
Click to collapse
Post "android.policy.jar" of your unofficial cm11 here and I will try to modify, but I don't know if it work
PD: CM11 hasn't got this option?
javi851 said:
Post "android.policy.jar" of your unofficial cm11 here and I will try to modify, but I don't know if it work
PD: CM11 hasn't got this option?
Click to expand...
Click to collapse
CM11 Euroskank has it.. Just pull the file from that ROM..
Sent from my Nexus S using XDA Premium 4 mobile app
javi851 said:
Hi! first sorry for my bad english
There is a modificate android.policy.jar to wake the device with volume keys.
Simply replace "/system/framework/android.policy.jar" with this and set permisions to 644 (Very important!)
Tested with AOSP KitKat 4.4 for Nexus S - alpha Build 2 and build 3
Click to expand...
Click to collapse
does this work on nexus 5 stock android 4.4?
in stock 4.4, android.policy.jas has been seperated with an odex file.
many thanks for the modification.
hk_aquarius said:
does this work on nexus 5 stock android 4.4?
in stock 4.4, android.policy.jas has been seperated with an odex file.
many thanks for the modification.
Click to expand...
Click to collapse
Make a backup and give it a try, or try the cm11 policy jar
Sent from my Nexus S using XDA Premium 4 mobile app
can you add Advanced 4 Way Reboot Menu
javi851 said:
Hi! first sorry for my bad english
There is a modificate android.policy.jar to wake the device with volume keys.
Simply replace "/system/framework/android.policy.jar" with this and set permisions to 644 (Very important!)
Tested with AOSP KitKat 4.4 for Nexus S - alpha Build 2 and build 3
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2536321
it work on a3
hanflang said:
http://forum.xda-developers.com/showthread.php?t=2536321
it work on a3
Click to expand...
Click to collapse
Thanks, I test it
javi851 said:
Hi! first sorry for my bad english
There is a modificate android.policy.jar to wake the device with volume keys.
Simply replace "/system/framework/android.policy.jar" with this and set permisions to 644 (Very important!)
Tested with AOSP KitKat 4.4 for Nexus S - alpha Build 2 and build 3
Click to expand...
Click to collapse
Hi there javi851,
Very useful mod!
Could you please answer the following questions for me, as I am trying to replicate this for Nexus 5:
1. What modifications have you made to android.policy.jar file?
2. What was the process you followed to make these modifications?
3. Is this an odexed or deodexed android.policy.jar file?
Many thanks for your help, it is much appreciated
Sent from my Nexus 5 using Tapatalk
I can confirm that this doesn't work on stock android 4.4. Probably because there is an odex file as well?
~S
wilskywalker said:
Hi there javi851,
Very useful mod!
Could you please answer the following questions for me, as I am trying to replicate this for Nexus 5:
1. What modifications have you made to android.policy.jar file?
2. What was the process you followed to make these modifications?
3. Is this an odexed or deodexed android.policy.jar file?
Many thanks for your help, it is much appreciated
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
This file works on deodexed roms.
I followed this guide with some variations: http://forum.xda-developers.com/showthread.php?p=18452084
in point 5 made this:
5. Navigate to android.policy.jar.out\smali\com\android\internal\ policy\impl\PhoneWindowManager.smali
6. Search for .method private isWakeKeyWhenScreenOff(I)Z
A few lines down will be 0x18 -> :sswitch_0 and 0x19 -> :sswitch_0
Delete both these lines. It should look like this towards the bottom near .end method:
PHP Code:
.sparse-switch
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
.end sparse-switch
.end method
10. From the command line, type "java -jar smali-1.2.8.jar -o classes.dex out". You now have a new classes.dex that has your modification.
11. Open android.policy.jar file on your desktop with 7zip and insert the new classes.dex file.
12. Copy the new file to your phone (system\framework folder, ensure that you set proper permissions (chmod 644 or set permissions to rw-r-r)) and reboot.
javi851 said:
This file works on deodexed roms.
I followed this guide with some variations: http://forum.xda-developers.com/showthread.php?p=18452084
in point 5 made this:
5. Navigate to android.policy.jar.out\smali\com\android\internal\ policy\impl\PhoneWindowManager.smali
6. Search for .method private isWakeKeyWhenScreenOff(I)Z
A few lines down will be 0x18 -> :sswitch_0 and 0x19 -> :sswitch_0
Delete both these lines. It should look like this towards the bottom near .end method:
PHP Code:
.sparse-switch
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
.end sparse-switch
.end method
10. From the command line, type "java -jar smali-1.2.8.jar -o classes.dex out". You now have a new classes.dex that has your modification.
11. Open android.policy.jar file on your desktop with 7zip and insert the new classes.dex file.
12. Copy the new file to your phone (system\framework folder, ensure that you set proper permissions (chmod 644 or set permissions to rw-r-r)) and reboot.
Click to expand...
Click to collapse
That's right!
THanks for this
game android
javi851 said:
This file works on deodexed roms.
I followed this guide with some variations: http://forum.xda-developers.com/showthread.php?p=18452084
in point 5 made this:
5. Navigate to android.policy.jar.out\smali\com\android\internal\ policy\impl\PhoneWindowManager.smali
6. Search for .method private isWakeKeyWhenScreenOff(I)Z
A few lines down will be 0x18 -> :sswitch_0 and 0x19 -> :sswitch_0
Delete both these lines. It should look like this towards the bottom near .end method:
PHP Code:
.sparse-switch
0x1b -> :sswitch_1
0x4f -> :sswitch_1
0x55 -> :sswitch_1
0x56 -> :sswitch_1
0x57 -> :sswitch_1
0x58 -> :sswitch_1
0x59 -> :sswitch_1
0x5a -> :sswitch_1
0x5b -> :sswitch_1
0x7e -> :sswitch_1
0x7f -> :sswitch_1
0x82 -> :sswitch_1
0xa4 -> :sswitch_0
.end sparse-switch
.end method
10. From the command line, type "java -jar smali-1.2.8.jar -o classes.dex out". You now have a new classes.dex that has your modification.
11. Open android.policy.jar file on your desktop with 7zip and insert the new classes.dex file.
12. Copy the new file to your phone (system\framework folder, ensure that you set proper permissions (chmod 644 or set permissions to rw-r-r)) and reboot.
Click to expand...
Click to collapse
Hi buddy,
Thank you very much for this, very helpful!!
I do not understand that how to use it

[Q] is there a mod for CM12 5.0.2 on screen buttons?

is there a mod for CM12 5.0.2 on screen buttons? Please the home button is dead so I need on screen buttons and plus there look really cool lol
edit your /system/build.prop (use CM file manager), and add this line:
Code:
qemu.hw.mainkeys=0
that's it, reboot and you will have on-screen "navigation bar".
andrei53 said:
edit your /system/build.prop (use CM file manager), and add this line:
Code:
qemu.hw.mainkeys=0
that's it, reboot and you will have on-screen "navigation bar".
Click to expand...
Click to collapse
Doesn't work, always says denied
Edit: changed to r/w changed prop now nothing appears after s3 mini logo. Just blank screen
brooker88 said:
Doesn't work, always says denied
Click to expand...
Click to collapse
You need to use a text editor that supports root access mode.
Use CM's built-in File Manager and its editor. To enable root access, go to Settings -> General Settings -> Access Mode, and pick something other than "safe".
andrei53 said:
You need to use a text editor that supports root access mode.
Use CM's built-in File Manager and its editor. To enable root access, go to Settings -> General Settings -> Access Mode, and pick something other than "safe".
Click to expand...
Click to collapse
Will try in a min thanks, do you know how I disable hardware keys after this? I can't stop them from lighting up, bln app doesn't work either
Edit: it worked thanks so much! Been trying for hours to get on screen keys ����
brooker88 said:
Will try in a min thanks, do you know how I disable hardware keys after this? I can't stop them from lighting up, bln app doesn't work either
Edit: it worked thanks so much! Been trying for hours to get on screen keys ����
Click to expand...
Click to collapse
To disable hardware button backlight, Settings -> Buttons -> Backlight.
There you can also set Recents Button -> both long and short press -> no action
The only thing not possible to disable currently is the back button.
andrei53 said:
To disable hardware button backlight, Settings -> Buttons -> Backlight.
There you can also set Recents Button -> both long and short press -> no action
The only thing not possible to disable currently is the back button.
Click to expand...
Click to collapse
I tried that already, and the bln app but still lights up. Guess its cause I'm using f kernel.thanks for all your help

[Q] Locked out of phone - No keyboard at "To start Android, enter your pin"

I'm rooted on 6.0.1 with xposed and twrp.
I've always used a pattern to lock my phone, and I've checked the box "require pattern to start device".
Last night I decided to switch to a pin vs a pattern for some reason.
I installed a new xposed module today (xposed gel settings for those curious).
When I restarted my device it prompted me to enter my pin. A cursor is displayed in the entry field, however, no keyboard is displayed.
You can hold down the cursor in the field and it vibrates, but does nothing.
I tried wiping the cache, restarting in safe mode, using android device manager.
You can select "Emergency Call" at bottom of screen and the dialer pops up.
Does anyone know what's causing this?
I'm not sure if it's one of my xposed modules causing the problem.
The only thing I can even think of that may be causing it is:
When I flashed twrp, I opted to keep my system read only.
For some reason that leads me to believe that the system folder (where I'm assuming google keyboard is located) isn't mounted at start-up and therefor the keyboard app isn't running yet. However since you can open the dialer to make an emergency call, I'm guessing this isn't a correct guess.
Any assistance would be wonderful. Thank you!
EDIT: Super late edit, but an OTG cable and keyboard fixed the issue. I can't remember if I figured out what the issue was.
No idea what's causing that. If you have an OTG cable about you could try connecting a usb keyboard to enter pin?
just so that you know, exposed cause many undocumented issues. issues that have no explanation are generally caused by exposed, if you have it installed. I recommend getting rid of closed and reflaahing your ROM.
and, setting up as read only could cause this issue as well. why would you do read only in your recovery? lol. you use the recovery to change things, read only can't change anything.
simms22 said:
just so that you know, exposed cause many undocumented issues. issues that have no explanation are generally caused by exposed, if you have it installed. I recommend getting rid of closed and reflaahing your ROM.
and, setting up as read only could cause this issue as well. why would you do read only in your recovery? lol. you use the recovery to change things, read only can't change anything.
Click to expand...
Click to collapse
I did it initially to make a nandroid backup of my phone with plans of changing it. I was never prompted to make it read/write and can't find it in settings.
neil_swann80 said:
No idea what's causing that. If you have an OTG cable about you could try connecting a usb keyboard to enter pin?
Click to expand...
Click to collapse
I plan on trying this once I get home. Hopefully it works. I'm not sure at what point in the boot process an external keyboard is considered an input method.
nioletmc said:
I did it initially to make a nandroid backup of my phone with plans of changing it. I was never prompted to make it read/write and can't find it in settings.
Click to expand...
Click to collapse
to make a nandroid backup, you need to change something(write to storage), so read only wouldn't be able to make a backup.
Had the same issue as OP, new Nexus 6 user and have always used pin but I've changed to pattern because of this, only way to start was to use an OTG adapter and a USB Keyboard to input pin, haven't had issues with pattern unlock with xposed or otherwise.
Try to flash a keyboard. Hopefully IME switcher is shown at this stage.
Try to find a keyboard apk and use the zip posted here:
http://forum.xda-developers.com/crossdevice-dev/sony/flashable-appsflash-apps-internal-t2809020
Maybe try disabling xposed. There are two different ways to disable xposed:
1. there is a way to disable Xposed during powerup by repeatedly pressing the a hardware key.. SEE here
http://forum.xda-developers.com/xpo...-modifying-t1574401/post51306764#post51306764
Code:
Quick explanation of the safemode: It was developed by [user=4322181]@Tungstwenty[/user] and makes it possible to disable Xposed by repeatedly pressing one of the hardware buttons during early startup. The phone will vibrate twice when the first key press has been detected. Then you have five seconds to press the same button four more times. Each key press will be confirmed with a short vibration; the final one with a long vibration. It creates /data/data/de.robv.android.xposed.installer/conf/disabled, which prevents most of Xposed's actions (e.g. no hooks are made and no modules are loaded). There's no 100% guarantee that this will get you out of a bootloop, but in most cases it should.
2. you can flash an xposed disabler zip file available in the xda xposed thread
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
Code:
If that doesn't work, you can flash the attached Xposed-Disabler-Recovery.zip by Tungstwenty. It will be copied to your (external) SD card when you install Xposed as well. The only thing it does is copying /system/bin/app_process.orig back to /system/bin/app_process, which you can also do yourself (e.g. with adb shell in recovery mode).
So, how did your adventure end? I hate to see a loose thread...

Categories

Resources