A Happy New Year, 2016!

This is the first blog entry in 2016.

Year 2015 was eventful year for me in many ways. They kept me busy (too busy time to time) but they also kept me going forward and got me through another year. Can't complain.

One regret that I have would be there were only a few posts I made last year despite the fact that I said I would keep up with posting entries at the beginning of the year. Hmm... I hope I'll do better job this year.

Well, thank you for those who visited my blog and those who took your precious time to leave me comments! You are the best!

I wish everyone a happy, peaceful, prosperous and productive new year!

That's all!

Termux is the ONE for Android!

Ever since I learned Terminal IDE was not supported for Android 5.0 Lollipop, I was heartbroken because there weren't any git client programs as good as git on Terminal IDE. I was using SGit but wasn't really happy because of lack of flexibility, features, and ease of use.

However, I finally found the one that works today! It's called Termux. Termux is a terminal emulator, just like Terminal IDE, but it comes with an extensive Linux package collections you can install and manage packages you want. Of course, it has git in its collection. So, I can say "bye, bye" to SGit now.

IMHO, Termux is for Android 5.0 Lollipop and above, and Terminal IDE is for Android 4.4 Kitkat and below.

The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibility of end result after following these steps (although I will try to help if you send me your questions/problems).

Ok, the installation and configuration of Termux and git were easier than those of Terminal IDE in my opinion. Termux comes with a minimum base system. At this point, it doesn't do much so you'd need to install some packages. After getting Termux installed on my Galaxy Note 4, I opened it and typed below to update packages: $ apt update

With a bunch of messages, packages are updated. Then ran the following command to install git: $ apt install git

No problem here. I then installed ssh. As you may know, bitbucket.org offers two ways to access a git repository, https and ssh. I could go either way, but ssh is such a useful utility. So, I installed it at this time: $ apt install openssh

Now, the fun part starts - configuration. I've set up my web server Bit Web Server to look into /sdcard/www/ for source codes, so I tried to clone codes from my git repo, but it failed with "Permission Denied" error. Hmm... is this because Termux doesn't have write permissions for security? Well, no problem. I can seem to clone into /data/data/com.termux/home/ and copy the source codes into /sdcard/www/: $ git clone https://[user_name]@bitbucket.org/[repo_name]/[repo_name].git $ cp -r [repo_name] /sdcard/www/

After copying into the www directory, I learned that I can still run git commands like git push, git pull, etc... without any errors. Fantastic!! This means I don't need to copy back and forth between /data/data/com.termux/home/ and /sdcard/www/ every time I make updates.

Now, it's time to finish up by configuring git and Termux's user home environments.

For git, ran the following commands to set up user information: $ git config user.name "[username]" $ git config user.email "[username]@[server]"

Then edited the .bashrc file for some aliases. I created ~/.bashrc with some start up configurations for the shell, but it didn't seem to be taking it after restarting Termux. After poking around, I found a bashrc file that seems to be globally used for Termux in /data/data/com.termux/files/usr/etc/: $ cd /data/data/com.termux/files/usr/etc/ $ vim bash.bashrc --------------------------------- export GIT_AUTHOR_NAME="[username]" export GIT_AUTHOR_EMAIL="[username]@[server]" export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL PS1='\[\e[00;32m\]\A \[\e[00;91m\]\u\[\e[01;93m\]@\h\[\e[00;37m\][\[\e[01;34m\]\w\[\e[00;37m\]]\n\[\e[47m\]\[\e[1;30m\]$\[\e[00m\] ' set -o vi

With all of these, git is ready for Android 5.0 Lollipop!

That's all!

Happy New Year to You!

Happy New Year, 2015!

I can't believe yet another year passed by and my blog is still up and running ;P Put some jokes aside, I didn't expect myself posting new articles consistently (well almost consistently). This is all because encouraging comments some visitors leave for me. Honestly, if no one reads my blog, even though I said at the beginning this blog was only meant as some notes for myself, I wouldn't have been able to continue this long. So let me say this again... Thank you!

For my New Year's resolutions, I'd like to keep my blog up and running for another year with more notes to myself that would be informative/helpful to others.

That's all!

Copying Files From Android Kitkat (4.4.4) to Slackware

I didn't know until I tried myself but when I connected my Samsung Galaxy Note 4 to my slacky64 (Slackware Linux) via USB, I no longer had an option to connect it as USB Mass Storage (UMS) like it did with other flash drives. In stead, it gave me two options: MTP and PTP. Hmm... what the heck are these?


Apparently, the old way of accessing the storage device had several drawbacks. One being how it was making its storage partition available to foreign systems. Whenever another system accessed the phone's storage area, it needed exclusive access to there, which means the entire storage partition was dedicated to that system and as long as that system was accessing there, the phone itself couldn't access any files or apps stored in that area. Also, this could easily mess up (or corrupt) the storage partition.

Another reason was the type of its file system. Because its storage partition needed to be available to various systems, mostly for Windows devices, it was formatted as the FAT file system (Duh...). FAT is an older and slower file system without the concept of file ownership. Not to mention Microsoft holds patents for which they demand royalties from OEM's for long file name support on the FAT file system, etc...

So what are MTP and PTP?

MTP (Media Transfer Protocol) is a subset of PTP (Picture Transfer Protocol) communication protocols that allow transferring media files from and to portable devices. These protocols have been around for a while but they are new to Android. They are considered better solutions to the problems UMS had. When a foreign system accesses the phone via MTP, it sends queries to Android and Android returns with the list of files requested. Then it downloads files. This allows access to file levels rather than exclusively opens up the entire storage portion and also allows Android choose which files to present.

This also enables Android format its storage device with ext3/ext4 or any other file systems - no longer limited to FAT!

PTP works the similar way and is mostly used by digital cameras.

For more information, please refer to Android USB Connections explained MTP, PTP, and USB Mass Storage

Now, some terminologies are out of the way, I tried transferring some photos from my Note 4 to slacky64 using MTP. Hm? It's very slow loading photos and it's even slower transferring them. Also, after photos were copied over, not only were their timestamp changed to current date and time instead of date and time taken but my photo viewer program also couldn't display them. That's not good...

I was hoping PTP would work better but no luck. It was even worse; I couldn't even get photos listed in my file manager.

Now, I went on a hunt for better ways to transfer photos.

I tried sftp and scp (with an option to retain the original timestamp) but its process kept dying on me while in the middle of transferring files.

I was kind of frustrated with this. Then, I found dukto in Google Play. It had good reviews and high rating points. I was a bit concerned about this program needing be installed on all devices, but, what the heck, as long as it'll transfer photos, I would be happy at this point.

Installation on the Android device was breeze. There were some extra steps needed to install it on my Slackware system because dukto was available in binary packages for CentOS, Fedora, OpenSUSE, RHEL, and Ubuntu and no source. This means the rpm package needs to be converted to the tgz format with the rpm2tgz command.

Converting rpm with rpm2tgz

Slackware comes with a handy utility to convert rpm files to tgz files. All you need is to run rpm2tgz with rpm file: # cd /tmp # rpm2tgz dukto-6.0-13.1.x86_64.rpm ... Slackware package /tmp/dukto-6.0-13.1.x86_64.tgz created # installpkg /tmp/dukto-6.0-13.1.x86_64.tgz Verifying package dukto-6.0-13.1.x86_64.tgz. Installing package dukto-6.0-13.1.x86_64.tgz: PACKAGE DESCRIPTION: Package dukto-6.0-13.1.x86_64.tgz installed. #

VoilĂ ! The conversion and installation went successful. To run the program, execute dukto: $ dukto


Transferring Files

To transfer file from the Android device to PC:

  1. Open dukto on both devices
  2. On the Android device, click on the icon you want to send your files
  3. Choose Send some files and folders if you are sending files
  4. Locate files you wish to send
  5. Check files
  6. Click on the Send icon

Once selected files have been transferred, the confirmation message is displayed.


Transferring files was snap. In my opinion, the best way to transfer files for Android devices. Although this was the best method by far, I should note that the timestamp of transferred files was still changed. At this point, it's no longer a big issue because file name contains the date taken and this info as well as the time were embedded to file itself.

There are some drawbacks of this program:

  • There is no "select all" button. If you want to copy 100 files, you need to select all those files manually (or you could select a folder)
  • dukto needs to be running on both devices simultaneously
  • dukto must be active while transferring files; otherwise, it halts the process. This means no screensaver as well

The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibility of end result after following these steps (although I will try to help if you send me your questions/problems).

That's all!

@aBoyDesign.com Lab Launched!

Web Development is something I've been doing in my spare time for my family and friends. They are usually a bunch of small projects like log-in systems or light-weight shopping cart, etc... These features are so small that I can't usually use them as my portfolios. For this purpose, I've created @aBoyDesign Lab.

@aBoyDesign Lab has a collection of projects that I created for fun and it's launched now!

Any comments are much appreciated!

That's all!