Debian instead of android... can it be done? - G1 Android Development

I have been a linux user for years, love it. so when i heard about android i bought a g1 as soon as i could... and honestly i HATE the java base... it sucks. For a while ii have been using debian on my sd and i think i have found a way to read ( but not send ) texts from within debian. any chance of developing debian to the point where we could use it as the primary system ? can the g1 g1 boot loader load it ?

No.........

damageless said:
No.........
Click to expand...
Click to collapse
Thanks ****, how about some reasoning or logic ? nothing cannot be done it is just a matter of how much effort is required to achieve the desired result.

modem_over said:
I have been a linux user for years, love it. so when i heard about android i bought a g1 as soon as i could... and honestly i HATE the java base... it sucks. For a while ii have been using debian on my sd and i think i have found a way to read ( but not send ) texts from within debian. any chance of developing debian to the point where we could use it as the primary system ? can the g1 g1 boot loader load it ?
Click to expand...
Click to collapse
Yes.
Seriously.
I haven't looked at Android in ages, but regardless - debian is just a packaging and deployment system. It has little to do with the actual code and configuration of what is deployed in the end. It's work, but it's trivial work.
As for your disdain for the Java - how about some elaboration there? Do you really think you feel a performance hit?

i do really feel that java does slow the system down for one, and second, i don't want to learn another language...

...
no..............

yes, the bootloader will load it just fine.
i have played with nothing but debian on my phone... although, it's fairly useless.
until someone reverse engineers some way to talk to rild and control the wifi module and its userspace components you're pretty much tied to the java environment if you want... well, anything but a fancy embedded debian computer.
anyway, initramfs-tools package is your friend, as well as the android development environment. the bootloader will load the kernel + initramfs, and from there the sky (and linux) is the limit.

and i had to comment on the java performance... seriously, does anyone doubt that there is a *huge* performance hit? while a register based vm is fancy and fairly efficient as far as non JIT vm's go, it's still ridiculously slow and wasteful for the operating specs of this machine. 96mb of usable ram? dalvik forks off separate processes for each vm instances, so not only do you incur major pain for the COW operation, but enough changes in the working set to almost eliminate any helpfulness of COW. it's confusing as the point of zygote is to have a basically mostly started vm, but i'm not entirely sure how that's working in the background.
FWIW, when you clock this beast up to full CPU spec speed (528mhz) interface responsiveness doubles in fluidity.

Of course there is a huge performance hit, few people saying no are google's blind lovers.
Im sorry for this useless post..

The issue to me is the time it would take to develop debian to full working capacity with all the hardware. Possible? Yes. Fun? Depends on who you ask. Probability high for it to be actually completed better than Android? Doubtful.
JMO

i agree with you in most points, however, there are already standard non-android mobile linux stacks. the only hardware specific areas that need to be addressed are the wifi and telephony libraries.
the graphics are simple, it's a standard linux framebuffer, and an x server will run directly on it. if that's too heavy for the g1 (likely) directfb can also be used.
in the end - will it be better than android? probably not. too much development has gone into android.
will standard native apps utterly outperform android apps? believe it.
though, without either: a port of an x server to interface with surfaceflinger, or: a modified version of surfaceflinger to talk to an x server running on the framebuffer, you will never get the best of both worlds without some intermediate transport like vnc.
i'm in no way an advocate of 'debian only!' however, the poster of this thread was smacked down by some people who obviously had no real knowledge in the matter, so i sought to inform him.
the better direction i think, is someone to write a nice tight little c api for the binder surface flinger interface so people can start writing some more memory conscious native apps for people with rooted phones. streaming daemons, etc. while i think the stock development capabilities of the android platform is much better than the stock iphone's, a jailbroken iphone is 100% cooler than a jailbroken g1 at this point, but once there is enough community drive - that can change.

Booting into debian primarily which then runs android ontop of it should be possible, and then using android for things until more is developed on debian. Should work.
Still the original post was more about strictly debian only.

modem_over said:
Thanks ****, how about some reasoning or logic ? nothing cannot be done it is just a matter of how much effort is required to achieve the desired result.
Click to expand...
Click to collapse
Temper tantrums aside, if you knew the answer to your question already what's the point of this thread? There's already a thread for people running debian on their G1, ask it there.
http://forum.xda-developers.com/showthread.php?t=444419&highlight=debian

nolageek said:
Temper tantrums aside, if you knew the answer to your question already what's the point of this thread? There's already a thread for people running debian on their G1, ask it there.
http://forum.xda-developers.com/showthread.php?t=444419&highlight=debian
Click to expand...
Click to collapse
Guess he can't now - been banned. Shame, too, I am sure we'll miss his pleasant demeanor.

davecanada said:
Yes.
Seriously.
I haven't looked at Android in ages, but regardless - debian is just a packaging and deployment system. It has little to do with the actual code and configuration of what is deployed in the end. It's work, but it's trivial work.
As for your disdain for the Java - how about some elaboration there? Do you really think you feel a performance hit?
Click to expand...
Click to collapse
OMFG yes there is a performance hit.

Yes i do bring certain special qualities to this forum don't I. at any rate i have began to build a port to be able to run directly off the jf bootloader.
vettejock99 said:
Guess he can't now - been banned. Shame, too, I am sure we'll miss his pleasant demeanor.
Click to expand...
Click to collapse

Yes i do bring certain special qualities to this forum don't I. at any rate i have began to build a port to be able to run directly off the jf bootloader.
Click to expand...
Click to collapse
cool i can't wait to try it out

modem_over said:
Yes i do bring certain special qualities to this forum don't I. at any rate i have began to build a port to be able to run directly off the jf bootloader.
Click to expand...
Click to collapse
Cool - that sounds great

