yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] Nhexus:
Hello,

I would like to develop an application that makes use of the accelerometer sensor on an Android smartphone.

My app needs a measurement range of +-4g. I looked for accelerometer hardware specifications for various models and found that Nexus One mounts BMA150 by Bosch Sensortec, which supports three ranges (+-2g/+-4g/+-8g).

While browsing Android source code from Nexus One, looking for bma150 driver, I read this issue:

code.google.com/p/android/issues/detail?id=8143

I wish to modify the bma150 driver to set a default range of +-4g and then write a Java app to get and use data from the sensor. By the way, as far as I understand, the driver is actually not implemented at all. Or it is just not exported to the Java API? However, if it is not implemented at all, how can the OS change the screen orientation when the user rotates the device? And if it is not exported to the Java API, what would actually happen when an app tries to read data from the sensor?

Thank you for your help,

Nhexus
[Nexus One Android Development] SilentMobius:
Using the accelerometer is pretty easy from the SDK, just google for "android accelerometer" you'll get loads of examples, like:

http://stuffthathappens.com/blog/2009/03/15/android-accelerometer/

Note the "onAccuracyChanged" method, I think the ranges/accuracy depend on the magnitude of the forces currently applied.

Hope that helps.
[Nexus One Android Development] Nhexus:
Thanks for the answer. I'd already had a look at the Sensor API in Android.

I was trying to understand a bit more about the driver that actually stands behind the Java API. I thought that the measurement range could be set via software (maybe via i2c communication with the device) and that it is not dynamically adapted.

However, I'm not an expert in the Android Open Source Project, so I don't clearly understand the source code structure and design. Maybe someone with an in-depth knowledge of HAL and drivers could give me some hints.

Thank you again for you help!
[Droid Incredible General] rr12106:
Sorry for noob question (and PLEASE DONT FLAME ME BECAUSE OF THIS) but will roms/kernels for other devices work with the incredible? just wondering\

AND PLEASE, IF YOU THINK I AM A COMPLETE IDIOT FOR POSTING THIS THEN JUST KEEP IT TO YOURSELF
[Droid Incredible General] JustinD2473:
pretty sure they won't or people would be posting about which ones worked well and which ones didnt.

i think a rom has to have a certain amount of customization for the actual device it is going to be loaded on before it will work.
[Droid Incredible General] rr12106:
Thank you :)
[Droid Incredible General] grape ape:
How is your froyo port going to work if you didn't know this? Just wondering.
[Droid Incredible General] rr12106:
grape ape---i did know, just confirmiing
[Droid Incredible General] Captchunk:
No, if you try to flash a rom or kernel made for another device you can brick your phone.
[Droid Incredible General] TNS201:
Or get stuck in boot loops
[Droid Incredible General] CaptainTaco:
or explode in a ball of flame...

oh wait... that was mixing gasoline with new roms... and fire...

But yea, should probably avoid flashing roms for other devices without properly porting them.
[Droid Incredible General] hexto:
Never flash a ROM that was meant for another device. You risk not being able to use the phone again.

And if anyone were to flame you for posting this questions they'd take a lot of crap from a lot of people for being a douche.

Don't ever be afraid to post a question
[Droid Incredible General] elborak:
Usually this is true, but the OP knew he was risking flame because he's claimed in other threads to be an experienced in building ROMs and knew how to port Froyo to the Incredible.

That doesn't really mesh well with his noob question here.
[Droid Incredible General] Honestly77:
Reported. This again BELONGS IN GENERAL...man the second post in like 3 hours to be in the wrong section..
[Droid Incredible General] CaptainTaco:
However, he knows, as well as we, that he was over exaggerating on his original claims. We did encourage him to ask questions and learn, can't flame him for making an effort to go down the right path, ask questions, learn, experiment. I'd rather him ask questions, then post falsified claims of froyo builds etc. Much rather.
[Droid Incredible General] elborak:
True. Very true.
[Droid Incredible General] egzthunder1:
Thread moved to General.
[Droid Incredible General] compnird:
I've watched your posts, I know a few folks who are ambitious and think this whole "programming thing" is easy. I'll try to make this simple.

Think of it like this... I compiled an ultra small Kernel of Linux, I only compiled it for a specific computer so I built as much as I could for this specific computer into the kernel, AMD MP, Intel GPU and northbridge, USB 2.0... this way I didn't have to load Modules, it was part of the kernel.

