Help. Need default applets - Lenovo Vibe K5 Plus Questions & Answers

I need default ash and sh applets.
/system/bin/ash and /system/bin/sh
Can someone zip, and upload those 2 files for me? Pretty please.
Reason: my busybox installer (meefik) replace those 2 applets with symlink to its busybox – which is a no no, and I lost root because of that.

Nevermind, i just reflashed my whole ROM.
Careful with hardlinked 'sh' or any binaries.. and any busybox installers that override it.

Related

Busybox

I updated busybox in /system/xbin but still see the old busybox revision when I type busy box at the ADB shell prompt, I found:
/sbin # ls -l busybox
lrwxrwxrwx 1 root root 8 Aug 17 01:35 busybox -> recovery
looks to be a link to busybox in recovery, I cannot get to recovery..
Any ideas if that actually belongs there?
Files from /sbin are not in the path for Android, just in recovery.
That particular recovery is a different version.
If you just type busybox from a terminal, it should give a correct version.
If not, check /system/xbin or /system/bin, because you have an old version somewhere...or never updated like you thought.
adrynalyne said:
Files from /sbin are not in the path for Android, just in recovery.
That particular recovery is a different version.
If you just type busybox from a terminal, it should give a correct version.
If not, check /system/xbin or /system/bin, because you have an old version somewhere...or never updated like you thought.
Click to expand...
Click to collapse
Now that our NAND is (relatively) unprotected, can I use Stericson's busybox installer to place a copy that will be accessible anytime I use ash via adb or terminal, or do I (can I) simply push busybox to /system/bin to make it a native part of android's command path? OR, do I have to use ~/xbin like the OP? It seems until we got S-OFF, busybox commands rarely pointed back to busybox automatically, I always had to spell-out "busybox" as a prefix, unlike my G1, where all ROMs after a while had busybox installed natively, from /system/bin, I assume.
thanks for advice in advance
Yep, you can use his installer on the market just fine.
adrynalyne said:
Files from /sbin are not in the path for Android, just in recovery.
That particular recovery is a different version.
If you just type busybox from a terminal, it should give a correct version.
If not, check /system/xbin or /system/bin, because you have an old version somewhere...or never updated like you thought.
Click to expand...
Click to collapse
Thank you, everything is working busybox 1.15.3 is loaded, for an added measure I ran permissions.

Usage of init.d scripts

Hi
Actually there are already a lot of threads on xda which describe this
so everyone interessted can already get a enough information about it.
If you have specific questions you can of course use this thread
for asking them.
I just want to share some "insights" that I recently discovers which maybe
of interest for e.g. ROM developers that use init.d scripts
Typically init.d scripts are "enabled" by using the following in
the "main" startup script that is executed right after the kernel
has booted which is /init.rc
/system/xbin/busybox run-parts /system/etc/init.d
So it requires busybox and is using the command "run-parts" which is
simply executing all scripts found in /system/etc/init.d
This is how the line looks in Titanium kernels
but this line can create a small "problem"
Depending on your busybox installation run-parts is already a symlink
in /system/xbin to busybox
The effect is that now all scripts are executed TWICE
If you use e.g. myONE you can check this by examing
/data/zipalign.log where yuo will see everything twice
The init.rc parser seems to "know" that run-parts is already a executable
and therefore runs both
busybox run-parts /system/etc/init.d
AND
run-parts /system/etc/init.d
Aside from the "bad" that scripts are executed twice which needs more time
it can have unwanted sideeffects depending on what you are doing in init.d scripts
There are two ways to "fix" this
1) remove the symlink run-parts in /system/xbin
2) change the line in init.rc to
run-parts /system/etc/init.d
But since this file is typically in the ramdisk of the boot.img you
dont have full control of this file since flashing a different kernel
may override it again.
Actually the best way to fix this would be in init.rc to check if the
symlink is there or not. But I dont know have enough knowledge about
all of this at the moment.
regards
max
Thanks for the heads up. I just checked mine and all the init scripts were running twice so I moved /system/xbin/run-parts to /system/xbin/run-parts.bak
this should be posted under "GENERAL"....
1ceb0x said:
this should be posted under "GENERAL"....
Click to expand...
Click to collapse
Feel free to tell the mod
regards
max

[SCRIPT] defrost from terminal

I made a small script to defrost ALL disabled packages, useful for enabling frozen APKs or for re-enabling them after a reboot.
It will enable apps disabled by user too, so keep that in mind.
Just push it via ADB to /system/bin or /system/xbin, then chmod 755 to make it executable.
You can use a file manager with root features to move the file, but remember to set permissions to -rwxr-xr-x.
It requires root, so you have to run su command in terminal before executing it.
rewritten, it's faster now

[Q] Rooting does not work 100% fine

Hello.
I have rooted my phone using
http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
(in short, it's using SuperSU 2.00)
After some efforts, Root Checker says i am fine. I can get id 0 from adb, and via ssh.
But ... Busybox fails to install.
And if I remount /system RW, and mess in there a bit (like mkdir /system/tmp ), the mess is removed after reboot. Changes are not permanent.
Must I change my su app for superuser mentionned in the FAQ of the section (via recovery) ? Are there things to do before this migration ?
Other possible issues ?
I am used to fully unlocked HTC Sensation, where I changes to /system are easily permanent. But it was done using an exploit, few before HTC allowed rooting officially. Rooted M8 does not seem as much friendly ...
I *really* need busybox to work, and make permanent changes to /system. I am stuck.
Thanks.
doublehp said:
Hello.
I have rooted my phone using
http://htc-one.wonderhowto.com/how-to/unlock-bootloader-root-your-htc-one-m8-0154444/
(in short, it's using SuperSU 2.00)
After some efforts, Root Checker says i am fine. I can get id 0 from adb, and via ssh.
But ... Busybox fails to install.
And if I remount /system RW, and mess in there a bit (like mkdir /system/tmp ), the mess is removed after reboot. Changes are not permanent.
Must I change my su app for superuser mentionned in the FAQ of the section (via recovery) ? Are there things to do before this migration ?
Other possible issues ?
I am used to fully unlocked HTC Sensation, where I changes to /system are easily permanent. But it was done using an exploit, few before HTC allowed rooting officially. Rooted M8 does not seem as much friendly ...
I *really* need busybox to work, and make permanent changes to /system. I am stuck.
Thanks.
Click to expand...
Click to collapse
The /system partition is write protected on stock, meaning you can't add, modify, or delete files there. To disable this, you need to flash a kernel or rom with this disabled. Pretty much all sense based roms/kernels will state this in the features. I believe S-Off also disables it if you want to go the extra mile.
PS: Write protection is disabled in recovery. That is why superuser/root could be installed there.
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
akitten007 said:
The /system partition is write protected on stock, meaning you can't add, modify, or delete files there. To disable this, you need to flash a kernel or rom with this disabled. Pretty much all sense based roms/kernels will state this in the features. I believe S-Off also disables it if you want to go the extra mile.
PS: Write protection is disabled in recovery. That is why superuser/root could be installed there.
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
Click to expand...
Click to collapse
So, is there a way to install busybox via recovery ?
I did 3 things in recovery: all in /system/xbin
- chmod +s su
- touch t
- mkdir tmp
after reboot to normal mode, SUID bit was removed, but t and tmp are still here.
So, how do I install busybox ?
New issue: /data has the nodev flag; is it possible to remove it ?
I did not found /dev/shm ; was it moved somewhere else ? Any other place for similar use ? (world write temp folder in RAM).
akitten007 said:
PPS: Here is the kernel I run (protection disabled): http://forum.xda-developers.com/showthread.php?t=2705613
Click to expand...
Click to collapse
If your kernel allows me to install busybox, can i backup my original kernel to restaure it afterwards ?
Can I install busybox manually via recovery+adb ? I don't have any dev suite, but a good linux station; so, I can unzip, list, copy, and so on ... if there is not too much work to do.
doublehp said:
If your kernel allows me to install busybox, can i backup my original kernel to restaure it afterwards ?
Can I install busybox manually via recovery+adb ? I don't have any dev suite, but a good linux station; so, I can unzip, list, copy, and so on ... if there is not too much work to do.
Click to expand...
Click to collapse
Now you're starting to go over my head. If you want to keep your current kernel, I would try using this method here to manually add the module that disables the protection http://forum.xda-developers.com/showthread.php?t=2702575. I usually just install busybox using rom toolbox or any other busybox app. You could search for a busybox zip, but just disabling the write protection is a better option in my opinion. And I have actually 0.00 idea what flags mean on folders (sorry).
I rooted using TWRP recovery and super su. That guide you posted gives unnecessary instructions. TWRP automatically installs the SU binary and Super su the first time you boot into it. I was able to update Super su via google play, no need for the update zip. Just follow the instructions after rebooting to system from TWRP recovery.
I'm s-off, unlocked, my kernel, firmware and os are stock, only thing that isn't is recovery. I have write access to system and external sd card. All I did was make it writable with root explorer and have installed busy box no problem using this app https://play.google.com/store/apps/details?id=stericson.busybox.
I was given a better fix.
http://forum.xda-developers.com/showthread.php?t=2701816
In short:
adb push /mnt/big/tmp/wp_mod_m8.ko /mnt/sdcard/Download/
insmod /mnt/sdcard/Download/wp_mod_m8.ko
mount -o remount,rw /system
cd /system
touch z
mkdir zz
reboot
[email protected]_m8:/storage/emulated/legacy # cd /system/
[email protected]_m8:/system # ls
app
bin
build.prop
customize
etc
fonts
framework
lib
lost+found
media
priv-app
tts
usr
vendor
xbin
z
zz
[email protected]_m8:/system #
The miror is on maintainance for now. So, the guy on IRC gave me his local backup. I will push it here for 30 days:
http://dl.free.fr/gSha53ljz
(server will delete it after 30d nobody downloads it)
Busybox still fails to install; don't know why.

[SCRIPT] [XMS/XMD] [JB 4.3] [FULL ROOT] Quick Way to Fix reboot,mount issue.

Hi all
I have read many threads with similar issue, then this my way how to fix it.
Ie: Folder mount app, which make reboot the phone after we mount a folder.
Just add this line to this file : /system/etc/install-recovery-2.sh
If the file is missing, just create it.
Requirement:
on JB 4.3
superSU atleast v200 installed
busybox installed, got it from Playstore, ie: Busybox X,
Code:
#!/system/bin/sh
pkill -f /sbin/ric; mount -o remount,rw /; chmod 644 /sbin/ric
#just to make sure ric is killed
pkill -f /sbin/ric
How to:
You better know than me. but here my way.
if your phone reboot after you touch mount rw in root explorer then adb or terminal emulator is your friend
remount rw system, make the file, then push/copy to target directory, and set correct permission , chmod 755 install-recovery-2.sh
done.
.
This thread lacks a lot of info. You just forgot to cite you must have busybox installed and that this line should be put in install-recovery-2.sh if running Android 4.3 firmware to avoid conflicts with daemonsu...
conclusion:
You didn't search enough
mbc07 said:
This thread lacks a lot of info. You just forgot to cite you must have busybox installed and that this line should be put in install-recovery-2.sh if running Android 4.3 firmware to avoid conflicts with daemonsu...
conclusion:
You didn't search enough
Click to expand...
Click to collapse
Hi mbc07,
i have put the line in that file and of course is work. never get reboot again. i have read the note by superSU in that file too.
but iam forgot to cite the busybox, and i have busybox installed.
but hey thanks, i edited the OP.

Categories

Resources