Using Repo with Msysgit - android

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error:
/c/Users/Andrew Rabon/bin/repo: line
23: exec: python: not found
I've downloaded repo and put it in ~/bin like it says, and I've installed Python. I wonder what the issue could be.
For reference, I'm using msysgit on Windows Vista, I understand msysgit is limited, but I hope it can at least pull the android source.

I ended up creating a VirtualBox vm with Ubuntu installed. Followed the directions on the source code site and then zipped up the source and copied it over via file share to my windows machine. It's a bulky solution but it's the most straightforward as you don't have to deal with cryptic scripting issues.

I imagine that you could make msysgit and repo work with some tweaking,
In particular, I think there is an advantage in using Cygwin. It seems to have superior handling of case sensistive file names. This might be irrelevant for the main Android code base, but I know for a fact that it is necessary for the Linux kernel.

You cannot build Android on Windows. However, you should be able to use repo to pull the source code. I've done this. I imagine you must be using Cygwin. You'll need Python 2.4 (according to Get Source) and make sure you don't have any other Python installations on Windows or Cygwin that are overriding it. Check your version using the python interactive shell.

Related

Where is atrace.c located?

I am trying to write a script to get frame rate data using systrace.
I know that systrace calls atrace. But I can't find out where atrace.c is located. Is it within the sdk or within the kernel? Either way it does not exist in msm kernel or the latest android sdk.
Google's git repo shows it is here
https://android.googlesource.com/platform/system/extras/+/android-sdk-support_r11/atrace/atrace.c
Yet I haven't cloned that repo.
So I am not sure where systrace is calling atrace from
the adb shell command that I am running is
$>atrace gfx
It's part of the platform code. The latest version is here. Note that it changed from .c to .cpp.

Using libVLC for Android on windows platform

I'm trying to explore libVLC for Android that's why setting up VLC android project on windows 7 but i'm facing problems. When i import the project and setup all helping libraries and try to compile using NDK it gives following error
make.exe: *** No rule to make target `jni/..//modules/codec/omxil/iomx.cpp',
needed by `obj/local/armeabi/objs-debug/iomx gingerbread/__//modules/codec/omxil/iomx.o'. Stop.
While when i try to search the file in my folder i only able to find iomx.h and iomx.cpp is actually missing but i downloaded the project from official repository.
git clone git://git.videolan.org/vlc-ports/android.git
I'm willing to follow a tutorial with proper configurations to setup and compile android application of VLC but i'm not able to find any tutorial and the official one says that it is for Linux and you will require a Linux or Mac OSX to follow this tutorial Tutorial Link. So my first question is
Can we Compile VLC android project Using all mentioned tools like (Android SDK, NDK, ant etc) on a windows platform.
Secondly i'm not able to find a detailed or much easy Documentation except this one VLC Documentation link, Are there any other easy to understand libVLC documentation more specific to android usage
Please help me or guide me in right direction. I want to develop an application for Docked DVD device for android.
I found my answer about this by myself and today watched this question unanswered so thought to answer it so that it can be helpful for others.
For the first part the answer is 'NO' we cannot compile the libVLC code on Windows OS using NDK as due to complex compilation process of libVLC. it Cannot be compiled using NDK tools that's why VLC released a script to compile libVLC which is in main directory when you download code from Git repository named Compile.sh and it can be run only on linux or mac as both based on Unix. i.e for libVLC compilation you need to run compile.sh which requires alot of linux based tools as mentioned in their official tutorial for compilation. you can try all those packages through cygwin on windows but i have not tried that rather i switched to Ubuntu 13.04 so that i can also explore linux environment...:). One thing i like to mention here if your target is just to use the compiled C++ code of libVLC in your project through java then you can do this on windows OS using libVLC.so file but if you need to change the libVLC code and recompile it then you will need to run compile.sh which requires linux or mac.
For the Second one the answer is same that as far as i know the only documentation i found was that i mentioned in my question.

Trying to run simple monkeyrunner python script, 'importerror no module named os'

I have the android emulator/SDK installed on my computer, and I'm trying to run a simple python script, but it fails on the 'import os' line (which should be standard!)
Here's my script:
import os
print os.environ['PATH']
works fine when I run it against the actual python executable as
python test.py
but when I do
monkeyrunner.bat test.py
I get the error listed in the title of this question. I've uninstalled/reinstalled python several times, with no luck. Tried adding a PYTHONPATH ENV varaible, no luck. Set the python install dir to be in the PATH ENV variable. Kind of at my wits end, I think monkeyrunner runs on jython but I don't know if I can manage the jython install that comes with the SDK
The issue is that the latest versions of the Android SDK include jython-2.5.3 which do not have the os and other importable libraries built in. I found an old copy of the SDK and used the old JAR which appears to have that embedded in it those libraries.
The solution of this problem (and the problem itself explained) can be found at http://dtmilano.blogspot.ca/2013/05/monkeyrunner-importerror-no-module.html.
Basically, you have to replace jython-2.5.3.jar by jython-standalone-2.5.3.jar, at least until Android SDK Tools Rev. 22.0.1 is out.
all by itself in the jython interpreter
If you're using the jython packaged with the Android SDK, it doesn't include an 'os' module by default. You'll need to grab one, and put it in there, or use another interpreter.
I resolved this issue with java 1.7.0_21.

Getting the latest source

How do I get the latest Android Open Source Project (AOSP) source on windows?
I do not want to build, interested in seeing core applications/services etc. to learn for use in my own application development.
Is Linux Virtual Machine the only way?
I believe the site you're looking for is http://source.android.com/.
A number of interesting solutions appear here: Where can I find Android source code online?
Oracle VM VirtualBox + Debian 6 and packages - git, curl results in a full-blow error-free repository synchronization.
I doubt there are better ways to get AOSP on Windows.
P.S. Debian can be replaced with any other Linux distribution.

How can I compile Dalvik to run it locally on Linux?

What are the minimal steps necessary (including retrieving the source code) to compile and run just the Dalvik virtual machine on Linux?
Actually , I got Dalvik working on my elementary OS installation.
First download the Android AOSP source tree using https://source.android.com/source/downloading.html. Wait for it to download (2 hours for me cloning only the current commits and Marshmallow branch)
After running build/envsetup.sh while in the source tree run lunch full_x86-eng. Then type make -jN (replace N with number of cores).
WAIT. This took me about 1 hour on an AMD-4500M laptop. Newer ccomputers may be as low as half and hour and older ones might take half a day.
Change directory to !!AOSP-PATH!!/out/host/linux-x86/bin/ and run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/obj/lib/ or
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib
or export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib64
TRY ALL OF THESE
and then
./dalvikvm --32. If you try to run without the --32 option it will crash (don't know why)
Working Marshmallow Dalvik. To get the GUI apps working you will need to do some more porting and coding which is another project which I am working on.
Took me half a day to figure this out.
References
http://milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html
Use sabayon Linux. This is a distro that can natively run Android programs and all Linux ones too.
Actually, that's rather android running on Dalvik and the underlying system is already linux.
I guess running a bare Dalvik VM on a desktop linux box is just a matter of getting the sources and compile it.
The GUI stuff is something else.
You are not the only one with this idea, and that is great in internet society terms.
This is probably what you are looking for: http://www.android-x86.org/.
Those guys ported android over to x86.
It still works as an OS, so I'm not sure if you can run Linux and Android(Linux) together without using VirtualBox.
Dalvik runs on Android. The authors of Dalvik are only worrying about it running on Android, as far as we are aware.
Various groups have indicated they are working on getting Dalvik outside of Android. You are probably best off finding and talking to them.
In other words, there are no official instructions of the type you seek.
Sorry!
Getting apps designed for Android to run on Linux is going to be tricky. However, it is possible to run a Dalvik VM on Linux. In fact, this GitHub project has a pre-compiled binary of Dalvik VM for Linux, ready to use! Check the associated blog post for information about how the binary was compiled and how to use it.
Learn to program Java \ C \ C++ and other frameworks
Modify the Android source (I think app_process or something) so it shows a windows on the Linux desktop (learn X11 / Wayland APIs)
Below is a simpile base for you to start with
www.android-x86.org/getsourcecode
Getting Android-x86 source code
First, follow this page to configure your build environment. Then
mkdir android-x86
cd android-x86
repo init -u git.android-x86.org/manifest -b $branch
repo sync
Where $branch is any branch name described in the previous section. This will point the projects created or modified by android-x86 to our git server. All the other projects still point to AOSP.
We also have a git mirror server on SourceForge.net. To use it, you only need to change the repo init command to
repo init -u git.code.sf.net/p/android-x86/manifest -b $branch

Categories

Resources