[MOD][GUIDES] How To Enable Unrestricted Native | Bluetooth Tethering - T-Mobile Samsung Galaxy Note 3

Hello to all Developers and XDA members! I have come here to give you a few guides for some tethering mods, you just have to follow the instructions below so you can learn on how you can do it!
NOTE: This is an updated guide based on my guide that I have done a while ago here -> CLICK HERE, just updated for Kitkat.
What Is Required...
★ First you need to have experience and know how to decompile/recompile apks with Apktools, apkmanager, smali, and baksmali
★ Have 7-zip installed onto your computer/laptop
★ Make sure you have Notepad++ also installed!
★HOW TO ENABLE NATIVE TETHERING WITHOUT RESTRICTIONS★
STEP 1
★ Go into your system/framework folder and take out your "framework-res.apk"
★ Then use one of the applications such as apktools and then use the commands to decompile the framework-res.apk
★ Once you have decompiled the framework-res.apk, go to:
res/values/arrays.xml
Click to expand...
Click to collapse
Now open up "arrays.xml" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"]<string-array name="config_mobile_hotspot_provision_app">[/COLOR]
NOW REMOVE:
Code:
[COLOR="Red"] <string-array name="config_mobile_hotspot_provision_app">
<item>com.sec.tetheringprovision</item>
<item>com.sec.tetheringprovision.TetheringProvisionActivity</item>
</string-array>[/COLOR]
AND CHANGE TO:
Code:
[COLOR="Blue"]<array name="config_mobile_hotspot_provision_app" />[/COLOR]
ONCE DONE, IT WILL LOOK SOMETHING LIKE THIS:
Code:
<array name="config_tether_dhcp_range" />
[COLOR="Blue"]<array name="config_mobile_hotspot_provision_app" />[/COLOR]
<integer-array name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>4</item>
<item>5</item>
<item>7</item>
</integer-array>
Now recompile your framework-res.apk using apktools and your DONE!!!
NOTE: Remember by removing those "com.sec.tetheringprovision" lines in the arrays.xml, it bypasses all the checks, There will be no more popup message that's telling you to upgrade to a T-Mobile Hotspot Plan, and you will get no errors!. There is no need for any third party apps or creating a APN just to have Tether to work properly!
STEP 2
The next step that your going to have to do is go into your roms:
system/app
Click to expand...
Click to collapse
folder and then remove these two apks:
TetheringAutomation.apk
Click to expand...
Click to collapse
TetheringProvision.apk
Click to expand...
Click to collapse
The TetheringAutomation.apk and TetheringProvision.apk is no longer needed, so delete it.
STEP 3
Now for this step, this is going to give you the opportunity to edit/remove the locked APNS And also it will show you how you can see any of the hidden APN's from the "Access Point Names" Menu which is in Settings -> Connections -> More Networks -> Mobile Networks -> Access Point Names. Also this step your going to have to change the APN site name which makes you tether without bringing you into the T-Mobile Hotspot Browser Page.
First your going to have to go into your roms folder which is:
system/csc
Click to expand...
Click to collapse
And then open up "customer.xml" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"]<ProfileName>T-Mobile US LTE</ProfileName>[/COLOR]
NOW REMOVE:
Code:
<NetworkName>T-Mobile</NetworkName>
[COLOR="Red"]<Editable>no</Editable>[/COLOR]
<EnableStatus>enable</EnableStatus>
[COLOR="Green"]<ProfileName>T-Mobile US LTE</ProfileName>[/COLOR]
<Auth>none</Auth>
<MTUSize>1440</MTUSize>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
[COLOR="Red"]<IpVersion>ipv6</IpVersion>[/COLOR]
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
<APN>fast.t-mobile.com</APN>
</PSparam>
</Profile>
<Profile>
AND CHANGE TO:
Code:
<NetworkName>T-Mobile</NetworkName>
[COLOR="Blue"]<Editable>yes</Editable>[/COLOR]
<EnableStatus>enable</EnableStatus>
[COLOR="Green"]<ProfileName>T-Mobile US LTE</ProfileName>[/COLOR]
<Auth>none</Auth>
<MTUSize>1440</MTUSize>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
[COLOR="Blue"]<IpVersion>ipv4</IpVersion>[/COLOR]
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
<APN>fast.t-mobile.com</APN>
</PSparam>
</Profile>
<Profile>
NOW SEARCH FOR:
Code:
[COLOR="Green"]<ProfileName>T-Mobile Tethering</ProfileName>[/COLOR]
NOW REMOVE:
Code:
<NetworkName>T-Mobile</NetworkName>
[COLOR="Red"]<Editable>no</Editable>[/COLOR]
<EnableStatus>enable</EnableStatus>
[COLOR="Green"]<ProfileName>T-Mobile Tethering</ProfileName>[/COLOR]
<Auth>none</Auth>
<MTUSize>1440</MTUSize>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
[COLOR="Red"]<APN>pcweb.tmobile.com</APN>[/COLOR]
</PSparam>
</Profile>
<Profile>
AND CHANGE TO:
Code:
<NetworkName>T-Mobile</NetworkName>
[COLOR="Blue"]<Editable>yes</Editable>[/COLOR]
<EnableStatus>enable</EnableStatus>
[COLOR="Green"]<ProfileName>T-Mobile Tethering</ProfileName>[/COLOR]
<Auth>none</Auth>
<MTUSize>1440</MTUSize>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
[COLOR="Blue"]<APN>fast.t-mobile.com</APN>[/COLOR]
</PSparam>
</Profile>
<Profile>
Now what your doing is changing where it says <Editable>no</Editable> into <Editable>yes</Editable>. By changing this, this will give you the permission to edit/remove this APN setting. Next your going to change <IpVersion>ipv6</IpVersion> to <IpVersion>ipv4</IpVersion>. When the APN protocol is on ipv6 I couldn't get Tethering to play nicely when tethering my device to my PC, once I have changed the APN Protocol to ipv4 it worked perfectly! Also you can change <IpVersion>ipv6</IpVersion> to <IpVersion>ipv4v6</IpVersion>, It has also worked for me so try which one works best for you. Once your done with that go to where it says <APN>pcweb.tmobile.com</APN> and change it into <APN>fast.t-mobile.com</APN>. By changing this APN site name it should give you total access for you to tether without bringing you into the T-Mobile Hotspot Browser Page from your PC's internet browser. If <APN>fast.t-mobile.com</APN> isn't working for you change it to <APN>epc.tmobile.com</APN>. I believe fast.t-mobile.com has to do with LTE and epc.tmobile.com has to do with No LTE.
Now save this file with the new edits with Notepad++ and your DONE!
But your not done yet with this step, The Tethering APN that you have modified from "above" is still hidden. Now what your going to have to do is go into your roms folder again to:
system/csc
Click to expand...
Click to collapse
And then open up "feature.xml" with your notepad++ for editing.
Now with Notepad++ go and find:
<CscFeature_Setting_HideApnList>pcweb.tmobile.com,ims</CscFeature_Setting_HideApnList>
Click to expand...
Click to collapse
Now DELETE THIS WHOLE LINE! [This csc feature hides the T-Mobile Tethering APN that you have modified from above from view]. By removing it completely it will now show in "Settings -> Connections -> More Networks -> Mobile Networks -> Access Point Names". Once done save your changes with Notepad++ and your DONE!
STEP 3
★ Go into your system/framework folder and take out your "services.jar"
★ Then use one of the applications such as a baksmali tool and then use the commands to baksmali the services.jar
★ Once you have decompiled the services.jar, go to:
smali/com/android/server/connectivity/Tethering.smali
Click to expand...
Click to collapse
Now open up "Tethering.smali" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"]const-string v1, "Set dun requiered as 1"[/COLOR]
NOW REMOVE:
Code:
.line 1827
:try_start_a1
iget-object v0, p0, Lcom/android/server/connectivity/Tethering;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string/jumbo v1, "tether_dun_required"
[COLOR="Red"]const/4 v2, 0x1[/COLOR]
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Secure;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 1828
const-string v0, "Tethering"
[COLOR="Green"]const-string v1, "Set dun requiered as 1"[/COLOR]
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_b5
.catchall {:try_start_a1 .. :try_end_b5} :catchall_f6
NOW CHANGE TO:
Code:
.line 1827
:try_start_a1
iget-object v0, p0, Lcom/android/server/connectivity/Tethering;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string/jumbo v1, "tether_dun_required"
[COLOR="Blue"]const/4 v2, 0x0[/COLOR]
invoke-static {v0, v1, v2}, Landroid/provider/Settings$Secure;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
.line 1828
const-string v0, "Tethering"
[COLOR="Green"]const-string v1, "Set dun requiered as 1"[/COLOR]
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_b5
.catchall {:try_start_a1 .. :try_end_b5} :catchall_f6
STILL HAVING PROBLEMS WITH TETHERING EVEN AFTER THE MOD? - Go into "Settings -> Connections -> More Networks -> Mobile Networks -> Access Point Names" and then press your phone's "Menu Settings Key" on the bottom left of your phone and then select "Reset To Default" and see if that helps.
★HOW TO ENABLE BLUETOOTH TETHERING★
This guide will show you how you can enable bluetooth tethering so here is how you can do it!
STEP 1
★ Go into your system/framework folder and take out your "framework-res.apk"
★ Then use one of the applications such as apktools and then use the commands to decompile the framework-res.apk
★ Once you have decompiled the framework-res.apk, go to:
res/values/arrays.xml
Click to expand...
Click to collapse
Now open up "arrays.xml" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"]<array name="config_tether_bluetooth_regexs" />[/COLOR]
IT WILL LOOK SOMETHING LIKE BELOW:
Code:
<array name="config_tether_wimax_regexs" />
[COLOR="Green"]<array name="config_tether_bluetooth_regexs" />[/COLOR]
<array name="config_tether_dhcp_range" />
NOW REMOVE:
Code:
<array name="config_tether_wimax_regexs" />
[COLOR="Red"]<array name="config_tether_bluetooth_regexs" />[/COLOR]
<array name="config_tether_dhcp_range" />
AND CHANGE TO:
Code:
<array name="config_tether_wimax_regexs" />
[COLOR="Blue"]<string-array name="config_tether_bluetooth_regexs">
<item>bnep\\d</item>
<item>bt-pan</item>
</string-array>[/COLOR]
<array name="config_tether_dhcp_range" />
Once done save changes, recompile your framework-res.apk using apktools and your DONE!
After step 1 the Bluetooth Tethering setting will now show in "Settings -> Connections -> Tethering And Mobile Hotspot". Even while enabling the setting Bluetooth Internet Access Connection will still not work and the Bluetooth Internet Access setting in the Paired Bluetooth Device menu will not show on any device that your trying to pair with which seems to only work on Sprint/International Note 3 Variants. I have gotten it to work on Jellybean and also I have gotten it to work on Kitkat firmware on our T-Mobile Note 3 Device (Should also work for ATT/Verizon Note 3 devices) which is so simple to do so go to step 2 below on how I got it to work!
STEP 2
1. To get Bluetooth Tethering Internet Access to work, your going to need to get any stock International based firmware/rom that is already deodexed/odexed! REMEMBER: GET IT ONLY FROM THE INTERNATIONAL VARIANT! Make sure your getting it from the same android version that your device is on so if your on T-Mobile and your latest updated stock firmware is 4.4.2 Kitkat (N900TUVUDNF1), your going to need to download the latest stock 4.4.2 Kitkat firmware from http://www.sammobile.com or get it from the International thread related to your specific device "Note 3".
Just As A Reference For This Part Of The Guide: The International SM-N9005 stock 4.4.2 Kitkat firmware from sammobile that I have downloaded is (N9005XXUFNF4).
Now once you get it deodexed (Or get any rom that is based off of N9005XXUFNF4), your going to have to go into the roms folder and go to:
KITKAT...
system/lib/hw
Click to expand...
Click to collapse
and take the bluetooth.default.so file from the International based rom, and add it into your T-Mobile/ATT/Verizon rom and your DONE! No smali work, no decompiling apks, nothing just overwrite that file to the same location into your rom and THAT'S ABOUT IT! If your on Jellybean, the file is renamed differently, check below!
JELLYBEAN...
system/lib/hw
Click to expand...
Click to collapse
and take the bplus.default.so file from the International based rom, and add it into your T-Mobile/ATT/Verizon rom and your DONE!
NOTE #1 - Because there are many International firmwares out based from the same android version, your going to have to download a few to get the right one.
NOTE #2 - This should work for all Galaxy/Note Samsung Devices And ETC! (Your going to have to test it out on the other devices and let me know.)
IF YOUR ON A N900TUVUDNF1 BASED ROM, FLASH THE FILE BELOW TO GET BLUETOOTH TETHERING (INTERNET ACCESS) TO WORK!
Download Link - CLICK HERE

