0x1iii1ii / PPPwn-Luckfox

PPPwn PS4 Exploit for Luckfox Pico Pro/Max/Plus/Mini
GNU General Public License v3.0
185 stars 21 forks source link

Luckfox Pico PLUS issues installing on NAND (workaround) #32

Open andregrillo opened 2 months ago

andregrillo commented 2 months ago

Hope this can help somebody else

I encountered some issues while attempting the NAND installation on the Luckfox Pico Plus model, which has less memory and storage compared to other models, making the installation process less straightforward.

Firstly, I removed the SD card to ensure I was booting from NAND. Upon booting, I faced errors like “Connection refused” when trying to connect via SSH. I discovered that the firmware version I had did not have SSH running.

To resolve this, I flashed the NAND with a new firmware version following the tutorial on the Luckfox website: Luckfox Pico Flash-burn image.

I downloaded the necessary image from this link: Luckfox Pico Plus Flash Folder, specifically the contents of the Luckfox_Pico_Plus_Flash folder, and followed the instructions on the wiki above. Just to let you know, the link for this firmware update is provided also in their wiki pages: Luckfox Pico SD Card Image Burning

After flashing the NAND, I checked my router to find the IP of my Luckfox Pico Plus and accessed it via SSH on port 22.

However, I encountered another problem: there was insufficient space to copy the PPPwn files to the device. Here's a summary of the space available:

df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs              67.1M     61.9M      5.2M  92% /
devtmpfs                 16.5M         0     16.5M   0% /dev
tmpfs                    16.6M         0     16.6M   0% /dev/shm
tmpfs                    16.6M     64.0K     16.6M   0% /tmp
tmpfs                    16.6M    524.0K     16.1M   3% /run
/dev/ubi4_0              22.4M     17.1M      5.3M  76% /oem
/dev/ubi5_0               4.5M     24.0K      4.5M   1% /userdata

The “/” partition had only 5.2MB available! :)

I initially tried copying the PPPwn files to the /tmp folder, which had more space, but this folder gets cleared upon reboot, and the PPPwn scripts require the files in the /root folder. So, this was not a good idea...

To find space, I examined the contents of the root partition using:

du -ahx / | sort -rh | head -n 20

This revealed that Python was using a lot of space:

125.3M  /
113.4M  /usr
90.9M   /usr/lib
53.8M   /usr/lib/python3.11
35.7M   /usr/lib/python3.11/site-packages
20.6M   /usr/lib/python3.11/site-packages/samba
15.0M   /usr/lib/samba
13.0M   /usr/bin
11.3M   /usr/lib/python3.11/site-packages/samba/dcerpc
5.8M    /bin
5.4M    /usr/libexec
5.2M    /usr/lib/python3.11/site-packages/samba/tests
4.0M    /usr/lib/libpython3.11.so.1.0
3.9M    /usr/lib/python3.11/site-packages/setuptools
3.8M    /usr/sbin
3.3M    /usr/lib/libndr-standard.so.0.0.1
3.3M    /bin/gdb
3.2M    /usr/lib/python3.11/ensurepip/_bundled
3.2M    /usr/lib/python3.11/ensurepip
2.8M    /usr/libexec/samba

I made a backup (not needed) of the Python folder (/usr/lib/python3.11) and then deleted it:

rm -rf /usr/lib/python3.11

As we are not using Python in the PPPwn process, I did not see problems removing it.

This provided enough space to copy the PPPwn folder to the Luckfox Pico. From this point, I followed the instructions in the README.md to install the new NAND version successfully!

I also noticed that the NAND version is significantly faster than the one for SD cards. The overall performance and responsiveness of the Luckfox Pico improved dramatically, making it much more efficient.

I hope this helps!

Regis242 commented 2 months ago

@andregrillo Tu branches lCF

Regis242 commented 2 months ago

@andregrillo You connect the luckfox to the network to flash its nand?

andregrillo commented 2 months ago

Hey @Regis242 , sorry for the late reply. You don't need network access to flash the nand. It's done using the USB connection to your PC. Just follow the official Luckfox wiki as I mentioned in my post above.