Mar 5, 2013

Apa Itu Android Terminal Emulator

Pasti kalian sudah tidak asing dengan kata ini, ya Android Terminal Emulator. Aplikasi ini menggunakan Android shell script, seperti command prompt di windows dan terminal di linux tapi terminal emulator ini lebih cocok kalau mirip dengan terminal di linux karena hampir sama dalam command nya. DOWNLOAD HERE.
Berikut ini adalah perintah-perintah dalam terminal emulator yang ada di android :
> su - buat menggunakan hak2 superuser kita
> ls - buat menampilkan file2 yang ada di directory, sama kaya command "dir" kalau di windows
> cd - buat pindah directory
> cp - buat copy file atau folder 
> mv - buat move/rename file atau folder
> rm - untuk delete
> mkdir  - untuk buat folder baru
> chmod - untuk mengubah permission
> pm - ngakses package manager
> ps - lihat running process
> df -h - buat liat disk usage

Dan perintah lain yang mungkin belum anda ketahui, tetapi anda harus menginstall BusyBox dulu DISINI :

Menghitung Aplikasi yang ter-install:

    #!/system/bin/sh
    TOTAL=` pm list packages | busybox wc -l `
    DOWNLOADED=` pm list packages -f | busybox grep -v /system/ | busybox wc -l `
    SYSTEM=$(($TOTAL - $DOWNLOADED))
    echo "Total Aplikasi yang ter-install: ${TOTAL}"
    echo "System Apps: ${SYSTEM}"
    echo "Downloaded Apps: ${DOWNLOADED}"

Mengecek /sdcard:

    #!/system/bin/sh
    if busybox [ -z "$( busybox mount | busybox grep /sdcard )" ]; then echo "sdcard sedang dipakai  oleh PC." else echo "sdcard tersedia" fi

Menonaktifkan Boot-Animation:

    #!/system/bin/sh
    if busybox [ -e /system/customize/resource/bootanimation.zip ]; then
    BOOT_ANI=/system/customize/resource/bootanimation.zip
    elif busybox [ -e /system/customize/resource/bootanimation.zip ]; then
    BOOT_ANI=/system/customize/resource/VZW_bootanimation.zip
    elif busybox [ -e /data/local/bootanimation.zip ]; then
    BOOT_ANI=/data/local/bootanimation.zip
    else
    echo "Gagal untuk menemukan bootanimation.zip"
    exit 1
    fi
    NEW_LOCATION=${BOOT_ANI%.*}.bak
    busybox mount -o remount,rw /system
    busybox mv -f $BOOT_ANI $NEW_LOCATION
    busybox mount -o remount,ro /system
    echo "Boot-Animation telah dimatikan"

Mengaktifkan Boot-Animation:

    #!/system/bin/sh
    if busybox [ -e /system/customize/resource/bootanimation.bak ]; then
    BOOT_ANI=/system/customize/resource/bootanimation.bak
    elif busybox [ -e /system/customize/resource/bootanimation.bak ]; then
    BOOT_ANI=/system/customize/resource/VZW_bootanimation.bak
    elif busybox [ -e /data/local/bootanimation.bak ]; then
    BOOT_ANI=/data/local/bootanimation.bak
    else
    echo "Gagal untuk menemukan bootanimation.zip"
    exit 1
    fi
    NEW_LOCATION=${BOOT_ANI%.*}.zip
    busybox mount -o remount,rw /system
    busybox mv -f $BOOT_ANI $NEW_LOCATION
    busybox mount -o remount,ro /system
    echo "Boot-Animation telah diaktifkan"

Menonaktifkan suara kamera:

    #!/system/bin/sh
    CAMERA_CLICK=/system/media/audio/ui/camera_click.ogg
    VIDEO_RECORD=/system/media/audio/ui/VideoRecord.ogg
    busybox mount -o remount,rw /system
    busybox find $CAMERA_CLICK $VIDEO_RECORD -exec busybox mv -f {} {}.bak ';'
    echo "Disabled camera sounds"
    busybox mount -o remount,ro /system

Mengaktifkan kembali suara kamera:

    #!/system/bin/sh
    CAMERA_CLICK=/system/media/audio/ui/camera_click.ogg.bak
    VIDEO_RECORD=/system/media/audio/ui/VideoRecord.ogg.bak
    if busybox [ -e $CAMERA_CLICK ]; then
    busybox mv $CAMERA_CLICK ${CAMERA_CLICK%.*}
    fi
    if busybox [ -e $VIDEO_RECORD ]; then
    busybox mv $VIDEO_RECORD ${VIDEO_RECORD%.*}
    fi
    echo "Suara kamera telah diaktifkan kembali"

Mematikan Compcache:

    #!/system/bin/sh
    DEV=/dev/block/ramzswap0
    MODULE=/system/lib/modules/ramzswap.ko
    if busybox [ ! -e $MODULE -o -z "$( busybox which rzscontrol )" ]; then
    echo "Your system does not support compcache."
    exit
    fi
    busybox swapoff $DEV >/dev/null 2>&1
    busybox rmmod ramzswap.ko >/dev/null 2>&1
    echo "Compressed cache talah dimatikan"

Mengaktifkan Compcache:

    #!/system/bin/sh
    DEV=/dev/block/ramzswap0
    MODULE=/system/lib/modules/ramzswap.ko
    if busybox [ ! -e $MODULE -o -z "$( busybox which rzscontrol )" ]; then
    echo "Your system does not support compcache."
    exit
    fi
    busybox echo 3 > /proc/sys/vm/drop_caches
    busybox insmod $MODULES_DIR/$MODULE
    rzscontrol $DEV --init
    busybox swapon $DEV
    echo "Compressed cache telah diaktifkan"

Mempercepat file system:

    #!/system/bin/sh
    busybox mount -o remount,noatime,barrier=0,nobh /system
    busybox mount -o remount,noatime,barrier=0,nobh /data
    busybox mount -o remount,noatime,barrier=0,nobh /cache

Fix Permission:

    #!/system/bin/sh
    START=` busybox date +%s `
    PKGLINES=`LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/system/lib pm list packages -f | busybox cut -d ':' -f2 `
    TOTAL=` echo $PKGLINES | busybox wc -w `
    CURRENT=0
    echo
    echo "Fixing permissions..."
    echo
    busybox mount -o remount,rw /system
    for pkgline in ${PKGLINES}; do
    PKGNAME=` echo $pkgline | busybox cut -d '=' -f2 `
    CODEPATH=` echo $pkgline | busybox cut -d '=' -f1 `
    DATAPATH=/data/data/$PKGNAME
    PKGUID=` busybox grep $CODEPATH /data/system/packages.xml |
    busybox sed 's%.*serId="\(.*\)".*%\1%' |
    busybox cut -d '"' -f1 `
    CURRENT=$(($CURRENT+1))
    echo "(${CURRENT} of ${TOTAL}) ${PKGNAME}..."
    if busybox [ -e $CODEPATH ]; then
    APPDIR=` busybox dirname $CODEPATH `
    if busybox [ $APPDIR = /system/app ]; then
    busybox chown 0 $CODEPATH
    busybox chown :0 $CODEPATH
    busybox chmod 644 $CODEPATH
    elif busybox [ $APPDIR = /data/app ]; then
    busybox chown 1000 $CODEPATH
    busybox chown :1000 $CODEPATH
    busybox chmod 644 $CODEPATH
    elif busybox [ $APPDIR = /data/app-private ]; then
    busybox chown 1000 $CODEPATH
    busybox chown :$PKGUID $CODEPATH
    busybox chmod 640 $CODEPATH
    fi
    if busybox [ -d $DATAPATH ]; then
    busybox chmod 755 $DATAPATH
    busybox chown $PKGUID $DATAPATH
    busybox chown :$PKGUID $DATAPATH
    DIRS=` busybox find $DATAPATH -mindepth 1 -type d `
    for file in $DIRS; do
    PERM=755
    NEWUID=$PKGUID
    NEWGID=$PKGUID
    FNAME=` busybox basename $file `
    case $FNAME in
    lib)
    busybox chmod 755 $file
    NEWUID=1000
    NEWGID=1000
    PERM=755
    ;;
    shared_prefs)
    busybox chmod 771 $file
    PERM=660 ;;
    databases)
    busybox chmod 771 $file
    PERM=660
    ;;
    cache)
    busybox chmod 771 $file
    PERM=600
    ;;
    *)
    busybox chmod 771 $file
    PERM=771
    ;;
    esac
    busybox chown $NEWUID $file
    busybox chown :$NEWGID $file
    busybox find $file -type f -maxdepth 1 ! -perm $PERM -exec busybox chmod $PERM {} ';'
    busybox find $file -type f -maxdepth 1 ! -user $NEWUID -exec busybox chown $NEWUID {} ';'
    busybox find $file -type f -maxdepth 1 ! -group $NEWGID -exec busybox chown :$NEWGID {} ';'
    done
    fi
    fi
    done
    busybox mount -o remount,ro /system
    sync
    STOP=` busybox date +%s `
    RUNTIME=` busybox expr $STOP - $START`
    HOURS=` busybox expr $RUNTIME / 3600`
    REMAINDER=` busybox expr $RUNTIME % 3600`
    MINS=` busybox expr $REMAINDER / 60`
    SECS=` busybox expr $REMAINDER % 60`
    RUNTIME=`busybox printf "%02d:%02d:%02d\n" "$HOURS" "$MINS" "$SECS"`
    echo
    echo
    echo "Fix permissions complete! Runtime: ${RUNTIME}"
    echo

