Compiling on the device - Xoom Themes and Apps

Hey guys,
Does anyone know if there is a way to compile source code right on the device? I remember some people asking for this way back in the day but it wasn't really practical on such small devices. With a xoom and a bt keyboard though, it's almost as easy as using a regular laptop. I know there are a few different compilers for the iphone(c, c++, java) so I'm sure it is possible. I haven't seen anything but perhaps I'm just looking in the wrong places.
Thanks,
Samuel Maskell

so I'll take that as a no..
I'd love to work on this but I wouldn't really know where to start
I do have some programming experience
but I don't really know anything about how compilers are made
besides a basic overview we did in my computer architecture course

In theory, if you rooted and installed ubuntu, you could install the dev toolchain/eclipse. But it's crappy enough on 2gb of memory, 1gb on the xoom would be ridiculous.
I installed Ubuntu/eclipse on my cr48. It's barely usable.
Developing for android requires a desktop.
That being said, sometimes I make small code changes and build from the cli on my cr48.
smaskell said:
so I'll take that as a no..
I'd love to work on this but I wouldn't really know where to start
I do have some programming experience
but I don't really know anything about how compilers are made
besides a basic overview we did in my computer architecture course
Click to expand...
Click to collapse

Yeah, I really don't see eclipse running very well on a xoom
It doesn't even run that well on my desktop with 4gb of ram and 3.2ghz 6-core processor
like you said, developing for android requires a desktop
but I wasn't really thinking about making android apps on the xoom(although that would be awesome)
I'm mostly just thinking of simple cli programs
something like this would be great
http://www.youtube.com/watch?v=-BDylxLzUEM
Edit: skip to about 1 minute in. the first part is just him writing the code on his desktop and then copying the source file over to his iphone. I don't see any reason why he couldn't have written the code on his iphone though

Your best bet would be to setup a box (with your compiler) somewhere and SSH in. Edit file locally, push to box, SSH in, compile, pull results back.
If you don't have a *nix box handy, you can try something like Slicehost.

that's actually not a bad plan
I use my school's computers to compile things through ssh sometimes anyways
still, I think would be pretty cool to compile right on the device
if it can be done for iphone, it can (and should) be done for android

smaskell said:
that's actually not a bad plan
I use my school's computers to compile things through ssh sometimes anyways
still, I think would be pretty cool to compile right on the device
if it can be done for iphone, it can (and should) be done for android
Click to expand...
Click to collapse
So you can compile applications using the NDK, but you still have to be on a non-Xoom box to do this.
In theory, it should be possible for you to cross-compile gcc for arm and push that to the xoom to do your compiling there. This is a bit more complicated, however, as you can't just specify --ARCH=arm to gcc's ./configure script.

Related

Linux Question

This might sound really odd... but I'm looking to -NOT- use my g1 as a phone... I want to uh... (shoot me if you must) want to remove Android, and install a very light ubuntu install or other gnu/linux derivative like DSL (which cannot be ported to armel probably) to my phone and use it as a mini mini computer...
my question to the DREAM community on XDA here is... can it be done... and for any reason I ever want to go back... do you think it'd be reversible?
My main reasoning is this... I have a nokia 5310, and I work a crappy produce job at a supermarket... I fear my G1 getting broken, and have not used it in the last 2 months. also, I'd be interested in learning how to work stuff out and try to get androided ported over to the new 3g Dash if that was possible, cause that phone looks very nice... IMHO though so... please criticism and responses of all kinds welcome to this question.
The closest I've seen is installing Debian with only terminal =/ sorry. You can look under development for more info.
well actually... with vncviewer you can uh... vnc to it and have x11 running with icewm or lxde
vnc viewer local host
I'm not pro at this. Sorry if my advice was bad. lol
No not bad... but good... thank you. I am looking for "ANY" information... and you fit the requisites. Thanks friend
The reason for running x11 and debian on top of android through vnc is that drivers for the g1 hardware aren't available. Unless you want to write these drivers yourself, I'd forget this one. By the time you get it working, your g1 will be fossilised.
I'd be willing to go and try to learn how to do it.
it'd be a fun project... i mean the thing is just sitting here... I mean... I could always perhaps make a completely stripped down version of android. I only want it to use Wi-Fi... and that's pretty much it... I just want it to be an MID
I want to make sure I understand the situation:
1) You have a cheaper phone so do not use the G1 for fear of damaging it.
2) Since you do not use the G1 you want to:
- tinker with it, most likely destroying it in the process if you succeed at anything.
- install a more conventional Linux distro on the phone, which will require at least some programming knowledge as well as intimate knowledge of Linux. If you want X then it as gone from challenge to an impressive feat.
and finally
3) You want to port android to the Dash 3G.
Your decision making process is a little questionable, but hopefully there is some reasoning I missed or you did not mention.
My advise to you would be: Please learn to walk before you attempt to fly.
A stripped down android would be more feasible. You would not have X, but you should be able to port quite a bit of commandline tools over, to include a more user friendly shell. Then you could try and cross compile X, which will take a lot of patience. If you manage to succeed though. from that point you could do a headless X session and attach to it vian VNC in much the same way as is currently done with debian. Alternatively you could try and port the G1 drivers over to the freerunner project and work from that direction, but this would be much more difficult.
It seems a terrible waste of time in my opinion but if you want to try, go for it. Personally I say sell the G1 and buy a nokia n810. It is a little larger but still small and is a mid.
If however you are set on this course I would suggest hanging out on the IRC channels and getting advice from the ROM cookers, Cyanogen in particular since he rebuilds the linux kernel for the G1, something you will be doing a lot of.
Well most birds learn to fly before they walk. And I think I will go down the trail of a custom Android build. I just wanted to know of it being possible to make it work.
I mainly refer to the fact I didn't want it to break ie the screen or the digitized I assume you mean the xda channel... ... so yes I will choose to jump into the pool before the water is full in it thank you for the advice and knowledge

HARet and Backtrack

What's up everyone?
(Mods, not sure if this goes in Rom Development or Software... I thought software... I could be wrong!)
Well I was looking at the massive development that has been made on porting Android to the Kaiser, and I started thinking, if HARet is a linux bootloader, would there be a way to use it to load a bootable copy of backtrack or the like?
Sorry if this is a ridiculous question... I'm not a computer engineer, nor a marginally intelligent monkey for that matter, so I thought someone with some knowledge could shed some light?
Well, you'd think it'd be possible if you somehow used a version made for ARM processor, but there are so many practical reasons that it wouldn't work well if at all. There's a reason that we're not all running Debian with gnome as our standard OS's, the hardware specs are simply too high, and so much work would need to be done to add drivers and get it booting. Even knoppix probably wouldn't work well. Plus, you can't really run a full desktop distro on a QVGA screen that's 2-3 inches across. In addition, Backtrack's whole purpose is for security and network penetration testing, and neither of those would work on a phone. You couldn't even get the WiFi chipset into monitor mode, let alone crack a network or inject packets. Even things like firefox would crawl at best. When you read this, you'll understand why the developers only port Linux distros optimized for embedded systems, like Maemo and Android; other ones simply aren't practical for use, and would be a waste of time to port. However, your question was a perfectly reasonable one (and you put it in the right section!)
If any developer would like to add further to this, they are more than welcome to.

[REQ]Tutorial for devs who want to join the Xperoid project

