[DONE] Trackpad to wake/unlock - Desire Android Development

I've managed to do some dirty hack to wake phone using trackpad.
It's kernel update so i believe it will only work with MCR r3.1 (which I am using)
Thank's to kingchris for his lockscreen apk mod this now should work:
Tested ONLY on MCR r3.1.
Do not flash on ANY Froyo roms
http://ponury.net/desire/tp-wake.zip - trackpad wakes, nothing unlocks
http://ponury.net/desire/tp-wake_unlock.zip - trackpad wakes, trackpad unlocks
http://ponury.net/desire/tp_power-wake_unlock.zip - trackpad + power wakes, trackpad unlocks
http://ponury.net/desire/tp-doubletap_wake_unlock.zip - trackpad wakes AND unlocks when pushed fast twice (slow push does nothing)
Here's that diff: (just a single line added )
Always send DPAD_CENTER event!
http://ponury.net/desire/oj_send_dpad_center_ev.patch - download
Code:
--- a/drivers/input/misc/gpio_matrix.c 2010-05-12 08:24:13.000000000 +0200
+++ b/drivers/input/misc/gpio_matrix.c 2010-06-17 08:05:08.223812817 +0200
@@ -162,6 +162,7 @@
need_send_spec_key = !pressed;
printk(KERN_DEBUG "%s: send key, pressed: %d\n",
__func__, need_send_spec_key);
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
}
}
#endif
Send DPAD_CENTER event when pushed twice (fast) when screen is OFF:
http://ponury.net/desire/oj_send_dpad_center_when_doubleclicked_ev.patch - download
http://ponury.net/desire/oj_send_dpad_center_when_doubleclicked_ev_mod.patch - download + mod to automatically unlock (this one is used in doubleclick mod)
Code:
--- a/drivers/input/misc/gpio_matrix.c 2010-05-12 08:24:13.000000000 +0200
+++ b/drivers/input/misc/gpio_matrix.c 2010-06-17 12:53:47.893816146 +0200
@@ -29,6 +29,8 @@
#include <linux/curcial_oj.h>
#endif
+extern struct wake_lock main_wake_lock;
+
struct gpio_kp {
struct gpio_event_input_devs *input_devs;
struct gpio_event_matrix_info *keypad_info;
@@ -118,6 +120,8 @@
unsigned short keyentry = mi->keymap[key_index];
unsigned short keycode = keyentry & MATRIX_KEY_MASK;
unsigned short dev = keyentry >> MATRIX_CODE_BITS;
+ static unsigned long last_jiffies = 0;
+ static bool sent = 0;
#ifdef CONFIG_OPTICALJOYSTICK_CRUCIAL
static unsigned need_send_spec_key = 1;
#endif
@@ -162,6 +166,18 @@
need_send_spec_key = !pressed;
printk(KERN_DEBUG "%s: send key, pressed: %d\n",
__func__, need_send_spec_key);
+ if (!wake_lock_active(&main_wake_lock) &&
+ pressed && jiffies - last_jiffies < 75) {
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
+ last_jiffies = 0;
+ sent = 1;
+ }
+ else if (!wake_lock_active(&main_wake_lock) && pressed)
+ last_jiffies = jiffies;
+ else if (wake_lock_active(&main_wake_lock) && sent) {
+ input_report_key(kp->input_devs->dev[dev], keycode, pressed);
+ sent = last_jiffies = 0;
+ }
}
}
#endif

bponury said:
Currently it works like that:
Push trackpad - WAKE
Push trackpad again - UNLOCK
MENU and POWER don't unlock screen anymore (no unwanted calls)
It's kernel update so i believe it will only work with MCR r3.1 (which I am using)
Click to expand...
Click to collapse
Maybe you could describe what you changed in the kernel?

a kernel update? In earlier builds I saw this being done through modifying the services framework for the ROM.

oclock said:
Maybe you could describe what you changed in the kernel?
Click to expand...
Click to collapse
I've changed drivers/input/misc/gpio_matrix.c and drivers/input/opticaljoystick/curcial.c
Also keyboard layout needs to be modified slightly (to disable power button wakeup)
ieftm said:
a kernel update? In earlier builds I saw this being done through modifying the services framework for the ROM.
Click to expand...
Click to collapse
It's my first android phone and I'm just learning how to deal with it
And to be honest - I don't have a slightest idea how to change frameworks, I suppose I just live in low-level world.
If this can be achieved by modifying framework than this thread is useless and admin should delete it.

bponury said:
If this can be achieved by modifying framework than this thread is useless and admin should delete it.
Click to expand...
Click to collapse
To some degree yes... Bu t no one posted how to disable the power button. Also no one worked out how to make the track ball work. Before now, it was only the home, menu and back keys that worked by editing the framework.
So dont give up yet.. you are on to something I tried to do and failed.

Konradwalsh said:
...
So dont give up yet.. you are on to something I tried to do and failed.
Click to expand...
Click to collapse
Well it's working... maybe it can be achieved simpler, but it works. Actually I suppose I could do any possible combination to wake/unlock (maybe without volume keys - I didn't try that...)

Well the fact that this was discussed earlier a little progress made, then nothing, and then you come along as a newbie to Android (first Android phone at least) with a possible solution, I think it's fair at least to grant you kudos for your work.
It definitely shouldn't be deleted. If it's stable then what's to say people shouldn't use it?
Even if this isn't the most elegant solution, it can at least be used as a base for future development.
Basically: nice work dude.

TheAshMan said:
Even if this isn't the most elegant solution, it can at least be used as a base for future development.
Click to expand...
Click to collapse
Why do you think that a kernel patch is not an elegant solution?
We have the kernel sources, we can compile it, we can patch it, we can transfer it to new kernels and so on.
Modifying the framework means deodexing the hell out of it, disassemble (smali) it, decrypt the listing, assemble it again and so on.
I think a small kernel patch could be a much more elegant solution, also because you don´t change your kernel as often as your underwear And you dont´t have to wait for a new service.jar (or whatever framework file has to be modified) each time the software is updated by the vendor.
However, because I don´t know what he changed, it could also be a not so elegant solution
Just my 2 cents.
Basically: nice work dude.
Click to expand...
Click to collapse
+1

well how do we do it ???? i want to do it with trackpad...post your guide here please, you can post links with space into the url till you have the necessary posts...
in addition can you tell us if you noticed difference in battery life ??? a xda member posted that since this is an optical trackpad it MIGHT be slept for battery reasons.

I want a trackball wakeup.
Can use other bouton : http://forum.xda-developers.com/showthread.php?t=683902&highlight=wake+phone+menu
mod for nexus: http://forum.xda-developers.com/showthread.php?t=645481

TheAshMan said:
Well the fact that this was discussed earlier a little progress made, then nothing, and then you come along as a newbie to Android (first Android phone at least) with a possible solution, I think it's fair at least to grant you kudos for your work.
Basically: nice work dude.
Click to expand...
Click to collapse
Thank you very much
oclock said:
Why do you think that a kernel patch is not an elegant solution?
Click to expand...
Click to collapse
Don't know what's elegant in android world I'm really new to this...
lambrospower said:
well how do we do it ???? i want to do it with trackpad...post your guide here please, you can post links with space into the url till you have the necessary posts...
in addition can you tell us if you noticed difference in battery life ??? a xda member posted that since this is an optical trackpad it MIGHT be slept for battery reasons.
Click to expand...
Click to collapse
Just flash zip like any other update (beware it was tested on MCR r3.1 - anything based on stock kernel should work (should) ). Also this update shouldn't have any impact on battery life it doesn't do anything active...
SiX-P4cK said:
I want a trackball wakeup.
Click to expand...
Click to collapse
You can have it - first post.

Nice, please post the diff with your changes.

How do you go back to default settings, once flashed ?

deovferreira said:
Nice, please post the diff with your changes.
Click to expand...
Click to collapse
A diff or just the modified files would also be more helpful than a kernel update to me.
@OP:Is it possible?

Very nice i really wish i could use this however my trackpad died yesterday and hasn't decided to come alive automatically!

Re: [DONE] Trackpad to wake
How do you go back to default settings, once flashed ?
Click to expand...
Click to collapse
Yeah it would be nice to be able to revert, anyone know how to get back?
-------------------------------------
Sent via the XDA taptalk app using my HTC Desire

Flash the stock kernel. I'd still like power button to work too. So i can use both trackpad and power. I can fix my trackpad but it only seems to last a few days at a time.

Excellent, works a treat for me, mcr 3.1.
Thankyou very much, I've wanted this for so long, the phone unlocks far too easy in my pocket with the power button.

Nice, thanks. Works with stock rooted kernel

Anyone tried this with a Froyo build? Will it work with Richards Defrost rom?

Related

PIE button remapper (not home page way, no more opening PIE :) )

