[Q] binary in android - Acer Iconia A500

alright finally i made up my mind for making android CLI app
now i want to make an app on linux , i can simply write a small CPP program
but what about android (Especially acer iconia)?
how should i begin
what are the tools required?
Thanks in advance

Not sure what your asking for exactly.
But if you have not developer.android.com. is a place you MUST Visit for all things android..

Android doesn't really work with CLI... You'll probably have to go with a GUI, and most apps are written in Java (other languages are somewhat tricky, as you have to use the JNI or IPC to use most android libs)... as mentioned above, you'll get the required tools on developer.android.com. Other than that: Android's libc is fundamentally broken, with many standard functions being unavailable or misbehaving -- a major cause of headaches.

i am talking in general
for example "Busybox"
its written in C/C++
i just wanna know how to compile my own C code for android

Busybox is a bit different, as it's not a user fronting app. For something like that, just cross compile to arm. I believe theres one in the ndk:
http://developer.android.com/sdk/ndk/index.html
You'll need the ndk for user fronting apps with c code as well, btw.
you can use other cross compilers as well:
https://sourcery.mentor.com/sgpp/lite/arm/portal/release324

aman11dhanpat said:
alright finally i made up my mind for making android CLI app
now i want to make an app on linux , i can simply write a small CPP program
but what about android (Especially acer iconia)?
how should i begin
what are the tools required?
Thanks in advance
Click to expand...
Click to collapse
Hello, and welcome to the exciting world of Android Development! *insert sparkles*
In the Android world, CLI apps aren't the most popular. Making an app with a GUI would be a much easier starting point to some extent.
What you'll need:
1. A computer with the necessary software installed. This can be a Linux, Mac, or even Windows machine. In the case of a Windows machine, be sure you have the correct drivers installed. With the Linux machine, be sure you have the correct udev rules for the Iconia. Install the Android SDK. Install Eclipse, and the Android plugin.
It sounds like you want to run some native code as well. Use the Android NDK. There's a nice little beginner's guide here. Every good programmer starts with their first Hello, World!
2. Preferably some experience with Java. Almost all Android apps run on the Dalvik VM.
3. Patience. A lot of patience. Compiling takes time.
4. A device to test your code on. Running in an emulator is not good enough. Enable developer debugging on your device in the settings.
Hope this helped a bit.

Thanks alot guys
now i guess i'll be able to make some of my own apps

Related

Exe files on Android?

