Hook realizes Android wechat, unfamiliar street and location simulation (with source code download)
Hook realizes Android wechat, unfamiliar street and location simulation
Recently, we need to simulate the location of wechat, Momo and other programs, so as to realize the function of sending a circle of friends around the world and searching for people nearby, and love online search based on the principle of standing on the shoulders of giants.
Some codes and articles have also been found, but most of the codes are the same and have one disadvantage. For example, after wechat implements hook for the objective function, the first positioning of wechat can be changed for the first time
But if I want to change the address, I need to restart the phone and reload the hook. I've tried it many times, but it can't meet the demand.
In order to improve this place, we look at the source code flow defined by GPS to find a breakthrough in hook system functions
I didn't find the hook until I read it. The locationmangerservice class
Then we can hook the location parameter and change it to the place we want to locate to achieve the effect,
If I want to actively call this function, I must obtain the object of locationmangerservice, which can be obtained through the constructor of hook locationmanager,
Of course, we also need hook and other auxiliary functions. These functions can see the Java code in Android studio, so we don't need to explain the source code too much
Source download
Thank you for reading, hope to help you, thank you for your support to this site!