API function hooks on Android, using Cydiahook to implement

Source: Internet
Author: User

API function hooks on Android, using Cydiahook to implement

It's been released for almost a year, and it's been discovered that some people need it, and some of them fork on GitHub.

Example code, posted on GitHub, address: Https://github.com/zencodex/cydia-android-hook

Cydiahook

With Cydia substrate SDK development, you can hook Java layer or native Layer API interface.

This code features

The original purpose of the code is because there is an app that needs to save the data to the SD card, and the app has the status of judging the SD mount. There is no SD card, there will be a problem with the program logic, a lot of features are not working properly, and my phone is not installed SD card.

In addition this hook way also helps debug program, do not need to modify ROM bottom, and cause cell phone brick, easy to use, at present Cydia substrate in some mobile phone may have unstable situation, I test the model is ZTE U969, still can't find related ROM.

    • Hook android.os.Environment.getExternalStorageState (), forced return, suspended in state.
    • Perform mount bind mount can read and write directories to the SD card path, each terminal plan vendor's mount point may be different, please modify the correct mount point path according to your own situation.
    • Depending on your needs, you can modify the Mount implementation function to hook any API in the framework. In Main.java, such as IMEI,GPS simulations and so on.
Preparatory work
    • Root of the mobile phone, no root, please search the method yourself.
    • Install the Android substrate SDK on Eclipse, refer to:

      http://www.cydiasubstrate.com/id/73e45fe5-4525-4de7-ac14-6016652cc1b8/
    • Mobile phone to Google Play download install Cydia substrate
    • Eclipse Imports this code and installs it to your phone after compilation.
    • Run substrate on your phone, click "Link substrate Files" on the interface, and then click "Restart System (Soft)"
    • View the mount path and status through Cydiahook.

Refer to the official introductory tutorial Violetexample:

http://www.cydiasubstrate.com/id/20cf4700-6379-4a14-9bc2-853fde8cc9d1/

Cydia-android-hook

Cydia substrate demo, Hook getexternalstoragestate, always return mounted status.

API function hooks on Android, using Cydiahook to implement

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.