Open dlord2 opened 7 years ago
Same issue happened for me. Using LineageOS 14.1. I used the following solution.
def device_list_files_parsed(self, device_dir):
command = ['ls', '-l', '-a', device_dir]
entries = {}
reader = csv.DictReader(self.adb_shell(*command),
delimiter=' ',
skipinitialspace=True,
fieldnames=['permissions', 'links', 'owner', 'group', 'size', 'date', 'time', 'name']
)
for line in reader:
filename = line['name']
is_directory = line['permissions'].startswith('d')
entries[filename] = {
'is_directory': ,
'size': 0 if fsize is None else line['size'],
'timestamp': 0.0, # TODO
'permissions': line['permissions'],
'owner': line['owner'],
'group': line['group']
}
return entries
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.
Around line 90 the code needs to look like the following to get the disksize right.
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.
hmm, by the time a diff would be more usefull ;-)
Best regards
Daniel