CWM Packer - Sony Xperia M

cant help me with this tool..???
Code:
FAIL: Directory "" does not exist!
/cwm-packer/cwm-packer: line 33: return: can only `return' from a function or so urced script
Fail: "init" is gone!
/cwm-packer/cwm-packer: line 38: return: can only `return' from a function or so urced script
Fail: Boot ramdisk does not exist!
/cwm-packer/cwm-packer: line 43: return: can only `return' from a function or so urced script
Fail: Recovery ramdisk does not exist!
/cwm-packer/cwm-packer: line 48: return: can only `return' from a function or so urced script
Fail: Busybox is gone!
/cwm-packer/cwm-packer: line 53: return: can only `return' from a function or so urced script
Creating ramdisk "/home/Samsung/combined-ramdisk.img"...
/cwm-packer/cwm-packer: line 61: cpio: command not found
Fail: "" does not exist or not executable.
/cwm-packer/cwm-packer: line 73: return: can only `return' from a function or so urced script
Packing boot.img to "/home/Samsung/combined-boot.img"...
/cwm-packer/cwm-packer: line 91: eval: --: invalid option
eval: usage: eval [arg ...]

Related

[HELP] imgfs.bin is refused to access

hi,
my device is p3700(diamond gsm), and i'm trying to cook a rom.
I had used nbhtool.exe to get the os.nb from the os.nbh which is shippd with offical successfully. and then used the "Platformrebuilder - New ROM Kitchen " toolset (the list of toolsets which can be found here, or download the zip file from the attachment which is the mht file of that url. ) to get a os.nb.payload file. but I met a prompt in the end which said the imgfs.bin is refused to access.
i've searched the forum and can't find the answer. can anyone help to solve this? thank you.
Didn't take a look at your files, but check the bat file for paths.
Maybe it's expecting the file somewhere else?
adwinp said:
Didn't take a look at your files, but check the bat file for paths.
Maybe it's expecting the file somewhere else?
Click to expand...
Click to collapse
hi, adwinp, thank you for you reply.
i look the dump_800.bat, and try the following codes ONE BY ONE(SPLIT THE .BAT INTO TWO .BAT:
FIRST(TO CREATE THE IMGFS.BIN):
Code:
@ECHO OFF
if "%~1"=="" goto :error
set path_exe=%~d0%~p0
set path_arg=%~d1%~p1
cd /D %path_arg%
"%path_exe%bin\NBSPLIT" -data 2048 -extra 8 "%~1"
del "%~1.extra"
"%path_exe%bin\IMGFSFROMNB" "%~1.PAYLOAD" IMGFS.BIN
pause
goto:EOF
and the results:
Code:
NBSplit 2.1rc2
Using data chunk size = 0x800 and extra chunk size = 0x8
on file D:\MyROMs\[MyCooking]\Windows.nb
Done.
ImgfsFromNb 2.1rc2
Sector size is 0x800 bytes
ImgFs partition starts at 0x00780000 and ends at 0x07fa0000
Dumping IMGFS at offset 0x007c0000 (size 0x077e0000)
Done!
SECOND(TO GET DUMP FROM THE IMGFS.BIN):
Code:
@ECHO OFF
if "%~1"=="" goto :error
set path_exe=%~d0%~p0
set path_arg=%~d1%~p1
cd /D %path_arg%
"%path_exe%bin\IMGFSTODUMP" IMGFS.BIN
REM del "IMGFS.BIN"
del "dump_MemoryMap.txt"
REM rename "dump" IMGFS
pause
goto :EOF
and i don't see the error any more, but i'm not sure if the following results seems the right one while the bat command finished.
Code:
Header type: FFFFFFFF, Addr: 064FD688
Empty header
Header type: FFFFFFFF, Addr: 064FD6BC
Empty header
Header type: FFFFFFFF, Addr: 064FD6F0
Empty header
Header type: FFFFFFFF, Addr: 064FD724
Empty header
Header type: FFFFFFFF, Addr: 064FD758
Empty header
Header type: FFFFFFFF, Addr: 064FD78C
Empty header
Header type: FFFFFFFF, Addr: 064FD7C0
Empty header
and if directly use the dump_800.bat, then get the error:
Code:
Header type: FFFFFFFF, Addr: 064FD688
Empty header
Header type: FFFFFFFF, Addr: 064FD6BC
Empty header
Header type: FFFFFFFF, Addr: 064FD6F0
Empty header
Header type: FFFFFFFF, Addr: 064FD724
Empty header
Header type: FFFFFFFF, Addr: 064FD758
Empty header
Header type: FFFFFFFF, Addr: 064FD78C
Empty header
Header type: FFFFFFFF, Addr: 064FD7C0
Empty header
D:\MyROMs\[MyCooking]\IMGFS.BIN
access refused.
and i synchronize the two imgfs foder generated by above 2 method by totoal commander, it seems all the files are the same...
so does it mean i can ignore the error?
ok. now it works since i change the bat as follow, the error maybe generated by the del cmd. see the REMs:
Code:
@ECHO OFF
if "%~1"=="" goto :error
set path_exe=%~d0%~p0
set path_arg=%~d1%~p1
cd /D %path_arg%
"%path_exe%bin\NBSPLIT" -data 2048 -extra 8 "%~1"
del "%~1.extra"
"%path_exe%bin\IMGFSFROMNB" "%~1.PAYLOAD" IMGFS.BIN
pause
cd /D %path_exe%
cd /D %path_arg%
"%path_exe%bin\IMGFSTODUMP" IMGFS.BIN
pause rem this command used to judge if the imgfstodum works or not. it seems work normally
cd /D %path_arg% rem add this to change the dir again distinctly
pause
del "IMGFS.BIN" rem the previous error should be generated by this. after the change dir cmd above, the error is gone.
del "dump_MemoryMap.txt"
rename "dump" IMGFS
pause
goto :EOF
:error
echo Usage: Dump_xxx.bat "nba file"
pause

hboot

Aloha
Any way to execute the commands hidden in the hboot.nb0 file ?
When i look in it with a text editor i see things like:
Usage: savemem2sd <memory offset> <length> <file name>
ex: savemem2sd 85cd0000 2c000 mem.bin invalid parameters!
<addr> is invalid!
unsupported <width>
failed to write. <addr> must be aligned
failed to write. <value> is invalid
memory dump
%X: - %X: %B %B | %s
%B %X: %H %H | %s
%H %X: %X %X | %s
%X | %s
Usage: saveprt2sd <partition name> <-n> <file name> <-a>
<partition name> - Partition name want to save
<-n> <file name> - File name to store in(optional)
<-a> - Save whole blocks even read empty page(optional)
ex: saveprt2sd hboot hboot.bin
(use listpartition command get all partition name)
-a -n
Click to expand...
Click to collapse

Error in compiling CM-10.1

This is the error:
Install system fs image: /home/fede/cm10.1/out/target/product/p350/system.img
/home/fede/cm10.1/out/target/product/p350/system.img+ maxsize=214106112 blocksize=135168 total=150186432 reserve=2162688
Package target files: /home/fede/cm10.1/out/target/product/p350/obj/PACKAGING/target_files_intermediates/cm_p350-target_files-eng.fede.zip
Package OTA: /home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip
device/lge/p350/releasetools/ota_from_target_files -v \
-p /home/fede/cm10.1/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=pecan,p350,p355 \
--extras_file=build/tools/releasetools/extras.txt \
/home/fede/cm10.1/out/target/product/p350/obj/PACKAGING/target_files_intermediates/cm_p350-target_files-eng.fede.zip /home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip
Given a target-files zipfile, produces an OTA package that installs
that build. An incremental OTA is produced if -i is given, otherwise
a full OTA is produced.
Usage: ota_from_target_files [flags] input_target_files output_ota_package
-b (--board_config) <file>
Deprecated.
-k (--package_key) <key> Key to use to sign the package (default is
the value of default_system_dev_certificate from the input
target-files's META/misc_info.txt, or
"build/target/product/security/testkey" if that value is not
specified).
For incremental OTAs, the default value is based on the source
target-file, not the target build.
-i (--incremental_from) <file>
Generate an incremental OTA using the given target-files zip as
the starting build.
-w (--wipe_user_data)
Generate an OTA package that will wipe the user data partition
when installed.
-n (--no_prereq)
Omit the timestamp prereq check normally included at the top of
the build scripts (used for developer OTA packages which
legitimately need to go back and forth).
-e (--extra_script) <file>
Insert the contents of file at the end of the update script.
-a (--aslr_mode) <on|off>
Specify whether to turn on ASLR for the package (on by default).
--backup <boolean>
Enable or disable the execution of backuptool.sh.
Disabled by default.
--override_device <device>
Override device-specific asserts. Can be a comma-separated list.
-p (--path) <dir>
Prepend <dir>/bin to the list of places to search for binaries
run by this script, and expect to find jars in <dir>/framework.
-s (--device_specific) <file>
Path to the python module containing device-specific
releasetools code.
-x (--extra) <key=value>
Add a key/value pair to the 'extras' dict, which device-specific
extension code may look at.
-v (--verbose)
Show command lines being executed.
-h (--help)
Display this usage message and exit.
** option --extras_file not recognized **
make: *** [/home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip] Error 2
This is at the end, when generating OTA zip file.
Any clue?
Thanks.
Sorry for necroying, Did u solve this issue? thanks

can any kernel dev help

i really wanna use that govanor barry allan so i wanna recompile cm kernel with barry allan integrated but im always getting that error
gcc: error: unrecognized argument in option '-mabi=apcs-gnu'
gcc: note: valid arguments to '-mabi=' are: ms sysv
gcc: error: unrecognized command line option '-mlittle-endian'
gcc: error: unrecognized command line option '-mapcs'
gcc: error: unrecognized command line option '-mno-sched-prolog'

SELinux is blocking userinit.sh is blocking commands

Hi there,
I'm having some difficulties in running some commands in userinit.sh due to SELinux.
system/etc/init.d/90userinit is invoking userinit.sh in /data/local/.
First they were blocked by SELinux. After running
Code:
chcon u:object_r:userinit_exec:s0 /system/etc/init.d/90userinit
chcon u:object_r:userinit_data_exec:s0 /data/local/userinit.sh
in Terminal, userinit.sh with the following content e.g.
Code:
#!/system/bin/sh
log -p i -t userinit "userinit start";
sysctl -w net.ipv6.conf.default.use_tempaddr=2
sysctl -w net.ipv6.conf.all.use_tempaddr=2
log -p i -t userinit "userinit end";
was executed, but sysctl -call within userinit.sh is blocked.
logcat:
Code:
avc: denied { net_admin } for pid=229 comm="sysctl" capability=12 scontext=u:r:sysinit:s0 tcontext=u:r:sysinit:s0 tclass=capability permissive=0
...
Q1: How do i properly set permissinons for sysctl now?
Q2: Is there a way to set proper permissions for all commands given in userinit.sh in generall?

Categories

Resources