Useful shortcuts for vi editor

Wednesday 17 June 2015

How to update driver with .inf file?

To do that please follows the instructions;

Press Windows key + R -> Input "mmc devmgmt.msc-> Right click to "undefined device" in "Portable Devices" folder then select "Update Driver Software-> Click to "Browse my computer for driver software" -> Click to "Let me pick from a list of device on my computer-> Click to "Have Disk" -> Click to "Browse" -> Find .inf file then click "Open" -> Click "Next" and finish-up.

Monday 8 June 2015

How to use adb (android debug bridge) cmd tool?

First, you need to connect your devices to PC with adb.

e.g.
CMD> adb devices
result; abcdabcdxxx device

- start adb from different port
e.g.
CMD> adb -P 1111 start-server

- Install .apk package
e.g.
CMD> adb install mytool.apk

- Get logs from android device e.g.
CMD> adb logcat -d > mydevicelogs.txt

- Start-Stop adb server
CMD> adb start-server
CMD> adb kill-server

- Remount devices
CMD> adb remount

- Reboot devices
CMD> adb reboot

Enter to shell (linux)
CMD> adb shell

Gain read-write access for /system path to get rid of "Read-only file system" error
CMD> adb shell
# mount -o rw,remount /system

- Revert to read-only access for /system path
CMD> adb shell
# mount -o ro,remount /system

- Define a new folder
CMD> adb shell mkdir /tmp/example

- Send a file into phone
CMD> adb push config.txt /tmp/example

- Get a file from phone
CMD> adb pull /tmp/example/config.txt

Friday 5 June 2015

.tar examples for gzip

e.g.
tar -cvzf mytarfiles.tar myfile1 myfile2
- c, create a new file
- v, verbose (display) file to compress or uncompress
- z, use gzip to zip it
- f, create tar file with filename provided as the argument

e.g.
tar -cvzf mytarnewfiles.tar *.txt
- all text files will be tarred in current path (pwd)

e.g.
lz mytarnewfiles.tar
- lz, list files inside of tar

e.g.
tar -xvzf mytarnewfiles.tar
- x, extract files in the current path (pwd)

e.g.
tar -xvzf mytarnewfiles.tar -C myfiles/
- C, extract files into defined folder as new