modem_over said:
Yes i do bring certain special qualities to this forum don't I. at any rate i have began to build a port to be able to run directly off the jf bootloader.
Click to expand...
Click to collapse
any bootloader will work. there is no verification done by the bootloader during the bootstrap process, only during the flash process. flashing of the modified boot image with a debian initramfs instead of an android initramfs can be done from a functioning rooted android os, or from a test-keys enabled recovery partition. the method i used was to do a normal debian install on a partition of the sd card, installing initramfs-tools, building an initramfs, built a new boot.img with the stock android dev environment.

i've also compiled a kernel with full namespace support and a custom init that launches the android init and debian inits in separate namespaces allowing them to run concurrently. not much use since they can't talk to each other, but it is somewhat neat. virtuozzo like containers on your g1 =)

Related

VMWare For Mobile Devices Lets You Run Windows and Android Simultaneously

Man, I can't even believe VMWare is playing with a mobile hypervisor that's already this functional.
Perhaps the crowd hoping for a way to run Windows Mobile on the Dream will be able to at some point without giving up the awesomeness that is android.
http://i.gizmodo.com/5160685/vmware...ts-you-run-windows-and-android-simultaneously
awsome!!!!
Now that is interesting. I wonder which manufacturers will pick up on this...
alapapa said:
Man, I can't even believe VMWare is playing with a mobile hypervisor that's already this functional.
Perhaps the crowd hoping for a way to run Windows Mobile on the Dream will be able to at some point without giving up the awesomeness that is android.
http://i.gizmodo.com/5160685/vmware...ts-you-run-windows-and-android-simultaneously
Click to expand...
Click to collapse
Sadly, if you mean what I think you mean, I don't think it's going to happen. I may be wrong but I don't think a hypervisor would be applicable by the community, and would need to be put in place by the manufacturers. This may be different for us with total access to everything on the phone, but I'm not sure how far "total" access goes.
It would be rather cool to be running Windows on a mobile, though... And considering Win7 is adding in some rather mobile-friendly features I must admit that'd be awesome
My god, keep your microshaft away from my android. I cant think of anything more disturbing or destructive than running that CRAP on ANYTHING.
A more appropriate application of virtualization is testing of new/customized versions, i.e. testing cupcake on the hardware without compromising existing installed version.
personally, i'd love to have windows installed. i'd just it like she said in the video; windows for work, android for play
would be awesome.
lbcoder said:
My god, keep your microshaft away from my android. I cant think of anything more disturbing or destructive than running that CRAP on ANYTHING.
A more appropriate application of virtualization is testing of new/customized versions, i.e. testing cupcake on the hardware without compromising existing installed version.
Click to expand...
Click to collapse
keep an open mind.
i'd, personally, love to run a tiny linux vm hypervisor stylie for numerous reasons
http://mobiledevdesign.com/software_design/open-kernel-labs-okl4-software-0521/
lbcoder said:
My god, keep your microshaft away from my android. I cant think of anything more disturbing or destructive than running that CRAP on ANYTHING.
A more appropriate application of virtualization is testing of new/customized versions, i.e. testing cupcake on the hardware without compromising existing installed version.
Click to expand...
Click to collapse
that's the point. android / linux is the reason for me to use the dream. would have never bought a wm device.
My god, keep your microshaft away from my android. I cant think of anything more disturbing or destructive than running that CRAP on ANYTHING
Click to expand...
Click to collapse
Then just dont install it.... simple as that.
I think the choice to run whatever you want is a great thing.
lbcoder said:
My god, keep your microshaft away from my android. I cant think of anything more disturbing or destructive than running that CRAP on ANYTHING.
Click to expand...
Click to collapse
You're so edgy. Tell me more about how Microsoft is the apparent Anti-Christ.

Making Hero FASTER project

