Skip to content

Modifications

github-actions[bot] edited this page Jan 17, 2026 · 10 revisions

Root Access Setup

Prerequisites

Download these required files:

Installing SuperSU

  1. Push SuperSU zip to device:
adb push SR5-SuperSU-v2.82-SR5-20171001224502.zip /sdcard
  1. Boot into TWRP recovery:
adb reboot bootloader
fastboot boot twrp-3.1.1-0-seed.img

Note

Wait for ADB to detect the device again. This may take a few moments.

  1. Install SuperSU through TWRP:
adb shell
twrp install /sdcard/SR5-SuperSU-v2.82-SR5-20171001224502.zip
reboot

BusyBox Installation

The default BusyBox installation lacks several commands (like vi). Here's how to install a complete version:

Steps

  1. Download BusyBox APK

  2. Install the APK:

adb install busybox.apk
  1. Launch BusyBox:
    • Follow the View Display Guide
    • Open BusyBox application
    • Tap "Install"
    • Grant root permissions when prompted

Verification

To verify installation:

adb shell
busybox --help

APK Modifications

Locating the APK

First, identify and pull the correct APK:

# MifiService.apk is typically located at:
adb pull /system/priv-app/MifiService.apk

Setting Up Test Keys

# Clone Android platform build tools
git clone https://android.googlesource.com/platform/build

# Navigate to security folder
cd build/target/product/security/

# Generate platform key files
openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.pem
openssl pkcs12 -export -in platform.x509.pem -inkey platform.pem -out platform.p12 -password pass:android -name testkey
keytool -importkeystore -deststorepass android -destkeystore platform.keystore -srckeystore platform.p12 -srcstoretype PKCS12 -srcstorepass android

# Move keystore to working directory
mv platform.keystore {YOUR_WORK_DIR}

Modifying the APK

  1. Decompile:
java -jar apktool.jar d MifiService.apk -o MifiService
  1. Make modifications in the assets folder or any part of the APK that you need to modify

  2. Recompile (use android as passphrase when prompted):

java -jar apktool.jar b -o unsigned.apk MifiService
  1. Sign and align:
zipalign -v 4 unsigned.apk aligned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./platform.keystore aligned.apk testkey
  1. Install modified APK:
adb install -r aligned.apk

Changing Default IP by tarokeitaro

Note

Use VS Code's global search and replace feature (Ctrl+Shift+H) to find and replace all instances efficiently.

  1. Replace IP addresses in the decompiled APK:

    • Search for all instances of 192.168.100. in the MifiService folder
    • Replace with your desired IP range (e.g., 192.168.1. or 192.168.0.)
  2. Recompile the APK:

java -jar apktool.jar b -o unsigned.apk MifiService
  1. Sign and align the APK (PASS: android):
zipalign -v 4 unsigned.apk aligned.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./platform.keystore aligned.apk testkey
  1. Install the modified APK:
adb install -r aligned.apk
  1. Mount /system partition as read-write:
mount -o rw,remount,rw /system
  1. Edit the initialization script:
busybox vi /system/bin/initmifiservice.sh

Find line 22: ifconfig br0 192.168.100.1 up and change the IP to match your chosen range.

  1. Pull the Android services framework:
adb pull /system/framework/services.jar
  1. Decompile the services framework:
java -jar apktool.jar d -o services services.jar
  1. Update IP addresses in services framework:

    • Search for all instances of 192.168.100. in the services folder
    • Replace with your chosen IP range to maintain consistency
  2. Recompile the services framework:

java -jar apktool.jar b -c -f -o services.jar services
  1. Push the modified services framework back to device:
adb push services.jar /system/framework/
  1. Remount /system as read-only:
mount -o ro,remount,ro /system
  1. Reboot device for changes to take effect:
adb reboot

Warning

Ensure all three components (APK, script, and services.jar) use the same IP range, or the device may not function correctly.

Clone this wiki locally