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

Porting to Nothing-Spacewar (Nothing phone 1) #57

Open
arttLynx opened this issue Sep 21, 2024 · 18 comments
Open

Porting to Nothing-Spacewar (Nothing phone 1) #57

arttLynx opened this issue Sep 21, 2024 · 18 comments

Comments

@arttLynx
Copy link

Hello! I have Nothing phone 1, and I wanna install Kali Nethunter PRO on it.
I find your repo, and in bin/bootloader.sh i find support for my device.
Also on your page in postMarketOS I saw you have dualbooted pmos with debian phosh.
I supposed your debian is a mobian modified to kali nh pro, and you have it on your phone.

Could you tell please, how to run nethunter pro on nothing phone?

What i have done:

  1. clone your repo
  2. modify build.sh to add new option (specified with -t spacewar) in case "$device" in section with changing family to sm7325. All other options I left as in sdm45.
  3. Run build.sh and got an warning that package "sm7325-support" not found.

Should I compile it with specific kernel? If I should, how can I do it?

Help please!
Thanks in advance!

@Shubhamvis98
Copy link
Owner

You can compile the kernel source mentioned in the pmos wiki. It'll work then.

@arttLynx
Copy link
Author

Thanks, I'll try

@arttLynx
Copy link
Author

Could I use danila/spacewar-next instead spacewar? It seems to be newer

@Shubhamvis98
Copy link
Owner

Give it a try. I'm not sure about the "spacewar-next" branch

@arttLynx
Copy link
Author

I have built my kernel, now how I can integrate it to your script?
Should I need to make deb package or just change some lines in script?

@Shubhamvis98
Copy link
Owner

you have to create a deb package for the kernel and modify the script to install that package while generating the rootfs img file.
or
you can use prebuilt images and install kernel deb file and flash it in nothingphone1.

@arttLynx
Copy link
Author

Hello, I just created deb packages with kernel, and modified bin/bootloader.sh:

wget https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/4xRrAMgaJge00A -O kernel6.11.deb
wget https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/66glGA8dtjO7Qw -O kernel-libc.deb
wget https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/ugEm32jsdmvGww -O kernel-headers.deb
sudo dpkg -i kernel6.11.deb
sudo dpkg -i kernel-headers.deb
sudo dpkg -i kernel-libc.deb

# Append DTB to kernel
echo "Creating boot image for ${FULLMODEL}..."
cat /boot/vmlinuz-${KERNEL_VERSION} \
        /usr/lib/linux-image-${KERNEL_VERSION}/${SOC}-${VENDOR}-${FULLMODEL}.dtb > /tmp/kernel-dtb

And get following output:

Container debian failed with error code 6.
usermod: group 'bluetooth' does not exist
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.

Container debian failed with error code 6.
usermod: group 'feedbackd' does not exist
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.

Container debian exited successfully.
[*]Enabling kali plymouth theme
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.

Container debian failed with error code 1.
execv(plymouth-set-default-theme) failed: No such file or directory
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.

Container debian failed with error code 1.
execv(glib-compile-schemas) failed: No such file or directory
[+]Stage 6: Enable services
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit qrtr-ns.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit rmtfs.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit pd-mapper.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit tqftpserv.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit qcom-modem-setup.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit droid-juicer.service does not exist
Container debian failed with error code 1.
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.
Failed to enable unit: Unit greetd.service does not exist
Container debian failed with error code 1.
[*]Checking for custom script
[*]Tweaks and cleanup
░ Spawning container debian on /home/thomas/kali-spacewar/kali_rootfs_tmp.
░ Press Ctrl-] three times within 1s to kill container.

But image created successfuly. What should I do?
Thanks in advance again.

@arttLynx
Copy link
Author

Hello, my images was built successfully, so I created partition named "linux" ( like in your tutorial) and flashed image via fastboot. Also I flashed boot.img to slot B via orange fox. And when my NP booting at B slot, I can see at screen a rectangle with noise texture for 1-2 seconds, after it my phone reboots.

Why it is happened? Could you help me? Please!

Thanks in advance!

@Shubhamvis98
Copy link
Owner

Have you erased dtbo before booting?

@arttLynx
Copy link
Author

Yes, and I tried to do it again. same result...

@Shubhamvis98
Copy link
Owner

Then maybe you've missed some options in kernel.

@arttLynx
Copy link
Author

What kernel do you use?

@arttLynx
Copy link
Author

thanks! I find your repo with kernel

@arttLynx
Copy link
Author

Hello again. My phone stucks in fastboot. And I think my partition table is bad.
DTBO has been erased many times
I'm trying to flash stock rom to my phone via fastboot.
Could you please check my partition table?
Currently I use 2new_partition_table.txt .
I have 8/256 GB version.

Big thanks in advance!

2new_partition_table.txt
new_partition_table.txt
original_partition_table.txt

@arttLynx
Copy link
Author

Hi, I just unbrick my NP via "nothing phone unbrick tool"

@arttLynx
Copy link
Author

Hello, my i'm getting a warning when flashing rootfs to "linux" partititon
Warning: skip copying linux_b image avb footer (linux_b partition size: 0, linux_b image size: 139866537309640).
but as you can see this is not true.
Screenshot_2024-10-28_22-34-37
File size which adb specifies is very wrong, but it keeps writing.
When I flashed rootfs, boot.img, erased dtbo_b, and run NP, it was beginning loading, but stops on this image
image
and going back to reboot.

What is the problem? Do you know how it could be fixed?
Big Thanks in advance!

@Shubhamvis98
Copy link
Owner

Shubhamvis98 commented Oct 29, 2024

Can't see properly. Do you get the initramfs shell? Maybe there's something with the ramdisk.

@arttLynx
Copy link
Author

Could you please tell in more detail

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