[Q] How Can I open/edit Stock System.img

This is a discussion on [Q] How Can I open/edit Stock System.img within the Droid Hacks forums, part of the Droid Hacking category; I am Looking to open and explore the Stock system.img file of the Bionic to compare both 5.5.886 and the 5.5.893 as I want to ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: [Q] How Can I open/edit Stock System.img

  1. APK Multi-Tools
    Raziel23x's Avatar
    Member #
    92115
    Join Date
    Jul 2010
    Location
    Novi Michigan
    Posts
    308
    Liked
    2 times
    Twitter
    raziel23x
    Phone
    DROID BIONIC
    DroidForums.net Developer
    Premium Member
    #1

    [Q] How Can I open/edit Stock System.img

    I am Looking to open and explore the Stock system.img file of the Bionic to compare both 5.5.886 and the 5.5.893 as I want to make some edits and runs some test for my multi-root application that I am working on

    tried to extract it with unyaffs.exe and gotten this error

    Code:
    C:\ISO\android>unyaffs.exe system.img
         8 [main] unyaffs 7224 _cygtls::handle_exceptions: Exception:
    STATUS_ACCESS_VIOLATION
      1025 [main] unyaffs 7224 open_stackdumpfile: Dumping stack trace to
    unyaffs.exe.stackdump
     966072 [main] unyaffs 7224 _cygtls::handle_exceptions: Exception:
    STATUS_ACCESS_VIOLATION
     988583 [main] unyaffs 7224 _cygtls::handle_exceptions: Error while
    dumping state (probably corrupted stack)
    and here is what the unyaffs.exe.stackdump printed out

    Code:
    Exception: STATUS_ACCESS_VIOLATION at eip=004010B0
    eax=4708BC02 ebx=00000034 ecx=00002800 edx=00D216BA esi=00D11695 edi=00000000
    ebp=0028CCB8 esp=0028CC80 program=C:\ISO\android\unyaffs.exe, pid 8860, thread main
    cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
    Stack trace:
    Frame     Function  Args
    0028CCB8  004010B0  (0028CD2B, 00000000, 6120E728, 00401333)
    0028CCE8  004013AF  (00000002, 00CF8368, 00CF8258, 00008000)
    0028CD68  61007038  (00000000, 0028CDA4, 61006980, 7EFDE000)
    End of stack trace


    Not sure what is going on I should try this on another system.img and
    see if it is actually this

    If you like my work and want to make a donation I would appreciate any generosity.
    CLICK HERE TO DONATE TO RAZIEL23X PLZ AND TY!!!
    If you want to help with increasing my dropbox size Click here to signup for dropbox
  2. Sponsor
    DF Advertising
    Join Date
    Nov 2008
    Location
    DroidForums.net
     
     
     
     
  3. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Posts
    564
    Liked
    2 times
    Phone
    Droid 2
    #2
    I had to install cygwin on my computer to test this and then place the files
    unyaffs.exe & system.img (one I made on my emulator) into the C:\cygwin\bin folder where the cygwin1.dll is located and here is the result I got.




    unyaffs.exe system.img
    end of image
    C:\cygwin\bin>

    Only problem is if it did anything like extract the files, I have no idea where to look for it.

    I looked in the app folder in cygwin and there are a bunch of apk's there. So I deleted them and ran the command again and they were back. I am guessing all this
    unyaffs.exe does is just pull the apk's out of the .img file. That is the same thing as pulling /system with adb.
    Now, I wrote a batch file to create an system.img that has permanent root and install the Gmail, Google Services, and Market on the AVD. I had the hardest time making the mkfs.yaffs.arm work, but finally pushed to /system/xbin on the emulator and then I called it to make a system.img file that I pasted into the AVD so that the AVD will always boot up with the market and be rooted.

    I posted over on xda. Here is the what I posted.



    Create you AVD the normal way, I usually make my SD card be 512 Meg, leave the skin at default, make my RAM size 512 and in the Hardware section click "New" and choose SDCard support. Then Create.




    Download the zip folder containing the files required:
    http://dl.dropbox.com/u/35546129/Emulator Files.zip


    Unzip the folder and place on your desktop for easy access.


    There is a file, rootavd.bat, that you can run which will do all the command input for you. You must pay close attention because there are things you must do along the way. I stop the execution with pauses and give instructions that must be done by you before you hit a key and proceed.


    If you want to enter the instructions on your own, the content of the .bat file are listed here with instructions. Read the instructions and complete them whichever method you choose.




    1. emulator -avd RootedMarket -partition-size 200


    Change the RootedMarket to the name of your avd.


    If you run the bat file you must right click the rootavd.bat and click edit. The file opens and you change the name of the avd then save it: File > Save.


    pause


    This tells the .bat file to stop and wait until you are ready to proceed with the installation. You do not have to type it in if you are doing manual installation. The point is to wait until your avd is fully loaded before we proceed.


    2. adb remount


    3. adb pull /system/build.prop


    pause


    Minimize the avd and the command window and open the folder Emulator Files. Find build.prop file, right click and choose edit. Toward the bottom of the file you will see the line: ro.config.nocheckin=yes
    Highlight it and erase it then save the file.


    Bring up the command window and hit a key. (If you are running the bat file)


    4. adb remount


    5. adb push build.prop /system/build.prop


    6. adb shell rm /system/app/SdkSetup.apk


    7. adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system


    8. adb install com.android.apkinstaller-1.apk


    9. adb shell chmod 777 /system/app


    10 adb push GoogleServicesFramework.apk /sdcard/.


    11 adb push com.android.vending-3.1.3.apk /sdcard/.


    12. adb push gmail.apk /sdcard/.


    13 adb push vending.apk /system/app/.


    14. adb push su /system/xbin/su


    15. adb push busybox /system/xbin/busybox


    16. adb push installbusybox.sh /system/xbin/installbusybox.sh


    17. adb shell chmod 06755 /system/*


    18. adb shell chmod 06755 /system/xbin/*


    19. adb install superuser.apk


    20. adb shell installbusybox.sh


    21. adb push mkfs.yaffs2.arm /system/xbin/mkfs.yaffs2.arm


    22. adb shell chmod 777 /system/xbin/mkfs.yaffs2.arm


    23. adb shell /system/xbin/mkfs.yaffs2.arm /system /data/system.img
    Here is where we build a copy of the new rooted system file.


    24. adb pull /data/system.img
    Now we are pulling the system.img file (a large file) to the folder Emeuator Files. It will take about 25 to 30 minuets. Be patient and wait for the message that says how many bites in how many seconds were transferred.


    Close the command window and the avd.


    Open File Emulator folder and copy system.img (should be about 95 Meg)


    Navigate to C: Users > (your name) > .android > AVD > (the name of the avd) and paste the system image into this folder.


    Navigate to your sdk avd manager and start the avd the normal way.


    Here is where my method varies from all others. I pushed all the files that gave me problems to the sd card. I found that pushing vendor.apk, GoogleServicesFramework.apk, and Gmail.apk to /system/app would not work.


    I sent them to the sd card and installed the apk installer app.


    In your app drawer Open APK Installer and choose the GoogleServicesFramework.apk and choose Install. Then do the same with Gmail.apk, and com.android.vending-3.1.3.apk.


    Back up by hitting the "esc" key on your keyboard untill you are in the app drawer. Click on the Market or Gmail app which will take you to the sigh in screen. Log into Google and complete the procedure.


    Then you should be able to go to the Market.


    To test if you are rooted, go to Dev Tools and scrool to Emulator at the bottom. Open the emulator and you should be asked to grant superuser rights. Choose yes and then type su into the emulator. You should be rewarded with a "#" prompt.


    I wanted to install Root Explorer in this set up; however, it is a paid app that you should purchase on your own and install.


    That is it. Everytime you load this avd it will be rooted and you will have access to the Market. The Market is limited, not like on a real phone because the AVD does not associate with a particular phone which causes the filters at the market from presenting you with all apps available.yaffs2 /dev/block/mtdblock03 /system.

    I hope this helps you, I am just a tinker not a real programmer.
    Last edited by chrstdvd; 02-06-2012 at 01:56 PM. Reason: fix my copy paste and clarify
  4. Junior Droid
    xbill's Avatar
    Member #
    77457
    Join Date
    Jun 2010
    Posts
    10
    Phone
    Motorola Droid
    #3
    @chrstdvd,
    Thanks for your guide - it has been very helpful.

    After many attempts with other methods to pull the system.img from the emulator, I followed your steps. The emulator was rooted, but trying to install the GoogleServicesFramework.apk from the sdcard threw an error. Something along the lines of: "Package could not be parsed" I pushed the GoogleServicesFramework.apk to the sdcard again, but the same error resulted. The com.android.vending-3.1.3.apk and gmail.apk seemed to install, but when I attempt to run them they force close. I deleted the avd I was working with and created a new one, but the same results. Do I need to use a particular target platform: 2.3.1, 2.3.3, etc ? What's the difference between the Vending.apk and the com.android.vending-3.1.3.apk?

    Any help would be appreciated.
    Last edited by xbill; 04-04-2012 at 10:44 AM.
  5. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Posts
    564
    Liked
    2 times
    Phone
    Droid 2
    #4
    Only thing that comes to mind is that when you built your AVD, in the Hardware section did you click New, and scroll down and highlight SD Card support? If not that may be where the problem is coming from.

    Here is a screen shot of My rooted AVD's in the manager.
    [Q] How Can I open/edit Stock System.img-avdm.png

    I chose one in the Edit window for you to compare.
    [Q] How Can I open/edit Stock System.img-avd.png

    If that does not do it for you, then you can try to push the GoogleServicesFramework.apk directly to /system/app instead of the SD Card.

    Let me know, if that fixes the bug for you by placing SD Card support into Hardware section of AVD.

    You can look at this file or set of files which will pull /system from phone to the folder on computer, but not all files and folders. I got tired of messing with it, but it is good enough to save copies of all your /system/app apk's.

    http://dl.dropbox.com/u/35546129/Pull system.zip

    I can upload one of my working AVD's to Dropbox if you want one to play with.

    By the way ICS or 4.0's emulator is to small to do much with, there is not enough system memory to add many apps, so I can not get market or gmail or any other cool stuff to install in it.
    Last edited by chrstdvd; 04-04-2012 at 11:15 AM.
  6. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Posts
    564
    Liked
    2 times
    Phone
    Droid 2
    #5
    Oh, The market and Gmail will force close until the GoogleServicesFramework is installed on the emulator, that is why I said that if you can not get it to install from the SD card just push it to /system/app. I have no idea what the difference between Vending.apk and the 3.1.3 are except 3.1 is newer and you get a few more application choices form the Market when it is installed on Emulator.
    .
  7. Junior Droid
    xbill's Avatar
    Member #
    77457
    Join Date
    Jun 2010
    Posts
    10
    Phone
    Motorola Droid
    #6
    I went ahead and started over. I deleted the original avd and built a new one. Yes, as before, with sdcard support. I made a bigger sdcard (512MB), too.

    This time, I targeted 2.3.3 and I've gotten a bit farther. Although, now my problem is my Google account. I get "Can't establish a reliable data connection to the server." My host system is Windows XP Pro SP3. Firewall is disabled.
    I checked the Date & Time thinking maybe the difference in the time would make the Google server balk. Time is now correct, but it made no difference.
    I can browse with the browser. But, I can't access a Google account and can't run Market with out one.
  8. Junior Droid
    xbill's Avatar
    Member #
    77457
    Join Date
    Jun 2010
    Posts
    10
    Phone
    Motorola Droid
    #7
    Got it working. I shutdown the rooted emulator. cleared the cache. changed my host laptop from wireless to wired network. restarted the rooted emulator. reinstalled the apks. Market updated to Google Play. seems to be working. Some apps unavailable to emulator. Maybe there's a hack for that too?
  9. Junior Droid
    xbill's Avatar
    Member #
    77457
    Join Date
    Jun 2010
    Posts
    10
    Phone
    Motorola Droid
    #8
    Is there a way to mod the system.img prior to rebuild and pulling to remove the Japanese IME and make the standard Android keyboard the default?
  10. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Posts
    564
    Liked
    2 times
    Phone
    Droid 2
    #9
    Glad to hear you got it working. I had the same problem with my Google account many times. I thought it was because I use Hughes Net as my ISP, you know, if a cloud is in the way, you can not connect. I literally thought that because the first day was stormy, the next day I loaded the thing, the weather was fine, and it worked.

    I do not know anything about an IME. I Googled "What is .." and still do not really know what it is. Later today I will go to the developers web page and search for IME, maybe I will get a better understanding.

    As far as the Market goes, it offers apps based on what your system tells it your phone is. Comes from the build.prop file. I tried pulling the build.prop file from my Droid 2 and my Charge and putting it into the emulator to see if I could fool the Market, but there must be something else involved because I did not get it to work.
  11. Master Droid
    chrstdvd's Avatar
    Member #
    122873
    Join Date
    Sep 2010
    Posts
    564
    Liked
    2 times
    Phone
    Droid 2
    #10
    Glad to hear you got it working. &nbsp;I had the same problem with my Google account many times. &nbsp;I thought it was because I use Hughes Net as my ISP, you know, if a cloud is in the way, you can not connect. &nbsp;I literally thought that because the first day was stormy, the next day I loaded the thing, the weather was fine, and it worked.<br><br>I do not know anything about an IME. &nbsp;I Googled "What is .." and still do not really know what it is. &nbsp;Later today I will go to the developers web page and search for IME, maybe I will get a better understanding.<br><br>As far as the Market goes, it offers apps based on what your system tells it your phone is. &nbsp;Comes from the build.prop file. &nbsp;I tried pulling the build.prop file from my Droid 2 and my Charge and putting it into the emulator to see if I could fool the Market, but there must be something else involved because I did not get it to work.

Sponsors

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Would anyone have stock i500 vzw system tar md5
    By tiger505 in forum Samsung Fascinate Development
    Replies: 1
    Last Post: 02-21-2011, 08:59 AM
  2. Why Cant I/How Do I edit files in /system
    By Natedogg in forum Bugless
    Replies: 3
    Last Post: 12-15-2010, 11:52 PM
  3. how do you edit the system file?
    By bigkell5 in forum Droid Incredible Hacks
    Replies: 8
    Last Post: 11-14-2010, 08:52 PM
  4. Stock Email app crashes EVERY time I try to open a message
    By BLS in forum Tech Issues, Bug Reports & Suggestions
    Replies: 2
    Last Post: 03-16-2010, 06:59 PM
  5. How to open and edit text documents
    By gyrobob in forum Droid Applications
    Replies: 3
    Last Post: 02-03-2010, 06:41 PM

Search tags for this page

android edit system.img

,
edit android system.img
,

edit system.img

,

exception: status access violation at eip=004010b0

,
how to edit system.img
,
how to extract system.img android
,

how to open system.img

,
open .img android
,

open system.img

,
open system.img android
,
system.img
,
unyaffs exception status access violation
,

unyaffs status access violation

,
unyaffs.exe
,
unyaffs.exe.stackdump
Click on a term to search our site for related topics.

Tags for this Thread