Ticket #1093 (assigned defect)

Opened 7 years ago

Last modified 5 years ago

Android install fails due to toolbox df

Reported by: albert Owned by: gpress
Priority: major Milestone:
Component: SeattleOnAndroid Version: 0.1t
Severity: Medium Keywords:
Cc: justin, florian.metzger@… Blocking:
Blocked By:

Description

Line 353 of Linux_resources.py tries to figure out the available disk space during install:

 statresult = commands.getstatusoutput('df -P .')

The problem is, the standard Android "toolbox" (single-binary replacement for small command-line tools) version of df doesn't work with the -P option.

On Florian's Sony Tablet S running Android 4.0.3:

shell@android:/ $ which df
/system/bin/df
shell@android:/ $ ls -l /system/bin/df
lrwxr-xr-x root     shell             2012-04-26 20:54 df -> toolbox
shell@android:/ $ cd sdcard2
shell@android:/sdcard2 $ df -P
Filesystem             Size   Used   Free   Blksize
-P: No such file or directory
shell@android:/sdcard2 $ df .
Filesystem             Size   Used   Free   Blksize
.                       30G     4G    25G   32768

For comparison, on our office smartphone, a ZTE Blade running Android 2.3.7 (CyanogenMod-7.1.0-Blade), we have "busybox" instead of "toolbox", which works:

localhost / # which df
/system/xbin/df
localhost / # ls -l /system/xbin/df
lrwxrwxrwx    1 root     root             7 Oct 14  2011 /system/xbin/df -> busybox
localhost / # df --help
BusyBox v1.19.1-cm71 bionic (2011-09-01 04:24 +0200) multi-call binary.

(...some output omitted...)

localhost / # cd sdcard
localhost ~ # df -P .
Filesystem           1024-blocks    Used Available Capacity Mounted on
/dev/block/vold/179:1    1932960   1662144    270816  86% /mnt/sdcard
localhost ~ # df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/block/vold/179:1
                      1932960   1662144    270816  86% /mnt/sdcard

The installer log shows this error:

New installation, beginning benchmark.
Total resources measured by the script for Linux OS: 
{'diskused': 'unable to read disk partition size', 
'fileread': 186833, 'filewrite': 186833, 'loopsend': None, 'lograte': None, 
'netrecv': None, 'random': 127100, 'insockets': 341, 'filesopened': 341, 
'looprecv': None, 'cpu': 2L, 'memory': 758160000L, 'netsend': None, 
'outsockets': 341, 'events': None}

Change History

Changed 6 years ago by justinc

  • owner set to gpress
  • status changed from new to assigned

Changed 5 years ago by albert

To clarify, this is only an issue when attempting a command-line install on Android. This is bound to fail due to other problems too (no cron we can use etc.), all of which are handled by the native SeattleOnAndroid app.

If nobody objects, I suggest we close this ticket, as the native app readily works.

Changed 5 years ago by albert

  • component changed from - to SeattleOnAndroid
Note: See TracTickets for help on using tickets.