FORUMS
Remove All Ads from XDA

[Android 2.2+] HushSMS v2.7.2 [31.07.2014]

512 posts
Thanks Meter: 45
 
By c0rnholio, Senior Member on 10th February 2012, 04:11 PM
Post Reply Email Thread
24th September 2013, 12:29 AM |#61  
SecUpwN's Avatar
Senior Member
Flag DEUTSCHLAND!
Thanks Meter: 655
 
Donate to Me
More
Quote:
Originally Posted by androcheck

Yes, it should be possible to implement all the features of HushSMS with a Xposed module, so, yes, no need for the separate HushSMS root app (but you still will need root for installing the Xposed framework. But you only need root, so no need for a custom ROM anymore).

@c0rnholio:
You don't need to use exactly my module. It's just a quick'n'dirty proof of concept. You could simply include such a type of module directly into your main application. If I understand Xposed correctly it should be possible to simply declare a class of your project as Xposed module.

Devices without Xposed framework will ignore this, and users with Xposed can immediaely use it. So you even won't need a separate APK.

Why not make the whole app open source and let everyone together? ^^
24th September 2013, 08:16 AM |#62  
Quote:
Originally Posted by c0rnholio

I already played around a bit but for some reason my n7100 with stock 4.2.1 rom won't hook (none of the 4 available methods). Will try with CM tomorrow evening. Xposed itself is working fine with other modules. Even when I get this working there's still a lot of code to write for HushSMS internaly to support xposed. I'll write about my progress here.

Yes, it was a little bit difficult to get the method hooked. I first had the problem to find out which packge I need to hook into. I found this out by sending a SMS while watching the radio buffer logcat, and after I identified a few logstatements from the opt/telephony package I checked the process ID and searched with the "ps" command to which running Android package it belongs to (which then was "com.android.phone").

The next problem was to specify correct method signature (how do I specify a byte[] argument in Java reflection, etc..). I tried and rebooted (in between) a lot here.. But then suddenly I saw the long expected log message "method hooked" .

And with cyanogen I even had the sourcecode to the framework.. So this may be even much more difficult for proprietary closed source ROMs. In the worst case manufacturers use different package names, or changed/removed method names or signatures.. So maybe this will be a hard way to go (or will take a lot of testing).

But take your time, I did not want to make any pressure here.. if it's not working, you at least tried and it's also ok.


Quote:
Originally Posted by SecUpwN

Why not make the whole app open source and let everyone together? ^^

This would be c0rnholio's decision, but I'm fine with it, like it's now. I would not have the time to contribute, so I just throw some ideas out, and hope that someone else will implement them.
The Following User Says Thank You to androcheck For This Useful Post: [ View ] Gift androcheck Ad-Free
24th September 2013, 08:26 PM |#63  
OP Senior Member
Flag in the basement...
Thanks Meter: 45
 
More
With a MEGA HUGE THANKS to John (androcheck) I'm happy to annouce version 2.1. I just uploaded it to the Play Store, so it should be available in a few hours.
This version supports the Xposed Framework and utilizes a method to hook messaging internals brought to my attention by androcheck.

So, yes, this version should enable the full feature set on phones with the Xposed framework installed, even on rooted stock ROMs. All you have to do is install version 2.1 and go into the Xposed settings, enable the HushSMS module and reboot.

Let me know if it works!

UPDATE: It might be that the xposed hook will not work and you receive a strange message on the target phone. I found it is working on some phones and on a tablet with phone module for example it is not working. I suggest you send a message (class0 for example) to yourself to check if it is working before you send it to someone else.
I'll try to fix this issue ASAP.

Cheers
The Following User Says Thank You to c0rnholio For This Useful Post: [ View ] Gift c0rnholio Ad-Free
25th September 2013, 03:34 AM |#64  
SecUpwN's Avatar
Senior Member
Flag DEUTSCHLAND!
Thanks Meter: 655
 
Donate to Me
More
Quote:
Originally Posted by c0rnholio

