MiCode / patchrom

Use disassemble/assemble technology to porting miui to misc android devices
http://micode.net/forum-55-1.html
494 stars 370 forks source link

KeyError: "There is no item named 'SYSTEM/build.prop' in the archive" #24

Closed iBotPeaches closed 12 years ago

iBotPeaches commented 12 years ago
 File "/home/peaches/patchrom/tools/releasetools/sign_target_files_apks", line 354, in <module>
    main(sys.argv[1:])
  File "/home/peaches/patchrom/tools/releasetools/sign_target_files_apks", line 341, in main
    SignApks(input_zip, output_zip, apk_key_map, key_passwords)
  File "/home/peaches/patchrom/tools/releasetools/sign_target_files_apks", line 162, in SignApks
    new_data = RewriteProps(data)
  File "/home/peaches/patchrom/tools/releasetools/sign_target_files_apks", line 194, in RewriteProps
    assert len(pieces) == 5
AssertionError
Build full ota package: /home/peaches/patchrom/m0/out/fullota.zip
unzipping target target-files...
using device-specific extensions in .
Traceback (most recent call last):
  File "/home/peaches/patchrom/tools/releasetools/ota_from_target_files", line 848, in <module>
    main(sys.argv[1:])
  File "/home/peaches/patchrom/tools/releasetools/ota_from_target_files", line 816, in main
    WriteFullOTAPackage(input_zip, output_zip)
  File "/home/peaches/patchrom/tools/releasetools/ota_from_target_files", line 370, in WriteFullOTAPackage
    metadata = {"post-build": GetBuildProp("ro.build.fingerprint", input_zip),
  File "/home/peaches/patchrom/tools/releasetools/ota_from_target_files", line 472, in GetBuildProp
    bp = z.read("SYSTEM/build.prop")
  File "/usr/lib/python2.7/zipfile.py", line 869, in read
    return self.open(name, "r", pwd).read()
  File "/usr/lib/python2.7/zipfile.py", line 892, in open
    zinfo = self.getinfo(name)
  File "/usr/lib/python2.7/zipfile.py", line 859, in getinfo
    'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'SYSTEM/build.prop' in the archive"

My keys look fine though :/

ro.build.description=d2uc-user 4.0.4 IMM76D I747UCALEM,release-keys
ro.build.fingerprint=/samsung/d2uc/d2att:4.0.4/IMM76D/I747UCALEM:user/ota-rel-keys,release-keys
ro.build.characteristics=default
ro.build.display.id=cm_d2att-userdebug 4.0.4 IMM76L eng.jenkins.20120710.234202 test-keys
ro.build.version.incremental=fullota.peaches.20120711.105905
yu88my commented 12 years ago

"RewriteProps assert len(pieces) == 5", it need five pieces in "ro.build.description", but there are just four pieces in your's , "d2uc-user", "4.0.4", "IMM76D" and "I747UCALEM,release-keys" ("ro.build.description=d2uc-user 4.0.4 IMM76D I747UCALEM,release-keys", separates by space, in build.prop). So you should add one piece in your's, for example: ro.build.description=d2uc-user 4.0.4 IMM76D unknown I747UCALEM,release-keys

iBotPeaches commented 12 years ago

Thanks. I thought I747UCALEM,release-keys was 2 different pieces.