• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to infuse/push/install busybox SU in twrprecovery.img for getting root previlages commands

kumaranil13k

Well-Known Member
Jan 10, 2020
102
8
**Question :How to infuse/push/modify/install busybox SU in twrprecovery.img for getting root privilages commands**

I want to take backup restore flash change some PM Package management and SM storage Management settings of my android 5.1.1 /6.0 mobile phone through adb shell commands or through twrp terminal without installing twrp or SU or rooting mobile device



1. Firstly I want to take backup of mobile system.img userdata.img through adb pull command and then recover write back adb push

My concerns related to first :

a. As adb pull reads and copy data but adb push writes on the device
b. Will adb push work without rooting mobile phone without root privilages.
c. If phone bricked or something gets wrong while rooting and phone is not rooted then will adb push work or not.

Code:
    Steps of commands using for backup of device
Adb devices
adb reboot bootloader
adb pull /dev/block/mmcblk0 mmcblk0.img
Adb push mmcblk0.img /dev/block/mmcblk0 mmcblk0.img


2. Using PM package manager on unrooted mobile android 5.1.1 with following commands but error


Code:
Adb devices
adb reboot bootloader
adb shell pm set-install-location 2
adb shell pm get-install-location

Error of command
/sbin/sh: pm: not found

what I understood from above error means that PM binary command file is not available in /sbin/sh/ folder as phone is not rooted so what I think if I put these binary files or install busybox within twrprecovery.img before loading and run temporary pm command so that I don't have to root the device and temporary set the changes in device.

If it's possible then kindly share the link for step by step procedure
for modifying twrprecovery.img before booting in pc computer windows as I am new novice to adb shell Linux commands

3. Thirdly As whenever I run SM storage manager command adb shell following command on unrooted android 6.0 mobile from it gives following errors


Code:
Adb devices
adb reboot bootloader
adb shell sm has-adoptable
adb shell sm set -force- adoptable true
adb shell sm list-disks adoptable
Adb shell sm partition disk:179:160 mixed 25
adb shell sm format private:179,3
adb shell sm mount private:179,3

It gives following errors

/sbin/sh: sm: not found

what I understood from above error means that SM binary command file is not available in /sbin/sh/ folder as phone is not rooted so what I think if I put these binary files or install busybox within twrprecovery.img before loading and run temporary pm command so that I don't have to root the device and temporary set the changes in device.

If it's possible then kindly share the link for step by step procedure for modifying Twrprecovery.img before booting in pc windows as I am new novice to adb shell Linux commands

4. Now if boot in fastboot mode and run twrprexovery.img or cwgmod recovery.img with these commands and then in twrp or cgmod terminal windows can I run busybox or Super user or PM SM command


Code:
Adb devices
Adb boot bootloader
Fastboot boot twrprecovery.img

5. Secondly the whole ideas is that I want to virtually temporary use twrp terminal with busybox or Super user binary to execute services packages like PM (package manager) SM (storage manager) within from twrp recovery menu terminal (loaded in fastboot boot twrprecovery.img mode). Or adb sideload If it's possible technically feasable. If yes then can we modify twrprexovery.img and infuse insert busybox in it before loading or after loading.
pnp97.jpg




6. Thirdly I don't want to install twrp or busybox or any super user binary file inside mobile device and don't want to install anything inside mobile except the changes alteration of settings done after execution of SM PM commands. That is I want to execute PM SM from within twrprecovery.img temporary and make alter changes virtually not hampering mobile device files
 
Last edited:

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones