1

I am trying simulating touch tap by calling injectMotionEvent on a rooted Sumgsung P1000

I refer to the link : Android INJECT_EVENTS permission Although I successfully push the apk file to /system/app, I still obtain the INJECT_EVENTS exception.

Futhermore , I check my app's running priviledge and realize it's still running in non-root priviledge :

app_105 2814 2394 212416 23468 ffffffff 00000000 S

My question is : besides the items mentioned in Android INJECT_EVENTS permission , what else do I miss ?

Do I need to programmically to boost me to root , like :

try {
        Log.v("investigation","try to boost itself") ; 
        Runtime.getRuntime().exec("su");
      //Runtime.getRuntime().exec("reboot");
    } catch (IOException e) {
        Log.v("investigation" , "Failed to get su priviledge\n") ; 
        e.printStackTrace();
    } 

Esscentially , this snippet doesn't boost me actually .

please help to enlighten me. Thanks a lot .

Community
  • 1
  • 1
user1338624
  • 174
  • 1
  • 10

1 Answers1

0

Only root permission is not sufficient for INJECT_EVENTS, For that you have to sign your application with firmware signing key.

For an ordinary SDK application, you cannot inject events.

user370305
  • 108,599
  • 23
  • 164
  • 151