site  contact  subhomenews

adb connection to phone over wifi

August 09, 2018 — BarryK

I posted yesterday about using 'adb' and 'adbfs' over usb to browse files on my Android phone:

Briefly mentioned that it could be done over wifi as well. Yes, this site has a nice explanation:

It does require a one-time usb connection to enable the phone to listen on port 5555. With usb-debugging enabled on the phone and usb cable connected to PC, on the PC:

# adb devices
...this will confirm the connection
# adb shell "ip route" dev wlan0  proto kernel  scope link  src
... is the ip-address of the phone.
# adb tcpip 5555
...starts the phone listening on port 5555

Then unplug the usb cable, and on the PC:

# adb connect
# adb shell "ls /sdcard"
...will list folders and files on phone
# adbfs /mnt/phone
...can browse the files
# fusermount -u /mnt/phone

Yeah it works, but not very secure. Port 5555 stays open until the phone is rebooted. adbfs is a simple method, but reckon will restrict to only doing it via usb cable.

Tags: easy, quirky, linux

EasyShare now using fakeidentd

August 07, 2018 — BarryK

I posted about the rewrite of EasyShare a few days ago:

Which appeared in EasyOS 0.9.6 released a couple of days ago.

Then yesterday, examined using fakeidentd server for network discovery:

Puppy Forum member 'step', a longtime contributor on the forum, sent me a pm about another way to query fakeidentd, using 'telnet'. Like this:

# { printf \\n; sleep 1; } | telnet 113

Busybox has a telnet applet, though my current configuration of busybox does not have it.

Very nice, thanks very much for that info. As I have the '' perl script working, staying with that for now. EasyShare is now modified to use fakeidentd, and I have tested, works great.

Running 'easyshare' from a terminal, noticed an error message, although the sshfs connection worked:

do_known_hosts: hostkeys_foreach failed: No such file or directory

It was a one-off message, I discovered because folder /root/.ssh did not exist. Fixed.

Tags: easy, quirky

Kernel 4.14.61 and SeaMonkey 2.49.4

August 07, 2018 — BarryK

I have compiled the Linux kernel, version 4.14.61, on EasyOS 0.9.6 Pyro64. The source, with patches and build scripts, is here:

There is a PET package, that will be used in the next builds of EasyOS and Quirky. There is a SFS file of the source:

I also compiled the latest SeaMonkey, version 2.49.4. The PET is here (45MB):

...this is for EasyOS 0.9.5 and later. Do not try and use it in any other distro, as it is linked against specific libraries, such as 'icu', that likely won't be present, or mis-configured.

Tags: easy, quirky

EasyShare probing computers to obtain hostnames

August 07, 2018 — BarryK

EasyShare has automatic discovery of shared folders and printers on the local network. To achieve this, it has to discover the hostnames of the computers, and in the case of Windows computers, the netbios-name.

EasyShare has two ways of doing this, by probing for SMB servers and then using the 'nbtscan' utility to retrieve the hostname or netbios-name, or by probing a modified dnsmasq server and using the 'nmap' utility to retrieve the hostname.

In the latter case, EasyOS (and Quirky) runs the dnsmasq server in a special configuration such that it will return the hostname upon receiving a query from nmap. A problem is that this is a corruption of how dnsmasq is normally used, so if someone wanted to use dnsmasq in the normal way, they can't.

What I want is a lightweight server that upon receiving a request, will return an arbitrary string. It would be nice if I could write such a server, but I don't know how. Instead, looking for something ready-made...

After googling, I discovered the 'identd' server. Busybox has a very cutdown version, name 'fakeidentd'. On one of the computers, run it, with any arbitrary string:

# fakeidentd HITHERE

fakeidentd listens on port 113, so we need some way to query this port, from another computer on the network. I could not see how to use 'nmap', however, found a perl script:

EasyOS and Quirky have a cut-down perl named "perl_tiny", and with the devx sfs, the full perl. I tried this script first with the devx loaded, so had the full perl, and it required just one more module, Net::Ident. This was easy to install:

# perl -MCPAN -e shell
> install Net::Ident
> quit

...which I made into a PET package. I then tested without the devx, and Net::Ident was missing some dependencies. Those missing deps are now included in perl_tiny.

Now, on another computer on my network, with Net::Ident and ident-user-enum installed, where is the computer running fakeidentd:

# 113
ident-user-enum v1.0 ( )    HITHERE


So, we have a simple mechanism to broadcast the hostname. My intention is to use this instead of dnsmasq. 'perl-net-ident' will be a PET package, in the noarch repo, and '' will be builtin at /usr/sbin in woofQ.

Of course, this discovery mechanism will apply to computers running EasyOS and Quirky only. For other computers, they must be running the SMB server ('smbd' daemon in the case of Samba). EasyShare probes for both.

Tags: easy, quirky

EasyShare file and printer sharing re-written

August 05, 2018 — BarryK

I wrote EasyShare in February 2018, however, it is now re-written to be even easier. There has been internal restructuring to make it more flexible, however, from the user's point of view, the most noticeable improvement is the firewall configuration is now completely automated.

I have partly updated the tutorial:

This new EasyShare will be in the upcoming EasyOS version 0.9.6.

Tags: easy, quirky

Smallest and simplest Samba client

July 31, 2018 — BarryK

This is something that I have wanted to figure out for a very long time. What is the smallest and simplest setup if I only want a samba client on a PC, not a server?

