Advertisement
metalx1000

Cross Compile Busybox for ARM Android

Feb 9th, 2023 (edited)
1,734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #required dependences
  2. sudo apt install gcc-arm-linux-gnueabi libncurses5-dev gawk
  3.  
  4. #get source
  5. apt-get source busybox
  6. #or
  7. apt-src install busybox #this will also get all needed dependencies
  8. #or  https://busybox.net/downloads/
  9. cd busybox-*
  10.  
  11. #configure
  12. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- defconfig
  13. #set static
  14. echo "CONFIG_STATIC=y" >> .config
  15. #compile
  16. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j $(nproc)
  17. #check compiled
  18. file busybox
  19.  
  20. #push to phone/tablet
  21. adb push busybox /data/local/tmp/
  22.  
  23. #setup links for use
  24. adb shell "/data/local/tmp/busybox --install -s /data/local/tmp/"
  25.  
  26. #run shell with links to busybox programs
  27. adb shell "export PATH=$PATH:/data/local/tmp;sh"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement