tinyalsa elf failed to run on android shell, anybody know what is wrong with it ?
I am new to android, :-)
here are my steps:
1. download tinyalsa source code to a ubuntu 10 vm, compile it with arm-linux-gnueabi-gcc
2. adb push xx\tinypcminfo /data/local/tmp
3. adb shell -> cd /data/local/tmp ->chmod 777 tinypcminfo
4. ./tinypcminfo
5. error happened
Related
I have a Nexus 6 running Marshmallow 6.0.1 which I successfully installed Kali Nethunter 3.0 to.
In the Nethunter Terminal:
I have successfully compiled the Helloworld program that is written in C using the command: gcc helloworld.c -o helloworld.
But then when I try to run it in the terminal using the command: ./helloworld, it just gives me permission denied. I tried all sorts of chmod and sudo but to no avail. I tried the ls -l helloworld command and it gives me: -rw-rw----, there are no x characters and they don't appear even after "chmod +x". The helloworld C file is on the sdcard (I have referred to it in the terminal using: "cd /sdcard/". Could the problem be that the sdcard has a "noexec" flag? If so, what should I do to solve this problem?
I am trying to get my rooted LG G4 to rsync with my server. On the good old LG G2 it is running smoothly but the 64bit architecture throws errors at me.
I tried to come up with a solution from other sources (here and other sites) But it just goes on to the next file it cannot load correctly
The code I use is as follows:
export LD_PRELOAD=/system/lib64/libsigchain.so; export PATH=$PATH:/data/data/burrows.apps.busybox/app_busybox; export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/burrows.apps.busybox/app_busybox:/vendor/lib*:/system/lib*; /data/data/burrows.apps.busybox/app_busybox/rsync -v -E --delete -s -r -t -l --partial --size-only --rsh="/data/data/burrows.apps.busybox/app_busybox/ssh -y -i /keypath/ssh.key -p10022" user#homeip:/some/folder/ /local/folder
First it was the libsigchain.so 32/64bit error
Now it is this: CANNOT LINK EXECUTABLE DEPENDENCIES: "/system/lib/libsigchain.so" is 32-bit instead of 64-bit CANNOT LINK EXECUTABLE DEPENDENCIES: "libc.so" is 64-bit instead of 32-bit
Be it tasker, secure settings or terminal emulator ...
I would appreciate any suggestions.
I'm trying to build an empty new project project for Android target from Qt Creator, but I'm getting this error:
12:51:05: Packaging error: Command "C:/adt/sdk/platform-tools/adb.exe -s emulator-5554 pull /system/bin/app_process C:/Workspace/NewProjects/build-untitled18-Android_for_x86_GCC_4_9_Qt_5_4_2-Debug/app_process" failed.Exit code: 1
Screenshot:
And the full log, in case needed.
How do I fix that error?
After reading the answer to a related question:
As mentioned before, Android 5.0 has /system/bin/app_process as a symlink to /system/bin/app_process32. Since a symlink cannot be pulled with adb pull, the ndk-gdb script will not be able to work as-is.
I just logged into the android emulator VM and replaced the symlink with a copy of the file:
C:\Users\sasho>adb shell
root#generic_x86:/ # mount -o rw,remount /system
root#generic_x86:/ # cd /system/bin
root#generic_x86:/system/bin # rm app_process
root#generic_x86:/system/bin # cp app_process32 app_process
And it worked after that!
I'm trying to setup the OUYA driver on my Mac OS (Maverick) and I'm getting bash-3.2$ command not found when I type in the commands to root the pointer / install the driver. I'm following this video tutorial http://www.youtube.com/watch?feature=player_embedded&v=5LSBiNfMq8A and have followed everything correctly but for some odd reason once I try to type in adb after bash-3.2$ comes up, not works. What am I doing wrong? I've looked all over the internet and on the OUYA forums and I can't seem to figure out what is wrong with my terminal commands.
Matthews-Mac-mini:~ mycomp$ vi ~/.bashrc
Matthews-Mac-mini:~ mycomp$ adb
-bash: adb: command not found
Matthews-Mac-mini:~ mycomp$ bash
bash-3.2$ adb kill-server
bash: adb: command not found
bash-3.2$
Thanks.
The adb tool is part of the Android SDK. If ANDROID_HOME is set to the directory where you put the Android SDK on your Mac, then you need to add $ANDROID_HOME/platform-tools to PATH , like this in your ~/.bashrc:
ANDROID_HOME=/users/myname/android # or wherever you put the Android SDK
PATH=$ANDROID_HOME/platform-tools:$PATH
For anyone using a Mac that couldn't find were to run the command in the terminal it is located at
Users/YourUserName/Library/Android/sdk/platform-tools
(if you type ls you should see a file called "adb") You'll type ./adb kill-server that should do it.
Apparently the ./ is the full path to the executable.
My same BASH script is working in Fedora/CentOS.
But I am testing one Android eee pad transformer.
Where i have terminal access and i wrote a small test script. But its not working, how can i fix it? what am i doing wrong?
/data/data/berserker.android.apps.sshdroid/home $ cat test.sh
#!/bin/bash
var=`ifconfig -a`;
echo $var;
/data/data/berserker.android.apps.sshdroid/home $ chmod +x test.sh
/data/data/berserker.android.apps.sshdroid/home $ ./test.sh
sh: ./test.sh: not found
/data/data/berserker.android.apps.sshdroid/home $ uname -a
Linux localhost 2.6.36.3-00004-g069b8b5 #1 SMP PREEMPT Wed May 11 22:14:22 CST 2011 armv7l GNU/Linux
/data/data/berserker.android.apps.sshdroid/home $ bash ./test.sh
sh: bash: Permission denied
/data/data/berserker.android.apps.sshdroid/home $ ls -l /bin/bash
ls: /bin/bash: No such file or directory
/data/data/berserker.android.apps.sshdroid/home $ find / -name "bash"
find: /config: Permission denied
lots more.......
find: /proc/595/task/598/fd: Permission denied
......
find: /data: Permission denied
find: /root: Permission denied
Follow up:
This is my script now which works:
#!/bin/sh
echo "hello wassup, run me simply as './test.sh'";
or
#!/bin/bash
echo "hello wassup, run me using 'sh ./test.sh'";
in Android the shell is located in /system/bin/sh not /bin/sh like it is on most Unix-like systems. So even if you change #!/bin/bash to #!/bin/sh it will still not work. you'll have to use #!/system/bin/sh
Android is not a GNU/Linux distribution so you can't expect that all scripts that run on GNU/Linux to also work on Android.
May be it will work when calling interpreter with a script?
$ bash ./test.sh
I saw, that although it is specified #!/bin/bash error was posted by sh - may be it do wrong.
UPD
$ sh ./test.sh
Most Android devices don't have a bash interpreter installed. If you really need to run the script across Linux and Android, you could try using BusyBox but that will require rooting your device (and potentially voiding your warranty). Even then though, I don't know if the ifconfig utility is included in BusyBox.
I would strongly recommend using the Android SDK to write an app to do whatever your trying to accomplish.
As was stated, the Android OS (up to and including 4.0) does not include the BASH interpreter (just shell). While BusyBox is a great tool, I believe it's only a single executable that combines stripped-down-functionality-for-size versions of common UNIX utilities, but doesn't actually include the BASH interpreter.
For an Android compiled version of the BASH interpreter, refer to this Forum thread:
http://forum.xda-developers.com/showthread.php?t=537827
You can install Busybox, which provides you with many utilities such as awk, file, etc... and Terminal Emulator.
Create a shell file with #!/system/bin/sh as the first line (shebang)
Now place the completed script under /system/xbin or /system/bin and run it from the Terminal Emulator
The information is an excerpt from this article : HOW TO RUN SHELL SCRIPTS ON ANDROID DEVICES