This might be in another thread. I searched pretty extensively for an answer and can't find one. Is there an app or way to install exe files and run them on my Magic 32B? My phone is rooted and running Cyanogen's 4.2.5 I figured my phone does everything else, why shouldn't it be able to run exe files?
Sorry for the bump. I can access the exe file on my memory card with Linda File manager, but I don't know what the open the file with??? Linda File Manager gives me the option to > Open With... Any ideas?
Android cannot open Windows based files.......
WEAK!
One thing I have learned from xda is that if theres a will theres a way! Comon guys there has gotta be a way!
Android is not windows..
In theory you could port qemu or something and run it in that. But that would be so slow a turtle would think of itself as fast if it saw it
Sent from my Gingerbread on Sapphire using XDA Premium App
tvall said:
Android is not windows..
In theory you could port qemu or something and run it in that. But that would be so slow a turtle would think of itself as fast if it saw it
Sent from my Gingerbread on Sapphire using XDA Premium App
Click to expand...
Click to collapse
Agreed. I want to say someone got Wine to install in Android but could never get it to work right.
Sent from my LG-P500 using Tapatalk
The idea is sweet and innocent but is much more complex...
The "exe" files are binaries. The .exe extension is something windows has as a standard for postfix, and is not necessary for running binaries (linux does not use any postfix and therefor also Android).
So what is a binary?
It's a list of machine instructions which the intended cpu understands. Every cpu has it's own instruction set ( a language). You need to make sure that the list of instructions you are running can be understood by the cpu. Inside this list you will find special instructions which is called "system calls". They are not intended for the cpu but for the operation system which you are running on.
So to sum up;
1) to run windows binaries on Android you need to change to instruction set of the binary because the cpu you have is not the same as those running on the Android device. E.g. x86 cpu on computer vs. ARM cpu on mobile devices vs. PIC micro-controllers. So the binary does not speak the same language as the cpu.
2) You need to change the system calls because Windows and Android does not have the same system calls.
So as a final sum up, it's not easy to make those binaries to run on Android, specially those which has a instructions list bigger than 20-30 instructions... They are just to complex and sometimes not even possible!
The WINE project is shot of doing the exact problem. It will run the binaries and translate them on the fly for the operating system. It succeed most times and fail others. But it's a HUGE project and need a normal computer power for it to run. The devices we have right now, does not have the horse power to run such projects.
I hope the info shades some lights on the problem :0)
NB: i know some of the info is not 100% but it's REALLY simplified to give the general idea and complexity of the problem :0)
mumilover said:
The idea is sweet and innocent but is much more complex...
The "exe" files are binaries. The .exe extension is something windows has as a standard for postfix, and is not necessary for running binaries (linux does not use any postfix and therefor also Android).
So what is a binary?
It's a list of machine instructions which the intended cpu understands. Every cpu has it's own instruction set ( a language). You need to make sure that the list of instructions you are running can be understood by the cpu. Inside this list you will find special instructions which is called "system calls". They are not intended for the cpu but for the operation system which you are running on.
So to sum up;
1) to run windows binaries on Android you need to change to instruction set of the binary because the cpu you have is not the same as those running on the Android device. E.g. x86 cpu on computer vs. ARM cpu on mobile devices vs. PIC micro-controllers. So the binary does not speak the same language as the cpu.
2) You need to change the system calls because Windows and Android does not have the same system calls.
So as a final sum up, it's not easy to make those binaries to run on Android, specially those which has a instructions list bigger than 20-30 instructions... They are just to complex and sometimes not even possible!
The WINE project is shot of doing the exact problem. It will run the binaries and translate them on the fly for the operating system. It succeed most times and fail others. But it's a HUGE project and need a normal computer power for it to run. The devices we have right now, does not have the horse power to run such projects.
I hope the info shades some lights on the problem :0)
NB: i know some of the info is not 100% but it's REALLY simplified to give the general idea and complexity of the problem :0)
Click to expand...
Click to collapse
Just in addition, most programs aren't just based on the .exe file. DLLs and other files are needed for the program to run, attempting to port all this stuff to Android would most probably result in failing.
K3n H1mur4 said:
Just in addition, most programs aren't just based on the .exe file. DLLs and other files are needed for the program to run, attempting to port all this stuff to Android would most probably result in failing.
Click to expand...
Click to collapse
I just hope Android is so popular that, like turning Windows into Linux using Wine (excuse the metaphor or whatever that was), someone might persist with this no doubt huge endeavour. I'm sure I'm not alone in wanting to never run a Windows app in Windows ever again, nor kowtow to Apple's interface demands even though I'd like something as responsive, integrated and occasionally useful as an iSomething.
Android was my future salvation till my employer handed over a handy Win App recently that I can't really avoid using - well I could, but I'd have to work that much harder - fat chance! So I'm stuck with a Samsung XP netbook and WM6.5 on my HTC Touch HD until someone somewhere, or lots of someones everywhere, do a Wine for Android
Seriously, you want to pretend in some reality somewhere that someone will first create an x86 emulator for an arm chip that barely likes to play xvid files then on top of that use wine to run a mobile windows app rather than just use something similar or pay someone to write you something similar that runs natively on android?
Which do you think is the non-insane option?
you cant run it on android persay but you can download dosbox and run it that way sorry for the bump
work for now
For now install your exe app on a windows PC if you have one. And run something like team viewer. Won't look the best but you'll get basic function out of it.
Thanks for the suggestions (cellsafemode excepted! )
I ended up buying a couple of iPads and have installed VMWare View, ICAB HD and Slashtop/CamCam giving remote access to my Windows PC at home. Gets the job done - bit slower, but the small Windows-only app I need to run infrequently isn't a huge load on the hardware or the network. Saves carting a netbook around for just one small but important task, and I guess it's accomplishing much the same as the Android suggestions above. When my iPad enthusiasm wears off, I'll have an Android option
Found a Way
Ok, I got a way! You need root, and itll be very slow on a phone but faster on a tablet!!
http s : / / play . google. com / store / a pps / de tail s? id = com . galoula.LinuxInstall&feature=search_result#?t=W251bGwsMSwyL DEsImNvbS5nYWx vdWxhLkxpbnV4S W5zdG FsbCJd
1)Download Above Link remove spaces
2)On your new Ubuntu or whatever you chose get wine from winehq
3)Get your exe and presto!!
--DISCLAIMER--
I havent tried it so if it breaks your phone/tablet its not my fault... USE AT OWN RISK
nikhiljha said:
Ok, I got a way! You need root, and itll be very slow on a phone but faster on a tablet!!
http s : / / play . google. com / store / a pps / de tail s? id = com . galoula.LinuxInstall&feature=search_result#?t=W251bGwsMSwyL DEsImNvbS5nYWx vdWxhLkxpbnV4S W5zdG FsbCJd
1)Download Above Link remove spaces
2)On your new Ubuntu or whatever you chose get wine from winehq
3)Get your exe and presto!!
--DISCLAIMER--
I havent tried it so if it breaks your phone/tablet its not my fault... USE AT OWN RISK
Click to expand...
Click to collapse
Good luck finding wine compiled for arm and some windows programs built for the (currently nonexistent) arm version of windows
2Noob4U said:
This might be in another thread. I searched pretty extensively for an answer and can't find one. Is there an app or way to install exe files and run them on my Magic 32B? My phone is rooted and running Cyanogen's 4.2.5 I figured my phone does everything else, why shouldn't it be able to run exe files?
Click to expand...
Click to collapse
if your mobile does everything else then can you do multitasking just like people do in Nokia N9??
yes its possible ..
ohhh yaaa its possible to install .exe file on any android device ..
just follow these simple steps and you are done :
Step 1
Install a DOSBox app on your Android device. AnDOSBox, aDosBox and DosBox Turbo are three different DOSBox apps available from the Google Play store.
Step 2
Open the DOSBox app.
Step 3
Type "cd \foldername" into the command line, where "foldername" denotes the folder in which your EXE is contained. For example, if your EXE is in the Download folder, type "cd \download."
Step 4
Click Enter on your Android keyboard.
Step 5
Enter the name of the EXE file. You do not need to enter the .exe extension.
Step 6
Tap "Enter" on your Android keyboard.
Tip
The command-line interface is not case-sensitive.
mydevilace said:
ohhh yaaa its possible to install .exe file on any android device ..
just follow these simple steps and you are done
Click to expand...
Click to collapse
Excellent! Never say 'Never'!
I also see it's possible to run iOS apps on Android as well.
Wing Nut said:
Excellent! Never say 'Never'!
I also see it's possible to run iOS apps on Android as well.
Click to expand...
Click to collapse
yeaaahhhhh
Sent from my Micromax A110 using XDA Free mobile app
So this confirms exe files r able to run on Android its just slow . Only thing left to do is find a way to lighten it up some by reduced graphics n bmp files ?

