Editing android.policy.jar - Samsung Infuse 4G

I'm using CM9 5/2 version currently and seeking for a key remap.
A key user experience of ICS is multitasking but the 2 second delay on home button prevents me from using this function of Recent Apps. So I start to remap my search button to ics recent apps.
1: http://forum.xda-developers.com/showthread.php?t=1480887
[MOD][PORT]Search key to ICS recent apps for ICS Passion from Vibrant forum
2:http://forum.xda-developers.com/showthread.php?t=1450138
[HOWTO] Remap hardware button to ICS recent apps (which contains Java change instruction_
According to link2 I edited system/usr/keylayout/melfas_touchkey.kl and change search to recent apps, but it's not the ics style like long-press home button, it's gingerbread style recent apps. It seems to need some java change to support the change.
Among all the mods only link 1 make it work that search button->ICS recent apps. Link 1 provided excessive change and it mess the home button and power menu up. I deleted the key layout change part from Link 1 zip so the home button is fine, but how could I edit android.policy.jar in META-INF and system/framework?
Update May 17:
I finally decomplied the android.policy.jar into classes.dex, then I took out PhoneWindowManager.class and that's all I can see, can't edit it anymore.
Thanks

Troubleshooted installation failure problem, I simply copied the android.policy.jar to replace my old one and it's not working well either.. of cource not, any good idea?

Related

[Q] The application icons get jumbled

I am not sure if this is how android is designed to work. In the application launcher I have the view type set as 'customizable grid'. I rearranged the icons on to different pages to categorize them as per type of application. This left empty slots on pages which did not have enough icons to fit the complete page. All the changes were saved. Now if I power off my infuse and bring it up again I see that a lot of the icons do not stay where i fixed them before powering off. I would expect this setting or configuration to stay intact. Is it not supposed to work how I expect? Thanks for reading my post. My phone only has stock applications.
On a side note - Does android have capability of creating folders within the application launcher app. I know it can be done on the home screens.
i have a similar issue, it seems to be that applications that you pay for and have a free download with a pay key like rom manager on a reboot it loads the icon for the unlock key which disapears after you attemp to open it. it may be that the extra icon not being in the config file reapearing causes it to alter the configuration. i dont remember if this was always an issue and it minght be related to the modded launcher from gtg. try another twlauncher30 version. maybe one from the captivate/i9000 section, maybe the 5x4 app drawer version.

Ice Cream Sandwich Bluetooth Keyboard Shortcuts

Does anyone know where to find out all the shortcuts you can do with an external keyboard on Android 4.0? Things like the back button, home screen, etc. Thank.
Thread Necromancy, I know, but this is a serious question that remains unanswered. Here's the most info I've found:
Rootzwiki User Gr8gorilla posted a list of shortcuts that work with his Targus Bluetooth Keyboard (I'm editing the list for formatting, and adding more as I find them.)
ESC: Back (woo!)
Targus FN + F* keys: (edit: These only work with the specific model of Targus keyboard. Your FN key may only perform functions as labelled, test it to verify)
FN+F1: Search
FN+F8: play/pause music
FN+F7: Skip Prev
FN+F9: Skip Next
FN+F11: Volume -
FN+F12: Volume +
FN+ESC: Wallpaper, manage apps, system settings.
Alt+Tab - recent apps, task switcher (WOO!)
CTRL + Alpha keys:
Ctrl+A: Market (edit: this opens the "add to home screen" menu for me)
Ctrl+P: Settings
Ctrl+W: Wallpaper
Ctrl+M: Apps
In Browser: (edit: these work in other apps too, if they apply)
Ctrl+B: Bookmarks
Ctrl+A: Select all
Ctrl+C: Copy
Ctrl+V: Paste
Ctrl+W: Close current tab
Ctrl+T: Open new tab
Command/Windows button + : (edit: these commands work from anywhere, even in other apps)
Win+E: Launch Default Email App (brings up a choice dialog if necessary)
Win+A: Launch Calculator.apk
Win+S: Launch Messaging.apk (SMS App)
Win+C: Launch Contacts
Win+B: Launch Browser.apk (not your default browser, unfortunately)
Win+P: Launch Music.apk (not your default music player, unfortunately)
Win+L: Launch Calendar
Win+M: Launch Google Maps
From my own experience: the above work, other than the Targus-specific ones. I've tested them all. I'm looking for more, especially ways to activate "HOME", "MENU" and to open/close the notification drawer.
Also, you can edit your /system/usr/keylayout/qwerty.kl to change which key codes sent by the bluetooth keyboard activate various functions. This would be a rather involved hack, and may be specific to your hardware. Doing it wrong could compromise your ability to use your software keyboard. Also, it would be replaced whenever you flash a ROM, and possibly some smaller updates as well. Here's a guide to hacking keyboard layouts, though it's a bit old, and I haven't tested it. DO AT YOUR OWN RISK, but post your results either way!
I'm looking for a way to enable the Android SDK Emulator Shortcut Keys on real devices. It would give us that which we're missing.
Ctrl+W and Ctrl+T
In the stock browser:
Ctrl+W - closes the current tab
Ctrl+T - opens a new tab
There may be more of these that are similar to chrome shortcuts but those are the only two I really use.
erupe said:
In the stock browser:
Ctrl+W - closes the current tab
Ctrl+T - opens a new tab
There may be more of these that are similar to chrome shortcuts but those are the only two I really use.
Click to expand...
Click to collapse
Tested to verify. Works in Chrome as well. Added to the list above!
Thanks for coming up with that list. Really appreciate it.
I'd just like to clarify something: using an app called KeyEvent Display, free on Google Play, you can verify that Android is actually receiving keystrokes from your keyboard. I've tested every key on my keyboard, and found that they correspond exactly with /system/usr/keylayout/Generic.kl (fn key excluded, because that's handled by the keyboard itself, not passed to the OS).
I think the Android Framework doesn't know what to do with:
F-Keys
Mute
wow nice one.

[Mod][APP]Modded Original Messaging apps for carriage return (enter key) support!

Hate the smiley buttons and want to add new lines in your SMS without install a third party app?
I have managed to mod the messaging app in order to replace the smiley button with a return key:
More info in my
Original thread:
http://forum.xda-developers.com/showthread.php?t=1629929
Motorola Defy, CM7 @ 1Ghz + CM9 multiboot
[Guide] Install double boot CM7 + CM9
[Guide][Root needed] Unsimlock your Defy
[Mod/Fix][APP]Messaging apps with ENTER button enabled!
How is this different from Modified Mms.apk With Next Line (Enter Button) Support by mikko3024.
He's done it a long time back and supports CM9 and other versions too.
Paparasee said:
How is this different from Modified Mms.apk With Next Line (Enter Button) Support by mikko3024.
He's done it a long time back and supports CM9 and other versions too.
Click to expand...
Click to collapse
Oh i didn't know that existed :/. In addition it's less than a month old...
You may see through my threads history that i've been asking around about adding new lines many times ever since November last year, and thus have been working at it ever since.
This is a coincidence, i can prove my work and the investigations i did will be published as proof of good will.
Anyway i've just read the thread and unlike him i can do this to ANY Mms.apk.
I only see him proposing a solution for CM9.
Right know i have modded the Mms.apks from:
-CM7
-CM9
-Stock Motorola ROMs are coming soon
...And the list will continue growing.
Indeed this is a coincidence, i'm sorry for that, but yet again, i'm not simply proposing the same thing, i'm doing more apps.
Motorola Defy, CM7 @ 1Ghz + CM9 multiboot
[Guide] Install double boot CM7 + CM9
[Guide][Root needed] Unsimlock your Defy
[Mod/Fix][APP]Messaging apps with ENTER button enabled!

Remapping Dock Keys (alt/search swap + back-> escape + screenshot -> camera)

I finally rooted my device after 2 years... lol. I love the dock, but it always bugged me that the search button was were you normally would find alt and the back key wasn't escape. It made doing alt+tab and using escape in terminal really difficult. Here's a guide on how to remap all these 4 buttons on the hardware dock keyboard for the transformer infinity. I think this probably will work with the prime and other transformer docks as they seem to have all the same key codes. All you need is root and to follow this guide and you can customize almost anything you'd like.
Remapping Screenshot Key to Camera Key
Who needs a screenshot key?? I think it'll be more useful as a camera key. Unfortunately, this is a custom program that handles all the special keys on the top of the keyboard (wireless on/off, bluetooth, etc.). I had to edit the source and recompile this to get the camera button to work. No guarantee that it will work for you as you will need to compile custom code, but you can use my file. I compiled it for Zombi-Pop 5.1.1.
org.omnirom.asusdec.jar
Download that file to your tablet. Open a Terminal up and remount /system as read-writeable.
Code:
mount -o remount,rw /system
Back up your current /system/framework/org.omnirom.asusdec.jar and then overwrite it with the new file.
Reboot and your screenshot button now should launch the camera!
Remapping Other Keys
Remapping the standard keys is much easier to do. All you have to do is edit a .kl (keyboard layout) file. You can use my .kl file or modify it to your own liking. Here is my .kl file:
asusdec.kl
#1. remount /system as read-writable. Refer to above.
#2. Backup /system/usr/keylayout/asusdec.kl if you have that file.
#3. Upload the new asusdec.kl to /system/usr/keylayout/asusdec.kl.
#4. (optionally) open the file and edit it to your heart's content.
#5. Reboot and enjoy your new key layout.
Can you remap the browser key to open another browser other than stock?

Location "recent apps" button in .kl file

Hi, after determining the protocol to change the keyboard layout thanks to user birdie in this post, I remain unable to disable/remap my "recent apps" button in the navigation bar. (Another way to reach that goal would be the gravity box requires Xposed framework which is not yet compatible with my phone/firmware.)
For completeness:
Android 7.1.2
LineageOS version: 14.1-20180609-NIGHTLY-osprey
Phone: MotoG3.
In the original post referred to above, the recent button is said to be found in file
Code:
/system/usr/keylayout/synaptics_dsx.kl
However, that file does not exist (in that location) on my phone. The only two files that do exist are:
Code:
Generic.kl
AVRCP.kl
Hence I inspected both, and modified Generic.kl to
Code:
key 580 BACK VIRTUAL
key 581 HOME VIRTUAL
key 582 HOME VIRTUAL
So to be explicit, I remapped the "recent apps" button mapping, to home. However, it does not have any effect, neither after rebooting. Therefore, I have the following question:
Does anyone know in which file and under which key number the "recent apps" button is mapped, for the phone as detailed above?
Kind regards

Categories

Resources