-
-
Save theblackturtle/3a053729c2ef2575fcc7c02f81acfef4 to your computer and use it in GitHub Desktop.
Revisions
-
Areizen revised this gist
Jul 10, 2019 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,6 @@ Java.perform(function(){ // reflection class for changing const const Field = Java.use('java.lang.reflect.Field') const Class = Java.use('java.lang.Class') // Replacing Build static fields replaceFinaleField(Build, "FINGERPRINT", "abcd/C1505:4.1.1/11.3.A.2.13:user/release-keys") -
Areizen created this gist
Jul 10, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ function replaceFinaleField(object, fieldName, value){ var field = object.class.getDeclaredField(fieldName) field.setAccessible(true) field.set(null, value) } Java.perform(function(){ // Class containing const that we want to modify const Build = Java.use("android.os.Build") // reflection class for changing const const Field = Java.use('java.lang.reflect.Field') const Class = Java.use('java.lang.Class') const Boolean = Java.use("java.lang.Boolean") const True = Boolean.$new("True") const False = Boolean.$new("False") // Replacing Build static fields replaceFinaleField(Build, "FINGERPRINT", "abcd/C1505:4.1.1/11.3.A.2.13:user/release-keys") replaceFinaleField(Build, "MODEL", "C1505") replaceFinaleField(Build, "MANUFACTURER", "Sony") replaceFinaleField(Build, "BRAND", "Xperia") replaceFinaleField(Build, "BOARD", "7x27") replaceFinaleField(Build, "ID", "11.3.A.2.13") replaceFinaleField(Build, "SERIAL", "abcdef123") replaceFinaleField(Build, "TAGS", "release-keys") replaceFinaleField(Build, "USER", "administrator") })