yashsingh1/xdaforums huggingface dataset:
[Defy Q&A, Help & Troubleshooting] aed0101:
Solution

I had this problem. Found a solution at 4pda.ru

1. Shut down your phone.

2. Hold Volume- button, press Power button for 2 seconds. Then release both.

3. When you see Android robot press together both Volume+ and Volume- buttons.

4. Erase both Cache and Data.

5. Reboot.

Your phone should boot normally.
[Defy Q&A, Help & Troubleshooting] anandcs:
This worked perfectly well. Thank you.

Andy
[Android Apps and Games] digitalspul:
Can anyone please upload the apk of Skygrid?

Much appreciated?
[Adam General] atultiwari:
Hey all

Yesterday i got the most awaited Adam.

first thing i did was to update it as mentioned in site notioninkfan site

but even after that i m facing problems like force close HomeScreen err.

also i dont have 3g sim card or wifi router at present.

so only option left for me is to use ad-hoc for which i wil have to root my adam.

I am n00b in rooting. i have read many posts present in this forum and in NIhacks but cant judge which one to use.

can anybody help me by posting a link to Stable rooting of Adam with Ad-hoc (and if possible using market).

Also, is there any way to Un-brick it again kindly let me know.

Sorry developers, i m not a tech guy so i cant experiment at present on adam.

please excuse me, this time.

Thanks

Regards,

Atul Tiwari
[Adam General] LeviathanPT:
Tutorial Guide to root here :

http://notioninkhacks.com/index.php...k-adam-update-root-market-adhoc-how-to-guide/

You also have info about how to unbrick it in the website above or the forums.
[Adam General] inspiron41:
First need to install the latest update from Notion Ink Adam. Which requires you go into quick flash mode. Or you can just hit Update in your setting menu. Or your adam could be already updated, but i would just flash it with the latest update.

go this xda-developer page:

http://xdaforums.com/showthread.php?t=942472

apply your specific update. You will need a MicroUSB To USB connector for your computer. Follow the instructions from NI carefully. Remember to hit Power Button + VOLUME DOWN to go into flash mode to enter ADB mode for your pc.

Once you get that done, head over to Notioninkhacks.com

then apply the hack: http://notioninkhacks.com/index.php/2011/02/05/updated-notion-ink-adam-update-root-market-adhoc-how-to-guide/

Unzip the folder and and transfer item to your root folder in your sdcard or sdcard2 and flash your Adam by hitting Power Button + VOLUME UP

Good Luck!
[Adam General] atultiwari:
Thank you all. (both of the reply and pm by Amon Darthir ) .

I have just rooted it. N finally i m able to run net by ad-hoc.

also the hanging prb is solved a bit.

one more question, is merely by using the latest update given by NI, can i save my warrenty? or by any means?

Thanks.

Regds,

Atul tiwari

Messaging from my Rooted Adam.
[Adam General] inspiron41:
just flash it with NI update and you should be set
[Legend General] and313:
Hey guys,

I was just thinking about that nasty little problem with cyanogenmod and our legends and since there was no meaningfull advencment, we could put some money on it. I think from 5 to 10€ for each doner would be enough or what do you think? Of course the developer has to give us an account to send the money to.

I would just like to use the FM radio and since it is working on desire for some time now, why not on legend.

So who is ready to do it?
[Legend General] ojessie:
would support that idea.
[Legend General] rajasyaitan:
It is already stated waaaaaaaaaaayyyy before. The FM radio WILL NOT WORK on the Legend because of it's alien architecture. Don't ask me, I don't know ****. But if you're do want to make a donation then you can donate to Ali Ba which has been the sole reason CM is running on the Legend.
[Legend General] lastOne:
This is a good idea.
[Legend General] and313:
here on this link http://forum.cyanogenmod.com/topic/8260-fm-radio-support-for-legend/ ale baba himself says it is possible but that he hasn't got the time for it. So it is possible we just need someone who will do it. But first of all we need more people.
[Legend General] mikereidis:
I'd consider doing development on this. I was wondering why there was no FM Radio app on CM7, LOL. :D

