Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using an Android Samsung Galaxy 10.1 tablet, and I downloaded terminal from the market; I want to edit a network host file. However, there does not appear to be a text editor in terminal. Does anyone know how to get vi on the tablet or something similar?

In short, what is the most straight forward way to edit files on the Samsung tab 10.1 Thanks!

share|improve this question
up vote 2 down vote accepted

You could use the busybox version of vi. If you're rooted then you can get it from the Market and it will install pretty trivially (example). Then you'd just need to execute vi from a terminal and you're good to go. I don't know of any installers that don't require root, but there may be one floating around somewhere that will install to /data/local or something.

Alternatively, you can do it the "manual" way. The following should work fine on an unrooted phone:

  • Download a busybox binary or build it yourself (the busybox website hosts ARM binaries that should work).
  • Copy the binary over to /data/local somehow. adb is easy if you have it set up - just connect your tablet and use: adb push /path/to/busybox /data/local. You could also put it on your SD card and then move it with a file manager. You may optionally want to rename it to simply busybox (I'll assume this is the case in the next steps).
  • You may need to use chmod to make it executable, which can be done from either a terminal emulator or an adb shell - chmod 0755 /data/local/busybox should suffice.
  • Execute vi from a terminal with /data/local/busybox vi.

Of course, if you just want any ol' editor you don't have to use vi. There are a bunch in the Market.

share|improve this answer
Your link to CyanogenMod seems to be outdated. The busybox-android binary from this github project seems to work pretty well. – intuited Mar 11 '15 at 19:25

Android Market has aVim Editor(Vi/Vim). It is not free and has some poor reviews.

share|improve this answer

Your Answer


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.