Changing the MMS UA - Hero, G2 Touch Android Development

In a nutshell I need to modify my MMS UA-string in order for MMS to work properly on my unlocked Hero and also to authenticate with my carrier for my packet data plan.
I've read several articles both on xda and on other sites which talk about how this can be done (in one case for a Magic on the same carrier here in Japan and in the other for a Hero on US-based carrier).
To date this is what I've tried:
Attempt 1
Install the SDK
Install ADB USB driver
Download a customised Mms.apk from someone here in Japan - http://kuba.fm/2009/06/11/flashing-and-hacking-the-android-phone-for-japanese-softbank-network/
Run the following: adb install -r Mms.apk
1626 KB/s (567891 bytes in 0.341s)
pkg: /data/local/tmp/Mms.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
Tried again from the recovery console, did manage to push the file, but now Messages is Force closing whenever I startup.
Attempt 2
Started by reading the following - http://forum.xda-developers.com/showthread.php?t=542540
Took a backup from the recovery console
Rooted the device using Dayzee's lovely Noob Instructions
Installed Root Explorer
Copied the Mms.apk from the xda URL above into my tools dir
As per URL I type: adb remount - and get remount failed: Operation not permitted
If I use Root Explorer to Remount as R/W and then type: adb push Mms.apk /system/app I get "failed to copy 'Mms.apk' to '/system/app/Mms.apk': Permission denied
Alternately if I try to install Mms.apk from my sdcard using Root Explorer I get the following: Application not installed - Messages could not be installed on this phone
Again tried from the recovery console with the same effect as above - the Messages application Force closes upon startup.
So to put it bluntly I'm at a dead end..
I'm convinced there's a simple explanation but I've yet to discern what that might be.
Appreciate any help on offer.
Cheers,
mils

mms.apk for hero on Softbank
Hi mils,
I had the same problem and finally solved it last week.
I am using a HTC Hero with Modaco 3.0 on a Softbank prepaid card.
STEP 1 :
You need to make sure your APN settings are correct:
Name: Softbank
APN: mailwebservice.softbank.ne.jp
Proxy: <Not set>
Port: <Not set>
Username: softbank
Password: *******
Server: <Not set>
MMSC: http://mms
MMS proxy: sbmmsproxy.softbank.ne.jp
MMS Port: 8080
MMS protocol: WAP 2.0
MCC: 440
APN type: mms
STEP 2:
Then extract the mms.apk from Modaco's latest build.
At this point you will need baksmali to disassemble the class.dex file in mms.apk package.
When baksmali is done, find the file HttpUtils.smali (located in \com\android\mms\transport).
You will need to modify the following code:
Code:
.method private static createHttpClient(Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;
.registers 5
.parameter "context"
.prologue
.line 285
invoke-static {p0}, Lcom/android/mms/transport/HttpUtils;->getOemUAString(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 286
.local v2, uaString:Ljava/lang/String;
if-nez v2, cond_8:
.line 287
const-string v2, "The default UA"
.line 289
cond_8:
invoke-static {v2}, Landroid/net/http/AndroidHttpClient;->newInstance(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;
To:
Code:
.method private static createHttpClient(Landroid/content/Context;)Landroid/net/http/AndroidHttpClient;
.registers 5
.parameter "context"
.prologue
.line 285
invoke-static {p0}, Lcom/android/mms/transport/HttpUtils;->getOemUAString(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 286
.local v2, uaString:Ljava/lang/String;
if-nez v2, cond_8:
.line 287
cond_8:
const-string v2, "Vodafone/1.0/V802SE/SEJ002 Browser/VF-Netfront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1"
.line 289
invoke-static {v2}, Landroid/net/http/AndroidHttpClient;->newInstance(Ljava/lang/String;)Landroid/net/http/AndroidHttpClient;
I think you can find a user-agent that match your contract cell-phone and it will work fine. Notice that I moved the cond_8 label.
The reason is because the phone finds a default UA in getOemUAString and jumps over the static string. I'm not very confortable with dalvik bytecode so I prefered to keep the call and just move the label, so it will always use your custom ua whatever getOemUAString returns.
Just use smali to recompile and apkbuilder to repack everything. Pushing the mms.apk is enough to replace the previous version.
I will try to post my own mms.apk later so you don't have to bother doing STEP2.
Hope it helps!

Hello Mils69
Did you get this to work? I have same problem with Acer Liquid, i have setup APN, Rooted the phone, installed modified mms.apk but still no MMS and Messaging application is crashing all the time.
HandCentSMS also did not solve the problem.
Anyone was able to have MMS on ANdroid 1.6 so far?

Hello Mils69
Did you get this to work? I have same problem with Acer Liquid, i have setup APN, Rooted the phone, installed modified mms.apk but still no MMS and Messaging application is crashing all the time.
HandCentSMS also did not solve the problem.
Anyone was able to have MMS on ANdroid 1.6 so far?

I've got SIMs for 3 carriers, with 2 of them MMS receiving works fine with, the 3rd (unfortunately, my main one) receives MMS notifications, but is unable to actually download anything. Looking at the logs the only obvious "fail" I can see is a javascript error, possibly to do with the HTML lookup to HTC?
Any chance some of the modification in this thread might convince it to work? I'm fairly confident that my carrier has probably got a fairly dubious implementation of MMS support, seeing has how they don't even support 8-bit SMS which makes some things awkward.
Issue is on an HTC Hero running MCR 3.1, although the problem exists regardless of APN combinations and firmwares, it's obviously some incompatibility with the carrier and the method the OS is using for MMS.

Related

[FIX] StartingAlertService Wakelock (TouchWizCalendar.apk)

Hi
This is the solution to fix the StartingAlertService Wakelock
To reproduce the problem (or the fix) modify calendar settings to notify events in status bar, create a an event and add a reminder inmediatly, so a notificantion is triggered and you can see it in status bar, open BetterBatteryStats and you can check in partial wakelocks if you have the StartingAlertService Wakelock. You will see that the wakelock is always working, you only need to refresh data and the wakelock time is increased, the wakelock is not released until you close to notification.
The problem is in TouchWizCalendar.apk not releasing the wakelock properly in class ServiceHandler inside class AlertService
The actual code is:
Code:
private final class ServiceHandler extends Handler {
public ServiceHandler(Looper looper) {
super(looper);
}
@Override
public void handleMessage(Message msg) {
processMessage(msg);
AlertService.this.stopSelf();
}
}
If you check the new android sources you can see the next code:
Code:
private final class ServiceHandler extends Handler {
public ServiceHandler(Looper looper) {
super(looper);
}
@Override
public void handleMessage(Message msg) {
processMessage(msg);
// NOTE: We MUST not call stopSelf() directly, since we need to
// make sure the wake lock acquired by AlertReceiver is released.
AlertReceiver.finishStartingService(AlertService.this, msg.arg1);
}
}
So the next change will fix the problem. You have to decompile TouchWizCalendar.apk locate com/android/calendar/AlertService$ServiceHandler.smali and search & replace next code.
Search (the last method):
Code:
# virtual methods
.method public handleMessage(Landroid/os/Message;)V
.registers 3
.parameter "msg"
.prologue
.line 594
iget-object v0, p0, Lcom/android/calendar/AlertService$ServiceHandler;->this$0:Lcom/android/calendar/AlertService;
invoke-virtual {v0, p1}, Lcom/android/calendar/AlertService;->processMessage(Landroid/os/Message;)V
.line 598
iget-object v0, p0, Lcom/android/calendar/AlertService$ServiceHandler;->this$0:Lcom/android/calendar/AlertService;
invoke-virtual {v0}, Lcom/android/calendar/AlertService;->stopSelf()V
.line 601
return-void
.end method
Replace by:
Code:
# virtual methods
.method public handleMessage(Landroid/os/Message;)V
.registers 4
.parameter "msg"
.prologue
iget-object v0, p0, Lcom/android/calendar/AlertService$ServiceHandler;->this$0:Lcom/android/calendar/AlertService;
invoke-virtual {v0, p1}, Lcom/android/calendar/AlertService;->processMessage(Landroid/os/Message;)V
iget-object v0, p0, Lcom/android/calendar/AlertService$ServiceHandler;->this$0:Lcom/android/calendar/AlertService;
iget v1, p1, Landroid/os/Message;->arg1:I
invoke-static {v0, v1}, Lcom/android/calendar/AlertReceiver;->finishStartingService(Landroid/app/Service;I)V
return-void
.end method
Now recompile TouchWizCalendar.apk and replace it.
I've attached a cwm zip file to create a backup (TouchWizCalendar.apk.bak), replace the apk, and clear battery stats to reset wakelocks counters (reset battery stats doesn't affect to SGS2 battery, the battery chip doesn't need that info). The apk is based on kk5 rom.
If you don't want to use the cwm file you can extract TouchWizCalendar.apk from the zip and use root explorer (or similar) to replace the file, don't forget to make a backup of your original apk.
Edit:
If you get:
Code:
# virtual methods
.method public handleMessage(Landroid/os/Message;)V
.locals 1
.parameter "msg"
...
...
...
when decompile then replace with
Code:
# virtual methods
.method public handleMessage(Landroid/os/Message;)V
.locals 2
.parameter "msg"
...
...
...
Edit2:
If you use odexed rom delete or rename the odex file (maybe com.android.calendar.odex or TouchWizCalendar.odex, I'm not sure) to be sure classes.dex is used from deodexed apk
Edit3:
I've updated the zip to be sure odex file is not used in odexed roms
hi
it will work on xwkk5 stock rom odexed?
Hi,
this works fine on CheckRom v4, StartingAlertService now 0,3%.
with friendly greet
starbase64
pissyhun said:
hi
it will work on xwkk5 stock rom odexed?
Click to expand...
Click to collapse
I think so, but I'm not sure. To be sure that you can revert the changes make a backup (or rename) of the apk(TouchWizCalendar.apk.bak) and the odex calendar files, then delete the odex (I think the odex will be com.android.calendar.odex) and install the zip.
You can always to reodex (http://forum.xda-developers.com/showthread.php?t=1208320)
hi
thx for the answer but i am not a developer or an expert in android commands. i read the post u link but gave me headache)))
i will save the file and use it with a deodexed rom.
pissyhun said:
hi
thx for the answer but i am not a developer or an expert in android commands. i read the post u link but gave me headache)))
i will save the file and use it with a deodexed rom.
Click to expand...
Click to collapse
Wise decision
Great. Will implement this in my Note ROM
Love your fix
Yesterday I've installed your fix, and my wake locks for startingalertservice are gone. For your information I'm running a rooted version of the standard i9100XWKK2. Thanks again for your work, my battery time increased quit a bit.
hugoxboss said:
Yesterday I've installed your fix, and my wake locks for startingalertservice are gone. For your information I'm running a rooted version of the standard i9100XWKK2. Thanks again for your work, my battery time increased quit a bit.
Click to expand...
Click to collapse
Glad to hear it
just to make sure, if my wakelocks are in seconds in betterbatterystats, i'm good right?
ATN24 said:
just to make sure, if my wakelocks are in seconds in betterbatterystats, i'm good right?
Click to expand...
Click to collapse
that's right
Thanks for the instructions!
However, my calendar apk file has a bit of a difference in the code.
For example, it starts with:
# virtual methods
.method public handleMessage(Landroid/os/MessageV
.locals 1
.parameter "msg"
Can I use the same instructions?
Excellent job,thanks very much for by apk
Does anyone know if this APK will work for UCKK6?
Thanks a bunch rodries, this is awesome. Instead of ".registers 3", my AlertService$ServiceHandler.smali had ".locals 1". So, I went ahead and changed that to ".registers 4" as well.
Just revised KK5 TouchWizCalendar.apk, working well.
itaykoren said:
Thanks for the instructions!
However, my calendar apk file has a bit of a difference in the code.
For example, it starts with:
# virtual methods
.method public handleMessage(Landroid/os/MessageV
.locals 1
.parameter "msg"
Can I use the same instructions?
Click to expand...
Click to collapse
I think it's safe use same instructions. I'm using last smali and kk5 apk.
Hello rodies,
i am sorry but i can`t get it to work with my GingerMod v0.7 Rom.
http://forum.xda-developers.com/showthread.php?t=1220283
Neither the cwm-file nor the copy direct option works.
I have the Wakelock also. I am not a programmer. So things like compile decompile are chinese to me.
Is it somehowe possible that you can contact the Developer of GingerMod that he can apply this patch for his Rom.
Many thanks in advanced.
Would this issue be fixed if I just deleted the apk entirely?
crossover37 said:
Would this issue be fixed if I just deleted the apk entirely?
Click to expand...
Click to collapse
Lol, did you think this through... are you serious? You do realize it's required to use your calendar, not to mention it might cause your phone to crash continuously given all the other items that call on the calendar.
TheMatrix2000 said:
Hello rodies,
i am sorry but i can`t get it to work with my GingerMod v0.7 Rom.
http://forum.xda-developers.com/showthread.php?t=1220283
Neither the cwm-file nor the copy direct option works.
I have the Wakelock also. I am not a programmer. So things like compile decompile are chinese to me.
Is it somehowe possible that you can contact the Developer of GingerMod that he can apply this patch for his Rom.
Many thanks in advanced.
Click to expand...
Click to collapse
Upload your original TouchWizCalendar.apk, I'll create a cwm file for you

[INFO][REF][MON 18 FEB '13] Jelly Bean Porting thread | Vision Keyboard Fixes

I'm starting this thread as a result of trying to port Paranoid Android 2.51 from the saga. Long story short, turns out previous known ways to fix keyboard problems in ICS ports no longer work for Jelly Bean.
Please PM me and post useful info in this thread.... I absolutely do not want this to turn into a "how do I do this" thread.... This is for exchanging knowledges and discussion.
Progress so far: Thanks to strapped365, who has successfully ported PA 2.xx WITH working keyboard for the myTouch 4G Slide, We now know how to enable the soft keyboard. strapped365's instructions were off the top of his head, so here I have written a revised version with detailed instructions.
If you want to help out but are a n00b at editing .apk files, please follow this simple guide for de/ recompiling with APKTool.
SOFT KEYBOARD FIX
Using apktool, decompile framework-res.apk, then open res/values/bools.XML . Look for
Code:
<bool name="config_forceDisableHardwareKeyboard">[COLOR="Red"]false[/COLOR]</bool>
Change it to
Code:
<bool name="config_forceDisableHardwareKeyboard">[COLOR="Red"]true[/COLOR]</bool>
Before I go any further, I'm not convinced this is the best way to fix the problem because this boolean suggests we are saying that we should force the hardware keyboard to not be used just to get the soft keyboard up instead, although at least the hardware keyboard is still recognised. We need to look more into android.policy.jar stuff.
Anyway, now go into res/values/integers.XML and find
Code:
<integer name="config_lidOpenRotation">[COLOR="red"]-1[/COLOR]</integer>
Change it to
Code:
<integer name="config_lidOpenRotation">[COLOR="red"]90[/COLOR]</integer>
Still in integers.XML, look for
Code:
<integer name="config_lidNavigationAccessibility">[COLOR="red"]0[/COLOR]</integer>
and change it to
Code:
<integer name="config_lidNavigationAccessibility">[COLOR="Red"]1[/COLOR]</integer>
DO NOT change
Code:
<integer name="config_lidKeyboardAccessibility">[COLOR="red"]0[/COLOR]</integer>
When I did, I got bootloops.
Click to expand...
Click to collapse
PHYSICAL KEYBOARD BUTTON BACKLIGHT
I've tried lms24's fix for ICS (scroll down to the bottom of the post) but unfortunately this does not work, which I'm slightly surprised at being as other framework tweaks (for soft keyboard) work, and comparing JB's values for this stuff to ICS's does not show much difference.
Click to expand...
Click to collapse
PHYSICAL KEYBOARD OPEN / LID OPEN STATE (SCREEN ROTATION UPON OPENING KEYBOARD)
I've had a look in android.policy.jar and in PhoneWindowManager.smali there is an interesting method, it is in the original Jelly Belly ROM (which is what, if you're porting, you should be using because the other JB ROMs are test builds) but is not in the PA ROM I'm porting (nor will it be in any other non-Vision ROM, I guess). Take a look. Simply putting the method into the ported ROM's PhineWindowManager.smali file doesn't work, there must be something deeper at work here.
Code:
.method private applyLidSwitchState()V
.registers 4
.prologue
.line 5042
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPowerManager:Landroid/os/LocalPowerManager;
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->isBuiltInKeyboardVisible()Z
move-result v1
invoke-interface {v0, v1}, Landroid/os/LocalPowerManager;->setKeyboardVisibility(Z)V
.line 5044
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLidState:I
if-nez v0, :cond_1a
iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLidControlsSleep:Z
if-eqz v0, :cond_1a
.line 5045
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPowerManager:Landroid/os/LocalPowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v1
invoke-interface {v0, v1, v2}, Landroid/os/LocalPowerManager;->goToSleep(J)V
.line 5047
:cond_1a
return-void
.end method
Click to expand...
Click to collapse
TO FINISH OFF
Here's how strapped365 told me to finish it off (I used Ubuntu's built in archive manager to do this, it should work fine, if you're not using 7zip just extract the right files from the original, delete the respective files in the new one and pack the old stuff):
Once the apk is compiled open the newly compiled apk with 7zip on one window and then open the original untouched apk in another 7zip window and drag the META_inf and manifest XML from the original apk into the new apk ( the new apk NEEDS these ) once that's done your good to go. Just note that this still leaves an onscreen keyboard in landscape when then keyboard is open, but its better than what your dealing with.
Click to expand...
Click to collapse
Obviously make sure the new file is renamed to to framework-res.apk.
THANKS TO...
ajhavery
lms24
strapped365
For helping me out with all this... so far this is not spawned in any way from my own knowledge (although I have been doing my own investigating) but has been from help and advice from the above.
Click to expand...
Click to collapse
RESERVED
RESERVED
AW: [INFO][REF][MON 18 FEB '13] Jelly Bean Porting thread | Vision Keyboard Fixes
Good job man! This will be appreciated by many g2 devs, when it comes to in porting. Thanks for sharing.
Sent from my HTC One X using xda app-developers app

[MOD][GUIDE] Removing SysScope - Permanent "Official" Device Status [update 8-12-13]

[MOD][GUIDE] Removing SysScope - Permanent "Official" Device Status [update 8-12-13]
Notice (4/16/14): I'm no longer here. I've said "goodbye" to AT&T and their locked bootloader schemes. I'm voting with my wallet - I've sold my I337 and switched to T-Mobile. My apologies to the community, but you're now on your own here.
First and foremost, most of the credit goes to [email protected] and dwitherell for their hard work in this thread, and all the help they provided me to get this to work on the S4. Also some thanks to sicopat, with his instructions in this thread for deodexing APKs.
This guide will show you how to delete SysScope, and permanently alter your "Device Status" (Settings -> More -> About device -> Status -> Device Status) to be "Official". Futher, it will keep your boot logo to be the original "Galaxy S4" logo, and not the "Custom"/padlock logo. Before you begin, you will need to be sure that your device does not already show "Custom" - otherwise your boot logo will permanently be stuck showing the "Custom"/padlock. [Update 6-26-13: I've posted a method below that will allow you to restore your custom status temporarily before removing SysScope.] A couple more details about SysScope and how it works and what it is scanning for are in my old thread here.
Important Notes:
This mod will make changes to your SecSettings.apk, so there is risk of borking your device. I am not responsible if you mess anything up on your device!
This mod was performed on the AT&T Galaxy S4 (SGH-I337) with the latest OTA Update available at this time (I337UCUAMDL).
This mod was performed on the STOCK UCUAMDL ROM. You might be able to make these same changes to other TW-based roms. Good luck.
You must be rooted.
It is highly advised to make a nandroid backup of your entire system/data before continuing. Seriously - go do it now.
Your device must be in debugging mode (of course) and your ADB should be readily available (set in path, or dumped into your working folder). If you don't know what I'm talking about, you should probably stop now.
Click to expand...
Click to collapse
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?). Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Click to expand...
Click to collapse
Added 6-26-13 - How to get "Official" status back before making it permanent:
If for some reason you already have a "custom" status, you can perform this lengthy, yet sure-fire method to get it back...
Install your favorite recovery by whatever means.
Personally, I like TWRP, and I install it using an ADB Shell:
http://www.teamw.in/project/twrp2/174 said:
$ su
# dd if=/sdcard/recoveryfilename.img of=/dev/block/mmcblk0p21
Click to expand...
Click to collapse
Make a nandroid backup of your device as it is now, just as a precaution.
Perform all the steps below to remove SysScope from your device (including the reboot at the end!). Note that this will not fix your "Custom"/padlock boot logo at this time.
Check to be sure SysScope gone by looking at Settings -> More -> About device -> Status -> Device status. It should say "Official".
Make another nandroid backup - this time you're making a backup of your system without SysScope inside of it.
Odin back to MDL stock. Personally, I recommend that you also backup your internal SD card to your computer before using the Odin-to-Stock. You might need to wipe your data to get the odin-to-stock to work correctly, which if done improperly, will wipe your SD card also.
After device boots fully, manually restart the phone again.
Watch to be sure boot logo is not the "custom"/padlock. If you'd like to be extra-sure your status is "Official", you can boot into Download/Odin mode again, and check the status there.
Run Motochopper, but DO NOT allow motochopper to restart the device!
Make sure motochopper reads "Success!". If it fails, just CLOSE the program and start it again. Do not press any key to reboot!
When motochopper says, "Exploit complete. Press enter to reboot and exit" - just close motochopper without pressing any keys!
Motochopper available here.
Install your favorite recovery again. Do not restart your phone at this time!
In the instructions to remove SysScope, repeat step #10 (the final step with all the shell commands) again to remove SysScope again.
Technically this step is optional, but it is needed if your facorite recovery doesn't format/restore the System partition when it restores nandroid backups. Better safe than sorry.
Regardless, we don't ever want to allow the phone to reboot into the normal System while SysScope still exists.
Restore the second nandroid backup you took, and reboot into System.
Click to expand...
Click to collapse
Main Instructions:
Pull a copy of entire contents of /system/framework folder "framework" in your current working folder.
Code:
adb pull /system/framework/ ./framework/
Pull a copy of the SecSettings.apk and its .odex file
Code:
adb pull /system/app/SecSettings.apk
adb pull /system/app/SecSettings.odex
Deodex SecSettings.apk
Code:
java -jar baksmali-1.4.2.jar -a 17 -x SecSettings.odex -d framework
java -jar smali-1.4.2.jar ./out -o classes.dex
Decompile classes.dex
Code:
java -jar baksmali-1.4.2.jar -a 17 -o .\classes_out classes.dex
Edit classes_out\com\android\settings\deviceinfo\Status.smali manually (using Notepad++). "Remove:" means to delete a line or remove a section entirely. "Change:" means to look at the original code, and make it look like the "to" part.
Remove:
Code:
.field private isSysScopeStatus:I
Remove:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
Remove:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
Remove:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
Remove:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
Remove:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
Remove:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Change:
Code:
.line 952
const v1, 0x7f09013f
to
Code:
.line 952
const v1, 0x7f09013d
Change:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f09013e
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
to
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f09013d
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
Recompile classes.dex
Code:
java -jar smali-1.4.2.jar -a 17 .\classes_out -o classes.dex
Put classes.dex into SecSettings.apk. To do this, open SecSettings.apk in 7Zip, and drag/drop your new classes.dex into the root of SecSettings.apk. Save and close.
ZipAlign SecSettings.apk (optional, but advised)
Code:
zipalign -v 4 SecSettings.apk zip_SecSettings.apk
Push it to the sdcard
Code:
adb push zip_SecSettings.apk /sdcard/
Install! Use "adb shell" to begin, and use the following commands, one at a time:
Code:
su
mount -o rw,remount /system
stop
mv /system/app/SecSettings.apk /system/app/SecSettings.bak
mv /system/app/SecSettings.odex /system/app/SecSettings.odexbak
mv /system/app/SysScope.apk /system/app/SysScope.bak
mv /system/app/EdmSysScopeService.apk /system/app/EdmSysScopeService.bak
mv /system/app/EdmSysScopeService.odex /system/app/EdmSysScopeService.odexbak
cp /sdcard/zip_SecSettings.apk /system/app/SecSettings.apk
rm -r /data/dalvik-cache/*
reboot
Click to expand...
Click to collapse
Added 8-12-13 - Flashable zips!
I've uploaded CWM/TWRP flashable zips for the SysScope mod for both MDL and MF3 firmware for the I337. Here are the download links:
mdl-remove-SysScope.zip (mirror)
mf3-remove-SysScope.zip (mirror)
The zip will do the following:
Mount /system and /data
Remove the following files (note that it doesn't make any backups):
/system/app/SecSettings.apk
/system/app/SecSettings.odex
/system/app/SysScope.apk
/system/app/EdmSysScopeService.apk
/system/app/EdmSysScopeService.odex
Extracts the new SecSettings.apk into place
Updates permissions on /system/app/SecSettings.apk to 0644
Wipes dalvik cache
Unmounts /system and /data
Click to expand...
Click to collapse
I'm not a Dev. Just a fellow XDA member, sharing some hard work with the rest of you. If this helped you out in any way, just hit the Thanks button.
To Devs: If you use this mod in your stock-based ROMs (if needed), it would be appreciated if you at least mention my name and/or [email protected] and dwitherell somewhere. Thanks. ^_^
Attached, you'll find a text copy of my I337UCUAMDL's Status.smali (rename to Status.smali if you want to use it directly). Good to compare against, or you can just skip to step 7 and place the attached classes.dex into your SecSettings.apk. Remember, these are for STOCK I337UCUAMDL only.
Update 8-13-13: I've also attached the Status.smali for MGA. Thanks to @Dean1650 for providing the original and testing it on his device.
OP i hope you dont mind i added your method to my thread that talks about this issue http://forum.xda-developers.com/showthread.php?t=2296014
Keep me posted if you have a problem with that and i'll take it down
P.S. i hotlinked to this thread, i didnt include instructions in mine
Nice write up! One small note - and the below quote is just an example snippet of the OP:
Aou said:
...
Deodex SecSettings.apk
Code:
java -jar baksmali-1.4.2.jar -a [b][i][u][color="red"]15[/b][/u][/i][/color] -x SecSettings.odex -d framework
java -jar smali-1.4.2.jar ./out -o classes.dex
Decompile classes.dex
Code:
java -jar baksmali-1.4.2.jar -a [b][i][u][color="red"]16[/b][/u][/i][/color] -o .\classes_out classes.dex
...
Click to expand...
Click to collapse
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Aou said:
Attached, you'll find a text copy of my Status.smali (rename to Status.smali if you want to use it directly). Good to compare against, or you can just skip to step 7 and place the attached classes.dex into your SecSettings.apk. Remember, these are only for STOCK I337UCUAMDL only.
Click to expand...
Click to collapse
Great! How long until you get it into a flashable zip ? :laugh:
edit..
woops .. thanks for the guide and hard work guys!!
polish_pat said:
OP i hope you dont mind i added your method to my thread that talks about this issue http://forum.xda-developers.com/showthread.php?t=2296014
Keep me posted if you have a problem with that and i'll take it down
P.S. i hotlinked to this thread, i didnt include instructions in mine
Click to expand...
Click to collapse
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
dwitherell said:
Nice write up! One small note - and the below quote is just an example snippet of the OP:
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Click to expand...
Click to collapse
I will certainly look into this! It didn't seem to matter while compiling/decompiling in this case, but just in case there are side-effects, it's probably worth looking at.
scott14719 said:
Great! How long until you get it into a flashable zip ? :laugh:
Click to expand...
Click to collapse
Once I hear of enough positive reports, I'll look into this.
iB4STiD said:
tried this on mdob.. didn't work.. thanks for the guide tho!!
Click to expand...
Click to collapse
It would be greatly helpful to me if you elaborated on what part didn't work? Also, it's possible that SecSettings.apk is different in MDOB.
Aou said:
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
Click to expand...
Click to collapse
awesome, i've specified this in my thread, hopefully my thread will give you enough visibility people will try it out and report back to you
Aou said:
Not a problem at all! I'm not 100% sure that this will remove an existing custom boot screen. I'll look into this a bit more and get back to you.
I will certainly look into this! It didn't seem to matter while compiling/decompiling in this case, but just in case there are side-effects, it's probably worth looking at.
Once I hear of enough positive reports, I'll look into this.
It would be greatly helpful to me if you elaborated on what part didn't work? Also, it's possible that SecSettings.apk is different in MDOB.
Click to expand...
Click to collapse
edit
my error.. nm!!
iB4STiD said:
Padlock on boot up was still there after r reboots, I edited secsettings from my ROM which is stock based off amdl
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Didn't you read the op? It clearly states that if you already have the custom splash screen it won't work. This mod is to circumvent getting the custom screen. So you would have to go back to stock then use this.
This is my understanding of the op.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
shoman94 said:
Didn't you read the op? It clearly states that if you already have the custom splash screen it won't work. This mod is to circumvent getting the custom screen. So you would have to go back to stock then use this.
This is my understanding of the op.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 4 Beta
Click to expand...
Click to collapse
did read it, but read it wrong i see.. :cyclops:
Nice job.
I've added a method to restore your "Official" status temporarily while you remove SysScope. Check it out in the OP.
Also, I did check on MDOB. Status.smali seems to be identical to stock, so this method in its entirety should work on MDOB.
dwitherell said:
Nice write up! One small note - and the below quote is just an example snippet of the OP:
The values highlighted above are used to indicate the sdk version of whatever it is you are de/recompiling. Seeing as the stock S4 rom is android version 4.2.2 (at least I think it is, right?), this flag should actually be 17. Not sure it matters all that much in this case, but I just thought I'd point that out
Click to expand...
Click to collapse
I've updated the OP to include API Level 17. It appears it doesn't really matter either way, but I've made the changes just to be safe. Thanks again for pointing these out. ^_^
has anybody just tried freezing sysscope with titanium backup?
polish_pat said:
has anybody just tried freezing sysscope with titanium backup?
Click to expand...
Click to collapse
Yup. If SysScope is missing or frozen, then SecSettings will automatically report that the system is Custom.
Maybe it's just me...but The point of all this is to have the phone show Official, and not have a open padlock pop up upon reboot right?
Well, if you have a custom, rooted ROM, with lets say a custom boot animation, then it doesn't matter if the lock shows up or if your phone says custom..........but if this is for people that just want a straight stock rom with nothing added then I can see the point. On my stock rooted rom nandroid i had official, on my SHOstock ROM my phone now says custom. But i guess if I had a warranty issue I'd just odin it.
igotroot said:
Maybe it's just me...but The point of all this is to have the phone show Official, and not have a open padlock pop up upon reboot right?
Well, if you have a custom, rooted ROM, with lets say a custom boot animation, then it doesn't matter if the lock shows up or if your phone says custom..........but if this is for people that just want a straight stock rom with nothing added then I can see the point. On my stock rooted rom nandroid i had official, on my SHOstock ROM my phone now says custom. But i guess if I had a warranty issue I'd just odin it.
Click to expand...
Click to collapse
Everyone has their own reason, some just for looks, some for functionality (updates, warranty, and what-not), and others for other reasons. I just think it's none of Samsung's business what I decide to put on my phone or not.
scott14719 said:
Everyone has their own reason, some just for looks, some for functionality (updates, warranty, and what-not), and others for other reasons. I just think it's none of Samsung's business what I decide to put on my phone or not.
Click to expand...
Click to collapse
Agreed.
Samsung must have read this thread. I didn't look at MF3, but the newer international releases they made major changes to status.smali.
sent using xda Premium

[App][Mod]Random Photowall, 100+ Gallery Select

INFO
The attached apks will change PhotoWall images at random, and allow more than 100 pictures to be selected.
If you've used the PhotoWall Live Wallpaper that comes with the phone you've probably noticed
The Images go in the order they appear in the gallery
When you lock then unlock your phone(or reboot) the image resets to the first image
When you open an app that takes the view away from the wallpaper and go back to the homescreen again it resets to the first image
If you chose a lot of images chances are you don't really see most of the images after the first few, so I have modified PhotoWall.apk to grab a random image from the images you have chosen so the above doesn't happen.
Another annoyance is that you are limited to 100 pictures from within your gallery. This is actually a limitation of the gallery and not the PhotoWall app. I've also modified the Gallery app and increased the limit to 1000. I have about 800 pictures selected and PhotoWall seems to be working perfectly.
Installation
Photowall
If you are rooted download PhotoWall.apk
- From your phone memory copy or move PhotoWall.apk to your system/app directory with you favorite root file manager.
- if asked to overwrite or replace say yes.
- reboot device.
If you are not rooted download PhotoWall-nonsystem.apk
- Install as you would any normal non-market app. (you may be asked to turn on Unknown Sources from settings.)
Gallery
Only works for rooted devices.
- Download both SecGallery2_Galaxy.part1.rar and SecGallery2_Galaxy.part2.rar and extract them.
- If you downloaded to your computer copy the extracted SecGallery2_Galaxy.apk to your phone.
- Copy or Move the extracted SecGallery2_Galaxy.apk to your system/app directory with your favorite root file manager.
- if asked to overwrite or replace say yes.
- reboot device.
Issues
If you are not rooted from what I've tested, If you install PhotoWall-nonsystem.apk, after a reboot it resets to the original PhotoWall.apk and you have to reinstall again. (It could just be me, I haven't tested on a non rooted device so confirmation is needed)
Notes/Disclaimer
Gallery is split into 2 because of XDA file size limitations. Download both parts and extract the apk.
While the modifications I did to the apks were minimal and harmless, Install at your own risk, I am not responsible for anything that happens after the installation of included apks. For technical details see post 2.
PhotoWall-nonsystem.apk works with any device with 4.0 or beyond, but I cannot guarantee that it will function correctly. As far as I know it requires the samsung gallery app to be installed, I might work on that later.
Enjoy, and feel free to share and/or include anywhere you'd like.
Technical Details
For PhotoWall.apk made changes in PhotoLayouter.smali
From:
Code:
.line 960
:cond_1
const/4 v15, 0x0
invoke-virtual {v2, v15}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/String;
To:
Code:
.line 960
:cond_1
invoke-static {v10}, Lcom/siso/photoWall/PhotoUtils;->getRandomInt(I)I
move-result v15
invoke-virtual {v2, v15}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/String;
For SecGallery2_Galaxy.apk made changes in PhotoActionBarForMultiPick.smali
On line 20
From:
Code:
const/16 v0, 0x64
To:
Code:
const/16 v0, 0x3e8
and on line 201
From:
Code:
const/16 v6, 0x64
To:
Code:
const/16 v6, 0x3e8
Thanks...checking it out now....
Sent from my SGH-T889 using xda premium
After you download gallery part 1 and 2, what do you do with it? I dont get it man the instructions kind of lack after extracting both? Not trying to be a **** but to accamodate all people such as sometimes slower than normal, it should be more dummy proof, just trying to help you out so you don't have to answer a whole lot of questions. Thanks bro
bdorr1105 said:
After you download gallery part 1 and 2, what do you do with it? I dont get it man the instructions kind of lack after extracting both? Not trying to be a **** but to accamodate all people such as sometimes slower than normal, it should be more dummy proof, just trying to help you out so you don't have to answer a whole lot of questions. Thanks bro
Click to expand...
Click to collapse
OP has been updated with more detailed instructions, basically you get the extracted file SecGallery2_Galaxy.apk and with a file manager that allows root you copy the file and paste it in the system/app directory, then reboot.
liinko said:
OP has been updated with more detailed instructions, basically you get the extracted file SecGallery2_Galaxy.apk and with a file manager that allows root you copy the file and paste it in the system/app directory, then reboot.
Click to expand...
Click to collapse
thk u sir
Just tried to install this on my note 3 but photowall wont show up on my live wallpaper selections.
Edit...It just showed up now lol. The problem now is I go through my gallery and select photos and when I save and set as wallpaper, it just shows the stock live wallpaper scenery none of my selected photos. Any ideas?

Sprint galaxy s3 no schedule message option for text

On my victory running 4.1.2 it had a schedule message option on the menu. Does anyone know how to get it on the s3. I opened feature.xml and changed false to true but it still doesn't show up.
derekb123 said:
On my victory running 4.1.2 it had a schedule message option on the menu. Does anyone know how to get it on the s3. I opened feature.xml and changed false to true but it still doesn't show up.
Click to expand...
Click to collapse
Decompile SecMms.apk
Goto
smali/com/android/mms/MmsConfig.smali
Click to expand...
Click to collapse
FIND:
Code:
.method public static getEnableScheduledMessage()Z
.locals 1
.prologue
.line 878
const/4 v0, 0x0
return v0
.end method
CHANGE TO::
Code:
.method public static getEnableScheduledMessage()Z
.locals 1
.prologue
.line 878
[COLOR="Blue"]const/4 v0, 0x1[/COLOR]
return v0
.end method
Recompile, done
Thanks I'll try that. Do you know why the feature was removed?
I dont know why not even on the S2 was it enabled by default
When I decompile with apk manager it says can't find framework resources for package of id: 2. You must install proper framework files.

Categories

Resources