Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Can an installed application be completely controlled via adb?

For example: Consider I need to to export my Contacts to SD Card. So here there are basically 5 Steps involved

1)Open Contacts application

2)Press Menu Key

3)Select Import/Export option

4)Select Export to SD card

5)Confirm Export

Can any/all of them be performed via adb?

This can be useful when you have an unrooted phone with a bricked display and all access you have is via adb.

share|improve this question
    
Why didn't you have all your contacts sync through Gmail or Hotmail? –  t0mm13b Jul 11 '12 at 18:11
    
I prefer not giving up my contacts to google or any 3rd party for that matter. I tried Kies but it won't detect my Galaxy S (The bricked phone) while it works perfectly fine for Galaxy Mini. –  Abdul Karim Memon Jul 11 '12 at 18:23
    
Why not go back to your carrier's shop and get them to do it for you - they'd have the means to do this kind of thing for customers who are clumsy? –  t0mm13b Jul 11 '12 at 18:36
1  
you can generate key events with adb. technically it should be possible to launch a thoroughly crafted series of key events to an app. –  ce4 Jul 12 '12 at 6:09
    
Thanks a lot ce4. It worked! Exported my contacts to SD card. –  Abdul Karim Memon Jul 12 '12 at 14:36
add comment

1 Answer 1

Yes and no. You can issue intents with adb but that's it. So the steps you described can't be achieved with adb.

Edit: ce4 showed a blog post which mentions the input binary which is able to simulate key events.

adb shell input keyevent <keycode>
share|improve this answer
1  
thanks for citing me :-) –  ce4 Jul 20 '12 at 19:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.