At the very least I can commit to finding all the info I can gather on this issue. I have no (satisfactory) employment at present and want to break into the Android specific field.

I have 14 years experience in embedded Linux development, including lots of low level kernel stuff. In a previous life (more decades ago than I dare admit) I did electronics engineering stuff, and I still love the low level nuts and bolts.

I'm pretty new to Android however, got my first cellphone (ever!) 17 days ago, first Android phone 15 days ago, and my Legend yesterday.

I think I can learn quick, I'm CM7 nightly, S-Off, new radio one day after getting it, LOL. :D

So my point is I, and this project, could use help in areas of Android specific knowledge.

Does anyone know if the normal FM radio app I've used before is proprietary Google code ?

Are there any generic FM radio apps that would work if standard drivers existed ?

My quick research on this is that only a driver might be needed. A V4L (video 4 linux) driver, which I have already had some experience with.

But there DOES seem to be a V4L driver already for Linux for the TI WL1273 chip apparently used in the Legend, and apparently a number of other phones. So in theory, this job might be as easy as integrating an already written driver in to the CM kernel, as a kernel module or 2. There MIGHT be some copyright issues with any chip firmware though.

Alas, some comments indicate using such a driver might interfere with Bluetooth functionality.

Interesting stuff about the 1273 chip is that it may support an FM transmitter, and it supposedly supports WiFi N. But who knows if needed hardware support might not be on the PCBs.
[Legend General] maxq1:
^ wow! where have you been all our android lives, bro? link on the post above yours answers some, if not of all, of your questions & covers a lot, i guess. cheers!
[Legend General] mikereidis:
:) Cheers...

I've been reading that there IS an FM Radio app integrated into CM now. It comes from MIUI, a chinese group of some sort that also makes an Android ROM.

The app apparently uses /dev/radio* which is the standard V4L radio interface. I have these also on my Hauuppage PVR boards I used for HTPC before I went completely digital for movies, tv, etc.

So yes, what we need is integration of a driver into CM kernel, but coding may be needed to fix bluetooth driver interference etc. And of course who knows what else might be needed.

I'm reading that FM is much more important to those without data to stream. Not all of us live in wireless data dense cities and countries.

Would be interesting to see what frequency range can be received and maybe transmitted.

Would be MOST cool to stream from video camera to transmitter for local "pirate TV" type functionality, LOL. ;) :D Actually can't imagine ATSC or even NTSC (or PAL etc.) encoding possible, but wireless streaming will do the job...
[Legend General] ojessie:
@mikereidis

Thanks for joining in, great highly appreciated. If there is any time left ;) it would be nice if you could look into the GPS problem with CM 7 it is currently not addressed.

Anyhow thanks for your participation and contribution.

BR, ojessie
[Legend General] qzem:
@mikereidis

So are you going to try and port it?? If you will and you'll succeded then you will be the legend in Legend community:)!
[Legend General] mikereidis:
I can keep my eyes and ears open to GPS, but best to concentrate on one issue at a time.

What is the GPS issue ? I thought it didn't work on my phone after new ROM but within a few hours it was working OK for whatever reason. And now I see 2 metre accuracy compared to the minimum of 5 on my Optimus Chic. :)
[Legend General] mikereidis:
I'll do whatever it takes.

The userspace FM Radio app shouldn't need any porting work AFAIK. It seems to already be in CM 6.1 ROMs for the Nexus One (any others?). So I'd guess installation would just need to be enabled for other phones.

The tricky part is getting a device driver working that creates a /dev/radio interface for the MUIU FM radio app to use. There IS already a Linux driver for the WL 1273 the Legend uses, but it might need some modifications to run on the Legend.

But there is some complicating factor regarding bluetooth drivers, so it may not be too straight forward. For initial testing at least the bluetooth drivers could be disabled.
[Legend General] ponchofiesta:
What about HTC's kernel source. As I told in cyanogenmod forum the drivers should already be in HTC's kernel source. If the code is there it should be easy to put it into CM7 kernel and use HTC's FM Radio app. Or what do you think?
[Legend General] ojessie:
Yeh, thats the problem. GPS is working on some devices and on others not and nobody knows why. As a matter of fact when I'm running CM 6.1 its working great. Flashing CM 7 no change to get it working. As mentioned others are reporting the same issue with CM 7 on some its working on others not.
[Legend General] mikereidis:
When I get tired of Google maps seeming to take forever to figure out my GPS location, I've downloaded and run the "GPS Test" and "GPS Status" apps. I did so and for some time the status color on one of those showed yellow, meaning no GPS fix, but power on.

Anyway sometime later it was working. One of those apps downloaded data to make cold starts work faster and that may have helped. A few things to try for anyone interested anyway.
[Legend General] mikereidis:
The problem with running the HTC FM radio app on CM is that it, like many other HTC apps, uses the HTC framework with Sense UI. So CM can't run it, although stock or modded Sense ROMs should be able to.

IMO right now the MIUI app is the way to go, and it's open source so anyone can modify/fork it.

Yeah I think a /dev/radio is likely in HTC source, but it's possible it's something different and/or kind of proprietary.

The Chip manufacturer, TI, and their partners who make RF modules based on the chips, DO have android /dev/radio drivers. So they are definitely out there somewhere.

I think, as usual that "In Theory" this should be a simple matter, in reality there is usually some problems to solve. Otherwise we'd have FM already in CM.
[Legend General] ali ba:
A few pointers:

TI 1273 has a few interfaces for communication. One of them being a (standard) serial via bluetooth, the other one I2C.

HTC did not use I2C because they already had to use the serial interface for bluetooth and it's a lot cheaper that way (that's what all manufacturers do, by the way). The wl1273 driver in the Linux kernel does have support for the FM capabilities, but unfortunately via I2C only.

So basically we already have all the drivers we need in place (tiwlan_drv, sdio), no kernel stuff needed. What's missing is valid documentation about how to enable radio, route it to the headphones, seek/tune, etc.

You could reverse engineer /system/bin/btipsd, which does bluetooth and FM communication in original HTC releases.

Once you are able to control FM stuff (with bluetooth turned on) write a nice summary and I'll ask cyanogen how to implement it. Won't be that hard, given the fact that currently all supported devices use the serial interface via bluetooth.
[Legend General] mikereidis:
Thanks ali ba ! Yes I know about cheap manus, I've worked for a few, LOL. Linux VOIP and security appliances mostly though.

By "The wl1273 driver in the Linux kernel" do you mean the TI provided W1273 driver in the CM7 ROM ? I had thought that driver was for WiFi only, or perhaps WiFi + Bluethooth. Or does my seeing an rfkill device mean FM radio is in there too ? Would it create a /dev/radio device ? There are some FM init BTS files that may enable FM.

My understanding is that the WL1273 WiFi driver in the mainline Linux kernel (not the Android kernel) is WiFi only. There's a guy from Nokia trying to get WL1273 FM radio only driver into main Linux kernel but not there yet. That driver will be separate from WiFi driver even though they may both have WL1273 in the name.

I've been finding some HCI commands usable with hcitool to do audio routing stuff at least. RevEng has been a specialty of mine, so I think if it can be done, I have a good chance.
[Legend General] mikereidis:
Quickest route to a working FM radio on Legend is to find an existing app for another phone that works.

Phones with the WL1271/1273/1281/1283 chips include original Moto Droid, Droid 2, Droid X, Motorai, Nokia N800 (or N900?), N8 (?), B&N Nook Color.

There's a thread here on XDA about Droid 2 phones using the Droid X FM radio app with success. I tried that app but there seems to be some problem launching the fmradioserver.

I saw a logcat message that may indicate I need to "adb install" the APKs instead of just copying them to /system/app. I tried but got the error that indicates the UID does not match the signature. I guess that's not an issue on Droid 2 (or motorola phones in general?)

Does anyone know if/how to mod/repack an APK to avoid the UID signature issue ?
[Legend General] mikereidis:
A few more of my findings for anyone interested. BTW should I or someone create a thread in the dev section at this point ?

As mentioned above a guy from Nokia is trying to get a V4L2/dev/radio driver for WL1273 into mainline Linux kernel. That driver could be integrated into our kernel, but it might take a bit of work. And as mentioned that driver is not in kernel yet and may have lots of changes still coming in the next several months at least.

But TI also has a driver, and it's meant for Android. I haven't been able to grab source code for that driver yet. I think TI driver references WL1283, the biggest baddest version with GPS too. But driver is supposed to work on all 4 variants, down to WL1271.

TI has a command line app for testing fm radio, I think called fmapp if memory serves. It's possible this test app could at least help with exploration.

Unlike the poor original Droid owners, we are lucky that we know our FM receive antenna is connected, since stock Legend has FM radio. But there seems to be a different pin for FM transmit so it's possible we will never be able to transmit FM more than a few inches. But Tx would just be a bonus, but a potentially wonderful bonus.

And, ya know, I'm not even sure if MIUI FM app works with /dev/radio. I was looking at some source and it seems to be hardcoded with Broadcom chip specific stuff.

Oh, and my understanding is that even if we ever managed to get Wireless N working (with a new or improved stack perhaps?), that it will likely kill batteries quickly enough to be effectively unusable. Would be interesting though.
[Legend General] qzem:
This is what I have found in datasheets about Bluetooth and FM radio, if it is any help.

Bluetooth and FM Operation Power Modes

The following Bluetooth and FM operation power modes are available:

• Shutdown mode: This mode is similar to WLAN Shutdown mode.

- Lowest power-consumption state of the device.

- Entered by driving BT_EN low (can alternately be left floating).

- Used when BT and FM functionalities are not required.

- The entire device, including the internal Power Management (PM), is switched off (only power-rails leakage path). There is no retention capability (to keep the memory voltage high enough to function).

- Power-up and full initialization is required in order to exit.

- Supplies (DC2DC and VIO) are not needed, but can be applied. Digital IOs are only defined if VIO is applied.

- Clocks (SCLK and FREF) are not required, but can be applied (as failsafe inputs).

• Bluetooth Deep Sleep mode:

- Low-power state of the device.

- Entered through a deep-sleep protocol with the host (HCILL).

- Used when FM-only functionality is needed or when BTH is in low-power mode (for example, scan/sniff intervals).

- Only the 32KHz portion of the device is active. The FREF cell is off. A fast clock is not required, but can be applied.

- Core (VDD) voltage is reduced to 0.9 V. The memories array (VDDAR) voltage is reduced to 1.05 V.

- All other PM modules are switched off, except for the KA LDOs and the DIGBGAP modules, which are in on/hibernate mode.

- Digital logic and memories are kept in a retention state, with no need for re-initialization.

• Bluetooth IP Active modes:

- Standby: When the ARM and all other peripherals are active, but the device is not transmitting or receiving. BT-IP (DRPb) PM is off.

- Idle (Big Sleep): The same as above, but the Advanced RISC Microprocessor (ARM) is idle

(clock is gated).

- Transmit mode: When BTH is transmitting. BT (DRPb) PM is entirely on.

- Receive mode: When BTH is receiving. BT (DRPb) PM is entirely on, except for CL1P5 LDO.

• FM IP Active modes:

- FM IP OFF/Reset: When Bluetooth is used and FM is not required (BT_EN=H).

- FM TX: When FM is transmitting. FM (AFE) PM is entirely on.

