skip to Main Content

I am building a kivy android package in Windows subsystem for Linux and I am stuck with this shutil error

shutil.error: [(src,destination, "[Errno 13] Permission denied:destination")]

The complete log is:

(kvenv) root@LAPTOP-IEKPNDEA:/mnt/d/think_dignity_projects/avsar/avsar_androidAPP# buildozer -v android debug
# Check configuration tokens

Buildozer is running as root!
This is not recommended, and may lead to problems later.
Are you sure you want to continue [y/n]? y

# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.7 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /root/anaconda3/envs/kvenv/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/platform/python-for-android
* master 1b3b0e3f [origin/master] Merge pull request #2225 from kivy/release-2020.06.02
# Run '/root/anaconda3/envs/kvenv/bin/python3.8 -m pip install -q  'appdirs' 'colorama>=0.3.3' 'jinja2' 'six' 'enum34; python_version<"3.4"' 'sh>=1.10; sys_platform!="nt"' 'pep517<0.7.0"' 'toml''
# Cwd None
# Apache ANT found at /root/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /root/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19c
# Android NDK found at /root/.buildozer/android/platform/android-ndk-r19c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/root/anaconda3/envs/kvenv/bin/python3.8 -m pythonforandroid.toolchain create --dist_name=avsar --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21'
# Cwd /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/platform/python-for-android
/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 27
[INFO]:    Available Android APIs are (27)
[INFO]:    Requested API target 27 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /root/.buildozer/android/platform/android-ndk-r19c
[INFO]:    Found NDK version 19c
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         avsar: min API 21, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy, certifi), built for archs (armeabi-v7a)
[INFO]:    avsar has compatible recipes, using this one
# Build the application #7
# Copy application source from /mnt/d/think_dignity_projects/avsar/avsar_androidAPP
# Create directory /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/app
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/main.kv
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/main.py
# Create directory /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/app/UI_data
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/labour.jpg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/lady.jpg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/lady.png
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/lady2.png
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/lady3.jpeg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/Picture1.jpg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/WhatsApp Image 2020-06-02 at 2.03.35 PM.jpeg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/WhatsApp Image 2020-06-02 at 2.03.50 PM.jpeg
# Copy /mnt/d/think_dignity_projects/avsar/avsar_androidAPP/UI_data/WhatsApp Image 2020-06-02 at 2.03.51 PM.jpeg
Traceback (most recent call last):
  File "/root/anaconda3/envs/kvenv/bin/buildozer", line 8, in <module>
    sys.exit(main())
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/__init__.py", line 1047, in run_command
    self.target.run_commands(args)
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/target.py", line 104, in cmd_debug
    self.buildozer.build()
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/__init__.py", line 202, in build
    self.build_application()
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/__init__.py", line 717, in build_application
    self._copy_application_libs()
  File "/root/anaconda3/envs/kvenv/lib/python3.8/site-packages/buildozer/__init__.py", line 817, in _copy_application_libs
    copytree(self.applibs_dir, join(self.app_dir, '_applibs'))
  File "/root/anaconda3/envs/kvenv/lib/python3.8/shutil.py", line 554, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/root/anaconda3/envs/kvenv/lib/python3.8/shutil.py", line 510, in _copytree
    raise Error(errors)
shutil.Error: [('/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/applibs', '/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/app/_applibs', "[Errno 13] Permission denied: '/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/app/_applibs'")]

When I opened the directory “/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/android/app/_applibs” and “/mnt/d/think_dignity_projects/avsar/avsar_androidAPP/.buildozer/applibs”, both of them were empty

2

Answers


  1. Chosen as BEST ANSWER

    The problem was solved.

    I only had to run buildozer as root. That's all.


  2. simply go in .buildozer folder property and give all permission(full access) to all user and apply them and try again to run command
    (i use windows system in Ubuntu softwere)
    just give fill access for all user to .buildozer folder

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search