I thought I'd offer my solution to disabling the hard key vibrations on the Atrix since other people might find this useful. This method differs from the other solutions in that it doesn't tamper with your Silent Mode vibrations (like StreakVibrations does) and it's code based, so it shouldn't tamper with any themes you have installed (like the framework-res.apk method). It is firmware dependent though since it's a code modification.
You'll need an android.policy.jar modified for your firmware.
What I'm doing is I'm modifying the method called performHapticFeedbackLw, and telling it to skip triggering the vibrate pattern for all effects (there are 5) except for keyboard taps. Long press vibe, virtual key vibe, safe mode disabled vibe, and safe mode enabled vibe will no longer trigger... Incidentally, does anyone know what safe mode on this phone refers to?
To use the file, you need to be on Bell, Telstra, GingerBlur, Gladiatrix or stock ATT 1.8.3 firmware, and be deodexed. Can you copy the file to your phone without being deodexed? I don't know. I'm a programmer, but an Android newbie so just to be safe it's best if you're deodexed.
Before you try anything, obviously make sure you are backed up. At least copy your existing android.policy.jar so that you can restore it if necessary.
All you need to do is either:
a) Run the novibes.bat script packaged in the zip. There are a couple prerequisites:
1. Make sure to set your USB connection to "None" on your phone.
2. On your phone, go to Settings > Applications > Development and make sure USB debugging is turned on.
3. Plug your phone into your PC and let it install any necessary drivers.
4. Then you can run novibes.bat.
or
b) Follow the steps outlined below to do it manually:
1. Replace /system/framework/android.policy.jar with the one that I've attached.
2. Make sure the permissions of the file are set to rw-r--r-- (thanks for reminding me, Meloy and for correcting, natboy!). The easiest way is to use Root Explorer, long press the file, choose permissions, and set owner: read/write, group:read, others:read. Otherwise, use Terminal and type "chmod 644 /system/framework/android.policy.jar" without the quotations.
3. Reboot.
For those not on stock Bell, I'd be willing to modify your android.policy.jar and post it here if you provide somewhere for me to download it, and specify what firmware it comes from. It's quite quick to do once you're set up so I don't mind. Alternatively, make the change yourself:
1. Download baksmali and smali (both .jars and scripts, total 4 files).
2. Copy /system/framework/ from your phone to your computer.
3. Copy all the files from step 1 to the framework directory from step 2 on your computer.
4. Unzip android.policy.jar and copy its classes.dex file to the framework directory on your computer.
5. From the command line, navigate to the framework directory and run "./baksmali classes.dex". It will create a directory named "out".
6. Open "out/com/android/internal/policy/impl/PhoneWindowManager.smali" in a text editor.
7. Search for a method called "performHapticFeedbackLw". Go to near the bottom of that method, and you will see the Dalvik bytecode representation of a switch statement:
Code:
.sparse-switch
0x0 -> :sswitch_27 #This is for long press vibe
0x1 -> :sswitch_35 #This is for virtual key vibe
0x3 -> :sswitch_38 #This is for keyboard tap vibe
0x2710 -> :sswitch_3b #This is for safemode disabled vibe
0x2711 -> :sswitch_3e #This is for safemode enabled vibe
.end sparse-switch
8. Here's an example of how you might want it to change. Basically you want to replace the original goto labels with one that causes the method to step out without triggering a vibe, and that notifies the calling method there was no vibe by returning false. The label to use is called ":cond_1d":
Code:
.sparse-switch
0x0 -> :cond_1d #This is for long press vibe
0x1 -> :cond_1d #This is for virtual key vibe
0x3 -> :sswitch_38 #This is for keyboard tap vibe
0x2710 -> :cond_1d #This is for safemode disabled vibe
0x2711 -> :cond_1d #This is for safemode enabled vibe
.end sparse-switch
9. From the command line in the framework directory, run "./smali -o classes.dex out". You now have a new classes.dex that has your modification.
10. Zip up the classes.dex with the META-INF directory from your original android.policy.jar. Rename the zip to android.policy.jar.
11. Copy the new file to your phone and reboot.
12. At this point you should be done.
Will this be possible on the AT&T atrix? I currently use the streak vibe method but I'd like this much better.
Sent from my MB860 using XDA App
n1ckr0th said:
Will this be possible on the AT&T atrix? I currently use the streak vibe method but I'd like this much better.
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1079873&page=3
Check out that thread over in general. The info for how to edit framework.res is there, but there is a flashable .zip that will disable the vibrations in either stock/rooted 1.83 or Gingerblur 3.5 for you.
bearsfan172 said:
http://forum.xda-developers.com/showthread.php?t=1079873&page=3
Check out that thread over in general. The info for how to edit framework.res is there, but there is a flashable .zip that will disable the vibrations in either stock/rooted 1.83 or Gingerblur 3.5 for you.
Click to expand...
Click to collapse
thank you, but i wonder if this specific method is possible on the atrix as to retain themes and such.
interesting that its in general, development may be a better home for it.
n1ckr0th said:
thank you, but i wonder if this specific method is possible on the atrix as to retain themes and such.
interesting that its in general, development may be a better home for it.
Click to expand...
Click to collapse
Yes, this would work perfectly fine on ATT. You can either follow the instructions I provided, or if you like you can post /system/framework/android.policy.jar from your phone somewhere and pm me the link so I can download it and I'll do it for you. Also mention what firmware you're on. I just don't want to download hundreds of MB of firmwares which is why I didn't set one up for all the ATT firmwares.
That other method requires editing a file that is guaranteed to change with any theme you install. That means anytime you change themes you'll need to edit that .apk yourself, or wait for someone to bring the change over. android.policy.jar is unlikely to change for themes.
Ok, I've posted a version for ATT 1.8.3 that was given to me by n1ckr0th.
n1ckr0th, let me know whether it works fine or not. There should be no problem, it looked just like the other 2 versions I modified.
Incidentally, he's using GingerBlur 3.5 so anyone on stock be careful (ie. copy your original file to somewhere else on your phone). It shouldn't matter at all because from what I see, there aren't any resources to modify in android.policy.jar so GingerBlur's should be the same as stock. At any rate, it won't brick your phone if you put the wrong one on. I put Telstra's on my phone by accident and it just messed up the the graphics on screen (maybe because the addresses were all wrong for my phone). You can still use adb, or sshdroid to copy and replace with your original android.policy.jar.
please delete
meloy said:
Don't use this on AT&T 1.83!
After the replace and reboot my phone was really laggy and some applications doesn't start anymore (camera, contacs for example). After i have replaced it with the original file i have still the same problem.
My phone config:
- SBF 1.83
- rooted (GingerBreak 1.20)
- sideloading enabled (GladEnabler)
- GladiAtrix 3 b0.2 ROM
- LauncherPRO
- GingerBread Theme only
Click to expand...
Click to collapse
What? That can't be right, if you still have the same problem after copying the original file, that means that you must have done something wrong. It's a single file change, provided you returned the file to the original, it will be back to the way it was. How did you copy the file? And also, are you deodexed? As mentioned in the original post, you have to be deodexed, because I don't know the results of using it on a non-deodexed system. Your posted config makes it sound like you might not be.
Sorry, my mistake. It is deodexed, I have just forgot to set the permissions to rw-r-r, you should maybe mention this in your start post. It's all working fine now. Thanks for the good work.
By the way, your mod (android.policy.att_1.8.3.zip) has added an "reboot" function to my phone, it is working well too.
meloy said:
Sorry, my mistake. It is deodexed, I have just forgot to set the permissions to rw-r-r, you should maybe mention this in your start post. It's all working fine now. Thanks for the good work.
By the way, your mod (android.policy.att_1.8.3.zip) has added an "reboot" function to my phone, it is working well too.
Click to expand...
Click to collapse
Haha, that's good. Had me scared for a moment, I didn't want to break anyone's phone!
Thanks for the tip, I'll mention that in the original post. Oh, and what do you mean by the reboot function...? Where did you access that? I certainly didn't add it, so it might be a mod added to GingerBlur?
maledyris said:
Oh, and what do you mean by the reboot function...? Where did you access that? I certainly didn't add it, so it might be a mod added to GingerBlur?
Click to expand...
Click to collapse
When i go to the phone options i have now these selection:
- Silent Mode
- Airplane Mode
- Power off
- Reboot
Yes, i think it is a GingerBlur mod. But it doesn't bother me, it is a good feature.
meloy said:
When i go to the phone options i have now these selection:
- Silent Mode
- Airplane Mode
- Power off
- Reboot
Yes, i think it is a GingerBlur mod. But it doesn't bother me, it is a good feature.
Click to expand...
Click to collapse
Interesting, that never occurred to me. I usually go into terminal and type in reboot to reboot my phone. I think I'll add that to my phone too...
maledyris said:
Haha, that's good. Had me scared for a moment, I didn't want to break anyone's phone!
Thanks for the tip, I'll mention that in the original post. Oh, and what do you mean by the reboot function...? Where did you access that? I certainly didn't add it, so it might be a mod added to GingerBlur?
Click to expand...
Click to collapse
the reboot function is cooked into GingerBlur. for some reason my phone wouldnt boot after i replaced the file? i used root explorer and set the permissions to whats specified.
n1ckr0th said:
the reboot function is cooked into GingerBlur. for some reason my phone wouldnt boot after i replaced the file? i used root explorer and set the permissions to whats specified.
Click to expand...
Click to collapse
Hmm, how far does it get? Do you at least get to the boot animation? I notice that it may sit at the boot animation for a really long time after changing a file sometimes. Probably updating the cache or something. It's odd that it wouldn't work for you considering it's your file and it worked for meloy. How did you copy the file over?
If you try again, delete the original file, so you can be sure it's no longer there, then try the copy again.
I'm on AT&T 1.8.3. I followed instructions just as in OP (yes, including the proper setting of permissions), but I soon found a significant problem. Everytime I held down my power button in order to invoke the power options menu, instead of the menu popping up, my phone just freaked out (the screen quickly FADED to black and the phone rebooted). I did this about four times, and each time it happened exactly the same. So I brought back the original framework file, and now everything works fine.
Any ideas?
I have no problems with this mod. It works all fine.
Been waiting on this mod. Streakvibrations has me missing my notification vibes. Thank you
It gave me a red light on boot, stuck at Motorola logo for infinity. I booted into recovery and reflashed gb 3.5 to fix it. Ill try your idea of deleting it then moving the new one.
Sent from my MB860 using XDA App
EDIT: still didnt boot, had to flash again..
I'm getting the flashing red light and rebooting as well. I can't get into CWM though, going to have to flash a SBF. Only think I can think of is maybe the Dalvik cache needs to be wiped before rebooting?
Edit: I'm on an AT&T phone and used GB to deodex as well.. maybe it's not catching all the files..
lurchbyrep said:
I'm on AT&T 1.8.3. I followed instructions just as in OP (yes, including the proper setting of permissions), but I soon found a significant problem. Everytime I held down my power button in order to invoke the power options menu, instead of the menu popping up, my phone just freaked out (the screen quickly FADED to black and the phone rebooted). I did this about four times, and each time it happened exactly the same. So I brought back the original framework file, and now everything works fine.
Any ideas?
Click to expand...
Click to collapse
Are you on stock 1.83? Now that we know that android.policy.jar has some mods built into it for Gingerblur pseudo rom, the att 1.83 file I posted probably isn't ideal for stock users.
If you're on stock, maybe you could post your android.policy.jar somewhere and pm me the link to download. Then I could put together a pure stock att one when I get home.
Sent from my MB860 using XDA App
To get missing ("incompatible") apps to show up in the Market you will need to edit your build.prop.
You will need root (unlock your bootloader at htcdev.com) and Root Explorer (can do it through adb but Root Explorer is easier).
Open Root Explorer and go to /system and find build.prop. Long press on it and choose Open in Text Editor. Find these lines
ro.product.model=PH39100
ro.aa.modelid=PH3910000
ro.product.brand=cingular_us
ro.product.name=htc_holiday
ro.product.device=holiday
ro.product.board=holiday
and change them to
ro.product.model=HTC Pyramid
ro.aa.modelid=PG5811000
ro.product.brand=htc_wwe
ro.product.name=htc_pyramid
ro.product.device=pyramid
ro.product.board=pyramid
Press the Menu key, Save and Exit. Reboot.
I'm on RumRaider Beta 10 so I'll upload my build.prop if you want to just copy/paste it over your current one.
http://www.multiupload.com/YAMH40C8LW
EDIT:
Apparently, modifying this line
ro.product.device=holiday
Click to expand...
Click to collapse
Is causing issues with the camera making it take shots/recocrd in blue. So, I recommend still following the directions above, but only modify ro.product.device=holiday when you need to update/download apps and once done, change it back to ro.product.device=holiday to use the camera again.
Do not use these settings if you own a rogers/Bell HTC raider! Changing them will turn all of your X710a's pictures/video blue! I can not speak for other versions of the raider but the x710a is affected. I just figured this out after playing with all the settings in the camera app, and I even contemplated calling HTC!!! I had to revert the values back to original to get the camera to work normally.
Hmm, I noticed that issue to but just thought it was the Rom. That's interesting. Anyways, I fiddled around with the settings and discovered that it was this line that messing up the camera
ro.product.device=pyramid
So I'd recommend the switching this back to 'holiday' and when you need/want to download (or update) an app, simply switch this back to 'pyramid' and when your done restore it back to holiday.
What are the apps that we are expected to gain? Can you give us an idea what we are missing out on?
You can't know your limits until you exceed them.
The apps I gained were GTA3, Order and Chaos Online, Snapdragon GameCommand, and Desert Winds.
has anyone tried playing order and chaos after changing the file name back to correct the camera issue? I have read elsewhere that the game will give you issues on rooted devices
Spartoi said:
To get missing ("incompatible") apps to show up in the Market you will need to edit your build.prop.
You will need root (unlock your bootloader at htcdev.com) and Root Explorer (can do it through adb but Root Explorer is easier).
Open Root Explorer and go to /system and find build.prop. Long press on it and choose Open in Text Editor. Find these lines
ro.product.model=PH39100
ro.aa.modelid=PH3910000
ro.product.brand=cingular_us
ro.product.name=htc_holiday
ro.product.device=holiday
ro.product.board=holiday
and change them to
ro.product.model=HTC Pyramid
ro.aa.modelid=PG5811000
ro.product.brand=htc_wwe
ro.product.name=htc_pyramid
ro.product.device=pyramid
ro.product.board=pyramid
Press the Menu key, Save and Exit. Reboot.
I'm on RumRaider Beta 10 so I'll upload my build.prop if you want to just copy/paste it over your current one.
http://www.multiupload.com/YAMH40C8LW
EDIT:
Apparently, modifying this line
Is causing issues with the camera making it take shots/recocrd in blue. So, I recommend still following the directions above, but only modify ro.product.device=holiday when you need to update/download apps and once done, change it back to ro.product.device=holiday to use the camera again.
Click to expand...
Click to collapse
This method doesn't seem to work anymore.. in the play store it will still list it as incompatible.. unless there is something else needed to be done?
There's no feature in sounds or anywhere in settings. Also if I need device rooted to do that, please let me link to how to vid, as I've never done that.
As far as I kbow, if you have a G800F device you can do it using a custom kernel:
http://forum.xda-developers.com/galaxy-s5-mini/orig-development/kernel-custom-kernel-t3130662
For other models, probably using an Xposed module. Both need root.
Damn. I don't get it, why the f they removed it from settings after kitkat...
tried to activate in H with build.prop, and all the vibration was gone
Use SQLite editor. There is a database in package Settings storage named settings.db, find hapic_feedback_enabled name in system category and change the value from 0 to 1 then restart the phone. I think this will help ))
Hey peeps. New to the phone, but not the game. Seen the other thread about hotspot unlock, and basically the unsure-ness of it all. This method unlocked the hotspot on past Moto X's, and just confirmed the Z2 Force. Been on an old unlimited Sprint plan w/o hotspot for many years, have never had any issues using this. I do not know whether it works for other carriers. The below is a copy/past with minor changes from a post by @dbuning in the Moto X Pure forums.
Enable Wireless Tethering Rooted Moto Z2 Force
1. Modifying system files could render your device useless, so by continuing you’re assuming that risk
2. Using a root file explorer, navigate to /system/
3. (Optional) Make a copy of the build.prop
4. Open the build.prop file with a text editor
5. Add the following line to the bottom of build.prop file:
Code:
net.tethering.noprovisioning=true
6. Save the file and reboot your device
This has been confirmed to work with a Sprint Sim.
Also, after making sure it works after reboot......you can delete/remove/rename the Entitlement apk in /system/priv-app/ and that breaks some of Sprint being able to monitor what/how much your hot-spotting. I have and haven't many times over many years....never really noticed a difference. Keep in mind if for some reason they catch on or whatever, they cancel the contract. Been doing this since the OG Moto X was released without ever an issue. Anyway enjoy. :good:
What guide/program did you use to root? Thanks.
gokart2 said:
Hey peeps. New to the phone, but not the game. Seen the other thread about hotspot unlock, and basically the unsure-ness of it all. This method unlocked the hotspot on past Moto X's, and just confirmed the Z2 Force. Been on an old unlimited Sprint plan w/o hotspot for many years, have never had any issues using this. I do not know whether it works for other carriers. The below is a copy/past with minor changes from a post by @dbuning in the Moto X Pure forums.
Enable Wireless Tethering Rooted Moto Z2 Force
1. Modifying system files could render your device useless, so by continuing you’re assuming that risk
2. Using a root file explorer, navigate to /system/
3. (Optional) Make a copy of the build.prop
4. Open the build.prop file with a text editor
5. Add the following line to the bottom of build.prop file:
Code:
net.tethering.noprovisioning=true
6. Save the file and reboot your device
This has been confirmed to work with a Sprint Sim.
Also, after making sure it works after reboot......you can delete/remove/rename the Entitlement apk in /system/priv-app/ and that breaks some of Sprint being able to monitor what/how much your hot-spotting. I have and haven't many times over many years....never really noticed a difference. Keep in mind if for some reason they catch on or whatever, they cancel the contract. Been doing this since the OG Moto X was released without ever an issue. Anyway enjoy. :good:
Click to expand...
Click to collapse
Unlocked the bootloader via Motorola's procedure.
Boot to whatever twrp.img you choose= "fastboot boot xxxx.img"
While booted into twrp recovery, take a backup just incase. Then flash whatever twrp.zip you choose.
Reboot to recovery. Take another backup just in case. Then flash= SR5-SuperSU-v2.82-SR5-20171001224502.zip
Reboot.
Enjoy.
**Not responsible for anything at all if things go bad**
thanks
this finally made hotspot work on my sprint z2 force that i sim unlocked to att
Hi guys,
I was recently reverse engineering a package com.huawei.autoinstallapkfrommcc and trying to understand what it is doing.
From what I could see it looks like this service after system boots up, is checking what mobile carrier you are using and then loads a list of packages from file autoInstallAPK.xml and then installs/uninstalls them based on mcc and mnc codes.
I am wondering if this xml file can be used to bypass device security. However I can't find it on my device.
Could you please check if you have a file at
Code:
[ROOT]/System/etc/xml/autoInstallAPK.xml
and share it if it exists there?
Check your
/cust/vendor/country/xml/*.xml
&
/preload/model/vendor/country/xml/*.txt
Look also for :
APKInstallListEMUI5Release.txt
&
DelAPKInstallListEMUI5Release.txt
Share back your tweaks and findings
oslo83 said:
Check your
/cust/vendor/country/xml/*.xml
&
/preload/model/vendor/country/xml/*.txt
Look also for :
APKInstallListEMUI5Release.txt
&
DelAPKInstallListEMUI5Release.txt
Share back your tweaks and findings
Click to expand...
Click to collapse
I don't have such folders, did you mean main partition? I don't have root so I am quite limited.
Maybe this config file is included only in roms which come from mobile carriers like Verizon, T-Mobile etc.
So far what I think this package is reading from that xml is:
* package name
* apk path
* action type (install, uninstall, disable, maybe others)
* card info (probably sim card info/ carrier info)
Then this data is being processed (atm I don't fully understand the process flow but in general it goes through each element (app) described in the xml list and takes defined action depending on the carrier you have). Ofc whole process is not started untill system is booted and sim card present/installed.
I wonder why Huawei have implemented such service. Maybe to make it easier for carriers to install branding apps on EMUI? Maybe this is only used to install carrier config package to. Can't really tell at the moment.
However I see a potential use case where someone uses buffer overflow or other vunerability to alter/overwrite this xml file. This could allow someone to install malicious apps on the device.
I am now analyzing bytecode of the part that is parsing InputStream from xml to see if I have missed something.