liamvictor Posted October 3, 2013 Posted October 3, 2013 (edited) I've just bought a USB rubber ducky to help break the PIN on my Nexus. However that pigging thing currently isn't even charging, so to play with the ducky I want to try a few things on my Android phone, which is the Sony Xperia U. However, that requires a screen swipe after switching on before you can enter the PIN. (NB, there doesn't seem to be an option to turn off that initial swipe in any of the security or screen settings.) Without this swipe it accepts the first of the entered digits as the emergency number - strangely only the first, even with a delay on. If I manually swipe then the PIN gets entered as normal. but as the point of having the Ducky is to automate an attack I was wondering if anyone knew how to emulate the initial unlock screen swipe? Edited October 3, 2013 by liamvictor Quote
Forgiven Posted October 4, 2013 Posted October 4, 2013 Stackoverflow is always a helpful place to go. I found this, For Fair Use from: http://stackoverflow.com/questions/6933626/android-how-to-emulate-swipe-gestures-in-avd An interesting answer was this: "One easy way is blind copying! Instead of reading getevent output and figuring it out, then give to sendevent which is really slow. Simply blind copy the gestures from a real device with the same Android version, then blindly paste them. You can copy the touch input in real device by: 1- In adb shell run dd if=/dev/input/event2 of=/sdcard/left. 2- Do the gesture you like to simulate (swipe). 3- This wall create a file (/sdcad/left) named file with the data generated by your real touch. 4- Move the file to any location in your AVD, lets say (/sdcad/left). 5- In AVD adb shell, run dd if=/sdcard/left of=/dev/input/event2 Viola! the simulated touch event will happen. NOTE: In my device the file who has touch events is /dev/input/event2 , it might differ from a device to another, so you may use trial and error first. In short, if you record and play on the same device: 1- dd if=/dev/input/event2 of=/sdcard/left 2- Do the touch for real 3- dd if=/sdcard/left of=/dev/input/event2 4- Repeat step 3, as much as you need. Cheers :)" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.