taking this spot....

taking this one also :good:

Interesting for sure
Sent from my SAMSUNG-SM-N900A using Tapatalk

Thanks a bunch for this guide. Now to get my framework to recompile nicely....

On NF1 will the flash file take care of all the steps ... or it just for Bluetooth tethering?
Sent From Far Far Away !

What is bluetooth tethering used for?

mlock420 said:
What is bluetooth tethering used for?
Click to expand...
Click to collapse
Its connecting your other devices to your phone internet via Bluetooth. Regular tethering but via Bluetooth.
Sent from my SM-N900T using XDA Premium 4 mobile app

mlock420 said:
What is bluetooth tethering used for?
Click to expand...
Click to collapse
Most new wearables use bluetooth like the smartwatch's and stuff. So silly things like the old Gear 1 watch can actually access the play store and basically do everything a phone can like browse the web etc.
Chris

Frickkn sweet guide

thanks jovy, I found this guide was on the Samsung Galaxy S3 site, and yes that is how I learned on how to do this...
thanked all 3 posts...

I am on the latest nf1 and download the zip you provided and can not get blue tooth tethering to work. Any help would be great. Thanks in advance
Sent from my SM-G900W8 using XDA Premium 4 mobile app

Is there a way to make it flashable if your not as savvy with smai/ baksmali, apk tools.

demon28 said:
Is there a way to make it flashable if your not as savvy with smai/ baksmali, apk tools.
Click to expand...
Click to collapse
when I was reading back on Jovys SG S3 thread months ago, he never wanted to create a flashable since it would break other mods that the developers would do on there roms.

Beautiful. Am going to try on my s5 rom

mdiaz33685 said:
when I was reading back on Jovys SG S3 thread months ago, he never wanted to create a flashable since it would break other mods that the developers would do on there roms.
Click to expand...
Click to collapse
That makes sense I guess I'm a have to upgrade my skills. Thanks

I did a quick flashable zip with both unlimited tethering and Bluetooth tethering modifications completed. I have not been able to extensively test, but the phone does boot correctly, and the bluetooth tethering option is available. I am going to test it more tomorrow.
THIS WILL ONLY WORK ON TWEAKED 3 by dwitherell WITH NO THEME INSTALLED!
DO NOT USE WITH ANY OTHER ROMS OR TWEAKED3 + THEME COMBINATIONS!
You can grab the mod zip from http://www.androidfilehost.com/?fid=23578570567719327
If you want to revert the changes download and flash the zip file from http://www.androidfilehost.com/?fid=23578570567719326
Enjoy and many thanks jovy23 for this excellent mod!

Can someone make a flashable zip
Sent from my SM-N900T using XDA Premium 4 mobile app

I believe crackpot created one in the post before..

demon28 said:
I believe crackpot created one in the post before..
Click to expand...
Click to collapse
This for this rom only
Sent from my SM-N900T using XDA Premium 4 mobile app

Related

[HOW TO] Extended Power Menu with no header (reboot / download / recovery)

[HOW TO] Extended Power Menu (reboot / download / recovery) with no header
This HOW TO is rewritten from a French tutorial (HERE) itself rewritten from a XDA tutorial (HERE, and modified using this other one : HERE
Thanks to :
Okarin
untermensch
PaoloM70
Click to expand...
Click to collapse
warnings :
- This tutorial is for people who know what they will do, a mistake can fit your phone unusable so ...
- A modification of system files is always a delicate operation, pay attention and do not rush
Click to expand...
Click to collapse
Prerequisites :
First and foremost, you must master the decompilation / recompilation of APK and JAR using APK_Manager and smali/baksmali.
Click to expand...
Click to collapse
Mod the power menu :
Here is the way to add the options "Reboot", "Recovery" and "Download" to the Power menu (long press the power button)
For this part, we will work on 2 files:
framework res.apk
android.policy.jar
Click to expand...
Click to collapse
You can decompile the first with APK Manager, and the second with baksmali.
1/ framework-res.apk :
Extract it with APK_Manager (extracted in /project folder)
a/ Then, before going any further, you will have to find three new .PNG images to be displayed in the power menu, and name them :
"ic_lock_reboot.png" for reboot menu
"ic_lock_recovery.png" to enter recovery
"ic_lock_download.png" for download Mode
Click to expand...
Click to collapse
Place these 3 images in the : APK_Manager/project/framework-res.apk/res/drawable-hdpi
where you will find the other pictures already in the menu concerned.
It is easier for beginners to add customised icons (like for power off, silent or plane modes icons )after recompilation, using 7zip for example. .
b/ With NotePad + +, edit the file " res/values/strings.xml "
Go to the end of the file, and add before the last line "</resources>", the three lines:
Code:
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="reboot">Reboot</string>
This should give you something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
c/ Save your file.
d/ Now you can recompile the file "framework-res.apk" with APK Manager.
Remember that this is an APK system and delete the "keep/resources.arsc", since we have modified an XML file.
You will have a your moded apk here : "place-apk-here-for-modding/unsignedframework-res.apk"
Warning: You should not have errors when you re-compil. don't forget to add 3 new icons;
e/ using APK-Manager, decompil "place-apk-here-for-modding/unsignedframework-res.apk".
*Go to res/values/public.xml and edit with Notepad ++
*public.xml is auto-generated from others modifications during APK_MANAGER re-compilation. 6 new lines have been added, with 6 new Hex numbers. You will need these numbers later ...
Look for :
Code:
<public type="string" name="reboot" id="[B]0x01040488[/B]" />
<public type="string" name="reboot_recovery" id="[B]0x01040489[/B]" />
<public type="string" name="reboot_download" id="[B]0x0104048a[/B]" />
and for :
Code:
<public type="drawable" name="ic_lock_reboot" id="[B]0x010803d2[/B]" />
<public type="drawable" name="ic_lock_recovery" id="[B]0x010803d3[/B]" />
<public type="drawable" name="ic_lock_download" id="[B]0x010803d4[/B]" />
f/ Now you just have to rename "place-apk-here-for-modding/unsignedframework-res.apk" to "framework-res.apk" and voila!
Edit : never sign a system File using APK_Manager.
Here is the first part ended.
A tip, try this file on your phone, if it restarts fine, then the mod is correct, otherwise you can start over
It is important to test step by step, because it lets you know exactly from witch file comes the error.
2/ Now, we attack the second file "android.policy.jar".
Once decompiled with baksmal, edit the "out/com/android/internal/policy/impl/GlobalActions.smali."
Caution: Do not confuse it with the file "GlobalActions$Action.Smali"
a/ Find the line ".method private createDialog()Landroid/app/AlertDialog;"
then a few lines below, replace "const/4 v9, 0x4" with "const/4 v9, 0x7".
This line indicates the number of menu entries of extinction, we move from 4 to 7 (3 mor entries). You should have this after the changes made:
b/ Then find the line "
Code:
invoke-static {v0}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
" and insert just above:
Code:
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x10803d2
const v4, 0x1040488
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x5
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x10803d3
const v4, 0x1040489
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x6
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$10;
const v3, 0x10803d4
const v4, 0x104048a
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$10;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
You will notice in the code, the previous hex numbers generated. You have to modify the hex numbers quoted with the hex numbers you found in step 2 after decompilation of unsignedframework-res.apk
Warning in this code, the hex numbers have a 0 in less after the "0x" like : 0x1234567... and not 0x011234567 like in string.xml[/COLOR]...
Please not in the code you just added the GlobalActions$8, GlobalActions$9, GlobalActions$10 : you will add files .smali with same name later. If in your firmware GlobalActions$8 is already existing, then modify the "$X" to follow last used number
To help, here's what you should have:
3/ If you want to remove the header of the extended power menu, not having to scroll,
a/ search for ".method private prepareDialog()",
then look a few lines below, you should find "const v4, 0x104014a"
where This hexadecimal digit corresponds to the entry "<public type="string"name="global_actions" id="0x0104014a" /> in the "public.xml" file, which itself refers to the text of the menu in" string.xml " :
b/ find the corresponding hexadecimal number 0xXXXXX to the entry "<string name="config_tether_apndata" />" in the "string.xml" file. This entry has no text.
Now replace in "const v4, 0x104014a" with "const v4, 0xXXXXX," so it will not show anything in the power menu.
Save the file.
c/ Come on, we're almost there ...
Now copy the "out/com/android/internal/policy/impl/GlobalActions$4.Smali" to "out/com/android/internal/policy/impl/GlobalActions$8.Smali".
We choose #4 because it is one that contains the shutdown of the phone. We will rename it 8 because it's 8 in the next free issue ...
Remember this if ever in a future version of the files they are change.
d/ Now open the new file "out/com/android/internal/policy/impl/GlobalActions$8.Smali" and replace in, all occurrences of "\GlobalActions$4" with "\GlobalActions$8"
Then, Replace :
Code:
const/4 v1, 0x1
invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
With :
Code:
const/4 v1, 0x1
const-string v2, "now"
invoke-static {v0, v2, v1}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
e/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$9.Smali"
Open it and replace in, all occurrences of "\GlobalActions$8" with "\GlobalActions$9
and
const-string v2, "now" with const-string v2, "recovery"
f/ Save the file and copy it to "out/com/android/internal/policy/impl/GlobalActions$10.Smali"
Open it and replace in, all occurrences of "\GlobalActions$9" with "\GlobalActions$10
and
const-string v2, "recovery" with const-string v2, "download"
Save the file and then ... compile it all!
The result, you will see that I also forgot to replace an icon:
Thanks you! finally someone willing to write a tutorial on this.
great tutorial.
thanx, we all need help sometimes
Excellent. Now for a tutorial on how to get the mobile data toggle in the notification bar and we can all build custom roms.
Sent from my GT-I9100 using Tapatalk
Wow, u really went the whole 9 yards explaining this, thanks, as always grateful for ur sharing....
Seems like you put a lot of time and effort in this post.
Very good and clear instructions on something I wanted to add to my custom rom for a long time. (without just adding some files)
Thank you very much.
No credit for the how to you copied this from?
what a shame
http://forum.xda-developers.com/showthread.php?t=811532
Nice guide. Two things when using apkmanager:
1) Never ever edit the public.xml
2) When Recompiling: Never sign system files. Copy their signature!
Sent from my GT-I9100 using XDA Premium App
designgears said:
No credit for the how to you copied this from?
what a shame
http://forum.xda-developers.com/showthread.php?t=811532
Click to expand...
Click to collapse
as Cognition user i can only agree with "my" developer, that most of the statings above are simply coppied - Ctrl+a--->Ctrl+V ---> well done
_JKay_ said:
Nice guide. Two things when using apkmanager:
1) Never ever edit the public.xml
2) When Recompiling: Never sign system files. Copy their signature!
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
If we don't edit Public.xml, how are going to achieve this? I keep getting errors while recompiling using apkmanager? They sometimes don't even extract the resources.arsc and throw a lot of errors.
I'm working on adding a few options in the settings apk and neither apkmanger nor apktool is letting me decompile settings apk. It always throws errors. I need to decompile to edit a few xml in values which i don't find if i unzip it with 7-zip or winrar! Editing smali files is not a prob for now!
Any solutions?
@ sicopat
All three options call the Shutdown thread and present the "Your phone will shutdown" dialog. How do we change this?
And i also want to add the subtext in all three options in the main options, where are those located?
Ghostbustersin said:
If we don't edit Public.xml, how are going to achieve this? I keep getting errors while recompiling using apkmanager? They sometimes don't even extract the resources.arsc and throw a lot of errors.
I'm working on adding a few options in the settings apk and neither apkmanger nor apktool is letting me decompile settings apk. It always throws errors. I need to decompile to edit a few xml in values which i don't find if i unzip it with 7-zip or winrar! Editing smali files is not a prob for now!
Any solutions?
Click to expand...
Click to collapse
public.xml is auto-generated! Try add a string or a png and compile then decompile again. You will see that the new resources has been added to the public.xml
The ids MUST be unique and increased by one! Its all done in the apktool!
designgears said:
No credit for the how to you copied this from?
what a shame
http://forum.xda-developers.com/showthread.php?t=811532
Click to expand...
Click to collapse
You are totaly right.
I didn't find lines to modify,
I just built a new How To, from a french one I found here : http://www.galaxys-team.fr/viewtopic.php?f=6&t=14562
I believe this french How To took its inspiration from this thread : http://forum.xda-developers.com/showthread.php?t=811532
I didn't found this thread myself, you found it for me.
I finished to write this thread at 1h30 AM and I am going just now correct this mistake ...
Sorry for this
_JKay_ said:
Nice guide. Two things when using apkmanager:
1) Never ever edit the public.xml
2) When Recompiling: Never sign system files. Copy their signature!
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
1/ Why never edit public.xml ?
2/ You are right for that
_JKay_ said:
public.xml is auto-generated! Try add a string or a png and compile then decompile again. You will see that the new resources has been added to the public.xml
The ids MUST be unique and increased by one! Its all done in the apktool!
Click to expand...
Click to collapse
Ok but i never had errors using this How To and so, modifing public.xml.
But I will add your recommandation for people to try this How To, without modifing public.xml.
Thanks
sicopat said:
I insist on it here: only perform additions, never modify the images during the decompilation / recompilation of APK with APK_Manager.
Thanks
Click to expand...
Click to collapse
Why this statement? I'd rather say ONLY edit PNGs when decompiled!
_JKay_ said:
Why this statement? I'd rather say ONLY edit PNGs when decompiled!
Click to expand...
Click to collapse
Cause when using Apk manager, during re-compilation a keep folder is created and if you don't delete every files (and png) you modified in this keep folder, then after recompilation you will have olds .png from the keep folder and not your new png from your project folder.
It is easier to just push your new .png after recompilation.
I am just a noob who want to help a little with my short experience.
I am ready to learn and to optimise my how to
Sent from my GT-I9100 using XDA Premium App
sicopat said:
Cause when using Apk manager, during re-compilation a keep folder is created and if you don't delete every files (and png) you modified in this keep folder, then after recompilation you will have olds .png from the keep folder and not your new png from your project folder.
It is easier to just push your new .png after recompilation.
I am just a noob who want to help a little with my short experience.
I am ready to learn and to optimise my how to
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
Its true you need to delete the files you modify from the keep folder. But you should never try and modify 9patch pngs if they are not decompiled!!
_JKay_ said:
Its true you need to delete the files you modify from the keep folder. But you should never try and modify 9patch pngs if they are not decompiled!!
Click to expand...
Click to collapse
Yes i agree with you.
But in this How to, you don't need to edit 9patch.png
For begginers i think it's easier to push the customised reboot, power off, download mode icons ... after recompilation.
Sent from my GT-I9100 using XDA Premium App
sicopat said:
Yes i agree with you.
But in this How to, you don't need to edit 9patch.png
For begginers i think it's easier to push the customised reboot, power off, download mode icons ... after recompilation.
Sent from my GT-I9100 using XDA Premium App
Click to expand...
Click to collapse
Ok...... But I think this could make beginners believe that this is always the case and how it should always be done. I rather teach them the right way

