Skip to content

Android tool to write an bml image to a bml partition - the kernel image (zImage) for example.

License

Notifications You must be signed in to change notification settings

neldar/bmlwriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bmlwriter - write bml partitions on Samsungs android smartphones

Copyright (C) 2010 Michael Richter (alias neldar)

***************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program;
if not, see <http://www.gnu.org/licenses/>.
***************************************************************************************

USAGE:
bmlwriter srcpath destpath

For example to flash a zImage on SGS:
bmlwriter zImage /dev/block/bml7

RETURN VALUES:
Exit values are defined in bmlwritererror.h, read the ATTENTION section below!

SUCCESS: success

ERROR_INVALID_ARGC: invalid number of arguments to bmlwriter -> safe
ERROR_SRC_OPEN: srcfile can not be opened -> safe
ERROR_DST_OPEN: destpartition can not be opened -> safe
ERROR_UNLOCK_FAIL: bmlunlock failed -> safe

ERROR_FSTAT: copy failed on fstat -> safe
ERROR_READ: copy failed on read, but nothing written -> safe
FATAL_READ_PARTIAL_WRITE: copy failed on read, BUT with partial write -> UNSAFE -> RETRY FLASH!!!
ERROR_PARTIAL_READ: copy failed on partial read before file ends, but nothing written -> safe
FATAL_PARTIAL_READ_PARTIAL_WRITE: copy failed on partial read before file ends, BUT with partial write -> UNSAFE -> RETRY FLASH!!!
FATAL_WRITE copy failed on write -> UNSAFE -> RETRY FLASH!!!

ATTENTION:
ERROR_*	just indicate the program failed, but the destination partition remain untouched.
FATAL_*	indicate the program critically failed and the destination is PARTIAL written.
	That means the phone (mostly) will fail to boot at this point.
	FATAL errors are not often, but you should take care of them -> restart bmlwriter


Authors:
neldar		- improvments (POSIX read, error handling) -> bmlwriter
Unhelpful	- initial bmlwrite 
koush		- bmlunlock

About

Android tool to write an bml image to a bml partition - the kernel image (zImage) for example.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages