Related
Good morning everyone. I will be splitting this topic into two parts. The first post will be my a FAQ and my anecdotal evidence supporting my claim and how I came to this conclusion, and the second will be the instructions on how to duplicate. I didn't put the instructions in the first post because I want people to actually read this part first before jumping in and then asking the same questions over and over again.
FAQ
Q. Does this work everywhere, all the time?
A. No. As with any cellular technology, results will vary greatly. I know this works where I am. I make no promises that it will work where you are.
Q. I can't get more than X speed, help!
A. If you have followed these steps TO THE LETTER then I already have done everything possible. The only way YOU will see better speeds is to either connect to WiFi, move to an area with better infrastructure, build your own tower with fiber connection, or get a Femtocell.
Q. I'm running JimBob's SuperDeluxeAwesomestMegaWhooptieXXL ROM, does this work with it?
A. Most likely. As with ANY system change, make a full backup before attempting any changes. I am not responsible for you bricking your device.
Q. Can I ask a question that was answered either in the OP or right above where I asked?
A. I like turtles.
OK, on to my reasoning.
First, I have looked at each thread promising better speeds. All have, in my experience, been on the right track. However, none have really brought it all together to truly work perfectly. I was pretty happy with my 4mbit own connection.
Until the update from HTC came out. I hit 7-8mbit regularly where I was hitting 4 max before. Even in high traffic areas like Downtown Fort Worth, I had averaged 1.5-2 throughout the day on any custom ROM. With the new update, 4-5 average.
I wondered what the differences were that caused custom ROM's to not be able to achieve full speeds, when I could nandroid restore to the stock updated ROM and get those blazing speeds without ANY modification connected to the same towers.
So, I decided to "merge" my ROMs.
All of a sudden, 8mbit down on RCMix 6.1. 8mbit down on AR. 8mbit down on CM7(Edit: Only on versions which support the HTC RIL's, not all older versions do).
Holy smokes.
Second post with instructions en route.
Instructions
Prerequisites:
A basic knowledge of flashing ROMs and Radios on the HTC Inspire 4G and ADB commands
S-Off HTC Inspire 4G with CWM Recovery and AT&T service
MicroSD card inserted in phone
Root capable file explorer (I prefer Root Explorer, as it can set permissions)
Download the following three files and extract to the location of your choice on your SD Card: MultiUpload(Updated 05-13-2011)
EDIT: for testing, please download This instead, it should place the telephony.db FOR you. Please report back any permissions issues, or if it even works...
Steps:
NANDROID BACKUP BEFORE BEGINNING!
1. Place PD98IMG.zip(12.39a.60.19x_26.06.06.30_M) on root of SD Card (location: \mnt\SDCard) Reboot into bootloader to install updated Radio(If necessary, if you have already flashed this radio you do NOT need to reflash radio.)
2. Once radio is installed, reboot into ClockworkMod Recovery, go to mounts and mount /system, and install the Speed Boost .zip from CWM. This includes the (verified)updated RIL files for the radio as well as propeditor for the next step.
3. Once rebooted, Prop Editor should now be present in your app tray. Open and grant Root Access. Once you have completed that, BACK UP YOUR build.prop and copy to your ADB location on computer (this way you can recover if this step gets a little messed up, reboot recovery and ADB push build.prop /system)
4. Using Prop Editor, make the following changes and additions to your prop file(Note: Any line not expressly mentioned here SHOULD NOT BE CHANGED OR TOUCHED):
Code:
ro.ril.ecc.HTC-GCC=999,112,997
ro.ril.ecc.HTC-WWE=999
ro.ril.ecc.HTC-ELL=92,93,94
ro.ril.enable.a52.HTC-ITA=1
ro.ril.enable.a53.HTC-ITA=1
ro.ril.enable.a52=0
ro.ril.enable.a53=1
ro.ril.hsdpa.category=14
ro.ril.hsupa.category=7
ro.ril.hsxpa=3
ro.ril.disable.fd.plmn.prefix=23402,23410,23411
ro.ril.enable.sdr=0
ro.ril.enable.ucsq=2
ro.ril.enable.amr.wideband=0
ro.ril.att.feature=1
ro.ril.enable.gea3=1
ro.ril.radio.svn=3
ro.ril.enable.prl.recognition=1
*media.a1026.enableA1026=1
*htc.audio.hac.enable=1
*Ignore on CM7 based ROMs. It will eat your battery.
5. Reboot phone TWICE.
6. [EDIT: Not needed on CM7 sourced ROM's after nightly build 57, MIUI, Inspired Ace by gtg465x, see step 6a] Open your Root File explorer of choice, then copy telephony.db and navigate to /data/data/com.android.providers.telephony/databases and rename existing telephony.db to telephony.db.old, then paste the new telephony.db in that location, and set permissions to rw-rw----. Reboot phone. *see below if phone.apk crashes on reboot
6a. Change APN's to match what is in THIS thread by henrybravo.
Be sure to hit his Thanks button too!
7. Once phone is rebooted, go to settings, wireless and networks, mobile networks, and access point names. Select the locked APN (Note: WiFi Hotspot still works)
This should complete the modifications, speeds should be much better.
* - If you get crashes in Phone.apk, reboot into ClockworkMod Recovery, choose Advanced, and Fix Permissions. This will cause a temporary issue in which Contact pictures do not appear in the Messaging app. To fix this,get a terminal emulator, then do these steps:
su
chmod 666 /data/data/com.android.providers.contacts/files/*
This will fix this issue after reboot.
Many thanks to:
henrybravo, for the telephony.db method
IsraelR for the original build.prop thread
Any others I left off the list are purely unintentional. Please PM me and let me know!
I'm using the Inspire on Straight Talk, an AT&T MVNO. The APN settings won't work for me, should I just use what I have and apply the other steps in the process?
Also, thanks for the work!
What radio is it?
entropism said:
I'm using the Inspire on Straight Talk, an AT&T MVNO. The APN settings won't work for me, should I just use what I have and apply the other steps in the process?
Also, thanks for the work!
Click to expand...
Click to collapse
Skip the telephony.db as well, it only has AT&T settings in it.
Sent from my Inspire 4G using XDA Premium App
Flashing now, hoping it works. AT&T around here fluctuates like crazy, and it's a lot worse with the Inspire. I can get 400k/300k one minute, 4mb/2mb the next. Right before I started flashing this, I was getting 900k/300k.
harlenm said:
What radio is it?
Click to expand...
Click to collapse
Whoops, thought I copied and pasted it into there. 12.39a.60.19x_26.06.06.30_M - The AT&T updated radio from the OTA update.
Definitely not seeing prop editor installed after flashing the speed boost zip (flashed twice). Going to edit it with a text editor under Root Explorer and see how it goes.
entropism said:
Definitely not seeing prop editor installed after flashing the speed boost zip (flashed twice). Going to edit it with a text editor under Root Explorer and see how it goes.
Click to expand...
Click to collapse
Hmm, I will check it. It did on the two test Inspires I have used. Text editor will work fine.
Edit - Reuploading files.
If some of the ro.ril lines of code aren't in my build.prop, should I be adding them manually? These lines were missing:
Code:
ro.ril.enable.ucsq=2
ro.ril.att.feature=1
ro.ril.enable.gea3=1
ro.ril.radio.svn=3
Edit: Running CM 7.0.2, CM kernel.
entropism said:
If some of the ro.ril lines of code aren't in my build.prop, should I be adding them manually? These lines were missing:
Code:
ro.ril.enable.ucsq=2
ro.ril.att.feature=1
ro.ril.enable.gea3=1
ro.ril.radio.svn=3
Edit: Running CM 7.0.2, CM kernel.
Click to expand...
Click to collapse
Yes, this is part of the update we are doing.
I have not tried yet but since no one has and probably will not, at least for awhile lol. Just wanna say thank you for putting the time and effort into, in my oppinion , such a huge project
Will probably take a bit to get all the little kinks of diffrent roms,devs , peoples set ups . Again thank you and thanks for the huge tech support hours you will be putting in,
Sent From My HTC Inspire 4G @ 1.5Ghz
entropism said:
If some of the ro.ril lines of code aren't in my build.prop, should I be adding them manually? These lines were missing:
Code:
ro.ril.enable.ucsq=2
ro.ril.att.feature=1
ro.ril.enable.gea3=1
ro.ril.radio.svn=3
Edit: Running CM 7.0.2, CM kernel.
Click to expand...
Click to collapse
Redownload the mod and rerun the CWM flashable .zip, the updater script in there was the wrong one, my fault!
Kizzmiazz said:
I have not tried yet but since no one has and probably will not, at least for awhile lol. Just wanna say thank you for putting the time and effort into, in my oppinion , such a huge project
Will probably take a bit to get all the little kinks of diffrent roms,devs , peoples set ups . Again thank you and thanks for the huge tech support hours you will be putting in,
Sent From My HTC Inspire 4G @ 1.5Ghz
Click to expand...
Click to collapse
Haha, I am ready for the hours. Fortunately, my method SHOULD work for any ROM for the Inspire, as it only affects certain files. We shall see, I suppose!
Locked APN?
I didn't come up with a locked APN after the procedure. They are all currently unlocked. I started with two:
MMS and MediaNet
I now have 4, they are "Entitlement", "MEdia Net", "MEdiaNet", and "MMS"
Not sure which to pick.
EDIT: It appears that my MediaNet and your Media Net are the same APN, and I am unable to choose Entitlement. I guess that answers that?
ou4me said:
I didn't come up with a locked APN after the procedure. They are all currently unlocked. I started with two:
MMS and MediaNet
I now have 4, they are "Entitlement", "MEdia Net", "MEdiaNet", and "MMS"
Not sure which to pick.
Click to expand...
Click to collapse
Choose menu then reset to default.
Sent from my A500 using XDA Premium App
id10terrordfw said:
Choose menu then reset to default.
Click to expand...
Click to collapse
I'm not sure that was what was needed. I ended up with the default APN from my UltimateDroid ROM, which has some missing parameters and has always been very slow. In fact, I went from no appreciable speed increase with the procedure and 4 APNs to now quite a speed decrease. I'm going to add back the MediaNet APN. Let me know if I need any of the others added in there. ie: Entitlement.
ou4me said:
I'm not sure that was what was needed. I ended up with the default APN from my UltimateDroid ROM, which has some missing parameters and has always been very slow. In fact, I went from no appreciable speed increase with the procedure and 4 APNs to now quite a speed decrease. I'm going to add back the MediaNet APN. Let me know if I need any of the others added in there. ie: Entitlement.
Click to expand...
Click to collapse
You shouldn't, the new telephony.db should have provided two new APN's at that point. That is the purpose of copying it over.
Speeds are just as bad, if not worse for me. Granted, do NOT use my experiences to see if you should install this or not, as I'm not using AT&T for my service, I'm using Straight Talk.
Results after installing this:
700k down, 590k up
1300k down, 85k up
698k down, 590k up
426k down, 852k up
1543k down, 136k up
937k down, 137k up
468k down, 140k up
entropism said:
Speeds are just as bad, if not worse for me. Granted, do NOT use my experiences to see if you should install this or not, as I'm not using AT&T for my service, I'm using Straight Talk.
Results after installing this:
700k down, 590k up
1300k down, 85k up
698k down, 590k up
426k down, 852k up
1543k down, 136k up
937k down, 137k up
468k down, 140k up
Click to expand...
Click to collapse
Did you reinstall the zip in the new download?
I'm looking to fix my GPS issues once and for all. It's really frustrating that on some ROMs, my GPS locks within 10 seconds and on others, I can't get a lock at all. So my question to developers is this, what are the underlying GPS configuration files? Besides /etc/gps.conf - where are the actual binaries responsible for GPS behavior?
Thanks
penninajx said:
I'm looking to fix my GPS issues once and for all. It's really frustrating that on some ROMs, my GPS locks within 10 seconds and on others, I can't get a lock at all. So my question to developers is this, what are the underlying GPS configuration files? Besides /etc/gps.conf - where are the actual binaries responsible for GPS behavior?
Thanks
Click to expand...
Click to collapse
I've had the same issues on all roms you can think of. I'm now on the new baseband on a stock GB and couldn't be happier. Locks are almost instant.
penninajx said:
I'm looking to fix my GPS issues once and for all. It's really frustrating that on some ROMs, my GPS locks within 10 seconds and on others, I can't get a lock at all. So my question to developers is this, what are the underlying GPS configuration files? Besides /etc/gps.conf - where are the actual binaries responsible for GPS behavior?
Thanks
Click to expand...
Click to collapse
I would also be interested in this information. I have been reading around like crazy trying to figure out how to locate and open the files for specific pieces such as GPS and bluetooth. I have learned an incredible amount the last week but i can only read so fast. Any pointers from people, such as links to go read, would greatly help in all the searching around I am doing.
Assuming we can find and grab the GPS files, does this require any decompiling of code? (Yes I am searching for this info as well on the net but can only read so fast).
With CM 7.2 & Faux - stable versions - March BB
http://review.cyanogenmod.com/#/c/6774/1
Paul ReiouxJul 17, 2011
Patch Set 1:
Yes, the cold start may take up 3~4 mins depending on availability of clear sky. Warm start locks instantly. Not sure if clock sync or lack of ephemeris data is the culprit or just an LG implementation issue.
Click to expand...
Click to collapse
http://review.cyanogenmod.com/#/c/6766/
star: Don't inherit GPS config
* Let the devices specify their own gps.conf. Google's servers don't
work well at all on the G2X.
Click to expand...
Click to collapse
I was wondering the same thing and I just happened to be browsing gerrit and found these two items good to know info...
I attached the gps.conf file that I use...it's pretty much the one from the v21y update (screenshot attached)...has worked for me pretty well (around 10 sec lock) compared to the default CM gps.conf which references SuplRootCert, lists north american ntp server and phone type as utms...
EDIT: zip file is now flashable in CWM thanks xBkKx!!! (attached here as well so that way no one has issues)
djvoleur said:
I attached the gps.conf file that I use (zip NOT flashable-permissions must be rw-r--r-- and put into /system/etc)...it's pretty much the one from the v21y update (screenshot attached)...has worked for me pretty well (around 10 sec lock) compared to the default CM gps.conf which references SuplRootCert, lists north american ntp server and phone type as utms...
Click to expand...
Click to collapse
I will have to give this file a try. I like gems like this, it has given me some more ideas
djvoleur said:
http://review.cyanogenmod.com/#/c/6774/1
http://review.cyanogenmod.com/#/c/6766/
I was wondering the same thing and I just happened to be browsing gerrit and found these two items good to know info...
I attached the gps.conf file that I use...it's pretty much the one from the v21y update (screenshot attached)...has worked for me pretty well (around 10 sec lock) compared to the default CM gps.conf which references SuplRootCert, lists north american ntp server and phone type as utms...
EDIT: zip file is now flashable in CWM
Click to expand...
Click to collapse
I have found that setting INTERMEDIATE LOCATION = 1 and THRESHOLD = 1000 to work better/faster for cold starts. sometime helps hot start too. the rest of my gps.conf looks like what you posted.
what it does is before I can get a full lock on the satellite, it'll try to compute your location with whatever data it got... giving less accurate but still a decent lock; faster.
(sry, dont remember the exact spelling of the parameter, you should see it in the conf file though)
The .zip file threw an error for me when I tried flashing it in CWM. So I opened up the file to cut and paste the relevant changes into my existing /system/etc/gps.conf file. The changes worked really well. Locks as fast as stock 2.3.4! BTW I am using Temasek 128 and Faux 050stable if that matters?
I noticed in the .zip file "ACCURACY_THRESH =" was initially commented out. I first tried it like that with "#ACCURACY_THRESH = " and it seemed to be working OK without passing this line of code. But, I too am finding it's better to include that line and lower the accuracy threshold...
atb1183 said:
I have found that setting INTERMEDIATE LOCATION = 1 and THRESHOLD = 1000 to work better/faster for cold starts. sometime helps hot start too. the rest of my gps.conf looks like what you posted.
Click to expand...
Click to collapse
My initial locks were taking about 60-120 sec. while in the house or in the car. Now I am seeing 12-20 seconds or as little as 5 seconds with a completely clear view of the sky! After that initial lock, I am getting really instantaneous GPS locks.
Muchas Gracias:good:
---------- Post added at 02:30 PM ---------- Previous post was at 02:23 PM ----------
penninajx said:
I'm looking to fix my GPS issues once and for all. It's really frustrating that on some ROMs, my GPS locks within 10 seconds and on others, I can't get a lock at all. So my question to developers is this, what are the underlying GPS configuration files? Besides /etc/gps.conf - where are the actual binaries responsible for GPS behavior?
Thanks
Click to expand...
Click to collapse
Besides thanking djvoleur and atb1183 for the fix... I want to thank you for posting this thread! By following this thread, I finally got my CM7 GPS working as well as stock 2.3.4!!!:good:
djvoleur said:
http://review.cyanogenmod.com/#/c/6774/1
http://review.cyanogenmod.com/#/c/6766/
I was wondering the same thing and I just happened to be browsing gerrit and found these two items good to know info...
I attached the gps.conf file that I use...it's pretty much the one from the v21y update (screenshot attached)...has worked for me pretty well (around 10 sec lock) compared to the default CM gps.conf which references SuplRootCert, lists north american ntp server and phone type as utms...
EDIT: zip file is now flashable in CWM
Click to expand...
Click to collapse
I get an error when trying to flash this
What CWM version do you have? And what error?
Sent from my LG-P999 using Tapatalk 2
djvoleur said:
What CWM version do you have? And what error?
Click to expand...
Click to collapse
I used CWM 5.0.2.0 and the error reads...
Installing update...
E:Error in /sdcard/Boat_Browser_Free/downloads/gps-conf-flashable.zip
(Status 6)
Installation aborted.
I was able to view the contents of the file, so I just cut and paste your code fixes into my gps.conf file. Its working great - Thanks!
hairycheapo said:
I used CWM 5.0.2.0 and the error reads...
Installing update...
E:Error in /sdcard/Boat_Browser_Free/downloads/gps-conf-flashable.zip
(Status 6)
Installation aborted.
I was able to view the contents of the file, so I just cut and paste your code fixes into my gps.conf file. Its working great - Thanks!
Click to expand...
Click to collapse
i got the same error, same CWM version. how exactly did you go about cutting and pasting the fixes into the android system file (gps.conf)?
yourwhiteshadow said:
i got the same error, same CWM version. how exactly did you go about cutting and pasting the fixes into the android system file (gps.conf)?
Click to expand...
Click to collapse
I think I had to use Script Manager to make the changes stick. If using Script Manager, tap the ".." until you find yourself at the root of your file system. Select system, then etc, and if you scroll down a little you should find an individual file named gps.conf. Open as a text file and use SM Editor to make the changes. Press the menu button > Save when you are done (although if you forget, I think the program still prompts you when you try to exit out). I could post a screen shot of how the file looks after making changes, but I gotta break up a fight now between a 5,4, and 2 year old...
hairycheapo said:
I think I had to use Script Manager to make the changes stick. If using Script Manager, tap the ".." until you find yourself at the root of your file system. Select system, then etc, and if you scroll down a little you should find an individual file named gps.conf. Open as a text file and use SM Editor to make the changes. Press the menu button > Save when you are done (although if you forget, I think the program still prompts you when you try to exit out). I could post a screen shot of how the file looks after making changes, but I gotta break up a fight now between a 5,4, and 2 year old...
Click to expand...
Click to collapse
thanks, ended up using ES file explorer and giving it root access, copied and pasted the file to the necessary location. GPS locks are almost instantaneous now, not sure why all the ROMs can't just use that file.
Right! Why is it such an easy fix, but CM and other devs neglect it? BTW I prefer ES too. The file explorer is better and the text editor is easier to use.
djvoleur said:
I attached the gps.conf file that I use...it's pretty much the one from the v21y update (screenshot attached)...has worked for me pretty well (around 10 sec lock) compared to the default CM gps.conf which references SuplRootCert, lists north american ntp server and phone type as utms...
EDIT: zip file is now flashable in CWM
Click to expand...
Click to collapse
I couldn't even get a lock with the one I had -_- works great now appreciate the file.
E: this zip should flash properly gps.config-CWM.zip
Sent from my LG-P999
Three little files lol
Wow, yes! This has fixed my GPS locks. They are now instant. Anyone having any issues GPS wise should use this file. Thanks!
I patched wpa_supplicant to do wildcard access point scans passively, because **** tracking. (Wildcard means you're not looking for a particular access point, especially not one with a hidden SSID.) Seems to work perfectly, except it takes a few seconds longer to list all the access points around you. And it's a very simple patch too.
Just apply inside all the ~/android/system/external/wpa_supplicant* folders and build. Then look at the air traffic before and after installing the new binary (and resetting Wifi) with this Wireshark filter expression: wlan.addr == phn:em:ac:ad:dr
https://gist.github.com/anonymous/9589807
steadyeddy said:
I patched wpa_supplicant to do wildcard access point scans passively, because **** tracking. (Wildcard means you're not looking for a particular access point, especially not one with a hidden SSID.) Seems to work perfectly, except it takes a few seconds longer to list all the access points around you. And it's a very simple patch too.
Just apply inside all the ~/android/system/external/wpa_supplicant* folders and build. Then look at the air traffic before and after installing the new binary (and resetting Wifi) with this Wireshark filter expression: wlan.addr == phn:em:ac:ad:dr
https://gist.github.com/anonymous/9589807
Click to expand...
Click to collapse
Is this a true monitor mode (rfmon) patch? Either way, very nice work!
ryanbg said:
Is this a true monitor mode (rfmon) patch? Either way, very nice work!
Click to expand...
Click to collapse
No. It removes directed probes to stop leaking stored network SSIDs. This is not for on-device RFMON.
h4waii said:
It removes directed probes to stop leaking stored network SSIDs.
Click to expand...
Click to collapse
Actually it's the opposite, probe requests looking for specific SSIDs still go through, but with or without this patch they only happen when your Android system remembers APs with a hidden SSID (check your wpa_supplicant.conf). And they need to happen, because it's the only way to connect to those APs. If you don't want to send out such probe requests, just don't connect to APs with hidden SSIDs, or at least "forget" them after you're done.
What the patch really does is remove nonspecific (=wildcard) probe requests. They do not leak SSIDs, but they do leak your device's current MAC address. (And more broadly, the radio characteristics of your device.)
Any progress?
This work is a good idea; my development machine is down but I will test it out asap.
A patch like this, that could emulate IOS 8's new wireless behavior, could solve one part of the SSID probe problem, but having an option to not immediately trigger a bunch of wireless actions as soon as a network connection is established would be fix the other half.
Has there been any progress or tests to see if this will make our machines more secure?
Thanks for the code, I'm going to begin asking questions on the hostapd mailing list.
Mediatek and GPS, ah, how we love trying to get it to work. People have been making foil antennas, tweaking GPS.conf, meddling with NTP and all manner of other things to get it working only to find that the very next day it is back to sullenly sitting there with ne'er a satellite in view. Duff hardware? It seems likely - only it's not. There is nothing at all wrong with the Mediatek GPS hardware. When it is allowed to work, it works as well as anything I've come across, SiRF included.
The problem is assumption on the part of manufacturers and our insatiable lust for a bargain. Assume makes an ass of u and me.
Prerequisites:
Root and the ability to mount /system RW. Sorry if you're one of these people who flatly refuses to root their devices, this is not the solution you're looking for <fx:waves hands/>
Some method of getting into MTK Engineering Mode, whether that's MobileUncle, the "secret" dialler code, GravityBox etc.
A text editor that doesn't follow the MS rule that their line breaks are correct and everyone else+dog is wrong. Notepad++ will do for those of you who cannot break the Redmond shackles. MS Notepad is just going to corrupt the files.
ADB set up and working.
No allergy to XML. If you start sneezing, your eyes start streaming or anything happens to your vision after looking at a few <>'s, please discontinue use.
Step 1: Disable EPO. It's worse than useless for any other starting location but Shenzhen. If you don't believe me, try enabling it again after you complete the rest of the steps. Go into engineering mode and, under Location/Location based service/EPO deselect the obvious checkboxes. This on its own improves matters enormously. With some ROMs you can also do this through Settings by tapping the "GPS satellites" item in Location access and deselect the "Enable EPO assistance" checkbox.
Step 2: Mount /system read/write with whatever method you normally use, whether that's adb remount, adb shell mount -o rw,remount /system or whatever.
Step 3: cd to a clean directory, say MTKGPS.
Step 4: adb pull the following files:
Code:
/system/etc/gps.conf
/system/etc/agps_profiles_conf.xml
/data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
Careful with that last one, it appears in more than one place but it is the com.mediatek.lbs.em version we want
Note the file permissions for these files as they stand on your particular ROM.
Code:
-rw-r--r-- root root 164 2014-06-19 18:29 gps.conf
-rw-r--r-- root root 9502 2014-06-20 15:29 agps_profiles_conf.xml
-rw-rw---- u0_a39 u0_a39 2659 2014-06-20 20:21 agps_profile.xml or
-rw-rw---- 10039 10039 2659 2014-06-20 20:21 agps_profile.xml
The owner of the agps_profile.xml file should be the user's UID. It may be different on your handset. Check it first, please. If any of these differ on your ROM, use the permissions on yours as canonical. This is just a guide.
Step 5: Now we're going to do what FasterGPS does, only a bit more. Edit the gps.conf to look something like this:
Code:
NTP_SERVER=<your country>.pool.ntp.org
SUPL_HOST=supl.nokia.com
SUPL_PORT=7275
INTERMEDIATE_POS=1
ACCURACY_THRES=5000
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_USER_PLANE=TRUE
Purists will note I'm using Nokia's SUPL server here. A little research tells me that Google's SUPL is, well, it's a bit pants - and not just because it's one more way they get PII from you. YMMV, beware of the leopard, and so forth. If you want to use the chocolate factory's SUPL, just swap the SUPL_HOST line to supl.google.com.
Save the file.
Step 6: Now let's undo the mistakes of the manufacturer. Unfortunately we have to delve into some unholy XML for this but don't worry, it's not that difficult despite how daunting the file looks in a text editor. Open agps_profile.xml in your editor.
Make sure the following lines (amongst loads of others that should be left alone) appear as shown:
Code:
<int name="slp_port" value="7275" />
<string name="slp_code">NOKIA</string>
<boolean name="agps_enable" value="true" />
<string name="slp_addr">supl.nokia.com</string>
That's the barebones. Don't exit the file yet. Locate the following lines:
Code:
<float name="nTargetAreaGeolat" value="nn.nnnnn" />
<float name="nTargetAreaGeolng" value="nn.nnnnn" />
See the problem? Try sticking the co-ords from your file into an online mapper. These are passed to the SUPL server no matter what CellID your phone reports. Worse, if you have no cellular radio, it's taken as gospel so you get ephemeris for the middle of China. Useful. This is why cold start takes even longer than it would on a standalone GPS from cold.
Now, what we need to do is set those up for your general location. It doesn't need to be point precise, just a general 0.1 degree lat and long.
IMPORTANT: If you are West of the Meridian, you need to do some jiggery-pokery with your longitude. This file treats the world as a 360 degree ball, so you need to subtract your longitude from 360. For example, if you're 4 deg W of Greenwich, your longitude would be 356.0. 110.3W equates to 249.7. Yes, this number drops as your longitude goes up if you're West.
Save this file.
Step 7: Now let's edit the agps_profiles_conf.xml. This one's fairly easy, just change the end to look like this, with the usual GOOGLE in default_profile if that's your bag:
Code:
<agps_conf_para
agps_enable="yes"
ca_enable="no"
cdma_agps_preferred="0"
cp_auto_reset="no"
cp_gemini_pref_sim="1"
cp_up_selection="up"
default_cdma_profile="CDMA1"
default_profile="NOKIA"
disable_after_reboot="no"
ecid_enable="yes"
gpevt="no"
log_file_max_num="10"
ni_request="yes"
notify_timeout="8"
roaming="yes"
si_mode="mb"
supl_version="1"
verify_timeout="8"
/>
</agps_profiles>
Note cp_gemini_pref_sim can be set to 2 if that's your main SIM that usually has a signal. It is used as the CellID source for aGPS, not the data connection the aGPS data is fetched on.
Save the file.
Step 8: Push the files back with adb and set up their ownership and permissions:
Code:
adb remount
adb push gps.conf /system/etc/gps.conf
adb push agps_profiles_conf.xml /system/etc/agps_profiles_conf.xml
adb push agps_profile.xml /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chown 10039:10039 /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chmod 660 /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chmod 644 /system/etc/agps_profiles_conf.xml
adb shell chmod 644 /system/etc/gps.conf
Step 9: Reboot and retry your GPS. Once you have checked everything is working, you can re-enable EPO, clear the aGPS data in Engineering Mode and try again just to verify I'm not talking out of my backside. EPO really doesn't help in this guise, at least not in the UK.
In conclusion, these can be made to work. With these changes in place I can get an indoor lock in airplane mode in just under ten seconds a day and a reboot after last using the GPS. You need a rooted device and some bright spark will no doubt automate all of this - I'm no Android hacker so don't look at me. GravityBox would be my guess as it's developed at a remarkable pace - thanks for the app, BTW
I do hope this works for everyone. It would be nice to put this one to bed once and for all. A final note: There may be errors in this. I'm only human. Check, double check, triple check, take backups, all the usual stuff. Flames to /dev/null, please.
Question: When I enter the coords of my general location, does that mean I will have trouble if I travel to another country or just very far from the mentioned coords?
Thanks for the guide BTW. This deserves more views.
DiGtal said:
Question: When I enter the coords of my general location, does that mean I will have trouble if I travel to another country or just very far from the mentioned coords?
Thanks for the guide BTW. This deserves more views.
Click to expand...
Click to collapse
It certainly won't be any slower than stock, that is for sure. Eventually it'll override the aGPS if you're away from your normal starting location. For occasional use abroad, it won't make it any worse and you should have a cell tower's details to pass to the SUPL server anyway.
Sounds a lot of work for such little thing.
I just use 3 apps and about 2 minutes of my time. And GPS works like a charm.
I'm not trying to dis you work friend. But there are simpler ways to do the same thing.
So, here it is:
Get "FasterGPS" app from Google Play Store. \
Get " MT GPS" app from Google Play Store } All free.
Get "MobileUncle" app from Google Play Store /
Go to Your GPS and mark everything ON.
Use FasterGPS and change your GPS Zone. i.e. Europe/Portugal
Use MT GPS to download the EPO Files.
Use MobileUncle, click on engineer mode, again on engineer mode (mtk),
sweep to the left until you find YGPS, click on it, then on information,
down you'll see hot, full and AGPS restart, follow this order and click on them.
Go back and click on satellites, and that's it...
Personally i use Sygic v14.02, it's the best to find satellites and a very quick fix.
But you use whatever you wish.
bravesoul said:
Sounds a lot of work for such little thing.
I just use 3 apps and about 2 minutes of my time. And GPS works like a charm.
I'm not trying to dis you work friend. But there are simpler ways to do the same thing.
So, here it is:
Get "FasterGPS" app from Google Play Store. \
Get " MT GPS" app from Google Play Store } All free.
Get "MobileUncle" app from Google Play Store /
Go to Your GPS and mark everything ON.
Use FasterGPS and change your GPS Zone. i.e. Europe/Portugal
Use MT GPS to download the EPO Files.
Use MobileUncle, click on engineer mode, again on engineer mode (mtk),
sweep to the left until you find YGPS, click on it, then on information,
down you'll see hot, full and AGPS restart, follow this order and click on them.
Go back and click on satellites, and that's it...
Personally i use Sygic v14.02, it's the best to find satellites and a very quick fix.
But you use whatever you wish.
Click to expand...
Click to collapse
Olá amigo, i´ve tryed everithing for my thl w8s and with no results, i will try the aluminium strip and post results.
I followed through your tutorial except this part:
HTML:
<float name="nTargetAreaGeolat" value="nn.nnnnn" />
<float name="nTargetAreaGeolng" value="nn.nnnnn" />
It is not present on my file, so I thought it would be best not to add some hardcoded GeoRef, is it needed for something special?
Disabling EPO gave me an accuracy close to 3.0, with EPO enabled accuracy remained on 4.5.
Great work!
NunoFilipeSantos said:
I followed through your tutorial except this part:
HTML:
<float name="nTargetAreaGeolat" value="nn.nnnnn" />
<float name="nTargetAreaGeolng" value="nn.nnnnn" />
It is not present on my file, so I thought it would be best not to add some hardcoded GeoRef, is it needed for something special?
Disabling EPO gave me an accuracy close to 3.0, with EPO enabled accuracy remained on 4.5.
Great work!
Click to expand...
Click to collapse
I did the above combination on a FAEA F2 (MT6589)
Tried the same on a Jiayu G4 (MT6589) and worked again beautifully, 3.4 Accuracy without EPO enabled.
In my ROM (MT6589T soc), 2 of the files are missing:
Code:
/system/etc/gps.conf
/data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
I know i can create gps.conf (seen it in some custom roms) but don't know about the other file?
Also, there is /system/etc/epo_conf.xml which seems to enable epo.
Should that be changed also?
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epo_profiles version="1">
<!-- The following parameters are provided for customer to
configure EPO default value.
-->
<!--
epo_enable:
Wether to enable EPO when device first boot up.
auto_enable:
Wether to enable EPO auto download feature when device first boot up.
update_period:
Update period, the unit is minute. if the value is set to "4320",
then it will update EPO file per 3 days (3 days = 4320 minutes).
The minimal value of update_period should not be less than 1440 (1 day).
-->
<epo_conf_para
epo_enable="yes"
auto_enable="yes"
update_period="21600"
/>
</epo_profiles>
major issue
I have a Jiayu G3C a Chinese phone it's running on android 4.2.2 and I believe it's the latest version fir this phone..the processor is MediaTek 6582
problem is EVEN IF SWITCH OFF the GPS so long as DATA is turned on it will keep on searching for gps. if I'm on Wi-Fi this problem doesn't happen...now I bought the phone due to its low cost, DUAL SIM + massive 3000mAh battery..but this battery is drained massively because of this bug. I can't enjoy the very first reason why I bought the phone. I went to engineering mode tried to disable AGPS and save the settings but the settings don't actually get saved n the bug continues to exist
The /system/gps.conf file didn't exist, till i got FasterGPS. I actually set the all the values recommended on FasterGPS as it has all the options recommended here. Why didn't it exist before? Any problem to set it this way?
The file /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml doesn't exist as well. What should i do?
Oh, i got a THL 5000 and Bshuy's ROM.
Has anyone tried this and can confirm it works?
Got my mum a Jiayu G4S and whilst it locks on pretty quickly just driving a couple of miles up the road leads it to go haywire. Showing us as being in different roads 100's feet away
Thank you so much!
Thank for your amazing post you was light of dark night I test it on my phone (huawi holy hol-u19) and it works perfectly now it can find and fix more than 4 satlite indoors.
I really wonder why a good hardware pulled down by **** software.
anyway thank so much keep on share your exprieces whit us.
can`t get gps on english us
M8 ..thanx for that tutorial !!
I use ZTE Blade Q (mtk6572) and i just set UID for agps_profile.xml and edited this strings
<agps_conf_para
agps_enable="yes"
ca_enable="no"
cdma_agps_preferred="0"
cp_auto_reset="no"
cp_gemini_pref_sim="1"
cp_up_selection="up"
default_cdma_profile="CDMA1"
default_profile="NOKIA"
disable_after_reboot="no"
ecid_enable="yes"
gpevt="no"
log_file_max_num="10"
ni_request="yes"
notify_timeout="8"
roaming="yes"
si_mode="mb"
supl_version="1"
verify_timeout="8"
/>
</agps_profiles>
Click to expand...
Click to collapse
After that i get fix in 2 sec indoor by the window :good:
Mr
Good day,
My apologies if I am out off line! The explanation for a problem with the Mediatek GPS is way over my head.
The problem is that the system lost its boot sequence and stop on a update window. It used to run Windows CE5 but that seems to be gone. The product is a Chinese 4" screen and that is all I've got.
Looking at the thread it seems to me that I must become a rocket scientist to get it to work again and at my age that is not possible. Friends of mine recommend: buy a new one!
Any suggestion?
Tom
PS. Enjoy the new year!
brangryavesoul said:
Sounds a lot of work for such little thing.
I just use 3 apps and about 2 minutes of my time. And GPS works like a charm.
I'm not trying to dis you work friend. But there are simpler ways to do the same thing.
So, here it is:
Get "FasterGPS" app from Google Play Store. \
Get " MT GPS" app from Google Play Store } All free.
Get "MobileUncle" app from Google Play Store /
Go to Your GPS and mark everything ON.
Use FasterGPS and change your GPS Zone. i.e. Europe/Portugal
Use MT GPS to download the EPO Files.
Use MobileUncle, click on engineer mode, again on engineer mode (mtk),
sweep to the left until you find YGPS, click on it, then on information,
down you'll see hot, full and AGPS restart, follow this order and click on them.
Go back and click on satellites, and that's it...
Personally i use Sygic v14.02, it's the best to find satellites and a very quick fix.
But you use whatever you wish.
Click to expand...
Click to collapse
I was so angry with the crapy performance of my MTK 6582 GPS.
This is the only thing that worked for me after so many days. After every reboot I have to manually turn off EPO downloading again, and to update EPO manually butI can live with that.
Thank you so much
Chron0s said:
Mediatek and GPS, ah, how we love trying to get it to work. People have been making foil antennas, tweaking GPS.conf, meddling with NTP and all manner of other things to get it working only to find that the very next day it is back to sullenly sitting there with ne'er a satellite in view. Duff hardware? It seems likely - only it's not. There is nothing at all wrong with the Mediatek GPS hardware. When it is allowed to work, it works as well as anything I've come across, SiRF included.
The problem is assumption on the part of manufacturers and our insatiable lust for a bargain. Assume makes an ass of u and me.
Prerequisites:
Root and the ability to mount /system RW. Sorry if you're one of these people who flatly refuses to root their devices, this is not the solution you're looking for <fx:waves hands/>
Some method of getting into MTK Engineering Mode, whether that's MobileUncle, the "secret" dialler code, GravityBox etc.
A text editor that doesn't follow the MS rule that their line breaks are correct and everyone else+dog is wrong. Notepad++ will do for those of you who cannot break the Redmond shackles. MS Notepad is just going to corrupt the files.
ADB set up and working.
No allergy to XML. If you start sneezing, your eyes start streaming or anything happens to your vision after looking at a few <>'s, please discontinue use.
Step 1: Disable EPO. It's worse than useless for any other starting location but Shenzhen. If you don't believe me, try enabling it again after you complete the rest of the steps. Go into engineering mode and, under Location/Location based service/EPO deselect the obvious checkboxes. This on its own improves matters enormously. With some ROMs you can also do this through Settings by tapping the "GPS satellites" item in Location access and deselect the "Enable EPO assistance" checkbox.
Step 2: Mount /system read/write with whatever method you normally use, whether that's adb remount, adb shell mount -o rw,remount /system or whatever.
Step 3: cd to a clean directory, say MTKGPS.
Step 4: adb pull the following files:
Code:
/system/etc/gps.conf
/system/etc/agps_profiles_conf.xml
/data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
Careful with that last one, it appears in more than one place but it is the com.mediatek.lbs.em version we want
Note the file permissions for these files as they stand on your particular ROM.
Code:
-rw-r--r-- root root 164 2014-06-19 18:29 gps.conf
-rw-r--r-- root root 9502 2014-06-20 15:29 agps_profiles_conf.xml
-rw-rw---- u0_a39 u0_a39 2659 2014-06-20 20:21 agps_profile.xml or
-rw-rw---- 10039 10039 2659 2014-06-20 20:21 agps_profile.xml
The owner of the agps_profile.xml file should be the user's UID. It may be different on your handset. Check it first, please. If any of these differ on your ROM, use the permissions on yours as canonical. This is just a guide.
Step 5: Now we're going to do what FasterGPS does, only a bit more. Edit the gps.conf to look something like this:
Code:
NTP_SERVER=<your country>.pool.ntp.org
SUPL_HOST=supl.nokia.com
SUPL_PORT=7275
INTERMEDIATE_POS=1
ACCURACY_THRES=5000
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_USER_PLANE=TRUE
Purists will note I'm using Nokia's SUPL server here. A little research tells me that Google's SUPL is, well, it's a bit pants - and not just because it's one more way they get PII from you. YMMV, beware of the leopard, and so forth. If you want to use the chocolate factory's SUPL, just swap the SUPL_HOST line to supl.google.com.
Save the file.
Step 6: Now let's undo the mistakes of the manufacturer. Unfortunately we have to delve into some unholy XML for this but don't worry, it's not that difficult despite how daunting the file looks in a text editor. Open agps_profile.xml in your editor.
Make sure the following lines (amongst loads of others that should be left alone) appear as shown:
Code:
<int name="slp_port" value="7275" />
<string name="slp_code">NOKIA</string>
<boolean name="agps_enable" value="true" />
<string name="slp_addr">supl.nokia.com</string>
That's the barebones. Don't exit the file yet. Locate the following lines:
Code:
<float name="nTargetAreaGeolat" value="nn.nnnnn" />
<float name="nTargetAreaGeolng" value="nn.nnnnn" />
See the problem? Try sticking the co-ords from your file into an online mapper. These are passed to the SUPL server no matter what CellID your phone reports. Worse, if you have no cellular radio, it's taken as gospel so you get ephemeris for the middle of China. Useful. This is why cold start takes even longer than it would on a standalone GPS from cold.
Now, what we need to do is set those up for your general location. It doesn't need to be point precise, just a general 0.1 degree lat and long.
IMPORTANT: If you are West of the Meridian, you need to do some jiggery-pokery with your longitude. This file treats the world as a 360 degree ball, so you need to subtract your longitude from 360. For example, if you're 4 deg W of Greenwich, your longitude would be 356.0. 110.3W equates to 249.7. Yes, this number drops as your longitude goes up if you're West.
Save this file.
Step 7: Now let's edit the agps_profiles_conf.xml. This one's fairly easy, just change the end to look like this, with the usual GOOGLE in default_profile if that's your bag:
Code:
<agps_conf_para
agps_enable="yes"
ca_enable="no"
cdma_agps_preferred="0"
cp_auto_reset="no"
cp_gemini_pref_sim="1"
cp_up_selection="up"
default_cdma_profile="CDMA1"
default_profile="NOKIA"
disable_after_reboot="no"
ecid_enable="yes"
gpevt="no"
log_file_max_num="10"
ni_request="yes"
notify_timeout="8"
roaming="yes"
si_mode="mb"
supl_version="1"
verify_timeout="8"
/>
</agps_profiles>
Note cp_gemini_pref_sim can be set to 2 if that's your main SIM that usually has a signal. It is used as the CellID source for aGPS, not the data connection the aGPS data is fetched on.
Save the file.
Step 8: Push the files back with adb and set up their ownership and permissions:
Code:
adb remount
adb push gps.conf /system/etc/gps.conf
adb push agps_profiles_conf.xml /system/etc/agps_profiles_conf.xml
adb push agps_profile.xml /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chown 10039:10039 /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chmod 660 /data/data/com.mediatek.lbs.em/shared_prefs/agps_profile.xml
adb shell chmod 644 /system/etc/agps_profiles_conf.xml
adb shell chmod 644 /system/etc/gps.conf
Step 9: Reboot and retry your GPS. Once you have checked everything is working, you can re-enable EPO, clear the aGPS data in Engineering Mode and try again just to verify I'm not talking out of my backside. EPO really doesn't help in this guise, at least not in the UK.
In conclusion, these can be made to work. With these changes in place I can get an indoor lock in airplane mode in just under ten seconds a day and a reboot after last using the GPS. You need a rooted device and some bright spark will no doubt automate all of this - I'm no Android hacker so don't look at me. GravityBox would be my guess as it's developed at a remarkable pace - thanks for the app, BTW
I do hope this works for everyone. It would be nice to put this one to bed once and for all. A final note: There may be errors in this. I'm only human. Check, double check, triple check, take backups, all the usual stuff. Flames to /dev/null, please.
Click to expand...
Click to collapse
GPS works ok for me without any change, but will be very slow to start without AGPS which requires a SIM card, or wifi connection. Of course you generally don't have access to AGPS inside an airplane in an underground place or anywhere radio waves can't enter, etc.
I have a 40 acre property I want to start exploring and map out points of interest as well as plot where I want to build. Also want to ensure I'm on the property in first place and not venture too far off. Looking for an app that lets me draw lines etc by GPS coords so I can set a boundary, and then also be able to draw in the field, add markers of my current location etc... just general drawing either via manual place, or via coords. I can't seem to find anything and my search comes mostly empty. I found some apps that would maybe work according to the description but they are super old and crash as soon as I try to use them. I'm running CalyxOS, so it would need to be something in the Fdroid store or something that allows me to download an APK.
Any suggestions for something that would work for what I want?