[DEV] [MOD] [HOW-TO] Remove AM/PM on LG8 Based Sprint ROMS [MOD]

Hey everyone! In response to sudden events i am deciding to make tutorials for all my MODS for interested DEVS. Here is removing AM/PM from clock on status bar MOD.
First you're going to need to decompile the Smali in SystemUI.apk
Now edit the following code in the following smali:
/systemui.apk /smali/com/android/systemui/statusbar/policy/Clock.smali
Edit the following code:
Code:
# direct methods
.method static constructor <clinit>()V
.registers 1
[COLOR="Red"] --const/4 v0, 0x0
[/COLOR][COLOR="Green"] ++const/4 v0, 0x2[/COLOR]
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
That's all. Recompile and the AM/PM in the status bar should have disappeared
Have Fun!
clark44 said:
Hey everyone! In response to sudden events i am deciding to make tutorials for all my MODS for interested DEVS. Here is removing AM/PM from clock on status bar MOD.
First you're going to need to decompile the Smali in SystemUI.apk
Now edit the following code in the following smali:
/systemui.apk /smali/com/android/systemui/statusbar/policy/Clock.smali
Edit the following code:
Code:
# direct methods
.method static constructor <clinit>()V
.registers 1
[COLOR="Red"] --const/4 v0, 0x0
[/COLOR][COLOR="Green"] ++const/4 v0, 0x2[/COLOR]
sput v0, Lcom/android/systemui/statusbar/policy/Clock;->AM_PM_STYLE:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
That's all. Recompile and the AM/PM in the status bar should have disappeared
Have Fun!
Click to expand...
Click to collapse
Thanks for sharing!
Sent from my SPH-L710 using xda premium
Thanks Clark!
I will post the updated clock MODS in your ROM thread.
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Didact74 said:
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Click to expand...
Click to collapse
Use twframework-res.apk instead. So...
apktool if twframework-res.apk
clark44 said:
Use twframework-res.apk instead. So...
apktool if twframework-res.apk
Click to expand...
Click to collapse
Bingo! Thank you sir! :good:
---------- Post added at 11:46 PM ---------- Previous post was at 11:11 PM ----------
So framework-res had information to change the lockscreen information but twframework-res does not. Which TW APK hold the lockscreen info?
Didact74 said:
Bingo! Thank you sir! :good:
---------- Post added at 11:46 PM ---------- Previous post was at 11:11 PM ----------
So framework-res had information to change the lockscreen information but twframework-res does not. Which TW APK hold the lockscreen info?
Click to expand...
Click to collapse
Not sure. Would probably be systemui.
I'm going to bet that you are having the plurals error. Try recompiling again and read the errors, if you see the world plurals, do the following.
in res\values\plurals.xml
look for
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-en-rUS\plurals.xml
look for:
Code:
<item quantity="other">%d of %d</item>
make it
Code:
<item quantity="other">%d of %%d</item>
res\values-es\plurals.xml
look for:
Code:
<item quantity="other">%d de %d</item>
make it
Code:
<item quantity="other">%d de %%d</item>
It should compile just fine after that. I had the same errors.
Didact74 said:
I am trying to make some changes in the framework-res.apk but I am having issues recompiling. All other APKs recompile fine for me except framework-res. Even if I make no changes at all it will not recompile. Decompile is fine, just wont recompile. Do I need to install different framework when working withing framework-res?
The command "apktool if framework-res.apk" should work for de/recompiling framework-res correct?
Click to expand...
Click to collapse
Good call on the plurals Jimie, that fixed my errors but when it compiles I get a bunch of warnings but it does compile. Wheni try to push it to Framework via TWRP flash it causes a bootloop. Even when no changes are made. Were you able to successfully modify framework-res and not bootloop? Here are my warnings....
From my experience, the warnings are nothing to worry about. Are you using root explorer to set the appropriate file permissions?
Didact74 said:
Good call on the plurals Jimie, that fixed my errors but when it compiles I get a bunch of warnings but it does compile. Wheni try to push it to Framework via TWRP flash it causes a bootloop. Even when no changes are made. Were you able to successfully modify framework-res and not bootloop? Here are my warnings....
Click to expand...
Click to collapse
Tsudeily said:
From my experience, the warnings are nothing to worry about. Are you using root explorer to set the appropriate file permissions?
Click to expand...
Click to collapse
It was due to my updater script. I forgot to changethe directories/permissions within the script. It loaded fine this time but the change did not take. I am trying to manipulate the date, time, and "wipe screen to unlock" on the lockscreen but I can not find out where the XML is to do it. I thought i had found it in framework-res/res/values/strings.xml but it did not work.
Thanks for reminding me about the permissions or I probably would have never checked the updater script .
Please Donate--for even more development
All, not that I am a beggar by any means, but please donate to Clark, he needs it..trust me when I say this...Behind the scenes, he is buying equipment to continue his development. The donation go towards this. Thanks (and I too have donated)...:highfive::highfive::highfive:
Click Here > http://forum.xda-developers.com/donatetome.php?u=3885544
Happy to help. Strange about it not taking. Did you wipe your caches?
Didact74 said:
It was due to my updater script. I forgot to changethe directories/permissions within the script. It loaded fine this time but the change did not take. I am trying to manipulate the date, time, and "wipe screen to unlock" on the lockscreen but I can not find out where the XML is to do it. I thought i had found it in framework-res/res/values/strings.xml but it did not work.
Thanks for reminding me about the permissions or I probably would have never checked the updater script .
Click to expand...
Click to collapse
I was reading this link (yes, I know it is for the SGS2): http://forum.xda-developers.com/showpost.php?p=24853926&postcount=1
I was successfully able to get the "easy" part complete, the SecSettings.apk part of adding the toggles to Settings - Date and Time (see attached). They toggle correctly meaning the checkboxes work, but nothing happens as I cannot get the edits described to work with clock.smali (compiling errors with apktool). Again I know it is a guide for the SGS2, but the smali code is very close, so I think that if someone with smali experience (I have next to none) looked at it, this would be do-able.
I am using the SGS3 on US Cellular's network. It seems that I am close to getting this, but does anyone have any thoughts/suggestions?
pretty cool idea. Did you have to change the identifier to get it to compile?
When I use "0x7f0b0923" it errors out because that identifier is already being used. However, if I change it to something like 0xf0d0af2 it will compile but i can not get into settings at all once I reboot.
Didact74 said:
pretty cool idea. Did you have to change the identifier to get it to compile?
When I use "0x7f0b0923" it errors out because that identifier is already being used. However, if I change it to something like 0xf0d0af2 it will compile but i can not get into settings at all once I reboot.
Click to expand...
Click to collapse
Here's what I changed mine to, since apktool was complaining of the same thing.
<public type="string" name="disable_ampm" id="0x7f0d0b2f" />
<public type="string" name="disable_ampm_text" id="0x7f0d0b30" />
<public type="string" name="disable_time" id="0x7f0d0b31" />
<public type="string" name="disable_time_text" id="0x7f0d0b32" />
I was then able to recompile SecSettings.apk, it did give me warnings but it worked and I wasn't getting the identifier already used error. I feel like I'm really close I just need to figure out the smali part for Clock.smali and PhoneStatusBar.smali yet. Hopefully I can get help or pointed in the right direction soon.
RMarkwald said:
Here's what I changed mine to, since apktool was complaining of the same thing.
<public type="string" name="disable_ampm" id="0x7f0d0b2f" />
<public type="string" name="disable_ampm_text" id="0x7f0d0b30" />
<public type="string" name="disable_time" id="0x7f0d0b31" />
<public type="string" name="disable_time_text" id="0x7f0d0b32" />
I was then able to recompile SecSettings.apk, it did give me warnings but it worked and I wasn't getting the identifier already used error. I feel like I'm really close I just need to figure out the smali part for Clock.smali and PhoneStatusBar.smali yet. Hopefully I can get help or pointed in the right direction soon.
Click to expand...
Click to collapse
I will see if I can get it to work. Nice find.
clark44 said:
I will see if I can get it to work. Nice find.
Click to expand...
Click to collapse
It was random... Kinda. I used from what I could tell wasn't in use to the point where apktool didn't complain. Whether or not that's good/bad I'm not sure yet...
- Sent from my US Cellular SGS3
RMarkwald said:
It was random... Kinda. I used from what I could tell wasn't in use to the point where apktool didn't complain. Whether or not that's good/bad I'm not sure yet...
- Sent from my US Cellular SGS3
Click to expand...
Click to collapse
Your hex did not work for me either. I had to use 0x7f0d0af2 - 0x7f0d0af5 to get it to compile.
It seems that the first code made in the clock.smali is what is causing the recompile issues:
Code:
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_nohide
const/16 v0, 0x8
:cond_nohide
const v1, 0x7f0e0027
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
If I make all changes except that one I can get it to compile. However, I have random isues where settings will not open at all. I am sure Clark can make sense of it as my smali skills are subpar as well.
I figured it may be different for you. I did notice that too with the code, but then I also did notice that the other code would let it compile (2nd part of code for Clock.smali), and the PhoneStatusBar.smali stuff just FC'd SystemUI. Clark PM'd me last night, so hopefully something will come of this soon. If the smali stuff gets worked out to work with the SGS3, then the XML stuff will fall in line pretty easy, just need to find hex to work probably for each model, as I'm sure it's all a little different.