howdy peeps i have an idea of how maybe we could solve the speed issues with the hero rom but my programming skills have not reached java as of yet, i am learning as we speak, but heres my idea...
im thinking of a program that sits in the background that basically controls the priority of certain programs running on android like rosie.apk.
for instance if the home button is pressed not only is the rosie apk brought to the front but is given more cpu priority over other applications running which in affect should speed up delays. a bit like when you do it in task manager on windows.
i am trying to figure out how to write this with java and the android sdk but wondered what your views are on this and if anyone can actually implement this quicker and better than i will be able to lol
look forward to hearing your views
I'm no programmer but this seems plausible so this would be a program that would prioritize all programs running in the foreground and background or all programs?
dont you think running this program in the background would use up alot of cpu usage also?
even in the background apps of rosie already use up alot of power...this would just take up more space and room and slow stuff down.
if it does get made it would have to be extremely lightweight
good luck
looking forward to what develops
redmdc said:
howdy peeps i have an idea of how maybe we could solve the speed issues with the hero rom but my programming skills have not reached java as of yet, i am learning as we speak, but heres my idea...
im thinking of a program that sits in the background that basically controls the priority of certain programs running on android like rosie.apk.
for instance if the home button is pressed not only is the rosie apk brought to the front but is given more cpu priority over other applications running which in affect should speed up delays. a bit like when you do it in task manager on windows.
i am trying to figure out how to write this with java and the android sdk but wondered what your views are on this and if anyone can actually implement this quicker and better than i will be able to lol
look forward to hearing your views
Click to expand...
Click to collapse
If you can figure out a way to edit the fameworks in /system/framework you'll be fine.
This is called cpgroups - and Cy's ROM and xROM already do this.
The problem with Hero/Mytouch is that the framework is odexed and we have no way to unodex them, edit the files, then remake them.
I love this community. i have confidance that this thread will turn into something good.
im running jaxhero 1.2 and it doesnt lag for me at all. im running compcache with a linux swap
I think this problem is partly due to lack of memory and possibly poor coding.
Hero UI on Dream is slow. Hero UI on Hero is faster, but still not smooth. The extra RAM on the Hero obviously helps since it's the same hardware besides more RAM.
There's a lot of work ahead to get it to run faster. Perhaps work with the NDK instead of the SDK. I assume when an application goes into the background it stops and writes data to memory, the services don't stop. I think to make Hero UI work faster, the code needs to be improved for less memory usage and then optimized more for efficient code. Not a simple task.
I'm not sure if prioritizing tasks will make it faster. It may make it faster to get to Home (once), but once you are there and if you want to start another application it will still need to do what it originally needed to done before it got de-prioritized.
Think of it as cooking, each time you cook something and you want to start something else you can clean up dishes or just leave them in the sink. If you clean up your dishes after each project, you take some time before starting the next one. If you don't clean up the dishes, you can start the new project quickly. However, soon afterward you'll have a sink full of dishes and you can't continue and they need to be cleaned and will take a long time. Thats how I view the problem. Get a bigger sink and more dishes (RAM) or optimize the process so it doesn't use as much dishes or it's quicker to wash them..
Maybe it'll be easily solvable when much fast sd cards are out that we can swap out a lot without slowdowns.
Good luck to anybody who is tackling this.
jad011 said:
im running jaxhero 1.2 and it doesnt lag for me at all. im running compcache with a linux swap
Click to expand...
Click to collapse
compcache is not supported in 1.2
You can remove some of the bloat by reducing the home screen to 5 or even 3 desktops. This should be hex editable, but I don't know enough about HTC ROM to do this.
I also see a lot of improvement in responsiveness of the ROM if I install spare parts from market and turn off window animations as well transition animations. This reduces my battery consumption a lot (passes my overnight standy test: thou shall not use more than 5% battery while on standy overnight for 8 hours) because it seems to be using some sort of graphics hardware accelaration and/or CPU, which makes battery deplete faster.
For my usage, I have been observing the swap usage with swappiness of 30 and I seem to need about 30-35MB most of the time. Now, since this ROM runs slow on Hero also, it seems like the RAM is only a part the problem because Hero does provide more than 35MB RAM on top of Dream. So, the conclusion is that its the inherent bloat in the source code and optimizations which need to be done to reduce the CPU usage. But only HTC can do that.
am i the only one not having any issues w/ the speed? Friend of mine has Cy and im able to keep up with him even though i have 6 big widgets. Only issue is getting in and out of contacts.
imbonez9 said:
am i the only one not having any issues w/ the speed? Friend of mine has Cy and im able to keep up with him even though i have 6 big widgets. Only issue is getting in and out of contacts.
Click to expand...
Click to collapse
YES!
Experienced open source fellow about to chime in here,
Speeding up hero is basically poking around in the dark and hoping that we do the right thing. Unfortunately, because hero (and soon to be raphael and blur as well) are closed source and odexed and whatnot. It's just like windows-vs-linux. At first windows was shinier, but linux eventually caught up because they established a big enough codebase. The problem with hero is that most of it is EXTREMELY hard to "code" or "recode" for the average dev. For this reason the "community" that we have faith in can't do very much, as only one or two people have the knowledge required (not me btw), and they have the sense to promote open source instead of hacking closed source.
Bottom line, and this isn't a flame as much as a lifestyle guide, if you want your phone to be better, and have all the nice hero features, develop for ANDROID. Don't try to hack hero. Dev'ing for android makes things better for EVERYBODY involved.
That's my too sense. As shiny as hero may be....I'm never going to install it.
P.S.
If it explains anything, I'm the kind of person who donates to the FSF. Sorry if that makes me polarized.
[edit]
I apologize for disrupting the purpose of this thread. I'm going to take this to q/a where it belongs. Mostly because I have some questions as to the legality of "hero hacking"
Sorry
sha.goyjo said:
Experienced open source fellow about to chime in here,
Speeding up hero is basically poking around in the dark and hoping that we do the right thing. Unfortunately, because hero (and soon to be raphael and blur as well) are closed source and odexed and whatnot. It's just like windows-vs-linux. At first windows was shinier, but linux eventually caught up because they established a big enough codebase. The problem with hero is that most of it is EXTREMELY hard to "code" or "recode" for the average dev. For this reason the "community" that we have faith in can't do very much, as only one or two people have the knowledge required (not me btw), and they have the sense to promote open source instead of hacking closed source.
Bottom line, and this isn't a flame as much as a lifestyle guide, if you want your phone to be better, and have all the nice hero features, develop for ANDROID. Don't try to hack hero. Dev'ing for android makes things better for EVERYBODY involved.
That's my too sense. As shiny as hero may be....I'm never going to install it.
P.S.
If it explains anything, I'm the kind of person who donates to the FSF. Sorry if that makes me polarized.
[edit]
I apologize for disrupting the purpose of this thread. I'm going to take this to q/a where it belongs. Mostly because I have some questions as to the legality of "hero hacking"
Sorry
Click to expand...
Click to collapse
two important things my momma taught me.
1. Don't say anything if you can't say anything nice
2. Don't do anything you are gonna apologize for later.
I, unlike Mr.Negativity who seems to have some underlying hate for life itself, want a faster Hero rom. Thank you all the dev's that have contributed and will contribute to this cause in the future.
Here's what I have done and seen a good pick up in speed with hero builds, I have an 8 gig cl 4 card but I guess you can do this with a 4 gig card too. make your linux swap partion 128
From what I understand the swap runs kinda like ram. I ordered a 8 gig class 6 card and I will try a linux swap of 256, but I think that will hang bad I'll let you all know in a few days.
But try linux swap set at 128 its much better
sha.goyjo said:
Experienced open source fellow about to chime in here,
Speeding up hero is basically poking around in the dark and hoping that we do the right thing. Unfortunately, because hero (and soon to be raphael and blur as well) are closed source and odexed and whatnot. It's just like windows-vs-linux. At first windows was shinier, but linux eventually caught up because they established a big enough codebase. The problem with hero is that most of it is EXTREMELY hard to "code" or "recode" for the average dev. For this reason the "community" that we have faith in can't do very much, as only one or two people have the knowledge required (not me btw), and they have the sense to promote open source instead of hacking closed source.
Bottom line, and this isn't a flame as much as a lifestyle guide, if you want your phone to be better, and have all the nice hero features, develop for ANDROID. Don't try to hack hero. Dev'ing for android makes things better for EVERYBODY involved.
That's my too sense. As shiny as hero may be....I'm never going to install it.
P.S.
If it explains anything, I'm the kind of person who donates to the FSF. Sorry if that makes me polarized.
[edit]
I apologize for disrupting the purpose of this thread. I'm going to take this to q/a where it belongs. Mostly because I have some questions as to the legality of "hero hacking"
Sorry
Click to expand...
Click to collapse
great advice.....is anyone willin to teach me how to make my own rom??
That_Guy_19033 said:
Here's what I have done and seen a good pick up in speed with hero builds, I have an 8 gig cl 4 card but I guess you can do this with a 4 gig card too. make your linux swap partion 128
From what I understand the swap runs kinda like ram. I ordered a 8 gig class 6 card and I will try a linux swap of 256, but I think that will hang bad I'll let you all know in a few days.
But try linux swap set at 128 its much better
Click to expand...
Click to collapse
Hey guy are you running 128 swap on 1.2? I ran 128 on all the others and they ran super smooth. For whatever reason I had lots of lag with 1.2 and lowered it to 96 which made it run smoother
Naw i got 1.2 but didn't flash it i might skip 1.2 and wait on 1.3 but thanks for the reply and input
ccyrowski said:
If you can figure out a way to edit the fameworks in /system/framework you'll be fine.
This is called cpgroups - and Cy's ROM and xROM already do this.
The problem with Hero/Mytouch is that the framework is odexed and we have no way to unodex them, edit the files, then remake them.
Click to expand...
Click to collapse
wouldn't it be possible to baksmali the odexes, then smali them to a dex and put it inside the apk?
jubeh said:
wouldn't it be possible to baksmali the odexes, then smali them to a dex and put it inside the apk?
Click to expand...
Click to collapse
Sadly only baksmali does not work. There is a way to undex but not as simple to compile as a dex when done.
Seoulboy1 said:
two important things my momma taught me.
1. Don't say anything if you can't say anything nice
2. Don't do anything you are gonna apologize for later.
I, unlike Mr.Negativity who seems to have some underlying hate for life itself, want a faster Hero rom. Thank you all the dev's that have contributed and will contribute to this cause in the future.
Click to expand...
Click to collapse
No one needs to apologize, everything that was said is true. You just don't consider it to be "nice" because you want a faster ROM which you know you probably won't get because of the reasons that were stated. Take the blue pill or the red pill, your choice...

How to develop drivers for any android phone

[NOTE]: Mods please move this thread to general Q&A if you find suitable, posting here because I think question comes more towards development side.
So now the question is:
Here are things which I know (mostly read somewhere / heard from friends etc.)
I'm seeing CM7 progress and time to time devs saying can't go ahead because Wimax driver / GPS driver is proprietary (what exactly does it mean?). While as I was discussing with friends I came to know Android only provide HAL so by logic all drivers should be proprietary or no?
I'm quite sure I've not understood something properly so I wanted to know
1. are drivers available only by manufacturer and Android only provide HAL?
2. If yes then what would it take to fetch those drivers and try writing HAL?
3. If no then how can one start writing own drivers?
I know its not an easy process at all, but I was curious so asking here.
I would appreciate all inputs, and if anyone want to share links I am up for some reading
Thanks
wis3m0nkey said:
So now the question is:
I'm seeing CM7 progress and time to time devs saying can't go ahead because Wimax driver / GPS driver is proprietary (what exactly does it mean?). While as I was discussing with friends I came to know Android only provide HAL so by logic all drivers should be proprietary or no?
I'm quite sure I've not understood something properly so I wanted to know
1. are drivers available only by manufacturer and Android only provide HAL?
2. If yes then what would it take to fetch those drivers and try writing HAL?
3. If no then how can one start writing own drivers?
Click to expand...
Click to collapse
Android does not provide a "HAL" as in the Windows (NT) sense. Android is an operating environment running on the Linux kernel, and the programs (apps) running in Dalvik (Java-based).
The issue with CM/other generic AOSP-based build is twofold. First the driver to interface with the underlying has to be compiled into the Linux kernel. Luckily for most of us, the majority of smartphones are based on a few common chipsets (Qualcomm MSM etc.), so chances are you can find the source for a similar phone, and try to fiddle with the source to make it work. This also means that esoteric hardware (ie. WiMax) has a lot harder time getting the driver working.
Second is what allows the Android apps to use the driver to communicate with the hardware. This is where the issues like GPSone rears its ugly head, as it seems each manufacturer likes to do it's own way, so unless you are basing things on the mfg's Android builds, it's almost impossible to get it to "talk" to the driver.
In the end, that's why builds based on official/leaked builds have a lot easier time gettin everthing working because both kernel and userland "bits" are there.
-- Starfox
Starfox said:
Android does not provide a "HAL" as in the Windows (NT) sense. Android is an operating environment running on the Linux kernel, and the programs (apps) running in Dalvik (Java-based).
The issue with CM/other generic AOSP-based build is twofold. First the driver to interface with the underlying has to be compiled into the Linux kernel. Luckily for most of us, the majority of smartphones are based on a few common chipsets (Qualcomm MSM etc.), so chances are you can find the source for a similar phone, and try to fiddle with the source to make it work. This also means that esoteric hardware (ie. WiMax) has a lot harder time getting the driver working.
Second is what allows the Android apps to use the driver to communicate with the hardware. This is where the issues like GPSone rears its ugly head, as it seems each manufacturer likes to do it's own way, so unless you are basing things on the mfg's Android builds, it's almost impossible to get it to "talk" to the driver.
In the end, that's why builds based on official/leaked builds have a lot easier time gettin everthing working because both kernel and userland "bits" are there.
-- Starfox
Click to expand...
Click to collapse
Ok so if I understood this properly :
Driver (which resides in kernel) services can be accessed by Dalvik.
And apps access services provided by Dalvik.
So in this case drivers for android would be developed in same fashion as for any other linux based system. Only requirement would be to check for manufacturer data sheet (if not source code) to tamper with.
Am I correct?
And is there a general development thread specifically for epic 4g?
Thanks
wis3m0nkey said:
Ok so if I understood this properly :
Driver (which resides in kernel) services can be accessed by Dalvik.
And apps access services provided by Dalvik.
So in this case drivers for android would be developed in same fashion as for any other linux based system. Only requirement would be to check for manufacturer data sheet (if not source code) to tamper with.
Am I correct?
And is there a general development thread specifically for epic 4g?
Thanks
Click to expand...
Click to collapse
The difficulty is that manufacturers don't seem to release data sheets for proprietary (customized by the manufacturer) hardware...
Sent from my SPH-D700 using XDA App
styles420 said:
The difficulty is that manufacturers don't seem to release data sheets for proprietary (customized by the manufacturer) hardware...
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
Aww man isn't it bad? I mean its same as what Apple tried doing with architecture specific Macs even Windows is trying with secure boot :-/ (But this is with phones compared to computers)
Why can't they just let devs work? I understand them having proprietary drivers but they should provide all required data to write one as well..
Well anyways I figure it won't matter even complaining about it. Anyways thanks guys I'll see if I can find any more info on manufacturer specific code.
wis3m0nkey said:
Aww man isn't it bad? I mean its same as what Apple tried doing with architecture specific Macs even Windows is trying with secure boot :-/ (But this is with phones compared to computers)
Why can't they just let devs work? I understand them having proprietary drivers but they should provide all required data to write one as well..
Well anyways I figure it won't matter even complaining about it. Anyways thanks guys I'll see if I can find any more info on manufacturer specific code.
Click to expand...
Click to collapse
This isn't a Mac vs PC thing.
This is a chip thing. Providing full disclosure of the register set makes some manufacturers nervous. Primarily because with some components, enough information needs to be provided such that you could potentially copy the device. Or at least features of it.
Qualcomm and Broadcom are very bad at this. They don't release anything unless it's under at least 5 NDAs.
I think u misunderstood me. I didn't say about mac vs pc. I was trying to give example about secure boot and macs rejecting to support all hardware.
Yes I understand chips can be duplicated but if its manufactured by samsung only then they shouldn't have problem
wis3m0nkey said:
I think u misunderstood me. I didn't say about mac vs pc. I was trying to give example about secure boot and macs rejecting to support all hardware.
Yes I understand chips can be duplicated but if its manufactured by samsung only then they shouldn't have problem
Click to expand...
Click to collapse
If it gets duplicated, it is no longer manufactured by Samsung only, and therefore is a problem.
Sent from my SPH-D700 using XDA App
seeing as android is a linux based operating system i dont understand why it wouldnt be possible to actually simply build the drivers from scratch. Ive done things like this for Wificards for my debian laptop as well as video drivers for intel chips that dont have linux based drivers. if they work the same way as the linux kernel does wouldn't it be logical to be able to do something similar?
metalblaster said:
seeing as android is a linux based operating system i dont understand why it wouldnt be possible to actually simply build the drivers from scratch. Ive done things like this for Wificards for my debian laptop as well as video drivers for intel chips that dont have linux based drivers. if they work the same way as the linux kernel does wouldn't it be logical to be able to do something similar?
Click to expand...
Click to collapse
It's the chip that is proprietary - those wifi cards use relatively well-documented chip sets, our phones do not. Unless you're aware of another device that uses the -exact- same chipset, with driver source code? (The question is rhetorical)
Feel free to guess at the unique opcodes and such, but trial and error will take a really long time
Sent from my SPH-D700 using XDA App
I'm glad to see some answers on this topic as I was curious about it as well. Can anyone comment on how past drivers have been hacked? E.g. how the Evo got Wimax working in cyanogen? Did they just trial and error the hell out of it until everything worked or did someone get inside information?
Some info
I'm pretty sure devs already have looked at it however anyone else who is wondering:
http://www.chipworks.com/en/technic.../teardown-of-the-samsung-epic-4g-smart-phone/
Samsung CMC730S WiMax baseband processor with SDRAM
That is wimax chip for epic 4g. I couldn't find more info that the chip itself, will report again if I come close to anything
So apparently Samsung SWC-E100 XOHM ExpressCard also uses same Wimax chip.
I'm checking if there are linux drivers available for the card.
http://www.wireless-driver.com/samsung-swc-e100-wimax-windows-driver-utility/
styles420 said:
It's the chip that is proprietary - those wifi cards use relatively well-documented chip sets, our phones do not. Unless you're aware of another device that uses the -exact- same chipset, with driver source code? (The question is rhetorical)
Feel free to guess at the unique opcodes and such, but trial and error will take a really long time
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
But the thing is that the samsung Galaxy S line of phones use what i can only imagine to be similar pieces of hardware. Wouldnt it make sense to be able to modify the drivers for say the fascinate`s camera or wifi for example to fit the epic. I know the keyboard isnt included in those phones but for the most part lines of phones tend to use similar if not the same hardware if they are made by the same companies. All it would take is to have the drivers for one or two of the phones in the same line and you would be able to practically guess the opcodes etc for the hardware signatures and make drivers accordingly. I mean a good example of this was when the fascinate drivers were used to boost our GPS or the fact that our CM7 is based off of the nexus S`version of CM7. It simply means that we have very similar if not the same hardware in most places. Now obviously if the phone is a random standalone piece with completely unique hardware then of course the drivers would be impossible to build with out the right specs and opcodes etc.
Actually on a side note, Ive been thinking about why the companies dont make a database for the drivers for each android phone effectively makeing each phone a nexus phone. It would allow for a version of android to be molded onto the phone with ease using a cookie cutter design making the creation of a newer phone easier and the support of older ones more feasible.
metalblaster said:
But the thing is that the samsung Galaxy S line of phones use what i can only imagine to be similar pieces of hardware. Wouldnt it make sense to be able to modify the drivers for say the fascinate`s camera or wifi for example to fit the epic. I know the keyboard isnt included in those phones but for the most part lines of phones tend to use similar if not the same hardware if they are made by the same companies. All it would take is to have the drivers for one or two of the phones in the same line and you would be able to practically guess the opcodes etc for the hardware signatures and make drivers accordingly. I mean a good example of this was when the fascinate drivers were used to boost our GPS or the fact that our CM7 is based off of the nexus S`version of CM7. It simply means that we have very similar if not the same hardware in most places. Now obviously if the phone is a random standalone piece with completely unique hardware then of course the drivers would be impossible to build with out the right specs and opcodes etc.
Actually on a side note, Ive been thinking about why the companies dont make a database for the drivers for each android phone effectively makeing each phone a nexus phone. It would allow for a version of android to be molded onto the phone with ease using a cookie cutter design making the creation of a newer phone easier and the support of older ones more feasible.
Click to expand...
Click to collapse
Well I guess sprint is only carrier using Wimax and above mentioned Wimax chips are only used in Epic. So to say this phone looks quite unique in that perspective though I think Nexus S 4G uses same chip, I couldn't find evident link pointing to it will report back as I do
rocket321 said:
I'm glad to see some answers on this topic as I was curious about it as well. Can anyone comment on how past drivers have been hacked? E.g. how the Evo got Wimax working in cyanogen? Did they just trial and error the hell out of it until everything worked or did someone get inside information?
Click to expand...
Click to collapse
I can't speak for the Evo Wimax people, but usually manufacturers that want to obscure their register set package up all the real meat in a userspace library, and distribute an open-source middleman kernel driver that basically relays commands through the middleman to the hardware (getting past the GPL).
Nvidia sorta does this, but they just link against the middleman directly and say F*** the GPL, even though it's still argued to be a violation.
Anyhow, for reverse-engineering, you can generally hack the middleman and record the 1's and 0's. Then you can attempt to decipher the data format based on what data changes, and the size of the frames. The stuff that doesn't change you can play back.
Of course, having any information about the device whatsoever helps a lot. I wouldn't be surprised if a hardware manual leaked for the Evo WiMax chip.
This is how a lot of the reverse-engineering was done on the HTC Vogue, the old device I developed for.
My life prevents me from helping at the moment, I hope to contribute on CM7 when things settle down.
jnadke said:
I can't speak for the Evo Wimax people, but usually manufacturers that want to obscure their register set package up all the real meat in a userspace library, and distribute an open-source middleman kernel driver that basically relays commands through the middleman to the hardware (getting past the GPL).
Nvidia sorta does this, but they just link against the middleman directly and say F*** the GPL, even though it's still argued to be a violation.
Anyhow, for reverse-engineering, you can generally hack the middleman and record the 1's and 0's. Then you can attempt to decipher the data format based on what data changes, and the size of the frames. The stuff that doesn't change you can play back.
Of course, having any information about the device whatsoever helps a lot. I wouldn't be surprised if a hardware manual leaked for the Evo WiMax chip.
This is how a lot of the reverse-engineering was done on the HTC Vogue, the old device I developed for.
My life prevents me from helping at the moment, I hope to contribute on CM7 when things settle down.
Click to expand...
Click to collapse
Thanks
However I don't understand most of it.
I've done until now is micro controller programming (say 8051 and similar)
Compiling kernel/FS for running on FPGA and few small boards, it was just compiling so I can set up tool chain and stuff but never actually developed / reverse engineered.
I would like to learn if u can point me to a good source.
wis3m0nkey said:
Thanks
However I don't understand most of it.
I've done until now is micro controller programming (say 8051 and similar)
Compiling kernel/FS for running on FPGA and few small boards, it was just compiling so I can set up tool chain and stuff but never actually developed / reverse engineered.
I would like to learn if u can point me to a good source.
Click to expand...
Click to collapse
Fortunately for you, the best book is free.
http://lwn.net/Kernel/LDD3/
Start with Chapter 1, I'd read all of that.
In general, I'd go through every chapter there and read the introductions. Stop once it gets to code. Those parts are irrelevant. The introductions alone are a powerful primer on how Operating Systems communicate with hardware.
Chapter 9: Communicating with Hardware is useful, since you're a hardware background.
Now, hacking android phones doesn't typically involve writing device drivers, but that book does a superb job outlining linux kernel interaction with hardware, which is the base of android. It is probably the quintessential book for anything Linux, and it's free!
jnadke said:
Fortunately for you, the best book is free.
http://lwn.net/Kernel/LDD3/
Start with Chapter 1, I'd read all of that.
In general, I'd go through every chapter there and read the introductions. Stop once it gets to code. Those parts are irrelevant. The introductions alone are a powerful primer on how Operating Systems communicate with hardware.
Chapter 9: Communicating with Hardware is useful, since you're a hardware background.
Now, hacking android phones doesn't typically involve writing device drivers, but that book does a superb job outlining linux kernel interaction with hardware, which is the base of android. It is probably the quintessential book for anything Linux, and it's free!
Click to expand...
Click to collapse
Awesome, thanks.
I'm not sure how much time it will take me but I'll try my best and probably will bother u some more

