patchrom icon indicating copy to clipboard operation
patchrom copied to clipboard

Cannot get ota_target_from_phone to work

Open jmoney4769 opened this issue 12 years ago • 2 comments

I am trying to build MIUI for the RAZR HD Developer edition (unlocked version) but, following the steps, I try to use "../tools/releasetools/ota_target_from_phone - r," but it is not working. First it was saying that it could not find ota_from_target_files so I changed the line OTA_FROM_TARGET_FILES=$TOOL_DIR/releasetools/ota_from_target_files to OTA_FROM_TARGET_FILES=../tools/releasetools/ota_from_target_files and actually found the file but, after running the command again, it said that there was a "key error." Here is the output after the error:

Build full ota package: /home/jmoney4769/patchrom/vanquish/stockrom.zip Traceback (most recent call last): File "../tools/releasetools/ota_from_target_files", line 76, in import common File "/home/jmoney4769/patchrom/tools/releasetools/common.py", line 42, in OPTIONS.search_path = os.path.join(os.environ["PORT_ROOT"], "tools"); File "/usr/lib/python2.7/UserDict.py", line 23, in getitem raise KeyError(key) KeyError: 'PORT_ROOT'

What can I do to make this work? If it makes a difference, there were also a couple errors that occurred:

Run getfilesysteminfo to build filesystem_config.txt cannot stat '/tools/releasetools/getfilesysteminfo': No such file or directory chmod: /system/xbin/getfilesysteminfo: No such file or directory ../tools/releasetools/ota_target_from_phone: line 176: /home/jmoney4769/patchrom/vanquish/out/target_files/META/filesystem_config.txt: No such file or directory cat: /home/jmoney4769/patchrom/vanquish/out/target_files/META/filesystem_config.txt: No such file or directory ../tools/releasetools/ota_target_from_phone: line 187: /home/jmoney4769/patchrom/vanquish/out/target_files/META/filesystem_config.txt: No such file or directory cat: /home/jmoney4769/patchrom/vanquish/out/target_files/META/tmp.txt: No such file or directory rm: cannot remove /home/jmoney4769/patchrom/vanquish/out/target_files/META/tmp.txt': No such file or directory Run getfilesysteminfo and recoverylink.py to recover symlink python: can't open file '/tools/releasetools/recoverylink.py': [Errno 2] No such file or directory rm: can't remove '/system/xbin/getfilesysteminfo': No such file or directory Build apkcerts.txt 2050 KB/s (216682 bytes in 0.103s) python: can't open file '/tools/apkcerts.py': [Errno 2] No such file or directory ../tools/releasetools/ota_target_from_phone: line 163: /home/jmoney4769/patchrom/vanquish/out/target_files/META/apkcerts.txt: No such file or directory ../tools/releasetools/ota_target_from_phone: line 165: /home/jmoney4769/patchrom/vanquish/out/target_files/META/temp.txt: No such file or directory cat: /home/jmoney4769/patchrom/vanquish/out/target_files/META/apkcerts.txt: No such file or directory mv: cannot stat/home/jmoney4769/patchrom/vanquish/out/target_files/META/temp.txt': No such file or directory Generate metadata used to build target files... cp: cannot stat /home/jmoney4769/patchrom/vanquish/out/target_files/META/apkcerts.txt': No such file or directory cp: cannot stat/home/jmoney4769/patchrom/vanquish/out/target_files/META/filesystem_config.txt': No such file or directory cp: cannot stat `/home/jmoney4769/patchrom/vanquish/out/target_files/RECOVERY/RAMDISK/etc/recovery.fstab': No such file or directory

jmoney4769 avatar Dec 23 '12 20:12 jmoney4769

I am getting this error too "KeyError: 'PORT_ROOT'" anyone did fix it ?

ihavenick avatar Apr 25 '13 15:04 ihavenick

../build/envsetup.sh

caffeine-cn avatar Mar 31 '15 08:03 caffeine-cn