[APP] FM Radio for the Droid 2!!

Search This thread

cybdroid

Member
Mar 27, 2011
5
0
I got all my files in /app, /bin, /lib exactly per Spitemare's settings, proper capilatization and permissions. Double verified in Droid Explorer. Net result, no joy, still "FM Radio is being launched, please wait..." forever.

Can anyone who has it actually working post up your ls -l for those 6 files? Thanks.


Also, I assume Fission and ApeX are not the roms that comes with the D2G right from Verizon? Does the Verzion rom have a nickname too?
 

ElectroGeek

Senior Member
Dec 12, 2010
68
9
I added the moto music app w/radio from fission rom manager. Everything seems to work except no sound... why would they put this add in frm if it doesn't work? Anyone have a link to documentation on this.

Sent from my D2G.
Rooted & running Fission ROM.
 

Darren VanBuren

New member
Feb 17, 2011
3
0
I'm also stuck at the loading notification, with the Droid 2 Global, stock Verizon ROM, GSM turned off in the settings (if that matters any). I have tried over and over, and even started fmradioserver in a shell, with no such luck.

However, I did find this in logcat:

Code:
04-09 23:47:04.322  7683  7683 D JAVA:FMRadioPlayerService: FMStateUNInit:powerOn(): Power on fmradio device
04-09 23:47:04.322  7675  7675 D FMRadioMain: enter updateListView()
04-09 23:47:04.322  7675  7675 D FMRadioMain: Enter getDataFromDB(), will update data in list_results
04-09 23:47:04.322  7675  7675 D FMDataProvider: set channel table: FM_Radio
04-09 23:47:04.330  7683  7683 D JAVA:FMRadioPlayerService: After fm radio power on
04-09 23:47:04.330  7683  7683 D JAVA:FMRadioPlayerService: fm radio power on fail

"fm radio power on fail" sounds very bad. I don't know why it would fail, I have all the libraries on my device, with the proper permissions, and the binary server is most definitely started.
 

pyro241

New member
Apr 17, 2011
2
0
Goose Creek, SC
I noticed this line in the logcat that may explain why it doesn't work in the D2G..
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: FMStateUNInit:powerOn(): Power on fmradio device
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: After fm radio power on
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: fm radio power on fail
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: onRebind() called
04-17 13:05:58.218 1267 2033 W ActivityManager: Unable to start service Intent { act=com.motorola.android.fmradio.FMRADIO_SERVICE }: not found

Now, if that service is discovered, we could possibly get a D2 user to copy the necessary files for us with D2G to enjoy FM radio...
 
Last edited:

Backdraft11

Member
Aug 21, 2010
48
0
So this function doesn't work on Fission ROM for the D2G?

Sucks to hear, have to choose between running this or getting rid of Motoblur.
 

darthmalak2

Member
Jan 2, 2011
20
1
hello to all

Why is giving me, "access denied" when i run he fm radio.bat ?

The debug mode is activated
And im using "massive storage" as usb connection, i dont have the option charge only/ pc mode

I have already rooted the phone with z4root, and i see the icon with the droid and a skull

here is me speaking in spanish asking for help in another forum too, maybe canoot understand me, but the options are in english, as well as the bat


PS: there is no access question to adb , maybe is for that?
 
Last edited:

DiRKiNg

Member
Apr 28, 2011
28
1
Plasencia
I noticed this line in the logcat that may explain why it doesn't work in the D2G..
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: FMStateUNInit:powerOn(): Power on fmradio device
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: After fm radio power on
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: fm radio power on fail
04-17 13:05:58.218 2164 2164 D JAVA:FMRadioPlayerService: onRebind() called
04-17 13:05:58.218 1267 2033 W ActivityManager: Unable to start service Intent { act=com.motorola.android.fmradio.FMRADIO_SERVICE }: not found

Now, if that service is discovered, we could possibly get a D2 user to copy the necessary files for us with D2G to enjoy FM radio...

Any news?

D2G owner
 

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
After a full year without a Droid * and scratching my head, I think I've finally cracked the Motorola FM secret.

I got a Droid X about a month ago and "unfortunately" it didn't have the problem. Only some do.

But recently I got a Verizon Droid 2 CDMA with the problem, and it's working now. I think it even improved reception on the Droid X.

The latest version of Spirit FM free is here: http://www.mediafire.com/?v369y5839c7dgoz

Give it SU or it will only be able to use the Motorola OEM API which may not exist or may not work well on many ROMs.

Menu->Settings->Audio->Method should get invisibly set to "Motorola" but you can try setting manually to that, or others, if you have no audio but see RSSI values over 10 at upper left.

Let me know. :)

Send me a debug log with Menu->Test->Email->Logs and after a few seconds. enter "Droid2" in the email text and press send.
 
  • Like
Reactions: jb789

jb789

Senior Member
Nov 6, 2009
393
87
Mmm... desiccant
That seems to be a dead link. :crying:
It is, but look at his signature...

Alternately, you could also try flashing the attached zip from recovery. It's essentially the Moto DX FM app made flashable & ported to the D2. It should work for recent CM7 D2 ROMs, say April 2012 or newer, but no guarantees. Will it work on older CM7, MIUI, other CM7 based ROMs, or similar devices (D2G, Milestone2)- maybe, try it & report back. Will it work on CM9- probably not, but I have no idea. You may also need to "force stop" it (or any D2 FM app) to avoid battery drain. As far as I'm aware, no D2 FM app provides speaker mode, or 2 channel audio. Spirit FM may conquer that someday, but don't count on it given the number of devices he supports. That said, if you want free & functional, try this. If you want guaranteed functionality, buy Spirit FM.

MD5- a7e0844cf43e2093d66bae5b4a78ebee
 

Attachments

  • D2_CM7GB_FM_NoSpeaker_RightOnly.zip
    644.5 KB · Views: 209
Last edited:
  • Like
Reactions: mikereidis

mikereidis

Inactive Recognized Developer
Jan 28, 2011
7,823
4,146
Ottawa/Gatineau, Canada
It is, but look at his signature...

Alternately, you could also try flashing the attached zip from recovery. It's essentially the Moto DX FM app made flashable & ported to the D2. It should work for recent CM7 D2 ROMs, say April 2012 or newer, but no guarantees. Will it work on older CM7, MIUI, other CM7 based ROMs, or similar devices (D2G, Milestone2)- maybe, try it & report back. Will it work on CM9- probably not, but I have no idea. You may also need to "force stop" it (or any D2 FM app) to avoid battery drain. As far as I'm aware, no D2 FM app provides speaker mode, or 2 channel audio. Spirit FM may conquer that someday, but don't count on it given the number of devices he supports. That said, if you want free & functional, try this. If you want guaranteed functionality, buy Spirit FM.

MD5- a7e0844cf43e2093d66bae5b4a78ebee

Great summary, thanks ! :)

Yes, see the top of post 1 for the latest Free version links: http://xdaforums.com/showthread.php?p=13379669


One funny thing is that the audio actually IS in stereo, from reports I've read. It's just that one channel is extremely low in volume. It might be fixable.

Motorola used the ancient OSS audio API it appears. I was getting close to tackling it, but "life and family time" are an issue and I'm pretty busy with the latest high end devices such as SGS3 and HTC OneX.

I even bought a Droid2 recently, but IMO when used Galaxy S's and Desire HDs can be bought for as low as $100 or so, then for many people it's become time to move on.

Not everyone can afford to move on of course. And there's that keyboard too...
 
  • Like
Reactions: jb789
Great summary, thanks ! :)

Yes, see the top of post 1 for the latest Free version links: http://xdaforums.com/showthread.php?p=13379669


One funny thing is that the audio actually IS in stereo, from reports I've read. It's just that one channel is extremely low in volume. It might be fixable.

Motorola used the ancient OSS audio API it appears. I was getting close to tackling it, but "life and family time" are an issue and I'm pretty busy with the latest high end devices such as SGS3 and HTC OneX.

I even bought a Droid2 recently, but IMO when used Galaxy S's and Desire HDs can be bought for as low as $100 or so, then for many people it's become time to move on.

Not everyone can afford to move on of course. And there's that keyboard too...

If I could afford to move on I would. Also like a kb and a removable battery. Think I will get that g2 off of CL soon.
Droid 2 is dead and if you are stupid, like me, unrootable.

Sent from my DROID2 using xda premium
 

jb789

Senior Member
Nov 6, 2009
393
87
Mmm... desiccant
...One funny thing is that the audio actually IS in stereo, from reports I've read. It's just that one channel is extremely low in volume. It might be fixable...

Not everyone can afford to move on of course. And there's that keyboard too...
I always enjoy reading your technical sleuthing, even if it is usually over my head. I'll certainly buy Spirit FM if you figure out FM stereo on the D2. I know that's hardly motivational, but think of the priceless satisfaction you'll feel. ;)
If I could afford to move on I would. Also like a kb and a removable battery. Think I will get that g2 off of CL soon.
Droid 2 is dead and if you are stupid, like me, unrootable...
I can afford to move on, but the D2 is just about the perfect form factor for me. There's the keyboard & removable battery as mentioned, and FM, plenty of horsepower, good stable ROMs, and it does everything I want/need it to.

Thankfully, there's even an SBF for the currently unrootable .621 update, so at least nobody's stuck with a brick (but I suspect you know that). There are some devs working on rooting it, and one just got his hands on a D2, so I bet they'll have something by the end of summer.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Instuctions to get FM Radio on Droid2

    1. Droid2 must be rooted. Remount the /system to RW

    2. Unzip the archive, and use abd push to put the files in the appropriate folders.
    cd system

    a. adb push app/FMRadio.apk /system/app
    b. adb push app/FMRadioService.apk /system/app
    c. adb push bin/fmradioserver /system/bin
    d. adb push lib/libFMRadio.so /system/lib
    e. adb push lib/libfmradio_jni.so /system/lib
    f. adb push lib/libfmradioplayer.so /system/lib

    3. Remount /system to ro
    4. Plug in headphones.
    5. Run FMradio
    6 ???
    7. Profit!

    For me, I live in a crappy radio area, so I was only able to pick up 2 stations. YMMV.

    As always I will not be responsible for any damage, pregnancies, or missing items from your home.

    Thanks!

    Slayher
    1
    Forgot the Link

    Forgot the link..
    LINKS! URL -> android.antbox.org/slayher/FMRadio_droid2.zip
    1
    I'm going to do some more digging about the Droid 1; if it uses the same Broadcom chip as the others - the HTC Desire has been FM-radioed, too - it's not at all impossible. But there doesn't seem to be a consensus yet regarding which chip it has.
    A little research shows that although the Droid 1 has the necessary wireless chip, there is no physical connection to the headphone port, so it can't generate sound and doesn't have an antenna, making it, you know, not that useful. So for the Droid 1, possibly a lost cause, unless my sources are incorrect, which I really hope they are! ;)

    These chips apparently can transmit FM, as well. Seriously, why don't these phones include these features? These seem like pretty killer features; are they really not worth the extra work to enable, connect, and code for?
    1
    Here's another way w/out SDK, and full instructions

    Install/setup FM Radio on Droid2 (most info from orignal post by Slayher, 08/31/10)

    I did this on a Droid 2, FRG22d (new VZW stock phone, which I rooted)
    I added step by step instructions for those not as familiar with Linux systems and the mount and filesysetm permission commands.
    I did this almost completely on my droid 2 via the built-in terminal emulator after copying the necessary files to the sdcard, this is how my instructions are setup, but you could also use the SDK and push the files manually as long as you have root access to the SDK shell program on your droid. The root access is required because you need to manually change permissions on several files. Do this at your own risk, the only way I figure you could mess up is if you miss-type the mounting commands, or have some sort of power failure in the middle of it.

    First go here >> android.antbox.org/slayher/FMRadio_droid2.zip
    Grab the file and unzip it on your computer. Your Droid 2 has the built-in radio hardware, I have no idea why they don’t send it with the software to run it (probably just a selling point for other models). When you unzip the file you should have 3 directories: /app, /bin, and /lib.
    Then put the files on your SD card, I did this in USB card-reader mode and put all three folders in a directory I called “fmradio”. These instructions assume you have the same directory on your sdcard.
    Open the terminal emulator program on your droid 2 and type these commands carefully, you will first see the prompt $. There are faster ways to do this, but these commands are safer and harder to mess up.


    su (this will bring up the # prompt with root access)
    cd /sdcard/fmradio/app
    cp fmradioservice.apk /system/app (copy files to the android sysetm directory)
    cp fmradio.apk /system/app
    cd /sdcard/fmradio/bin
    cp fmradioserver /system/bin
    mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system (mount rw for permissions)
    chmod 0755 fmradioserver
    cd /sdcard/fmradio/lib
    cp libfmradio.so /system/lib
    cp libfmradio_jni.so /system /lib (that is a j in the filename after libfmradio_)
    cp libfmradioplayer.so /system/lib
    cd /system/lib
    chmod 0644 libfmradio.so
    chmod 0644 libfmradio_jni.so
    chmod 0644 libfmradioplayer.so
    mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system (remount back to ro)
    exit
    exit

    Has a nice interface, and will scan and store stations, also reads the text ID for the stations. Works great in the Seattle area.

    Michael
    1
    To help clear up and consolidate information:

    Permissions
    Permission in *nix, which included Android, work like so. Every file recognizes three boundaries: user, group, others. When doing a long listing of a file (ls -l) the first set of information displays permission. For example
    Code:
    -rwxr-xr-x
    The line above should be read in four parts.
    • The first dash indicates whether a file is a directory or no. If it's a 'd' then the file is a directory; a dash (-) means it's just a file.
    • The next three spots (2, 3, 4) indicate the permissions for the user, i.e. the owner of the file.
    • The next three spots (5, 6, 7) indicate the permissions for the group; each file has a group and each user can be part of multiple groups.
    • The last three spots (8, 9, 10) indicate the permissions for everyone else; if you're not the file's owner or part of its group these are the permissions you get.
    r means you can read the file. w means you can write to the file. x means you can execute the file or move into that directory.

    So what's up with the numbers like 644 in the commands listed in other posts? The chmod command changes the permissions of a file; it takes the intended permissions as a group of three octals. Each digit is an octal number that corresponds to a certain mixture of permissions. To decode a chmod argument like 644 let's break it down:

    • Each number in 644 corresponds to one of the same three groups above: user, group, others.
    • The order is the same as in the long listing: 6 = user, 4 = group, 4 = others.
    • To figure out how a single number translates into the three permissions (read, write, execute) you have to look at each permission in binary. This is a little complex so bear with me:
      1. Start with 0.
      2. If execute is on add 1.
      3. If write is on add 2.
      4. If read is on add 4.
      5. Using these rules you will result in some number between 0 and 7 (hence the octal part). A value of 6 can only be created by turning on write and read. A value of 5 would be read and execute.
    • If you do this for each digit in the argument you can determine just what permissions the file should have. 644 means the user has read and write, group has read, and others have read. 755 means the user has read, write, and execute; user has read and execute; and others have read and execute.

    For FM Radio specifically only bin/fmradioserver should have execute permissions. Write permissions on each file should be given solely to user. Read permissions should be granted to user, group, and others.

    It breaks down as thus:
    app/FMRadio.apk -rw-r--r-- (chmod 644)
    app/FMRadioService.apk -rw-r--r-- (chmod 644)
    bin/fmradioserver -rwx-r-x-r-x (chmod 755)
    lib/libfmradio_jni.so -rw-r--r-- (chmod 644)
    lib/libfmradioplayer.so -rw-r--r-- (chmod 644)
    lib/libFMRadio.so -rw-r--r-- (chmod 644)

    Capitalization is important. *nix systems are case sensitive when it comes to file names.

    Fission ROM
    This just won't work on Fission. There's probably some library Fission isn't including that the service expects. Fission does delete a lot of stuff when you install it so I assume something in there is needed.