Hello!
I would like to ask about compiling existing C/C++/asm sourcecode on Android, specifically the code of the libav codec system. After that, I would like to statically link against it, and build the x264 commandline video encoder. I don't need any fancy GUI video encoding stuff, just the statically linked x264 cli tool. The libav is needed to be able to read H.264/AVC input, the x264 to encode somewhat similar H.264/AVC output.
I do have some experience in compiling that code on x86/x86_64 and MIPSEL (chinese Loongson-2f specifically) architectures in Linux with gcc/yasm, but I am a total noob, when it comes to cross-compiling unfortunately, I have only built the code sitting directly on the target system so far.
What I do have here, is a CentOS 6.0 x86_64 multilib Linux, GNU make and autoconf tools, latest Android SDK (probably not needed) and latest Android NDK toolchain (definitely needed) as well as the yasm assembler to build the ARMv7 assembler codepaths of libav and x264. I'm also able to fall back to pure C/C++ in case the asm stuff is impossible. I have found some guys having done the x264 alone using Google search, but info on how exactly they did it is quite scarce.
My primary target platform is Android 2.2 on a TI OMAP3 chipset with an ARM Cortex A8 processor that I believe has a hardware FPU, but no NEON SIMD extensions. I may also want to target slightly different hardware, but all using the ARMv7 instruction set basically.
So, if anyone has experience in cross-compiling libav/x264 or similar stuff like ffmpeg, I would greatly appreciate help in getting that done. At the moment I'm quite at a loss with cross-compiling using the NDK..
I hope I am posting in the correct subforum, it's my first post here. Thanks for any help you might be able to provide!!
Guys, help me please configure genymotion and ida properly.
I want to debug an application using no arm hardware.
So i installed genymotion, emulated htc onex android 4.2.2.
After that i installed arm translator.
Now i am trying to connect my virtual device and ida using ADB:
i push android_server file to the system folder
chmod access rights (755)
and try to start server - ./android_server
As a result i receive error saying that the file can not be executed : magic 7f45
As far as i understand android_server is ELF executable and is waiting for arm processor.
So arm translator doesn't work for ida's android_server?
I have been compiling QEMU 1.7.2 version for android ARM based device.
Currently I have been able to successfully emulate Windows XP using TCG (tiny code generator) present in QEMU for binary translation and hardware emulation as it is not using KVM (hw based acceleration).
I am facing difficulty in booting Windows 8 image in QEMU, and facing the below error.
Your PC needs to restart.
Please hold down the power button.
Error Code : 0x0000005D
Parameters:
0x03060303
0x756E6547
0X49656E69
0X6C65746E
........................................
the above experiment with windows is emulated on x86 based device emulation whereas actual device is an ARM based device.
So inorder to use KVM I need ARM based image of Windows OR combine the TCG binary translation part along with KVM Direct Execution which will utilise hardware acceleration.
Anyone has been able to use TCG and KVM together??
Thoughts on this will be very helpful..Please let me know if anyone has experimented.
Regards
Kushal Parmar
Any progress on this? I would like to run qemu on android.
Hey XDA!
For those of us that use Arch linux, compiling Android projects can be a little more challenging than on Ubuntu due to the fact the Arch is a rolling release distro. To solve this, I made a tool that allows YOU to choose whether you want to run Arch or Ubuntu in the command line without dual booting. This isn't anything new, just a simplified implementation of an existing method.
What it does:
When you open a terminal, you will be prompted with "Would you like to connect to Arch linux or Ubuntu?". You can enter A for Arch or U for Ubuntu. If you choose Arch, you will be put into your stock environment, but your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="cyan"]Arch[/COLOR] ~]:
If you choose Ubuntu, you will be entered into your Ubuntu chroot, and your bash prompt will look like
Code:
[[COLOR="red"]user[/COLOR]@[COLOR="magenta"]Ubuntu[/COLOR] ~]:
DISCLAIMER
Because Arch linux is aimed at enthusiast and experienced linux users, replies about simple or lack-of-experience issues will not be given priority. Use the following with caution.
How to setup an Ubuntu chroot:
1. Install schroot and debootstrap
2. Follow the steps given here https://bbs.archlinux.org/viewtopic.php?id=100039, or run create-chroot.sh in the OSConnect git repo.
How to install OSConnect:
1. Clone https://github.com/frap129/OSConnect
2. Run the given install.sh
3. If you use terminal mostly locally, respond "Local" to the prompt. If you mostly connect via ssh, respond "SSH" to the prompt.
4. If you connect via SSH, connect as root from now on, not your user. OSConnect will switch to your user for you.
Done! Restart to use.
XDA:DevDB Information
OSConnect, Tool/Utility for the Chef Central
Contributors
frap129
Source Code: https://github.com/frap129/OSConnect
Version Information
Status: Stable
Created 2016-05-15
Last Updated 2016-05-15
How it works:
Ubuntu chroot:
This work by downloading the Ubuntu system files to /var/chroot/ubuntu. The schroot tool then executes bash from ubuntu, and tricks the system into believing that /var/chroot/ubuntu is actually the system root directory.
OSConnect:
OSConnect is contained in its own file, .osconnectrc. This file is executed when shell is reached via your .bashrc. The .osconnectrc is a bash script that asks what operating system you would like to use, then either dumps you into normal shell, or starts the Ubuntu chroot. It also modifies the PS1 (bash prompt) to look cleaner and better distinguish between Arch and Ubuntu.
What is the difference between local and ssh?
The only difference between the local and ssh versions is whether or not youre prompted for your password (when chroot is started) because schroot must be run as root. On the local version, you are simply prompted for your password when necessary. On the ssh version, you are expected to connect as root, and therefore will not be prompted for your password.
HALP I CANT LOG IN AS ROOT
If you are having trouble connecting via SSH as root, follow https://askubuntu.com/questions/511833/cant-ssh-in-as-root
Resource wise is this lighter than running ubuntu as a docker image?
HaoZeke said:
Resource wise is this lighter than running ubuntu as a docker image?
Click to expand...
Click to collapse
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
frap129 said:
I'm way to late for this to matter, but yes, its much lighter than running at as a docker image
Click to expand...
Click to collapse
Better late than never! ? neat stuff ?
Now I know I've done this before. But I think I had to make an entire Application.mk file. I am trying to use either the Windows or Linux NDKr19 to build a standalone toolchain that contains ONLY the arm64 executable binaries. (essentially "aarch64-android-android" or "aarch64-android-arm64-v8a")
EDIT: So I'm dumb and figured it out. I've attached the binaries that can run on the device.