Mount /system:

    #!/system/bin/sh
    WHAT_MOUNT=` mount | busybox grep system | busybox awk '{print $4}' | busybox cut -d ',' -f1     if busybox [ "${WHAT_MOUNT}" = "rw" ]; then
    echo "System is mounted read/write"
    elif busybox [ "${WHAT_MOUNT}" = "ro" ]; then
    echo "System is mounted read-only"
    else
    echo "Error getting info"
    fi

Hot Reboot:

    #!/system/bin/sh
    busybox killall system_server 

Melihat Informasi CPU:

    cat /proc/cpuinfo

Wipe Battery Stats:

    #!/system/bin/sh
    busybox rm /data/system/batterystats.bin
    echo "Battery Stats dibersihkan"
Menghapus Data Cache:

    #!/system/bin/sh
    busybox find /data/data -type d -iname "*cache*" -exec busybox rm -f {}/* ';' -exec echo "Cleared {}" ';'

Zipalign Apks:

    #!/system/bin/sh
    if busybox [ -z "$( busybox which zipalign )" ]; then
    echo "Error: zipalign binary tidak ditemukan"
    exit 1
    fi
    START=` busybox date +%s `
    CODEPATHS=` pm list packages -f | busybox cut -d ':' -f2 | busybox cut -d '=' -f1 `
    TOTAL=` echo $CODEPATHS | busybox wc -w `
    CURRENT=0
    echo
    echo "Zipaligning..."
    echo
    busybox mount -o remount,rw /system
    for codepath in ${CODEPATHS}; do
    CURRENT=$(($CURRENT+1))
    echo -n "(${CURRENT} of ${TOTAL}) "
    if busybox [ -e $codepath ]; then
    zipalign -c 4 $codepath
    ZIP_CHECK=$?
    case $ZIP_CHECK in
    1)
    if zipalign -f 4 $codepath /data/local/pkg.apk; then
    busybox cp -f /data/local/pkg.apk $codepath
    busybox rm -f /data/local/pkg.apk
    echo "[!] zipaligned ${codepath}"
    fi
    ;;
    *)
    echo "[X] $codepath sudah zipaligned"
    ;;
    esac
    fi
    done
    busybox mount -o remount,ro /system
    sync
    STOP=` busybox date +%s `
    RUNTIME=` busybox expr $STOP - $START`
    HOURS=` busybox expr $RUNTIME / 3600`
    REMAINDER=` busybox expr $RUNTIME % 3600`
    MINS=` busybox expr $REMAINDER / 60`
    SECS=` busybox expr $REMAINDER % 60`
    RUNTIME=` busybox printf "%02d:%02d:%02d\n" "$HOURS" "$MINS" "$SECS" `
    echo
    echo "Zipalign selesai! Runtime: ${RUNTIME}"
    echo

Share this

60 Responses to "Apa Itu Android Terminal Emulator"

  1. mantap...
    lagi mu coba belajar ini tapi belum bisa bisa.
    mohon bantuan master

    ReplyDelete
    Replies
    1. hahaha TS nya juga sama baru belajar nih :))
      tapi kalo ada yang mau ditanyakan, siap menjawab bila mampu :)

      Delete
  2. hpku galaxy Y duos udah di root, ada lambang aplikasi su nya tapi begitu dilihat di android terminal emulator tandanya masih $ belum #? Butuh pencerahannya.. makasih

    ReplyDelete
    Replies
    1. kalau tanda $ itu belum masuk sebagai superuser nya gan..
      coba ketik "su" pasti lambangnya jadi #
      contoh: $ su (enter)
      # <~ sudah jadi superuser

      kalo masih belum juga coba saya minta screen shot nya gan biar gampang :D

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Mau tanya Tanya masih Berkaitan Juga... Gk tau knapa Saya otak atik diClockworkMod Racovery yg Partition SD Card... Trus Mount and Storage menunyaa... pas saya reboot ehh malah Diem jha d Logo Samsung'nya alias gk masuk"... Disitu jha,, Tpi masih Bisa masuk recoverynya,,, Minta Solusinya doonk HP sy knapa yaa???

    ReplyDelete
    Replies
    1. kalo di install cusrom pasti gitu gan, pas booting pertama emang agak lumayan makan waktu.. agan tunggu aja sekitar 5 - 10 menit gan :)
      ngomong-ngomong agan pake cusrom apa ? siapa tau ada yg bermasalah :)

      Delete
  5. om om untuk yang Menghitung Aplikasi yang ter-install dst, apa harus di tulis smua om ,

    ReplyDelete
  6. om ko ini gabisa bisa dah ... gue udah buka tapi lama bgt . tulisan di status bar nya terminal sesion is running diketikj SU juga ga bisa mohon pencerahannya

    ReplyDelete
    Replies
    1. sebelumnya samgal agan udah dalam keadaan root ga ?

      Delete
  7. gan kalau install CWM via TEM, kodenya apa gan?

    ReplyDelete
    Replies
    1. bisa dilihat disini gan :) ~> http://goo.gl/O5mhK

      Delete
  8. Mas, kalau mau merubah setting input method Qwerty ke yang biasa, bagaimana ya? Minta tolong pliss, aku kesulitan ngetik sms kalau paker Qwerty, Terima kasih

    ReplyDelete
    Replies
    1. pas dalam mode mau mengetik, klik menu yang ada gambar setting di paling bawah screen... trus ubah setting potrait keypad types ke 3x4 keypad gan, begitu saja :)

      Delete
  9. cara hapus script init.d dengan terminal emulator gimna ya

    ReplyDelete
    Replies
    1. jangan itu system -_- . tapi kalo masih mau ya coba aja... tinggal masuk sebagai root terus rm init.d

      kalo ada apa-apa ga nanggun ya gan :D

      Delete
  10. gan q mau tanya,,klau mau pakai terminal emulator HH harus sudah root pa blm,,trimakasi

    ReplyDelete
    Replies
    1. ga di root juga gpp, tapi kalo mau hak aksesnya lebih tinggi(superuser) tinggal di root aja gan :)

      Delete
  11. gan mau nanya klo os gingerbread udah pake costumrom bisa gk instal atau jalanin apk utk os ics keatas?? makasih

    ReplyDelete
    Replies
    1. tergantung gan, kalo aplikasinya cocok pasti bisa
      coba aja :)

      Delete
  12. om kalo nge PING darii terminal emulator gimana cara menSTOP nya?

    kan gak ada ctrl+c nya di keyboard

    ReplyDelete
    Replies
    1. ada ko gan, cuma harus tekan tombol menu, terus klik apa gitu *lupa lagi* ahahaha.. nanti disana ada shortcut buat tombol ctrl, alt, tab dll gan :)
      coba aja..

      Delete
  13. Hapus app bawaan pd system blej ga pake terminal emulator??

    ReplyDelete
  14. Gan,cara menon aktifkan komputer dari jarak jauh dengan T.E ini gimana gan?

    ReplyDelete
    Replies
    1. saya rasa ga bisa gan pake T.E .. mungkin kalau pake TeamViewer baru bisa gan :)

      Delete
  15. Pake app ini bisa buat ngeroot ga gan?

    ReplyDelete
    Replies
    1. bisa gan tapi cuma sebagai pihak ketiga aja, agan tetep perlu aplikasi rootnya supaya bisa rooting

      Delete
  16. bos kalau ingin muncul # ketika ngetik su apa harus di root dulu kah?soalnya q uda ngetik su (enter) masih muncul tanda $
    mohon pencerahanya

    ReplyDelete
    Replies
    1. iya gan, kalo ingin hak akses nya menjadi root, smartphone agan harus sudah di root dulu :)

      Delete
  17. gan gan kenapa rambutnya kribo?

    ReplyDelete
  18. gan sdcard gue dah tak virtual trus masalahnya q pengen ganti sdcard yg baru yg lebih besar kapasitasnya apakah harus di pindahkan datanya atau di ulang lg cranya tlg pencerahanya thanks

    ReplyDelete
    Replies
    1. jika data nya penting, pindahin aja gan.. :)

      Delete
  19. gan ane mau tanya klo buat bersihin supaya androidnya lari kuenceng performanya gimana gan

    ReplyDelete
    Replies
    1. pertama sih jangan installin game dan aplikasi (yang tidak perlu) berlebihan.. karena akan memakan banyak data dan cache sehingga hp agan jadi lemot..
      saran saya sih pake aplikasi yang secukupnya memang buat keperluan agan.. terus installin aplikasi yang memang khusus mempercepat kinerja smartphone agan.. seperti No-frills CPU Control dll.. terus untuk memhapus cache dan melegakan data install Clean Master..
      tapi aplikasi semua aplikasi mempunyai kelebihan dan kekurangan masing-masing.. jadi itu semua tergantung selera agan jika sudah mencobanya :)

      Delete
  20. Gan kegunaannya buat main game apa?

    ReplyDelete
  21. Om sya kan instal ram manager untuk bikin ram virtual. Tiba2 otomatis ram manager nyuruh instal busybox. Pertanyaan sya, lebih baik instal atau gk usah instal ?

    ReplyDelete
    Replies
    1. lebih baik di install gan, memang perlu busybox :)

      Delete
  22. gan, saya pake xperia U custom rom kitkat.. cuma udah ada update terbaru sdh saya download, tapi gagal install zip gara2 bugs.. kira2 bs pake terminal emulator?

    ReplyDelete
    Replies
    1. kira-kira bugs nya apa dulu gan? kebanyakan sih cusrom memang banyak bugs nya..

      Delete
  23. gan ane bingung nih di #!/system/bin/sh
    TOTAL=` pm list packages | busybox wc -l `
    DOWNLOADED=` pm list packages -f | busybox grep -v /system/ | busybox wc -l `
    SYSTEM=$(($TOTAL - $DOWNLOADED))
    echo "Total Aplikasi yang ter-install: ${TOTAL}"
    echo "System Apps: ${SYSTEM}"
    echo "Downloaded Apps: ${DOWNLOADED}" jelasin maklum anw newbie

    ReplyDelete
    Replies
    1. itu perintah buat nampilin aplikasi yang terinstall.
      total = jumlah aplikasi yg ada di hp agan.
      system = system aplikasi yang ada di agan
      downloaded = aplikasi yang di download oleh agan..

      mungkin itu gan.. semoga jelas :D

      Delete
  24. Gan minta pin bb gan, mau belajar ke ts

    ReplyDelete
  25. Om,saya udh instal T.E nya..sya ketik "su" dibles "not found"

    ReplyDelete
    Replies
    1. kalau mau bisa "su", smartphone harus dalam keadaan sudah di root :)

      Delete
  26. Gan HP ane kan memori internalnya ga kebaca, nah bisa ga dimount pake TEM?

    ReplyDelete
    Replies
    1. saya belum coba sih ga kasus seperti itu, tapi coba saja siapa tau bisa :) CMIIW

      Delete
  27. Kalo ngembaliin imei gmn?
    Trus klo ngilangin imei gmn biar tahu penyebabnya

    ReplyDelete
    Replies
    1. coba cabut batere nya selama 5 menit.. terus pasang lagi

      Delete
  28. Gan ada pin bb ga gan atau line gitu? biar gampang bisa nanya,Hehehehe

    ReplyDelete
    Replies
    1. kalau mau ada link efbe gan, itu ada di pinggir layar :)

      Delete
  29. Gan sy kn cb2 root lht di blog mumala untuk grand 2.nah stlh urutan sy lakuin muncul terminal emulator.apa hp sy udh ke root kyk gt.krn sy jg msh cb2.tolng bntuannya....

    ReplyDelete
    Replies
    1. coba di terminal agan ketik su, nanti muncul pop untuk bisa akses sebagai root belum? kalo tidak ya berarti proses gagal gan ..

      coba saja caranya disini : http://goo.gl/w1hkBE

      Delete
  30. Bkn mumala yp mumu lala...tolong gan

    ReplyDelete