I installed Sl4A via this link : https://electrum.org/android.html
I wanted to run electrum on my Nexus 10.
installation went fine, electrum was working (send & receiving btc).
Then, I upgraded to Android 5 (last version, lolipop I think).
After that, I can't run any Python script via SL4A.
I checked logcat file, I saw some lines about permission & chmod, but not sure if it's related.
I just rolled to 4.4.4 and am having the same issue.
I dug into the error a bit more: seems the new "Sandbox of Safety" functionality on Android that is supposed to keep rogue apps from writing to directories they're not supposed to write to is preventing SL4A from writing to directories it probably should be able to write to - ie, SD card and such
I moved the files I was writing to to the SL4A directory on internal storage and my script worked again.
I would really like to see a better solution though
Related
I normally use a windows device and have everything installed properly there. Went to download pydroid 3 on android tablet, got that and pip and all dependencies downloaded besides PyAudio. It seems the .whl file is only compatible with Windows currently.
Is there a workaround to get SpeechRecognition and PyAudio working on android devices? I have the SDK installed for Google Play Store etc..I have installed Pydroid 3 which is running Python 3.7.2. I have tried to roll back to Python 3.6.1 because I guess the wheel is included with that but to no avail so far.
Traceback (most recent call last):
raise AttributeError( Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
Filedacalatarunic:Pydroilsrtnes/arm-linux
Program finished
I expected it to work. Even though it is android based I figured it would still have some SDK or file that could be a workaround. If I can't get PyAudio to work on the Kindle Fire HD10 then I won't be able to get SpeechRecognition to work either. And if neither of those work I will not be able to communicate with my program at all.
I'm trying to run c code on my android device using various terminal emulator apps. I have tried 3 so far and all of them are giving me errors. The first one I tried was the most popular: terminal IDE. Ever since the later versions of android have been released this app will not compile c code due to a position independent executable (PIE) error. Next up was a promising app called termux. This app allows me to compile my C code with gcc but gives me "permission denied" errors whenever I try to run even the simplest of codes. I have examined and researched this error thoroughly. I have tried using chmod in various different ways as well as checking the permissions using ls -l and have tried compiling and running in both the external sd card AS WELL AS on the internal device storage. I understand that the SD card doesn't have exec permission but it still won't work even in my device's internal memory. I have asked for help from the termux creator but to no avail. No matter what I do I cannot seem to get these codes to run on my android device. It is not rooted and I don't plan to root it any time soon. All of these apps claim that they should work without rooting the device. I finally tried running C code in another app (my last hope) called gnuroot. Unfortunately I'm still getting the permission denied error, but the code does compile as it did in termux. I can't access any of the directories created by these apps by the way. They are hidden from the "my files" app which normally lets me browse directories on my device. However, the directories shown when I type in ls are not in the my files app, so I can't place any files directly in them. I can only see the basic home directories for termux and gnuroot, but when I try to place the code in there, I still get the permission denied error. Furthermore, I don't know what directory to even place the code in for it to work. I'm totally lost and really need help. Thanks.
I've gotten C programs running well under termux using gcc.
While compiling, compile your code using the -o option, and no -c, like this:
gcc -o helloworld helloworld.c
The object file helloworld will be created with execute permissions and you can run it with ./helloworld.
Note that the source files must be in the home directory first. If you haven't changed your environment variables, first go to your home directory with cd and then compile your source files there.
In Termux, if you use Midnight Commander or Ranger you can go back one directory from home to files, and in there you'll find the apps /etc, /bin, /usr, /etc.. directories. Maybe that is where you can find or send the files you are looking for.
Try to upgrade Termux. Simply run:
"packages upgrade" (with no quotes)
in command line.
If this don't fix the problem, run:
"packages install termux-exec" (with no quotes)
Hope this help.
i'm currently reading through head first python and upon reaching chapter 8 I got stuck. The book wants me to download SL4A from the link http://code.google.com/p.android-scripting however that link no longer works. So I did some searching and found the file on github. My real problem is when I try to download it on the emulated device it just says waiting for data connection and it never downloads. I am wondering if there is a way to fix this. Any help is appreciated thanks!
EDIT: to get it to work I downloaded both files from here https://github.com/kuri65536/python-for-android/blob/master/README.md
then I copied the files to the folder
C:\Users\lucas\android-sdks\platform-tools
then I opened CMD and cd to the path above.
then use the command:
adb install (filepath)
for both files and they appeared on the emulated device.
Download to your pc and push through ADB.
Download files and adb install worked for me in my installation (Windows 10, android studio 2.1.1) with minor differences:
1) adb command is located in:
C:\Users\MyUser\AppData\Local\Android\Mysdk\platform-tools
Need to add to path
2) Needed release sl4a-r6.1.1-x86-debug.apk. Downloaded it from release pages
I'm also reading through HeadFirstPython and got stuck at this stage (with the error: app not installed). I tried the abs method above and ended up with yet another problem: install_failed_no_matching_abis. After a lot of research, I got to understand that the "native libraries" of the sl4a.apk were not matching the system architecture of my emulated android. In other words, if one wants a faster emulator in android studio, he ought to use an x86 architecture android; but the problem with that is scripting layer for android is programmed to work on ARM architectures hence the 'install_failed_no_matching_abis' error.
The solution that worked for me was to go back to AVD in Android Studio, delete the downloaded emulator (which was of x80 cpu/abi) and download one with armeabiv7 cpu, recommended level=24. It took a lot of trial and error to get to this choice as other android cpu/abi were either too slow or just wouldn't allow me to install the required apps.
Edited: In the end, I was directed to use GenyMotion as that performed better in terms of speed. I was reluctant at first but, to my surprise that really is the case (It is super faster than ARM android studio alternative). Not only is it a great emulator, it also has this ARM translation tools that allows one to easily install ARM sl4a.apk on the x86 devices.
I just ordered a Nexus 9 and will be using it to program. Has anyone tried to run Terminal IDE on Nexus 9 or any other devices using Android 5.0 Lollipop?
The "links" browser included with Terminal IDE ran fine on my Nexus 5 under KitKat, but it crashes with the PIE error mentioned under Lollipop. Other than that, Terminal IDE has performed flawlessly for me, for about a year now. Sorry--forgot to add: Terminal IDE under Lollipop is "stopped" if started with the Android keyboard, or Android keyboard option is toggled. It will resume running if the Terminal IDE keyboard option is toggled.
7175 recompiled all the Terminal IDE binaries statically, so they don't give the PIE error on Android 5+. http://forum.xda-developers.com/showpost.php?p=57292384&postcount=68 (dec 2014)
7175 recommends downloading the apk from the following dropbox, then unzipping (an apk is a zip) and copying across just the binaries you need (instead of sideloading the whole apk).
https://www.dropbox.com/s/h2d23ecbrt2akeu/terminalide-2.02-binary-mod-signed.apk?dl=0
I downloaded this, and its vim worked on my old 4.2.2 Android phone - but I haven't actually tried it on an Android 5+ phone! (I don't have one; I'm researching my upgrade path).
At lease one stackoverflow user uses it: Rejecting re-init on previously failed class error when loading a Class with dalvikvm
A question within an answer: Anyone know how to confirm these binaries are safe? Especially ssh - downloading a "secure" shell binary from an anonymous user defeats the purpose!
The background of the post seems 100% legit, and has 467 "thanks" (wait, that's for all 7175's posts; this particular one only got 2 "thanks"...) - presumably people who downloaded it, and found no problem. But the site seems dodgey (http://forum.xda-developers.com), with lots of ads and security warnings. Maybe they are recent, after these older posts, and xda used to be good?
Terminal IDE appeals to people who don't want to root their phones - who probably don't want to sideload apps, or download anonymous binaries off the internet. I think the Play store does some rudimentary verification, and the more people who use it, the more likely problems are found. So it would be reassuring if spartacusrex could release this on the Play store as an upgrade - or, 7175 release a new fork.... or someone else release one. Forking is one of the strengths of open source!
BTW: I feel really bad doubting 7175's kind and great work, but sadly, security is a real issue. :(
No, but termux seems like a good Terminal IDE replacement for Lollipop - and under active development. Has vim, ssh, git, gcc etc and a version of apt-get.
[It only works in Android 5+, so I haven't tried it yet myself.]
Edit: It looks like it's not working on all new devices, maybe a target SDK version incompatibility? Terminal IDE should work at least on some other devices since it uses statically compiled binaries to run different parts of it. Statically compiled binaries are PIE(position independent executable) safe which is a requirement in lollipop. I've been running it on a lollipop build with my Galaxy Nexus no problem.
EDIT2: Also there are a few binaries that are dynamically linked and are not PIE, so those won't work.
You have lot of options now:
* Termux
* GnuRoot apps
* UserLAnd
* KBox
Of course, it should be possible to build a great filesystem yourself with fakechroot, fakeroot or proot. Or a non-root package manager.
I remember seeing a project named like 'Gentoo prefix for Android non-root' on Sourceforge. I don't know if it is still at alpha stage...
I have followed the instuctions as posted on http://source.android.com/source/index.html to build an Android Source Environment. I am using Ubuntu 10.04. The process went without problems. After hours of downloading the Source Tree (I Have tried several including 2.1 and 4.0.1) and execution of the make command all image files were created in the directory '/WORKING_DIRECTORY/out/target/product/generic' except the boot.img file. I read across the internet that it is possible to create an own boot.img file using 'mkbootimg'. However I would like to avoid this in first place and use this option only as a last resort, because I am not familiar with the process as it requires some header files I am not certain of where to find them. I am curios why the boot.img file was not created.
Is somebody facing the same issue or maybe has solved the issue?
Best Regards
You've built your image for an emulator. Thus, you not need an boot.img to run an emulator and that's why it is not in your directory. You should make build for a particular device. If this device is Google device you'll have no problems - just follow the instructions on the webpage: http://source.android.com/source/building-devices.html