Flashing Linux on a phone

So, first of all, I'm not entirely sure if this thread belongs in this category, but since it's something pretty wide, I guess it wouldn't hurt.
So I'm looking into flashing Linux into a phone (an sgs2, more precisly). I'm not talking about chroots under android and etc, I'm talking about actually flashing grub, the kernel and every other files that would usually come with a desktop distro. I'm toying a bit with Gentoo, see if I can recompile the whole thing for ARM before probably ending up bricking my device.
Anyways, I want to know if anyone has every tried flashing the whole thing into a phone, be it android, windows phone, etc, and what would you guys think about it.
I'll be trying with an android phone, since it pretty much uses the linux kernel, and so drivers shouldn't be too much of a pain in the ass to recompile. Might also keep the original boot loader until I feel good enough about completely eradicating the base software that the hardware was designed for.
any thoughts/advices/insults/mind farts on the subject welcome
did you hear about Ubuntu for android project? it's based on GB 2.3.6 but ATM i think the project is stuck. you can see more information on Ubuntu page I'm subscribed to information about it 'cause I will love Ubuntu running on my S2 too. but I heard nothing about other available project from other people
Sent from my GT-I9100G
Great Question! that's something about which I am interested as well. However, I think you might try looking around the "Hardware Hacking" thread or post your question there maybe? I'd like to, but I can't...since I am a NOOB!
---------- Post added at 01:11 PM ---------- Previous post was at 12:30 PM ----------
crzr said:
did you hear about Ubuntu for android project? it's based on GB 2.3.6 but ATM i think the project is stuck. you can see more information on Ubuntu page I'm subscribed to information about it 'cause I will love Ubuntu running on my S2 too. but I heard nothing about other available project from other people
Sent from my GT-I9100G
Click to expand...
Click to collapse
Yea that's awesome, I think I saw a couple of videos on youtube with some guys showing Ubuntu running on their phone
I will do it. I will post if something new comes. But I am happy right now with ICS/JB roms. I'll wait for their Ubuntu for android release if they decide to make possible Ubuntu for android phones
Sent from my GT-I9100G
crzr said:
I will do it. I will post if something new comes. But I am happy right now with ICS/JB roms. I'll wait for their Ubuntu for android release if they decide to make possible Ubuntu for android phones
Sent from my GT-I9100G
Click to expand...
Click to collapse
yea, i think the OP had in mind to bypass android? perhaps? and to use the phone's hardware/kernel parameters in order to boot linux onto it
ilmostro7 said:
yea, i think the OP had in mind to bypass android? perhaps? and to use the phone's hardware/kernel parameters in order to boot linux onto it
Click to expand...
Click to collapse
Yeah, I meant getting ride of the underlaying OS and flash linux in place of it.
I think ubuntu uses chroot under android, I haven't seen anything about flashing it into the device.
What I have in mind is not just flashing it on android phones, but about any piece of hardware decent enough to run it (although the existing drivers on android phones would help).
Right now I'm toying a bit with the cross compiler, but I haven't really started any serious project about making it happen.
You can flash backtrack
Yea, that's why I suggested, initially, to take a look at the "Hardware Hacking" forum...otherwise, you can learn about Systems Programming --maybe a good start might be Programming Embedded Systems, 2nd Edition
With C and GNU Development Tools
By Michael Barr, Anthony Massa
Publisher: O'Reilly Media
Released: October 2006
Pages: 336
btw: sorry, I can't post links, but you can google on how to get started
also: HIT THE THANKS BUTTON IF I HELPED YOU, too
I've made several attempts at the chroot method of adding Linux to an android device with good results. My ultimate goal is to have my android device load and run Linux when i plug it into a docking station so i can use it as a computer. Back to the topic at hand, to add Linux as the native OS instead of android. I would start by building a root file system for android and attempt to copy it over the existing android rootfs. The process would be identical to building the chroot Linux rootfs. The next thing to do is to acquire the kernel source and re-compile it so you can have all of the modules / drivers you want. I would say that this would be standard and easy peasy stuff right up until you got to the X11 and video hardware acceleration.
If your going to try this, I would look for a device that has the following:
1) Kernel source available - make sure there are good instructions on how to configure and compile
2) Device is easily unlock-able and root-able
3) Has a micro SD card slot
So, first of all, I'm not entirely sure if this thread belongs in this category, but since it's something pretty wide, I guess it wouldn't hurt.
So I'm looking into flashing Linux into a phone (an sgs2, more precisly). I'm not talking about chroots under android and etc, I'm talking about actually flashing grub, the kernel and every other files that would usually come with a desktop distro. I'm toying a bit with Gentoo, see if I can recompile the whole thing for ARM before probably ending up bricking my device.
Anyways, I want to know if anyone has every tried flashing the whole thing into a phone, be it android, windows phone, etc, and what would you guys think about it.
I'll be trying with an android phone, since it pretty much uses the linux kernel, and so drivers shouldn't be too much of a pain in the ass to recompile. Might also keep the original boot loader until I feel good enough about completely eradicating the base software that the hardware was designed for.
any thoughts/advices/insults/mind farts on the subject welcome
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2162316 this can help you?
Sent from my GT-I9100G using xda app-developers app