- FM RX: When FM is receiving. FM (AFE) PM is entirely on.

Tommorow I will dive into btipsd and see if I can find anything usefull.
[Legend General] ali ba:
Nope.

sdio.ko will enable you to use bluetooth and send serial commands to the FM part of the chip. You won't get /dev/radio because you will need to control FM via bluetooth.

They are loaded by btipsd as soon as you enable FM radio.

There's support for ti1273 radio in Linux (CONFIG_RADIO_WL1273, 2.7.37) but it's I2C only.

Hell yeah, then you are the man!

All the real work is done in the framework (C, C++), the app is not responsible for controlling the hardware.

That one doesn't compile on msm7k, it's for the OMAP platform. We never got it to compile, because it needs headers that HTC deliberately removed from their kernel sources. They are not released as GPL, so that's even legal.
[Legend General] qzem:
Ok what I did is I've opened btipsd in Ms Visual Studio first, and I found a lot of commands I've copied the ones that were obviously reffering to fm radio. They are in the attachment called FMRADIO. Then I've tried to examine btipsd with aplication RecStudio, which could be, as I found out, used for reverse engeneering. This aplication, gave me a view into Procedures, Symbols, Prototypes and Sections. I didn't realy know what should I search for, so I've tried with procedures and the one that I thought could be important is called BTL_BMG_RadioOffProcessorCb. I've also attached it. There are also a lot of symbols reffering to fm radio such as FM_RX_SM_CompareCmdTypes, etc. But unfortunatly I really don't know what I need to find, so someone else could try with mentioned tool, or some other tool and see if he could find anything usefull.
[Legend General] mikereidis:
Thanks qzem.

I think I'm darn close to getting FM audio out of this phone now.

I've found enough HCI commands to convince me the FM radio is working now. My only problem now, for a proof of concept, is somehow routing the audio out through the speaker or earphones. I might take a "break" however and see if the transmitter works... LOL. ;)

My apparent proof is that I tune to an unused frequency (for static AKA the big bang energy) and the RSSI goes up when I pull the earphones/antenna higher. I drop the antenna it goes lower. I remove the headphones it goes to around 0 or some negative numbers FFFF, FFFE etc.

It does almost the same when I tune to a local FM station, except the RSSI doesn't move much from low antenna to high antenna, but does drop when I remove the antenna.

So, I'm reasonably sure I just gotta route the audio somehow.

----------------------------

EDIT: Hmmm, maybe the earphones don't connect analog to the FM chip. Perhaps they are digital only as far as software and constants are concerned. That's how they get "normal" output... I bet...

Do I need an app to write the PCM (or whatever) data stream from the chip/I2S to the speakers or earphones ? Codec ? I'm using the default mode of 2 channel stereo w/ 16 bits per sample and 48 Khz sampling.

----------------------------

I won't explain the below, but for anyone interested who might want to experiment:

# FM_POWER_MODE: FM Core power up (0=down)

adb shell hcitool cmd 0x3f 0x137 0x01 0x01

# FM_WRITE: POWER_SET: POWER_SET_FM (|POWER_SET_RDS=3) , need twice ? error 3 first time

adb shell hcitool cmd 0x3f 0x135 0x20 0x02 0x00 0x00 0x01

sleep 10

adb shell hcitool cmd 0x3f 0x135 0x20 0x02 0x00 0x00 0x01

# FM_WRITE: AUDIO_ENABLE: AUDIO_ENABLE_ANALOG

adb shell hcitool cmd 0x3f 0x135 0x1d 0x02 0x00 0x00 0x02

# FM_WRITE: I2S_MODE_CONFIG_SET: AUDIO_ANALOG

adb shell hcitool cmd 0x3f 0x135 0x1f 0x02 0x00 0x00 0x01

# FM_READ: VOLUME

adb shell hcitool cmd 0x3f 0x133 0x1C 0x02 0x00

