1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial USBTethering +VPNSharing +Permanent_USBMACaddress [Advance Users]

Discussion in 'Android Internet Tricks' started by nivra-naitsirhc, Apr 28, 2016.

  1. Warning this method has a high risk of breaking your phone! (endless boot loop).

    Dagdag kalaman, share ko lang sa inyo mga boss itong trick na lalaman ko para ma share ninyo ang inyong VPN Connection sa PC [any OS basta RNDIS capable]. at Permanent MACaddress sa mga android devices na pabago-bago ng MACaddress pag kumuconnecta sa PC. e.g. KitKat 4.4.2

    for those who are unsure, Please refrain from this method! Para naman sa gustong mag try, wag kayong ma discourage, basta sundin nyo lang ang mga guide ko, sagot ko kayo.
    At sa mga bihasa na, enjoy nalang guys. (y)


    • USER
      • knowledgeable in Linux Environment.
      • know's how to use adb shell or any terminal emulator.
      • you must know the system structure of your device.
      • Notepad++ (when using windows)
    • Android Device
      • MUST BE ROOTED, Preferably using Chainfire SuperSU. For those Devices ROOTED with KingRoot, I don't advice you to proceed.
      • BUSY BOX (i recommend BusyBox by stericson)
      • ROOT FILE EXPLORER (i recommend. ES FILE Manager)
      • Preferably has a working init.d. (kung wala no problem)
    • Files
      • Please or Register to view links (Extract all files in a folder)
      • FILE SHA 256: 810aaa64bbaab4559b41a08aea5668e7e6d484dfea444fa4e244367346326373
    • Preparation
      • If your using a PC (windows)
        • You must have a working ADB SHELL
        • Extract downloaded zip file to desktop.
        • Put all files to your sdcard under the name of scripts or in your PC
          • HOLD SHIFT + RIGHT CLICK anywhere inside the folder where you extracted the files (make sure your did not select any files during this procedure.)
          • click Open command window here.
          • type in cmd.
            • adb push "60USBTetherMACaddr" "/sdcard/scripts/"
            • adb push "10vpnshre" "/sdcard/scripts/"
            • (pag hindi gumana palitan nyo lang yung /sdcard/ ng correct path patungo sa sdcard location ng Device nyo) pag ayaw parin
      • if you're using your android device.
        • extract the downloaded zip file to the root directory of your sdcard. (e.g. /sdcard/ )
      • if you are using Chainfire SuperSU
        • please go to settings and 'uncheck' "Mount namespace separation"
        • then reboot
    • Procedure
      • Init.d Enabling (for those with working init.d skip these steps) (init.d is feature that enables us to execute custom scripts during boot up.)
        • If your using a PC (windows)
          • open CMD
          • type: adb shell
          • type: su
        • make a backup of your install-recovery.sh & install-recovery-2.sh and do not reboot your device until you are certain that init.d is working or your system files are restored back to normal or it will cause a boot loop. *IMPORTANT!
        • type: cp /system/etc/install-recovery.sh *sdcard directory location*
        • type: cp /system/etc/install-recovery-2.sh *sdcard directory location* (typically this file does not exist)
        • (then excecute one of the scripts "term-init")
        • type: sh *directory location of the scripts*/term-init
        • e.g. : sh /sdcard/scripts/term-init
        • just follow the on screen instructions. pag ok na lahat then your good to go.(y)
        • if an error occurred then this is due to mounting problems typical if you are using kingroot.
        • Typical way of init.d installation Fixing Errors
          • type: mount -o remount,rw -t auto /system
          • type: rm -f /system/bin/sysinit
          • type: chattr -iaA /system/etc/install-recovery.sh
          • type: chattr -iaA /system/etc/install-recovery-2.sh (optional if it exist)
          • type: rm -f /system/etc/install-recovery.sh
          • type: rm -f /system/etc/install-recovery-2.sh (optional if it exist)
          • type: sh *directory location of the scripts*/term-init
          • (pag ayaw talaga gumana, hindi talaga sya para sayo let it go nalang at e restore mo ang iyong sarili)
          • Restoring install-recovery.sh if you cannot enable init.d. Skip these step if you succesfully enabled init.d
            • type: mount -o remount,rw -t auto /system
              • type: rm -f /system/bin/sysinit
              • type: chattr -iaA /system/etc/install-recovery.sh
              • type: chattr -iaA /system/etc/install-recovery-2.sh (optional if it exist)
              • type: rm -f /system/etc/install-recovery.sh
              • type: rm -f /system/etc/install-recovery-2.sh (optional if it exist)
              • type: dd if=*location of your backup*/install-recovery.sh of=/system/etc/install-recovery.sh
              • type: dd if=*location of your backup*/install-recovery-2.sh of=/system/etc/install-recovery-2.sh (optional if it exist)
              • type: chmod 755 /system/etc/install-recovery.sh
              • type: chown 0.0 /system/etc/install-recovery.sh
              • type: chmod 755 /system/etc/install-recovery-2.sh (optional if it exist)
              • type: chown 0.0 /system/etc/install-recovery-2.sh (optional if it exist)
              • Done.
        • If you are 100% sure that init.d is enabled properly and no errors were found during execution of the term-init script. Then reboot the device. And try to look for a file named Test.log in /data/ folder. pag andyan SUCCESS pwedi na tayong mag proceed.
      • Enabling VPN's Connection Sharing
        • Now that you have a working init.d on your device. lets do the magic.
        • Put 10vpnshare from the scripts folder to /etc/init.d/ or /system/etc/init.d/
        • type: dd if=*location of 10vpnshare*/10vpnshare of=/system/etc/init.d/10vpnshare
        • type: chmod 777 /system/etc/init.d/10vpnshare
        • type: chown 0.0 /system/etc/init.d/10vpnshare
        • Done!
      • Enable Permanent MACaddress on USBTethering
        • On some Android device/OS there is a [security feature?] wherein a random MACaddress is used if you enable USBTethering. For me this is just annoying. It's because on modern PC OS like windows 8+ or Higher. Windows creates a new network for every new Interface it is connected with which makes sense actually for windows, but not for Android. Its because every time you tether to your PC it creates a new network number until such time you end up with Network 100+. And there is another reason why we should force Android to stick with on Permanent MACAddress which will make sense in the last step.
        • If you like you can specify your own personal choice of MACAddress if its to much to do on your part you can skip this step.
          • open the script 60USBTetherMACaddr with an editor that preserves it encoding. (like notepad++ on windows or ES FILE Editor on your android)
          • find the line with macaddr=00:00:ca:cc:10:01, Change the part 00:00:ca:cc:10:01 with any hexadecimal character/number.
          • then save.
        • copy the file to the init.d folder
        • type: mount -o remount,rw -t auto /system
        • type: dd if=*location of 60USBTetherMACaddr*/60USBTetherMACaddr of=/system/etc/init.d/60USBTetherMACaddr
        • type: chmod 777 /system/etc/init.d/60USBTetherMACaddr
        • type: chown 0.0 /system/etc/init.d/60USBTetherMACaddr
        • done!
      • Final Check.
        • reboot your device
        • then using file explorer find the log files if they exist in /data/ directory.
          • Test.log
          • 10vpnshare.log
          • 60USBTetherMACaddr.log
        • if everything exist then its a success!!!!!!
      • PC side. Setting up DNS.
        • Even though we have setup to share VPN connection through USBTethering. DNS are still not push through USBTether connection.
        • a fix for this is manually setting up the IPV4 INTERFACE DNS Setting on our PC. (this is also why it would be annoying if our Network interface would keep changing because of random MACAddress).
        • goto CONTROL PANEL -> NETWORK and INTERNET -> NETWORK and SHARING CENTER click on the interface currently connected with our network.
        • e.g. Ethernet 3
        • click properties
        • select Internet Protocol Version 4 (TCP/IP) Settings
        • and input the following google DNS addresses or your preferred DNS addresses
      • Reboot your device then try to thethering.

    Ayan po mga boss sana makatulong sa inyo.
    Tanong lang po kayo kung may hindi maintindihan.
    Goodluck sa mag try-try.

    Hindi ko pa po nasubukan ang WIFI-HOTSPOT Sharing Pero sa pahengi nalang po ng feedback..
    Maraming Salamat Po.

    Ryuinferno @ XDA - term-init
    C.A.- 10vpnshare
    C.A. - 60USBTetherMACaddr

Share This Page