Is the Terminal IDE app for android compatible with Lollipop? - android

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...

Related

Problems running app on actual device

OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.

run-as: Could not set capabilities: Operation not permitted

on android 6.0.1 I am getting this error when trying to use run-as.
⋊> ~ adb shell 14:29:01
shell#trlte:/ $ run-as org.ligi.passandroid
run-as: Could not set capabilities: Operation not permitted
I really like the run-as command - is there a way to get it to work on 6.0.1 ?
If you have a SAMSUNG device, don't bother - SAMSUNG broke run-as by dropping the setuid flag (so run-as has no chance of switching to a different identity).
Also don't bother trying the Smart Switch "reinitialize device" workaround, it won't work until SAMSUNG fixes it in the firmware (so it is worth updating to the latest version).
Use some other method to access your app's data, like adb backup:
adb backup -f data.ab <my.package>
dd if=data.ab bs=24 skip=1 | openssl zlib -d > data.tar
Instead of dd you can use the abe tool, which can also write .ab files.
For me, it went like this. I am using Samsung s6 API 24. The error list log's detail was the same as mentioned in the question. But when I checked the Build Logs I found the solution written there. To set the MSBuild. So I followed the following steps to resolve this and the app ran successfully.
To correct this problem I had to
Unload Android Project from solution explorer
Right-Click unloaded project and "Edit Project File"
Searched code for "EmbedAssembliesIntoApk"
Found the occurrence in the project file
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
Change it to true and reload the project.
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
Ran the app and the app starts running on Samsung s6
The solution for me was the parameter -autolaunch in the Debugger configuration of the project in the field Parameters.
I use Delphi 10.2 with S7 Edge Android 7
Unlike another answer here, I have also tried to use smart switch & hard device resetting, but unfortunately that approach did not work for me (Wasted extra one hour just to try out that approach). Besides not working, it might create additional problem "samsung account: session expired" - problem, which can be fixed only if you have root access to your device.
I by myself have used instructions from here:
https://www.youtube.com/watch?v=Sy4FWLHxGYs
and then from here:
https://www.tomsguide.com/us/samsung-galaxy-s6-guide,review-2856-3.html
for getting root access to your device, and after that run-as can be executed with additional command "su -c" as for get root user. So whole command will look like this:
su -c run-as org.ligi.passandroid
WARNING: Gaining root access to your device will most probably void your device warranty if you have any left.
Additionally to this, I wanted to be able to debug my application inside Samsung Galaxy S6, so I've altered Visual studio components, more instructions can be found here:
https://issuetracker.google.com/issues/37093233#comment53
If you happen to have Samsung based android device - I have already reported that bug to Samsung, but I've could not get any time schedule if when and if at all they are going to fix this issue. If you own some other Android device - makes sense to report this problem to manufacturer.
I was working from Delphi 10.1 berlin.
I was presented with the same problem and my solution was to configure the sdk to the previous version.
I was using Android SDK 25.2.5.32bit and downgraded to android SDK 24.3.3 32 bit. To configure:
Tools->Environment Options -> SDK Manager
Then, add the necessary sdk, in this case android SDK 24.3.3 32 bit.
#RustyX answer helped my partially. zlib didn't work in my Mac. So I had to use the Android Backup Extractor to convert .ab file to .tar file. You can download it here.
For the full step by step instruction, refer here.
In Visual Studio, App properties, Android Options, changing the debugger from C++ to .Net(Xamarin) seems to have fixed the problem for a mixed C++/C# app.
Also got this error today when I tried to deploy/debug my application on a Samsung Xcover 3 running Android 6.
I solved it by changing the project property "Android Options / Use Fast Deployment" to false.
Here is solution for MS Visual Studio 2022.
https://www.youtube.com/watch?v=_r9GLm0k55o
Just uncheck the "Use Fast Deployment".
I had previously posted an answer here which was deleted, maybe because it was a link to another stackoverflow question referring to the answer I gave there, instead of containing the full answer.
Reposting its contents here from https://stackoverflow.com/a/43242739/7823460:
I had a very similar issue on Samsung Galaxy S6 Edge, trying to start debugging on VS2015, I got a different error, much less verbose than in the attached screenshot:
run-as: Could not set capabilities: Operation not permitted
Based on the contents of the attached screenshot above, I tried 'initializing' / factory resetting the device using Samsung's Smart Switch and it actually fixed the 'run-as' issue I was having.
This is the only solution which worked and didn't involve rooting the device, so I believe it must be publicly available. Of course people attempting this should keep in mind that factory reset means that data will be lost, unless it's backed up. The same Samsung software helps with backing up your data.

How to install SL4A on emulated android phone

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.

Unable to install apk using adb on device upgraded to Android Lollipop