Hi,
I found it very annoying to always close PIE after changing home page to opera.exe.
I don't know if somebody has already done it,(haven't found anything with searching) so here it is
And I am planning to rewrite my PIE button-> Ctrl remapper to WM6 so this was a great practice.
This program patches the already loaded keybddr.dll in memory by writing HKLM\Software\KeybPatch, PIEButton(string) value to keybddr.dll at 0x17120D4 adress.
Install :
--------
1. unzip kbpatch.zip and copy kbpatch.exe to Universal's \Windows\Startup
directory
2. Open your favourite registry editor and make KeybPatch key under
HKLM\Software.
3. Make PIEButton string value under HKLM\Software\KeybPatch with the path and executable to your new PIE button program.
For example on my Universal:
PIEButton(string) = \Program Files\Opera\opera.exe
LImitation : the length of the string must be smaller 55.
kbpatch.exe will warn you if you exceed this limit.
4. start kbpatch.exe. If everything is okay, this won't show you any notification.
5. Press PIE button
Your favourite program should start instead of PIE
Update ( PIE button --> Ctrl reassign howto)
---------------------------------------------------
1. Follow the above steps to install kbpatch.exe until point 2.
2. unzip simkey.zip and copy simkey.exe to Universal's
\Windows\StartUp directory
3. Make a new string value under HKLM\Software\KeybPatch.
PIEButton(string) = \Windows\StartUp\simkeys.exe
4. Change PieHomePage value under HKLM\HARDWARE\OEM\KEYBD to
the string "Ctrl"
5. Tap on kbpatch.exe
Tap on simkeys.exe (You will never have to do this again )
6. Try your new Ctrl button
Ctrl is sticky of course.
You can also try piectrl.cab. Just install and soft reset.
You can change PIEButton later, but to accept changes, you have to do a soft reset.
Envelope button reassign is coming soon
COOL! thanx!
hmm, makes me wonder, maybe now there's a way we could take control over the PIE button to map it as ALT key? (with PQz)
shlomki said:
COOL! thanx!
hmm, makes me wonder, maybe now there's a way we could take control over the PIE button to map it as ALT key? (with PQz)
Click to expand...
Click to collapse
Yes, It can be done.
The solution is very keybddr.dll dependant, but it's possible.
You can't do this with PQZ unless the author modify its code.
Source code
Okay, here is the source code :
( dedicated to g0dspeed , but I paste it here, so anybody who interested can see it )
Code:
int _tmain(int argc, _TCHAR* argv[])
{
WCHAR string[55];
WCHAR origstring[]=L"\\windows\\iexplore.exe";
HRESULT res;
if((res=RegistryGetString(HKEY_LOCAL_MACHINE,L"Software\\KeybPatch",L"PIEButton",string,54))==S_OK)
{
int size=wcslen(string);
string[size+1]=(WCHAR)L"\0";
DWORD *pointer = ((DWORD *)0x17120D4);
HINSTANCE hInst =LoadLibrary(L"keybddr.dll");
if(memcmp(pointer,origstring,21*2)==0)
{
DWORD oldProtect,old1;
VirtualProtect(pointer,size*2+1,PAGE_READWRITE,&oldProtect);
memcpy(pointer,string,size*2+1);
VirtualProtect(pointer,size*2+1,oldProtect,&old1);
}
else
{
MessageBox(NULL,L"I won't do anything :)\nYou are running this thingie on a wrong OS version or keybddr.dll is already patched.",L"Error",MB_OK);
}
FreeLibrary(hInst);
}
else
{
if(res==E_INSUFFICIENT_BUFFER)
MessageBox(NULL,L"Error copying registry string value to keybddr.dll\nThe string value is too long.(Max 49 chars)",L"Error",MB_OK);
else
MessageBox(NULL,L"Error copying registry string value to keybddr.dll\nMaybe the reg.value doesn't exists or type error occured.",L"Error",MB_OK);
}
return 0;
}
szilamer said:
Okay, here is the source code :
( dedicated to g0dspeed , but I paste it here, so anybody who interested can see it )
Click to expand...
Click to collapse
thanks a lot.
I think if kbpatch.exe could find 'windows\iexplore.exe' (by itself) start from where keybddr.dll loaded address (in keybddr.dll's file size), it worked well in any environment.
I changed value 0x17120d4 -> 0x148135c and worked at WM5-Uni O2 1.30.162 cooked ROM.
#I have only EVC4 and couldn't build new executable file so I patched oridinal kbpatch.exe...
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?
Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)
Any possible to have "Alt" key and "ESC" key at the same time?
Yeah..count my request too for remapping the messaging button
g0dspeed said:
thanks a lot.
I think if kbpatch.exe could find 'windows\iexplore.exe' (by itself) start from where keybddr.dll loaded address (in keybddr.dll's file size), it worked well in any environment.
Click to expand...
Click to collapse
That's a good idea. I think I will make it, maybe in next version
g0dspeed said:
#I have only EVC4 and couldn't build new executable file so I patched oridinal kbpatch.exe...
Click to expand...
Click to collapse
Evc4 is not a problem, only you have to change RegistryGetString, I think.
airya said:
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?
Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)
Any possible to have "Alt" key and "ESC" key at the same time?
Click to expand...
Click to collapse
Hmm, can you write me exactly how did you call pqz_key ?
( what parameters, what's your PIEButton value ? )
I haven't heard about this version of Pqz before ..
kdskamal said:
Yeah..count my request too for remapping the messaging button
Click to expand...
Click to collapse
OK, messaging button is not a problem
I think I can make a new version at the end of this week.
airya said:
szilamer, Thanks.
Is it possible also to remap MessageCenter and OK button?
Now i have "Ctrl" key with kbpatch + PQz_KEY(http://www.nicque.com/PQz/PQz_KEY.htm)
Any possible to have "Alt" key and "ESC" key at the same time?
Click to expand...
Click to collapse
I've tried that pqz_keys but I think it's not good for this job.
You cannot make it to send a keyup message, so you will have a stuck ctrl button. Try simkey instead
Or do you know a trick for pqz_keys, that I don't know ?
I've set the IE button up to Opera as instructed which works great thanks.
However, am I missing something in wishing that clicking a link in a message would open up Opera rather than PIE as it still does?
szilamer said:
I've tried that pqz_keys but I think it's not good for this job.
You cannot make it to send a keyup message, so you will have a stuck ctrl button. Try simkey instead
Or do you know a trick for pqz_keys, that I don't know ?
Click to expand...
Click to collapse
Yes, I got same problem with "key up" after my post.
I never heard about "simkey", any link?
airya said:
Yes, I got same problem with "key up" after my post.
I never heard about "simkey", any link?
Click to expand...
Click to collapse
Simkey is my program
You can download it from the first post.
It currently accepts two type of parameters: Ctrl and Alt.
( Compiled directly for this task )
grayme said:
However, am I missing something in wishing that clicking a link in a message would open up Opera rather than PIE as it still does?
Click to expand...
Click to collapse
I don't know a good answer for this.
Maybe I would try to modify file associations in the registry...
szilamer said:
Simkey is my program
You can download it from the first post.
It currently accepts two type of parameters: Ctrl and Alt.
( Compiled directly for this task )
Click to expand...
Click to collapse
Cool! thanks.
Done as per the instructions on first page with "kbpatch". No errors, warnings but PIE button does not work at all now. Tried to put both - way to LNK file of Opera and full route to opera.exe - same result. Neither Opera starts now nor PIE. Anu suggestions?
tsoifun said:
Done as per the instructions on first page with "kbpatch". No errors, warnings but PIE button does not work at all now. Tried to put both - way to LNK file of Opera and full route to opera.exe - same result. Neither Opera starts now nor PIE. Anu suggestions?
Click to expand...
Click to collapse
Which ROM do you have ? WM5 or WM6 ?
szilamer said:
I don't know a good answer for this.
Maybe I would try to modify file associations in the registry...
Click to expand...
Click to collapse
Glad it is not just me with this issue, any progress?
I won't do anything
Click to expand...
Click to collapse
Jwjwr... WM6 ROM WWE 2.02
And I can't copy keybddr.dll to search "iexplore.exe" string in it cause it's locked!
Went to download "ROM kitchen" ...

A fix for POLA100, Haret and waiting for notbusy error

I think that this error needs no intorduction for POLA100 users who tried running latest Android kernels using Haret.
It also seems that this error is caused by the double vibration at the beginning of boot process and was solved once by paipo (see this post) by commenting out the vibration part and rebuilding. But those kernel is outdated and misses some latest features and fixes.
So I did the same as paipo but with the latest kernel from the git repository (as of 19.07.2010, revision d5d0a56fae6df779443a82e2d90b7ec8097cb332). zImage is attached to this post. I'll try to update the kernel from time to time.
Please, note that the attached kernel image is optimized for Eclair (CONFIG_ECLAIR=y in .config or System Type/Android Optimization is set to Eclair in make menuconfig).
And yes, you can do it yourself. Just follow the guide in the second post
Disabling the vibration and rebuilding the kernel yourself
So how do you do this?
First of all, follow the steps 1 to 4 of Building kernel For Vogue, Kaiser, and Polaris part from this guide to prepare your building environment.
Now you need to open the arch/arm/mach-msm/board-htcpolaris.c file in your favourite text editor.
Search for vibrate word (it was line 1019). You'll see something like this:
Code:
// vibrate
for (i=0; i<2; i++) {
while(msm_proc_comm(PCOM_VIBRA_ON,0)==-EAGAIN);
mdelay(150);
while(msm_proc_comm(PCOM_VIBRA_OFF,0)==-EAGAIN);
mdelay(75);
}
Remove this part or replace with the following:
Code:
// vibrate
// for (i=0; i<2; i++) {
// while(msm_proc_comm(PCOM_VIBRA_ON,0)==-EAGAIN);
// mdelay(150);
// while(msm_proc_comm(PCOM_VIBRA_OFF,0)==-EAGAIN);
// mdelay(75);
// }
As you can see, all lines now start with two slashes.
Now follow step 5 from the guide, mentioned above. You'll see a menu.
Go to System Type and select Android Optimization accroding to your needs. Then select Exit, than again Exit, then Yes.
Now follow step 6 from the guide. This will take some time. At the end you should see:
Code:
Kernel: arch/arm/boot/zImage is ready
Copy zImage from arch/arm/boot folder to \Storage Card\andboot folder on your device and use it
I update this option in the kernel.
Now double vibration is disable by default.
You are great !!!
leppa said:
I think that this error needs no intorduction for POLA100 users who tried running latest Android kernels using Haret.
...
Please, note that the attached kernel image is optimized for Eclair (CONFIG_ECLAIR=y in .config or System Type/Android Optimization is set to Eclair in make menuconfig).
And yes, you can do it yourself. Just follow the guide in the second post
Click to expand...
Click to collapse
YOU ARE GREAT !!!
THANKS A LOT A LOT A LOT !!!
THIS EVENING I WILL TRY SURELY !!!!!!!
Only a question: Optimized for Eclair is equal to Optimize to FROYO ?
Can I use your zImage to Froyo RLS 11 ?
Thanks in advance.
Bye
This flag now do nothing, so it's indifferent
GGGGGGGGGGGGGGRRRRRRRRRRRRRRRRRREEEEEEEEEEEEEEEEEAAAAAAAAATTTTTTT !!!!!!
I Have Just tested zImage in attached files.
Froyo seems better reactive, more smooth and rock stable.
Thanks a lot ...
When Video Playback will be solved... I will flash immediately Froyo to give a new life to my Cruise!!!
Thanks thanks thanks!
@foxct2005 : you can flash it month ago!
All these problems are only for haret!
l1q1d said:
I update this option in the kernel.
Now double vibration is disable by default.
Click to expand...
Click to collapse
This change isn't yet in the git repository, is it?
I was thinking about how to make this option available to any user without having to recompile the kernel. And came up with the idea of the new kernel parameter. So I added board-htcpolaris.no_boot_vibration parameter.
The attached kernel images work as they did before - with double vibration on boot and "waiting for notbusy" error. To disable the double vibration (and get rid of the error) add board-htcpolaris.no_boot_vibration=1 to default.txt so this line:
Code:
set cmdline "board-htcpolaris.panel_type=1 ppp.nostart=0 pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend clock-7x00.mddi=0xa51"
will look like this:
Code:
set cmdline "board-htcpolaris.panel_type=1 [COLOR="Red"]board-htcpolaris.no_boot_vibration=1[/COLOR] ppp.nostart=0 pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend clock-7x00.mddi=0xa51"
Adding this parameter is mandatory if you suffer from "waiting for notbusy" error.
big thanks for that patch!
I started a new try with android and my polaris yesterday but froyo doesn't work (with haret). Now with this patch it work and even booting and boot logo is much faster on my Pola200! Great! Thanks!
leppa said:
I was thinking about how to make this option available to any user without having to recompile the kernel. And came up with the idea of the new kernel parameter. So I added board-htcpolaris.no_boot_vibration parameter.
Click to expand...
Click to collapse
Good idea!
I have long think why developers not added it to the cmdline.
Thank you, thank you, thank you..
I almost sold my Polaris in despair that this problem will never get fixed..
DmK75 said:
Good idea!
I have long think why developers not added it to the cmdline.
Click to expand...
Click to collapse
I think, they have much more other, more serious, things to do
michasch said:
big thanks for that patch!
I started a new try with android and my polaris yesterday but froyo doesn't work (with haret). Now with this patch it work and even booting and boot logo is much faster on my Pola200! Great! Thanks!
Click to expand...
Click to collapse
nikiiv said:
Thank you, thank you, thank you..
I almost sold my Polaris in despair that this problem will never get fixed..
Click to expand...
Click to collapse
You're welcome
If this patch gets upstream, we will not need to rebuild the kernel every time a new build comes out. I already posted it in the Polaris Android Linux Kernel Development Project thread.
thanks leppa,
i tried the froyo one, but for me doesn't work. last days i used the last dzo one, it worked for 2 or 3 days, and now doesn't work again. the only zimage that works is the 29-04 one, but my battery doesn't like it so much
loscassapalle said:
thanks leppa,
i tried the froyo one, but for me doesn't work.
Click to expand...
Click to collapse
What do you mean by that? Do you still get "waiting for notbusy" error?
If yes, did you add the kernel parameter board-htcpolaris.no_boot_vibration=1?
If no, than I can't help, cause this is the only thing I changed in the kernel.
leppa said:
What do you mean by that? Do you still get "waiting for notbusy" error?
If yes, did you add the kernel parameter board-htcpolaris.no_boot_vibration=1?
If no, than I can't help, cause this is the only thing I changed in the kernel.
Click to expand...
Click to collapse
maybe is not my problem...i can't see an error string, the problem is the animation at the start that never end.
loscassapalle said:
maybe is not my problem...i can't see an error string, the problem is the animation at the start that never end.
Click to expand...
Click to collapse
Then this is some other problem. Cause "waiting for notbusy" error occurs almost at the very beginning of the boot process (while text is running, before even "Hold down Volume Up or DPad..." message).
How long do you wait? At first boot the animation may run for five and even more minutes. Try reinstalling from scratch (i.e., wiping system and data partitions).
leppa said:
Then this is some other problem. Cause "waiting for notbusy" error occurs almost at the very beginning of the boot process (while text is running, before even "Hold down Volume Up or DPad..." message).
How long do you wait? At first boot the animation may run for five and even more minutes. Try reinstalling from scratch (i.e., wiping system and data partitions).
Click to expand...
Click to collapse
i checked now, i also have this string that you said (now i'm using the froyo image you uploaded in 8# post).
the animation problem is strange. the zimage of 29-4 works, the animation ends in a few seconds, but the battery life is very short. the last dzo zimage worked for a couple of days, then i had the same problem after a softreset...and this one is the same...
EDIT: now it works... lol
loscassapalle said:
i checked now, i also have this string that you said (now i'm using the froyo image you uploaded in 8# post).
Click to expand...
Click to collapse
I didn't test the Froyo image, cause I'm playing with Eclair. Does it vibrate on start? It shouldn't or you forgot to put the kernel parameter.
loscassapalle said:
EDIT: now it works... lol
Click to expand...
Click to collapse
So, it started working?
leppa said:
I didn't test the Froyo image, cause I'm playing with Eclair. Does it vibrate on start? It shouldn't or you forgot to put the kernel parameter.
So, it started working?
Click to expand...
Click to collapse
i don't know how to edit the zimage...but now it works...i didn't change anything...
loscassapalle said:
i don't know how to edit the zimage...
Click to expand...
Click to collapse
You don't need to. I was talking about editing default.txt as I described in post 8.

[Q] Help building a small exe that changes a registry key on boot

My phone has bugged out and will not let me unlock it through the default pin unlock. I know the pin is correct, and it seems to be a pretty common problem with 6.5?
Now I know hard reset is the quickest way out of this mess, but I need to get to the texts I have received since i last backed up (3 days or so)
Can someone help me with the construction of an exe to change a registry key on boot, in particular
HKLM\Security\Policies\Policies\00001023: 1
I feel if I can get this key modified on boot I will be able to access my phone again.
Planning on shuffling it over to the phone into the startup folder.
Any thoughts?
snooparoop said:
My phone has bugged out and will not let me unlock it through the default pin unlock. I know the pin is correct, and it seems to be a pretty common problem with 6.5?
Now I know hard reset is the quickest way out of this mess, but I need to get to the texts I have received since i last backed up (3 days or so)
Can someone help me with the construction of an exe to change a registry key on boot, in particular
HKLM\Security\Policies\Policies\00001023: 1
I feel if I can get this key modified on boot I will be able to access my phone again.
Planning on shuffling it over to the phone into the startup folder.
Any thoughts?
Click to expand...
Click to collapse
I can make the exe for you but how do you plan to put it in the startup folder exactly?
Using a linux box, can see the phone as a drive despite the locked status.
Cheers
snooparoop said:
Using a linux box, can see the phone as a drive despite the locked status.
Cheers
Click to expand...
Click to collapse
haha, sounds like a good trick. the other thing: do you have a custom rom installed? stock rom may have cert checking in place before full boot up finished so the exe has to be signed with a cert that's already on the phone (default OEM or custom installed cert).
Stock Telecom NZ rom is installed
snooparoop said:
Stock Telecom NZ rom is installed
Click to expand...
Click to collapse
we will also have to deploy custom cert then.. we can try anyway, I'm curious to see if it can be done =) PM me.
Anybody else need the C++ code to do this? It follows.
Code:
//
// Regkey.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "Winreg.h"
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
DWORD Value=1;
HKEY RegKey;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("\\Security\\Policies\\Policies"),0,0,&RegKey)==ERROR_SUCCESS)
{
RegSetValueEx(RegKey,TEXT("00001023"),NULL,REG_DWORD, (unsigned char *) &Value ,sizeof Value);
RegCloseKey(RegKey);
}
return 0;
}
Originally from post #4 in here:
http://forum.xda-developers.com/showthread.php?t=648103
If activesync is operational, you should be able to use MS security policy manager, see
http://www.howardforums.com/showthread.php/1238095-Un-set-Exchange-enforced-PIN-length-amp-etc

[ROM] Default EU Android 2.3.5 EU 1.52 will be remove soon!

For those who just want a clean android 2.3.5(EU 1.52) without going thru all the process of flashing this & that. (This ROM will not do a auto wipe, flash it on CWM Recovery)
Fn+Y & Fn+P key bugs is fixed
A to wakeup screen
Default Android 2.3.5 for HTC ChaCha a810e (w fb key reassign)
Default Android 2.3.5 for HTC ChaCha a810e (w/o fb key reassign)
As there is FOTA of 1.54, i'll remove this soon. New version will direct link to:
http://forum.xda-developers.com/showthread.php?t=1336621 to keep the forum neat
***Mod pls help me close this post*** Thanks you!
do i need s-off or can you do a retail package
(like http://forum.xda-developers.com/showthread.php?t=1253062)
is it possible to integrate your package into this? (as i have goldcard i could update to everything but it needs to be in nbh or exe like the one above i could use with s-on!)
hashtowent said:
do i need s-off or can you do a retail package
(like http://forum.xda-developers.com/showthread.php?t=1253062)
is it possible to integrate your package into this? (as i have goldcard i could update to everything but it needs to be in nbh or exe like the one above i could use with s-on!)
Click to expand...
Click to collapse
Yes, u need to have s-off. As i mention file need to be flash thru cwm recovery.
For the hboot package part, i'm not sure how to do it. I'm still a beginner on all this stuff.
Sorry can't help much
e.japonica said:
For those who just want a clean android 2.3.5 without going thru all the process of flashing this & that. (This ROM will not do a auto wipe, flash it on CWM Recovery)
Fn+Y & Fn+P key bugs is fixed
A to wakeup screen
Default Android 2.3.5 for HTC ChaCha a810e
Click to expand...
Click to collapse
nice job but how did u slipstreamed 2.3.5 to existing base since 2.3.5 is from OTA update, correct?
ajeevlal said:
nice job but how did u slipstreamed 2.3.5 to existing base since 2.3.5 is from OTA update, correct?
Click to expand...
Click to collapse
i just restore the recovery to default & flash the eu version & update the OTA.
after that flash cwm recovery & nand droid. put in dsixda kitchen & cook it. but some user has notify me that i had added the fb key reassign. haha i will upload a clean version again
e.japonica said:
i just restore the recovery to default & flash the eu version & update the OTA.
after that flash cwm recovery & nand droid. put in dsixda kitchen & cook it. but some user has notify me that i had added the fb key reassign. haha i will upload a clean version again
Click to expand...
Click to collapse
yes, if you use the fb-button then closes the active app.
i have changed the file keylayout of the fb-button from HTC_SHARE to CAMERA.
now starts fb-button the camera app
carstenheuer said:
yes, if you use the fb-button then closes the active app.
i have changed the file keylayout of the fb-button from HTC_SHARE to CAMERA.
now starts fb-button the camera app
Click to expand...
Click to collapse
but actually there is a camera button beside the space bar to use xD
e.japonica said:
but actually there is a camera button beside the space bar to use xD
Click to expand...
Click to collapse
yes this is correct!
but if you want to open the app, you must first press the fn key!
this is poor with one hand
f button function
In my opinion is f button is for screen off and wake ... How about that and can you do that ....
sathara said:
In my opinion is f button is for screen off and wake ... How about that and can you do that ....
Click to expand...
Click to collapse
as i'm still a beginner, my knowledge is limited. will try to do a search & figure it out if i'm able to
sathara said:
In my opinion is f button is for screen off and wake ... How about that and can you do that ....
Click to expand...
Click to collapse
use root explorer
go to: phone/system/usr/keylayout/chacha-keypad-???.kl
open the file and change in line key 184
"HTC_SHARE" >>> "POWER WAKE"
dont work correct...sometimes the screen will not turn on
can someone upload a version with A2SD+ by DarkTremor enabled...?
I would love to use a 1.52 EU rom without anything removed but with the addition of root and a2sd+...
is there anyone capable of doing this?
schölli said:
can someone upload a version with A2SD+ by DarkTremor enabled...?
I would love to use a 1.52 EU rom with nothing removed only with root and a2sd+...
is there anyone capable of to do this?
Click to expand...
Click to collapse
i've already mention there is some issue with the su binary with Android 2.3.5(EU 1.52) there is still able to use the old binary but you have to do alot of adjustment by hands to make the a2sd+ workable. i cook all these ROMs is by trying to let people no need to use much adjustment by own hands. just flash & run~
e.japonica said:
i've already mention there is some issue with the su binary with Android 2.3.5(EU 1.52) there is still able to use the old binary but you have to do alot of adjustment by hands to make the a2sd+ workable. i cook all these ROMs is by trying to let people no need to use much adjustment by own hands. just flash & run~
Click to expand...
Click to collapse
the small internal storage is the only big breakdown of this device, so a2sd with dalvik cache enabled is a must have. that's my opinion
schölli said:
the small internal storage is the only big breakdown of this device, so a2sd with dalvik cache enabled is a must have. that's my opinion
Click to expand...
Click to collapse
That is why i stated as default clean. easy for those who want a normal 2.3.5 or use for cooking. save their trouble to go thru the process of flashing here & there.
Hi, can anyone tell me how i can change the wake up function from key A to END CALL?
Sent from my HTC ChaCha
carstenheuer said:
Hi, can anyone tell me how i can change the wake up function from key A to END CALL?
Sent from my HTC ChaCha
Click to expand...
Click to collapse
Hope u could understand the below method.
Translate by Google translator:
The following are keys to modify the method: the phone ROM, there are files you can customize the keyboard function, by adjusting the phone's keypad function definition file / system / usr / keylayout / supersonic-keypad.kl can easily open the [Home key + menu key + return key + Search key] wake up and swap a key phone functions (qwerty.kl hard qwerty keyboard should be on the definition, because there is no physical qwerty hardware keyboard EVO, so do not change).
RE browser with the kind of file manager into the / system / usr / keylayout / directory, copy the bravo-keypad.kl
Specific modification method [different mobile phone models are not necessarily identical to the modified files, but the principle is the same]:
1, use Notepad to open bravo-keypad.kl file can be modified (Refer to example below)
2, for example, function keys with WAKE_DROPPED, the key to wake phone
3, the corresponding key bit word to swap, swap key functions can be realized, such as key 217 SEARCH key 217 ENDCALL can be changed to the original search key to hang up key
Before the change:
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 116 POWER WAKE_DROPPED
Changes [to increase [Home key + Menu key + return key + key] wakeup phone search but do not swap key functions]:
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED
key 116 POWER WAKE_DROPPED
Editorial changes will modify the files are copied to a good mobile phone coverage / system / usr / keylayout / directory of the supersonic-keypad.kl file, restart the phone to take effect.
supersonic-keypad.kl as chacha-keypad.kl

[KERNEL] My kernel patches

Hi everybody!
This thread is dedicated to containing all the kernel (and some other kernel-related) patches I create/port for our device. So I think it could help our kernel developers to focus on actual SGR-related work without worrying about examining and implementing everything that already have been created for other devices from scratch. I'll update this thread with all information whenever I do something related to the goal. I plan to make this a huge thread so please help us to keep it organized and ask common questions in the Q&A thread (in General section) or in PM (if nobody can answer your question). Thanks in advance!
BLN mod
What is BLN?
- Refer this article for more information.
What do I need to try it out on my device?
- Download my CWM-flashable zip from the following link (This installs my kernel plus my modified liblights (of course it makes a backup of the original one first)):
http://www.mediafire.com/?1cnua9uw3ckoiqk
What features does this kernel have?
version 3.1.10 (for ICS stock firmwares)
eMMC_ERASE_CAP disabled (totally safe to use)
it includes AOSP vibrator fix (it works with my pre-alpha CM10 build too) -> Hybrid kernel
Wi-Fi MAC address changing implemented
Keychord support enabled (start services using hardware keys -> revert to original MAC address by pushing 'volume down', 'volume up' and 'power' buttons simultaneously)
BLN support
- Download 'BLN Control - Free' or 'BLN Control - Pro' app from the Play Store. The pro version has some really nice additional features all of which are supported in my mod.
What do I need to enable it in my kernel?
- Apply my attached patch ('bln.patch') in your kernel source dir with 'patch -p1 < bln.patch'. This patch includes the BLN mod port from SiyahKernel3 (SGSII kernel). I removed its wakelock and earlysuspend dependency, our touchscreen driver has a different structure from that of SGSII touchscreen driver and it works without those quite well. I also added some cleanups regarding the original key led sysfs entries.
- Find 'Device Drivers->Input device support->Touchscreens->Atmel MXT224E Touchscreen Interface' in menuconfig and enable 'BLN Support' under it.
What do I need to enable it in my rom?
- Use a kernel that supports BLN.
- Extract 'system/lib/hw/lights.n1.so' from the CWM-flashable zip (in the link I previously attached) and put it into the appropriate folder.
- Optionally include BLN Control app.
Why do I need a special liblights?
- The original liblights doesn't support notifications since we don't have a led for that purpose. Epsylon3 uploaded the open source version of liblights he uses for CM7.2 to his GitHub. However, that unfortunately doesn't support stock Samsung roms (Button backlight doesn't work.), so I had to hack it a little to make it work. By default, the stock rom can set the brightness of the button backlight according to light conditions. I tried several options but didn't notice any difference in brightness, so my modified version returns 255 (0xFF) as brightness whenever it's set to some non-zero value (zero means turning it off). I also added support for BLN through the common Android notification way.
I uploaded its sources to GitHub:
https://github.com/Adam77Root/liblights_bln
Keychord support
What is it?
- If it is enabled in the kernel, init can start services triggered by hardware keys.
Why should I use it?
- I made a simple yet quite reasonable use of it. I created a service in my init.rc, which runs a script ('/system/xbin/resetmac.sh') that turns Wi-Fi off and resets the original MAC address by writing an invalid one ('13:37:13:37:13:37') into the '/efs/wifi/.mac.info' file. This runs whenever I push 'volume down' (114), 'volume up' (115) and 'power' (116) buttons simultaneously. (I had to disable bugmailer first.) You can find keycodes in '/system/usr/Generic.kl'.
- Example code ('init.rc'):
Code:
service resetmac /system/bin/sh /system/xbin/resetmac.sh
class main
disabled
oneshot
keycodes 114 115 116
- Example code ('/system/xbin/resetmac.sh') (chmod it to 700):
Code:
svc wifi disable
echo 13:37:13:37:13:37 > /efs/wifi/.mac.info
What do I need to enable it in my kernel?
- Simply enable 'Device Drivers->Input device support->Miscellaneous devices->Key chord input driver support' in menuconfig.
- Of course it has advantages only if you enable something in your init files too.
Wi-Fi MAC address changing
Please refer my previous thread for more information and on how to use/implement it.
Every custom modification to devices have risks. Use these at your own risk!
Have fun and enjoy!
---reserved---
---another one---
I'm on Frankenstein ROM 4.0.2 and ardatdat 4.2b4 right now, is it safe to flash your kernel plus bln mod directly,and do I need to mount/system before flashing and clear cache and dalvik cache after???
Sent from my GT-I9103 using Tapatalk 2
khpatel4991 said:
I'm on Frankenstein ROM 4.0.2 and ardatdat 4.2b4 right now, is it safe to flash your kernel plus bln mod directly,and do I need to mount/system before flashing and clear cache and dalvik cache after???
Sent from my GT-I9103 using Tapatalk 2
Click to expand...
Click to collapse
I'm on that rom too. It is safe.
Sent from my GT-I9103
I flashed the kernel,wiped cache and dalvik cache, downloaded bln mod pro but not able to understand the patch part,can you explain the procedure in detail,about how to apply the patch
Sent from my GT-I9103 using Tapatalk 2
khpatel4991 said:
I flashed the kernel,wiped cache and dalvik cache, downloaded bln mod pro but not able to understand the patch part,can you explain the procedure in detail,about how to apply the patch
Sent from my GT-I9103 using Tapatalk 2
Click to expand...
Click to collapse
You don't have to patch anything. That part id for kernel devs. My kernel already contains it.
Sent from my GT-I9103
This is awesome bud !
I'm yet to try cause I have to use NTFS pen drives during the next few days, will flash it after that. I had a small request if possible look into it.
I was going through dev sicopat's threads & I found that he had enabled BLN for the stock SMS app by modding it. The link to the MOD is currently down as it was uploaded on multiupload which had shut down for some time. But I'm searching for an alternate link, will notify you if I find one.
Here's the link to the ROM's thread: http://forum.xda-developers.com/showthread.php?t=1164516 (Check Post no. 2, Updates: v3.0).
If possible can you MOD the stock ICS SMS, stock ICS Samsung Email app(not Gmail) / Social Hub for enabling BLN in them ? As per Sicopat's thread as of now this can't be enabled even if we download the BLN Control Pro app & we've to use 3rd party apps. Maybe you can get in touch with him to enable the same.
Hope it'll be possible for you to do so. Cheers !
First of all thanks Adam. This is a long awaited MOD; I have been missing notification LEDs since my change from HTC to SGR.
I have installed your zip through CWM, wiped cache and dalvik cache and bought BLN control app.
The test looks fine, but I have yet to get it to work with an SMS application. I still just use the stock application which doesn't give LED notification.
But I experienced an issue with the modded kernel related to touch. It however disappeared after having the screen off for a few minutes.
When I held icons and try to move them to another position, it lost my touch after 1-1½ second. Similarly I couldn't flick halfway to a new page and hold it there for more than 1½ second.
I'll give an update if it comes back, but this is the first time I have experienced such an issue, and therefore I expected it to be related to this modification.
BR, MHCA
mhca said:
But I experienced an issue with the modded kernel related to touch. It however disappeared after having the screen off for a few minutes.
When I held icons and try to move them to another position, it lost my touch after 1-1½ second. Similarly I couldn't flick halfway to a new page and hold it there for more than 1½ second.
Click to expand...
Click to collapse
Hm, I haven't experenced such problem yet. Pls update me on this when it happens one more time and I'll investigate on it.
Sent from my GT-I9103
I'm really happy with BLN. Thanks!
It would be great if merged to a voodoo kernel.
Sent from my GT-I9103 using xda app-developers app
Thanks Adam, you are the one!
May I ask for your permission to add the BLN modification to my kernel? Thanks very much.
---------- Post added at 02:29 AM ---------- Previous post was at 01:53 AM ----------
I will try to implement it in my kernel. Thx.
Sent from my GT-I9103 using xda premium
ardatdat said:
May I ask for your permission to add the BLN modification to my kernel? Thanks very much.
Click to expand...
Click to collapse
Of course! I'm happy that you find them useful.
Sent from my GT-I9103
Adam77Root said:
Hm, I haven't experenced such problem yet. Pls update me on this when it happens one more time and I'll investigate on it.
Sent from my GT-I9103
Click to expand...
Click to collapse
I just experienced issues again. It is quite annoying when trying to hold down a key on the keyboard to type a number instead of a letter. Failed multiple times.
I then tried holding home screen icons and most of the times it just opened the application as if I had clicked them.
I don't know how you will be able to investigate it, such things can probably be hard to replicate.

Categories

Resources