With a MEGA HUGE THANKS to John (androcheck) I'm happy to annouce version 2.1. I just uploaded it to the Play Store, so it should be available in a few hours.
This version supports the Xposed Framework and utilizes a method to hook messaging internals brought to my attention by androcheck.

So, yes, this version should enable the full feature set on phones with the Xposed framework installed, even on rooted stock ROMs. All you have to do is install version 2.1 and go into the Xposed settings, enable the HushSMS module and reboot.

No way. A single, fully working app? You guys are soo awesome, thank you soo much, @androcheck and @c0rnholio! This is the moment where I want to have that new unified app on my phone! Can I pay you with a google gift card without having to register at GooglePlay? If not, please provide an alternative! So eager to have that app..
25th September 2013, 07:53 AM |#65  
Quote:
Originally Posted by c0rnholio

Let me know if it works!

Hi @c0rnholio! Wow, you're working pretty fast!

Unfortunately it's not working (yet) on my Nexus 4 with cyanogenmod 10.2. I've tested with your latest version 2.1.1 (23) from the market.

Here my observations:

At my first try, although I've enabled the HushSMS module in the Xposed installer, the module didn't get loaded by the Xposed framework. For some reason it looked in the wrong path so I got a "File does not exist" error in the Xposed logfile. Here is the logcat output (the same like in /data/xposed/debug.log):
Code:
09-25 08:10:14.692 I/Xposed  (  191): -----------------
09-25 08:10:14.692 I/Xposed  (  191): 25.09.2013 06:10:14 UTC
09-25 08:10:14.692 I/Xposed  (  191): Loading Xposed (for Zygote)...
09-25 08:10:14.772 I/Xposed  (  191): Loading modules from /data/app/pk.qwerty12.receivedsmssenttimesindetails-1.apk
09-25 08:10:14.942 I/Xposed  (  191):   Loading class pk.qwerty12.receivedsmssenttimesindetails.ReceivedSMSSentTimesInDetails
09-25 08:10:14.942 I/Xposed  (  191): Loading modules from /mnt/asec/com.silentservices.hushsms-1/pkg.apk
09-25 08:10:14.942 I/Xposed  (  191):   File does not exist
You can see the Xposed framework tried to load your module from the path /mnt/asec/com.silentservices.hushsms-1/pkg.apk. I checked myself on the shell and saw that in fact it was installed under: /mnt/asec/com.silentservices.hushsms-2/pkg.apk.

I have no idea why the application is installed at "hushsms-2" and why Xposed looked at "hushsms-1". Maybe this has to do with the fact that some days ago, when I tested HushSMS the very first time, I uninstalled and refunded it again after a few minutes, and yesterday bought and installed it once again. Maybe this re-installation caused the new path? But that's just a rough guess.

Nevertheless, I did the following steps, which corrected this problem:
  • uncheck HushSMS module in Xposed
  • uninstall HushSMS
  • reboot phone
  • install HushSMS again from Play Store
  • activate HushSMS module in Xposed installer
  • reboot phone once again
After this procedure the Xposed module gets loaded correctly (the application is now installed at /mnt/asec/com.silentservices.hushsms-1/pkg.apk and exposed loads the module correctly now.

UPDATE:
Sorry, no, after another reboot there is still a problem with the loading of the Xposed module. Now I get the same error again:
Code:
09-25 08:44:34.443 I/Xposed  (  191): Loading modules from /mnt/asec/com.silentservices.hushsms-1/pkg.apk
09-25 08:44:34.443 I/Xposed  (  191):   File does not exist
but when I check on the adb shell the file DOES exist at this location.

Hmm.. strange. Mabe the encrypted filesystems for protected apps (the /mnt/asec/.. ones) gets mounted after the Xposed framework loads?? Just guessing..


As a result of this problem (when module is not loaded) I can see your "special" SMS text ("allyourmessages.."). To avoid this you could insert a check into your application if the Xposed module is really loaded.

I saw a nice way to to this here in this Xposed module:
https://github.com/rovo89/Smiley-Rep...s/Mod.java#L64
As you can see in the handleLoadPackage() method the author sets a static variable in his own Xposed module application. So at other places in his application he just needs to check the value of this static field, to determine if the module was correctly loaded by Xposed.


At the moment I have no idea, why the module loading is not working.. I will do some more checks and let you know, if I find something out. maybe you still need to outsource your Xposed module into a separate apk? No idea..


john
25th September 2013, 08:06 AM |#66  
OP Senior Member
Flag in the basement...
Thanks Meter: 45
 
More
Quote:
Originally Posted by androcheck

I saw a nice way to to this here in this Xposed module:
https://github.com/rovo89/Smiley-Rep...s/Mod.java#L64
As you can see in the handleLoadPackage() method the author sets a static variable in his own Xposed module application. So at other places in his application he just needs to check the value of this static field, to determine if the module was correctly loaded by Xposed.


At the moment I have no idea, why the module loading is not working.. I will do some more checks and let you know, if I find something out. maybe you still need to outsource your Xposed module into a separate apk? No idea..


john

Hi @androcheck

Thanks for testing and the detailed report. I have no idea why this fails on your device. I will make some further checks. In the meantime I will add an option to check if the module is loaded as you suggested and revert to default mode if it is not.

This is very strange, as it works correctly on my CM 10.1 Galaxy Tab and my N7100 with a Stock ROM.

Maybe I should set up a beta phase in play store so that some users can test it before it published as a production app...

I feel we are very close to a final solution.
25th September 2013, 08:13 AM |#67  
Short update:

The one time when the Xposed module got loaded, I still got another error in logcat (unfortunately I didn't try to send a SMS, so I have no idea if this error would have been critcal):
Code:
09-25 08:15:44.322 I/Xposed  ( 7666): Loading modules from /mnt/asec/com.silentservices.hushsms-1/pkg.apk
09-25 08:15:44.352 I/Xposed  ( 7666):   Loading class com.silentservices.hushsms.HushSMSExposedHelper
09-25 08:15:44.352 I/dalvikvm( 7666): Could not find method com.android.internal.telephony.gsm.SmsMessage.calculateLength, refere
nced from method com.silentservices.hushsms.HushSMSExposedHelper.a
09-25 08:15:44.352 W/dalvikvm( 7666): VFY: unable to resolve static method 159: Lcom/android/internal/telephony/gsm/SmsMessage;.c
alculateLength (Ljava/lang/CharSequence;Z)Lcom/android/internal/telephony/SmsMessageBase$TextEncodingDetails;
09-25 08:15:44.352 D/dalvikvm( 7666): VFY: replacing opcode 0x71 at 0x0007
As far I can see, in Android 4.3 (and afaik also in previous Android versions) this method takes 2 arguments (CharSequence and boolean):
http://grepcode.com/file/repository....e%2Cboolean%29

hope I can help.
25th September 2013, 08:17 AM |#68  
OP Senior Member
Flag in the basement...
Thanks Meter: 45
 
More
Quote:
Originally Posted by androcheck

Short update:

The one time when the Xposed module got loaded, I still got another error in logcat (unfortunately I didn't try to send a SMS, so I have no idea if this error would have been critcal):

Code:
09-25 08:15:44.322 I/Xposed  ( 7666): Loading modules from /mnt/asec/com.silentservices.hushsms-1/pkg.apk
09-25 08:15:44.352 I/Xposed  ( 7666):   Loading class com.silentservices.hushsms.HushSMSExposedHelper
09-25 08:15:44.352 I/dalvikvm( 7666): Could not find method com.android.internal.telephony.gsm.SmsMessage.calculateLength, refere
nced from method com.silentservices.hushsms.HushSMSExposedHelper.a
09-25 08:15:44.352 W/dalvikvm( 7666): VFY: unable to resolve static method 159: Lcom/android/internal/telephony/gsm/SmsMessage;.c
alculateLength (Ljava/lang/CharSequence;Z)Lcom/android/internal/telephony/SmsMessageBase$TextEncodingDetails;
09-25 08:15:44.352 D/dalvikvm( 7666): VFY: replacing opcode 0x71 at 0x0007
As far I can see, in Android 4.3 (and afaik also in previous Android versions) this method takes 2 arguments (CharSequence and boolean):
http://grepcode.com/file/repository....e%2Cboolean%29

hope I can help.

Yes, thats the error I get on my tablet (N5100) also. This method hasn't changed in between the ROM versions and is correctly called on CM 10.1 an 4.1.2 stock. I will dig a bit deeper.
25th September 2013, 08:33 AM |#69  
SecUpwN's Avatar
Senior Member
Flag DEUTSCHLAND!
Thanks Meter: 655
 
Donate to Me
More
Quote:
Originally Posted by SecUpwN

No way. A single, fully working app? You guys are soo awesome, thank you soo much, @androcheck and @c0rnholio! This is the moment where I want to have that new unified app on my phone! Can I pay you with a google gift card without having to register at GooglePlay? If not, please provide an alternative! So eager to have that app..

Why do you ignore my question?
25th September 2013, 08:50 AM |#70  
OP Senior Member
Flag in the basement...
Thanks Meter: 45
 
More
Quote:
Originally Posted by SecUpwN

Why do you ignore my question?

I have answered this so many times to you. Even via PM. You are driving me nuts. This is the last time I explain this.

HushSMS uses the Google License Verification Lib. This is to ensure to some extent that the App is bought via Google Play Store and is paid. I do this because to protect to some extent against piracy.

You always told me that you would not give your credit card info to google. Now, that there is no more need for this because of the gift cards, you now tell me that you won't even register to google. Well, still there is an alternative to you. You can buy the app from AndroidPit. This way you don't have to register with google but only with AndroidPit. If you still insist in not wanting to register anywhere there is still an alternative for you: Get an old Windows Mobile Device and install the free version of HushSMS from my website.

If you want it for Android you WILL HAVE TO get it from the Google Play Store, AndroidPit or just simply crack the app and remove the LVL and be happy.

So no! I will not make a special version for you without LVL or AndroidPit License Check. I will not make my App open source. No offense intended but: DEAL WITH IT!
The Following User Says Thank You to c0rnholio For This Useful Post: [ View ] Gift c0rnholio Ad-Free
25th September 2013, 09:58 AM |#71  
OP Senior Member
Flag in the basement...
Thanks Meter: 45
 
More
Quote:
Originally Posted by androcheck

Short update:

The one time when the Xposed module got loaded, I still got another error in logcat (unfortunately I didn't try to send a SMS, so I have no idea if this error would have been critcal):

Code:
09-25 08:15:44.322 I/Xposed  ( 7666): Loading modules from /mnt/asec/com.silentservices.hushsms-1/pkg.apk
09-25 08:15:44.352 I/Xposed  ( 7666):   Loading class com.silentservices.hushsms.HushSMSExposedHelper
09-25 08:15:44.352 I/dalvikvm( 7666): Could not find method com.android.internal.telephony.gsm.SmsMessage.calculateLength, refere
nced from method com.silentservices.hushsms.HushSMSExposedHelper.a
09-25 08:15:44.352 W/dalvikvm( 7666): VFY: unable to resolve static method 159: Lcom/android/internal/telephony/gsm/SmsMessage;.c
alculateLength (Ljava/lang/CharSequence;Z)Lcom/android/internal/telephony/SmsMessageBase$TextEncodingDetails;
09-25 08:15:44.352 D/dalvikvm( 7666): VFY: replacing opcode 0x71 at 0x0007
As far I can see, in Android 4.3 (and afaik also in previous Android versions) this method takes 2 arguments (CharSequence and boolean):
http://grepcode.com/file/repository....e%2Cboolean%29

hope I can help.

OK, I found and understood the cause of both bugs.

The first is that at the time xposed is loaded the Play Store encrypted storage is not available thus the load of the module fails. A temporary workaround is to install it from play store, download the apk to the pc, delete it from the device and install the apk via adb. Thus the app is not installed in the encrypted storage and the module should load correctly.

The second bug is due to the calculateLength method has changed since android 4.2 thus the request fails on device with ROMs above 4.1.2.

I will try to find away around both bugs tonight and post here if I have any progress.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes