Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 3 of 3
Like Tree3Likes
  • 3 Post By Jerry Hildenbrand
  1. Thread Author  Thread Author    #1  

    Default How-To mount the Nexus system.img in Linux and suck stuff out of it

    With an OTA on the horizon, I know a lot of people are gonna be looking for stock files for their Nexus. It always happens, so I figured instead of feeding you I would teach you how to fish

    You'll need Linux. You can install it, run a live CD, or use Wubi and install as a Windows app -- any way will work.
    You'll need the factory system.img for your device. You can find it inside the factory image tar file provided by Google.
    You'll need the file attached to this post.

    1. Create a folder in your home directory named restore
    Code:
    $ cd ~
    $ mkdir restore
    2. Place the binary that's inside the attached zip file in the restore folder
    Code:
    $ cp path/to/the/file/simg2img ~/restore/simg2img
    3. Make sure the binary file is executable
    Code:
    $ chmod +x ~/restore/simg2img
    4. Place the system.img file from the factory images in the restore folder
    Code:
    $ cp path/to/the/file/system.img ~/restore/system.img
    5. Make a folder called GNEX
    Code:
    $ cd ~
    $ mkdir GNEX
    5. Change to the restore folder, and prepare the system.img for mounting
    Code:
    $ cd ~/restore
    $ ./simg2img system.img gnex.raw
    6. Mount the system image as a folder
    Code:
    $ sudo mount -t ext4 -o loop gnex.raw ~/GNEX/
    7. Open the GNEX folder with your file manager, get anything you want from it.
    8. When you're finished, unmount the image
    Code:
    $ sudo umount ~/GNEX/
    9. Profit$$

    Note that this only works with ext4 images, and has only been tested on images from Google for the Galaxy Nexus, Nexus S, and Nexus 7.
    Thanks zhengkarl for the source for the simg2img binary
    Attached Files Attached Files
    Last edited by Jerry Hildenbrand; 11-10-2012 at 04:47 PM.
    ಠ_ಠ
    제리
    Thanked by 6:
    Ziptied, VK7HSE and comadr3am like this.
  2. #2  
    VK7HSE's Avatar

    Posts
    11 Posts
    ROM
    Yakju

    Default Re: How-To mount the Nexus system.img in Linux and suck stuff out of it

    Hey Jerry, you should have just done this from the beginning :rolleyes:

    Sent from my Galaxy Nexus using Tapatalk 2
  3. #3  
    Chex313's Avatar

    Posts
    519 Posts
    Global Posts
    528 Global Posts
    ROM
    4.4 KitKat

    Default Re: How-To mount the Nexus system.img in Linux and suck stuff out of it

    I just want to check, as long as the image you make is ext4 its OK. It doesn't matter if the OS is ext3? Ext4 is backwards compatible. Or it doesn't matter at all how the OS is formatted...I have it ext3 to avoid an unrelated problem.
    N5 Black 32GB 4.4.4(I love this thing!!), N4 (4.4.4), iphone 5, etc., N7(4.4.4) AT&T The Nexus 5 is so fast...I just finished the internet...The ending wasn't great...

Similar Threads

  1. HOW-TO root the Nexus Q
    By Jerry Hildenbrand in forum Google Nexus Q
    Replies: 2
    Last Post: 02-25-2013, 07:56 AM
  2. How to Reboot the Nexus?
    By diesteldorf in forum Verizon Galaxy Nexus
    Replies: 5
    Last Post: 12-21-2011, 03:57 PM
  3. [How-To] compile the Nexus S kernel from source
    By Jerry Hildenbrand in forum T-Mobile Nexus S Rooting, ROMs, and Hacks
    Replies: 46
    Last Post: 11-20-2011, 01:28 PM
  4. How to not display every gmail contact in the Nexus contacts
    By jean15paul in forum Sprint Nexus S 4G
    Replies: 2
    Last Post: 07-18-2011, 05:23 PM
  5. How to get the call log details in android?
    By aptgopal in forum Android Applications
    Replies: 0
    Last Post: 01-28-2011, 03:14 PM

Posting Permissions