[MOD][GUIDES] Unrestricted Native Tethering + Evade Data Cap Throttle + MORE!

Hello to all Developers and XDA members! I have come here to give you a guide on how you can use native tethering without restrictions and here is how you can do it!
What Is Required...
★ First you need to have experience and know how to decompile/recompile apks with Apktools, apkmanager, smali, and baksmali
★ Have 7-zip installed onto your computer/laptop
★ Make sure you have Notepad++ also installed!
★HOW TO ENABLE NATIVE TETHERING WITHOUT RESTRICTIONS★
STEP 1
★ Go into your system/framework folder and take out your "framework-res.apk"
★ Then use one of the applications such as apktools or apkmanager and then use the commands to decompile the framework-res.apk
★ Once you have decompiled the framework-res.apk, go to:
res/values/arrays.xml
Click to expand...
Click to collapse
Now with Notepad++ go and find:
Code:
<string-array name="config_mobile_hotspot_provision_app">
And then it will look something like this:
Code:
<string-array name="config_mobile_hotspot_provision_app">
<item>com.sec.tetheringprovision</item>
<item>com.sec.tetheringprovision.TetheringProvisionActivity</item>
</string-array>
Now what your going to need to do is remove both of the <item> lines that has "tetheringprovision" in them, the "string-" in the first line, and then remove the whole </string-array> from the last line, once you do it will look something like this:
Code:
<array name="config_mobile_hotspot_provision_app" />
Once your done now Recompile your framework-res.apk using apktools or apkmanager and your DONE!!!
NOTE: Remember by removing those "com.sec.tetheringprovision" lines in the arrays.xml, it bypasses all the checks, There will be no more popup message that's telling you to upgrade to a T-Mobile Hotspot Plan, and you will get no errors!. There is no need for any third party apps or creating a APN just to have Tether to work properly!
STEP 2
The next step that your going to have to do is go into your roms:
system/app
Click to expand...
Click to collapse
folder and then remove:
TetheringProvision.apk
Click to expand...
Click to collapse
This TetheringProvision.apk is no longer needed. If you were to remove it without doing the framework-res.apk mod, you will get constant force closes and a "Tetheringprovision Is Not Responding Message" after you have enabled Mobile Hotspot on your Samsung Galaxy S3 device. But since you have modded it, you can just delete it.
STEP 3
Now for this step, this is going to give you the opportunity to edit/remove the locked APNS And also it will show you how you can see any of the hidden APN's from the "Access Point Names" Menu which is in Settings-More Settings-Mobile Networks-Access Point Names. Also this step your going to have to change the APN site name which makes you tether without bringing you into the T-Mobile Hotspot Browser Page.
First your going to have to go into your roms folder which is:
system/csc
Click to expand...
Click to collapse
And then open up "customer.xml" with your notepad++ for editing.
Now go all the way to the bottom of this file and you will see the last APN Tethering setting which should looks like this:
Code:
<NetworkName>T-Mobile</NetworkName>
<Editable>no</Editable>
<EnableStatus>enable</EnableStatus>
<ProfileName>T-Mobile Tethering</ProfileName>
<Auth>none</Auth>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
<APN>pcweb.tmobile.com</APN>
Now what your going to have to do is change where it says <Editable>no</Editable> into <Editable>yes</Editable>. By changing this, this will give you the permission to edit/remove this APN setting. REMEMBER: This APN Tethering setting only shows after you first use Tethering! And once your done with that go to where it says <APN>pcweb.tmobile.com</APN> and change it into <APN>epc.tmobile.com</APN>. By changing this APN site name it should give you total access for you to tether without bringing you into the T-Mobile Hotspot Browser Page from your PC's internet browser.
Once done it will look like this:
Code:
<NetworkName>T-Mobile</NetworkName>
[B]<Editable>yes</Editable>[/B]
<EnableStatus>enable</EnableStatus>
<ProfileName>T-Mobile Tethering</ProfileName>
<Auth>none</Auth>
<Bearer>ps</Bearer>
<Protocol>http</Protocol>
<Proxy>
<EnableFlag>off</EnableFlag>
</Proxy>
<PSparam>
[B]<APN>epc.tmobile.com</APN>[/B]
Now save this file with the new edits with Notepad++ and your DONE!
But your not done yet with this step, your going to have to do one last thing. The Tethering APN that you have modified from "above" is still hidden. Now what your going to have to do is go into your roms folder again to:
system/csc
Click to expand...
Click to collapse
And then open up "feature.xml" with your notepad++ for editing.
Now with Notepad++ go and find:
<CscFeature_Setting_HideApnList>pcweb.tmobile.com</CscFeature_Setting_HideApnList>
Click to expand...
Click to collapse
Now DELETE THIS WHOLE LINE! [This hides the Tethering APN that you have modified from "above" from view]. Once your done save this file with Notepad++ and THATS IT! Now Go Enjoy Your Native Tethering!!!
STILL HAVING PROBLEMS WITH TETHERING EVEN AFTER THE MOD? - Go into "Settings-More Settings-Mobile Networks-Access Point Names" and then press your phone's "Menu Settings Key" on the bottom left of your phone and then select "Reset To Default" and see if that helps.
★HOW TO ENABLE BLUETOOTH TETHERING★
This guide will show you how you can enable bluetooth tethering so here is how you can do it!
STEP 1
★ Go into your system/framework folder and take out your "framework-res.apk"
★ Then use one of the applications such as apktools or apkmanager and then use the commands to decompile the framework-res.apk
★ Once you have decompiled the framework-res.apk, go to:
res/values/arrays.xml
Click to expand...
Click to collapse
Now with Notepad++ go and find:
Code:
<array name="config_tether_bluetooth_regexs" />
And then it will look something like this:
Code:
<array name="config_tether_wimax_regexs" />
<array name="config_tether_bluetooth_regexs" />
<array name="config_tether_dhcp_range" />
Now what your going to need to do is add "string-" right before the "array" in the beginning of the config_tether_bluetooth_regexs, then under it add <item>bnep\\d</item> and make sure that the <item> from the beginning is aligned the same like the other <item> from the arrays.xml. Once you do, add </string-array> right under the "bnep\\d" line, then it will look something like this:
Code:
<array name="config_tether_wimax_regexs" />
[B]<string-array name="config_tether_bluetooth_regexs">
<item>bnep\\d</item>
</string-array>[/B]
<array name="config_tether_dhcp_range" />
Once your done now Recompile your framework-res.apk using apktools or apkmanager and your DONE!!!
★HOW TO EVADE/REMOVE DATA CAP THROTTLING★
This guide will show you how you can evade/remove data cap throttling and this is good for the people who don't have a unlimited data plan for their phone's carrier so here is how you can do it!
STEP 1
★ Go into your system/framework folder and take out your "services.jar"
★ Then use one of the applications such as apktool and then use baksmali commands to decompile and extract the classes.dex from the services.jar
★ Once you have decompiled the services.jar, go to:
com/android/server
Click to expand...
Click to collapse
Now open up "ThrottleService.smali" with your notepad++ for editing.
Once your in here go and find:
Code:
.method static synthetic access$1002(Lcom/android/server/ThrottleService;J)J
And then you will see something like this:
Code:
.method static synthetic access$1002(Lcom/android/server/ThrottleService;J)J
.registers 3
.parameter "x0"
.parameter "x1"
.prologue
.line 71
iput-wide p1, p0, Lcom/android/server/ThrottleService;->mMaxNtpCacheAge:J
return-wide p1
.end method
Now what your going to need to do is add an empty space below ".line 71" and then above "iput-wide" your going to add "const-wide/16 p1, 0x0", once you do it will look something like this:
Code:
.method static synthetic access$1002(Lcom/android/server/ThrottleService;J)J
.registers 3
.parameter "x0"
.parameter "x1"
.prologue
.line 71
[B]const-wide/16 p1, 0x0[/B]
iput-wide p1, p0, Lcom/android/server/ThrottleService;->mMaxNtpCacheAge:J
return-wide p1
.end method
By adding that, this will invoke the ".method private checkThrottleAndPostNotification(J)V" and also the clearThrottleAndNotification()V which are both in the "ThrottleService$MyHandler.smali" which looks like this:
Code:
.method private checkThrottleAndPostNotification(J)V
.registers 28
.parameter "currentTotal"
.prologue
.line 588
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/ThrottleService$MyHandler;->this$0:Lcom/android/server/ThrottleService;
move-object/from16 v21, v0
#getter for: Lcom/android/server/ThrottleService;->mPolicyThreshold:Ljava/util/concurrent/atomic/AtomicLong;
invoke-static/range {v21 .. v21}, Lcom/android/server/ThrottleService;->access$500(Lcom/android/server/ThrottleService;)Ljava/util/concurrent/atomic/AtomicLong;
move-result-object v21
invoke-virtual/range {v21 .. v21}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
move-result-wide v15
.line 589
.local v15, threshold:J
const-wide/16 v21, 0x0
cmp-long v21, v15, v21
if-nez v21, :cond_18
.line 590
invoke-direct/range {p0 .. p0}, Lcom/android/server/ThrottleService$MyHandler;->clearThrottleAndNotification()V
.line 663
:cond_17
:goto_17
return-void
.line 596
:cond_18
move-object/from16 v0, p0
Now once your done with modifying the "ThrottleService.smali", Recompile your services.jar using apktool and smali commands and your DONE!
IMPORTANT REMINDER - This mod works best for the people who DON'T have a unlimited data plan so it will be good for devs to make a flashable.zip in their OP with this mod with their roms services.jar which could be different "since some devs maybe did other mods/tweaks into their roms services.jar" so the users that be having any throttling issues can flash it. Also use at your own risk!
Nice find!
evil1art said:
Nice find!
Click to expand...
Click to collapse
Thanks! Im trying to find all the ways and which apks tmobile can check for UAstrings, which makes them able to give them the info that we are using tethering for free. Im going to dig even more though.
Sent from my SGH-T999 using Tapatalk 2
jovy23 said:
Thanks! Im trying to find all the ways and which apks tmobile can check for UAstrings, which makes them able to give them the info that we are using tethering for free. Im going to dig even more though.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Thats works
I must have done something wrong because this borked my install. Any possibility of a flashable zip or something?
Hi! The mod looks great. I have two short questions though:
1. Is it exclusive to the T-Mobile Galaxy S III, or could possibly work for other variants of the device as well, on which the carrier might have enforced the same restrictions?
2. Is it exclusive to the Galaxy S III, or could possibly work for other similar devices by Samsung like the Galaxy Note II as well?
Thanks.
Would also like to know if there could be a flashable zip made for us noobs lol
Sent from my SGH-T999 using Tapatalk 2
chrisa887 said:
Would also like to know if there could be a flashable zip made for us noobs lol
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
A mod like this should be cooked into the rom. If can break mods if not
evil1art said:
A mod like this should be cooked into the rom. If can break mods if not
Click to expand...
Click to collapse
So, if I hear you right, you are saying watch for this to be available in Wicked JB soon? :cyclops:
Maybe djintrigue808 Can cook this up in the Frosty JB roms
bradleyw801 said:
So, if I hear you right, you are saying watch for this to be available in Wicked JB soon? :cyclops:
Click to expand...
Click to collapse
Maybe its easy enough
---------- Post added at 05:20 PM ---------- Previous post was at 05:20 PM ----------
nardone24 said:
Maybe djintrigue808 Can cook this up in the Frosty JB roms
Click to expand...
Click to collapse
I think dj stopped tw development
evil1art said:
Maybe its easy enough
---------- Post added at 05:20 PM ---------- Previous post was at 05:20 PM ----------
I think dj stopped tw development
Click to expand...
Click to collapse
Yipee! Will it be in the Wicked 4.2? I'm looking forward on this mod apply to wicked ROM. Thanks
Sent from TMO Galaxy S3
Works great thanx
HQRaja said:
Hi! The mod looks great. I have two short questions though:
1. Is it exclusive to the T-Mobile Galaxy S III, or could possibly work for other variants of the device as well, on which the carrier might have enforced the same restrictions?
2. Is it exclusive to the Galaxy S III, or could possibly work for other similar devices by Samsung like the Galaxy Note II as well?
Thanks.
Click to expand...
Click to collapse
It should work on other variants i have to check the framework-res on the other carriers stock firmware to see. I will be updating this post with the workarounds for the other carriers also
Sent from my SGH-T999 using Tapatalk 2
chrisa887 said:
Would also like to know if there could be a flashable zip made for us noobs lol
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
I would say decompiling and doing this mod is the way to go because if i made a flashable.zip and you flashed it on any other rom, it could break/remove the other devs mods plus theming that they have cooked into their framework-res.apk.
Sent from my SGH-T999 using Tapatalk 2
Amazing find my friend! Thank you and will give credit were it it due.
Jamison904 said:
Amazing find my friend! Thank you and will give credit were it it due.
Click to expand...
Click to collapse
Your very welcome man!
Sent from my SGH-T999 using Tapatalk 2
"Amazing find my friend! Thank you and will give credit were it it due."
@Jameson904 - is there a good chance that this will be utilised in your next update?
BTW.. 3.7 is much appreciated
////ANDY
waiting for the 'flashable zip' =)
adulel08 said:
waiting for the 'flashable zip' =)
Click to expand...
Click to collapse
I posted about why there cant be a flashable.zip of it. It can break rom mods in them that a developer implemented.

[Guide] How to add a 2G Toggle to the Lidroid 23 Toggles Mod

This guide adds a 2G/3G/Auto toggle to the Lidroid 23 Toggles, making it 24 toggles instead. It is based on this guide by Neme77. I've just done some legwork and made it compatible with the wanam version of the lidroid framework we're all using.
For this guide you will need:
APKtool
signapk
2G_Toggle_SecPhone.apk.zip
2G_Toggle_SystemUI.apk.zip
CWM_2G_Toggle.zip - A Blank CWM zip for you to flash your modded files once you've made them.
The latest translated version of the Lidroid framework from here
You will be decompiling:
SystemUI.apk
SecPhone.apk
services.jar
Firstly decompile SecPhone.apk using apktool and then extract the contents of 2G_Toggle_SecPhone.apk.zip into:
Code:
SecPhone.apk/smali/
Now we need to add some lines to the AndroidManifest.xml for SecPhone.apk. Open up the file and add the lines in red:
Code:
<receiver android:name="CallerInfoCacheUpdateReceiver">
<intent-filter>
<action android:name="com.android.phone.UPDATE_CALLER_INFO_CACHE" />
</intent-filter>
</receiver>
<receiver android:name="PhoneApp$NotificationBroadcastReceiver" exported="false">
<intent-filter>
<action android:name="com.android.phone.ACTION_HANG_UP_ONGOING_CALL" />
<action android:name="com.android.phone.ACTION_CALL_BACK_FROM_NOTIFICATION" />
<action android:name="com.android.phone.ACTION_SEND_SMS_FROM_NOTIFICATION" />
</intent-filter>
</receiver>
[COLOR="Red"]<receiver android:name="NetworkModeReceiver">
<intent-filter>
<action android:name="com.android.phone.CHANGE_NETWORK_MODE" />
<action android:name="com.android.phone.NEW_NETWORK_MODE" />
</intent-filter>
</receiver>[/COLOR]
<uses-library android:name="com.sec.android.app.multiwindow" android:required="false" />
<uses-library android:name="libvtmanagerjar" />
<uses-library android:name="secmediarecorder" />
<uses-library android:name="sec_platform_library" />
<uses-library android:name="touchwiz" />
</application>
</manifest>
In the original guide, he goes about it differently, but it wouldn't work for me. However, since version XXEMR2 has changed the way the firmware handles the System user you need to edit the services.jar in order to get certain toggles working, as mentioned by wanam here.
Recompile SecPhone and sign it using signapk. You can use this command:
Code:
java -jar signapk.jar certificate.pem key.pk8 your-app.apk your-signed-app.apk
Next, decompile SystemUI.apk and extract the 2G_Toggle_SystemUI.apk.zip into:
Code:
SystemUI.apk/smali/
Overwrite any files.
You may want to prep your SystemUI for later revisions and open your AndroidManefest.xml file and change the header to this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="android.uid.system" android:process="system" android:versionCode="16" [COLOR="Red"]android:versionName="4.1.2-I9300XXEMR2"[/COLOR] package="com.android.systemui" coreApp="true"
xmlns:android="http://schemas.android.com/apk/res/android">
Taking care to change the red text to your version.
Recompile SystemUI.apk. If you changed the AndroidManifest.xml, sign the package like we did the SecPhone.apk
Now decompile services.jar from /system/framework/
Find:
Code:
PackageManagerService.smali
and look for the method:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the whole method with this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
.parameter "s1"
.parameter "s2"
.prologue
const/4 v6, 0x0
const-string v3, "Wanam: PackageManager"
const-string v4, "Skip signature check."
invoke-static {v3, v4}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;)I
return v6
.end method
Recompile
You can now copy your modded files into the CWM_2G_Toggle.zip file. Take care to match the names as they go in. "SystemUI.apk" must be named like that, "SecPhone.apk" must be named like that also
NB: It takes about a minute to switch from 2G to 3G and vice versa. If you dial *#197328640# you can observe the change from WCDMA2100 to GSM1800 as you switch.
Worked perfect, thank you for sharing.
fOmey said:
Worked perfect, thank you for sharing.
Click to expand...
Click to collapse
Awesome stuff
Thank you Kryten2k35. very good.
Where can I find lidroid 23 toggles?
Sent from my GT-I9300 using xda app-developers app
awshengxiang said:
Where can I find lidroid 23 toggles?
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
You need this mod, first:
http://forum.xda-developers.com/showthread.php?t=2032614
Hi Kryten2k35, this mod was implemented several months ago in Inmortal Rom.
http://www.htcmania.com/showthread.php?t=534150
Pity that users don't know this rom. They had had 24 toggles in their roms time ago.
However, good job. This will help many cooks
Can be added on stock rom with stock toggles! ?

[HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher

* ARTICLES MADE IN MACHINE LG G3 ANDROID 4.4.2 MACHINE DO THE SAME AND FLEXIBLE THINKING.
Preparation:
computers
Preset apktool
You must know how to use apktool okay.
File LGPhone.apk and LGSystemUI.apk was taken in Rom deodex you want Mod okay.
Begin.
A. Working with files this most important LGPhone.apk okay.
1. Decompile LGPhone.apk out
2. Navigate to the path LGPhone / smali / com / android / phone
Find PhoneGlobals.smali open in Notepad + +
> Find the following keywords.
Code:
.field private final mMediaButtonReceiver:Landroid/content/BroadcastReceiver;
> Add the following line immediately below it.
Code:
.field private final mModeReceiver:Landroid/content/BroadcastReceiver;
> Find Next line after.
Code:
mReceiver:Landroid/content/BroadcastReceiver;
> Add the following line immediately below it.
Code:
.line 236
new-instance v0, Lcom/android/phone/NetworkModeReceiver;
invoke-direct {v0}, Lcom/android/phone/NetworkModeReceiver;-><init>()V
iput-object v0, p0, Lcom/android/phone/PhoneGlobals;->mModeReceiver:Landroid/content/BroadcastReceiver;
> Find next keyword.
Code:
registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
> Add the following line immediately below it.
Code:
.line 633
new-instance v0, Landroid/content/IntentFilter;
const-string v1, "com.android.phone.CHANGE_NETWORK_MODE"
invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
iget-object v1, p0, Lcom/android/phone/PhoneGlobals;->mModeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v1, v0}, Lcom/android/phone/PhoneGlobals;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
> Save PhoneGlobals.smali
3. NetworkModeReceiver Download this file to extract and copy all the files in the path LGPhone smali / smali / com / android / phone
4. Recompile the LGPhone.
5. Fixing what replaces it back old LGPhone.apk file.
-------- 2G/3G toggle mod Guide --------- Choimobile
B. How on LGSystemUI.apk
1. Decompile LGSystemUI.apk out
2. Navigate to the path LGSystemUI/smali/com/lge/quicksettings/
> Open QuicksettingsItemList.smali using Notepad + +
> Find and fix all the 2GOnlyHandler EcoHandler
> Save QuicksettingsItemList.smali back
3. Find LGsystemUI/res/values-xx/
> Open strings.xml by Notepad + +
> Sp_quicksettings_eco_mode_NORMAL edit> Eco mode <a> The 2G <
> Save the strings.xml
4. Find LGSystemUI/res/values
> Open bools.xml using Notepad + +
> Find eco edit keywords >false< >true< save.
5. Download the file, unzip
> Copy smali in LGSystemUI/smali/com/lge/quicksettings/handlers
> Copy image to LGSystemUI/res/drawable-xxhdpi
6. Recompile the LGSystemUI
Replace the following items in LGSystemUI/build/apk file into the root LGSystemUI.apk
- 2 image file in res/drawable-xxhdpi on LGSystemUI.apk/res/drawable-xxhdpi
- Resources.arsc on LGSystemUI.apk
- Classes.dex into LGSystemUI.apk
C. Copy LGPhone.apk and LGSystemUI.apk have to edit the system/app and set 644 memory and delete files LGPhone.odex LGSystemUI.odex go. Reboot the machine and see the results.
Note: The tutorial is done on LG G3 Android 4.4.2 on another machine thinking you have flexibility with each release and each code.
Mod Guide Choimobile 2G/3G toggle.
-Thank: chuc by choimobile.vn/forums
- source: http://choimobile.vn/threads/huong-dan-mod-toggle-2g-3g-2g-only-len-cac-may-android-lg.27391/
Great guide
Thanks
Seems not the same lines can be found on KK.
Also, LGPhone.apk is LGTeleService.apk on my ROM.
Also the lines on smali files are not totally the same.
Thanks for the guide though.
Hi, I know this is an old thread, but I was wondering if you would do "how to enable flashlight toggle"
I have a LG Gpro 240K running one of your lollipop roms. I would REALLY appreciate it.
:good::good::good::good::good:
hi please fix network toggle for lgsystemui and lgteleservice
hi please help
i can't do this changes to my rom
here is files you need
LGTeleService.apk
View attachment LGTeleService.apk
the network toggle is here but don't work ( it can't change network )
i spend a lot of time , i hope some one can fix it
actually can't understand what should i do with lgteleservice.apk ( how to add toggles to this apk?) how to add this codes to lgteleservice?
sorry for my bad english
hi please help
i can't do this changes to my rom
here is files you need
LGTeleService.apk
View attachment 4269150
the network toggle is here but don't work ( it can't change network )
i spend a lot of time , i hope some one can fix it
actually can't understand what should i do with lgteleservice.apk ( how to add toggles to this apk?) how to add this codes to lgteleservice?
sorry for my bad english
EAGLEBOOY said:
hi please help
i can't do this changes to my rom
here is files you need
LGTeleService.apk
View attachment 4269150
the network toggle is here but don't work ( it can't change network )
i spend a lot of time , i hope some one can fix it
actually can't understand what should i do with lgteleservice.apk ( how to add toggles to this apk?) how to add this codes to lgteleservice?
sorry for my bad english
Click to expand...
Click to collapse
hi i fixed it
you should change this line in build.prop
ro.build.user=cloudyfa
to
ro.build.user=matrix_neo
+++++++++++++++++++++++++++++++
this is because
in SystemUI\smali\com\lge\systemui
a file with this name "ModelFeature.smali" in lines 527 and 541
const-string v0, "matrix_neo"
const-string v0, "matrix_neo"
should same as line in build.prop
ro.build.user=*********

Categories

Resources