If I don't use sudo I get a permission error:
$ sdkmanager "build-tools;33.0.1"
Traceback (most recent call last):
File "/usr/bin/sdkmanager", line 33, in <module>
sys.exit(load_entry_point('sdkmanager==0.6.0', 'console_scripts', 'sdkmanager')())
File "/usr/lib/python3.10/site-packages/sdkmanager.py", line 1141, in main
method(args.packages)
File "/usr/lib/python3.10/site-packages/sdkmanager.py", line 972, in install
install_dir.parent.mkdir(parents=True, exist_ok=True)
File "/usr/lib/python3.10/pathlib.py", line 1175, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/opt/android-sdk/build-tools'
If I use sudo I get this error (or switch to sudo zsh)
sdkmanager "build-tools;33.0.1" ✔ root#wiley
Traceback (most recent call last):
File "/usr/bin/sdkmanager", line 33, in <module>
sys.exit(load_entry_point('sdkmanager==0.6.0', 'console_scripts', 'sdkmanager')())
File "/usr/lib/python3.10/site-packages/sdkmanager.py", line 1141, in main
method(args.packages)
File "/usr/lib/python3.10/site-packages/sdkmanager.py", line 954, in install
url = packages[key]
KeyError: ('build-tools', '33.0.1')
Related
Getting errors as below, when I follow step 4 of the instruction from Getting Started with ARC Open Source on Linux. OS is Ubuntu 14.04 LTS running in Hyper-V.
UBUNTU14:~/arc$ ./configure
ERROR:root:While running
['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python'] ERROR:root:GSResponseError:
status=403, code=None, reason=Forbidden.
ERROR:root:Try prodaccess, and if it does not solve the problem try rm
~/.devstore_token ###STEP_WARNINGS### ERROR:root:Retrying after 9 s
sleeping Traceback (most recent call last): File
"/home/fkiller/arc/src/build/build_common.py", line 938, in wrapper
return func(*args, **kwargs) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 243,
in _download_package_with_retries
self._download_method(url, download_package_path) File "/home/fkiller/arc/src/build/util/download_package_util.py", line 119,
in _download
build_common.get_gsutil_executable(), 'cp', url, destination_path]) File
"/home/fkiller/arc/src/build/util/download_package_util.py", line 97,
in execute_subprocess
output = subprocess.check_output(cmd, cwd=cwd, stderr=subprocess.STDOUT) File "/usr/lib/python2.7/subprocess.py",
line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command
'['third_party/tools/depot_tools/third_party/gsutil/gsutil', 'cp',
'gs://arc-build/naclports/builds/pepper_40/python.zip',
'/tmp/tmpUZ0IoK/naclports-python']' returned non-zero exit status 1
Any idea to resolve this without changing build script? I may manually pointing python.zip from other sources such as https://naclports.storage.googleapis.com/builds/pepper_40/trunk-147-g49eb4c9/publish/python/pnacl/python.zip, but I want to build it as is without changing scripts.
I've already tried to setup gsutil and its authenticator, but it didn't fix the issue.
EDIT: After #elijah-taylor fixed ACL, now I'm getting errors below
Traceback (most recent call last): File "src/build/configure.py",
line 365, in
sys.exit(main()) File "src/build/configure.py", line 347, in main
_gclient_sync_third_party() File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename)) File
"/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception OSError: [Errno 2] No such file or directory
In the line 132,
File "src/build/configure.py", line 132, in _gclient_sync_third_party
subprocess.check_output(cmd, cwd=os.path.dirname(gclient_filename))
gclient_filename is "third_party/.gclient" and os.path.dirname(gclient_filename) is "thrid_party".
The problem was bad ACLs on the files. I reached out to #elijah-taylor for a fix, it should now work!
faced same issue..fixed after running the following.
apt-get install gsutil
apt-get install libwww-perl
chmod +x ./third_party/tools/depot_tools/third_party/gsutil/gsutil
I have created a pygame application. Now I want to create an APK and for that I need to install pygame_sdl2. However, when I try to install by running python setup.py install I get this error
Traceback (most recent call last):
File "C:\pygame_sdl2-master\setup.py", line 36, in <module>
parse_cflags([ "sh", "-c", "sdl2-config --cflags" ])
File "C:\pygame_sdl2-master\setuplib.py", line 93, in parse_cflags
output = subprocess.check_output(command, universal_newlines=True)
File "C:\Python27\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Any help in this context would be appreciated.
Download the version you need here https://bitbucket.org/marcusva/py-sdl2/downloads
Exctract, open the cmd and navigate to the folder.
Run python setup.py install
Working for me this way.I downloaded PySDL2-0.9.3.zip file
I created signed target file with the help of this command:
./build/tools/releasetools/sign_target_files_apks -d ./device/bl/common/security -e app.apk=device/bl/common/security/releasekey -o target.zip signed_target.zip
This instruction finished successful.
Now I tried to create signed ota package with the help of this command:
./build/tools/releasetools/ota_from_target_files -k ./device/bl/common/security/releasekey signed_target.zip ota_signed.zip
But I have error:
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 925, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 893, in main
WriteFullOTAPackage(input_zip, output_zip, OPTIONS.fota)
File "./build/tools/releasetools/ota_from_target_files", line 464, in WriteFullOTAPackage
MakeRecoveryPatch(OPTIONS.input_tmp, output_zip, recovery_img, boot_img)
File "./build/tools/releasetools/ota_from_target_files", line 386, in MakeRecoveryPatch
boot_type, boot_device = common.GetTypeAndDevice("/boot", OPTIONS.info_dict)
TypeError: 'NoneType' object is not iterable
How can I fix it?
./build/tools/releasetools/ota_from_target_files -d MMC -k ./device/bl/common/security/releasekey signed_target.zip ota_signed.zip
I've followed the instructions Google has provided on downloading the Source Tree, but after I run the command
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
and I receive the following error message :
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 595, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1106, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
What did I do wrong? Or is this just an error on behalf of Repo?
UPDATE: Now that I've installed Python 2.7, I still have almost the exact same error message:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.7_r1
Traceback (most recent call last):
File "/Users/roboguy12/bin/repo", line 690, in <module>
main(sys.argv[1:])
File "/Users/roboguy12/bin/repo", line 657, in main_Init(args)
File "/Users/roboguy12/bin/repo", line 189, in _Init_CheckGitVersion()
File "/Users/roboguy12/bin/repo", line 214, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I call $ python -V and it says Python 2.7.1, so I don't know what else I can do.
Seems to me you might have not done a couple of things: chmod'd the repo to +x and/or put it in your $PATH statement as the first directory to look for (and could be using another version of repo). Have you tried 'ls -al' instead? The directory you're looking for is hidden and you need the -a argument in ls to view hidden files/directories.
UPDATE: Ah, just saw your update. Since you're using a Mac, you need to use Python 2.7. To do so, you'll need to MacPort it. This website provided much help to me: INSTALLING PYTHON 2.7, EASY_INSTALL, PIP, VIRTUALENV AND VIRTUALENVWRAPPER ON MAC OS X
I am new to Android. I wanted take a look at the Andriod source and started the download process. I am having a problem in initialising the repo. I am getting a below error:
$ repo init -u https://android.googlesource.com/platform/manifest
Traceback (most recent call last):
File "/bin/repo", line 685, in <module>
main(sys.argv[1:])
File "/bin/repo", line 652, in main
_Init(args)
File "/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/bin/repo", line 209, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
You need to install git. The typical command would be :
$ sudo apt-get install git-core