A simple way to turn off android power management:
edited kernel\drivers\android\power.c
static void android_power_suspend(struct work_struct *work)
{
int entry_event_num;
int ret;
int wait = 0;
android_early_suspend_t *pos;
int print_locks;
unsigned long irqflags;
return;/*add this,then android will not enter in sleep state,just do
this,try it in your code*/
while(g_user_suspend_state != USER_AWAKE) {
......