-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hello,
to get aafm up and running on Nougat (Android 7.1 on Cyanogenmod) you need to change line 107 of src/Aafm.py to the following
before:
pattern = re.compile(r"^(?P<permissions>[dl\-][rwx\-]+) (?P<owner>\w+)\W+(?P<group>[\w_]+)\W*(?P<size>\d+)?\W+(?P<datetime>\d{4}-\d{2}-\d{2} \d{2}:\d{2}) (?P<name>.+)$")
after:
pattern = re.compile(r"^(?P<permissions>[dl\-][rwx\-]+)\s+(?P<hardlinks>\d+)\s+(?P<owner>\w+)\W+(?P<group>[\w_]+)\W*(?P<size>\d+)?\W+(?P<datetime>\d{4}-\d{2}-\d{2} \d{2}:\d{2}) (?P<name>.+)$")
and to get the thing with copying files right, a modification of the section around line 180 is neccessary.
if entry['is_directory']:
if not filename.startswith('.'): # Added!
entry_full_path = os.path.join(dirpath, filename) # indent changed
queue.append(entry_full_path) # indent changed
dirnames.append(filename) # indent changed
Around line 90 the code needs to look like the following to get the disksize right.
splitted = lines[1].split()
if len(splitted) != 6: # was 5 before
return '-'
mountpoint, size, used, free, blksize, dfpath = splitted # df path was missing before
for some tweeking of the debug output (avoiding to get annoyed with that total...bogus output add a line before the print output in line 147. Afterwards it looks like the following.
if not line.startswith('total '): # Added!
print line, "wasn't matched, please report to the developer!" # Indent changed
hmm, by the time a diff would be more usefull ;-)
Best regards
Daniel