Other OS's/UI's on Dream? (Maemo, Openmoko, Native debian, X11 support, etc)

I didn't think it belonged in Dream Android Development, so I'm putting it here. If it needs to be moved, move it.
Is it possible to boot anything other than Android on the Dream?
I've seen the Nokia N900 and its Maemo 5 firmware, and I'm absolutely drawn to it, thanks to its debian-based OS (sudo apt-get install anything), it's X-based graphics system (REAL linux GUI programs), and all the apps it already has (Native Gizmo > Hacky Sipdroid).
I've also taken a look at other Linux-based open phone firmwares.
What is keeping us from doing this? If it's drivers, do they exist for another similar Linux-based firmware?
Could we dual-boot Android and this other OS using a third-stage bootloader which loads as a kernel from within the BOOT: partition?
I've seen the (albeit extremely hackish) method of getting Debian on the G1, chrooting into a loop-mounted FS and using a loopback VNC to spring into a KDE/Gnome/LXDE UI, but it's slow, still has Android and its apps loaded into memory, and very hackish and unstable.
I'm more than willing to test anything firmware-wise on my phone as long as it doesn't mess with my SPL.
The possibilities are nearly limitless - WINE under Linux means true "Windows Mobile" without the WinCE kernel.
Or perhaps WinMo/WinCE can be booted on the Dream?
It's more of a question of whether or not it's possible right now than a concept or implementation, but once that's answered, I'll either throw some time into testing and porting, or kick back and enjoy the Android as it is.
For starters:
- How does the SPL hand off to the BOOT: partition and its kernel/initrd?
- What devices need what drivers? What should be thrown into the kernel?
- Do things need reverse-engineering or is it all straightforward and documented?
- How can we use the space provided without messing with the SPL? (use cache partition for OS? Modified recovery that doesn't depend on cache partition?)
- Is dual-booting between Android possible? Can this be switched and launched before Dalvik and the Android stuff loads on the Android kernel?
- Can this be done with other Android-powered, rooted devices?
Have you seen wiki.openmoko.org/wiki/OpenMoko_on_HTC-Dream or lists.openmoko.org/pipermail/community/2009-August/052529.html? (Crap, I can't post links) Looks promising since Angstrom is a very powerful embedded distro, but it's a one-man project now. I hope some people will join it or start a similar project.
G1 is a great device, however, I can see only a few people hacking on OS alternatives for it. You always got to have either an active community or a company in order to complete such a project.
The Android hackers community is very vibrant, however, people are not really interested in bringing a fully-featured Linux distro to G1 or other Android phones. Android is too trendy itself
The Debian/Ubuntu opportunity that we have now is nice, but it looks like an addition to the Android which takes a lot of memory and CPU.
I have just set up a small Ubuntu environment booting on my G1 together with Android. I combined the userspace prepared by Paolo Sammicheli (xdatap1.wordpress.com/2009/05/03/jaunty-under-android/) with Bayle Shanks's instructions (bayleshanks.com/wiki.pl?tips-computer-android-g1_debian_cyanogenMod). I am going to use it for mutt, vim, some coding. X11/VNC experience has been frustrating so far.
I am pretty sure though that there will be more people wanting to use alternative OSes on their phones: Moto Droid and Nexus are powerful enough for a full desktop environment.
vaskas said:
Have you seen wiki.openmoko.org/wiki/OpenMoko_on_HTC-Dream or lists.openmoko.org/pipermail/community/2009-August/052529.html? (Crap, I can't post links) Looks promising since Angstrom is a very powerful embedded distro, but it's a one-man project now. I hope some people will join it or start a similar project.
G1 is a great device, however, I can see only a few people hacking on OS alternatives for it. You always got to have either an active community or a company in order to complete such a project.
The Android hackers community is very vibrant, however, people are not really interested in bringing a fully-featured Linux distro to G1 or other Android phones. Android is too trendy itself
The Debian/Ubuntu opportunity that we have now is nice, but it looks like an addition to the Android which takes a lot of memory and CPU.
I have just set up a small Ubuntu environment booting on my G1 together with Android. I combined the userspace prepared by Paolo Sammicheli (xdatap1.wordpress.com/2009/05/03/jaunty-under-android/) with Bayle Shanks's instructions (bayleshanks.com/wiki.pl?tips-computer-android-g1_debian_cyanogenMod). I am going to use it for mutt, vim, some coding. X11/VNC experience has been frustrating so far.
I am pretty sure though that there will be more people wanting to use alternative OSes on their phones: Moto Droid and Nexus are powerful enough for a full desktop environment.
Click to expand...
Click to collapse
i really think it lies in what you want from your phone... i know you say you use your ubuntu env for things such as vim and mutt, but everything that vim and mutt can do, can already be done under android..
the biggest challenge is getting people to latch on to an alternate distro which offers MORE than android, which has yet to come to surface... ultimately this is a phone.. not a netbook...and for a phone android is pretty dam sweet...
although in terms of geek work, running ANY other os on non native hardware is cool....albeit not really worth it
anybody were successful by using the internal-memory-image from the openmoko wiki?
I always get kernel panic, when booting it. I flashed it with flash_image boot/system, does this matter? In the wiki they use fastboot.
scheich, I only tried the SD-card way (see my post in http://forum.xda-developers.com/showthread.php?t=624392)
It shouldn't really matter whether you use fastboot or flash the image. The kernel panic could occur due to the inability to find the root filesystem. Try reflashing the yaffs2.
By the way, why did you choose to put OpenMoko in the internal memory? Are you going to use it exclusively or as the primary OS on the device?
Some of what you suggest can be done, but not recommended.
1) Nokia/Maemo is a bad fit for a phone. It is a real HOG. It is also shoehorning (with a sledge hammer) a desktop OS into a phone. It just doesn't work right. Android exists because a totally new UI model was needed to work optimally with a phone's physical form.
2) WINE will NEVER work since the CPU in the phone is ARM and not x86. If you want to run windonkey programs (can't imagine why you would), you would have to run a PROCESSOR EMULATOR, and this will be REALLY REALLY REALLY slow and memory intense.
TylTru said:
I didn't think it belonged in Dream Android Development, so I'm putting it here. If it needs to be moved, move it.
Is it possible to boot anything other than Android on the Dream?
I've seen the Nokia N900 and its Maemo 5 firmware, and I'm absolutely drawn to it, thanks to its debian-based OS (sudo apt-get install anything), it's X-based graphics system (REAL linux GUI programs), and all the apps it already has (Native Gizmo > Hacky Sipdroid).
I've also taken a look at other Linux-based open phone firmwares.
What is keeping us from doing this? If it's drivers, do they exist for another similar Linux-based firmware?
Could we dual-boot Android and this other OS using a third-stage bootloader which loads as a kernel from within the BOOT: partition?
I've seen the (albeit extremely hackish) method of getting Debian on the G1, chrooting into a loop-mounted FS and using a loopback VNC to spring into a KDE/Gnome/LXDE UI, but it's slow, still has Android and its apps loaded into memory, and very hackish and unstable.
I'm more than willing to test anything firmware-wise on my phone as long as it doesn't mess with my SPL.
The possibilities are nearly limitless - WINE under Linux means true "Windows Mobile" without the WinCE kernel.
Or perhaps WinMo/WinCE can be booted on the Dream?
It's more of a question of whether or not it's possible right now than a concept or implementation, but once that's answered, I'll either throw some time into testing and porting, or kick back and enjoy the Android as it is.
For starters:
- How does the SPL hand off to the BOOT: partition and its kernel/initrd?
- What devices need what drivers? What should be thrown into the kernel?
- Do things need reverse-engineering or is it all straightforward and documented?
- How can we use the space provided without messing with the SPL? (use cache partition for OS? Modified recovery that doesn't depend on cache partition?)
- Is dual-booting between Android possible? Can this be switched and launched before Dalvik and the Android stuff loads on the Android kernel?
- Can this be done with other Android-powered, rooted devices?
Click to expand...
Click to collapse
vaskas said:
scheich, I only tried the SD-card way (see my post in http://forum.xda-developers.com/showthread.php?t=624392)
It shouldn't really matter whether you use fastboot or flash the image. The kernel panic could occur due to the inability to find the root filesystem. Try reflashing the yaffs2.
Click to expand...
Click to collapse
Tried reflashing the system image. Also the older image on the ftpserver. The same. I will try the sdcard installation.
vaskas said:
By the way, why did you choose to put OpenMoko in the internal memory? Are you going to use it exclusively or as the primary OS on the device?
Click to expand...
Click to collapse
Two reasons:
1. Thought that would be the faster way to get it work. I used BART to backup my android installation.
2. Thougt, I would get a bit more perfomance in using the internal memory.
I really would like to use SHR(or other) as primary OS, because I had an GTA02, depends on what is(could) work(ing) on the dream.
would it be possible to boot ubuntu netbook remix? it uses far less resources.
zenstitution said:
would it be possible to boot ubuntu netbook remix? it uses far less resources.
Click to expand...
Click to collapse
NBR is targeted at x86, but Ubuntu MID edition is installable. It's similar to the netbook remix. We'll have to wait before we have a proven/stable installation method though.
I would really like to see another OS on my Dream as well - just in addition to android
Che123 said:
I would really like to see another OS on my Dream as well - just in addition to android
Click to expand...
Click to collapse
Well, you can try the OpenMoko port (it's in the alpha stage now): http://forum.xda-developers.com/showthread.php?p=5521417
The more people get interested in the alternative OS, the sooner we'll get one.
vaskas said:
Well, you can try the OpenMoko port (it's in the alpha stage now): http://forum.xda-developers.com/showthread.php?p=5521417
The more people get interested in the alternative OS, the sooner we'll get one.
Click to expand...
Click to collapse
Really hot stuff - but i don't want to loose my recovery
But i will definetly keep an eye on it!
edit: Adding a bootmngr like grub for selecting boot OS (android/openmoko/recovery) would be really nice Or adding bootoptions to the current amon_ra Recovery would be a soloution too. But I'm no dev, so I don't even know if it is possible.

Wanted: Compile for Android ON THE DEVICE!

Way back when, I could run a c# compiler on my Windows Mobile phone and create apps. I think it would be fun to do on-device "compilation" on my Desire Z too.
I'm not asking for an IDE -- just something that can take Java source code and XML files, compile to bytecode for Dalvik and produce an .apk -- all on the device itself.
Is this possible?
OK -- we'd have to both a javac (java compiler) and a dx tool running on the device to do this. The first compiles the java source, the second takes that file and converts it to Dalvik bytecode.
Anyone else interested in this?
I'm very interested too. I tried sl4a but it's limited for now.
Sent from my Desire HD using XDA App
Dexify java compiler
I'm also very interested!
I develop in Java for the Eve VM on Windows Mobile: [www t-arn com/software.htm]
but for this I needed to install a JavaVM on the device.
But it should be possible to dexify the java compiler. I found following post:
[www ist-music eu/developer-zone/documentation/phoneme-and-osgi/music-on-android]
The porting of OSGi requires the dexification of the OSGi bundles. This is a process which makes any JAR file (compliant with Java VM) compatible with Dalvik VM. It basically consists on adding a new file, classes.dex, into the JAR file. To dexify each OSGi bundle, a two-step process is required by using the Android SDK tools. In windows, the process would be:
* Create the classes.dex file associated to the JAR file:
[ANDROID_SDK]\platforms\android-1.5\tools\dx.bat --dex --output=%CD%\classes.dex my_bundle.jar
* Incorporate the classes.dex file into the JAR file:
[ANDROID_SDK]\platforms\android-1.5\tools\aapt.exe add my_bundle.jar classes.dex
Now, the dexified bundles work on both VMs: Java VM and Dalvik VM.
Click to expand...
Click to collapse
I guess, we could do that for javac. If this does not work, we could try another Java compiler:
- EJC: [thecoderlounge blogspot com/2010/05/ecj-eclipse-java-compiler.html]
- kopisusu: [klomp org/KopiSusu/download.html]
I have no idea how to dexify the dx tool, though :-((
Hope to hear more from you guys
Tom
I have not yet gotten the Android SDK (nor a device...) but it seems that the dx tool itself is written in java. There is a dx.jar in the SKD. This one might already be dexified...or we could dexify with itself.
Tom
On-device development & compiler on a server...
Hi guys, I'm new to this Forum - just got my Archos 101 and now I'm searching for some more fun with it ;-)
So I really liked you guy's idea of having a compiler on the device itself - especially since the java compiler's really fast, so no doubt it can run on a smartphone...
I was really tempted by the open source "Open Blocks" library (education.mit.edu/openblocks) from some of these "Lifelong Kindergarden" people at the MIT... they're having this neat programming environment for teaching children programming, where you can drag/drop your source code like Lego...
Here you can have a look how the programming looks:
education.mit.edu/webdav/How%20to%20Create%20a%20Procedure/How_to_Create_a_Procedure.html
Now even google is using a similar thing, probably the same sources for their "App Inventor" (appinventor.googlelabs.com/about/), but you can only develop online at a real pc, then the .apk file is packaged on the server and downloaded to your android device...
So that's practically another way of having stuff compiled "on your device" - you could do the the development on a device and then have a server dedicated for a fast compiler and dx run...
Basically, I'd say that's the perfect system to write quick programs on a touchscreen device, especially when it's a bit larger tablet...
So if anyone wants to join in, I think I'm really keen on trying to port this OpenBlocks thing to the android screen ;-)
Cheers,
wowbag
Java IDE on Android
Hello everybody
I have just finished the latest version of taJavaIDE (0.3.0)
This APK is meant to become an Android development tool with which you can create native Android apps (APKs) ON the Android device itself.
What is working so far (on my Desire HD):
- Eclipse compiler for Java is integrated and working
- dx tool is integrated (not yet tested properly)
- BeanShell Interpreter is integrated and working.
You can write your own BeanShell script, store it on your SDCard and automate
the build process with it.
What is NOT yet working:
- aapt
- apkbuilder
- jarsigner
- zipalign
apkbuilder and jarsigner should not be a problem. I think, I can integrate those in the same way I integrated ecj.
As far as I know, zipalign is not absolutely needed (I might be wrong here, though).
My biggest problem is aapt which is not a Java application but a C++ application. To make it run on Android, you would need to port it to Java (looks like a REAL challenge!) or use the NDK to create a native library that you could then access from the APK.
I have no experience with the NDK and I also don't have the necessary build environment, so I would really appreciate if someone would help me out here!
Anybody interested in contributing?
Tom
Wow, thanks for getting this started, t-arn!
It's been forever since I did any C++, but I'll take a look at aapt and see what I can figure out.
Hopefully, a true C++ programmer will come along and set us straight
I'm very interested in this project and I would be willing to try to help out if you need it. I'm a second year software engineering student and I'm currently on a work term where all of my work is with android. I may not be of much help but at least I think I have some idea what I'm doing so let me know.
you are correct in saying that zipalign is not necessary. we only need it if we want to sign the apk in release mode(for publishing it to the market). We could just use debug mode and everything would be fine. I'm sure that if someone wanted to release an apk to the market, they could just copy the files over to their pc and zipalign it there. We would still be able to use the apk on the device without using zipalign.
t-arn said:
- jarsigner
Click to expand...
Click to collapse
Serison has an application on the market to sign APK's. Just thought I would let you know it is possible.
I would like this as well, as my phone has a physical keyboard and typing code isn't that bad on it - atleast not for minor edits/tweaks
JavaIDEdroid open source project
Hello everybody
I have created an open source project for JavaIDEdroid:
http://code.google.com/p/java-ide-droid/
Everybody is welcome to join the project (and hopefully contribute to it!)
As soon as I have cleaned up the code a little bit, I'll upload the source and the current APK.
For further questions and discussions, please join the java-ide-droid group. You'll find the link on the project's home page.
See you there!
Tom
Sounds pretty promising,looking forward to give it a try!
Sent from my Dell Streak using XDA App
Sounds possible, if you have the right components. I would love this. Would definitely donate to whoever got it working easily and 100%.
Very interesting project
Look nice. Downloading now.
I have wanted this since I first got an android phone.
I ended up using a virtual debain command line running OpenJava to compile and run the stuff. But if i can do it without that hastle in one app, I will LOVE you.
Edit: I tried it out. Mind explaining how to make a beanShell script? on the ECJ it always gives me a security exception even with just -help.
Code:
java.lang.SecurityException
at java.lang.System.setSecurityManager(System.java:610)
at com.t_arn.JavaIDEdroid,.DE.fnCompile(IDE.java:44)
at com.t_arn.JavaIDEdroid.MainActivity.fnCompile(MainActivty.java:167)
at com.t_arn.JavaIDEdroid.MainActivity.tabCompile_btnCompile(MainActivity.java:137)
......
Done in 1305348377 sec.
Please join the JavaIDEdroid support group at http://groups.google.com/group/java-ide-droid and re-post your question there.
I'd like to keep discussions there.
Thanks
Tom
very interesting, ill join the group, i can make the native lib for the aapt.
I would say get gcc working on the device then you can compile anything. You can compile a javavm. A native binary. Etc. If gcc can be compiled and work then all programs most likely can be compiled on the device assuming the proper libs are there to compile against.
Sent from my Incredible using Tapatalk

SDK, NDK, C++, Java

Hi
i opened a thread a while ago, but i can't find it anymore. So here my new questions i got.
Sorry for these noob questions but i need a start
So:
What is exactly the difference between a SDK and a NDK.
And why became it possible to programm in c++ for android when the NDK came out?
Is there a difference between the possibilities regarding Android, depending on programming in c++ or java?
thx for your help
eaglesuper said:
What is exactly the difference between a SDK and a NDK.
Click to expand...
Click to collapse
SDK is the main development kit for Android apps - it contains tools for Java and resources (png, xml) compiling, packaging to apk file, installing, running and debugging them on a device, an emulator, documentation, etc., etc. NDK is a set of tools to compile C code to shared lib, which you could use in your app - and that's all.
You could create an app using SDK only - most of apps does that. However you can't do it using NDK only, because you can't run or publish .so library just like that - you have to use SDK to integrate your library with the rest of an app.
eaglesuper said:
And why became it possible to programm in c++ for android when the NDK came out?
Click to expand...
Click to collapse
I don't understand your question.
eaglesuper said:
Is there a difference between the possibilities regarding Android, depending on programming in c++ or java?
Click to expand...
Click to collapse
Java is the main language for Android development, so it has access to all APIs, also OS requires you to use Java in some places, e.g. when using Android UI. But NDK gets more and more APIs, so it's now possible to develop nearly whole app in C.
Hi,
thanks for your reply! You helped me a lot!
If i combine the beginning of your posting and the last few setences, is that conclusion correct:
I can develop nowadays nearly the whole app on c++ for example. With NDK and C++ i can only make libraries. Then i have to "arrange" them and test them and therefore i need Java?
And how different is Java and c++? Cause i always wanted to learn c++.
But in nowadays world i have the feeling that it's so old (no online stuff like java and php).
So does it still make sense to learn c++?
A word on my SDK... It keeps intentionally writing the wrong code on the status window for the emulator device...
"invalid command-line parameter: Files\android-sdk-windows\tools/emulator-arm.exe.
Hint: use '@foo' to launch a virtual device named 'foo'.
please use -help for more information"
Isn't it supposed to be: Files\android-sdk-windows\tools\emulator-arm.exe? Instead, its "/" is in the wrong direction. WTF?
Is this something with SDK? Or something else all together. I have a few .apk's to test (built in Eclipse) and I am unable to open the emulator to test. I would really like to have some input. Thanks in advance.
http://code.google.com/p/android/issues/detail?id=18317
Here:
steps to solve the problem:
1. click 'Window' in Eclipse
2. clcik 'Preferences' and 'Android'
3. set 'SDK Location' to 'C:\PROGRA~1\Android\android-sdk'
4. click 'Apply' and 'OK'
That's it.
Click to expand...
Click to collapse
eaglesuper said:
Hi
Is there a difference between the possibilities regarding Android, depending on programming in c++ or java?
Click to expand...
Click to collapse
well java is a VM based based programming lang. c++ is a native language. the difference is that java gets compiled to VM byte code. These byte codes are the same for every android phone out there. the VM takes the byte codes and executes them (there is more, just a quick overview). since every phone has an implementation of the Dalvik VM (the one used for Android) then every application written in java can be run essentially the same on all devices.
c++ is compiled for specific hardware in mind. it gets compiled to cpu instructions. if you compile a c++ binary for a x86 machine its not going to run on an ARM based platform. since there are soo many different ARM based platforms, TI OMAP, snapdragon, tegra 2, etc, each with a slightly different implementation of the ARM standard there is an amount of incompatibility in compiled binaries.

Backtrack ubuntu linux on mb860 olympus atrix 4g

This is NOT native ubuntu, THATS why i wanted it. You can use CYANOGENMOD roms and this will just load like a normal app, or a normal terminal. Or in my case provide me with a capable server in my pocket. Thjs js so cool imo. Because i can run all the old perl scripts directly on my phone... People can use my little perl scripts right from my pocket! I like this!
I use android 2.3 but after i got it on 2.3 i factory reset, installed multiple other roms, including ICS roms and it all worked. But alot of cool features backtrack has to offer seem to require lots of reconfiguration on 4+. i recommend android 2.3 nutrino rom i got it all working godly on there. Without editing the boot.img once... Or rly anything..
This runs as an app and the app "changes" the "root" directory. So basically its a little hack, its not native ubuntu.
I heard people telling me my phone cant run arch linux or ubuntu and i beg to differ.
Here is the only link i used to get a full blown capable (whatever) in my pocket.
http://stuffresearch.tor.hu/?p=245
After your done. Download a vnc client app to use the graphical interface (startx X.org desktop)
After your done with that download a ssh server app (that way your ubuntu chroot will be able to navigate android filesystem)
The vnc server and ssh server do not need to route trafic to your lan nor internet.
leathan said:
Sorry for the repost, idk how to move threads. I heard people telling me my phone cant run arch linux or ubuntu and i beg to differ.
I can write a full guide and post my scripts to help but this link may be enough.
http://stuffresearch.tor.hu/?p=245
After your done. Download a vnc client app to use the graphical interface (startx X.org desktop)
After your done with that download a ssh server app (that way your ubuntu chroot will be able to navigate android filesystem)
The vnc server and ssh server do not need to route trafic to your lan nor internet.
After you got it on your phone i recommend... Unlocking ALL the arm repositories and deleteing the bloat packages cause you wont have alot of room.
I get 2gb of room for ubuntu apps after removing bloat.
Click to expand...
Click to collapse
perhaps this is what ppl were talking about when they said that to you? http://forum.xda-developers.com/showthread.php?t=2078919 not really sure, i'm more of a stock rom/cm rom kind of guy myself. Ubuntu is still too new for me on a computer for me to consider it for a rom on a phone
Thank you for link.
But I don't see what I can do with Linux on my phone.
What is your motivation to run it? What useful thinks you can do with it?
Girafik said:
Thank you for link.
But I don't see what I can do with Linux on my phone.
What is your motivation to run it? What useful thinks you can do with it?
Click to expand...
Click to collapse
idk, that's why I stick to the CMs, stock ROMs, and other custom mod's along those lines.
I hope you guys read this.....
You can do almost anything you can on normal ubuntu... And it does not load unless you load it.
Honestly if you dont need ubuntu or a useful linux dont get it. But with this u can run linux binaries that are generally common.... And not just the tiny subset that busybox brings. But a giant giIant giant giant giant awesomeness
For example i love loading firefox and runnng the same addons that i run on my pc on cellphone.
I also love being anle to send my phone shell commands directly AND HAVE BINARIES that make that useful. (I can write perl scripts to automate it all now, powerfully)
For example you can run wireshark to sniff data.... You can really do anything ubuntu can do.
Usually downloading linux distros onto your phone *for chroot is very easy. But since backtrack is so big i needed an extra step which i couldnt find untill i read this link. I was very great-full to that guy. I hope he can help someone else thru me. Because i needed backtrack on my phone yes or yes.
I can now fully program using emacs directly on my phone (i connect a computer keyboard to my phone) but for me its always been a dream to have a real computer in my pocket that i can use to program and run real internet browsers and diagnose networks. Believe it or not i stay legal, very ironically
I know how nerdy that sounds, but theres a hacker in all of us, and this makes your phone a weapon.
Tbh most people wont even want this. But those who do will be so happy to know that they cAn hack the image to under 4gb and hence can run it on their phone. It just all works right out the box.
Just look at what ubuntu can do and if u rly rly want that and it works on the phone install this.
I think im going to do my own directions and make it two steps.
That way people will just click click and see for themselves what new things they can do.
THIS DOES NOT DELETE YOUR CM ROM. YOU CAN RUN THIS SIDE BY SIDE TO YOUR ROM, AND EVEN HAVEA. DUAL BOOT SETUP + THIS.
Its fully compatible to work side by side because ita a chroot not a real install
palmbeach05 said:
idk, that's why I stick to the CMs, stock ROMs, and other custom mod's along those lines.
Click to expand...
Click to collapse
You can use this and stick to your cm rom.
Girafik said:
Thank you for link.
But I don't see what I can do with Linux on my phone.
What is your motivation to run it? What useful thinks you can do with it?
Click to expand...
Click to collapse
You have linux already on your phone. Android runs on linux. Thats why chroot is so easy i think
This is about backtrack ubuntu. Linux comes when you buy the phone.
I tried typing "what useful things can ubuntu do" into google
But that wasn't helpful lol...
palmbeach05 said:
perhaps this is what ppl were talking about when they said that to you? http://forum.xda-developers.com/showthread.php?t=2078919 not really sure, i'm more of a stock rom/cm rom kind of guy myself. Ubuntu is still too new for me on a computer for me to consider it for a rom on a phone
Click to expand...
Click to collapse
This isnt a rom though. Im not knowledgeable in this area but i think since your running chrooted the android system still occupies the read only memory. I might sound dumb but i this is not in any way a rom. It fully sits in your REAL INTERNAL "sdcard" memory. Unless you load it ^.^ it auto closes when u close the terminal.. Atleast it shud
I believe that would be the case if you were to run ubuntu natively... Aka delete android.
leathan said:
I tried typing "what useful things can ubuntu do" into google
But that wasn't helpful lol...
Click to expand...
Click to collapse
If you had to Google something like that you probably have no clue what BackTrack means or what it is meant for and should avoid following this guide anyway.
Enviado desde mi MB855
Sorry for insulting you. But I have was programming nearly a decade before ubuntu even existed. It is a mere derivative, and backtrack is just a set of tools.
Google is powerful, you can hack with google. Googling what ubuntu is good for is perfectly ok imo, nothing to do with much.
Im NOT in IT... BUT I code 29 hrs a day average, atleast i try.
Si pensas que ubuntu esta correlacionado con la habilidad de programar estas en la ironia.
I dont see how any human would not like just having backtrack ubuntu on their phone ^.^
Even if i did not know already know all the tools.... You can just read... Or something ^.^
That guide was like 1 step from what i had done off the top of my head also... -.-
Not mean at all. But usually a programmer or someone in the IT industry knows what backtrack's purposes are. I am afraid I was just expressing an opinion in an open forum and didn't mean to come out as insulting or hurtful. Instead, I was trying to avoid you causing damage to your phone by venturing into the unknown. Calling someone dumb on the other hand IS insulting.
Enviado desde mi MB855
leathan
hi
i have a question
i ve done all steps until 1st run of boot bt script by adb
my sh bootbt perfoming with many errors
it tells about lack of root access and "cant find directory .."
what kind of linux distributive do u use for adb, i think it may be related with my usb live linux version (dont want to install it)
USSRxAZ said:
leathan
hi
i have a question
i ve done all steps until 1st run of boot bt script by adb
my sh bootbt perfoming with many errors
it tells about lack of root access and "cant find directory .."
what kind of linux distributive do u use for adb, i think it may be related with my usb live linux version (dont want to install it)
Click to expand...
Click to collapse
can you send me the full output you got when you ran bootbt? Maybe also the android VERSION and the bootbt source but first read bellow.
When you finish all the editing and you upload the /BT5 folder to your cellphone. are you sure your putting everything in the INTERNAL SDCARD. And also try moving all installed apps out of INTERNAL SD and into INTERNAL MEMORY. (I think i read somewhere somekid had to remove the real sdcard also... I dont see why lol, and i didnt have too.
Then you should just load up a teminal emulator on android and type: su and then sh bootbt. You said you did "sh bootsh" from adb. I did it from phone. But once the script runs it shouldnt matter where its invoked from so long as your running as root?
Try typing adb root first from pc.
Or type su first from terminal emulator on your phone.
To reply to mot.a.troll.... Im sorry im dumb and take suddle things like that as a big insult because i really dont think knowing about ubuntu or even backtrack. Is a requirement for this or for following that guide. I am damiliar with unix... Believe it or not. And i am DEFFINITLY not in IT, idk what "it" even means whaha. All i enjoy doing is programming when i was a kid in basic, and now 90% just perl all day (for many many years)
Ill edit my insult to u since your right, and its because im dumb and get offended. I wish i never even knew what ubuntu was period lol, but setting it all up manually is hard work and i just needed things working lol
I dont think the problem has anything to do with your linux distro or adb. Im 99.999999999% sure lol
Hacker ? Backtrack? *cough* , gentoo based linux for arm next time but nice effort.
Fyi backtrack really seems ok for live cd wifi stuff, but as phone had no promiscuous mode on wifi driver, whats the point ?
Just an off note, if u want linux on atrix this badly then why not chip in with porting ubuntu touch.
Sent from my GT-I9505 using xda app-developers app
i ve tryed it again with other ROM and sdcard placement but i m gettin same errors (no directory's, cant mount etc)
sry i havent posted log again
p.s.
Gentop2 (Gentoo) is the best experience i had with atrix and linux at all
I wish i have a dream what somebody will compile newer and better version than 05092013 but it wont happen i guess.
JustSueMe said:
Hacker ? Backtrack? *cough* , gentoo based linux for arm next time but nice effort.
Fyi backtrack really seems ok for live cd wifi stuff, but as phone had no promiscuous mode on wifi driver, whats the point ?
Just an off note, if u want linux on atrix this badly then why not chip in with porting ubuntu touch.
Sent from my GT-I9505 using xda app-developers app
Click to expand...
Click to collapse
Sorry if me being a hacker offends you or your definition of it. Personally idgaf.. my current job basicaly implies i atleast write clever enough perl to make money lol...
And for your off note... This may sound very "ignorant".. but i HATE the owners of ubuntu. and hate how closed it is. I would never help them.
Also about the promiscuous mode, I wasnt even aware phones had no promiscuous capable wifi drivers... are you sure? Either way I dont see why you NEED it for the plethora of tools offered to you just by downloading an .img file.... I understand gentoo is alot better... but i have no time? This took me 30mins... because i literally copy pasted the commands and then waited...
use your brain? I could hack on windows, ios, android, ipad, unix, linux, pickyourfavorite here... hacking is an abstraction above the operating system imho *cough* *noob* ...and chrooting android PERIOD. gives OBVIOUS benifits.
the link i found is an extremelly easy way to make it work
USSRxAZ said:
i ve tryed it again with other ROM and sdcard placement but i m gettin same errors (no directory's, cant mount etc)
sry i havent posted log again
p.s.
Gentop2 (Gentoo) is the best experience i had with atrix and linux at all
I wish i have a dream what somebody will compile newer and better version than 05092013 but it wont happen i guess.
Click to expand...
Click to collapse
if you get an error like /local/data/mnt/ no such directory
then that means you just have to create that directory... and try again.
otherwise post your logs.
Remember what i wrote as a first reply too.
leathan said:
Sorry if me being a hacker offends you or your definition of it. Personally idgaf.. my current job basicaly implies i atleast write clever enough perl to make money lol...
And for your off note... This may sound very "ignorant".. but i HATE the owners of ubuntu. and hate how closed it is. I would never help them.
Also about the promiscuous mode, I wasnt even aware phones had no promiscuous capable wifi drivers... are you sure? Either way I dont see why you NEED it for the plethora of tools offered to you just by downloading an .img file.... I understand gentoo is alot better... but i have no time? This took me 30mins... because i literally copy pasted the commands and then waited...
use your brain? I could hack on windows, ios, android, ipad, unix, linux, pickyourfavorite here... hacking is an abstraction above the operating system imho *cough* *noob* ...and chrooting android PERIOD. gives OBVIOUS benifits.
the link i found is an extremelly easy way to make it work
Click to expand...
Click to collapse
My definition of "hacker" is someone that manages to create a tool or find a way to overcome an obstacle that wasn't supposed to be passed, such as wifi passwords. in this sense, just by using someone elses tools doesn't put you into the category of hacker.
I see chroot can have a benefit, but not by much as it depends on the android os. As 95+% of androids wifi drivers are closed with no promiscuous mode then the generic way of wifi hacking isn't possible. Correct me of I'm wrong but I'm going to assume that's why u want backtrack
Noob? Im have a ubuntu touch port up and running already and. With custom kernel this gives much more benefit over a chroot .
Sent from my GT-I9505 using xda app-developers app

Categories

Resources