Embedding Python in Android – Adding log to the Python Interpreter

21/04/2014

If you have followed the previous post on this tutorial series, you now have a Python interpreter embedded in your Android application. Before we move on to fix the Python standard library, in this post we are going to set up some code to allow “prints” inside Python to be redirected to the Android logcat. The source code is adapted from the bootstrap code for python-for-android.

Read the rest of this entry »

Embedding Python in Android – Python Interpreter

21/04/2014

In the previous post, i have shown how to create an Android application which uses the Java Native Interface to interface with C/C++ code. Specifically, we have created a Java class which exports a native “square(int)” method which returns the square of a number computed in native code. In this post, I will show how to do something similar, but using an embedded Python interpreter to do the calculations. Since we are going to use CPython, the official Python interpreter in C, we must use JNI again to interface with it.

Read the rest of this entry »

Embedding Python in Android – JNI

21/04/2014

In this tutorial I will show how to write an Android application which uses the Java Native Interface to access native code in C/C++. This will be useful later because we will access our Python interpreter from Java through JNI and C/C++. Our application will be able to compute the square of a number in C/C++ and print it on the Android log. I will assume that the readers know the basic structure of an Android application source code layout, have access to an Android device or simulator, and to its log (logcat).

Read the rest of this entry »

Embedding Python in Android (Tutorial series)

21/04/2014

In the last months I have been implementing a Python library for a cross-platform application of mine. I’ve chose Python for many reasons: it is cross-platform, allows for fast development, has very concise code and great standard library, has many extensions, it is quite popular, and allows to interface with C/C++ using projects such as Cython. Cython lets you write extensions in C/C++ or interface with existing C/C++ libraries in a relatively easy way. Read the rest of this entry »

bq Edison – Restore stock partitions

15/12/2012

If you mess around with an Android device, and you don’t use the Windows-based tools, chance are that one day you are going to brake something. And that is when setting your tablet’s partitions back to stock is important, whether you want to go back to the start, or sell your tablet, or return it to manufacturer because of some hardware problem. In this post I will show how to revert your bq Edison’s partitions back to stock, using the Windows-based tools. When I find how to do that in Linux too, I will add to this post.

Read the rest of this entry »

bq Edison ICS – Root (on any operating system)

14/12/2012

bqEdison_image

The bq Edison is an Android tablet built by the Spanish company bq. It is an affordable device with excellent specifications for its price, namely a Rockchip 3066 Dual-core SoC with a Mali 400 Quad-Core GPU, 16 GB internal SD, 1 GB Ram memory, and shipped originally with Ice Cream Sandwich. In this post I will show how the bq Edison can be rooted in a very simple way, in any of the major operating systems.

Read the rest of this entry »

Install Mac OS X (Snow Leopard) in Virtualbox 4.2 (EFI Method)

04/12/2012

Yesterday I’ve published a post on how to install Mac OS X – Snow Leopard - in Virtualbox 4.2 using external boot loaders. Unfortunately that method causes a lot of kernel panics and is not reliable because sometimes it boots successfully, sometimes it does not. In this post I will show another way of installing Snow Leopard in Virtualbox, but using the EFI method. With this method your Mac OS virtual machine will be more reliable, and you will be able to do basic things from the Operating System such as reboots, shutdowns and the simple “About my Mac”. The only downside so far is that it seems you won’t be able to set screen resolutions outside of 640×480, 800×600, 1024×768, 1280×1024 and 1440×900.

efi

Read the rest of this entry »

Installing Mac OS X (Snow Leopard) on VirtualBox 4.2 (with an external bootloader)

03/12/2012

By various reasons, some people need to install Mac OS X on their computerindexs. Some want to play with it, some want to have fun messing around with the installation on their computers (google Hackintosh), and others want to produce software for it without having to pay big bucks for Apple hardware. d to test if I can release my application to Mac users. However, I do like very much to use my Xubuntu 12.04 installation for developing, and I am not willing to install Mac OS X “natively” in my computer, so like many people, I have installed Snow Leopard in a VirtualBox 4.2 virtual machine.

Read the rest of this entry »

CM9 – Changing ZTE Blade Kernel configuration file

21/06/2012

In CM9, device’s kernels source code should be integrated with CM9′s source code. So, if you have the CM9 source code, you probably have a kernel/ folder with the source code.

Imagine you need to check if some device driver is activated on the kernel. Basically, you need to check it in the kernel build configuration file, but where is it? Read the rest of this entry »

Some reminders for CM9

20/05/2012

When uploading patches:

If you get something like:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

make sure your .gitconfig has the correct username, like:

[review "review.cyanogenmod.org]
username = xxxxx

Your review.cyanogenmod.org username may be different of you username@youremail.com, so check your Profile..

Edit: Changed from cyanogenmod.com to cyanogenmod.org (since cyanogenmod is now hosted at a .org domain)


Follow

Get every new post delivered to your Inbox.