When you install Unix, old school anyway, you are prompted for computer specs so it knows which pre-compiled kernel to select (AMD versus i586 versus i386... etc.) to run the best on your machine. These days it autodetects and makes it easy.

Android is a form of *nix so behaves the same... manufactures compile kernels specific to their devices so that they perform better.

Now, If I used an old Kernel that didn't support USB2 and only supported USB1 then I would be running slow at USB1 or would have to compile without USB at all and load a module that enabled support for USB2...

Android versions are being released with updated kernels for greater support of a wider variety of devices at the kernel level, less modules to load means a faster machine. Some functions still work better with poer saving setups as a module (802.11b/g/n for instance will almost always be a module).

"ROM" which means Read Only Memory are copies of modified kernels from the same device. If I copied the kernel from my machine to another it wouldn't work unless it was identical specs, even one item off and you get kernel dumps, it doesn't know how to talk to your hardware.

Get an idea of what is involved in compiling a kernel here: http://www.linuxforums.org/forum/linux-kernel/55612-mini-howto-compile-linux-kernel-2-6-a.html

I hope this helps you to see that even someone who knows BSD, Linux and Unix... with multiple certifications for Linux (and countless other platforms) and more than 20 years as an engineer... I won't touch making a ROM or trying to modify the bootloader. I wait for the people who know Android's OS, the way it's built, the way it functions... I allow these geniuses to build cool ROMs. I send them donations for their time as some have sent me donations on other forums for my time on other subjects.

It's not as easy as dropping "som 1337 romz" into some folder and presto, "i'z rokn FroYo homz"... it's so much more than that. Someone has to compile the kernel and get the hardware working... it's just easier to wait for the manufacturer to release an update and then find a way to gain root access to do what we want with it.
[Droid Incredible General] compnird:
Additional note:

Check the latest kernel version of Linux here: http://www.kernel.org/

Go into settings and see what version your Doid's Kernel is.

I am going on a limb here but I'm pretty sure there is a correlation.
[Droid Incredible General] ihtfp69:
LMAO!! Nice explanation, though.
[Droid Incredible General] rr12106:
Thanks...that helped alot
[HD2 General] newmoon1:
I'm trying to browse Arabic web site and all I get when display pages is square boxes where the arabic text should be

Solution please

Thanks
[HD2 General] samsamuel:
you maybe want to hook up with these guys.

http://xdaforums.com/group.php?groupid=225
[General Questions and Answers] amir.Touch HD:
Hi ihave one question:

would you please guide me .About pocket pc phones

is it better that they will be sharged when they are on in standby?

thank you for your answer.
[Droid Incredible Q&A, Help & Troubleshooting] wraithdu:
Is there a way to make a permanent change to the $PATH variable to place /system/xbin ahead of /system/bin? I found /init.rc when the phone is booted, but obviously I can't make changes to that yet. When booted into recovery, I can't find the same file to edit it. The /init.rc file is specific to the recovery image at that point.

Basically, I have busybox installed in /system/xbin and want it to override the /system/bin apps. I do not want to install busybox in /system/bin.

Any help would be appreciated. Thanks!
[Droid Incredible Q&A, Help & Troubleshooting] B-dub25:
are you trying to export a path? if so it would go something like

export PATH=$PATH /system/bin

or you can

PATH=$PATH /system/bin

export PATH
[Droid Incredible Q&A, Help & Troubleshooting] CaptainTaco:
He's trying to make it so he doesn't have to reset the $PATH variable every time. I'm assuming you are currently just using something like.

export PATH=/system/xbin:/sbin:/system/sbin:/system/bin

every time you enter shell. The way I would do it is by editing the init.rc as you stated, however it doesn't stick on the incredible, also as you stated.

The only thing I can recommend is making it a shorter PATH to type. You could just enter

export PATH=/system/xbin:$PATH

for example, and that would accomplish the same thing with less typing.

The only other way that I know of would be to make a start-up script, not sure how to accomplish this outside of init.rc however. In linux I would add it to the bash_profile or something similar. Not sure how to do it in android...
[Droid Incredible Q&A, Help & Troubleshooting] wraithdu:
Not only for shell, but I'd like to be able to do it for installed apps as well, such as OpenVPN. Ah well, just have to wait for full root unlock.
[Droid Incredible Q&A, Help & Troubleshooting] ihtfp69:
This is done in the ramdisk. You can actually do this yourself. You need to extract the boot image, break it apart into the ramdisk and kernel, alter the init.rc file, package it back up and then flash it back to your phone in recovery.