Dear all,
Why don't we create some tutorial and advices for new developers who love X1 and Android but don't have much knowledge about Linux kernel, Gitorious...
I have cloned the Kernel repository but still don't know where to start with
I think many of us want to help too
Thanks for reading
Nice Step, i will be with you in this project and wish more devs will come with us.
Thanks
There are instructions on how to compile the kernel on the wiki:
http://wiki.xda-developers.com/inde...ngx20.thex20.Kernelx20.fromx20.thex20.Sources
I added instructions to get wifi working a week or so ago.
I too want to cook an Android dist from scratch, we will need to go back and figure out what has been done (i.e required modifications to fix the screen flip)
It will be very useful to have this info on the wiki as one may need to do it all again for future Android releases (i.e 2.2, 2.3)
edit: There is some technical info at http://www.htc-android.com/viewforum.php?f=5
I hope you can make goot work on it (fingercrossing)
I only have windows programming knowledge some C++ knowledge. So, is there anyone can tell me about the environment for develop a kernel, which knowledge do i need to focus on ^^ I still don't familiar with all those thing yet, I just want to help and i know i have to improve my knowledge for that
I like the idea of having a HOWTO, so that everyone can join in development. But i am not sure, that it is even possible. It is too big.
Downloading/cloning sourcecode, setting up build environment and cross-compiler and building a linux kernel is actually the easy part. A good guideline was postet by Tremere, and google is always your friend
Now the REAL WORK begins. Linux kernel source code is not very well documented. And the kovsky hardware specs are not documented at all. Well, some chips have been identified and datasheets where found, but many things are simple and painfull trial-and-error and may never work at all.
Then is the problem of finding the right source files in the source-tree. It helps looking into git-log and analyse changes made.
Then is the problem of data-structures and functions defined and used all over the source. There is no guide or something that explains what structure is used when and where. If you are lucky, you find some irc-chat-logs
Then is the problem that you can not debug, only add messages and stuff.
Then is the problem on how to approach, lets say GPS or Camera. You have to know about GPIOs, bus-systems, driver-models, ...
Then is the problem that one day has only 24 hours
Anyway, i would like to see, that you prove me wrong!
it's not about proving you're wrong, it's all about proving you CAN !!!! you've bring it far from the start, I dont think that the battery or camera can scare you!!!!
Vdelf I know you have worked alot on this, I put all my trust in you!!! I cant help you becaus I dont know how!!!
so I support you more than anybody because I really really want all this Xperoid to be fixed!!
vdelf said:
I like the idea of having a HOWTO, so that everyone can join in development. But i am not sure, that it is even possible. It is too big.
Downloading/cloning sourcecode, setting up build environment and cross-compiler and building a linux kernel is actually the easy part. A good guideline was postet by Tremere, and google is always your friend
Now the REAL WORK begins. Linux kernel source code is not very well documented. And the kovsky hardware specs are not documented at all. Well, some chips have been identified and datasheets where found, but many things are simple and painfull trial-and-error and may never work at all.
Then is the problem of finding the right source files in the source-tree. It helps looking into git-log and analyse changes made.
Then is the problem of data-structures and functions defined and used all over the source. There is no guide or something that explains what structure is used when and where. If you are lucky, you find some irc-chat-logs
Then is the problem that you can not debug, only add messages and stuff.
Then is the problem on how to approach, lets say GPS or Camera. You have to know about GPIOs, bus-systems, driver-models, ...
Then is the problem that one day has only 24 hours
Anyway, i would like to see, that you prove me wrong!
Click to expand...
Click to collapse
Thanks for your advices
if building the kernel is the easy part i'm a long looong way from being useful xD
probably my x86_64 bit fedora doesn't like me very much, got stuck with glibc dependencies errors or some wrong step at the arm installation... ¿could an x86 virtualized ubuntu save my day? as ive read some of the first testing was done in a debian distro, so ill try my luck with it.
damn... learning is fun... i just hope my Xperia doesn't learn how to burn while i'm playing with it xD
monovaldes said:
if building the kernel is the easy part i'm a long looong way from being useful xD
probably my x86_64 bit fedora doesn't like me very much, got stuck with glibc dependencies errors or some wrong step at the arm installation... ¿could an x86 virtualized ubuntu save my day? as ive read some of the first testing was done in a debian distro, so ill try my luck with it.
damn... learning is fun... i just hope my Xperia doesn't learn how to burn while i'm playing with it xD
Click to expand...
Click to collapse
A while ago, someone (can't remember exactly) posted a link to a linux vmware image for kovsky development -
you could start with that, although any linux system should be no problem, since there are no distro -specific
"packages" to use in this kernel development ( possibly except git )
Hell, I don't even use a VM - I have a slackware 12 install running on coLinux
under windows 7 and it works a treat!
angusmcb said:
A while ago, someone (can't remember exactly) posted a link to a linux vmware image for kovsky development -
you could start with that, although any linux system should be no problem, since there are no distro -specific
"packages" to use in this kernel development ( possibly except git )
Hell, I don't even use a VM - I have a slackware 12 install running on coLinux
under windows 7 and it works a treat!
Click to expand...
Click to collapse
well, that is a very nice alternative for users which don't like linux messing with their drives (not myself though xD)... thanks anyway
couldn't really tell which was the actual problem for me, i just got it working fine after installing an i686 distro on top of the x86_64 one
and... now comes the easy part, right? haha
will get onto studying
I've been installing Gentoo on my X1
http://wiki.xda-developers.com/index.php?pagename=Gentoo_on_HTC
The good thing about Gentoo is although the compilation takes forever (especially under an emulated ARM chroot!), it allows us to build a system from first principles and also build packages to our needs.
A lot of this has been googling for what people have done on the Xperia and other HTC devices, particularly with the Ubuntu ports.
Hopefully all the knowledge I've gained will make it real easy to get MeeGo running.

a kick to the ass from the past

Does anyone remember the video adobe put up demonstrating flash on g1? It's a video of kevin lynch showing flash 10 working what seems to be flawlessly on the g1, more than a year ago!
link--->http://www.youtube.com/watch?v=YT__RDRVb4c
just a couple days ago cm6 got released and its running beautifully on my "old bed-ridden" so why not flash? i'm no developer but there must be a way to make flash specifically for g1's or mytough 3g's, after all the video is living proof. hopefully a developer can take the flash app from another phone running froyo and work their magic on it to make it work on our devices. c'mon devs keep the g1 alive
It really is heartbreaking..
Seeing this video makes me remember why I was bragging to Iphone users that have no flash what-so-ever... I remember this video now and I guess the G1 has the flash capabilities but, the app that adobe released is coded to only work on Froyo and Snapdragon devices.
I think their plan is to get us all to upgrade to the newer snapdragons or soon to be dual core snapdragons... Man I hate how technology ages.
Well from the sounds of it the Flash that is available now and to the public for Android Phones won't work on the older processors of the G1 and such. In it's current form anyways.
People keep throwing around that Flash is "not possible" on the G1 and I just don't buy it. I'm no developer and I'm sure it's not easy, but I don't for a second believe it's "not possible."
I could however believe that it just isn't worth it. But that's totally different. It'd be nice to hear a dev say they don't want to bother with the headache and that it would just be too large an undertaking rather than just hear that it's "not possible."
It is possible it however is not probable. As flash isn't open source it would have to be backwards engineered(unreasonable amount of effort) and recompiled for the arm6 architecture..far to much effort for something that would function questionably..
Sent from my iPhone using Tapatalk
@Blackman778g
yea definitely agreed, but i don't see why not someone can screw around with a couple of files or code or whatever developers do and recompile to operate on older devices, or devices with different hardware. sure it's probably not gonna be an easy task, but if we can get a whole operating system that's suppose to cripple the **** out of our hardware, why not just an app? sense has done it, not in a specifically good way but it can maybe spark hope?
@dezvous
yea it'd be pretty sweet for someone to take a jab at it, and personally i believe the "it wont work with our processors" is a load of bs, because i think the phone in the link is running cupcake, which underclocks the g1 at 386 and it looks perfectly fine. now-a-days we can get to 725mhz without jacking up your battery, i run 614 and i just sit and watch it fly
@ftruck90
yea thats true, but it'll be cool to see someone try
why not dump adobe flash alltogether and work on an open source flash replacement, there's one available for linux, i think its called GNUFlash or something..
ps: i think this was already mentioned somewhere else on xda..
here you go...
http://www.gnu.org/software/gnash/
Cyanogen has told us full flash will never work on G1. However, there's a think tank for getting flash lite to run in Froyo.
http://forum.xda-developers.com/showthread.php?p=7177455
Flash not working is not bs.
Flash as it is now was built for a certain processor architecture (The G1 has Arm6 where flash was built to run on Arm7). Its like saying that its BS that I can't run software built to run on PowerPC on a x86 processor. The PowerPC processor has different instruction sets that the x86 does not.
We need an open source mobile flash alternative.
That we could try to recompile for our devices and build a plugin around it.
Or someone disassembles the curreent flash froma dobe and recompiles it for Arm7...wich i don't think is possible.
i dont understand something. everytime i see one of these flash topics, every1 says it was never compiled to run on arm6 and everything else.... but how did this video come to life? OVER A YEAR AGO. that video is flash, running on a g1, pretty solidly too. and i mean...whats that...cupcake?
that video is pretty incriminating stuff if you ask me. adobe got some explaining to do.
but...if CM says it cant be done, i'll believe him.
CM said it can't be done (with the adobe flash)
What you saw was a (probably unstable?) version of flash compiled by adobe probably as a testrun on the G1.
Adobe CAN compile it for the G1 IF they want to.
What we can do in the meantime is ask adobe to compile flash for the Arm6 and hope that it'll make enough rucus for them to notice.
havikx said:
i dont understand something. everytime i see one of these flash topics, every1 says it was never compiled to run on arm6 and everything else.... but how did this video come to life? OVER A YEAR AGO. that video is flash, running on a g1, pretty solidly too. and i mean...whats that...cupcake?
that video is pretty incriminating stuff if you ask me. adobe got some explaining to do.
but...if CM says it cant be done, i'll believe him.
Click to expand...
Click to collapse
1.that video could very well not be legit lots of companies release mocked up videos as ads
2.if it was real adobe have the source code for flash as it's their product so they very well may of compiled a version for arm6 and never released it. But as its not open source that means exactly zero to us. The argument isn't that it's impossible to run flash on this processor it's that it is impossible to run current releases of flash on it
Sent from my iPhone using Tapatalk
mr.johnsexydavis911 said:
@Blackman778g
yea definitely agreed, but i don't see why not someone can screw around with a couple of files or code or whatever developers do and recompile to operate on older devices, or devices with different hardware. sure it's probably not gonna be an easy task, but if we can get a whole operating system that's suppose to cripple the **** out of our hardware, why not just an app? sense has done it, not in a specifically good way but it can maybe spark hope?
Click to expand...
Click to collapse
OK, you obviously aren't a dev. Here's the basic version. Programs these days are written in a more human readable format (called "source") and compiled into a format the computer can understand. Most compilers build for a specific CPU type, and the code they generate won't run on anything else. Interpreted languages like BASIC, Python, and Java either don't really get compiled, or get compiled to a neutral format called "bytecode". Then you need a CPU specific app to run the source or bytecode.
Flash is a bytecode language. That's why it can run on so many platforms. The problem is the bytecode interpeter. That's proprietary code that Adobe wrote and has not released the source for. It's also native CPU code, so it's compiled for a specific CPU family. Which is a somewhat retarded thing to do on a platform like Android, but they probably did it for performance reasons. Though with a working JIT, I imagine a Java based version would work. Adobe has never been known for writing very efficient code.
Now, the Flash runtime engine was compiled for a different CPU type than the one we have in G1, MT3G, and others. In order for the Adobe code to work with our devices Adobe would have to compile it for us. Or give us source code, which they will likely never do. Or we could try to write an emulator to fake the CPU type differences, but those are SLOW. The rule of thumb is you have to have a CPU 10x as powerful as the CPU you are emulating. Our CPU is slower than the one we would need to emulate.
Another option is to attempt to do dynamic compilation on the binary to translate it to our CPU architecture. This is an incredibly complex undertaking and is rarely attempted. There are just too many things to go wrong with this sort of thing. In this particular case, the existing code is close to the same architecture, so it might be a little easier, but it's still very difficult. You have to translate every instruction at the machine code level and account for differences in the available instructions, registers, size of data fields, CPU cache, RAM size, and various other side-effects that are not obvious at first glance. The devs here are good, but this is the sort of thing that billion dollar companies try and fail at. It's a LOT harder than it looks.
If you want flash, learn to dev and work on one of the open source Flash engines to try to get it up to snuff. Then try to optimize it to run well on our low end CPU and RAM starved machines. By then we'll likely be running dual or quad 3Ghz ARM12 phones.
has any1 tried contacting adobe about it?
Dead platform. Probably not worth their time and money to compile on ARMv6. As ttabbal stated above, by the time any of these solutions come to fruition, we'll probably all have upgraded.
I would say its definitly worth adobes or a devs time and money. Because even tho g1s are getting old. I would still pay 20 or 30 bucks just to download a nice operating flash player for the g1 off the market. There's so much money in it. Its sick. That dev would be rich fo sure!!!!!
sent from my superfroyo dream
dead platform
Ok, in the last 4 weeks over a million Phone with android and ARM 6 processors were sold world wide. So I would say that Adobe may listen.
It took adobe SEVERAL YEARS to support AMD64, and that was with the entire world nagging them about it several times every day, and it is an ADVANCEMENT from intel32.
Adobe is just a bloated hog, they are COMPLETELY out of touch with consumers, selling you the JUNK that they WANT to sell you and not the product that YOU WANT to buy from them.
To be honest though, LET FLASH DIE. I don't want flash on my phone, or, for that matter, even on my desktop. It doesn't offer ANYTHING that is even REMOTELY useful.
dhkr123 said:
It took adobe SEVERAL YEARS to support AMD64, and that was with the entire world nagging them about it several times every day, and it is an ADVANCEMENT from intel32.
Adobe is just a bloated hog, they are COMPLETELY out of touch with consumers, selling you the JUNK that they WANT to sell you and not the product that YOU WANT to buy from them.
To be honest though, LET FLASH DIE. I don't want flash on my phone, or, for that matter, even on my desktop. It doesn't offer ANYTHING that is even REMOTELY useful.
Click to expand...
Click to collapse
Agreed. Is there any way we can make this thread disappear? I don't want another necromancer to appear after Gingerbread drops and people go nutso there too.

How hard can be the raspberry pi ?

Hi there,
It's been a while since I wanted to make a small project using newest 'raspberry pi'. But never had a time.
My question is how hard is to work with raspberry pi? Are there loads of phyton language involved? I would like to set up my own project and part of my final year do a thesis using some raspberry pi project. Are there any scripts involved (that I could adjust) and make a successful project? Or 6 months for testing and writing raspberry pi isn't enough? What are your experience and opinion
eddyys said:
Hi there,
It's been a while since I wanted to make a small project using newest 'raspberry pi'. But never had a time.
My question is how hard is to work with raspberry pi?
Click to expand...
Click to collapse
It's just Linux, there's not so much Raspberry specific. It mostly depends on your own experience and if u have fun learn something new. I had already over 10 years daily Linux experience and there was nothing really new for me.
I've setup apache, nginx, samba just like on any other Linux Box I've used before. Python is the recommend language to learn programming on Raspberry, but you can really use almost anything that works on Linux/Debian. I use more Nodejs and ES6 this days.
I could write now even more but mmhhh, i would just repeat myself - its really really easy this days. When I started to learn Linux I've spent sometimes several days just to get my xserver and a GUI running, now you write your SD card, insert, run, done
dotpower said:
It's just Linux, there's not so much Raspberry specific. It mostly depends on your own experience and if u have fun learn something new. I had already over 10 years daily Linux experience and there was nothing really new for me.
I've setup apache, nginx, samba just like on any other Linux Box I've used before. Python is the recommend language to learn programming on Raspberry, but you can really use almost anything that works on Linux/Debian. I use more Nodejs and ES6 this days.
I could write now even more but mmhhh, i would just repeat myself - its really really easy this days. When I started to learn Linux I've spent sometimes several days just to get my xserver and a GUI running, now you write your SD card, insert, run, done
Click to expand...
Click to collapse
Thanks for your reply. I think I can deal with 'how to setup system etc.' The only worry is once you let's say have a sensor, you have to code that to fully work.
eddyys said:
Thanks for your reply. I think I can deal with 'how to setup system etc.' The only worry is once you let's say have a sensor, you have to code that to fully work.
Click to expand...
Click to collapse
Don't worry! There's a large community and so many code examples! I am more interested in client/server apps so i can say much about it, but I remember there was even a app to do things without coding.
Thanks that really helps. I am about now to buy all necessary for the project. Any suggestions where to buy in the UK? Amazon/Ebay ?
I've found many tutorials but perhaps you have your favourite ones that explain the hardware part (what kind of items should I buy), then programming part for scripts etc.
Regards
anyone?

Categories

Resources