Ubuntu as a Phone OS

Well, ubnuntu just made an annoucnement that they will have a mobile tablet and phone os, that will be matched with thier other versions so it is one os that will work on all your computing devices using all the same apps that you already run. They will also have the HTML 5 apps as part of this.
Just thought you guys might be interested.
I am very excited about this.
Sound off and let's discuss after you check out the video on the link below:
http://www.ubuntu.com/devices/phone
I see android becoming a GUI skin for Ubuntu. It's been nothing more than a matter of time before PC OS's merged with phone OS's . With some of the new hardware technologies almost ready for primetime our mobiles will take the place of PC/laptops in our lives. Desktops are evolving into more of a server role in the home. Appliances , home entertainment, environmental control will all be run from a central home super PC/server. The technology is out now but advances are coming that will make it more practical for the masses.
mtnlion said:
I see android becoming a GUI skin for Ubuntu. It's been nothing more than a matter of time before PC OS's merged with phone OS's . With some of the new hardware technologies almost ready for primetime our mobiles will take the place of PC/laptops in our lives. Desktops are evolving into more of a server role in the home. Appliances , home entertainment, environmental control will all be run from a central home super PC/server. The technology is out now but advances are coming that will make it more practical for the masses.
Click to expand...
Click to collapse
Actually it is the other way around.... in the video it was said that the ubuntu phone os will work with the android kernel, so it should work on any current android hardware, and should be very easy to implement it.
This is really because the android kernel is really the general linux 3.0 kernel.
I am going to work on getting this working on this phone, as soon they release the OS to everyone. I can see this taking this phone to where it should be as far as performance is concerned.
jimbridgman said:
Actually it is the other way around.... in the video it was said that the ubuntu phone os will work with the android kernel, so it should work on any current android hardware, and should be very easy to implement it.
This is really because the android kernel is really the general linux 3.0 kernel.
I am going to work on getting this working on this phone, as soon they release the OS to everyone. I can see this taking this phone to where it should be as far as performance is concerned.
Click to expand...
Click to collapse
You are saying You can boot this version of Ubuntu with our stock moto kernel?
mtnlion said:
You are saying You can boot this version of Ubuntu with our stock moto kernel?
Click to expand...
Click to collapse
Not sure yet, but from the video in the link I posted toward the end, it sure sounded like that was the case. I am sure some work will have to be done, but it sounded promising.
I'm most interested in seeing how this turns out when you unleash your kung fu on it. My nexus 4 should be here soon, after it arrives my A2 will be at your disposal for any alpha testing. Then again my A2 has always been available for testing anything you or certain other devs come up with.
This is super sexy. I cannot wait for this to come out. I have been using Linux, mainly Ubuntu off and on for years now. This just made my day. I love the GUI. I wonder... What type of bootloader this will use. Some modified versions of Lilo, or Grub?
Maribou said:
This is super sexy. I cannot wait for this to come out. I have been using Linux, mainly Ubuntu off and on for years now. This just made my day. I love the GUI. I wonder... What type of bootloader this will use. Some modified versions of Lilo, or Grub?
Click to expand...
Click to collapse
Prolly not going to be lilo, it has been a while since lilo was a default BL for linux. Grub, both in the the gui and text bootloaders has been the BL of choice for most linux distros for some time now.
I am guessing that if this works with the android kernel, that it might not use a separate BL for those devices, but I would guess that again grub would be on new devices that are made to run this by default.
I can see this taking this phone to where it should be as far as performance is concerned.
Click to expand...
Click to collapse
I'm curious as to why you say this. Is there any particular reason that performance would be better with Ubuntu over Android? If the kernel is the same, it would seem to me that the performance level achievable would be the same with either.
jimbridgman said:
Prolly not going to be lilo, it has been a while since lilo was a default BL for linux. Grub, both in the the gui and text bootloaders has been the BL of choice for most linux distros for some time now.
I am guessing that if this works with the android kernel, that it might not use a separate BL for those devices, but I would guess that again grub would be on new devices that are made to run this by default.
Click to expand...
Click to collapse
Cool.Since it is open source do you think the BL will be locked down? I'm actually kinda confused as to how this would work. Would we still have our locked down BL if we installed a port of the Ubuntu OS? Or would the Ubuntu OS totally replace everything?
It looks like the original phone this is made for is a galaxy Nexus, so.... We should be able to get this running on our A2 fairly easily.
http://www.engadget.com/2013/01/02/ubuntu-for-smartphones/
As to the person who asked about why I feel the performance will be better, is because of how linux itself and the apps that are used, use hardware, android itself does not handle apps talking to hardware very well, and tend to kill battery in the process much faster.
I run linux on a ton of my computers and devices, and I will tell you, I have a netbook running ubuntu and I get 13 hours on battery with it, where with any other OS I get maybe 6 hours. And yes it runs an atom processor, and I have been able to test running android on it, and ran very poorly as far as battery and performance was concerned, even with linaro running.
The ONLY reason we will not be able to run the true ubuntu kernel with this is thanks to motorola locking this thing down so tight that we can not run any other bootloader or kernel on this device.
Maribou said:
Cool.Since it is open source do you think the BL will be locked down? I'm actually kinda confused as to how this would work. Would we still have our locked down BL if we installed a port of the Ubuntu OS? Or would the Ubuntu OS totally replace everything?
Click to expand...
Click to collapse
Sorry to say for our phone, we will not be able to run the whole thing. We will have to keep our bootloader and kernel, but basically run this from our /system partition much like flashing a ROM.
jimbridgman said:
Sorry to say for our phone, we will not be able to run the whole thing. We will have to keep our bootloader and kernel, but basically run this from our /system partition much like flashing a ROM.
Click to expand...
Click to collapse
Thank you for clearing that up. I was thinking that was how it would be. I still can't wait to try this out!
This may be a dumb question.... but wasn't ubuntu designed to run on x86? How would it work on ARM?
Sent from my MB865 using xda app-developers app
farshad525hou said:
This may be a dumb question.... but wasn't ubuntu designed to run on x86? How would it work on ARM?
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
Ubuntu has come a long way. There are many different variations of it now. http://www.ubuntu.com/download/arm
WOW this is a real game changer here..... Have been thinking for a while what could be the next BIG thing looks like this is it..... Take a quad core with 2gb ram 32gb onboard and 32gb sd and this is going to be a beasted laptop in your pocket.....
Haha just read the other part of the page and it almost looks loke a direct quote.....
I don't know if I'm remembering correctly but wasn't Canonical working with Motorola on Ubuntu for Android? And wasn't even the phone they demoed it on in the video an Atrix 2?
They are obviously different projects as Ubuntu for Android was to allow the ability to boot into Ubuntu from inside android much like Jim's Webtop hack, but I just thought I should bring it up.
Generally speaking, I'm pretty excited about this too. I haven't been able to find any information on the ubuntu "dock ". Availability, price, inputs/outputs, etc. I think it will be awesome to have a dockable piece of hardware to run as a mobile or home device.
Sent from my MB865 using xda app-developers app
Oh wow this is gonna be just amazing a true Linux mobile os I for one can't wait to load an Ubuntu based ROM onto my a2
Sent from my Nexus 7 using xda app-developers app
This is going to be so awesome if it really works. I'm already setting up a dev environment to port it to my tablet, where it will really be awesome.
EDIT: PS will it be able to run normal andriod apps too?

Categories

Resources