(self, package_name)
return None
Returns path on device from packagename
Returns path on device from packagename
Returns path on device from packagename
def package_path(self, package_name):
        """ Returns path on device from packagename
        """
        if not self.is_adb_available():
            return None

        _path = self._do_adb_command('shell pm path ' + package_name)
        if _path:
            try:
                _path = _path.join(_path.split())  # remove \r\n
                _path = _path.split(':')
                if len(_path) > 1 and _path[0] == 'package':
                    ret = _path[1]
                    if ret.endswith('apkpackage'):
                        # handle new android packages
                        ret = '/'.join(ret.split('/')[:-1])
                    return ret
            except ValueError:
                pass

        return None
def package_path ( self , package_name ) : if not self . is_adb_available ( ) : return None _path = self . _do_adb_command ( 'shell pm path ' + package_name ) if _path : try : _path = _path . join ( _path . split ( ) ) # remove \r\n _path = _path . split ( ':' ) if len ( _path ) > 1 and _path [ 0 ] == 'package' : ret = _path [ 1 ] if ret . endswith ( 'apkpackage' ) : # handle new android packages ret = '/' . join ( ret . split ( '/' ) [ : - 1 ] ) return ret except ValueError : pass return None