Skip to content

Instantly share code, notes, and snippets.

@rmkn
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmkn/b4ce3769a3749a5ea39e to your computer and use it in GitHub Desktop.
Save rmkn/b4ce3769a3749a5ea39e to your computer and use it in GitHub Desktop.
「一部の国内 SIM で APN 設定ができない問題を修正するパッチを適用するスクリプト」のWindows版
@echo off
set BASEDIR=%~dp0
set PATCHDIR=%BASEDIR%
set TEMPDIR=%BASEDIR%temp
rem # temporary directory
rem rmdir /Q /S %TEMPDIR%
mkdir %TEMPDIR%
pushd %TEMPDIR%
rem # pull, extract and edit apn.json file
adb pull /system/b2g/webapps/settings.gaiamobile.org/application.zip
7za.exe x application.zip shared/resources/apn.json
echo "Please edit shared/resources/apn.json"
pause
rem patch shared/resources/apn.json $PATCHDIR/apn.json.diff
7za.exe u application.zip shared/resources/apn.json
rem # Remount file systems and push to the device
adb shell mount -o remount rw /system
adb push application.zip /system/b2g/webapps/settings.gaiamobile.org/application.zip
rem # Reboot
echo "Please restart Setting apps (or reboot the device) and set up apn for your SIM!"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment