not really a “bug” in ota_from_target_files

While building an OTA (Over The Air update) for an Android device I had the following error.

in SetPermissions
self.script.append('set_perm(%d, %d, 0%o, "%s");' % (uid, gid, mode, fn))
TypeError: %d format: a number is required, not NoneType


At first glance it  appears to be in in  edify_generator.py but this is where the “bug” triggers itself:


def recurse(item, current):
print "PREPRIMERO %s" % (item.name)
print "PRIMERO %s %d %d %d" % (item.name, item.uid, item.gid, item.mode) # ya aqui peta.
# current is the (uid, gid, dmode, fmode) tuple that the current
# item (and all its children) have already been set to.  We only
# need to issue set_perm/set_perm_recursive commands if we're
# supposed to be something different.

It usually works properly and the code is not faulty but since I’ve used a Chinese source some of the packages are not in an ASCII format.  The easiest solution is to rename those files and build the target files again.

I just renamed  注音仓颉输入法_1.0.apk and other similar apks.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s