[MOD]/[HOWTO] Make E4GT ROMs show 1X/3G instead of just 3G! (EG30) |NEW METHOD|

Search This thread

stangdriverdoug

Senior Member
May 27, 2009
1,289
82
Cleveland
Ok, So I opened up with note pad, found line 1567 and changed it. So I ran:

apktool b SystemUI SystemUIfixed.apk

c:\working folder\SystemUI\res\values\public.xml:98: error: Public symbol drawab
le/stat_sys_data_fully_out_3g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:99: error: Public symbol drawab
le/stat_sys_data_fully_out_4g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:100: error: Public symbol drawa
ble/stat_sys_data_fully_out_e declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:101: error: Public symbol drawa
ble/stat_sys_data_fully_out_g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:102: error: Public symbol drawa
ble/stat_sys_data_fully_out_h declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:103: error: Public symbol drawa
ble/stat_sys_data_fully_out_h_plus declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:104: error: Public symbol drawa
ble/stat_sys_data_in_1x declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:105: error: Public symbol drawa
ble/stat_sys_data_in_3g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:106: error: Public symbol drawa
ble/stat_sys_data_in_4g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:107: error: Public symbol drawa
ble/stat_sys_data_in_e declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:108: error: Public symbol drawa
ble/stat_sys_data_in_g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:109: error: Public symbol drawa
ble/stat_sys_data_in_h declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:110: error: Public symbol drawa
ble/stat_sys_data_in_h_plus declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:111: error: Public symbol drawa
ble/stat_sys_data_inandout_1x declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:112: error: Public symbol drawa
ble/stat_sys_data_inandout_3g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:113: error: Public symbol drawa
ble/stat_sys_data_inandout_4g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:114: error: Public symbol drawa
ble/stat_sys_data_inandout_e declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:115: error: Public symbol drawa
ble/stat_sys_data_inandout_g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:116: error: Public symbol drawa
ble/stat_sys_data_inandout_h declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:117: error: Public symbol drawa
ble/stat_sys_data_inandout_h_plus declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:118: error: Public symbol drawa
ble/stat_sys_data_out_1x declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:119: error: Public symbol drawa
ble/stat_sys_data_out_3g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:120: error: Public symbol drawa
ble/stat_sys_data_out_4g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:121: error: Public symbol drawa
ble/stat_sys_data_out_e declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:122: error: Public symbol drawa
ble/stat_sys_data_out_g declared here is not defined.
c:\working folder\SystemUI\res\values\public.xml:123: error: Public symbol drawa
ble/stat_sys_data_out_h declared here is not defined.


I edited a lot of this out because it made the post so long.
 
Last edited:

s14tam

Senior Member
Nov 30, 2007
124
16
tried to follow the instructions but ended up with a booty load of errors so instead I just used your pre-edited SystemUI.apk file. Confirmed working on stock ROM with LoStKernel
 

strongsteve

Inactive Recognized Themer
Apr 1, 2008
5,203
16,762
Dallas, TX
Samsung Galaxy S22 Ultra
I gave this a go on starburst 1.6 What I did was take your uploaded systemUI and used 7zip to replace the png's with those of the starburst systemUI. In theory it should have worked, however when I tried to put in 1X mode it remained on 3G icon :( Perhaps I replaced the 1X icon with 3G icons from the edit I made?

Thanks

I did the same thing because I am using a personally themed odex'd rom. I used this one, copied my pngs to res, and then odexed with dexopt-wrapper. I still only get the 3x. Is there a png that has to be fixed or do I really have to do the smali edit?

EDIT.. NEVERMIND

I got it. I had to odex it first and then change out the pngs that I use.
 
Last edited:

nivron

Senior Member
Oct 21, 2010
933
774
Orlando, Florida
I appreciate everyone trying these instructions out. Unfortunately there is apparently a big difference between attempting this via Linux and Windows.

I have re-written the instructions using smali/baksmali. I have successfully tested the steps above using StarBurst v1.6 and had NO errors. :)

I'm sorry if the earlier instructions made things difficult. Please try this new method and let me know how it works for you!

Please note that the code you are searching for has changed due to this other method of disassembly.
 
Last edited:
  • Like
Reactions: xak944

xak944

Senior Member
Jun 9, 2010
379
211
North Carolina
Google Pixel 7
I have re-written the instructions using smali/baksmali. I have successfully tested the steps above using StarBurst v1.6 and had NO errors. :)

I can confirm this is working on StarBurst 1.6. Followed your instructions to a tee and worked on the first try (Ubuntu)! Thanks for the writeup, it's top notch. :D

Now I realize why my "3G" service has been so slow at work: My phone is constantly connecting at 1x! (My old Evo and all coworkers' phones on Sprint are speeding along on 3G right next to mine). :( Now on to troubleshoot the real problem which I wouldn't have been able to identify without your help. Thank you!
 

manekineko

Senior Member
Jul 26, 2009
1,005
229
Any chance you could make a version/add instructions for how to disable the battery charged notification?

The reason I ask here is because this would also be a modification to SystemUI.apk, and thus would need to be integrated with this in order to work.

I see they got this working on the regular Galaxy S2 by modifying SystemUI.apk
http://xdaforums.com/showthread.php?t=1070506
 
Last edited:
  • Like
Reactions: nivron

warrenis1234

Senior Member
May 21, 2008
319
51
Brooklyn
wait im sorry.. and this may have been asked or specified in the original post so i apologize for the potential repeater

.... does this actually provide the ability to use a slower, weaker signal, that uses less battery power like 1x/edge?
 

nivron

Senior Member
Oct 21, 2010
933
774
Orlando, Florida
wait im sorry.. and this may have been asked or specified in the original post so i apologize for the potential repeater

.... does this actually provide the ability to use a slower, weaker signal, that uses less battery power like 1x/edge?

This mod only allows you to see when you are in 1x service. Otherwise you will still see 3G even if you are really on 1x. The phone switches between 3G and 1x either way.

Sent from my SPH-D710 using Tapatalk
 
  • Like
Reactions: warrenis1234

nivron

Senior Member
Oct 21, 2010
933
774
Orlando, Florida
Any chance you could make a version/add instructions for how to disable the battery charged notification?

The reason I ask here is because this would also be a modification to SystemUI.apk, and thus would need to be integrated with this in order to work.

I see they got this working on the regular Galaxy S2 by modifying SystemUI.apk
http://xdaforums.com/showthread.php?t=1070506

Thanks for finding this. I plan on looking into this and some other mods as well. I'll either update this or create a new thread with anything I find.
 

kain144000

Senior Member
Jan 19, 2008
335
24
::bump::

Could some1 help me out w/ instructions for an ODEX'd Stock EL29 ROM? The lack of 1x noti's a real pitty of a PitA.
 

dtm_stretch

Senior Member
Dec 22, 2010
477
163
Albany
Thanks for the guide, this is an nice easy first step into smali edits.

Attached is the EL29 SystemUI with the fix if anyone wants it.
 

Attachments

  • SystemUI.apk
    322.5 KB · Views: 10

diegolopez10

Senior Member
Aug 16, 2009
294
64
Houston
Samsung Galaxy S4
i9100
Nivron, will something like this work to get rid of the roaming indicator? I have an issue on my Dinc, when im on my home area, where I know for sure I have 3G, but instead I have the roaming indicator. I haven't found a solution to this, and its very annoying. The thing is, whenever I'm not in my home area, I have the 3G/1X icon.

Sorry for posting this question here, but I'm desperate for a solution to this.

Thanks

Sent from my Transformer TF101 using xda app-developers app
 

nivron

Senior Member
Oct 21, 2010
933
774
Orlando, Florida
If you are getting the roaming indicator and NOT the 1x/3G icons, it seems that you may not have data. If that is the case, you need to check to see if roaming data is enabled. For this phone, for example, when roaming, with or without this mod, you should see 3G (if not patched) or 1x (if patched) along with the roaming triangle.

If your home area is not supposed to be roaming, I'd contact your carrier to find out what is going on. For Sprint users, there are PRLs that will make it so when you are actually roaming, the phone will treat it as a home network. I'm not sure about your particular circumstances, however.

Nivron, will something like this work to get rid of the roaming indicator? I have an issue on my Dinc, when im on my home area, where I know for sure I have 3G, but instead I have the roaming indicator. I haven't found a solution to this, and its very annoying. The thing is, whenever I'm not in my home area, I have the 3G/1X icon.

Sorry for posting this question here, but I'm desperate for a solution to this.

Thanks

Sent from my Transformer TF101 using xda app-developers app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Update 05/30/12
    Click here for the ICS version!

    Greetings and Salutations, Epic 4G Touch Owners and other curious parties!

    UPDATE!!!!!
    Method now uses smali/baksmali to avoid errors with apktool.

    Disclaimer: Just reading this may cause your head to burst, your phone to catch fire, dogs and cats may do the tango! I am not responsible for any bad stuff that happens from you reading or acting on the information in this thread.

    If any ROM authors want to use this fix in their ROMs, I'm completely cool with that. A quick kudos in your credits section would be nice, though. :cool:

    Background: One of the things that really peeves me off about Sprint is that they want us to think we always have 3G service. I know that I don't have 3G in all of the areas I travel, and I also don't when I am roaming.

    Thankfully, the fix is quite simple! It was a bit more difficult than the fix for HTC Sense ROMs as the smali edit was not quite as simple.

    This was my primary reason for rooting my phone, that's how aggravating it is for me. :eek:

    Let's change this:
    sc20111017143708.png


    To this:
    sc20111017151702.png


    Credits
    crawrj - For providing the stock ROM for me to fiddle with.

    Calkulin - (indirectly) helped me find how to fix this for Sense ROMs which I wrote up here.

    Samsung - for a relatively good phone. Hopefully the weird auto-brightness and battery life will be fixed next update.

    The brave XDA members who try these instructions and report their success or failure!!!

    XDA for being a great source of information!!!

    XDA members for thinking outside of the box!!!


    The fix:
    This fix requires editing your SystemUI.apk file. If you are using one of the fine custom ROMs on XDA, be aware that the you or the author may have already made changes to the SystemUI.apk file, so using my file IS NOT RECOMMENDED.

    If you are using the Stock Deodexed EG30 ROM, you can safely use my attached SystemUI.apk file. It may work with other "stock" ROMs, but this is the one I based it on.


    This mod relies on the assumption that your ROM developer has not deleted any of the 1x graphic files in the ROM. The developer CAN theme or otherwise change the images as long as the file names remain the same.

    What you need to perform this mod:
    1. An Epic 4G Touch ROM ZIP file, or a phone running a Epic 4G Touch ROM -- AOSP ROMs already have the correct indicators.
    2. The Java SDK -- So you can run Smali.
    3. Smali/Baksmali -- So you can decompile/compile the classes.dex file.
    4. Android SDK -- To push/pull files from your phone (adb only).
    5. Some sort of archive tool (such as WinRAR, 7zip, etc).
    5. A text editor capable of editing UNIX-formatted files. I recommend Notepad++, personally.

    Ease Of Use Tips: Install Java SDK first, then Android SDK (if you need adb). Download the smali files (smali-1.2.8.jar and baksmali-1.2.8.jar at the time of this writing) to a new "working" folder where we can do our magic.

    KEEP A COPY OF YOUR PRE-EDITED SYSTEMUI.APK FILE, just in case!

    Instructions:
    1a. [If you are using a ROM ZIP File]: Use 7zip/WinRAR/WinZip to open the ROM ZIP file. Navigate to system\app and extract SystemUI.apk to your "working" folder.

    1b. [If you want to grab SystemUI.apk from your running phone]: Use adb to pull SystemUI.apk to your working folder. Example: adb pull /system/app/SystemUI.apk C:\Working\SystemUI.apk

    To avoid problems, ONLY USE adb to pull/push SystemUI.apk. Phone apps may cause unknown issues.

    2. Open SystemUI.apk in 7zip/WinRAR/WinZip (it's really a ZIP file) and extract classes.dex to your "working" folder.

    3. Go to a command prompt in your "working" folder and run the following command: java -jar baksmali-1.2.8.jar -o SystemUI/ classes.dex

    4. Browse to your "working" folder and see that there is now an SystemUI folder inside, with other subfolders. Browse to SystemUI\smali\com\android\systemui\statusbar\policy.

    5. Edit the file called StatusBarPolicy.smali with your favorite UNIX-format compatible text editor and look for the following text. The key is to search for .line 1567. Edit the line below that is in BOLD.
    Code:
        .line 1567
        :pswitch_5e
    [B]    sget-object v0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sDataNetType_3g:[[I[/B]
    
        iget v1, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mInetCondition:I
    
        aget-object v0, v0, v1
    
        iput-object v0, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mDataIconList:[I
    
        goto :goto_23

    5. Change that line to say sget-object v0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sDataNetType_1x:[[I

    7. Save StatusBarPolicy.smali

    8. Go back to your command prompt, change to your "working" folder and issue the following command: java -jar smali-1.2.8.jar SystemUI/ -o newclasses.dex

    9. If there weren't any errors, go ahead and rename the original classes.dex to classes.old and rename newclasses.dex to classes.dex.

    10. Open SystemUI.apk in your favorite archiver (if you closed it earlier).

    11. Drag the file called classes.dex from your "working" folder into SystemUI.apk and replace the one already in there.

    12. Run the following commands to get the file on your phone:
    Code:
    adb remount
    adb push SystemUI.apk /system/app/SystemUI.apk
    adb shell stop
    adb shell start

    You should hear your bootup sound and then the changes should be instantly applied.


    To Test:
    1. Dial ##DEBUG# (##33284#) on your phone.
    2. Enter your MSL (can be found by typing getprop ril.MSL from Terminal Emulator or adb shell).
    3. Scroll to Others at the bottom of the list.
    4. Click on HDR/1X Selection
    5. Change from Hybrid Mode to CDMA Only Mode. This puts your phone in 1X only mode.
    6. Press OK.
    7. Verify 1X icon comes within 30 seconds, if you have service.
    8. Repeat steps 4-7, substituting Hybrid Mode for CDMA Only Mode to switch back.

    How I found this: Looking through a logcat as I tried to determine which of the many toggles in smali was responsible for 1x, I noticed that the line saying StatusBarPolicy( 6238) onDataconnectionStateChanged-S:1 T:6. When it would go back to 3G, it was S:1 T:7. Hence my choice of pswitch6.

    Please let me know whether or not this worked for you. I'd like to make a list of ROMs (with applicable mods) this works for or doesn't work for.

    I will do whatever I can to help if you are struggling. :) If there's something you don't understand, please let me know. I can update the instructions if I accidentally wrote something wrong.
    2
    Ok, another question...When I navigate to the statusbarpolicy.smali to try and edit it, I get a pop up window saying "windows dosen't recogize this program" So what program do I need installed to open this type of file?

    nivron should put a prerequisite in op: Basic knowledge of CLI and Notepad

    but yeah, edit that file with notepad++, not double click it and see what happens.
    2
    Having a little trouble. In the command prompt I ran this step:

    apktool if framework-res.apk and apktool d SystemUI.apk

    Those are supposed to written in two different lines:

    apktool if framework-res.apk [ENTER]
    apktool d SystemUI.apk [ENTER]
    1
    Changelog
    10/18/11 - Changed from apktool method to baksmali method because of Windows issues with apktool.
    1
    Could some1 help me out w/ instructions for an ODEX'd Stock EL29 ROM? The lack of 1x noti's a real pitty of a PitA.

    In EL29, the line has moved down from .line 1567 to .line 1588.

    The easiest thing is to just search for the "pswitch_5e".

    All the other steps to mod this for EL29 are identical to EG30.