No Cookies logo logo logo

Brexit Stolen Votes


BSD-PIE icon

BSD icon

Gnu icon

Linux icon






Android robot.svgAndroid - a BSD view BSD logo

QR code of this page = =

By Julian H. Stacey (a Unix Consultant, Unix (inc. FreeBSD & Linux etc) since 1978, Android since 2014)

Notes re. Android for BSD (and other) Unix users & programmers who heavily value free public domain source code.


Android robot.svg Android App Stores

Connectivity: BSD logoFreeBSD tools and Android apps. Android robot.svg

Tethering FreeBSD PC & Android Smart Phone

  • Purpose: Travelling, Android WLAN (or SIM card) to Internet, FreeBSD PC with no WLAN hardware via Android to Internet
    FreeBSD pc as client, via USB to Android as router/ server with WLAN; then via WLAN to an Internet DSL router.
    + Tethering - common elements for either direction

    • PC
      • Connecting usb creates these in /dev/ :
        • lrwxr-xr-x 1 root wheel 9 Nov 9 21:24 ./ugen1.6 -> usb/1.6.0
        • crw------- 1 root operator 0x9a Jul 26 18:03 ./usb/1.6.0
        • crw------- 1 root operator 0x9c Jul 26 18:03 ./usb/1.6.1
        • crw------- 1 root operator 0x9d Jul 26 18:03 ./usb/1.6.2
        • crw------- 1 root operator 0x9e Jul 26 18:03 ./usb/1.6.3
        • crw------- 1 root operator 0x9f Jul 26 18:03 ./usb/1.6.4
        • crw------- 1 root operator 0xa0 Jul 26 18:03 ./usb/1.6.5
      • For urndis USB Remote NDIS Ethernet device driver, Use FreeBSD-9.3-RELEASE or newer, not 9.2 & not 10.0, .
      • /boot/loader.conf Add if_urndis_load="YES" Or
        /sys/amd64/conf/Add "device urndis"
        config -x/boot/kernel/kernel | grep urndis
    • Android
      • Turn off auto update in { Google Play store, F-Droid, Navigator map app & anything else heavy, eg browser pre load & BBC etc. }
      • Touch "Settings ; Connections ; Data usage ; Mobile data"
      • Touch "Settings ; Connections ; Tethering and portable hot spot ; USB tethering";
        After a few seconds it shows "Tethered" + a green tick.
    • PC
      • The tethering causes these in /dev/ :
        • Disappears: usb/1.6.3
          Or 2017-07-26 these disappear: usb/1.6.4, usb/1.6.5
        • Adds: crw------- 1 root operator 0xa1 Nov 9 21:24 ./usb/1.6.2
      • ifconfig -a # Or
        ifconfig ue0
        • I should be able to call ifconfig from attach in devd.conf, but I fail with "Executing 'logger Unknown USB device: vendor 0x04e8 product 0x6863 bus uhub4' "
        • Shows: ue0: flags=8802<BROADCAST, SIMPLEX, MULTICAST> metric 0 mtu 1500
      • cp /etc/ resolv.conf /tmp/ resolv.conf.cp
      • Caution: If PC is configured with /etc/ rc.conf ifconfig_wlan0="DHCP" enabling DHCP for WLAN, the next dhclient will overwrite /etc/ resolv.conf with
        which kills routing to other devices on PC's ethernet.
      • dhclient -d ue0 # Configures network interface using DHCP (runs in foreground).
      • cat /tmp/ resolv.conf.cp /etc/ resolv.conf | grep '^nameserver' | sort | uniq > /tmp/ resolv.conf.tmp
      • Prune back to max 3 nameservers:
        vi /tmp/ resolv.conf.tmp
      • mv /tmp/ resolv.conf.tmp /etc/ resolv.conf
      • vi /tmp/ resolv.conf.cp /etc/ resolv.conf
      • ifconfig ue0
        inet netmask 0xffffff00 broadcast OR
        inet netmask 0xffffff00 broadcast
      • Shows local address assigned by Android to PC (a class C private address).
      • # Display IP & MAC numbers of interface.
        arp -a -i ue0
        • ( at xx:xx:xx:xx:xx:xx on ue0 permanent [ethernet] OR
          ? ( at xx:xx:xx:xx:xx:xx on ue0 expires in 853 seconds [ethernet]
          ? ( at xx:xx:xx:xx:xx:xx on ue0 permanent [ethernet]
      • Android: Browser /cgi-bin/printenv shows REMOTE_ADDR=""
      • Instead of dhclient and repairing /etc/ resolv.conf, as [just my?] Android allocates the same numbers each time, one can just:
      • ifconfig ue0
    • Android: After enabling tethering on android, the android browser can see PC apache httpd (where I can stage downloaded android apps from internet).
    • FreeBSD: ping
    • Android:
      • Stops android screen becoming non responsive.
      • Touch Internet icon. A browser starts
      • Each touch on a browser link URL (even a numeric local one), Android shows:
        "No network connection. Mobile data turned off. Connected to Wi-Fi network instead or turn on mobile data and try again."
        Just click OK each time, then it shows the new page.
      • Touch URL bar at top.
      • Type in
    • Purpose: At home, debugging:
      Android as client, via USB to FreeBSD PC as router; then PC via ethernet (local class C private addresses) to a LAN proxy gateway connecting to Internet

      • (See also above for some common stuff, eg about FreeBSD urndis).
      • See Also network-usb-tethering
      • PC
        • /etc/ rc.conf: gateway_enable="YES"
        • PC sysctl net.inet.ip.forwarding=1
      • Android
      • xinotes. net/notes/note/1496 shows:
        cat /proc/net/route
        ip route show
        So I tried:
        route add default gw dev rndis0
        Which error-ed: Operation not permitted,
        & still error-ed after
        Settings -> General -> Developer Options ->
        { USB Debugging : Allow = ON ; Allow Mock locations : ON }
        JJLATER Not sure if needed.
        So I assume syntax OK, I "just" need to root the device.
      • Meantime on PC /usr/local/etc/apache22/ httpd.conf
        <IfModule mod_proxy.c>
        ProxyRequests On
        <Directory proxy:*>
        Order deny,allow
        Deny from all
        Allow from
        ProxyVia On
        NoCache *
        This works, allow android to access other internal servers
        but not sure how to get cascade of apaches, so the apache on PC of the smart phones should use the LAN gate apache as a proxy.
      • To try: ipfw packet diversion direct from phone USB to LAN host=gate proxy.
      • I gave up on above, & now use WLAN for Android, which is safer, as now the Android is on my WLAN sub net, which my firewall does not allow to communicate to internal trusted BSD net.
    • Top Of Page

BSD logo   FreeBSD Ports

  • ADB:
    • ADB: "Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device."
    • adb
    • devel/android-tools-adb/pkg-descr & devel/android-tools-adb
    •" Tools Help" (rec. from pkg-descr)
    • adb.html"Android Debug Bridge"
    • /usb/index.html USB Host and Accessory
    • Samsung Galaxy Note 3 + Android 4.4.2 - Working syntax:
      • Settings > Connections > Wi-Fi = OFF
        (Block USB PC against possible infiltration from own insecure Androids on WLAN or from others unknown who might crack my WLAN & then try to progress to internal network).
      • Settings > General > Developer options
        If There is no Developer options, enable it by going to
        Settings > General > About device , then tap Build Number 7 times.
      • Settings > General > Developer options > USB debugging = ON
      • Connect USB cable.
        devd reports: Unknown USB device: vendor 0x04e8, product 0x6860
      • Settings > Connections > Tethering and Mobile hot spot > USB tethering :
        Tick to tether, toggle it to see:
      • On adds an interface shown by PC ifconfig -a
        ue0: flags=8802@lt;BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
         ether xx:xx:xx:xx:xx:xx
      • Notifications:
        If you see (on Android setting "USB tethering") "tethered", thats good, needed for ifconfig -a to add ue0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        If you see "Connected as a media device - Touch for other USB options" that's probably OK
        but you could also:
        Touch it & see "Media device (MTP), Touch "Camera (PTP)", devd now shows:
        " vendor 0x04e8 product 0x6866",
        but "xs adb shell" still fails
      • If this fails: "xs adb shell"
        Remove any intermediate hub (Helped 2018-10-09).
      • Other stuff maybe to check:
      vendor 0x17ef product 0x772b
      Android: USB computer connection: Media Device (MTP)
      FreeBSD: xs adb shell Succeeds
      Android: cd /storage/emulated/0
      Android: mkdir jhs
      Android: cd jhs
      Android: ls -R/> ls-R
      FreeBSD: adb pull /storage/emulated/0/jhs/ls-R .
      FreeBSD: vi ls-R
      Telephone_contacts_Lenovo A5500-H_06.06.2017_1715.xml
      Tablet: Samsung Galaxy Tab4 SM-T330 Android 5.1.1, Kernel 3.4.0-5231636
      FreeBSD: adb shell
      Android: mkdir /mnt/shell/emulated/jhs
      Android: cd /mnt/shell/knox-emulated/jhs
      Android: df -m > df-m
      Android: du -k/> du-k
      Android: ls -R/> ls-R
      Android: ls -alR/> ls-alR
      Android: ls -alR/2>&1 > ls-alR+errs
      Android: ls -lR/> ls-lR
      Android: mount > mount
      Android: printenv > printenv
      Android: ps > ps
      Android: set > set
      FreeBSD: adb pull /mnt/shell/emulated/jhs .


      • cd /usr/ports/devel/android-tools-adb; make; su; make install
      • echo "There is no local manual, just `ls -l /usr/local/share/doc/android-tools-adb`"
      • Manual: adb.html
      • JJLATER I want to IP connect & NFS etc.
      • su #Perhaps
      • adb wait-for-device
        * daemon not running. starting it now on port 5037
        * daemon started successfully
        (This xterm issues no further prompt, until another xterm runs "adb kill-server")
      • ps -laxww | grep adb #shows:
        adb -L tcp:5037 fork-server server --reply-fd 4
      • adb start-server
        (This returns with a prompt.)
      • adb kill-server
      • adb get-state
      • adb get-serialno
        6758498c # ( As seen & listed by berklix.conf )
      • adb devices -l
        List of devices attached
        Old: 6758498c device product:hltexx model:SM_N9005 device:hlte
        New: 6758498c device usb:1:4 product:hltexx model:SM_N9005 device:hlte transport_id:1
        New: 6758498c device usb:1:6 product:hltexx model:SM_N9005 device:hlte transport_id:1
      • adb connect 6758498c
        "unable to connect to 6758498c:5555" .........
      • adb disconnect
        "disconnected everything"
      • adb get-devpath
        unknown OR
        ugen1.6 OR
      • adb remount
        remount failed: Permission denied
      • adb root
        adb cannot run as root in production builds
      • adb usb # Needed before adb shell will succeed.
        Sometimes it hangs instead.
        * daemon not running. starting it now on port 5037 *
        * daemon started successfully *
        Then either:
        • restarting in USB mode
        • error: no devices/emulators found
      • adb shell
        > | cd df du grep id ls mkdir mount ps which
        bash csh ed find head ksh sort su tail tar vi wc
        Note although ed is missing one can load an app Vi Improved
        Exploring 1:
        FreeBSD: adb shell:
        Android: cd /etc; ls -l vold.fstab; cat vold.fstab
        Android: df | more
        Android: du
        Android: id
        Android: ifconfig
        Android: ls | more
        Android: mount | more mount | grep /storage Android: mount | grep rw, mount | grep rw,| grep tmp Android: cd /mnt/sdcard ; ls # Lots of apps cd/Android: mnt/sdcard ; du -k # 13 278 676
        Android: cd /storage/extSdCard ; ls # just: Android DCIM LOST.DIR Nearby jhs
        Android: cd /storage/extSdCard ; du -k # 11 661 408
        Android: ls # shows LOST.DIR so it's top of an FS
        Android: mkdir jhs
        Android: cd jhs
        Android: mkdir indexes
        Android: cd indexes
        Android: df > df
        Android: du -k/> du
        Android: ls -R/> ls-R # Takes a while, lots of opendir failed, Permission denied
        Android: ls -alR/2>&1 > ls-alR+errs
        Android: ls -alR/> ls-alR # Takes a while, lots of opendir failed, Permission denied
        Android: ls -lR/> ls-lR # Takes a while, lots of opendir failed, Permission denied
        Android: mount > mount
        Android: printenv > printenv
        Android: ps > ps
        Android: set > set
        Android: grep .vcf ls-R
        FreeBSD: adb pull /storage/extSdCard/jhs/indexes indexes.`date "+%Y-%m-%dT%H:%M:%S"`
        FreeBSD: grep jhs * # see paths where I've managed to create things:

        Android: cd /mnt/shell/emulated/0
        FreeBSD: adb pull /mnt/shell/emulated/0/Contacts.vcf Contacts.vcf
        FreeBSD: cd ~/._dir/.DOTS
        FreeBSD: adb push Contacts.vcf /mnt/shell/emulated/0/Contacts.vcf
        Exploring 2:
        /system/bin/sh: which: not found
        cd /system/bin
        ATFWD-daemon PktRspTest StoreKeybox adb adsprpcd am androidshmservice apaclient apaservice app_process applypatch at_distributor atrace auditd bintvoutservice blkid bmgr bootanimation bootchecker brctl bridgemgrd btnvtool bu bugreport cat ccm_gen_cert charger_monitor charon chcon chmod chown clatd clear cmp cnd connfwexe content cp cplay crda createsystemfile cs curl dalvikvm date dd ddexe debuggerd dexopt df dhcpcd diag_callback_client diag_dci_sample diag_klog diag_mdlog diag_socket_log diag_uart_log dmesg dnsmasq drmdiagapp drmserver drsd ds_fmc_appd dsdnsutil du dumpstate dumpsys e2fsck ebtables edmaudit efsks epmd flatland fmconfig fmfactorytest fmfactorytestserver freshsebool fsck.exfat fsck_msdos ftmdaemon getenforce getevent getprop getsebool grep gsiff_daemon gzip hci_qcomm_init hd hostapd hostapd_cli hvdcp icd id ifconfig iftop ime immvibed ims_rtp_daemon imsdatadaemon imsqmidaemon input insmod installd insthk ioctl ionice ip ip6tables ipruleset iptables irsc_util isdbtmmtest jackd jackservice keystore kill ks linker ln load_policy log logcat logwrapper lpm ls lsmod lsof macloader make_ext4fs mcDriverDaemon mcStarter md5 mdnsd media mediaserver mfgloader mkdir mkfs.exfat mksh mkswap mm-jpeg-dec-test mm-jpeg-enc-test mm-pp-daemon mm-qcamera-daemon mm-qjpeg-dec-test mm-qjpeg-enc-test mm-qomx-ienc-test mm-vdec-omx-test mm-venc-omx-test720p mm-video-driver-test mm-video-encdrv-test monkey mount mpdecision mtpd mv n_smux nandread ndc netcfg netd netstat newfs_msdos nl_listener notify npsmobex odekeymgr olsrd ping ping6 pm port-bridge pppd printenv profiler_daemon ps qcks qmiproxy qmuxd qosmgr qrngd qrngtest qseecom_sample_client qseecom_security_test qseecomd racoon radish readlink reboot regdbdump renice requestsync restorecon rfs_access rild rm rmdir rmmod rmt_storage route run-as runcon samsungpowersoundplay schedtest schedtop scranton_RD screencap screenrecord screenshot sdcard secure_storage_daemon sendevent sensorhubservice sensorservice service servicemanager setconsole setenforce setprop setsebool settings setup_fs sfotahelper sh sleep smd smdexe ss_conn_daemon ssr_diag start stop strgrep subsystem_ramdump surfaceflinger svc swapoff swapon sync tc test_diag thermal-engine thermald tima_dump_log time_daemon tinycap tinymix tinypcminfo tinyplay tlcWrapperApp tlc_server toolbox top touch uiautomator umount uptime usbhub usbhub_init vdc vmstat vold watchprops wcnss_filter wcnss_service wdsdaemon wipe wlandutservice wm wpa_supplicant
      • adb backup -f /data /android/`date "+%Y-%m-%dT%H:%M:%S"`.adb -shared -nosystem
        Now unlock your device and confirm the backup operation.
        touch "Back up my data" on the Android device.
        Maybe because a DHCP lease is expiring ?
        This froze at 13G, then at 2G 3rd attempt I removed the USB hub, & it still hung at 17G 17967444146. ^Z fg does not restore it, nor does unplugging & replugging. /var/log /messages:
        kernel: ums1: at uhub3, port 3, addr 4 (disconnected)
        lapr kernel: ugen1.4: <SAMSUNG> at usbus1
        root: Unknown USB device: vendor 0x04e8 product 0x6866 bus uhub3
        root: Unknown USB device: vendor 0x04e8 product 0x6866 bus uhub3
        kernel: ugen1.4: <SAMSUNG> at usbus1 (disconnected)
        kernel: ugen1.4: <SAMSUNG> at usbus1
        root: Unknown USB device: vendor 0x04e8 product 0x6866 bus uhub3
        root: Unknown USB device: vendor 0x04e8 product 0x6866 bus uhub3
        kernel: ugen1.4: <SAMSUNG> at usbus1 (disconnected)
      • adb pull /xx
        pull: building file list...
        adb: warning: skipping special file '/dev/ ... Locks up for hours copying nothing, looping, eg:
        /proc/self/task/6582/root/proc / self/task/6582/root/proc/self / task/6582/root/proc/self/task / 6582/root/proc/self/task/6582 / root/proc/self/task/6582/root / proc/self/task/6582/root/proc / self/task/6582/root/proc/self / task/6582/root/proc/self/task / 6582/root/proc/self/task/6582 / root/proc/self/task/6582/cwd/proc /2732/task/6582/fd/17: Protocol not available

        adb pull Does not preserve date stamp of inodes
      • adb shell: du -k /mnt/media_rw/extSdCard/DCIM/Camera
        Permission denied
      • adb shell: du -k /mnt/SdCard/DCIM/Camera
        No such file or directory
      • adb shell: du -k /storage/emulated/0/DCIM/Camera
        No such file or directory
  • devel/android-tools-fastboot &
    A diagnostic protocol primarily used to update the flash filesystem of Android devices over USB.
    JJLATER to_build
  • devel/android-tools-simpleperf a minimal Linux perf implementation for extracting sampling information out of
  • Clues to extra Android tools in FreeBSD may lie in:
    cd /pub/FreeBSD/branches/-current/ports/distfiles
    find . -type f -name \*android\* \;
  • lang/gnatdroid-sysroot Sysroots for C/Ada Android cross- compiler
  • audio/gmtp
    Basic GUI for Microsoft's Media Transfer Protocol (MTP) 2 including file transfer and some play list handling. Initiator implementation of the Media Transfer Protocol (MTP)
    MTP is used by Samsung (along with PTP too.)
  • deskutils /tine20
    includes address book, calendar, email, tasks, time tracking and CRM. .. include.. * Synchronising mobile telephones, such as iPhone, Android, Nokia and Windows Mobile
    Mail from George Mitchell george+freebsd at
  • net/crtmpserver
    High performance RTMP /RTSP streaming server rtmpd is a high performance streaming server able to stream (live or recorded) in the following technologies: - To and from Flash (RTMP, RTMPE, RTMPS, RTMPT, RTMPTE) - To and from embedded devices: iPhone, Android
  • net/linphone
    Linphone is an internet phone or Voice Over IP phone (VoIP). * With linphone you can communicate freely with people over the internet, with voice, video, and text instant messaging * Linphone makes use of the SIP protocol, an open standard for internet telephony. You can use Linphone with any SIP VoIP operator, including the free SIP audio /video service provided by * Linphone is available for desktop computers: Linux, Windows, MacOSX, and for mobile phones: Android, iPhone, Blackberry.
  • net/syncthing
    Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Pulse (previously Syncthing) ... Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized.
    Not in 9.3 ports. In current ports/
  • lang/gnatdroid-armv7Ada Compiler.
  • lang/gnatdroid-binutils/ Infrastructure for C/Ada Android cross-compiler
  • x11-fonts/ roboto-fonts-ttf Android fonts
  • Top Of Page

Android robot.svgAndroid Apps

  • ...ADB Manager - Manage Android Debug Bridge - Requires root
  • ADB over WIFI
    Mail by Thiago Barroso Perrotta perrotta.thiago at
  • Airdroid
    • by "Manage your Android from a web browser, all over the air."
    • Mail from Lars Engels lars.engels at
    • Mail from Luigi Rizzo rizzo at "quite nice (security concerns apart)."
  • FTP
  • Mass Storage managers
  • Lists: Mail from Shane Ambler FreeBSD at "It looks like mass storage was hidden in 4.0 and maybe removed after 4.2. Try searching the android app store for usb mass storage. Online storage like google drive?"
  • Android terminal emulator
  • Hackers keyboard
  • Phone App (on my Samsung Galaxy Note 3 Smart Phone)
    I've seen a call from an unknown to me shown as "Unknown" (rather than the normal digit string). A test call incoming from a German non ISDN (POTS) then was shown as "Private number" , so "Unknown" is something else.
  • SSH
  • Zarchiver
    • zarchiver Supports tar & gzip.
    • Developers site
    • I have tested a plain .tar is readable by FreeBSD current @ 2015-11-12,
    • I have not tested gzip compatibility, neither have I yet fed a BSD tar to zarchiver
    • Default file name NewArchive.tar
    • In startup it warns "In newer Android version (KitKat), OS limits the 3rd party apps (non preinstalled on the device) to access external USB flash or SD card write function."
      cd /storage/extSdCard/DCIM/Camera # du -k # 13 Gig
      I tried & failed to extract to /storage/extSdCard/DCIM/Camera/jhs (which is on SD Card)
      adb shell also could not chmod 777 /storage/extSdCard/DCIM/Camera/jhs
      Operation not permitted
      (Extracting archive was in an attempt to move pictures from internal memory, merging to SD card while retaining date stamp), I guess I would currently need to root the phone then I might be able to work round the Android problem.
      One other way to solve the problem would be to physically remove SD Card, mount on BSD & move the data there.
      I gave up trying to preserve dates, & ran:
      cp -help
      cd /storage/extSdCard/DCIM/Camera/jhs
      cp -R -a -p -i /mnt/shell/emulated/0/DCIM/Camera .
      cp: chmod: Operation not permitted
      cp: utimes: Operation not permitted
  • NFS Mail from Jamie Landeg-Jones jamie at dyslexicfish . net
    NFS is used for mounting my media ... Not all androids come with nfs in the kernel though
  • secdroid
    "SecDroid hardens the android kernel by disable certain binaries that have internet access or can be used as an attack vector and by securing the TCP Stack using Systctl. This helps prevent some MITM (Man-In-The-Middle) and Spoofing attacks. It may also prevent some DOS (Denial-Of-Service) Attacks. Disabled services include SSH, SSHD, Telnet NC (net cat), and Ping, to keep others from gaining access to your device via a remote terminal."
  • Debian Linux
  • Android Options
    • Options Layout: Samsung options layout is not standard Android.
      ClockworkMod gives an android standard options layout, but ClockworkMod [usually or always?] needs an ms-win to install it
  • Options to install APKs
    • Mock Locations: ON
      JJLATER Not sure if needed.
    • Unknown Sources: ON
  • ClockworkMod koushikdutta.rommanager recovery rom manager

Android robot.svgAndroid Proxies Issues & Solutions

BSD logo Network Address Translation

Android robot.svgNotes - Merged

  • en . Android_rooting
  • Path Names
  • TREE - The directory structure.

    (What a classical Unix person would call the `Rooted' directory tree, in the classical Unix meaning of the word `rooted', not the new `cracked mobile phone' meaning of `rooted')
    Path names below are for a Samsung Galaxy Note 3 with a collection of apps, for a phone that has Not been rooted ... yet. (Maybe more paths will work once it is rooted).

    Preamble: Samsung has a horrible set of mounts & links, I don't yet know what part of the mess is generic Android & what part is Samsung. [some]

    Mount paths

    (A subset) Seen with Terminal Emulator & adb shell Sorted by 2nd column Mount Point. Caution: I have added spaces before /elements, & after commas allow web browsers to not need wide screens )
    rootfs / rootfs ro, relatime
    none /acct cgroup rw, relatime, cpuacct
    /dev /block /platform /msm_sdcc.1/by-name /userdata /data ext4 rw, seclabel, nosuid, nodev, noatime, discard, journal_checksum, journal_async_commit, noauto_da_alloc, data=ordered
    tmpfs /dev tmpfs rw, seclabel, nosuid, relatime, mode=755
    devpts /dev /pts devpts rw, seclabel, relatime, mode=600
    tmpfs /mnt /asec tmpfs rw, seclabel, relatime, mode=755, gid=1000
    tmpfs /mnt /secure tmpfs rw, seclabel, relatime, mode=700
    /dev /block /vold /179:65 /mnt /secure /asec vfat rw, dirsync, nosuid, nodev, noexec, noatime, nodiratime, uid=1023, gid=1023, fmask=0007, dmask=0007, allow_utime=0020, codepage=cp437, iocharset=iso8859-1, shortname=mixed, utf8, errors=remount-ro
    tmpfs /mnt /secure /asec tmpfs rw, seclabel, relatime, mode=700
    tmpfs /mnt /obb tmpfs rw, seclabel, relatime, mode=755, gid=1000
    /data /media /mnt /shell /emulated sdcardfs rw, nosuid, nodev, relatime, uid=1023, gid=1023 /mnt /shell /emulated /0/Contacts.vcf
    adb pull /mnt/shell/emulated/0/Contacts.vcf . It's an old one
    phone app: Export your contact list to file "/storage/extSdCard/Contacts.vcf"
    adb pull /storage/extSdCard/Contacts.vcf Contacts2.vcf
    Phone App:
    "Import /Export > Export to USB storage
    Send message / email > Send email"

    Clip attachment, scroll down (already in right directory for Contacts.vcf)

    Also used by FRITZ!App Fon to export to XML
    /mnt /shell /emulated /0/DCIM /Camera
    (21,376 K, path shown by ls -R /)
    adb shell: du -k # 70,032
    adb shell: du -k /storage
    adb pull /storage/extSdCard/DCIM/Camera .
  • adb pull /storage/emulated/legacy/DCIM/Camera 70m

    (XXX path shown by ls -R /)
    • adb shell: du -k
    • adb pull /mnt/shell/emulated/0/DCIM/OpenCamera 10m
      1.9 MB/s (10935240 bytes in 5.355s)
    /data/knox/sdcard /mnt/shell/knox-emulated sdcardfs rw, nosuid, nodev, relatime, uid=1000, gid=1000
    /dev/block/vold/179:65 /mnt/media_rw/extSdCard vfat rw, dirsync, nosuid, nodev, noexec, noatime, nodiratime, uid=1023, gid=1023, fmask=0007, dmask=0007, allow_utime=0020, codepage=cp437, iocharset=iso8859-1, shortname=mixed, utf8, errors=remount-ro
    proc /proc proc rw, relatime
    /mnt/media_rw/extSdCard /storage/extSdCard sdcardfs rw, nosuid, nodev, relatime, uid=1023, gid=1023 21G /storage /extSdCard /DCIM /Camera :
    • mkdir 6g
    • adb shell: du -k /mnt/extSdCard/DCIM /Camera
    • adb shell: du -k /storage/extSdCard/DCIM/Camera
      (path shown by ls -R /)
    • adb pull /mnt/extSdCard/DCIM/Camera 6g

    /storage /extSdCard / Android / data / com.mapfactor.navigator / files/ navigator / temp / torrent
    Navigator app experimental torrent protocol dumps 30G here & fails to clean up.
    sysfs /sys sysfs rw, seclabel, relatime
    none /sys /fs /cgroup tmpfs rw, seclabel, relatime, mode=750, gid=1000
    selinuxfs /sys /fs /selinux selinuxfs rw, relatime
    debugfs /sys /kernel /debug debugfs rw, relatime
    • Vodafone 858 mount | grep -v /mnt/asec/

      Vodafone 985N Smart Phone mount | grep -v /mnt/asec/

      Lenovo TAB A8-50 8" 3G Tablet - "Lenovo A5500-H"
      mount | grep -v /mnt/asec/

    • df | grep -v /mnt/asec # Pruned.
      Samsung Galaxy Note 3 df | grep -v /mnt/asec # Pruned.
      Filesystem Size Used Free Blksize
      /data 26.4G 22.6G 3.8G 4096
      /mnt /shell /knox-emulated 26.4G 22.6G 3.8G 4096
      /mnt /shell /emulated 26.3G 22.6G 3.7G 4096
      /storage /extSdCard 29.7G 18.4G 11.3G 32768
      Permission denied : /mnt /media_rw /extSdCard , /mnt /secure /asec , /mnt /secure /asec .

      Vodafone 858 df | grep -v /mnt/asec # Pruned.
      Filesystem Size Used Free Blksize
      /storage /sdcard1 2.0G 1.8G 160.1M 4096
      /storage /sdcard0 3.7G 43.7M 3.7G 32768

      Vodafone 985N Smart Phone df | grep -v /mnt/asec # Pruned.
      Filesystem Size Used Free Blksize

      Lenovo TAB A8-50 8" 3G Tablet - "Lenovo A5500-H"
      df | grep -v /mnt/asec # Pruned.
      Filesystem Size Used Free Blksize

    • Symbolic Links
      Samsung Galaxy Note 3
      /d -> /sys /kernel /debug
      /etc -> /system /etc
      /sdcard -> /storage /emulated /legacy
      /tombstones -> /data /tombstones
      / vendor -> /system/ vendor
      /mnt /extSdCard -> /storage /extSdCard
      /mnt /sdcard0 -> /storage /emulated /legacy
      /mnt /UsbDriveA -> /storage /UsbDriveA
      /storage /knox-emulated -> /mnt /shell /knox-emulated
      /storage /sdcard0 -> /storage /emulated /legacy
      /storage /emulated /legacy -> /mnt /shell /emulated /0

    • Directories (Paths in {} are not real directories but include symbolic links. Maybe some paths with sym links are not yet in {} ).
      Samsung Galaxy Note 3
      /mnt /shell /emulated /0/DCIM /Camera
      { /storage /emulated /legacy /DCIM /Camera }
      Pictures. Device internal.
      zarchiver see /mnt /shell as empty folder; Why ?
      adb shell can cd /mnt /shell/emulated/0/DCIM/Camera
      zarchiver sees files in { /storage /emulated /legacy /DCIM /Camera }
      adb shell can do cd /mnt/shell/emulated/0/DCIM/Camera
      adb shell can do "cd / storage/emulated/legacy/dcIM" - why ? what does the lower dc to upper DC case conversion ?
      /storage /emulated /legacy /DCIM /Camera /NewArchive.tar seen by adb shell, created by zarchiver
      /mnt /shell /emulated /0/DCIM /Camera /NewArchive.tar seen by adb
      /storage /extSdCard /DCIM /Camera
      { /mnt /extSdCard /DCIM /Camera }
      Pictures. External SD Card near SIM.

      /mnt /SdCard /DCIM /Camera Pictures adb shell cannot cd /mnt /SdCard
      /storage /emulated /0/DCIM /Camera Pictures adb shell cannot cd /storage /emulated /0
      /mnt /media_rw /extSdCard /DCIM /Camera Pictures adb shell cannot cd /media_rw

      /storage /UsbDriveA /Android Created after connecting a FAT32.
      adb shell cannot cd /storage/UsbDriveA as they use same USB socket
      /storage /UsbDriveA /LOST.DIR Created after connecting a FAT32.
      adb shell cannot cd /storage/UsbDriveA as they use same USB socket
      /storage /emulated /0/Download /Adobe /Acrobat
      /storage /emulated /0/archives zarchiver Settings default Home Folder is /storage /emulated /0 .
      zarchiver Settings default archive Folder is /storage /emulated /0 /archives .
      adb shell sees no / storage /emulated /0 .
      /mnt/asec/ru.zdevs.zarchiver-1/ lib/ *.so : Shared libs of sample app zarchiver
      /mnt/ SdCard/ Android/ data/ com.mapfactor.navigator/ files Internal Storage for Navigator
      /storage /extSdCard / Android/ data/ com.mapfactor.navigator / files External SD Card for Navigator

    Exploration with adb shell.

    adb shell
    cd /storage /extSdCard ; mkdir jhs
    cd /storage /extSdCard / jhs
    printenv > printenv
    set > set
    df > df
    /mnt /secure /asec: Permission denied
    /mnt /media_rw /extSdCard: Permission denied
    /mnt /secure /asec: Permission denied
    du/> du
    mount > mount
    ls -R/> ls-R # Off line, not on web.
    ls -laR/> ls-laR # Off line, not on web.
    ls -laR/2>&1 > ls-laR+errs # Off line, not on web.
    # (Also emitted repeated errors "opendir failed, Permission denied".)
    ls -la ; ls
    -rwxrwx--- root sdcard_r
    df du ls-R ls-laR ls-laR+errs mount printenv set
    chmod a+r * # Bad mode
    chmod 666 * # Unable to chmod df: Operation not permitted
    cd /mnt/shell/emulated/0/DCIM/Camera
    ls /storage/extSdCard/DCIM/Camera
    mv * /storage/extSdCard/DCIM/Camera/
    failed on '20140808_154753.jpg' - Cross-device link
    ls -l 20140808_154753.jpg /storage/extSdCard/DCIM/Camera/20140808_154753.jpg
    -rwxrwx--- root sdcard_r 2849952 2014-08-08 15:47 20140808_154753.jpg
    /storage /extSdCard /DCIM /Camera /20140808_154753.jpg: No such file or directory
    Crappy old mv that wont move between devices ! I vaguely recall seeing similar decades ago.
    cd /storage/extSdCard/DCIM/Camera; mkdir jhs
    # End of adb shell session.
    # FreeBSD:
    cd ~/public_html /android
    adb pull /storage /extSdCard /jhs
    cd ~/pics/android/mp4+jpg
    adb pull -a /storage /extSdCard /DCIM /Camera # hung after a while, 2nd try OK.
    cd ~/pics/android/jpg
    adb pull -a /mnt/shell/emulated/0/DCIM/Camera
    cd ~/pics/android
    adb push jpg /storage /extSdCard /DCIM /Camera /jhs # This puts current date stamp on every file. It also hung on 1st try.
    adb push -a jpg /storage/extSdCard/DCIM/Camera/jhs # Also runs, but does not preserve date, & there is no "-a" shown by "adb -help".
    Notes: Other sites re. tree hierarchy:
"The main hardware platform for Android is the 32-bit ARMv7 architecture. The Android-x86 project provides support for the x86 architecture ... it is possible to run Android natively on regular PC hardware with a keyboard and a mouse,[87][88][89] with versions of Android, including 4.4, download-able from the Android-x86 project."


X Servers


Emulators, Cross Compiling, etc

  • "I have managed to run the Android OS with OpenGL support on FreeBSD." "gferenc88, Feb 4, 2013 "

Notes - Un-Merged

(After I've read stuff in this section [& URLs beyond & made notes], I aim to move it up to "Notes - Merged")

References and Acronyms


Corrections and Additions To This Page

Corrections and additions welcome; Ideally in ( Unix diff -c syntax), If you can't do that, quote a unique bit of page for me to search for in editor.
Email author
    mount | grep rw
    Directories I can write to with eg mkdir jhs :
    Filesystem Size Used Free Blksize
    df >/ storage/ extSdCard/ jhs/ t
    grep extSdCard/ storage/ extSdCard/ jhs/ t
    /storage/ extSdCard 29.7G 29.4G 358.1M 32768
    df >/ mnt/ shell/ emulated/ jhs/ t
    df | grep/ mnt/ shell/ emulated 2>1&/ dev/ null
    /mnt/shell/emulated 26.3G 17.6G 8.7G 4096
    date Mon Nov 21 01:33:04 CET 2016
    cd ~/ pics/ android/ ; "#adb">adb pull -a/ storage/extSdCard extSdCard; date
    froze at 609 M
    Android: cd/ storage/extSdCard/DCIM/Camera ; du -k 4255360 .
    FreeBSD: date; "#adb">adb pull -a /storage/extSdCard/DCIM ; date
    Froze at 638 M
    # Attempt to avoid possible causes of freeze
    Android: Settings > Multi Window: OFF, Screen Rotation OFF, Sound Mute
    FreeBSD: cd/ data/tmp; mkdir 2; cd 2 # away from nfs+amd target.
    froze on 143 M
    date ; "#adb">adb pull -a /storage/extSdCard/DCIM/Camera ; date
    froze on 49M
See Also:

Berklix.Net Computer Associates Domains Apache: Web Server FreeBSD: Operating System Brexit Stolen Votes