Even if we get the nand unlocked, you will still need to do this since the init.rc recreates itself from the ramdisk during each boot.

If you are using a custom ROM, just request the dev to do this.
[Droid Incredible Q&A, Help & Troubleshooting] CaptainTaco:
Thank you kindly, didn't know where those files were kept. Interesting how that works, so basically the phone works like a hardware chip, where the main parts of the OS recreate themselves from ROM, similar to firmware... I like it... prevents corruption I suppose.

Out of curiosity (I've never made a ROM, and therefor never packaged the boot image), is it packaged as a tarball? Or do you require ADB to extract? If you don't want to answer, I can probably track it down somewhere.
[Droid Incredible Q&A, Help & Troubleshooting] ihtfp69:
It's a bit more complicated than that. Take a look at this link. I'm sure there are other ways, but I would recommend only doing this in some flavor of Linux like Ubuntu.

HOWTO: Unpack, Edit, and Re-Pack Boot Images
[Droid Incredible Q&A, Help & Troubleshooting] CaptainTaco:
Cool link. Thanks.

But yea, pretty much seems to be that simple, Just a gzip (zip) and tarball (cpio). The only thing I wasn't expecting was stripping out the 2k header with a hex editor, but I think I'll try using the scripts found through that link to do that, not that I couldn't do it by hand... but I'm lazy...

Thanks again.
[Nexus One Q&A, Help & Troubleshooting] tanman1975:
Sorry meant N1. oops.

I'm new to VUZE and wonder if anyone has any tips on how to use it with N1 as there does not appear to be native Android support.

is iTunes with DoubleTwist my best bet?
[Hero, G2 Touch General] polakscot:
Just received update notification.. downloading now!

Checked and not yet listed on UK support site.

:D

Update

downloaded.. but failed install trying again

Update 2

Tried reinstallation.. unbranded unrooted hero.. now hung on installation screen :/

Update 3

Ok Installed.. be prepared for a long install.. 25mins at least with no action on the install bar.

However.. I am now up and running with 2.1 on my hero :D:D:D:D:D:
[Hero, G2 Touch General] Eddie1506:
This should be the WWE edition, finally :)

Can you write down the file name of the update?
[Hero, G2 Touch General] rhedgehog:
yep, mine's just popped up with it.....

http://liveimage.htc.com/OTA_Hero_HTC_WWE_3.32.405.1_R-2.73.405.93_releasephkp3wtd8ykg6hqk.zip

:-)
[Hero, G2 Touch General] bluesax:
It seems like it hangs but all you have to do is to wait...
[Hero, G2 Touch General] idroid84:
There is already a thread ** Official 2.1 UK UPDATE Thread ** .

Keep posts in the same area regards to this update then everyone can find it.

:D :D :D :D
[Android] kowalskii:
There are a lot of interesting devices showed up recently, which based on Qualcomm MSM 7227 processor ARMv6.

Its a cheep and very nice processor for its price, and i was going to buy cheep divice, based on it, but there is a question appeared:

Will Android 2.2 Froyo work on this MSM 7227 processor?

Or it will be working only on ARMv7 Snapdragon, Cortex A8 and later processors?

A saw info that froyo works exclusively on ARMv7 processors and better,

аnd will not support ARMv6. Is that true? Or normal/official support of ARMv6 will be added later?
[Android] MacaronyMax:
it should run on most proscesors it just will need to be tweaked a litle bit :D
[Android] Deathisfatal:
I don't see why it wouldn't - you might need to compile it yourself though, unless someone already has a rom out for the phone you want.
[Android] jznomoney:
Check out cyanogenmod.com
[EVO 4G Android Development] herzzreh:
Is there a way to get back to stock recovery from RA without using the original RUU?
[EVO 4G Android Development] joeykrim:
should be in the questions board.

yea, i havent done it but pretty sure my theory will work! not sure why you want to do this ...

you'll need some technical/advanced experience or an adventurous spirit to learn the commands! im gonna explain them here because you can use the search feature to find all sorts of explanations!

here are the steps (in my theory):

get a hold of the rom .zip from the .6 RUU. extract the recovery.img. put it on the sdcard

flash_image recovery /sdcard/recovery.img
[EVO 4G General] TheBiles:
0.56 inches versus the EVO's .5 inches. What are my fellow EVO owners' impressions on the Epic? The thickness was the only thing that caught my eye. I'm pretty leery when it comes to non-BlackBerry hardware keyboards.
[EVO 4G General] mrono:
I'm glad the evo is as thick as it is, any thinner and it would hurt my hand to hold it.

It looks like an interesting phone, reminds me too much of a PSP though. Though after having this big of a screen I don't think I could downsize.
[EVO 4G General] ramiss:
The Moment was only (an average of) 4mm bigger than the Hero in each dimension and yet the Moment felt like a brick compared to the Hero.

It is amazing what a few mm will do, and don't forget to compare the weight!
[EVO 4G General] Plancy:
Is this the "Galaxy S Pro" with a new name?

Will anyone be moving to this Samsung phone?

Do phones like these force you to use the physical keyboard?
[EVO 4G General] TheBiles:
Very true. The weights are:

EVO - 6 ounces

Epic - 5.46 ounces

:eek:
[EVO 4G General] appzattak:
I like that phone from what I read about it. I carry two phones, EVO and TP2, I think I will replace my TP2 for this one...out with WinMo for good:D
[EVO 4G General] Plancy:
Two phones!
[EVO 4G General] TheBiles:
Why exactly do you carry two phones? Corporate phone?
[EVO 4G General] engagedtosmile:
It is pretty thin due to AMOLED, impressive technology.
[EVO 4G General] ramiss:
Yes.

Not me, but that is a personal preference.

No, you are not forced to use it. If you don't slide open the keyboard then the on screen keyboard will show.
[EVO 4G General] Plancy:
Kind of like that idea, I like to see the screen sometimes when I'm messaging with someone.
[EVO 4G General] skoobz:
a lot of corporate management slugs carry 2 phones. i have a ****ty curve on a ****ty att network for business.

for pleasure, i have my sprint evo.
[EVO 4G General] Vdek:
4mm is a lot...
[EVO 4G General] mrono:
is it ribbed for your pleasure? lol

if i did a lot of corporate stuff I would want two different phones, seems easier to keep them separate.
[EVO 4G General] appzattak:
It's two fold, I own my own IT biz and I'm a phone junky. Oh and when the apple fan boys/girls ask me if I can use data and talk at the same time....I can answer I sure can....albiet with two phones..:cool:
[EVO 4G General] donatom3:
Yes this is the biggest reason for the fact that it is barely any thicker. AMOLED means they need no backlight and super amoled with the touch screen built right into the actual screen means it's even thinner than normal amoled. This should save about 3mm right there.
[EVO 4G General] TheBiles:
I had no idea what a difference AMOLED made. I wonder if they will have shortages like the Incredible. I'm guessing that it won't be as bad since the Epic is coming straight from Samsung.
[EVO 4G General] snowglyder:
Has anyone heard if there will be a $10 charge for the Epic too, since it has WiMax? I would imagine so. Not that I'm interested in getting it, just curious if anyone has heard anything for sure.
[EVO 4G General] Plancy:
There better be. Or not, I don't know if I want to switch. I think there is.
[EVO 4G General] pecosROB:
He's slangin' that crack rock!
[EVO 4G General] pecosROB:
BUUUUTTTT if you're using 4G with Sprint you CAN talk and look up stuff at the same time - at least that's what I thought I read.