# FM_WRITE: VOLUME = maximum

adb shell hcitool cmd 0x3f 0x135 0x1C 0x02 0x00 0xff 0xff

# FM_WRITE: TUNER_MODE_SET, TUNER_MODE_STOP_SEARCH

adb shell hcitool cmd 0x3f 0x135 0x2d 0x02 0x00 0x00 0x00

# FM_WRITE: TUNER_MODE_SET, TUNER_MODE_PRESET

adb shell hcitool cmd 0x3f 0x135 0x2d 0x02 0x00 0x00 0x01

# FM_WRITE: BAND_SET, OTHER=0 : JAPAN=1

adb shell hcitool cmd 0x3f 0x135 0x10 0x02 0x00 0x00 0x00

# FM_WRITE: FREQ_SET, 88.5 MHZ : 20 steps up from 87.5 #0-410 for 87.5-108 MHZ (other=not japan), 50 khz steps

# 76-108, 76-90 japan, 87.5-108 other

adb shell hcitool cmd 0x3f 0x135 0x0a 0x02 0x00 0x00 0x14

# FM_READ: FREQ set doesn't stick ?

adb shell hcitool cmd 0x3f 0x133 0x0a 0x02 0x00

# FM_READ: RSSI getting FFFF now, sometimes fffe ? Static ?

adb shell hcitool cmd 0x3f 0x133 0x01 0x02 0x00

# WL1273_MOST_MODE_SET, WL1273_RX_MONO = 1/ WL1273_RX_STEREO = 0 (Reversed for Tx ???)

adb shell hcitool cmd 0x3f 0x135 0x0c 0x02 0x00 0x00 0x00
[Legend General] qzem:
Hm when you mentioned codec, I've remebered that I did come across one, when searching the net for TI WL1273 information. You can finde source code here. Maybe it will give you some ideas :).
[Legend General] mikereidis:
On a tip from pisaro I found a new trick in the puzzle of solving the audio routing problem:

adb shell 'echo "fm_headset" > /sys/class/htc_accessory/fm/flag'

Also "fm_speaker" works.

But no audio output yet. :( But I'm almost positive this will be solved.

Based on pisaro's comments, it seems the above is for an analog interface. It's for the HTC Tattoo but I'm guessing it would also work on the Legend

The command:

adb shell cat /sys/class/switch/h2w/state

nicely shows when the earphones are connected and also shows when fm_headset or fm_speaker are set.

As for Tx, no joy yet there either. I was hoping to detect a carrier, but nothing even within a few inches.
[Legend General] qzem:
Hey mike, here is the file you've been looking for (I've seen your post on tatoo forum) called FMInit_300. Ohw btw I've found out that Pulse mini has the same hardware as legend, and also FM radio, so maybe you can get something from their forum too.
[Legend General] ali ba:
All firmware files you could possibly need are in /system/etc/firmware.

To better know what's going on take a look at the original init.legend.rc:

service btips /system/bin/btipsd --logfile /data/btips/btips_log.txt -no_android_log
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
group bluetooth net_bt_admin misc
disabled # the MCP monitor service is responsible for bringing up the daemon
oneshot

Note the debug output being directed to "/data/btips/btips_log.txt". Removing "-no_android_log" could help getting more debug output.

Of course you can manually start btipsd and check the logs to see which firmware it loads. It's spitting out quite a lot of debug info.
[Legend General] qzem:
@mikereidis

Hey man, I hope you didn't give up already:rolleyes:!
[Legend General] norashers:
wow, that's a significant amount of posts!
[Legend General] qzem:
@mikereidis

Me again :D

XDA user eldis have started a thread in Motorola Dorid section about FM radio on this device a year ago. Here is the link. He posted, some links for Ti conectivity drivers and also link to TI's own FM radio test aplication. But as I can read all the stuff reffers to OMAP platform, so I don't know how usefull can this be. I just thought, that maybe you should check out.