0

I want to run some apps on android with QPython3. So I tried but got permission error.

#-*-coding:utf8;-*-
#qpy:3
#qpy:console

import subprocess
yt = subprocess.Popen('/system/app/YouTube/YouTube.apk')
yt.wait()
print("done")

The result is following : (snip) "..../subprocess.py" line 1356, in _execute_child OSError : [Errno 13] Permissio denied

Help me please...

1 Answers1

0

I'm pretty sure you cannot execute an .apk directly. You would use subprocess to run Unix commands like ls or other "real" ELF executables.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
  • I am a beginner of programming. So, unfortunately I'dont know what you mean at all. Eventhough I feel shamed, could you let me know the concrete method step by step? I would appreciae you. – JAEWON JUNG Jun 17 '17 at 14:08
  • Is there no way to run '.apk' with Qpython3? OTL – JAEWON JUNG Jun 18 '17 at 01:46
  • `subprocess` runs executables. Apps aren't simply executables. If you're trying to launch an app, see https://stackoverflow.com/questions/12737150/launch-android-app-from-sl4a-script. – Kirk Mar 09 '21 at 07:37