[HTC EVO 3D] evilvoice:
Okay, well, using MrGregs info in the Hero forum, I have managed to get Roam Only built into the Phone apk. This should allow you to switch to Roam only from Roaming under Wireless & Networks - Mobile Networks.

Issues:

when you select Roam Only, the button does not stay pressed, it is selected, but does not show it, the other 2 options stay checked, just not this one.

It takes a while to switch to Roam Only

Without using the prl trick, you will only be using 1X data...while I believe this is true, I have found that sometimes while roaming, I will have the 3g icon.

This was done to the synergy Phone.apk, so you should be using that Rom. If any other developers want support, I can lay out what I did. This was done with MrGregs info, but I was having issues getting the Phone.apk to decompile to edit. I figured out how to use 2 tools to accomplish this...again, I deserve no credit, as I did not figure out the edits myself.

To enable this, dump Phone.apk to the same directory as adb. Open a command prompt and change directory to your adb folder.

adb shell sysrw
adb shell mount (check and make sure system is rw)
adb shell rm /system/app/Phone.apk
adb push Phone.apk /system/app/Phone.apk
adb shell
cd /system/app
chmod 644 Phone.apk
ls -l (check and make sure that all your files are -rw-r--r--
reboot

when your phone reboots, you can go to Wireless & networks -> Mobile Networks -> Roaming -> Roam Only

Wait for the triangle to appear

Open Phone and dial *2 - Sprint Zone should come up (if it doesnt its because you dont have it installed) and your voice and data should be green. Click on call sprint and it should give you a prompt for a voice roaming call. Done. I had a red mark for voice until I rebooted, then it was green. To switch back, change Roam Only to Automatic or Sprint Only.

Hope someone finds this useful

If there is an issue, let me know. I know I cant fix it, but if I can get some devs to jump on this, maybe they can fix whatever is wrong. There is one thing that worries me and that is the original Phone.apk I used is 1MB larger than this one, maybe better compression?

Method for doing this yourself:

1. Download phone.apk.diff.zip from here

2. Also download baksmali, smali, and apktool - google should find these pretty easily, if there is a comment, I can post links (remove the -1.2.8 from the jar files).

3. Move these to a location (from here on, I will refer to this location as ANDW)

4. From you rom, grab Phone.apk, com.htc.resources.apk, framework-res.apk and move these to ANDW.

5. Make a backup of Phone.apk -> Phone.bak

6. Extract classes.dex from Phone.apk (only that file is needed, so I opened Phone in 7zip and dragged classes.dex to ANDW)

7. Extract phone.apk.diff.zip (should have 3 files)

8. Open an elevated command prompt and run this command from your location:

java -Xmx512m -jar baksmali.jar classes.dex

9. Goto out\com\android\phone

10. Open CdmaRoamingListPreference$MyHandler.smali in a text editor (preferably Notepad ++)

11. Search for

const/4 v3, 0x3

and change to

const/4 v3, 0x1

12. Save file

13. Open CdmaRoamingListPreference.smali

14. Search for

const/4 v2, 0x3

and change to

const/4 v2, 0x1

14a. for each of these const/4 v2, 0x* MrGreg made comments for each one 2=automatic, 4=sprint only, 1=roam only, you can make these comments is you want, also make them for the pswitch grouping a few lines down if you are going to do that. His changes are in the diff.zip

15. Save file

16. Go back to your elevated command prompt and run this command

java -Xmx512m -jar smali.jar out -o classes.dex
apktool if framework-res.apk
apktool if com.htc.resources.apk
apktool d -s Phone.apk

17. Goto Phone\res\values and open arrays.xml in your editor

18. Search for

<string-array name="cdma_system_select_choices_sprint">

and add a new line after "Sprint Only"

19. Insert this line in the new line

<item>Roam only</item>

20. Search for

<string-array name="cdma_system_select_values_sprint">

and insert this in a new line under "0"

<item>3</item>

21. Save file

22. Run this from an elevated command prompt

apktool b Phone

22. Goto Phone\dist and open Phone.apk in 7zip.

23. Open Phone.bak in 7zip also...so you should have an explorer window set to your location and 2 7zip windows (one with the newly created Phone.apk from apktool and Phone.bak that is a backup of Phone.apk original from your rom)

24. In the explorer window, drag your newly created classes.dex into the Phone.bak 7zip window and drop (yes overwrite...if you want, delete both classes.dex and resources.arsc, that way there isnt an issue)

25. In your Phone.apk 7zip window, drag resources.arsc to the Phone.bak 7zip window and drop

26. Save Phone.bak and change the extension to Phone.apk

27. You are now done and can cleanup everything but your new Phone.apk

I am doing most of this from memory as I want to get this out for those that want to do this...I will be redoing the edits with these instructions and see if everything is correct.

The reason you want to drag and drop into your original Phone.apk/bak is because you can not resign system apks...this method bypasses that issue.

Please give credit to MrGreg