dlenski / tetherback

Create backups of an Android device over USB (requires adb and TWRP recovery)
158 stars 22 forks source link

ls: mmcblk*: No such file or directory #57

Open TJYSunset opened 6 years ago

TJYSunset commented 6 years ago

Host OS: Windows 10 Professional 15063.674 Device: Moto Z (aka griffin aka XT1650-05), China model Output of tetherback --verbose:

tetherback v0.9.1
Found ADB version 1.0.39
Using default transfer method: adb exec-out pipe (--exec-out)
Device reports kernel 3.18.31-perf-g661294a-dirty
Device reports TWRP version 3.1.1-0
ls: mmcblk*: No such file or directory
Traceback (most recent call last):
  File "C:\Users\[username removed]\AppData\Local\Programs\Python\Python36-32\Scripts\tetherback-script.py", line 11, in <module>
    load_entry_point('tetherback==0.9.1', 'console_scripts', 'tetherback')()
  File "c:\users\[username removed]\appdata\local\programs\python\python36-32\lib\site-packages\tetherback\tetherback.py", line 322, in main
    partmap = build_partmap(adb)
  File "c:\users\[username removed]\appdata\local\programs\python\python36-32\lib\site-packages\tetherback\tetherback.py", line 133, in build_partmap
    mmcblks = adb.check_output(('shell','cd /sys/block; ls -d mmcblk*')).split()
  File "c:\users\[username removed]\appdata\local\programs\python\python36-32\lib\site-packages\tetherback\adb_wrapper.py", line 35, in check_output
    return sp.check_output(self.adbcmd(adbargs), universal_newlines=un, **kwargs)
  File "c:\users\[username removed]\appdata\local\programs\python\python36-32\lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "c:\users\[username removed]\appdata\local\programs\python\python36-32\lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('adb', '-d', 'shell', 'cd /sys/block; ls -d mmcblk*')' returned non-zero exit status 1.

Output of adb shell mount:

rootfs on / type rootfs (rw,seclabel,size=1819536k,nr_inodes=454884)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1917320k,nr_inodes=479330,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1917320k,nr_inodes=479330)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/sda19 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/dm-0 on /data type f2fs (rw,seclabel,relatime,background_gc=on,user_xattr,acl,inline_data,extent_cache,active_logs=6)
/dev/block/dm-0 on /sdcard type f2fs (rw,seclabel,relatime,background_gc=on,user_xattr,acl,inline_data,extent_cache,active_logs=6)
/dev/block/sda15 on /system type ext4 (rw,seclabel,relatime,data=ordered)

Output of adb shell "ls /sys/block":

dm-0 
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
ram0 
ram1 
ram10
ram11
ram12
ram13
ram14
ram15
ram2 
ram3 
ram4 
ram5 
ram6 
ram7 
ram8 
ram9 
sda  
sdb  
sdc  
sdd  
zram0

Not sure why these blocks aren't starting with "mmcblk", but this could be a problem.

ckrmml commented 5 years ago

Huawei P20Pro (Clt-L29) /sys/block looks the same and fails with the same error

dlenski commented 5 years ago

Not sure why these blocks aren't starting with "mmcblk", but this could be a problem.

I believe this is very similar to the situation of #39. Do the sd* subdirectories contain individual partitions?

One reason that I've semi-abandoned this project is because it turns out that there are too many different partitioning approaches on Android devices, and without access to the devices themselves or some very detailed database of how they all handle it… I can't keep up.

If you are interested in writing and testing a PR that can allow tetherback to map partitions with a different naming convention, we can incorporate it.