badjtsx / ShrinkLDPlayer

Instructions on shrinking LDPlayer instances (or any emulator that uses vmdk).
1 stars 0 forks source link

/system/bin/sh: su: not found #1

Open Wrascon opened 3 months ago

Wrascon commented 3 months ago

Bat version didn't work. I try figured out it in Manual. On step 7 I have this error. In other words now I can't shrink empty space on my emulator with free 15 GB for give it back to my PC.

C:\LDPlayer\LDPlayer9>adb devices List of devices attached emulator-5554 device

C:\LDPlayer\LDPlayer9>adb shell star2qltechn:/ $ su /system/bin/sh: su: not found 127|star2qltechn:/ $ su /system/bin/sh: su: not found 127|star2qltechn:/ $

ldplayer manage disk ldplayer vmdk

badjtsx commented 3 months ago

Do you have root permission activated? If not, go to Settings > Others and enable root permission.

Wrascon commented 3 months ago

Now it runs but I didn't see any changes.

C:\LDPlayer\LDPlayer9>adb devices List of devices attached emulator-5554 device

C:\LDPlayer\LDPlayer9>adb shell "su -c 'cd /sdcard && dd if=/dev/zero of=fillfile bs=1048576 count=1024'" 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 12.142 secs (88432039 bytes/sec)

C:\LDPlayer\LDPlayer9>adb shell rm /sdcard/fillfile rm: /sdcard/fillfile: No such file or directory

C:\LDPlayer\LDPlayer9>pause

image

badjtsx commented 3 months ago

Could you run ls before doing step 10 and check whether or not a file called fillfile is there? it should not say rm: /sdcard/fillfile: No such file or directory

Did you run both bat files?

Also you can increase the count in dd if=/dev/zero of=fillfile bs=1048576 count=1024 from 1024 (which is 1GB) to however much space you want to clear. I personally always set it to a bit bigger than what the vmdk size is (ex: if the vmdk is 15gb i set it to 16-17 gb (16000-17000).

IIcuXoKLoyH commented 3 months ago

Hi) Is it possible to somehow have several emulators at once? I have the quantity, today it took 10 hours for 200 devices...

badjtsx commented 3 months ago

Hi) Is it possible to somehow have several emulators at once? I have the quantity, today it took 10 hours for 200 devices...

ADB is only able to run on one device at a time but you could use adb -s "device" shell, replace "device" with the specific emulator you want to shrink (adb devices lists them for you). This way you can access the shell of multiple devices but you still need to do everything yourself.

You might be able to create a batch file to do it for you if you're able to run 200 emulators at the same time.