Welcome, Guest. Please Login.
Linuxslate.com Forums

<=== Back to the Linuxslate.com Homepage

Mar 25th, 2019, 3:14am
News: Welcome to the linuxslate.com forums. 16 Janruary 2015: Forum registration has been disabled due to recent advancements in bypassing captcha's and the resulting increase in spam on the forums. Registration will be re-enabled at a later date. In the meantime, if you need to register, or have relevant information, please email "john" at this domain, or request an account using the linuxslate.com Google+ Page: https://plus.google.com/+Linuxslate/


Pages: 1
How to extract system.img from Acer factory update (Read 3438 times)
Administrator
Forum Administrator
*****


Administrator

Posts: 88
Gender: male
How to extract system.img from Acer factory update
Sep 22nd, 2012, 6:11pm
 
How to extract the system image from Acer factory firmware update for the Acer Iconia Smart s300/A5 without Windows or Wine.
 
Acer has released several firmware updates for the Acer Iconia Smart tablet phone, but due to flawed thinking, they have released them as Windows Executables.  The Windows installer does not run under Wine.  This makes things very difficult for Mac or Linux users should they need or want to re-install the OS in their phone.
 
While I have not yet been able to extract all of the files, I have been able to extract the system.img.
 
This Android phone can only be updated with Windows.  This phone did not do very well in the market.
Other Android Phones can be updated from Windows/Mac/Linux.  Many of those phones have done very well in the market.
Cause/Effect?  I'm not saying that, but the aforementioned facts remain facts.
 
Warning:  The Steps Below are Painful.
Warning:  I have not tried installing the resulting images on an actual phone.
Warning:  You can seriously and permanently damage your phone if you follow the Steps Below.
Warning:  This is intended for owners of an Acer Iconia Smart.  It is not to be used to illegally obtain or redistribute copyrighted software.
Warning:  If you follow the Steps Below you will Die -- OK, it's not that bad, but you get the picture.
 
The Steps Below can also be used on Windows for those who would like to customize their Firmware.
 
What's Needed:
-- An Acer Update installer (e.g. OS_Acer_1.000.24.AAP.GEN2_A23G_A.zip) this can be downloaded from Acer support at:  
-- Fastboot executable for your platform (Mac or Linux). This is part of The Android SDK for your platform.
-- A Hex editor, such as hexedit (On Ubuntu, try: sudo apt-get install hexedit)
-- 7 zip (On Ubuntu try: sudo apt-get install p7zip-full, On Mac, try keka: http://www.kekaosx.com/en/ )
-- unyaffs  http://code.google.com/p/unyaffs/
-- To extract the images, we will need to compile unyaffs.  This means you will need a compiler installed on your platform.  If you just need the image files, this in not necessary.
-- Lots of Patience.
 
The overall plan is to un-compress the supplied files, always following the largest one.
 
1.  Unzip the original file
 
Code:
unzip OS_Acer_1.000.24.AAP.GEN2_A23G_A.zip 


 
2. This will create a folder with 4 files.  The largest will be
acer EuuPacket Setup.msi
 
An .msi file is really just a 7zip file, so let's rename it. (This step is optional if your 7zip program is OK with the .msi extension)
 
Code:
mv "acer EuuPacket Setup.msi" "acer EuuPacket Setup.7z" 


 
Uncompress it with 7zip
 
Code:
7z e "acer EuuPacket Setup.7z" 


 
This will produce lots of files, possibly with cryptic filenames, depending on how you un-compressed it.  We don't care about the filenames, we just want the largest one (Probably over 200MB)
 
3. Again, we run 7zip on the largest one:
 
Code:
7z e _1F4FACC1F8388ABEE28F12350500C236 

 (Filename may be different)(May also be called acer_MergedOSFile.bin)
 
This will produce (finally) the file we want.  For the Above ROM, it was called _94373C2C4363478B983F99D479D89444.
 
Since this is finally the raw file, it got bigger when unzipped.  (The others did not, since their contents was compressed data.)  It should be about 310 MB.
 
4.  Open it in a Hex editor. Linux hexedit used in the steps below:
 
Code:
hexedit _94373C2C4363478B983F99D479D89444. 


 
5.  Search for 'acersyst':
 
Code:
<TAB> 		Moves to the ASCII column
/acersyst	Search for acersyst
<Right Arrow>   Move forward 13 bytes *after* acersyst, you should be on a Hex 03.
<CTRL><SPACE>	Mark
/acerreco	Search for acerreco
<Left Arrow>	Backup one Byte.  The system image portion of the file is highlighted.
<ESC>w		Copy
y		Answer the warning
<ESC>y		Save to a file
system.img	Enter the filename
<CTRL>c		Exit
 


You should now have a (valid?) system.img
 
You can stop here if this is all you need.  This image should be able to be installed with fastboot. More details later.
 
To view it's contents, we need a patched and modified unyaffs
Download the source, headers and patch from:
http://code.google.com/p/unyaffs/downloads/list
 
The patch is in this issues post:
http://code.google.com/p/unyaffs/issues/detail?id=4
 
6.  In a suitable directory, apply the patch.
 
In the (patched) c source code, change the values for  
 
Code:
Originally:
#define CHUNK_SIZE 2048
#define SPARE_SIZE 64

Change to:
#define CHUNK_SIZE 4069
#define SPARE_SIZE 128 


 
Compile unyaffs.c
 
Code:
gcc -o unyaffs unyaffs.c 


 
7.  Create a directory, and move into it:
 
Code:
mkdir extracted_image
cd extracted_image 


 
8.  Copy your custom unyaffs to this directory:
 
Code:
cp <path to>unyaffs . 


 
9.  Extract your system.img. (I am assuming your system.img is now one dir above where we are.)
 
Code:
unyaffs --verbose ../system.img 


 
You should now have the contents of the system image in this dir.
 
The same can be done for flex.img, just search for 'acerflex', and copy to the end of file.
 
I have also found boot.img, and recovery.img, but they cannot be extracted with unyaffs.
 
Back to top
 
 

Mobile Linux ?
Got That:
Z1 Android Watch Phone, Huawei Honor 2, Nexus 7 (2013), MUCH G2.
WWW   IP Logged
Pages: 1