[HOW TO] Open CGs - Defy Android Development

Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?

There is a Perl script which can unpack boot and recovery (CG35 & CG47) in this thread: http://forum.xda-developers.com/showthread.php?t=443994

Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
CG64.smg & CG65.smg: partition tables that you can open using fdisk/sfdisk
CG33.smg is a CDROM ISO file!
iirc one or two of them are the splash image (not 100% sure now)

Filipitripi said:
Hi all :
I try open all CGs for see the files, but i only know to open CG39 and some more..
sudo mount -o loop CG.39.smg CG39
But the others ¿¿
Some one have the answer ¿?¿?¿?
Click to expand...
Click to collapse
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.

rachit2588 said:
how to repack cg39.smg
if you have any details on windows 7 how to open repack do send me.
Click to expand...
Click to collapse
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows

^very good idea

danimagrin said:
http://sourceforge.net/projects/ext... 2.2 (Latest)/ext2explore-2.2.71.zip/download
It will allow you opening ext3 images inside Windows
Click to expand...
Click to collapse
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??

rachit2588 said:
so now i can see files on cg39.smg using ext2reader but the thing is now how to get system image from cg39.smg to system.img ??
Click to expand...
Click to collapse
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.

danimagrin said:
System.img to be restored with Nandroid? If yes you have to extract all files with ext2reader then use mkyaffs2image to build system.img.
Click to expand...
Click to collapse
with mkyaffs2image its jus showing me a cmd windows for some less thn 1 sec and its jus goes away...please upload the version you are using...also let me know if it needs any prerequisite software to be installed.

It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"

danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
oh , ok.. its working..thanks

danimagrin said:
It's because mkyaffs2image is a command line app, just like in the DOS days... To use it you should open a cmd window (type cmd at Windows menu and press enter), go to the directory right before the one you extracted files (you use cd "dirname" to enter in a directory and "cd .." to leave it. So when you are in the directory right before the one in which you've extracted files type "mkyaffs2image CG39extracteddir system.img"
Click to expand...
Click to collapse
ok last doubt...after creating system.img can it be restored via custom recovery..??
how to add md5 check sums for that so that custom recovery can identify as proper nandorid..!!??

rachit2588 said:
oh , ok.. its working..thanks
Click to expand...
Click to collapse
You welcome!
Sure you can use it with nandroid, you must download md5sum.exe, place it together with mkyaffs2image, after you used mkyaffs2image then type "md5sum system.img" and it will generate checksum. Create a file called "nandroid.md5" and paste what md5sum returned. You can open a nandroid.md5 file of another backup and you'll understand better how it's done..

excellent..i got it

@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..

rachit2588 said:
@danimagrin help me how to add root files if our cg39 image is unrooted..??
ie how to manually add root files from some rooted cg39 image to some non rooted original image..which files and folders are required to add/replace..?? ne thoughts..
Click to expand...
Click to collapse
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...

danimagrin said:
I know how to do it on Linux, because you've to run chmod and chown to set su and Superuser.apk permissions. I'll see if it's possible to do it inside Windows and I'll answer you asap.
Where did you get mkyaffs2image for Windows? Are you running it with -f flag or not? Have you already made an image and restored it and did it really work? I'm afraid if will not work because of the same problem above...
Click to expand...
Click to collapse
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker

rachit2588 said:
yes i have made an system.img with md5 nandroid check sum...but still not restored with CWM Recovery...yeah mkyaffs2image works on windows...find out in the attached IMG depacker
Click to expand...
Click to collapse
I'll test it as soon as I get home and then I tell you!

Related

[Samsung Galaxy Gio GT-S5660][Tutorial] Export ROM for use in Odin

