Hello all! I'm building bullhead on BlissRoms. Currently I'm running into this issue where userdata.img generation fails:
Code:
++++ userdata ++++
creating userdata.img...
Running: mkf2fsuserimg.sh /home/users/ideaman924/bliss/p9.0/out/target/product/bullhead/obj/PACKAGING/target_files_intermediates/bliss_bullhead-target_files-2ab3584229/IMAGES/userdata.img 11649679360 -f /tmp/tmpBxgXxI -s /home/users/ideaman924/bliss/p9.0/out/target/product/bullhead/obj/PACKAGING/target_files_intermediates/bliss_bullhead-target_files-2ab3584229/META/file_contexts.bin -t data -T 1230786000 -L data
Traceback (most recent call last):
File "build/make/tools/releasetools/add_img_to_target_files", line 825, in <module>
main(sys.argv[1:])
File "build/make/tools/releasetools/add_img_to_target_files", line 819, in main
AddImagesToTargetFiles(args[0])
File "build/make/tools/releasetools/add_img_to_target_files", line 744, in AddImagesToTargetFiles
AddUserdata(output_zip)
File "build/make/tools/releasetools/add_img_to_target_files", line 336, in AddUserdata
succ = build_image.BuildImage(user_dir, image_props, img.name)
File "/home/users/ideaman924/bliss/p9.0/build/make/tools/releasetools/build_image.py", line 750, in BuildImage
(mkfs_output, exit_code) = RunCommand(build_command)
File "/home/users/ideaman924/bliss/p9.0/build/make/tools/releasetools/build_image.py", line 67, in RunCommand
env=env_copy)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
ninja: build stopped: subcommand failed.
07:57:36 ninja failed with: exit status 1
#### failed to build some targets (42:25 (mm:ss)) ####
real 42m25.455s
user 550m32.002s
sys 31m15.947s
[email protected]:~/bliss/p9.0$
These two commands fix it:
Code:
m -j brillo_update_payload
m -j otatools
But I'm not sure what is breaking. Is there a way to fix this behavior without issuing those commands periodically?
Thread closed at OP request
Related
I'm looking at getting into rom cooking with this latest cyanogen fiasco, but i'm having errors getting repo set up, and i'm wondering if it's my configuration.
I'm running OS X 10.5.8, everything is updated, and i've followed the whole guide from source.android.com, up to a certain point.
when i run "repo init -u git://android.git.kernel.org/platform/manifest.git", i get this error:
Code:
Traceback (most recent call last):
File "/Users/aaron/bin/repo", line 595, in <module>
main(sys.argv[1:])
File "/Users/aaron/bin/repo", line 562, in main
_Init(args)
File "/Users/aaron/bin/repo", line 181, in _Init
_CheckGitVersion()
File "/Users/aaron/bin/repo", line 210, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 593, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/subprocess.py", line 1079, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
anyone else have this error or know how to correct it?
side note, I made a partition on an external hard drive for nabbing the source, i'm CDing to the /Volumes/Android/mydroid before i run the command. ( the partition is HFS journaled/case sensitive) and have all the port stuff installed onto my Mac hard drive
Nevermind, my path settings aren't sticking for some reason. resetting the path solved my problems
Hi,
I'm creating a simple update pack to replace fonts and apn
all very basic but for some reason i can get a clean run of a script that i want to run
this is the script
Code:
#!/sbin/sh
#
# This script gets 1 parameter - the directory which the new files are in (under /cache)
# he then go over each of them, finding where thier matching file in /system and /data are
# and replace them with the new file
# after going over the list of files we then delete the /cache/<name_of_dir>
#
# the purpose of this script is to not hardcoded the path of files we want to replace
#
# Created by dmanbuhnik
# Version 0.5 (12/03/2010)
find_replace_file() {
nfile=$1
dir=$2
echo $nfile
echo $dir
rfile=`find /system -name "$nfile"`
cp /cache/$dir/$nfile rfile
rfile=`find /data -name "$1"`
cp /cache/$dir/$nfile rfile
}
mount /system
mount /data
dir=$1
echo $dir
cd /cache/$dir
pwd
for from_list in * ; do
echo $from_list
find_replace_file $from_list $dir
done
rm -rf /cache/$dir
exit 0
and i'm calling it from the upate-script by:
Code:
show_progress 0.1 0
copy_dir PACKAGE:cache CACHE:
show_progress 0.2 0
run_program PACKAGE:listInstall.sh new_fonts
show_progress 0.2 0
run_program PACKAGE:listInstall.sh new_apn
but i get failures when trying to flash it:
Code:
E:Error in listInstall.sh
(Status 65280)
E:Failure at line 5:
run_program PACKAGE:listInstall.sh new_fonts
when running the script line by line - all good
but when I try to run the script i get weird failures:
Code:
: not foundh: line 12:
new_apn
': No such file or directory
': No such file or directory
: not foundh: line 22: }
: not foundh: line 23:
in /etc/fstabind /system
in /etc/fstabind /data
: not foundh: line 26:
new_apn
: not foundh: line 29:
/sdcard/g.sh: cd: line 30: can't cd to /cache/new_apn
: not foundh: line 31: pwd
/sdcard/g.sh: line 32: syntax error: unexpected word (expecting "do")
please help
The recovery images use execv() to call the program. This means that shell scripts are not supported.
that doesn't make sense, cyan runs the 'backuptools.sh' in the recovery (the script that backup and restore your close source application)
dmanbuhnik said:
that doesn't make sense, cyan runs the 'backuptools.sh' in the recovery (the script that backup and restore your close source application)
Click to expand...
Click to collapse
Indeed, you're correct. I was looking at the wrong code
Anyway, make sure that the script runs outside of the updatescript properly. Esp. be vary ofc the commands you use. The recovery environment is based on busybox versions of the commands, and the might not behave exactly the same way you expect them to do.
i tried running it as a normal script in recovery env
you can see that errors in the last part of my first thread
i don't understand why they are errors, as i said when running the script commands manually (line by line) everything is great, so i know the shell support the commands but
btw, thank you for you help
help? pls....
Did you get this fixed? I'm not familiar with shell scripting, hence I might be more hindrance than help, but no one else is posting, so...
1) I'd be inclined to rewrite the script to handle errors, rather than just assume they won't occur.
2) Why not upload a copy of your update.zip & maybe someone will try to test it? (obviously after backing up their own /system & /data)
3) In the new_font case, say, I understand looking in /system but why/where is there also a copy expected within /data to replace?
4) In find_replace_file, why is the 2nd -name pattern "$1" rather than "$nfile"
5) In find_replace_file, why is the destination for both cp's rfile & not $rfile?
not yet.
1) no problem but i can't seems to even run the script correctly, after i do i will handle everything
2) the update.zip is not important, the update-script is not running as it should in the recovery as a stand alone script, so lets fix that first and then launch it from the update.zip
3) i'm building this script for the future, i want to be ready if someone will decided to move the directories around
4) you are correct, i will fix that
5) mmm, that looks stupid... let me fix that
ok, no change
running the script in the recovery with:
Code:
/sdcard/listInstall new_fonts
will get:
Code:
/sbin/sh: ./listInstall.sh: not found
if i try with 'sh /sdcard/listInstall':
Code:
: not found.sh: line 12:
': No such file or directory
': No such file or directory
: not found.sh: line 22: }
: not found.sh: line 23:
in /etc/fstabind /system
in /etc/fstabind /data
: not found.sh: line 26:
: not found.sh: line 29:
listInstall.sh: cd: line 30: can't cd to /cache/
: not found.sh: line 31: pwd
listInstall.sh: line 32: syntax error: unexpected word (expecting "do")
dmanbuhnik said:
3) i'm building this script for the future, i want to be ready if someone will decided to move the directories around
Click to expand...
Click to collapse
The script is looking for files in locations in which they currently don't exist (as you say above, for the future), but then assumes find has returned the location of a file. You need to catch & deal with the cases where it says the file doesn't exist.
A general rule in programming is to construct your own code with rigour, but make no assumptions about your input being well behaved, including data you receive from external function calls. An obvious corollary is that you must handle errors.
Generous debug info is always a good idea when you get into a situation like this too.
BTW I've been stuck staring at even shorter sections of my own code in the past which I 'knew' should work. It's all part of the fun
dmanbuhnik said:
not yet.
1) no problem but i can't seems to even run the script correctly, after i do i will handle everything
2) the update.zip is not important, the update-script is not running as it should in the recovery as a stand alone script, so lets fix that first and then launch it from the update.zip
3) i'm building this script for the future, i want to be ready if someone will decided to move the directories around
4) you are correct, i will fix that
5) mmm, that looks stupid... let me fix that
ok, no change
running the script in the recovery with:
Code:
/sdcard/listInstall new_fonts
will get:
Code:
/sbin/sh: ./listInstall.sh: not found
if i try with 'sh /sdcard/listInstall':
Code:
: not found.sh: line 12:
': No such file or directory
': No such file or directory
: not found.sh: line 22: }
: not found.sh: line 23:
in /etc/fstabind /system
in /etc/fstabind /data
: not found.sh: line 26:
: not found.sh: line 29:
listInstall.sh: cd: line 30: can't cd to /cache/
: not found.sh: line 31: pwd
listInstall.sh: line 32: syntax error: unexpected word (expecting "do")
Click to expand...
Click to collapse
I know this is old, but I was wondering if anyone can solve this issue.
I have a similiar problem.
If I run the following from recovery after mounting /system:
Code:
if [ -s /system/etc/data2sd.on ]; then echo Presemt; else echo No; fi;
I get the output: Present
However, if I put it in a script:
Code:
#!/sbin/sh
if [ -s /system/etc/data2sd.on ];
then
mkdir /tmp/data2sd ;
cp /system/etc/data*.* /tmp/data2sd/ ;
echo "Data2SD exists" > /tmp/data2sd.os ;
else
#Do nothing
echo "Do nothing" ;
fi;
Code:
I get this error:
/tmp # sh /tmp/test.sh
sh /tmp/test.sh
: not foundh: line 10:
: not foundh: line 10:
Do nothing
: not foundh: line 10:
/tmp #
The line 10 seems to be fi;
Can anyone good at this explain?
Hello, i am trying to build a rom for the Nexus 5.
Followed the steps to create a environment. Synced the repo (android-4.4_r1.2).
Ubuntu, JDK6 etc etc.
Java is working well?
Code:
which java
/usr/bin/java
which javac
/usr/bin/javac
which jar
/usr/bin/jar
http://source.android.com/source/index.html
I am getting this error:
Code:
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1065, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1061, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 996, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 507, in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Gyp action: third_party_WebKit_Source_core_core_derived_sources_gyp_generate_test_support_idls_target_Settings (out/target/product/hammerhead/obj/GYP/shared_intermediates/blink/SettingsMacros.h)
make: *** [out/target/product/hammerhead/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1
Is the error because of hammerhead won't work with the android-4.4_r1.2 branche?
Code:
KRT16S android-4.4_r1.2 Latest KitKat version, Nexus 7 (flo/deb/grouper/tilapia), Nexus 4, Nexus 10
Can somebody help me?
Probably it's that...try with 4.4_r1.1 branch
I got the same error for android 4.4 r1.2
have you solve this problem?
jianggau said:
I got the same error for android 4.4 r1.2
have you solve this problem?
Click to expand...
Click to collapse
Did you try adding javah to the path?
I'm building cm12.1 for oneplus x and stuck by followed problem.
Code:
target StaticLib: skia_skia_library_gyp (/home/axlecho/cm/out/target/product/generic/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a)
Gyp timestamp: /home/axlecho/cm/out/target/product/generic/obj/GYP/third_party_WebKit_Source_core_inspector_protocol_sources_gyp_intermediates/inspector_protocol_sources.stamp
mkdir -p /home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core; cd external/chromium_org/third_party/WebKit/Source/core; python ../build/scripts/rule_bison.py css/parser/CSSGrammar.y "/home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core" bison
mkdir -p /home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core; cd external/chromium_org/third_party/WebKit/Source/core; python ../build/scripts/rule_bison.py xml/XPathGrammar.y "/home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core" bison
Gyp action: Generating IDL files for constructors on global objects for core_global_constructors_idls (/home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core/WindowCoreConstructors.idl)
Traceback (most recent call last):
File "../build/scripts/rule_bison.py", line 82, in <module>
Traceback (most recent call last):
File "../build/scripts/rule_bison.py", line 82, in <module>
returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp])
File "/usr/lib/python2.7/subprocess.py", line 522, in call
returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp])
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [/home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core/CSSGrammar.cpp] 错误 1
make: *** 正在等待未完成的任务....
make: *** [/home/axlecho/cm/out/target/product/generic/obj/GYP/shared_intermediates/blink/core/XPathGrammar.cpp] 错误 1
#### make failed to build some targets (14:34 (mm:ss)) ####
Hi,
Thanks for using XDA Assist
Try posting your question in this thread: [GUIDE][COMPLETE] Android ROM Development From Source To End
Good luck!
Thinks for guidance,I have solve my problem by follow following the offical build guidance --Establishing a Build Environment.
I'm sorry for ask a problem rashly.
No prob
Glad to know that you got it fixed :good:
Thread closed.
Hi, I get following error every time I try to build CM13 from source:
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 53, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 49, in main
common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img)
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 1443, in MakeRecoveryPatch
_, _, patch = d.ComputePatch()
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 1131, in ComputePatch
p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 87, in Run
return subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
build/core/Makefile:1047: recipe for target '/home/jens/CM/cm13.0/out/target/product/bacon/system/bin/install-recovery.sh' failed
make: *** [/home/jens/CM/cm13.0/out/target/product/bacon/system/bin/install-recovery.sh] Error 1
#### make failed to build some targets (02:48:32 (hh:mm:ss)) ####
Anyone willing to help?
zeetroman said:
Hi, I get following error every time I try to build CM13 from source:
Traceback (most recent call last):
File "./build/tools/releasetools/make_recovery_patch", line 53, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/make_recovery_patch", line 49, in main
common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img)
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 1443, in MakeRecoveryPatch
_, _, patch = d.ComputePatch()
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 1131, in ComputePatch
p = Run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/home/jens/CM/cm13.0/build/tools/releasetools/common.py", line 87, in Run
return subprocess.Popen(args, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
build/core/Makefile:1047: recipe for target '/home/jens/CM/cm13.0/out/target/product/bacon/system/bin/install-recovery.sh' failed
make: *** [/home/jens/CM/cm13.0/out/target/product/bacon/system/bin/install-recovery.sh] Error 1
#### make failed to build some targets (02:48:32 (hh:mm:ss)) ####
Anyone willing to help?
Click to expand...
Click to collapse
Where to find your device tree, e.g. on github?
From cyanogenmod's github, yes.
zeetroman said:
From cyanogenmod's github, yes.
Click to expand...
Click to collapse
Here you will find the solution: http://forum.xda-developers.com/showthread.php?p=64482736
spezi77 said:
Here you will find the solution: http://forum.xda-developers.com/showthread.php?p=64482736
Click to expand...
Click to collapse
I found a solution earlier but thanks anyway ?
Sent from my A0001 using XDA Free mobile app
zeetroman said:
I found a solution earlier but thanks anyway
Sent from my A0001 using XDA Free mobile app
Click to expand...
Click to collapse
How did you solve the problem? I am getting the same error while building CM13 for Nexus 5X.
After including the vendor files for my phone the build was good ?