[Q] Android emulator - General Questions and Answers

How do I port an Android emulator project to a phone (HTC Sensation 4G) ?

Are you talking about taking the code for an existing emulator for the PC, and porting it to run it on Android devices?
If so, I have recent experience with this (I'm currently porting the N64 emulator "Mupen64Plus" to Android). The process is fairly involved (I've been working on my project for 10 months now), but here is a high-level overview:
1) Install the Android SDK and NDK on your computer
2) Work through the example apps to learn how to use the SDK and NDK
3) Determine what external libraries are needed (SDL, for example)
4) Compile and test all the required external libraries
5) Plug in the c/c++ components via the NDK
6) Convert all x86 assembly into ARM or ARMv7a
7) Build and debug on an actual device (AVD will most likely be too slow)
8) Write a new GUI for touchscreens (original GUI probably won't cut it)
Let me know if that isn't what you meant by your question

Related

[Q] Eclipse ADK Beginner's Issue

I am running Linux (Ubuntu 10.10) on a 64-bit platform, and I have installed Eclipse Helios with ADK 2.3.3 & 3.0. I'm new to Android development, and am trying to run a sample app [~/android-sdk-linux_x86/docs/resources/samples/Wiktionary/...]. However, I am getting the following error messages when I Run it:
Code:
[2011-04-14 14:24:23 - Snake] Still no compatible AVDs with target 'Android 3.0': Aborting launch.
[2011-04-14 14:24:23 - Snake] Performing com.example.android.snake.Snake activity launch
[2011-04-14 14:24:46 - Snake] Launch canceled!
Where can I find an Android Virtual Machine for my Android 2.3.3 (on my 64-bit Linux)?
Hi!
You should rename your thread to "SDK",since "ADK" means a completely different on Android.
First off, can you please all steps you took to install eclipse and the sdk ?
Make sure you follow step-by-step this guide: developer.android.com/sdk/installing.html
Robson

[tut]complete guide on installing linux on android [dual boot]

So , Hello everyone,
It will not remove or harm Android, it will just run Linux on top of android
This tutorial will guide you through installing Linux on mmx a116 with android side by side..
What is this all about?/Why put this on my device?
This projects aim is to bring a range of linux distros to your android device through a method known as 'chroot', see it has running a linux distro within a virtual machine on your phone (Although its not! its using native ARM ports and the Android kernel) . You can access this virtual machine and run it on your phone without causing any damage to your device, or having to overwrite anything. Why might you want this? well my apps are designed to make the install and set up process as easy as possible while still giving you some flexibility. Once you have the distro up and running then you can pretty much run and install any linux software you like (so long as there is a arm port or it is not architecturally dependent).
Wait this uses VNC why shouldn't I just VNC to a computer?
VNC is used to access the GUI as at the moment I have not yet implemented a native way of viewing the GUI. But the Linux distro itself is running within the phone and can be controlled via the terminal app so if your a seasoned Linux user you may never even want to use the GUI
What is Chroot?/How does this work?
"A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children" - http://en.wikipedia.org/wiki/Chroot
This method of running linux distros with android has been around for some time. I have worked on my scripts to make the process more user friendly and give you far more options from the word go.
The scripts start by mounting the linux image file within the android file system and then mounts the sdcard and if you have it internal memory within the linux file system.
Chroot is then used to change the root directory to that of the mounted linux and a bash shell is then opened to allow you to control linux this is kind of like 'booting' the OS.
The likes of VNC and SSH are then set up when linux is 'booted' to allow you to connect to the GUI if you require it.
Note: This requires a lot of free space on sd cards(any)..atleast 2 GB ..
INSTRUCTIONS:
1-Go to play store and download 'Complete Linux Installer' and install it ..
2-if you have a custom or other kernel , you have to check wether it supports loop or not.So better be on Stock Kernel.
3- Now there are 2 ways to install and run distros(eg-linux,backtrack).One is easier but requires an internet connection on the phone.other is a bit difficult but can be done from PC also .
method 1 ( internet on smartphone )
Go to complete Linux Installer and select install guides and select the distro you want it will download and guide you further.(in the unzipping step , i recommend using a PC for it as its too slow on the phone.)
Method 2 ( using a PC )
Download the version and size of your preferable ubuntu from here -
http://sourceforge.net/projects/linuxonandroid/files/Ubuntu/
After that, download androidVNC and terminal emulator from play store
now extract ubuntu.zip and place it in a folder called ubuntu on root of your SD card.Now you are ready to boot too ubuntu. select the launch menu from complete linux installer.
you will be redirected to terminal emulator . press n if you are asked to check boot.img from md5 as it gets stuck there. set screen size to 1280x720 after few seconds you will see a message [email protected] . this means you are succesful.
go to android vnc type in port option 5900 and password and username as ubuntu an color settings as 24 bit..
congratulations! you have booted to Ubuntu!:highfive:
Hmmmm.
That's not dual boot.:sly:
It runs Linux in VM.
Thanks!
-Dracula
And i don't see why anyone would want to do this, it's just killing your phone by overloading it with a Desktop OS in a VM!
Also perhaps providing credit to the person that did all the hard work might be a good idea .......
Oh and its not a VM guys, it uses chroot which means native ARM linux running with the Android kernel, within Android.

Ubuntu/Debian on X86 Tablet

Hello,
I would like to know where I can get some info about installing Ubuntu / Debian 7 on my X86 tablet device.
Tablet uses an Intel Atom Z2560CPU.
If possible I would like any of the following possibilities:
Possibility one:
Run Android along with Debian (something like chroot)
Possibility two:
Erase Android from the device (currently installed) and make a fresh Debian install.
Possibility three:
Dual Boot with Debian and Android.
The hard part is that the tablet device doesn't have any kind of BIOS (at least one accessible to the user)!
I already tried multiple apps (to run Linux distro's) from the Play Store, but nothing seems to work.
Presently I have the machine with Android 4.0.4 rooted.
What do I need? Where can I find some documentation?
Thank you
It can also be some other Linux distro.
Thank you

[Q] Build Android using native compiler

All tutorials on building Android are referring to use M$ with a virtual machine and Ubuntu 64bit linux or use a computer with 64bit Ubuntu and cross toolchain installed.
I have a development board (A20) with Ubuntu 12.04 (32bit) and the arm7hf compiler installed. The manufacturer delivers an Android image along with the source code archive.
My question is:
Is it possible to re-build Android for this kind of device using this environment?
This would avoid big computers with cross compilation instead it's done with the native compiler and tools for the processor it should later run on.
Or is the use of a cross toolchain fixed by Google in the Android SDK, i.e. no possibility to build Android in the native processor environment it is intended to run on?

Extract (dump) all partition images from Huawei e8372h under GNU/Linux

Hi there everyone, how would one go about checking what partitions are present on devices such as Huawei e3372h or e8372h and how to dump them using gnu/linux. I am OK with terminal/shell scripting, I've done some basic Arduino/Raspberry projects, but I want to get more into firmware (binwalk, repackaging, etc). Where would one start? What tools shall I look to familiarize myself with? I very much want to avoid using blobs like pre-compiled windows tools that are difficult to inspect. Is it possible to dump firmware (incl. boot partitions) using standard gnu/linux toolset (like dd) or at least tools that have source code available?
I have been looking for resources both here and on Russian/German fora, unfortunately most of posted solutions are based on Windows *.exe files and knowing a bit about Linux I am 100% sure that whatever these programs are doing is also possible to be done on Linux in a cleaner more transparent and reproducible manner (that is better for educating oneself).
Any hints much appreciated
If device's Android is rooted, if Android is version 6 and higher, then you can dd the partitions in question.
Thank you for your response! Is there an Android running on USB modems/routers such as Huawei e8372h? I am looking to dump all partitions from such device and to be able to restore them before I start any modifications. This way I should be able to restore devices to their original "factory" state if anything goes sideways (except if I hard-brick them).
I have a number of e3372h(-153) and e8372h(-153) devices that I can experiment with (they have different versions of firmware on them and the very-very first thing I want to do is to extract all images (including boot partition if possible) and test if I can restore from these backups). Only then I want to start modding them or checking other people's modifications...
So far I have managed to switch modes of these devices. For example for e8372 I can have it on the host machine (Ubuntu GNU/Linux laptop) visible as
virtual CD-ROM (/dev/sr0)
hi-link device (accessible from 192.168.8.1)
3 x TTY device (one of which can execute AT commands)
emergency boot mode with one TTY device
With the last one i have executed
balong-usbdload -p /dev/ttyUSB0 usblsafe-8372.bin (following https://gist.github.com/ValdikSS/323bcdfceb2f09d9c6ef02db1bc573e2 and https://github.com/forth32/balong-usbdload.git)
expecting to gain telnet acces to device and possibly dump the remaining partitions to the microDS card (using nanddump) but for some reason I still cannot log in using telnet
BTW Using Windows based tools that I have no source code for is pointless for me as my main goal is to learn the structure and functioning of these devices and be able to modify them myself.
If successful I intend to publish these images and tutorialize my notes on how to backup/restore, but for now I need a direction myself
IMO all tools, either compiled for Windows OS or Mac OS or Linux OS, in background simply run Android shell scripts.

Categories

Resources