yashsingh1/xdaforums huggingface dataset:
[Hero CDMA Android Development] gthing:
Okay I think I have some insight into the SMS send issues. If you're consistently unable to send SMS messages and you've already tried flashing RUU, wiping the device, and reflashing 1.6 AOSP, this is for you.

I have been running 1.6 for several weeks without any issues. The other day I received an Airave (femtocell) from Sprint because of shoddy coverage in my new apartment. As soon as I had coverage from the Airave I lost the ability to send SMS.

As soon as I left the Airave coverage I was able to send SMS once again. The problem was reproducible 100% of the time when I was in coverage of the Airave.

I also tested the RUU rom and Fresh 1.0 and 1.1 which did not have any problems sending SMS over the Airave.

You can check to see if you are within Airave coverage by dialing *99. If you are, a voice will repeat "You are now within airave coverage" over and over.

My conclusion is that the SMS issues has as much or more to do with the cell towers than it does with the phone. The radio that comes with 1.6 (or some aspect of the software) is incompatible with some towers. I don't know if it's just airave/femtocell or maybe towers that do not support EVDO or lack some other software or hardware feature.

Would love to hear your thoughts. For now I'm back on Fresh 1.1 until some more of these issues get sorted out.

Edit: If you're having problems - try again somewhere far enough away to be on a different tower and report back if that helps. Or dial *99 to see if maybe you're on your neighbor's femtocell.
[Hero CDMA Android Development] skola28:
I'll try this out tonight on my AiRave...
[Hero CDMA Android Development] Is_907:
This worked perfectly for me. Could probably just do this from Terminal Emulator if you're out and about.

Any developers know if this will help us permanently fix the dropping data problem?
[Hero CDMA Android Development] 27s:
You might be on to something with the towers Idea. I have been running 1.6 for a week or so, (switching back and forth with 2.0.1) and different parts of my city give me different results. When I do a running logcat of differnt places in town, it seems as though the sms's are not even hitting the phone. As for a work around? Beats me. It is quite odd to be honest, becuase 2.0.1 works 100% all of the time.
[Hero CDMA Android Development] 5tr4t4:
Script

Yep, you'll need "su", obviously.

su -c "echo -n 'up:0 ' > /dev/qmi0"

The command is a little awkward to type this with the onscreen keyboard, lots of switching ABC/123 modes to get everything. So, being lazy I wrote myself a quick little shell script, with a shorter name. I called it simply "evdo", and all it does is run the above command.

unzip evdo.zip
adb push evdo /system/xbin/

(could also go in /system/sbin/ too if you don't have xbin/busybox setup)

Then just run "evdo" in any Terminal emulator on the phone. Note that the script requires root and will prompt you to allow su privileges, just like wifi-tether or other apps.
[Hero CDMA Android Development] Is_907:
You read my mind. This is what I was planning to do today ;)
[Hero CDMA Android Development] sleejay:
im in the middle of trying to write a widget that does this.

anyone know how to access the filesystem (aka run shell commands) from an APK?
[Hero CDMA Android Development] gbhil:
Rewrite that script so that it runs every X number of seconds and checks the contents of /dev/qmi0. If it's not 0 then echo it in. Keep it a simple sh script and it will work.

I'll whip up a new boot image that runs it as a service so it's automagic and post it. I've got the boot image torn down here anyway looking at the BT services so it won't be much effort at all.

Google ASE. It is a prebuilt that runs any shell command and lets you add a link to the script as a shortcut on the desktop
[Hero CDMA Android Development] 5tr4t4:
I am happy to do this but honestly, I'd like to know a little bit more about /dev/qm[0-1]. In my very quick testing it didn't seem to matter what value I wrote to "up:" Even leaving the echo entry totally blank has the same effect...although it seemed to matter that there were 2 spaces between the quotes:

echo -n ' ' > /dev/qmi0

(works too)

It's as if this device just needs a wake-up "ping". Is this stuff documented anywhere or are we at too low a level and should be looking at the API for a higher level action?

P.S. Does Android have cron? I'll look...
[Hero CDMA Android Development] 5tr4t4:
evdo as service

OK, here's a version that runs every 20 seconds, it's the same command in a never ending while loop:

while [ 1 ];
do
su -c "echo -n 'up:0 ' > /dev/qmi0" ;
sleep 20;
done

This is now, essentially, a "service" without a proper shutdown. Keep in mind that this is a kludge and may have other effects I'm not aware of. That said, it works really well, you can turn on Wifi, etc, and within a second or two after wifi shutdown, the data connections comes right back up!
[Hero CDMA Android Development] Agimax:
How will this affect battery life?
[Hero CDMA Android Development] gbhil:
LOL. Beats me. I don't think too many people know EXACTLY how Android does low level functions like radio init etc. We're all assuming it's done the *nix way, and most times we're lucky :)

I'll plop that script in, rebuild and sign a new boot.img zip and make sure it doesn't loop. Gimme a bit and I'll post a link. Even a kludge is better than rebooting to restore the evdo radio functions IMO
[Hero CDMA Android Development] gbhil:
No go. Service starts and runs as expected, but it crashes WiFi when trying to start it with the incredibly descriptive error:

E/WifiService( 72): Failed to start Wi-Fi
E/WifiService( 72): Failed to load Wi-Fi driver

Tried with stock kernel and wlan driver, as well as mine and Modaco.

Looks like more info is going to be needed about the psuedo files in /dev if we try this route.

On the plus side your stand alone script (not the loop) works perfectly. I went ahead and pasted it as an ASE script, plopped a shortcut on the homescreen and toggled wifi/airplane mode and every time your script pulled evdo data back up within 10-15 seconds.
[Hero CDMA Android Development] 5tr4t4:
Well, it was worth a shot, gbhil. It would be nice to nail this down but even this hack does away with the only reason I wasn't using AOSP 1.6 daily.

I'm reading now about ASE scripts, thanks for mentioning it. I had no idea that was there, very cool.

@Agimax

I have no idea about battery yet, I can't imagine it's heavy use.
[Hero CDMA Android Development] gbhil:
Agree. Not like it was hard to try lol.

I've put out a couple feelers to see if i can't find someone who might know how/why Android writes network info to the fs. If I get any info I'll certainly share, seems like even if this gets magically fixed you would like to know as well. I know I sure would.
[Hero CDMA Android Development] quietcblongs:
Long time no see folks.

The data re-connect problem is really in libhtc_ril, because the stuff that I'm doing during startup is supposed to be done by the RIL when starting up the data connection (you can see this by doing a strace in a 1.5 HEROC ROM).

To do a "proper" work-around for re-connecting data, involve writing a small C module, called through JNI when doing a data connect. The C module would basically set a system property that starts the one-shot service that echo's the magic words to /dev/qmi0. This is the Android-proper way. This is kinda how the Bluetooth settings start the service it needs, by using JNI to call a C++ method, which calls a method in a C module, that start/stops the system service. Basically, when you enable/disable Bluetooth, it fires an event that the system_server listens to, and then it starts/stops the service:

bt_enable in bluetooth.c: http://android.git.kernel.org/?p=pl...e75ab0825f5a7ee43ba7826396097399;hb=HEAD#l181

called from android_server_BluetoothService.cpp:

http://android.git.kernel.org/?p=pl.../jni/android_server_BluetoothService.cpp#l410

called from BluetoothService.java:

http://android.git.kernel.org/?p=pl...ava/android/server/BluetoothService.java#l397

Now that we're talking about Bluetooth, I've gotten far enough to turn it on and pair, but the audio routing is hozed, so you don't hear anything through the BT headset or hands-free-kit.
[Hero CDMA Android Development] gu1dry:
Awesome! Thanks for the update quiet. So much closer to a fully functioning base to start playing with :D

Any ideas on what could causing the issue for some with the SMS?
[Hero CDMA Android Development] makamobile:
im lost how i can load evdo_service.zip on my phone?

can i have a noob step by step?
[Hero CDMA Android Development] 5tr4t4:
Download evdo_service.zip from post #514.

unzip evdo_service.zip

chmod a+x evdo

This second step gives the script executable permissions so it can be run on the phone like an ordinary program.

adb remount

adb push evdo /system/xbin/

Finally, on the phone itself open a Terminal Emulator...AOSP has one in "Dev Tools" (in your apps tray), scroll all the way to the bottom. At the prompt just type "evdo &".

The "&" is extra/optional, gives you your terminal prompt back since evdo is a never ending loop and will just "hang" there. If you're lazy, just type "evdo" and then close the Terminal emulator.

Right now this will not survive a reboot. You'll have to run "evdo &" again.
[Hero CDMA Android Development] 5tr4t4:
Many thanks for the explanation, quietcblongs, and thank you for your excellent work on AOSP generally! This is now my daily ROM with a few add-ons from gbhil's excellent work.

<rant>

It's frustrating to see how much power the manufacturers have in Android. Their proprietary code (obviously necessary to talk to our hardware) ends up undermining development. Why can't I build AOSP from this morning's git, build a .29 msm kernel with my phone's config, add the proprietary bits, sign, and flash to my phone? Answer: HTC closed code and version-specific binary blobs.

My thought getting into Android development was to setup an "AOSP nightly/weekly builds" server so we could test the latest stuff, make modifications, give other ROM devs a core to build upon, etc. Open source should allow for this. Instead we're stuck "hacking" one bit at a time, pushing voodoo instructions to pseudo devices.

</rant>
[Hero CDMA Android Development] sleejay:
APK To Fix EVDO Problem on AOSP 1.6

finished an APK to fix evdo problem. not trying to threadjack, so here is its own thread:

http://xdaforums.com/showthread.php?t=633073
[Hero CDMA Android Development] rustyman14:
I've been using ASOP 1.6 for about a month now and the only SMS problem ive seemed to have is with people with verizon and that have the eris! I seem to be fine with other networks and other phones that are on verizon.. I have 2 friends with eris's and they get all my text messages but i dont get all theres.. Has anyone else had this problem??
[Hero CDMA Android Development] ldleblanc:
Bluetooth update give me a tingly feeling in my pants. If you get that working I will be all over this sucker (again). I had to switch back to fresh just for bluetooth connection to my gps and music over my car stereo.
[Hero CDMA Android Development] gbhil:
Thanks for the update and answering a few questions quiet.

All i can get out of BT is pairing then complete system crash followed by a boot loop, but I'm just trying to call and start the service as built. Glad you seem to be making progress on it :)
[Hero CDMA Android Development] skola28:
I can confirm that my SMS stops working when on my AiRave. SMS's send, (or so my phone says) but no one gets them. Interestingly enough, one of the attempts apparently thought the recipient was a Land Line and sent some sort of electronic message to the landline via 'Sprints Text to Landline Service'.
[Hero CDMA Android Development] mrinehart93:
So it must be the towers then. I might possibly be getting a new Hero tomorrow, so I will be able to test and confirm that (my Hero right now doesn't send SMS).
[Hero CDMA Android Development] 5tr4t4:
Looks great, sleejay! Downloading now. Thanks and looking forward to the widget version.
[Hero CDMA Android Development] bikcmp:
LOL this thread is *dead* with 2.1 coming out!
[Hero CDMA Android Development] thedudejdog:
I'm running it, awesome rom been running it daily for 2 weeks.

this thread is dead because there are no problems with this rom. lol
[Hero CDMA Android Development] toastcfh:
yes quietcblongs is the ****. i hope to see his return soon
[Hero CDMA Android Development] darchstar:
+1 to both of these comments, if this just didn't give me damn issues with sms, this would've been my daily rom back in january
[Hero CDMA Android Development] 5tr4t4:
I second that. This (or gbhil's 1.6 based on this) was my daily ROM, for weeks. I sincerely hope that AOSP development generally will continue beyond the office 2.1 release.
[Hero CDMA Android Development] darchstar:
Ya, it hasn't stopped, it has just faced an obstacle with camera, seeing as how the newer .29 kernel handles MT in a different way than aosp would like. once htc releases the source to this .29 kernel than i'm sure it'll be back on track
[Hero CDMA Android Development] gu1dry:
Ya was running a Sense 2.1 ROM & now back on AOSP1.6. Really missed the speed & battery life from AOSP1.6 when on a Sense ROM & I'm can't wait for AOSP2.1 to be mostly functioning on the .29 kernel.
[Hero CDMA Android Development] AndroBoy823:
G Apps Fix

I Have A Gapps.zip package on my sd card and it seems to work....i will flash then try to install and see if the gmail and other google apps work...it should

...but if it dont i will also let you know what the error says and if there is a solution i can find to fix that
[Hero CDMA Android Development] il Duce:
you fail. where exactly did you think you were posting this? by chance did you notice this is a 1.6 rom, who's last post was march 2010? lmao, FAIL.
[Hero CDMA Android Development] TheBiles:
Posting from the dead.
[Hero CDMA Android Development] danibri82:
dude, i want android pre 1.0 beta on my phone.
[Hero CDMA Android Development] gidkid:
I remember this ROM... Lol. This ran pretty stable, but I remember hating the fact that I had to push menu to unlock the phone, rather than dragging something...

Ah, those were the good old days...
[Hero CDMA Android Development] TheBiles:
I used this ROM because 1.5 didn't have Google Maps Navigation.
[Hero CDMA Android Development] justinisyoung:
hey... you mind packing up the googlebits up into a zip?

:D haha good work though! i tried this rom but i couldn't get gbits working, how'd you do it?
[Hero CDMA Android Development] gu1dry:
Ya I can zip & upload all the files I used tonight after I get off of work.
[Hero CDMA Android Development] gu1dry:
Discussion of Googlebits on AOSP 1.6 has been moved to here to keep the AOSP 1.6 development separate from the Googlebits.
[Hero CDMA Android Development] jerrygon:
Do the protected apps in the market place show up with this rom??

Thanks!
[Hero CDMA Android Development] gu1dry:
This ROM doesn't include any of the Googlebits, which means the Market is not installed. Now there is a thread about the Googlebits on AOSP 1.6, which would be a place to ask that.
[Hero CDMA Android Development] incogneato:
In this ROM? No. This ROM is a proof of concept quietcblongs is building that is attempting to get all hardware working properly with Android 1.6 on the Sprint Hero. It contains none of Google's proprietary software, and is all open source. And it works incredibly well I might add.

I don't claim to speak for quietcblongs at all. I just do not want this VERY informative post and build to disappear because of perceived Google copyright infringement. And if guidry or myself post to redirect you, it lets quiet focus on what is more important :)

Please see this -

It has some instruction of how to get the Google "stuff" working. And yes, protected apps are showing for me. And I see gu1dry beat me to the punch. Blame the extra rum in the holiday eggnog.
[Hero CDMA Android Development] gu1dry:
Any updates on the status of the ROM?
[Hero CDMA Android Development] quietcblongs:
I've been working on this as well as helping toast with the 2.1 sensors issue, as well as my day job and Christmas family stuff. Not a whine, but just letting y'all know I'm not a college student on break or something :)

Not too much progress since last update, I might have MMS working, awaiting confirmation on that right now. I found a possible bug in the IccCard module where it was returning a bad value, causing MMS (and possibly other apps) to think that the mobile network was not available when it is. That was the one big cause of MMS not sending. The other is setting up the apns-conf.xml correctly. I loaded up 1.5 and looked at how it was setup by examining the telephony.db with sqlite3 in /data/data/com...telephony/databases. HTC hacked in 2 "fake" APNs.

I'm debating right now whether to have 1.6 GPS use the other "fake" APN, which I think is a bad way to go since I think it would be a bad hack job, or dig a little deeper as to why GPS doesn't work when you're connected to the mobile network. MMS in 1.6 seems to be picking up the mms APN I cloned over from 1.5. However, 1.6 GPS bits correctly determine that APN is null, so I don't know if forcing the APN to "0" (as in what 1.5 does) would really help.

I will read some more source code to see if I can find something in 1.6 GPS that is "semi-broken" like the IccCard issue. Plus GPS works fine when mobile network is disconnected. There is probably some weird interaction between GPS and mobile network. GPS does use the mobile network to sync up the current time (GPS is reliant on the receiver and the sats be synced up timewise). This is why phones with GPS acquire SATs so much quicker than standalone GPS units, they have a leg up on the time sync by using the cellular network. The time sync through the mobile network is fine, so something else is hanging up the GPS framework, where its not receiving GPS data while mobile data is connected.
[Hero CDMA Android Development] gu1dry:
I'm not trying to nag, I was seeing if there was an update. I'm willing to test, test builds if you need someone else to test.

Why not try the MMS.apk from another working of 1.6, ie CyanogenMod, EG-Build, etc?
[Hero CDMA Android Development] incogneato:
Firstly - thanks again and again for all your work.

I am trying to follow your advice and working on my own AOSP donut build...the bolded part in your quote just answered about 6 questions I was going to PM you ;) .

Secondly - I'll make it simple. You tell us (gu1dry and myself at a minimum) what we can do to help. The satisfaction I have from building my OWN 1.6 and having it semi-working I completely owe to you, and I'll blindly follow any instruction you give :D
[Hero CDMA Android Development] gu1dry:
Ya building up the Googlebits on the AOSP 1.6 has taught quite a bit. I've never messed with android, or even huge tweaking of Linux before this & if AOSP 1.6 get's fulling working, I have an idea for a full custom ROM, which I will definitely looking to share, but I want to get this base fully functional before I going tweak crazy.
[Hero CDMA Android Development] quietcblongs:
What would be helpful for some who want to help is to run tcpdump while sending MMS in a 1.5 Sprint based ROM. That will tell me what I need to tweak in the source to get it going. I can then focus on GPS a bit more until you guys get the tcpdump.
[Hero CDMA Android Development] gu1dry:
I'm Nand restoring my Fresh 1.0 backup. I'll msg you if I get a proper dump. First time doing this so it might take a moment.
[Hero CDMA Android Development] incogneato:
File is marked at point message sending began. This is 3 MMS to same number one after the other. Let me know if you need more, or need full verbose mode.

Basically stock 1.5 with busybox

*edit removed unneeded file
[Hero CDMA Android Development] quietcblongs:
I need the first kb of the packets, so something like:

tcpdump -X -n -s 1024 -w /sdcard/tcpdump.txt

I should've been more clear in my post. Thanks!
[Hero CDMA Android Development] incogneato:
No problem. Here's try 2
[Hero CDMA Android Development] gu1dry:
Here's mine.

attachment removed
[Hero CDMA Android Development] quietcblongs:
happy new years everybody, check first page for new build with GPS fully working and MMS send working. someone test MMS receive please!

GPS finally worked when I removed the time injection from the NTP servers into the phone's GPS. For some reason, when the time injection happens, it stalls something in the libgps.so, something we don't have the source to.

MMS, thanks to gu1dry and inconeato, was resolved by setting a few headers, as well as making sure the from field is set correctly. The AOSP code does not set the from field, it uses a token value, which I guess Sprint's MMS server did not like, among other things.
[Hero CDMA Android Development] bron019:
Thanks and have a happy new year
[Hero CDMA Android Development] gu1dry:
Awesome! Will be updating my phone sometime tomorrow after I recover from tonight. :p

Is a chance to get n update fie from the previous AOSP 1.6 build?
[Hero CDMA Android Development] bobdude5:
what kind of experience do you have? your educational background? what did you study to give you the knowledge to do things youve done?

any college course you recommend taking? im so interested to start learning i just dont know where to start..no programming experience nothing lol
[Hero CDMA Android Development] bron019:
I need help installing google bits could you pliz assist
[Hero CDMA Android Development] gu1dry:
I would recommend going to the thread about getting the Googlebits on AOSP 1.6, read it & ask any questions there.
[Hero CDMA Android Development] incogneato:
downloading now. will wipe and test shortly. Thanks for this!
[Hero CDMA Android Development] quietcblongs:
I thought about this, but I find it too hard to keep track of changes since I change so many things during the process of trying to fix things.
[Hero CDMA Android Development] quietcblongs:
Just 4 years at a university with a geeky degree. I find that its not so much what you already know, but if you're willing to learn new things, and not afraid of "breaking" stuff. Also, be willing to troubleshoot on your own, google things, etc. I find that there are people who give up at the first error, and those who keep at it for a reasonable amount of time. Sometimes, you have to come to the conclusion that somethings are beyond your skills. Knowing when to start and stop I guess ;)

Take the GPS thing, it took me some time to realize that the time injection could be the culprit. I went over the logs between with mobile data and without, and finally caught that little nuance, and noticed libgps stopped doing its thing when the time injection took place. I know that time injection is a good thing for GPS, but I had to try taking it out anyways (not afraid to break things).
[Hero CDMA Android Development] incogneato:
Wiped data and flashed new zip

Unable to send MMS, sits in endless loop trying.

Recieve message with a link to download attachment, unable to download - ****s out generic error message "unable to download attachment"

GPS sensor seems to be working fine.

Pushed googlebits to phone -

Unable to send MMS or download attachment (as i figured)

Installed Handcent - Unable to send MMS, unable to receive attachment inline.

Set Handcent not to automagically DL attachments - unable to manually download via link from handcent - error msg "Unable to download xxx.xxx(attachment) from xxxxxxxxxx(number of sender)"

Google Maps works flawlessly

GPS Status app from market instantly locks and gives location and sensor info correctly.

Applications still cannot use location services, but I think thats a googlebits issue.***

Still some MMS issues, but the addition of GPS makes this an incredible update. thanks tons.

***edit***

Enabling wifi, then disabling wifi and ALL location services work as advertised. Persistent on reboot as well.