4G uses WiMax for data and EV-DO for voice transmission, right?
[EVO 4G General] TheBiles:
I'm pretty sure that it will have it also. I see no reason why it wouldn't.
[EVO 4G General] Plancy:
Anyone know if the MicroSD slot is located under tha battery like the Evo?
[EVO 4G General] TheBiles:
Oh wow. This just makes Sense look like even more of a joke. :(
[EVO 4G General] ap3604:
Wowza! Really that thin? :eek:

The reason I haven't purchased the EVO yet is due to Sense UI blocking my wiimote from playing emulators...

But since this one has a Super AMOLED + physical keyboard then perhaps this might work...

Hope it doesn't have the $10/mo extra charge though ;)
[EVO 4G General] CarpeD1em500:
That looks .. worse that Sense in my opinion. It barely resembles Android. Also what was with the portrait keyboard being a numeric-esque keyboard and not a qwerty (did I see that right?)

Whoa whoa whoa, if I have a rooted Evo I can connect a wiimote and play snes on it?
[EVO 4G General] TheBiles:
Well, yeah. It actually LOOKS like a custom UI. It isn't just some redesigned launcher and a couple skinned apps. At least with Touchwiz the problems caused by having a custom UI are WORTH it. Sense is just an annoying addition that barely changes anything but screws up everything. As for the keyboard, there are a ton of keyboards that have the option to switch to a compact QWERTY or traditional mode. You can probably either change it in the options or press a button right on the keyboard.

Not if you have a ROM with Sense in it. There's some bug that screws up Bluetooth connectivity involved with the Wiimote. It just works in AOSP ROMs (not sure about other ROMs with UIs like MOTOBLUR).
[EVO 4G General] CarpeD1em500:
(a) Thats actually a really, really good point - didn't think of it that way at all. If Sense is just gonna look like Android why even bother - good point.

But I'd still stay clear of that touchwiz lol

and (b) Ah, damn. Well once someone gets a fresh Froyo build out thats completely stable (w/o Sense), I'll be on that, so I'll have to check out the wiimote option then. Thanks!!
[EVO 4G General] Aridon:
Regardless if what is on there it well get rooted and altered to whatever the user wants. Always a big plus. Sense is very over rated. For the lay user its fine but when you realize how much bloat and bastardized code is involved you realize how dreadful the implementation is.
[EVO 4G General] jayv1717:
Launcherpro is the best!!
[EVO 4G General] TheBiles:
Very true, but there's a little more to Sense UI than the launcher. ;)
[EVO 4G General] Minjin:
This is getting slightly off topic but is there a breakdown anywhere that I can read (or watch) that shows the differences between Sense and bare Android? This is my first Android phone so I have no idea what it "should" look like.

The features of that Samsung's UI do seem pretty awesome. But that's the whole point of Android isn't it? To have a base operating system that can be modified and added to by the phone manufacturers and carriers however much they want without needed to worry about engineering the core code.
[EVO 4G General] TheBiles:
You can check this out:

Some AOSP action on the Nexus One
[EVO 4G General] barbiedollish:
Seriously. I LOVE how they cleaned up Android. I really like the SMS friend widget and the SMS notification where you can reply straight from the notification bar, BUT it is still a Samsung device. They don't have the best track record for supporting their devices but hopefully this will change with the Galaxy S series.
[EVO 4G General] TheBiles:
I'm assuming it will since basically every carrier is going to have a Galaxy S device. They're going to have a LOT of pressure to push updates.
[EVO 4G General] MrDSL:
At least its not crippled..has anyone watch the video on this thing? It hammers through android like its a red headed step child. That's how our EVO should do it but HTC decided to cripple it..

2 days left before my 30 are up..pretty sure this baby is going back.
[EVO 4G General] Plancy:
From what I've been reading, it will not be release for a while so I'm not waiting for it, there will always be something better, ALWAYS. I'm happy with my Evo, coming from a Samsung flip phone M610.
[EVO 4G General] cosine83:
After having the Instinct and the Moment, I will never go back to Samsung for phones. They make great products, don't get me wrong. It's their support for their products after they've come out that's severely lacking. They release their products and pretty much don't do anything afterwards to fix things or do much of anything with them. They're more looking to their next release than keeping current products fixed and up to date. Samsung can screw off for all I care.
[EVO 4G General] sfox8:
that definitely looks awesome I have to admit. I really like the Swipe integration and the menus and animations look really nice. I just have to wonder how well it actually looks when using it on the phone (as far as choppiness goes with the hummingbird processor).

I really just can't get past that ugly wannabe-iphone homescreen/app menu though. Everything else looks beautiful (which is surprising considering Samsung's past TouchWiz efforts). And ultimately, I'm reminded that it's still a Samsung phone and their track record has yet to convince me that it's worth investing a year of my life in their (admittedly beautiful) custom UI. If it's not shipping with Froyo, will it get it in the near future? HTC is not much better but at least I know from experience that they do deliver and HTC and Sprint have confirmed that the update is being finalized. What about Gingerbread? Will it be updated when that comes around?

At this point, I'm really happy with my EVO and I wouldn't want to give up the benefits I get from the developer community behind it either. Until Samsung can prove that they will start supporting their devices better, I can't in good conscience give up my EVO for a Galaxy S device. I'll wait and see how things go and maybe a Galaxy S 2nd gen will be my next device when my update comes in November!

(or maybe the amazing developers here can get that Touchwiz UI onto the EVO! Something that beautiful on a device as beautiful as the EVO would be very interesting. though the processor may have a hard time)
[EVO 4G General] MrDSL:
True it may take sprint a bit to release it but the phone technically is already out..it's a Samsung s pretty much. Its not like its some some hardware better that wont be coming out for months.

True Samsung has sucked with support but there is going to be a variant of the device on all carriers so that's a good thing.