def download_apk(url: str, path: Path):
        """
        Download apk file from url
    
        Args:
            url (str): The URL of the APK file to download.
            path (Path): The local file path where the APK will be saved.
    
        Raises:
            requests.exceptions.RequestException: If the download fails.
        """
        try:
            response = requests.get(url, stream=True)
            response.raise_for_status()  # Raise an error for HTTP errors
    
            # Write the content to the specified path
            with open(path, "wb") as file:
                for chunk in response.iter_content(chunk_size=10240):
                    if chunk:  # Filter out keep-alive chunks
                        file.write(chunk)
        except requests.exceptions.RequestException as e:
            logger.warning(f"Failed to download APK from {url}: {e}")
            raise

        Download apk file from url
    
        Args:
            url (str): The URL of the APK file to download.
            path (Path): The local file path where the APK will be saved.
    
        Raises:
            requests.exceptions.RequestException: If the download fails.
        
adbutils/install.py