This tutorial is about how to export your /system partition or your own ROM.
Requirements
- ADB Shell for Windows, Linux, Mac OSX or Android Terminal Emulator installed on your GT-S5660
- If you are using Windows use cygwin else use Terminal in Linux.
Process
1. Install Cygwin from here, skip this step if you use Linux
2. Connect the Gio to the computer.
3. a) Open windows command prompt and type:
adb shell
Click to expand...
Click to collapse
3. b) If you use Android Terminal, open it
4. Whether you use option a or b from the previous step type this
dd if=/dev/block/stl12 of=/sdcard/system.rfs bs=4096
Click to expand...
Click to collapse
5. Now you have a system.rfs file on your sdcard.
6. If you use cygwin place the system.rfs in this folder (where you installed it):
C:\Cygwin\home\%yourusername%
Click to expand...
Click to collapse
If you use Linux I assume you have the skill to set the correct paths yourself...
7. Now we are going to pack it into a tarball:
tar -H ustar -c system.rfs > thisismyrom.tar
Click to expand...
Click to collapse
if you have an additional moddified boot.img for example you could have typed this as well:
tar -H ustar -c boot.img system.rfs > thisismyrom.tar
Click to expand...
Click to collapse
8. Add md5 hash to our tarball for security and integrity checks
md5sum -t thisismyrom.tar >> thisismyrom.tar
Click to expand...
Click to collapse
9. Renaming our tarball with md5 extension:
mv thisismyrom.tar thisismyrom.tar.md5
Click to expand...
Click to collapse
10. Happy flashing with odin!
Shouldn't stl12 be system? And stl14 cache?
Also, you could make a shell script to automate part of your process. Scripts can be run from Cygwin and Linux.
Regards,
Darkshado
Sorry! Made a typing mistake. Corrected it!
No need of cygwin, adb in windows cmd will do fine, and use total commander to tarball it on windows, other tools mess it up n can brick your device
Hi!
How can i export the CSC (or all the ROM) from Android 2.2.1?
thanks
I may have got the wrong end of the stick here and this could be the wrong thread, but it does seem to be the most specific to my interest.
I'd like to be of service by exporting my own ROM (Stock Firmware) so others can use it themselves in case of disaster. I started a thread at Samfirmware.com here http://www.sammobile.com/forum/showthread.php?t=3420 because they don't have it on their list for Samsung Galaxy Ace, and I was surprised to see it got 64 views, so I presume there would be some modicum of interest in it.
I really don't have any experience with this but I am fascinated and keen to learn. I had assumed (and I know assumption is the mother of all f*** ups) that I could simply create a CWMrecovery backup and it could be zipped up and exported to other phones. But I read somewhere that this would include my google account details.
Anyway. If you can tell me a) how to be of some use regarding this b) tell me its not worth it but point me in the direction of a place where I can start to learn what to do or c) politely show me the exit sign and tell me not to darken your door again...I'd be most grateful

V20B .bin file :)

There you go
http://www.lgmobiles.com/gsm/download/P920 V20B (Gingerbread Version).zip
To root the bin file (instructions based on the one here)
Requirements: WinHex, a Linux distro (VMs work fine), drivers and flasher.
Instructions
1. Extract and open LGP920AT-00-V20b-ESA-XXX-JAN-10-2012+0_AP.bin in WinHex or any other hex editor.
2. Use WinHex to dump the content from offset B80000 (hexadecimal) to the end (select B80000 as start block and 22ABFFFF as end block and copy it to a new file), and save the dump as system.img.
3. Copy the .img to your Linux distro. Place it in the desktop. Now open terminal, cd to Desktop and enter the following commands one by one:
sudo mkdir temp
sudo mount -o loop system.img temp
Click to expand...
Click to collapse
What this does is mount the img into the temp folder. However, the files are read only. To copy su and superuser.apk, download both file, place them in the Desktop and enter the following commands:
sudo cp superuser.apk temp/app
sudo cp su temp/bin
Click to expand...
Click to collapse
Now, you have to set permissions for su and superuser.apk.
cd temp/app
sudo chmod 0644 superuser.apk
cd
cd Desktop/temp/bin
sudo chmod 6755 su
Click to expand...
Click to collapse
To save the changes, enter this:
sudo umount temp
Click to expand...
Click to collapse
Now, copy image.img back to Windows or whichever environment you prefer.
4. Copy the contents of the img file in WinHex. Go back to the bin file in WinHex and remove any data from offset B80000 onwards. You should be left with offsets 0 to B7FFFF. Right click block B7FFFF, select clipboard data > paste and accept all the prompts. You can now save the .bin file.
5. Now, it's time to flash the .bin. Extract the drivers somewhere and install "LGUnitedMobileDriver_S497CA20_WHQL_ML_Ver_1.0 .exe" and "LGUnitedMobileDriver_S497MA20_WHQL_ML_Ver_1.0.exe". Then, extract the flasher to another location.
6. With the .bin and .fls (found in the zip file containing the .bin as well) in hand, turn your phone off and remove both SD and SIM cards.
MAKE A BACKUP BEFORE PROCEEDING. THIS PROCEDURE WIPES SYSTEM AND APPS. DATA SUCH AS MUSIC AND IMAGES WILL REMAIN INTACT.
Click to expand...
Click to collapse
7. Hold volume up button while inserting the usb cable. When your computer detects the phone, let go of the button.
8. Once the driver installs, run B_SmartFlashTool_Extern.exe, go to the ROM copy D/L tab
9. Select the .bin file under CP bin and the .fls file under AP .bin.
10. Click start. Don't touch anything.
11. Once it's done, close the flasher, unplug your phone and insert the SIM and SD cards and turn it on.
12. Done
Zip file contains both .fls and .bin files.
So it seems roms based on v20B might be in the works
EDIT: Not going to upload, has been superseded by v20E and the Megatron exploit.
Hello! Please laid out links to the program.
http://file.karelia.ru/3jw96r/
LGP920AT-00-V20e (no patched)
Please patch file!
Sent from my LG-P920 using xda premium
he's uploading the v20b bin as we speak, also someone might need to make a thread on "patched firmware" if people are finding more .bin files
I'm 30% through the second zip file, Mediafire only allows maximum 200MB per file so I had to split up the .bin. It should be up in about an hours' time.
SnegovikRZN said:
http://file.karelia.ru/3jw96r/
LGP920AT-00-V20e (no patched)
Click to expand...
Click to collapse
Can somebody patch this bin. I think this is newest ROM 18.01.2012.
dr_jerremy said:
Can somebody patch this bin. I think this is newest ROM 18.01.2012.
Click to expand...
Click to collapse
I'm downloading it now, download speeds are really slow. I'll take a look once it finishes downloading.
pandaball said:
I'm downloading it now, download speeds are really slow. I'll take a look once it finishes downloading.
Click to expand...
Click to collapse
I'm almost done with dowloading,but i dont know how to patch :S..... I will try
EDIT: Bin. V20E 18.01.2012
Follow the updated instructions, they should be concise enough to follow.
In other news, I realised I forgot to set permissions for superuser.apk and su. So, I have to reupload everything due to my mistake. Sorry guys, I can only upload everything tomorrow as it's getting late
@SnegovikRZN If you could create patched ROMs for P920 as you did with the P970 that would be great
pandaball said:
Follow the updated instructions, they should be concise enough to follow.
In other news, I realised I forgot to set permissions for superuser.apk and su. So, I have to reupload everything due to my mistake. Sorry guys, I can only upload everything tomorrow as it's getting late
@SnegovikRZN If you could create patched ROMs for P920 as you did with the P970 that would be great
Click to expand...
Click to collapse
Can I say I'm first?
pandaball said:
Can I say I'm first?
Click to expand...
Click to collapse
i'll bring my thumbdrive over jk
Я не могу создать прошивку для p920, так как там немножко другая структура...
Ohh the ANDROID! string is missing... ok, no problem
in the 20e the entry 22ABFFFF is missing..
Maybe for V20E:
2249FFF0
I can't flash patched rom with Lg flash tool..
Oh I figured out what's the problem
Seem V20B having more options to root it.
hondymondy said:
Seem V20B having more options to root it.
Click to expand...
Click to collapse
Not really, most new roms would be rebased on v20E so I would recommend those

