kmo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    7
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: iPhone 透過 USB 傳輸線分享網路 description: iPhone 透過 USB 傳輸線分享網路經驗分享 tags: notes, iPhone, USB, cable, network, Windows, win10, win11, MS, Microsoft, PowerShell --- # iPhone 透過 USB 傳輸線分享網路 > 2014 年開始用 Android 手機,當需要手機分享網路給電腦,這 10 年來不曾有問題,USB 傳輸線插上就可使用。2024 年底,手機摔壞後換 iPhone 試試,沒想到用 USB 傳輸線分享網路給電腦,動用到我的工程師魂,才能完成... :innocent: > > 本文URL: https://hackmd.io/@kmo/iphone_hotspot_usb ::: info ### :clapper: 在開始之前 - 本文特色為不需要完整安裝 iTunes,也能用 iPhone 透過 USB 傳輸線分享網路 - 若完整安裝 iTunes 已經解決問題,且符合期待,也不一定要往下閱讀 :laughing: ::: ::: info ### :dart: 問題痛點 - 大部分網路資訊,推薦完整安裝 iTunes,「理論上」會自動裝好 driver - 但個人遇到,有幾次完整安裝 iTunes 後,仍然無法透過 USB 傳輸線分享網路 - 若僅需用到分享網路功能,是否有比安裝 iTunes 更輕量的替代方案可用? ::: ::: info ### :memo: 測試環境 - 電腦系統 : Windows 10 和 Windows 11 (皆為 64 位元) - 手機系統 : iPhone 16 Plus with iOS 18.2.1 - 解壓縮軟體 : 7-Zip 24.09 - 本文最後測試時間 : 2025 年 02 月 ::: [TOC] ## 操作步驟 - 本篇文章步驟不需完整安裝 iTunes,只整理必裝的檔案資訊 ### 安裝 AppleMobileDeviceSupport64.msi - 下載 iTunes : https://www.apple.com/itunes/download/win64 - 透過 7-zip 解壓縮 iTunes 檔案: - 對 `iTunes64Setup.exe` 點右鍵->7-zip-> `解壓縮至 "iTunes64Setup\"` - 僅需安裝 `AppleMobileDeviceSupport64.msi`: - 進去資料夾 `iTunes64Setup` -> 對 `AppleMobileDeviceSupport64.msi` 點左鍵兩下進行安裝 ### 安裝 usbaapl64.inf 和 netaapl64.inf - 透過 7-zip 解壓縮 `AppleMobileDeviceSupport64.msi` - 對 `AppleMobileDeviceSupport64.msi` 點右鍵->7-zip-> `解壓縮至 "AppleMobileDeviceSupport64\"` - 安裝 `usbaapl64.inf` - 進去資料夾 `AppleMobileDeviceSupport64` -> 尋找檔案 `usbaapl64.inf` -> 點右鍵按安裝 ![](https://i.imgur.com/VZHy8hV.png) - 安裝 `netaapl64.inf` - 進去資料夾 `AppleMobileDeviceSupport64` -> 尋找檔案 `netaapl64.inf` -> 點右鍵按安裝 ![](https://i.imgur.com/vTCptXh.png) ### 啟用 iPhone「個人熱點」 - 開啟「允許其他人加入」 ![](https://i.imgur.com/FDiSzep.jpeg =250x) - 手機透過 USB 傳輸線連結電腦,當手機出現「信任這部電腦?」詢問,按「信任」之後,應會自動分享網路給電腦。分享網路成功,手機上方也會出現相關圖示。 ![](https://i.imgur.com/0Y5uVQE.png =250x) ![](https://i.imgur.com/DMnatcy.png =340x) ## PowerShell 步驟 - 工程師習慣在 [CLI](https://en.wikipedia.org/wiki/Command-line_interface) 情境處理事情,這邊筆記一下自己用 PowerShell 處理上述步驟 - 想體會工程師平常在做什麼,可點擊「詳細資訊」展開來閱讀 :stuck_out_tongue_winking_eye: ::: spoiler - 用 Windows 內建 Powershell 指令,也可以完成上述步驟 - 應使用管理員權限開啟 Powershell,才能執行安裝 inf 檔動作 ### 安裝 AppleMobileDeviceSupport64.msi ```powershell= # 命名暫存資料夾 $temp_itune_dir = "$env:TEMP\temp_itunes" # 建立暫存資料夾,並進到暫存資料夾 cd (mkdir $temp_itune_dir) # 下載 iTunes64Setup.exe curl.exe -L -o iTunes64Setup.exe https://www.apple.com/itunes/download/win64 # 解壓縮 iTunes64Setup.exe .\iTunes64Setup.exe /extract # 安裝 AppleMobileDeviceSupport64.msi msiexec /i AppleMobileDeviceSupport64.msi /qb ``` ### 安裝 usbaapl64.inf 和 netaapl64.inf ```powershell= # 一樣進到暫存資料夾,如延續上步驟不一定需要執行 # cd $temp_itune_dir # 解壓縮 AppleMobileDeviceSupport64.msi msiexec /a AppleMobileDeviceSupport64.msi /qb TARGETDIR="$temp_itune_dir\AppleMobileDeviceSupport64" # 取得 usbaapl64.inf 絕對路徑 $usbaapl64_path = (Get-ChildItem -Path . -Filter usbaapl64.inf -Recurse).FullName # 取得 netaapl64.inf 絕對路徑 $netaapl64_path = (Get-ChildItem -Path . -Filter netaapl64.inf -Recurse).FullName # 安裝 usbaapl64.inf pnputil /add-driver "$usbaapl64_path" /install # 安裝 netaapl64.inf pnputil /add-driver "$netaapl64_path" /install ``` - 確認已安裝成功 usbaapl64.inf 和 netaapl64.inf ```powershell= pnputil /enum-drivers | Select-String apple -context 2,5 ``` - 上述指令輸出範例 ```powersehll= PS C:\Users\kmo\AppData\Local\Temp\temp_itunes> pnputil /enum-drivers | Select-String apple -context 2,5 發佈名稱: oem54.inf 原始名稱: usbaapl64.inf > 提供者名稱: Apple, Inc. 類別名稱: 通用序列匯流排控制器 類別 GUID: {36fc9e60-c465-11cf-8056-444553540000} 驅動程式版本: 05/19/2017 6.0.9999.69 簽署人名稱: Microsoft Windows Hardware Compatibility Publisher 發佈名稱: oem67.inf 原始名稱: netaapl64.inf > 提供者名稱: Apple 類別名稱: 網路介面卡 類別 GUID: {4d36e972-e325-11ce-bfc1-08002be10318} 驅動程式版本: 07/15/2013 1.8.5.1 簽署人名稱: Microsoft Windows Hardware Compatibility Publisher ``` - 補充說明: 若需要移除 usbaapl64.inf 和 netaapl64.inf,可透過下述指令 - oem 編號每台電腦會有差異,請依照指令輸出的 oem 編號調整,以上述輸出編號為例 ```powershell= pnputil /delete-driver oem54.inf /uninstall pnputil /delete-driver oem67.inf /uninstall ``` ::: ## Microsoft Update Catalog - `Microsoft Update Catalog` (底下URL),也有提供 driver - https://www.catalog.update.microsoft.com/Search.aspx?q=Apple (此 URL 搜尋結果有好幾頁,可能要翻頁,才能找到想要的檔案) - 電腦在`有網路情況下`,插上 iPhone 設備, Windows 有時會試著從 update 系統自動安裝 USB driver (`AppleUsb.inf`,可透過 [PowerShell 步驟](#PowerShell-步驟) 提到 pnputil 來查詢),此時只需再安裝 Net driver (`netaapl64.inf`) 即可 - Net driver (`netaapl64.inf`) 也可從 Microsoft Update Catalog 安裝,名稱叫 `Apple - Net - 7/15/2013 12:00:00 AM - 1.8.5.1 ` ### Microsoft Update Catalog 下載連結 - 這邊整理 `Microsoft Update Catalog` 上,適用 64 位元的驅動程式。建議熟悉 `Microsoft Update Catalog` 朋友再採用此方法 ::: spoiler - `Apple, Inc. - USBDevice - 538.0.0.0`: - 檔案說明頁面: www.catalog.update.microsoft.com/ScopedViewInline.aspx?updateid=0bc332b5-0655-4d9f-94a2-c338e31ea4b7 - 檔案下載: https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2023/10/5fb262ea-d52d-46a7-9361-f3260ba57a1a_3e8075a4dded0a795131f82285e2f1a06525ebc2.cab - `Apple - Net - 7/15/2013 12:00:00 AM - 1.8.5.1`: - 檔案說明頁面: www.catalog.update.microsoft.com/ScopedViewInline.aspx?updateid=7e490e54-173e-4c61-99af-cd176d2254d0 - 檔案下載: https://catalog.s.download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/11/netaapl_7503681835e08ce761c52858949731761e1fa5a1.cab ::: ## 表格整理 - iPhone 透過 USB 傳輸線分享網路給電腦,應安裝的檔案 | 檔案名稱 | 檔案來源 | | -------------------------------- | ------------------------------------------------------------ | | `AppleMobileDeviceSupport64.msi` | `iTunes64Setup.exe` | | `netaapl64.inf` | `AppleMobileDeviceSupport64.msi` or <br> Microsoft Update Catalog | - 下表 USB driver 安裝其中之一即可,兩者同時存在也不影響 | 檔案名稱 | 檔案來源 | | --------------- | -------------------------------- | | `AppleUsb.inf` | Microsoft Update Catalog | | `usbaapl64.inf` | `AppleMobileDeviceSupport64.msi` | - 補充檔案的說明: - `AppleMobileDeviceSupport64.msi`: Apple Mobile Device Support Installer - `netaapl64.inf`: Apple Mobile Device Ethernet driver - `AppleUsb.inf`: Apple Mobile Device driver - `usbaapl64.inf`: Apple USB driver ## 問題解析 ### 為何完整安裝 iTunes,有時可以,有時失敗? - 感謝 [PTT 網友 lynch 文章](https://www.ptt.cc/bbs/iOS/M.1703660238.A.826.html),提到 `AppleMobileDeviceSupport64.msi` 裡面,設定安裝 driver 需要達成某些條件(Condition),猜測因此原因造成有時沒裝到 driver - 透過工具 [lessmsi](https://github.com/activescott/lessmsi),確認`AppleMobileDeviceSupport64.msi`有此參數 ![](https://i.imgur.com/oVtnMCd.png) ## 後記 - 特別感謝工作認識的夥伴李宇正,在我急需要用 iPhone 分享網路時候,指導我安裝 iTunes,完成用 USB 傳輸線分享網路給電腦 - 完整安裝 iTunes 大部分情況能成功,卻有幾次失敗。當下趕時間急需要網路,只剩下 iPhone 能分享網路,卻苦惱找不到解決方法,因此事後花時間深入了解,並催生這篇文章出來,筆記給之後也有需要的人參考。在撰寫本文章過程,也意外練習了 Powershell 指令,感覺有玩出興趣 (感謝 iPhone :apple: XD) ## 參考資料 - Apple 官網說明及討論 - https://support.apple.com/zh-tw/guide/iphone/iph45447ca6/ios - https://support.apple.com/guide/iphone/share-internet-connection-personal-hotspot-iph45447ca6/18.0/ios/18.0 - https://discussions.apple.com/thread/255073651 - github 網友分享 - https://github.com/NelloKudo/Apple-Mobile-Drivers-Installer - https://github.com/Jiangxiaogang/iphone_usb_driver - Powershell 用到一些技巧 - https://silentinstallhq.com/apple-itunes-install-and-uninstall-powershell - https://github.com/PowerShell/PowerShell/issues/17949 - https://www.advancedinstaller.com/extract-msi-msix-exe-installer-content.html - PTT 網友 lynch 提到 `AppleMobileDeviceSupport64.msi` 的 Condition - https://www.ptt.cc/bbs/iOS/M.1703660238.A.826.html --- {%hackmd @kmo/widget_license %}

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully