Apr 2, 2014

MTP, Jmtpfs.

Udev is nice thing on linux today. At the time of android coming up, the device running linux kernel , but somehow android device does not so " friendly " with linux machine. Especially for daily use in accessing file inside the phone. Old time android, the phone just act as " usb storage " thus no single problem accessing file inside by linux machine. Today, phone with more ( internal ) storage available in market, commonly budget phone serve 8 GB internal storage, most market dominated with 16 GB internal storage, 32 GB storage in phone is premium and 64 GB storage is " special ". Since then, phone vendors introduced phone utilized MTP ( Media Transfer Protocol ), a protocol to transfer media file easier, and the most advantage, to syncing between device and pc. However, mounting MTP device on linux is troublesome. Luckily, some independent developers, investing their time, energy and knowledge to help linux users. One of github user nicknamed kiorky have good sources for JMTPFS for Linux

Get Jmtpfs
Ubuntu 14.04 provide Jmtpfs package on universe repository. It is easier to install >:

>$ sudo aptitude install jmtpfs
However I faced problem in mounting Xperia ZR C5502 as mtp device by using jmtpfs on ubuntu repos . I have NOT made any other investigation, in fact mounting MTP device by using jmtpfs from repository need " sudo " previllege, and not really works.

Looking arround and found kiorky/jmtpfs on github , decided to pick her up > :
[~]
>$ git clone https://github.com/kiorky/jmtpfs.git
Cloning into 'jmtpfs'...
remote: Reusing existing pack: 82, done.
remote: Total 82 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (82/82), done.
Checking connectivity... done.
[~]
>$
[~]
>$ cd jmtpfs
[~/jmtpfs]
>$./configure --quiet

if you were no see any ERROR message than everything fine

[~/jmtpfs]
>$make --quiet


cd . && /bin/bash /home/x1123/jmtpfs/missing --run automake-1.11 --gnu
/home/x1123/jmtpfs/missing: line 52: automake-1.11: command not found
WARNING: `automake-1.11' is missing on your system.

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/x1123/jmtpfs/missing --run autoconf
/home/x1123/jmtpfs/missing: line 52: autoconf: command not found
WARNING: `autoconf' is missing on your system.

got TWO WARNING ... just install missing package

[~/jmtpfs]
>$sudo aptitude install autoconf automake

and repeat make command.... (after package installation finished)

[~/jmtpfs]
>$make --quiet
Making all in src

and finally execute > :
[~/jmtpfs]
>$ sudo make install --quiet

unless you sees warning or error messages ... everyting should be find


Jmtpfs Usage

  • Connect your android device to computer via usb port
  • set usb connection on device to MTP
  • Make mount point >$ mkdir ~/mtp ( or whatever you wants like ~/xzr )
  • Finally execute as user >$ jmtpfs ~/mtp [enter]
  • android device should be mounted at ~/mtp



  • To unmount execute >$ sudo fusermount -u ~/mtp

  • INTERESTING IN UBUNTU 14.04 for XPERIA ZR device
  • device have been automount by CAJA upon connected :-))

Thus NON Root user can UNMOUNTED easily

Unfortunatly, IT'S NOT AUTOMOUNT for XIAOMI MI3W device :-))

Need to execute :
>$ jmtpfs ~/mtp
To mount XIAOMI MI3W


Sorry I DONT KNOW WHY ....


Fastboot without Sudo

Because of Gentoo set Gnome-3 as stable. I got hassle by black screen on GDM. Spent one and half day can not resolve the case. I wipe gentoo system and pick FUNTOO up, merged Mate-Desktop along with XFCE-4.10 :-) everything just fine. Setting-up all necessary for poking android beast device and rom.
Faced annoying problem with fastboot , when fastbooting on user mode, got no permission messages. I used fastboot from Adt Bundle , stored at :
/ahu/adt-bdlx86_64

Exported the PATH > on [dot]bashrc
export PATH=/ahu/adt-bdlx86_64/sdk/platform-tools:$PATH

Udev rules " properly " set-up
## /etc/udev/rules.d/51-android.rules

# SAMSUNG GALAXY NEXUS GT-i9250 FASTBOOT
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30",
MODE="0666", GROUP="plugdev"


## username x1123 member of group plugdev

># gpasswd -a x1123 plugdev

I CAN NOT use sudo with above set, thus copied " fastboot and adb" to " /usr/local/bin " to enable using " sudo ", commented exported PATH > :

# export PATH=/ahu/adt-bdlx86_64/sdk/platform-tools:$PATH

It's works !!!.
Well, no good idea, have to use " sudo " for fastbooting, something must be wrong.


Solution
After couple of experiments, toke gunshot advise from internet. No lucks. One works is editing /etc/udev/rules.d/51-android.rules to be :

## /etc/udev/rules.d/51-android.rules

# SAMSUNG GALAXY NEXUS GT-i9250 FASTBOOT
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30",
MODE="0666", GROUP="plugdev", OWNER="x1123"



Uncommented file ~/[dot]bashrc
export PATH=/ahu/adt-bdlx86_64/sdk/platform-tools:$PATH
removing adb and fastboot >$ sudo remove /usr/local/bin/adb /usr/local/bin/fastboot

Loged Out and Loged In again :-)

Everyting back to "Normal"

15:19:32 [~]
x1123@ /> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
014E0F5212008010 device

15:19:40 [~]
x1123@ /> adb reboot-bootloader
15:19:47 [~]
x1123@ /> fastboot devices
014E0F5212008010 fastboot
15:20:01 [~]
x1123@ />fastboot reboot
rebooting...