[GUIDE][FOR ADVANCED USERS] [Edit original LG Firmwares] root su760 ICS

Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
LGExtract -wdb ***.wdb ***.dll
Click to expand...
Click to collapse
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.
Credits
LGExtract:
http://forum.xda-developers.com/showthread.php?t=1566532
BIN Extracting Tool:
http://forum.xda-developers.com/showpost.php?p=31476664&postcount=17
Rooting img file:
http://forum.xda-developers.com/showthread.php?t=1517457
Please sent pm if I forget somebody
Changelog
--reserved--
↑
Sent from my LG-P925 using xda app-developers app
Hi berni, i managed to insert your bootloaders into an ics bin but it didnt boot good news though the bootloaders seemed to have flashed fine. Now just finding a way back into android.
berni987654321 said:
Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.
Click to expand...
Click to collapse
Unable to extract bin of P725. it says "MAGIC HEADER NOT FOUND: any suggestions ?
Eklovya said:
Unable to extract bin of P725. it says "MAGIC HEADER NOT FOUND: any suggestions ?
Click to expand...
Click to collapse
The bin got corrupted or they aren't supported there is also a tool made by wkpart it doesn't support the p920 but maybe you re phone
Sent from my LG-P920 using xda app-developers app
berni987654321 said:
The bin got corrupted or they aren't supported there is also a tool made by wkpart it doesn't support the p920 but maybe you re phone
Sent from my LG-P920 using xda app-developers app
Click to expand...
Click to collapse
The bin are correct i used them to recover my phone.
Can you provide me the link towards wpark tool?
Sent from my LG-P725 using xda premium
berni987654321 said:
Hi guys,
this is a big tutorial for advanced users on how to edit LG Firmwares.
This could be usefull to change recovery included, root the bin or give a try to
change bootloader to make su760 ics on p920 work.
First download a bin or a kdz file:
http://lg-phone-firmware.com/
Then download the attached zip file and unpack it somewhere on your
windows pc.
Put the downloaded firmware in the same directory.
If you have chosen a kdz file you have to unpack it with LGExtract.
Ope up cmd and go with cd to the directory where all the files are.
Then type:
Code:
LGExtract -kdz *nameofthekdzfile*.kdz
upack the new .cab file with winrar or something like that, then run
replace *** with the name of the files that you have unpacked
Now you should have a Folder caled BIN.
Use cd to enter that folder.
Run in cmd:
Code:
copy /b "LG****_AP[*].bin" "LG****_AP.bin"
Replace **** with p920 or su760 related to wich firmware you have downloaded.
Now use explorer to move the LG****_AP.bin in the folder where all the .exe files are.
Extracting the bin
Run in cmd
Code:
extract.exe ***_AP.bin
At first you will see all the partitions in the bin and their offsets,
then the tool will extract them to .img files, stay tuned this will take some time.
Root the system partition
You can skip this if you just want to replace a partition.
Rename the extracted sstem partition from something like "7 - system.img" to "system.img"
Download this:
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
and put it together with the system.img into a linux distro.
In linux unpack the zip and copy the superuser.apk and the su file
in the same directory with the img
go with the terminal in the folder with the system.img
and run:
Code:
sudo mkdir temp
sudo mount -o loop system.img temp
sudo cp superuser.apk temp/app
sudo cp su temp/bin
cd temp/app
sudo chmod 0644 superuser.apk
cd ..
cd bin
sudo chmod 6755 su
sudo umount temp
Copy the image back to windows.
Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool.
Hope this helps you, please post if you didn't understand anything, I forgot something or something is wrong.
Click to expand...
Click to collapse
how can I extract the other partitions?
need modify the exe file? with that program? VS2012?
sorry for my english .. I'm Italian.
fabersantucci said:
how can I extract the other partitions?
need modify the exe file? with that program? VS2012?
sorry for my english .. I'm Italian.
Click to expand...
Click to collapse
Extract .exeextracts all the partitions
Sent from my LG-P920 using xda app-developers app
Thank you very much for this guide. I hope somebody makes a working recovery without wkparks u-boot
Sent From My LG Optimus 3D SU760
berni987654321 said:
Extract .exeextracts all the partitions
Sent from my LG-P920 using xda app-developers app
Click to expand...
Click to collapse
not work ... You can make an example?
Put for example v21e bin and the extract tool in one folder and run extrct .exe name of bin file
Sent from my LG-P920 using xda app-developers app
Hey, great guide! I'm trying this on an LG Motion and the LGExtract worked great. Unfortunately, I'm getting an error with extract.exe "Failed to match header."
Could you please provide a link to the wpark tool?
Lg su760 ics
hi,
my mobile sets info are:
Model LG SU760(korean T)
Android ver 4.0.4
baseband XMM6260
karnel 3.0.21
build number ICS
Software ver LGSU760-V30b-OCT-18-2012
Problems:
1. how i uninstall korean skt and T applications??
2. My data speed on gprs is slow, highest is 12kbps. wifi speed is ok. why the gprs is slow??
Is there i need to root or change baseband? i live in bangladesh.
thanks.
I do not understand this problem
I hope you give me detailed instructions. Thank you very much!!!
"Replace a Partition
Install winhex or an other hex editor.
Open the downloaded or extracted bin.
Go to offset that extract.exe showed you,
and select everything to the end of the partition and delete it.
The end of the partition is the offset + size of extract.exe showed you.
For example:
If the offset of the system partition is 00DA0000
and the size of is 2BC00000 the end of the partition is DA0000 + 2BC00000 = 2C9A0000
now open up the image you want to replace i with in hex editor,
select everything go back to the offset of the partition in winhex and paste it there,
just save it and you have your new own bin file ready to flash with LGFlashTool."

[Q] [SOLVED] Trying to install Stock Asus ROM

On my TF700T I'm currently running CyanogenMod version 11-20140805-SNAPSHOT-M9-tf700t. I currently have CWM Recovery 6.0.4.4
I want to return to a stock Asus ROM from their website.
I've tried flashing WW_epad-user-10.6.1.14.10.zip with CWM but get an error...
assert failed: write_raw_image("/tmp/blob", "staging")
E:Error in /storage/sdcard1/WW_epad-user-10.6.1.14.10.zip
(Status 7)
Installation aborted.
What is it I'm doing wrong?
No thoughts?
I just tried commands from this thread, and I get error: cannot open 'blob' - yes the blob files was in the same folder as fastboot.
What cant I get this to work???
Bad download maybe?
sbdags said:
Bad download maybe?
Click to expand...
Click to collapse
I've downloaded the update 4-5 times... How big a deal is the different models? WW, TW, US??? I think it's WW, it was purchased in Australia.
Thanks for replying
When you tried to flash the zip from cwm did you unzip it first? I.e., flash the zip in the zip?
Other than that check the output of fastboot devices first.
sbdags said:
When you tried to flash the zip from cwm did you unzip it first? I.e., flash the zip in the zip?
Other than that check the output of fastboot devices first.
Click to expand...
Click to collapse
Yup I unzipped the download.
I'm running a Mac book pro, but running boot camp or OSX I still get 015d262e98340004 fastboot
typing fastboot reboot did reboot the tablet so fastboot and adb are working correctly.
FL00DY said:
I currently have CWM Recovery 6.0.4.4
assert failed: write_raw_image("/tmp/blob", "staging")
E:Error in /storage/sdcard1/WW_epad-user-10.6.1.14.10.zip
Click to expand...
Click to collapse
IIRC the "staging" target doesn't work in CWM - don't remember about TWRP. But you can edit the updater-script and replace "staging" with "/dev/block/mmcblk0p4", that should work.
FL00DY said:
I get error: cannot open 'blob' - yes the blob files was in the same folder as fastboot.
Click to expand...
Click to collapse
That's a common mistake in many of the guides - the file must be in your *current* directory.
FL00DY said:
Yup I unzipped the download.
I'm running a Mac book pro, but running boot camp or OSX I still get 015d262e98340004 fastboot
typing fastboot reboot did reboot the tablet so fastboot and adb are working correctly.
Click to expand...
Click to collapse
Hmm I've never used a mac in my life so I can't help you any further. On a windows machine or linux the last thing to check is that the blob file is in the same folder but you already said that.
Can you run an md5sum on the zip file (I know you dl'ed it 5 times) just to confirm it is not getting corrupted....
Other than that I'm out of ideas - sorry.
_that said:
IIRC the "staging" target doesn't work in CWM - don't remember about TWRP. But you can edit the updater-script and replace "staging" with "/dev/block/mmcblk0p4", that should work.
That's a common mistake in many of the guides - the file must be in your *current* directory.
Click to expand...
Click to collapse
The stock updater-script looks like this
Code:
assert(package_extract_file("blob", "/tmp/blob"), write_raw_image("/tmp/blob",
"staging"),delete("/tmp/blob"));
When you say replace "staging" - what should the bottom line look like?
This post says the blob must be in the same folder as the fastboot.exe - what do you mean when you say the file must be in your "current" directory?
sbdags said:
Hmm I've never used a mac in my life so I can't help you any further. On a windows machine or linux the last thing to check is that the blob file is in the same folder but you already said that.
Can you run an md5sum on the zip file (I know you dl'ed it 5 times) just to confirm it is not getting corrupted....
Other than that I'm out of ideas - sorry.
Click to expand...
Click to collapse
I've setup adb and fastboot to work the same way in Windows & OS X. I used to be a PC guy til I moved to graphic design... Thanks everyone for the help :good:
FL00DY said:
When you say replace "staging" - what should the bottom line look like?
Click to expand...
Click to collapse
If you don't know how to do a simple text substitution, I'd recommend you use the fastboot method.
FL00DY said:
This post says the blob must be in the same folder as the fastboot.exe - what do you mean when you say the file must be in your "current" directory?
Click to expand...
Click to collapse
That post is wrong as I already said. Files whose name you specify on a command line must be in your current working directory (of your shell), unless you specify them with a path. So you either have to use "cd" to the directory containing the blob file, or you have to specify the (relative or absolute) path to the blob file on the fastboot command line.
_that said:
If you don't know how to do a simple text substitution, I'd recommend you use the fastboot method.
Click to expand...
Click to collapse
Well I just wasn't sure if I was only replacing Staging ...
Meaning should the line look like this ...
Code:
"/dev/block/mmcblk0p4"),delete("/tmp/blob"));
That post is wrong as I already said. Files whose name you specify on a command line must be in your current working directory (of your shell), unless you specify them with a path. So you either have to use "cd" to the directory containing the blob file, or you have to specify the (relative or absolute) path to the blob file on the fastboot command line.
Click to expand...
Click to collapse
OK sure that makes sense, I just didnt want you meant by current. Thanks very much :good:
It all worked on Friday, thanks so much @_that life saver ... oh and I wasn't trying to steal your thunder in the other thread :good:

(How to) unpack/repack boot.img using terminal apk

This is a tutorial I've decided to put together as I'm learning to compile kernels. It will cover unpacking and repacking a boot.img and/or recovery.img, and also touch on unpacking the ramdisk after we have unpacked the boot.img This tutorial will only focus on executing this on a android device using the terminal emulator app but of course you could use these tools on a PC in a adb shell.
This would not be possible without the hard work of xda member @Modding.MyMind. I am not responsible for anything you do to your device by using these tools.
What you will need
1. Android device
2. Have root
3. Have busybox installed (1.23.1 is recommended)
4. Terminal Emulator app
5. Root Explorer app
6. Your devices boot.img and/or recovery.img
7. mkbootimg_tools-master.zip (download below)
https://www.dropbox.com/s/fiat0zrf2f533uq/mkbootimg_tools-master.zip?dl=0
DIRECTIONS
1. Let's pull the boot.img we are going to work with using dd. Open your terminal and type su > press enter. Type dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img > press enter and now you should see a file on your sdcard called boot.img
2. Place the zip file on the root of your internal sdcard and extract it. You will see a folder called mkbootimg_tools-master and inside that folder you will see 2 folders. One called ARM and one called README.md Now we are going to copy the ARM folder to data/local/tmp and paste it inside of the tmp folder.
3. Now we need to go the ARM folder that you just copied inside tmp and set the permissions to 0777 (rwxrwxrwx) and also set the same permissions for each file inside the ARM folder.
4. Now go inside the ARM folder and copy the bash file to system/xbin and set the permission to chmod 0755 (rwxr-xr-x)
5. Ok now copy the boot.img file that we pulled onto your sdcard inside the ARM folder and leave the permissions for that file 0666 (rw-rw-rw-)
6. Open up your terminal emulator app and type su > press enter
7. Now we are going to change directories to the ARM folder which we want to be in by typing cd data/local/tmp/ARM > press enter
########################################
Now to unpack your boot.img
1. Type ./mkboot boot.img bootfolder > press enter and you will see the magic happen. It will automatically create a folder called bootfolder which is your project folder and you can name it whatever you like but I like to call it bootfolder and if I was unpacking a recovery.img I would call it recoveryfolder
2. So now you have your unpacked boot.img.
3. Now go to your terminal and type cd bootfolder > and press enter. We are going into your bootfolder now because that is where your ramdisk.gz is located and we are now going to decompress your ramdisk by typing gunzip -dc ramdisk.gz | cpio -i > and press enter and it will decompress your ramdisk for you.
4. So now you have unpacked a boot.img and also learned how to decompress your ramdisk.
########################################
How to decompress a ramdisk in lzma format
1. ./mkboot recovery.img workfolder
2. cd workfolder/ramdisk
3. Now type lzma -dc ../ramdisk.lzma | cpio -i; strings *.ko
4. Now you will have your lzma compressed ramdisk inside your workfolder
#######################################
Now we are going to repack your boot.img
1. In your terminal type cd .. > and press enter so you will move back 1 directory into your ARM folder.
2. Now to repack you are going to type ./mkboot bootfolder boot.img > and press enter and that will repack your boot.img for you
*wherever you saw me type a > don't ever type that as I was just showing that you are done the command or syntax and your are ready to press enter
Source code https://github.com/ModdingMyMind/mkbootimg_tools/commit/6c44267b4a8a43504c870678c68df6a31b8e2f18
Screenshot - https://www.dropbox.com/s/se171tzgnf6wp0q/Screenshot_2015-03-12-02-49-50.png?dl=0
Screenshot - https://www.dropbox.com/s/5bzt8p6l2ltosl6/Screenshot_2015-03-12-02-50-04.png?dl=0
Thanks to @leonardoafa for being a great help & friend
How different is it for a recovery image file please?
Is the same, just put your recovery.img in the ARM folder and you might want to call your project folder something different than bootfolder (ex; recoveryfolder) so you don't get confused or forget
Oh yes, however ramdisk folder is empty when you use only a recovery image. Less content of course.
image45 said:
Oh yes, however ramdisk folder is empty when you use only a recovery image. Less content of course.
Click to expand...
Click to collapse
When i use twrp everything is working perfect. Your ramdisk is probably in a lzma format I'm guessing
As you can see im inside of my ramdisk folder, which is inside my recoveryfolder
https://www.dropbox.com/sc/ffyy2ndrkl57hn4/AACV__FpJuScCvIvErx2WFffa
@image45 i added how to decompress a ramdisk in lzma format to the op
Nice guide :good:
Yes very detailed, thank you.
@skulldreamz
Hi my friend, do you still want to learn about scripts.
Please go to telegram app.
Thanks
@image45 can you sendme your image that uses a lzma compressed ramdisk. The project supports lzma so there should be no need to decompress it manually however, if the project is not doing what it should already be doing then I need to debug the script, find the culprit, make my fix, and push the changes to my github. Would be greatly appreciated. Thanks.
app
Hy,
I use this app for long time to open boot.img and extract ramdisk.
The app asked then if you want open the ramdisk also.
Only click on your boot.img and in 4 sec its open.
Second function is to pack a boot.img.
Very simple to use, also for beginners.
konsolen said:
Hy,
I use this app for long time to open boot.img and extract ramdisk.
The app asked then if you want open the ramdisk also.
Only click on your boot.img and in 4 sec its open.
Second function is to pack a boot.img.
Very simple to use, also for beginners.
Click to expand...
Click to collapse
It only decompresses gzip ramdisks. Doesn't support other types unless you modify the ramdisk.sh script used inside the apk. It also doesn't support images with dt binaries which is more common nowadays. I use to use this a long time ago but to say it simple, it is outdated and lacks support.
However, if it works then I say use it. Especially if the person isn't comfortable with command lines.
Very helpful thx
Thanks
Sent from my SAMSUNG-SGH-I747 using Tapatalk
I see this is an older thread but tried it on my Nexus 6p. When I repacked boot it was significantly smaller in size. It also has the warning of non standard address. Anything I should do or be aware of?
Fe Mike said:
I see this is an older thread but tried it on my Nexus 6p. When I repacked boot it was significantly smaller in size. It also has the warning of non standard address. Anything I should do or be aware of?
Click to expand...
Click to collapse
Try using mkboot....
https://github.com/xiaolu/mkbootimg_tools
The Sickness said:
Try using mkboot....
https://github.com/xiaolu/mkbootimg_tools
Click to expand...
Click to collapse
Thank you, bare with me as Im fairly new to this. Just to be clear, when i go to link there is the ARM folder that has all the same stuff in it or the single mkboot file thats 9.46mb in size? Not sure how to download just the mkboot file. When i click it, it just opens up the code. Do i copy and paste the code?
Fe Mike said:
Thank you, bare with me as Im fairly new to this. Just to be clear, when i go to link there is the ARM folder that has all the same stuff in it or the single mkboot file thats 9.46mb in size? Not sure how to download just the mkboot file. When i click it, it just opens up the code. Do i copy and paste the code?
Click to expand...
Click to collapse
You have to clone the source using "git clone" in your terminal. Which means you need to be on Linux
The Sickness said:
You have to clone the source using "git clone" in your terminal. Which means you need to be on Linux
Click to expand...
Click to collapse
Ok, I was able to clone using cygwin. But i was reading in the forums that the size of extracted boot from phone will not be the same as it being repacked. So I used original files from this post and and just extracted, unpacked, and repacked. Then just flashed img thru twrp and everthing went well. Thank you for your response.
SHM said:
It only decompresses gzip ramdisks. Doesn't support other types unless you modify the ramdisk.sh script used inside the apk. It also doesn't support images with dt binaries which is more common nowadays. I use to use this a long time ago but to say it simple, it is outdated and lacks support.
However, if it works then I say use it. Especially if the person isn't comfortable with command lines.
Click to expand...
Click to collapse
Why haven't you made something like this, he's just using someone else's tools, please MMM, you're the man

Categories

Resources