Patch for Overriding SharedPreferences
ββββββββββββββββββββββ
Usage:
π 1. Copy snippet and paste into onCreate method of Launcher Activity
(It would be better if you create new method and paste snippet then call it in onCreate of Launcher Activity)
π 2. Increase 4 digits in registers of that method in which you put this snippet
and increase 5 digits if you want to use snippet of long data
π For Video Tutorial
https://t.me/TDOhex
ββββββββββββββββββββββ
π 1. For Storing Boolean Data
const-string v0, "yourSPName" # Put the name of that SharedPreferences which you want to edit.
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const/4 v2, 0x1 # Boolean value, put the value as your requirement.
const-string v3, "isAppBought" # Boolean key, put your keyword that you find out.
invoke-interface {p0, v3, v2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
ββββββββββββββββββββββ
π For Storing Integer Data
const-string v0, "yourSPName" # Put the name of that SharedPreferences which you want to edit.
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const v2, 0x7fffffff # Integer value, put the value as your requirement.
const-string v3, "userDiamonds" # Integer key, put your keyword that you find out.
invoke-interface {p0, v3, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
ββββββββββββββββββββββ
π For Storing String Data
const-string v0, "yourSPName" # Put the name of that SharedPreferences which you want to edit.
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-string v2, "active" # String value, put the value as your requirement.
const-string v3, "subStatus" # String key, put your keyword that you find out.
invoke-interface {p0, v3, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
ββββββββββββββββββββββ
π For Storing Long Data
const-string v0, "yourSPName" # Put the name of that SharedPreferences which you want to edit.
const/4 v1, 0x0
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p0
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object p0
const-wide v3, 0x7fffffffffffffffL # Long value, put the value as your requirement.
const-string v2, "userCoins" # Long key, put your keyword that you find out.
invoke-interface {p0, v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->apply()V
βββββββββββββββββββ
β»οΈ Join Channel:
π£ Second Channel:
https://t.me/TDOhex
π¬ Discussion Group:
https://t.me/TDOhex_Discussion
βββββββββββββββββββ