xda-developers

xda-developers (https://forum.xda-developers.com/index.php)
-   Xposed Framework Modules (https://forum.xda-developers.com/forumdisplay.php?f=2919)
-   -   [App]XSecureStorage - Bypass secure storage checks on SHealth and Private mode (https://forum.xda-developers.com/showthread.php?t=2878708)

wanam 16th September 2014 12:00 PM

[App]XSecureStorage - Bypass secure storage checks on SHealth and Private mode
 
4 Attachment(s)
Hi guys,

I was not planning to buy a GalaxyS5, but i was lucky to get one as gift this weekend.

One of the issues i noticed on the past two days was the SHealth incompatibility with Xposed (described on this thread), somehow if you are using Xposed framework, Secure storage will fails to process and save data, which leads to Sensor service hangs

This module bypass the secure storage checks on SHealth and Private mode services, and will let you load the SHealth App with no hangs and activate Private mode on Rooted Samsung devices running Xposed framework.

I did just the basic tests for SHealth because i don't use this App anyway, it's not easy to play football with a device on my hands/pocket :D .

Download

Note:
  • You may need to clear SHealth and Health service data (you will loose your Pedometer data).
  • Clearing Personal pages service will break Private mode.
Troubleshooting:
If you can't get Private mode to work after switching to Xposed, you need to go back to a stock FW and backup your private files, after that you can install Xposed and enable my module then remove "/data/system/users/privatemode_edk_1000" as advised by @invano.

Changelog:
1.0.1:
- Add Private mode support.
- App renamed from XHealth to XSecureStorage


Thanks to:
  • Rovo89 for his awesome work on Xposed framework and Mods.
  • Tungstwenty for contribution on Xposed framework and his many Mods

Orka82 16th September 2014 12:23 PM

Working good! I had the secure storage disabled but I enabled it now and tried your module. S Health works! Thank you!

ulsa 16th September 2014 12:57 PM

Not working for me. Getting “Health service has stopped working” about every other second. Much more frequent than before…
Maybe I am doing something wrong.
It also seems to reset everything saved in the Health Service app, or? Maybe you should have mentioned that.

wanam 16th September 2014 01:00 PM

Quote:

Originally Posted by ulsa (Post 55481413)
Not working for me. Getting “Health service has stopped working” about every other second. Much more frequent than before…
Maybe I am doing something wrong.
It also seems to reset everything saved in the Health Service app, or? Maybe you should have mentioned that.

Can you post your xposed logs?

ulsa 16th September 2014 01:54 PM

Quote:

Originally Posted by wanam (Post 55481483)
Can you post your xposed logs?

16 sep 2014 11:46:32 UTC
Loading Xposed v54 (for Zygote)...
Running ROM 'KOT49H.G900FXXU1ANG9' with fingerprint 'samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANG9:user/release-keys'
-----------------
16 sep 2014 11:50:23 UTC
Loading Xposed v54 (for Zygote)...
Running ROM 'KOT49H.G900FXXU1ANG9' with fingerprint 'samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANG9:user/release-keys'
Loading modules from /data/app/ma.wanam.xshealth-1.apk
Loading class ma.wanam.xshealth.Xposed
Loading modules from /data/app/com.oasisfeng.greenify-4.apk
Loading class com.oasisfeng.greenify.pro.FrameworkPatch
Loading class com.oasisfeng.greenify.pro.SettingsPatch
Loading modules from /data/app/com.bubblesoft.android.bubbleupnp-6.apk
Loading class com.bubblesoft.android.bubbleupnp.xmod.BubbleUPnPX Mod
logging enabled: false
created audio cast fifo: /data/data/com.bubblesoft.android.bubbleupnp/audiocast

wanam 16th September 2014 02:03 PM

Quote:

Originally Posted by ulsa (Post 55482409)
16 sep 2014 11:46:32 UTC
Loading Xposed v54 (for Zygote)...
Running ROM 'KOT49H.G900FXXU1ANG9' with fingerprint 'samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANG9:user/release-keys'
-----------------
16 sep 2014 11:50:23 UTC
Loading Xposed v54 (for Zygote)...
Running ROM 'KOT49H.G900FXXU1ANG9' with fingerprint 'samsung/kltexx/klte:4.4.2/KOT49H/G900FXXU1ANG9:user/release-keys'
Loading modules from /data/app/ma.wanam.xshealth-1.apk
Loading class ma.wanam.xshealth.Xposed
Loading modules from /data/app/com.oasisfeng.greenify-4.apk
Loading class com.oasisfeng.greenify.pro.FrameworkPatch
Loading class com.oasisfeng.greenify.pro.SettingsPatch
Loading modules from /data/app/com.bubblesoft.android.bubbleupnp-6.apk
Loading class com.bubblesoft.android.bubbleupnp.xmod.BubbleUPnPX Mod
logging enabled: false
created audio cast fifo: /data/data/com.bubblesoft.android.bubbleupnp/audiocast

No issues on the logs, which means it should be working fine, are you using the latest SHealth update? were you using any other mod to get it working before?

About the App data, i got a popup to restore my data through SHealth App and it was restored with no issues!

ulsa 16th September 2014 02:45 PM

S health says it's the latest update.

I have not done any other mods.
I did not get a restore popup. The data was automatically restored when I uninstalled xsposed.

Skickat från min SM-G900F via Tapatalk

wanam 16th September 2014 02:52 PM

Quote:

Originally Posted by ulsa (Post 55483373)
S health says it's the latest update.

I have not done any other mods.
I did not get a restore popup. The data was automatically restored when I uninstalled xsposed.

Skickat från min SM-G900F via Tapatalk

Okay, if you have time to try the module again, PM me your logcat.

If don't get the same bellow errors, then it should be other thing:

Code:

I/SecureStorage( 7245): [INFO]: SPID(0x00000000)Processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)transition_table [first_perm][second_perm] != 0
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)first_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)second_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Block_perm = 2
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=0 415E4000 - 41650000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=1 41650000 - 41651000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=2 41651000 - 416A7000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=3 416A7000 - 416AB000 r--p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=4 416AB000 - 416B1000 rw-p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=5 416B1000 - 416B5000 rw-p
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)bad block
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)parse_proc_fs error
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Error processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Android: read data error: -2
I/SecureStorage( 7245): [INFO]: SPID(0x00000000)Processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)transition_table [first_perm][second_perm] != 0
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)first_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)second_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Block_perm = 2
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=0 415E4000 - 41650000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=1 41650000 - 41651000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=2 41651000 - 416A7000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=3 416A7000 - 416AB000 r--p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=4 416AB000 - 416B1000 rw-p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=5 416B1000 - 416B5000 rw-p
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)bad block
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)parse_proc_fs error
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Error processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Android: read data error: -2
I/SecureStorage( 7245): [INFO]: SPID(0x00000000)Processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)transition_table [first_perm][second_perm] != 0
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)first_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)second_perm = 3
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Block_perm = 2
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=0 415E4000 - 41650000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=1 41650000 - 41651000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=2 41651000 - 416A7000 r-xp /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=3 416A7000 - 416AB000 r--p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=4 416AB000 - 416B1000 rw-p /system/lib/libdvm.so
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)i=5 416B1000 - 416B5000 rw-p
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)bad block
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)parse_proc_fs error
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Error processing data
E/SecureStorage( 7245): [ERROR]:SPID(0x00000000)Android: read data error: -2
I/SQLiteSecureOpenHelper( 7245): getWritableDatabase(pwd)
I/SQLiteSecureOpenHelper( 7245): getDatabaseLocked(b,b,pwd)...
I/SQLiteSecureOpenHelper( 7245): Open platform.db in secure mode
E/SQLiteLog( 7245): (26) statement aborts at 0: [PRAGMA user_version;] file is encrypted or is not a database
E/DefaultSecureDatabaseErrorHandler( 7245): Corruption reported by sqlite on database: /data/user/0/com.sec.android.service.health/databases/platform.db
E/DefaultSecureDatabaseErrorHandler( 7245): backup the database file: /data/user/0/com.sec.android.service.health/databases/platform.db
D/SQLiteSecureOpenHelper( 7245): ...getDatabaseLocked(b,b,pwd)
E/JavaBinder( 7245): *** Uncaught remote exception!  (Exceptions are not yet supported across processes.)
E/JavaBinder( 7245): java.lang.RuntimeException: android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26)
E/JavaBinder( 7245):        at com.sec.android.service.health.cp.database.DBManager.getWritableDatabase(DBManager.java:164)
E/JavaBinder( 7245):        at com.sec.android.service.health.cp.database.DBManager.getWritableDatabase(DBManager.java:100)
E/JavaBinder( 7245):        at com.sec.android.service.health.cp.HealthContentProvider.query(HealthContentProvider.java:534)
E/JavaBinder( 7245):        at android.content.ContentProvider.query(ContentProvider.java:857)
E/JavaBinder( 7245):        at android.content.ContentProvider$Transport.query(ContentProvider.java:200)
E/JavaBinder( 7245):        at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
E/JavaBinder( 7245):        at android.os.Binder.execTransact(Binder.java:404)
E/JavaBinder( 7245):        at dalvik.system.NativeStart.run(Native Method)
E/JavaBinder( 7245): Caused by: android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:788)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
E/JavaBinder( 7245):        at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:825)
E/JavaBinder( 7245):        at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:813)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:996)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteSecureOpenHelper.getDatabaseLocked(SQLiteSecureOpenHelper.java:366)
E/JavaBinder( 7245):        at android.database.sqlite.SQLiteSecureOpenHelper.getWritableDatabase(SQLiteSecureOpenHelper.java:275)
E/JavaBinder( 7245):        at com.sec.android.service.health.cp.database.DBManager.getWritableDatabase(DBManager.java:153)
E/JavaBinder( 7245):        ... 7 more


Sock12345 16th September 2014 04:14 PM

Works perfect!!!
Using Neatrom v2.2 odexed
Set false back to true and works without a fc :) @ulsa try fc and wipe data of shealth make a backup first if you dont want to lose progress.
Reboot and try again might work for you.

Verstuurd vanaf mijn SM-G900F met Tapatalk

ulsa 16th September 2014 04:37 PM

Quote:

Originally Posted by Sock12345 (Post 55485237)
Works perfect!!!
Using Neatrom v2.2 odexed
Set false back to true and works without a fc :) @ulsa try fc and wipe data of shealth make a backup first if you dont want to lose progress.
Reboot and try again might work for you.

Verstuurd vanaf mijn SM-G900F met Tapatalk

FC and wiping data worked perfectly. Thanks to you both!


All times are GMT +1. The time now is 11:32 AM.