I’ve recently upgraded one of my Android devices to Android Lollipop (5.0) and now I can’t debug my application and even install apk on the device using adb. I receive the following error
java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String android.os.SystemProperties.native_get(java.lang.St
ring, java.lang.String) (tried Java_android_os_SystemProperties_native_1get and Java_android_os_SystemProperties_native_1get__Lj
ava_lang_String_2Ljava_lang_String_2)
at android.os.SystemProperties.native_get(Native Method)
at android.os.SystemProperties.get(SystemProperties.java:64)
at android.os.Environment.<clinit>(Environment.java:354)
at android.os.Environment.getLegacyExternalStorageDirectory(Environment.java:488)
at android.os.Debug.<clinit>(Debug.java:96)
at android.ddm.DdmHandleHello.handleHELO(DdmHandleHello.java:164)
at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:91)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
java.lang.UnsatisfiedLinkError: android.os.Debug
at android.ddm.DdmHandleHello.handleFEAT(DdmHandleHello.java:176)
at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:93)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
java.lang.UnsatisfiedLinkError: android.os.Debug
at android.ddm.DdmHandleProfiling.handleMPRQ(DdmHandleProfiling.java:187)
at android.ddm.DdmHandleProfiling.handleChunk(DdmHandleProfiling.java:88)
at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
My device is Asus FonePad 7 ME175CG or K00Z
Kernel version
3.10.20-i386_cpt
android#mec9#1
Mon Apr 20 13:30:08 CST 2015
Is there any solution for this problem?
UPDATED
first of all thanks to those guys who pay attention to this very specific question, really thanks
for further clarification,
When I received this error, I googled the entire universe for the phrase java.lang.UnsatisfiedLinkError and gave a try to any solutions that seemed to be applicable, as well as, the solution that suggested by #Kushal and others. Most of the questions were (and still are) for HTC M8 and devices other than ASUS. If you visit this post, you may see an answer by me which is deleted by SO guards and I admit it that it was not really an answer and I post the answer while I was really disappointed of resolving the issue.
Anyway, what I've done up to now which may be helpful for others are,
First, I upgraded my Android SDK tools to the latest version 24.2. After that when I tried adb install demo.apk, in some cases it was successful and sometimes not. I killed all running apps on the device (as suggested by some guys) but it sometimes works and sometimes not.
Then, I gave a try to other solution, specifically the one that suggested by this post. In fact, when I try to debug the app using Intellij IDEA, the IDE itself does as the suggested procedure and the result is
You can see that the IDE itself does as the procedure by #Kushal suggests.
After that, I found several records (referring a few as) here and here and in latter someone has said that
This was a bug in some HTC devices that was fixed with L-MR1
Therefore I came up with the idea that there may be a fix by ASUS team which you guys know about it and kindly provide me with that.
Thanks
Disabling Tools -> Android -> Enable ADB Integration solved my issue.
Running on Asus Zenfone 2.
I don't know why this issue appears but you can successfully avoid this issue by closing all the running applications on your device.
Also Unable to test app after upgrading to Lollipop
This error message is due to release binary problem by manufecturer (Asus in this case). This error will not appear in Google Nexus and Samsung Galaxy due to their handling in binary
Solution :
After searching about above problem, the below solution is found on other Stack Overflow question :
Using terminal, just reinstall with adb to avoid the Android Studio recompile time:
$terminal: /sdk/platform-tools/adb install -r
And usually it works. If it fails again, just run this command again
If you really want to try it, the process would be:
Close Studio (or try disabling Tools | Android | Enable ADB Integration)
Do the following on a shell:
$ adb push /path/to/your/project/app/build/outputs/apk/app-debug.apk /data
$ adb shell pm install /data/app-debug.apk
$ (am start command from comment #4/#5)
Restart IDE (or Re-enable ADB Integration).
This solution is suggested by Google group for alternate fix to above problem Here
Reference Answer : Here
This way you will able to re-install apk and above error will not come
I found a solution though I am not sure if others are willing to use it as it may harm the device and causes it to get useless
In fact, as the answers that the question has received just sound to be copy and paste of other questions’ answers and are not applicable in my case I disappointingly tried to make a radical move and flash my device to downgrade its software to Android 4.2.2 but chancy I decided to flash my device to Android Lollipop again to see if it removes the issue and fluky it did (at least in my case)!
IMPORTANT NOTE!
Before following this procedure, consider the fact that your device may get broken and you lose all data you have on your device. So please make a backup copy before you proceed.
I searched a lot and found methods that are partially described here and here but finally I followed this procedure:
Download the correct update file from here (ASUS support or FonePad Support) according to the type of your device (ww, tw or others). Mine is ww and downloaded ASUS Fonepad 7 (ME175CG) Software Image Version: WW_V6.3.7 For WW.
Then change the downloaded file to ASUS_BUNDEL.ZIP
Then copy that file in to root internal memory
Putting the device into recovery mode (by holding volume up and
power key down simultaneously)
Choose SD Download
The device starts to flash and after finishing it you have a brand new device and the issue is completely removed.
Now I can install apk using adb command and debugging my application as I did before and I have not seen the nasty error anymore.
I'll open this answer to receive others feedback then I mark it as the real answer.
I hope this help others resolve the issue.
I had the same issue with Asus MemoPad ME70CX and solved by restarting ADB server using command line. Also you may need to kill BlueStacks processes running in background using TaskManager.

sl4a permission issue after android upgrade

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

Categories

Resources