I am currently rewriting EasyShare, my easy network file and printer sharing GUI app. This is able to use sshfs or samba, but is actually designed such that samba is required. But, is it really, and if so, what files can it be reduced down to for a client-only system? Strangely, this question is not really answered anywhere on the Internet.

My EasyOS and Quirky will not function as a samba server, however, will have a sshfs server, and cups server, so can serve files and printers. However, other computers on the network may have smb or samba servers, and my PC must be able to connect to them.

basically, EasyShare uses the 'arp-scan' utility to discover the ip-addresses on the network, then 'mpscan' to find server ports. For samba/smb servers, 'nbtscan' is used to obtain the netbios-name/hostname, and for computers that serve sshfs, the 'nmap' utility is used to obtain hostname.

The sticking point is how to discover smb shares on the remote computer. Up to now, I used 'smbclient', which brings with it most of the shared libraries of the samba package.

There are some alternatives to automatically discover shares. A "share" is a name that samba assigns to a particular shared folder or printer.

I discovered that VLC multimedia player uses libdsm for samba discovery, though I couldn't see how it can discover shares. Also, libdsm only supports smbv1, which is too old. Windows 10 has dropped support for smbv1 by default, though apparently it can be enabled. However, smbv1 is considered to be a security risk.

Windows 10 does by default support smbv2 and smbv3. Ah, there is a library, 'libsmb2', with example utilities, that supports smbv2 -- however, whatever I tried to do with the utilities, they always crashed.

I did read that 'nmap' can discover smb shares, but I don't know how.

So, I am back on 'smbclient', meaning that the samba package is required. But, what else from the samba package is required? What about those 'smbd' and 'nmbd' daemons?

I was reminded about those daemons a few days ago, when one of the EasyOS testers thought that they might be responsible for his usb-stick (with easyOS on it, from which he booted) running hot after an overnight backup. This reminded me that sometime ago I noticed that the samba daemons were cpu hogs. Up to now, I have always automatically assumed that they are needed, but what for?

Note, there are lots of posts on the Internet about smbd being a cpu hog, just google "smbd is a cpu hog".

I successfully connected to a Windows 10 machine, from a pc running EasyOS and only the 'smbclient' utility -- absolutely nothing else from the samba package.

Furthermore, I studied the compile options, and created the smallest possible 'smbclient' utility. The smbv2 protocol is sufficient, so I compiled samba 3.6.25 -- 4.x is not required. I will document this exactly soon, when I put it into oe-qky-src, my fork of OpenEmbedded.

There are three packages needed, 'nbtscan', which has the 'nbtscan' utility, 'cifs-utils', which has the 'mount.cifs' utility, and the 'smbclient' utility from samba. All of this can be seen in action in script /usr/local/EasyShare/easyshare, in the next release of EasyOS and Quirky.

I have create a PET,, which is 1.87MB, compared with the 10.5MB samba PET package I was using before.

For the record, here are some links:

It is still on the cards that I might find a light-weight share discovery utility to replace smbclient! 

Tags: easy, quirky, linux

Gxlat language translator

July 28, 2018 — BarryK

This is brilliant! Puppy Forum member vovchik developed this around 2011/2012, however, Google changed to a paid service.

Recently, vovchik has figured out a way around this, so we can still use it for free, using a special script named 'trans'. originally, Gxlat had compiled binaries, however, now is just two shell scripts, and gtkdialog and gxmessage are used for the GUI, which we have in all the pups.

Here is the forum thread:

The latest PET, posted 10 July 2018, has some problems. The file was corrupted, but I was still able to expand it, the icon is missing from /usr/share/pixmaps, and it presents itself as version 0.2b.

There is an earlier version that is 0.3, so I have created a PET and it presents itself as version 0.4. I put in the icon, and modified the gxlat.desktop file slightly -- one thing, put it into the Document menu (sub-section utility), as this is less crowded.

Here is the PET (45KB):

This will be in the next release of EasyOS and Quirky. This is really nice vovchik, much appreciated!

Tags: easy, quirky, linux

aarch64 packages imported into woofQ from OE

July 24, 2018 — BarryK

I have compiled a heap of packages in oe-qky-src, my port of OpenEmbedded, cross-compiled on a x86_64 host PC, for a aarch64 target.

These packages have been imported into woofQ, and uploaded. Here they are:

What I would like to do is boot a aarch64 Easy/Quirky distro on my RPi3. Want to get it going quickly, and the easiest way will be to use the Bamarni Pi64 Debian-based aarch64 distro:

...that is for the RPi3 B-model, which is what I have. There is a later B+ model, which the Bamarni Pi64 currently doesn't work on, but another chap has a fork of Bamarni Pi64 that does:

It should be possible to replace the Bamarni Pi64 files on the SD-card with the Quirky build. My build doesn't have any hardware acceleration, just the framebuffer driver, software-rasterized openGL, etc., but it will get me going.

Will post a progress report soon!

EDIT 20180725
Yay, got a desktop at second bootup. Needed a little fix, wasn't loading the Xorg fbdev driver. Lovely, sound works on my TV (using HDMI input),

So far, just one problem, the QuickSetup window renders with everything upside-down. That is, the "OK" button is at the top of the window. It is still usable. I do recall this problem from ages ago, but not the solution. QuickSetup uses gtkdialog for the GUI rendering.

Tags: easy, quirky