finished. total time: 0.005s
15:29:02 [~]
x1123@ />

Apr 1, 2014

Ubuntuist - Completely

Testing shinny Ubuntu 14.04 amd64 is really cool, it's considering NOT stable, but very usable. I have been GOOGLIST for a long time, trapped into " google jail " by using, google, email account, online contact, google drive, blogger, google-chrome, android smart phone . I have been looking for alternatives, at least for smart phone, I can either pick windows phone, Firefox OS, ubuntu touch up, and browser. Well, I can say google-chrome is innovative web browser, at least on design, simple and clean. Any other web-browser look like, following google design. Just see the metaphore of Firefox Design, Internet Explorer, Epiphany. Ubuntu introducing new comer ( from gnome 3 camp I Think ), a shinny WEBAPP , the Name is vague why they did not named i.e "Columbus, Voyager or other more sexier name "

Browser / webapp

Minimalis browser is default browser running on ubuntu touch. No released device "yet" up to the point of time this article published, but development preview lives on many of Nexus Devices : Maguro, Mako, Hammerhead. This webapp running very nice on ubuntu 14.04 amd64 (x86) platform. Seems ubuntu working hard to port an Hybrid app for all devices, PC, SmartPhone, Tablet. Currently I used epiphany the gnome web-browser, which renammed to web and the sister named "Browser"


Flash Galaxy Nexus with Ubuntu Touch

No doubt, the best way to flash Nexus Devices with " ubuntu touch " is using ubuntu linux distro. Zero tweaking, Null configuration, almost straight forward. No linux or developer skill needed, just a will to read many of tutorial on the web, super dupper easy, unless to wanna to flash Non Nexus Devices, then a work hard is must.
Prepare to Install Required Flashing Tools
Presumed it is on ubuntu 14.04 , open terminal, ensure main universe ubuntu repository is enable use nano or other preffered test editor :
execute on terminal : $ sudo [space] nano [space] -w /etc/apt/sources.list [enter]
if you see like this, you are safe

### /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu/ trusty universe


if you see different, i.e like this
### /etc/apt/sources.list

# deb http://archive.ubuntu.com/ubuntu/ trusty universe


Please edit, uncomment [delete sign # before word deb] and save

Install Required Flashing Tools
Execute on the terminal :


>$ sudo [space] aptitude [space] update [center]
>$ sudo [space] aptitude [space] install [space] phablet-tools [space] ubuntu-device-flash [enter]


Flashing Ubuntu Touch on Galaxy Nexus
Situation


.... ENSURE YOUR DEVICE BOOTLOADER MUST BE UNLOCKED ....
.... BEFORE FLASHING ANYTHING ....


If your device running android, connect device to ubuntu machine with usb debugging enable : ON DEVICE setting > developer option > usb debugging enable and execute on terminal :

>$ adb [space] devices [enter]
# if you see :
List of devices attached
014E0F5212008010 device

YOU ARE SAFE ... mean connection between phone and pc is going well... proceed


Execute on Terminal :

$ adb [space] reboot-bootloader [enter]


Your device will reboot into bootloader state


If your device bootloader on LOCKED state,
please unlock before flashing



To Unlock bootloader
Set Phone on bootloader/fastboot mode ( above )
Execute terminal command

>$fastboot [space] oem [space] unlock [enter]

ON PHONE
Choose ACCEPT ( use volume button to choose and power button to confirm )

... Phone will rebooting
After phone on device state ( booting Android )
Execute again terminal command to set phone into bootloader
>$adb [space] reboot-bootloader[enter]

While device on bootloader state, let start the fun execute on terminal :

>$ ubuntu-device-flash [space]--device=maguro [space] --channel=saucy-customized [space]--bootstrap [enter]
.. YOU WILL SEE something

269.80 MB / 269.80 MB [======================================] 100.00 % 580.85 KB/s
2014/04/01 16:01:32 Start pushing /home/x1123/.cache/ubuntuimages/pool/ubuntu-
d089ad76802f5698cfb0acadfe9e441a56a5fbe3af6f0df4e099398910e84212.tar.xz to device


Just wait, relax and take some coffee or lemonade, it will takes couple minutes/hours depending on your internet speed

After you see on terminal : something like

2014/04/01 16:02:22 Created ubuntu_command: /home/x1123/.cache/ubuntuimages/ubuntu_commands219979904
2014/04/01 16:02:22 Rebooting into recovery to flash



YOUR DEVICE TURNING INTO > Recovery Mode and Flashing Mode :





Just wait about 30 minutes, device will booting herself INTO UBUNTU TOUCH









THATS IT

After the phone running Ubuntu Touch. Just test all available channels by executing on terminal ( Phone booting on ubuntu touch and connected to PC via usb port )

>$ ubuntu-device-flash [space]--channel=CHANNEL NAME[enter]
>$ ubuntu-device-flash [space]--channel=saucy-proposed-customized[enter]



List of Available Channels
Stable
saucy
saucy-customized
saucy-proposed-customized
saucy-proposed-customized-generic
saucy-surfaceflinger

Devel
trusty
trusty-customized
trusty-proposed
trusty-proposed-customized
trusty-proposed-customized-generic



.... NOW YOU ARE JAILED BY UBUNTU ....

Real Multilib Userland on Linux

Read multilib requirement on Android rom building and other stuff. About two years absent from getting rid with android rom. I have time to...