meefik / busybox

BusyBox for Android
https://meefik.github.io/busybox
GNU General Public License v2.0
1.43k stars 254 forks source link

Busybox 1.31 Install error on Android 9 -- SOLVED #93

Open taichichuan opened 4 years ago

taichichuan commented 4 years ago

OK, I managed to solve the installation issue with Android 9 on the Samsung Galaxy Tab S6.

Here's how I did it:

  1. root the tablet by installing twrp, dm_verity and magisk
  2. boot into Android
  3. install root_checker and verify that the device is rooted
  4. install Meefik's busybox but don't run the internal installer

From adb shell session or connectbot or other terminal application (log in and su)

  1. cd /data/data/ru.meefik.busybox/files/scripts

  2. ../bin/vi install.sh change busybox mount -o rw,remount /system to busybox mount -o rw,remount /

    6a. Make sure to make the same sort of correction to the **remove.sh** script
  3. Make sure that /system is still writable mount -o rw,remount /

  4. chmod 777 /system/xbin

  5. Now, run the internal installer for busybox app and it should work and copy busybox and set symlinks

  6. chmod 755 /system/xbin

  7. reset the /system to ro mount -o ro,remount /

    Meefik's busybox is now installed.

mspacek commented 4 years ago

Thanks! This worked perfectly for me on my mata device (Essential PH-1) running LineageOS 16.0 (Android 9). I was getting the Remounting /system to rw . . . fail error. Not any more. @taichichuan maybe add a note that the same should be done for the remove.sh script.

mspacek commented 4 years ago

Also, see #72

Erich-Chen commented 4 years ago

It works to me too. Thanks. The only difference is that I need to mkdir /system/xbin manually before the step 8.

cyfrost commented 4 years ago

This worked for me, too. Thanks!

(off-topic but just wanted to share what I discovered just now. Android 10's toybox ships with few binaries removed --viz curl, ssh, sftp, start-ssh, tracepath6. I was relying on curl in a Tasker profile that fetches the sunset/sunrise times to do various other actions but since curl wasn't found in /system/bin my Tasker profiles broke. I used Terminal Emulator to see if this was a Tasker issue but turns out /system/bin is missing a few important binaries (probably for security?) that were present in Pie but removed in 10. So I thought if Meefik's busybox could bring these applets back and have them symlinked under /system/xbin but Meefik's busybox applets do not include curl. So I compiled the binary for aarch64, placed it under /system/bin manually, chown'ed for shell:shell, set +x bit and everything was working fine there-after :))

ineedhacker12345 commented 4 years ago

Here it does not have this 'files' folder, only cache and code_cache

rikka0w0 commented 4 years ago

Works, confirmed on Huawei Mate 9 Pro EMUI9.0.1 Android 9 + Magisk

Casper-09 commented 4 years ago

also works on Android 10 + Magisk

snug commented 3 years ago

Hey @taichichuan (or anyone else). Having a bit of trouble with this, could anyone point me in the right direction?

Attempting to create the /system/xbin folder as @Erich-Chen mentioned but having no luck. If created using termux su, the command doesn't finish and the tablet eventually softlocks. Have spent a lot of time trying to figure this out and stuck!

annihat commented 3 years ago

@snug as I recall the su in Termux is a busybox link, try using the one that came with your root package (probably /system/bin/su but check first)

ls -l `which su` should tell you for certain which one you're using (note the back-ticks)

snug commented 3 years ago

Hey @annihat,

Thanks for your response! Checked this out and was using the termux version. As such, I installed a terminal emulator and as a result get this now instead: lrwxrwxrwx 1 root root 8 1970-02-11 19:10 /sbin/su -> ./magisk

Running mkdir /system/xbin after mounting /system still softlocks the system though. Have also tried running mount -o rw,remount /sbin/magisk/mirror/system_root which also softlocks.

Are there any other options that I can try? Would really love a chroot of arch on my eink tablet instead of just a proot. Would make for a much smoother experience.

Thanks again for your help :)

StaticallyTypedRice commented 3 years ago

OK, I managed to solve the installation issue with Android 9 on the Samsung Galaxy Tab S6.

Here's how I did it:

1. root the tablet by installing twrp, dm_verity and magisk

2. boot into Android

3. install root_checker and verify that the device is rooted

4. install Meefik's busybox but don't run the internal installer

From adb shell session or connectbot or other terminal application (log in and su)

1. **cd /data/data/ru.meefik.busybox/files/scripts**

2. **../bin/vi install.sh**
   change     **busybox mount -o rw,remount /system**
   to                **busybox mount -o rw,remount /**

6a. Make sure to make the same sort of correction to the remove.sh script

1. Make sure that /system is still writable
   **mount -o rw,remount /**

2. **chmod 777 /system/xbin**

3. Now, run the internal installer for busybox app and it should work and copy busybox and set symlinks

4. **chmod 755 /system/xbin**

5. reset the /system to ro
   **mount -o ro,remount /**

Meefik's busybox is now installed.

Working on Fairphone 3+ with /e/ OS rooted by Magisk!

rardcode commented 3 years ago

I've this problem in android 11. It works to me too. Thanks.

naphelge commented 1 year ago

Not sure if anything has changed since first posted. I am trying to install busybox on android 9 with Magisk. All the steps above work fine, but when I run internal install on busybox I always get I/O error when app script tries to create busybox.

If I tsu with termux or just su in another term app, mount -o rw,remount / and try mkdir /system/xbin/busybox I get a read I/O error as well.

So I am not sure whether or not the issue is something new different, being a couple of years later after this post was originally posted. Any ideas, suggs or advice much appreciated.

DocMAX commented 1 year ago

any idea why i get this?

Jelly2:/ # mkdir -p /system/xbin/busybox
mkdir: '/system/xbin': No space left on device
cheako commented 1 year ago

There is another layer, this Lenovo tablet has 0x4000 ro filesystem flag. I think it's for shared_blocks. I'll keep working on it, but I need a hand.

Edit: the filesystem looked full 2 me, so there is nowhere to put stuff anyways. I'll look for what I can safely dump.

HectorLee1992 commented 1 month ago

any idea why i get this?

Jelly2:/ # mkdir -p /system/xbin/busybox
mkdir: '/system/xbin': No space left on device

I also have the same issue.... any new solution?