Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'Crypto.Util.asn1' #6

Open
xxroot opened this issue Feb 19, 2022 · 2 comments
Open

ModuleNotFoundError: No module named 'Crypto.Util.asn1' #6

xxroot opened this issue Feb 19, 2022 · 2 comments

Comments

@xxroot
Copy link

xxroot commented Feb 19, 2022

android_universal$ ./makeramdisk.sh -filename boot.img
Traceback (most recent call last):
File "root/scripts/makeramdisk.py", line 17, in
from Library.utils import del_rw, getheader, run_command, rsa,
File "/home/sapphire/桌面/android_universal/android_universal/root/scripts/Library/utils.py", line 5, in
from Crypto.Util.asn1 import DerSequence
ModuleNotFoundError: No module named 'Crypto.Util.asn1'

@xxroot
Copy link
Author

xxroot commented Feb 19, 2022

win 10 :
makeramdisk.cmd -filename C:\Users\Administrator\Desktop\android_universal-master\boot.img
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\Util_raw_api.py", line 85, in
from cffi import FFI
ModuleNotFoundError: No module named 'cffi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "root\scripts\makeramdisk.py", line 17, in
from Library.utils import del_rw, getheader, run_command, rsa,
File "C:\Users\Administrator\Desktop\android_universal-master\root\scripts\Library\utils.py", line 6, in
from Crypto.PublicKey import RSA
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\PublicKey\RSA.py", line 38, in
from Crypto.IO import PKCS8, PEM
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\IO\PKCS8.py", line 44, in
from Crypto.IO._PBES import PBES1, PBES2, PbesError
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\IO_PBES.py", line 41, in
from Crypto.Hash import MD5, SHA1, SHA224, SHA256, SHA384, SHA512
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\Hash\MD5.py", line 23, in
from Crypto.Util.raw_api import (load_pycryptodome_raw_lib,
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\site-packages\Crypto\Util_raw_api.py", line 166, in
import ctypes
File "C:\Users\Administrator\Desktop\android_universal-master\Tools\python37\lib\ctypes_init
.py", line 7, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

@xxroot
Copy link
Author

xxroot commented Feb 19, 2022

$ ./makeramdisk.sh -filename boot.img

Makeramdisk Android v3.30 (c) B. Kerler 2019-2021

Linux/Mac detected.
32Bit detected
Target: Boot
AVBv2 signature detected.
VBMeta-Image-Hash: 6578b33cdfc9ad9aecbd38fc01ab6a42498f055912202b02a107babf9ec89ca6

Signature-RSA-Modulus (n): d804afe3d3846c7e0d893dc28cd31255e962c9f10f5ecc1672ab447c2c654a94b5162b00bb06ef1307534cf964b9287a1b849888d867a423f9a74bdc4a0ff73a18ae54a815feb0adac35da3bad27bcafe8d32f3734d6512b6c5a27d79606af6bb880cafa30b4b185b34daaaac316341ab8e7c7faf90977ab9793eb44aecf20bcf08011db230c4771b96dd67b604787165693b7c22a9ab04c010c30d89387f0ed6e8bbe305bf6a6afdd807c455e8f91935e44feb88207ee79cabf31736258e3cdc4bcc2111da14abffe277da1f635a35ecadc572f3ef0c95d866af8af66a7edcdb8eda15fba9b851ad509ae944e3bcfcb5cc97980f7cca64aa86ad8d33111f9f602632a1a2dd11a661b1641bdbdf74dc04ae527495f7f58e3272de5c9660e52381638fb16eb533fe6fde9a25e2559d87945ff034c26a2005a8ec251a115f97bf45c819b184735d82d05e9ad0f357415a38e8bcc27da7c5de4fa04d3050bba3ab249452f47c70d413f97804d3fc1b5bb705fa737af482212452ef50f8792e28401f9120f141524ce8999eeb9c417707015eabec66c1f62b3f42d1687fb561e45abae32e45e91ed53665ebdedade612390d83c9e86b6c2da5eec45a66ae8c97d70d6c49c7f5c492318b09ee33daa937b64918f80e6045c83391ef205710be782d8326d6ca61f92fe0bf0530525a121c00a75dcc7c2ec5958ba33bf0432e5edd00db0db33799a9cd9cb743f7354421c28271ab8daab44111ec1e8dfc1482924e836a0a6b355e5de95ccc8cde39d14a5b5f63a964e00acb0bb85a7cc30be6befe8b0f7d348e026674016cca76ac7c67082f3f1aa62c60b3ffda8db8120c007fcc50a15c64a1e25f3265c99cbed60a13873c2a45470cca4282fa8965e789b48ff71ee623a5d059377992d7ce3dfde3a10bcf6c85a065f35cc64a635f6e3a3a2a8b6ab62fbbf8b24b62bc1a912566e369ca60490bf68abe3e7653c27aa8041775f1f303621b85b2b0ef8015b6d44edf71acdb2a04d4b421ba655657e8fa84a27d130eafd79a582aa381848d09a06ac1bbd9f586acbd756109e68c3d77b2ed3020e4001d97e8bfc7001b21b116e741672eec38bce51bb4062331711c49cd764a76368da3898b4a7af487c8150f3739f66d8019ef5ca866ce1b167921dfd73130c421dd345bd21a2b3e5df7eaca058eb7cb492ea0e3f4a74819109c04a7f42874c86f63202b462426191dd12c316d5a29a206a6b241cc0a27960996ac476578685198d6d8a62da0cfece274f282e397d97ed4f80b70433db17b9780d6cbd719bc630bfd4d88fe67acb8cc50b768b35bd61e25fc5f3c8db1337cb349013f71550e51ba6126faeae5b5e8aacfcd969fd6c15f5391ad05de20e751da5b9567edf4ee426570130b70141cc9e019ca5ff51d704b6c0674ecb52e77e174a1a399a0859ef1acd87e
Signature-n0inv: 1440285869

!!!! Image seems to be signed by google test keys, yay !!!!
Unpacking image : boot.img to tmp

  • Unpacking initramfs to tmp/ramdisk
    Traceback (most recent call last):
    File "root/scripts/makeramdisk.py", line 850, in
    main()
    File "root/scripts/makeramdisk.py", line 846, in main
    rdm.go(args, BOOTPATH, param)
    File "root/scripts/makeramdisk.py", line 676, in go
    self.unpack_initfs("rd.gz", self.RAMDISK)
    File "root/scripts/makeramdisk.py", line 265, in unpack_initfs
    rdcpio = self.guz(os.path.join(self.RPATH, filename))
    File "root/scripts/makeramdisk.py", line 249, in guz
    file_content = f.read()
    File "/usr/lib/python3.8/gzip.py", line 292, in read
    return self._buffer.read(size)
    File "/usr/lib/python3.8/gzip.py", line 479, in read
    if not self._read_gzip_header():
    File "/usr/lib/python3.8/gzip.py", line 427, in _read_gzip_header
    raise BadGzipFile('Not a gzipped file (%r)' % magic)
    gzip.BadGzipFile: Not a gzipped file (b'07')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant