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

Error run on base Chroot linux #103

Open
NusaStudio opened this issue Oct 29, 2022 · 3 comments
Open

Error run on base Chroot linux #103

NusaStudio opened this issue Oct 29, 2022 · 3 comments

Comments

@NusaStudio
Copy link

Im try unpack on my android terminal.
And get many error.Its posible run on android 🤔

Logs:
'uname -a
root@kali:/# uname -a Linux kali 4.9.190+ #1 SMP PREEMPT Tue Mar 8 16:07:16 CST 2022 armv7l GNU/Linux
root@kali:/# ls
bin etc media root srv usr
boot external_sd mnt run sys var
captures home opt sbin system
dev lib proc sdcard tmp
root@kali:/# cd home
root@kali:/home# ls
booteditor kali
root@kali:/home# cd booteditor
root@kali:/home/booteditor# ls
LICENSE.md bbootimg gradlew src
README.md boot.img gradlew.bat tools
aosp build integrationTest.py
root@kali:/home/booteditor# ./gradlew unpack
23:54:54.581 [main] WARN cfig.packable.PackableLauncher - [boot.img] will be handled by [BootImgParser]
23:54:55.078 [main] WARN cfig.packable.PackableLauncher - 'unpack' sequence initialized
23:54:55.102 [main] INFO cfig.packable.IPackable - deleting build/unzip_boot/ ...
23:54:55.140 [main] INFO Helper - deleting uiderrors
23:54:55.178 [main] INFO cfig.packable.BootImgParser - header version 2
23:54:56.092 [main] WARN cfig.bootimg.v2.BootHeaderV2 - BootImgHeader constructor
23:54:56.195 [main] INFO cfig.Avb - python aosp/avb/avbtool.v1.2.py verify_image --image boot.img
Verifying image boot.img using embedded public key
vbmeta: Successfully verified footer and SHA256_RSA2048 vbmeta struct in boot.img
Traceback (most recent call last):
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 4877, in
tool.run(sys.argv)
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 4682, in run
args.func(args)
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 4816, in verify_image
self.avb.verify_image(args.image.name, args.key,
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 2573, in verify_image
elif not desc.verify(image_dir, image_ext, expected_chain_partitions_map,
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 1678, in verify
image = ImageHandler(image_filename, read_only=True)
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 759, in init
self._read_header()
File "/home/booteditor/aosp/avb/avbtool.v1.2.py", line 774, in _read_header
self._image = open(self.filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'recovery.img'
23:54:57.258 [main] ERROR cfig.Avb - boot.img failed integrity check by "python aosp/avb/avbtool.v1.2.py verify_image --image boot.img"
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:108)
Caused by: java.io.IOException: Cannot run program "aosp/make/tools/extract_kernel.py" (in directory "."): error=13, Permission denied
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at java.base/java.lang.Runtime.exec(Runtime.java:592)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:279)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at cfig.utils.KernelExtractor.run(KernelExtractor.kt:48)
at cfig.bootimg.Common$Companion.parseKernelInfo(Common.kt:114)
at cfig.bootimg.Common$Companion.dumpKernel(Common.kt:122)
at cfig.bootimg.v2.BootV2.extractImages(BootV2.kt:192)
at cfig.packable.BootImgParser.unpack(BootImgParser.kt:46)
... 8 more
Caused by: java.io.IOException: error=13, Permission denied
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:340)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 20 more
root@kali:/home/booteditor#'

@NusaStudio
Copy link
Author

NusaStudio commented Oct 29, 2022

IntegrationTest logs:

root@kali:/home/booteditor# ./integrationTest.py
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/recovery_image_from_s-trace ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/recovery_image_from_s-trace
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/boot_img_from_gesangtome ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/boot_img_from_gesangtome
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/issue_47 ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/issue_47
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/issue_52 ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/issue_52
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/issue_54 ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/issue_54
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/5.0_fugu_lrx21m ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/5.0_fugu_lrx21m
2022-10-29 04:25:06 INFO TEST - Enter src/integrationTest/resources/6.0.0_bullhead_mda89e ...
2022-10-29 04:25:06 INFO TEST - Leave src/integrationTest/resources/6.0.0_bullhead_mda89e
2022-10-29 04:25:06 INFO TEST - clean up ...
2022-10-29 04:25:06 INFO TEST - rm boot.img
Traceback (most recent call last):
File "/home/booteditor/./integrationTest.py", line 182, in
main()
File "/home/booteditor/./integrationTest.py", line 137, in main
cleanUp()
File "/home/booteditor/./integrationTest.py", line 45, in cleanUp
[deleteIfExists(item) for item in [
File "/home/booteditor/./integrationTest.py", line 45, in
[deleteIfExists(item) for item in [
File "/home/booteditor/./integrationTest.py", line 30, in deleteIfExists
raise
RuntimeError: No active exception to reraise
root@kali:/home/booteditor#

@cfig
Copy link
Owner

cfig commented Oct 31, 2022

Hi @NusaStudio ,
Did you updated the submodules before running integration tests?

git submodule init
git submodule update

integration tests need additional test resources to proceed.

BTW, are you running "Kali Nethunter" on Android phone? I've never tried that but it sounds interesting

@cfig
Copy link
Owner

cfig commented Oct 31, 2022

Just now i had a try with Kali nethunter on top of Pixel 3:

1

integration tests can start and fail at a case(which should be checked a little later).

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

2 participants