it is inside /system/xbin and link to busybox, busybox mkdir works...
now root explorer/ cifs manager cannot create directory, how to fix?
Sent from my Milestone using XDA App
my rom is CM7 RC4.1
sorry cannot post to dev
can someone give me some idea of wth is happening? discussion is okay.
Sent from my Milestone using XDA App
any guide to update/reinstall busybox?
Sent from my Milestone using XDA App
Busybox is available on the market: https://market.android.com/details?id=stericson.busybox&feature=search_result
I'm not sure if that's what you're looking for, but there it is if you need it
I have the same problem even after installing the most recent busybox.
$
$ mkdir
mkdir: no such tool
$
$ echo $PATH
/data/local/bin:/sbin:/system/sbin:/system/bin:/system/xbin
$
$ /system/xbin/mkdir
BusyBox v1.19.0.git.adrynalyne (2010-12-21 22:03:30 MST) multi-call binary.
Usage: mkdir [OPTIONS] DIRECTORY...
Create DIRECTORY
Options:
-m MODE Mode
-p No error if exists; make parent directories as needed
$
as a workaround use /system/xbin/mkdir
janosik47 said:
I have the same problem even after installing the most recent busybox.
$
$ mkdir
mkdir: no such tool
$
$ echo $PATH
/data/local/bin:/sbin:/system/sbin:/system/bin:/system/xbin
$
$ /system/xbin/mkdir
BusyBox v1.19.0.git.adrynalyne (2010-12-21 22:03:30 MST) multi-call binary.
Usage: mkdir [OPTIONS] DIRECTORY...
Create DIRECTORY
Options:
-m MODE Mode
-p No error if exists; make parent directories as needed
$
as a workaround use /system/xbin/mkdir
Click to expand...
Click to collapse
Can you please explain how you run the above command? I always get mkdir : no such tool and I'm not clear how you ran the above command.
Related
Hi anyone,
Some things I want to discuss about.
1. DBDATA/databases
You should know that I include a update-script command to delete the /dbdata/databases folder in my ROM to prevent any App related problems.
But I think, since 2.2.1 this won't work anymore.
So does any ROM Dev has a workaround?
Or can someone confirm, that this works?
My update-script command:
Code:
delete_recursive DBDATA:databases
2. "rm" or "busybox rm" in a bash script?
When writing a script which gets executed from the update-script, do we need to use a simple "rm" or "busybox rm" for deleting files?
I'm not 100% sure, but I don't think that busybox is functional already?
My script:
Code:
#!/system/bin/sh
# Script written by darkyy // Joel Staub
# Script to prevent errors during the ROM installation
cd /sdcard
#/sdcard/Darky-Wallpaper
if [ -d "Darky-Wallpaper" ]; then
rm -r "Darky-Wallpaper"
fi
#/sdcard/Gingerbread_Keyboard
if [ -d "Gingerbread_Keyboard" ]; then
rm -r "Gingerbread_Keyboard"
fi
#/sdcard/launcherpro_backup
if [ -d "launcherpro_backup" ]; then
rm -r "launcherpro_backup"
fi
#/sdcard/Voodoo
if [ -d "Voodoo" ]; then
rm -r "Voodoo"
fi
#/sdcard/WindowsPhone7_Icons
if [ -d "WindowsPhone7_Icons" ]; then
rm -r "WindowsPhone7_Icons"
fi
"busybox rm" is the secure way when you need some functions of the busybox "rm" command, for example "rm -r".
If "rm" exists in /system/bin/ and a "rm" symlink to busybox in /system/xbin/, the shell chooses the one in /system/bin.
If the stock rm binary got removed it will work without busybox, but if not, "rm -r whatever" for example would fail.
Fr4gg0r said:
"busybox rm" is the secure way when you need some functions of the busybox "rm" command, for example "rm -r".
If "rm" exists in /system/bin/ and a "rm" symlink to busybox in /system/xbin/, the shell chooses the one in /system/bin.
If the stock rm binary got removed it will work without busybox, but if not, "rm -r whatever" for example would fail.
Click to expand...
Click to collapse
Thank you very much for this well-written answer.
So, does busybox work even when the ROM is installing?
*PUSH*
10char
Busybox works if the initramfs of the kernel used while installing has busybox. (Not the one included in the rom)
pawitp said:
Busybox works if the initramfs of the kernel used while installing has busybox. (Not the one included in the rom)
Click to expand...
Click to collapse
Thank you dude.
I finished with doing my "rm" commands with busybox.
Will be great for my ROM
Darkyy said:
Thank you dude.
I finished with doing my "rm" commands with busybox.
Will be great for my ROM
Click to expand...
Click to collapse
yes, busybox works even when installing rom
btw, to play safe, u need to chk if it is a symlink with -L, coz -d wont handle symlinks
ykk_five said:
yes, busybox works even when installing rom
btw, to play safe, u need to chk if it is a symlink with -L, coz -d wont handle symlinks
Click to expand...
Click to collapse
That's no problem
Thank you
This guide is for people who want root but want to keep their stock rom, not breaking the warranty, unlocking bootloader etc.
A proud ubuntu user, I am writing this in a new thread purely because the manual rageagainstthecage method and SuperOneClick method did not not work for me, see link to my conclusion below if you care
http://forum.xda-developers.com/showpost.php?p=11305312&postcount=2526
What did work however was via adb shell using psneuter and its fairly simple if you follow the following commands.
This guide assumes you know how to get access to the shell via adb, if you dont then search elsewhere for a useful guide
OK lets get to business!
1. Download the attached nexus_one_softroot.tar from the bottom of this post and extract contents to the same folder as adb
2. Open up your terminal, cd to the same folder as adb and the extracted files
3. Enter the following commands:
Code:
sudo ./adb push psneuter /data/local/tmp/psneuter
sudo ./adb push busybox /data/local/tmp/busybox
sudo ./adb push su /data/local/tmp/su
sudo ./adb shell chmod 755 /data/local/tmp/psneuter
sudo ./adb shell chmod 755 /data/local/tmp/busybox
sudo ./adb shell chmod 755 /data/local/tmp/su
sudo ./adb shell
After this you should see only a $ which tells us that we at the android command line with user privileges only, lets continue
Code:
$ cd /data/local/tmp
$ ls
busybox
su
psneuter
$ ./psneuter
property service neutered.
killing adbd. (should restart in a second or two)
You will now be kicked out of android shell, lets go back in
Code:
sudo ./adb shell
After this you should see only a # which tells us that we root baby! If you want to double check issue this command
Code:
# id
uid=0(root) gid=0(root)
Lets continue on. From this point we will install busybox and su which will make root permanent
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd /data/local/tmp
# ./busybox cp busybox /system/bin
# chmod 4755 /system/bin/busybox
# busybox cp su /system/bin
# chmod 4755 /system/bin/su
# exit
For some reason I sometimes have to enter exit twice to leave the android shell. Again, re-access the android shell
Code:
sudo ./adb shell
Now in the android shell we can finish up
Code:
# su
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# exit
# exit
Lastly we must install Superuser, and I did this from the android market so I knew its the latest version, its simple to get, less command input etc.
Now you have root! I hope this was simple enough to follow, I have not really written a guide before but from lots of searching I just could not find a solution for my Nexus One 2.2.1 FRG83D, especially any guide that uses psneuter.
Anyway, glad to contribute
EDIT - also, being new to starting threads, this may not quite be in the right section of the forum, sorry if thats the case mods
Added link to the thread from Wiki.
upgraded to gingerbread 2.3.3. after copying and setting permissions, got this:
PHP:
$ cd /data/local/tmp
$ ls -l
-rwxr-xr-x shell shell 26248 2010-07-22 10:20 su
-rwxr-xr-x shell shell 1062992 2010-10-16 22:29 busybox
-rwxr-xr-x shell shell 585731 2011-01-08 18:02 psneuter
su
busybox
psneuter
$ ./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
second time threw me out of shell. again adb shell gives this:
PHP:
$ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
mfkr said:
upgraded to gingerbread 2.3.3. after copying and setting permissions, got this:
Code:
$ ./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
Click to expand...
Click to collapse
I believe this is due to a change in the kernel as it is upgraded into gingerbread, the input/output controls have changed, leaving psneuter out of date with the current kernel.
However if an exploit is found with the kernel used in 2.3.3, you can use it in place of psneuter with the above method.
This thread is now obsolete!
Use this thread to do way more!!!
THIS COULD BREAK EVERYTHING IN THE WORLD AND SCREW UP YOUR LIFE FOREVER!!!! YOUR PHONE COULD BE BRICKED!!! YOUR WIFE COULD LEAVE YOU AND YOUR PARENTS COULD DIE!!! DO THIS AT YOUR OWN RISK!!! MAKE SURE TO HAVE A COPY OF THE FASTBOOT FILES FOR THE BIONIC JUST IN CASE!!!
I got Chromium Browser to run on the Webtop. It's a little messy (have to open it through a terminal emulator) but it works. I borrowed heavily from Sogarth who made this thread.
Made it a little easier.
Unzip and place the webtopchromium folder on the root of /sdcard-ext
webtopchromium.zip
If you are plugged into a computer make sure to change USB Mode to charge only before you proceed.
Use a terminal emulator or adb to run these commands:
Code:
su
/usr/bin/sudo -H -u root bash
cd /mnt/sdcard-ext/webtopchromium
sh webtopchromium.sh
This may take 10 minutes or so...
When it is finished reboot...
Use a terminal emulator or adb to run these commands:
Code:
su
/usr/bin/sudo -H -u root bash
cd /mnt/sdcard-ext/webtopchromium
sh installdeb.sh
Now when inside webtop open a terminal emulator in the phone window and run:
Code:
su
/usr/bin/sudo -H -u adas bash
export DISPLAY=:0
chromium-browser
You can just run the installdeb.sh (much faster) if you don't want to backup webtop with rsync. You can always use the fast boot to fix either way.
**Thanks to tallnerd for suggesting the faster method**
**A huge thanks to Sogarth for discovering all this first for the Atrix**
reserved
To uninstall and revert back to the stock webtop:
Using adb with root access:
adb shell
su
mount -o rw,remount /dev/block/mmcblk0p12 /system
cd /system/bin
mv mountosh mountosh.new
mv mountosh.orig mountosh
cd /data
rm ubuntu.disk
Reboot
I tried this, but it broke my Xperia Play. The micro HDMI cable I bought also broke the micro USB port on my phone.
v1r7u41 said:
THIS COULD BREAK EVERYTHING IN THE WORLD AND SCREW UP YOUR LIFE FOREVER!!!! YOUR PHONE COULD BE BRICKED!!! YOUR WIFE COULD LEAVE YOU AND YOUR PARENTS COULD DIE!!! DO THIS AT YOUR OWN RISK!!! MAKE SURE TO HAVE A COPY OF THE FASTBOOT FILES FOR THE BIONIC JUST IN CASE!!!
I got Chromium Browser to run on the Webtop. It's a little messy (have to open it through a terminal emulator) but it works. I borrowed heavily from Sogarth who made this thread.
Get a copy of these debs and put them on your sdcard-ext.
chromium-browser
Dependencies
Make sure to unzip the debs.zip and copy the .deb files and the mountosh.new to the sdcard-ext.
Use adb or android terminal-emulator.
Now check to make sure you have at least 1G free:
Code:
/bin/df -h /data
There should be at least 1.0G under the Used column. If not, you won't have enough to create a decent disk. If so, then you can keep going:
Code:
su
/usr/bin/sudo -H -u root bash
mount -o rw,remount /dev/block/mmcblk0p12 /system
/bin/dd if=/dev/zero of=/data/ubuntu.disk bs=1024 count=1048576
/sbin/losetup /dev/block/loop7 /data/ubuntu.disk
/sbin/mkfs -t ext3 -m 1 -b 2048 /dev/block/loop7
mkdir /tmp/osh
/bin/mount -t ext3 /dev/block/loop7 /tmp/osh
At this point, we've created a 1 GB disk file (1,024×1,024=1,048,576), formatted it as ext3, and mounted it in /tmp/osh.
I'll assume that rsync is in /mnt/sdcard-ext:
Code:
mkdir /tmp/deb
/usr/bin/dpkg-deb -x /mnt/sdcard-ext/rsync* /tmp/deb
/tmp/deb/usr/bin/rsync -avx /osh/ /tmp/osh/
And now we have a duplicate of our /osh partition.
After that:
Code:
mv /system/bin/mountosh /system/bin/mountosh.orig
cp /mnt/sdcard-ext/mountosh.new /system/bin/mountosh
chmod 0755 /system/bin/mountosh
chown 0 /system/bin/mountosh
chgrp 2000 /system/bin/mountosh
You can now reboot your device, and you should now boot into the new partition we've just created.
Now Install the debs.
Code:
su
/usr/bin/sudo -H -u root bash
touch /osh/var/lib/dpkg/status
touch /osh/var/lib/dpkg/available
mkdir /osh/var/lib/dpkg/updates
dpkg -i --force-all --root=/osh /sdcard-ext/chromium*
dpkg -i --force-all --root=/osh /sdcard-ext/libxss*
dpkg -i --force-all --root=/osh /sdcard-ext/lzma*
You will get some errors from dpkg but just ignore them. Moto broke dpkg's way of telling what is already installed.
Now to run chromium you will need to start webtop like you usually do
then open a terminal-emulator in the phone window and type this
Code:
su
/usr/bin/sudo -H -u adas bash
export DISPLAY=:0
chromium-browser
Click to expand...
Click to collapse
You should make a chromium icon/app that will run that last command when you click it
Yeah. I definitely need to clean this up, but I just wanted to get things moving .
I'm anxious to try this. I'll gladly be the third person to do it, but I don't want to be the second. Someone with more experience than I give it a try.
updated to make it a little easier
Posting this from Chrome on Webtop. It is noticeably faster than Firefox. Like butta!
Thank you so much for putting this together!
Maybe I'm missing something here but when running the script/install all goes well til the very last line, when I enter the "chromium-browser" command it states bash: chromium-browser not found. Can someone give me an idea of what I'm missing or doing wrong here please
Check your /sdcard-ext/webtopchromium folder before you run the installdeb.sh and make sure these are there:
chromium-browser-inspector_12.0.742.112~r90304-0ubuntu0.10.10.1_all.deb
chromium-codecs-ffmpeg_10.0.648.205~r81283-0ubuntu0.10.10.1_armel.deb
chromium-browser_10.0.648.205~r81283-0ubuntu0.10.10.1_armel.deb
libxss1_1%3a1.2.0-2_armel.deb
lzma_4.43-14ubuntu2_armel.deb
If chromium-browser_10.0.648.205~r81283-0ubuntu0.10.10.1_armel.deb isn't there run:
Code:
cd /sdcard-ext/webtopchromium
/tmp/deb/usr/bin/wget https://answers.launchpad.net/~ubuntu-security-proposed/+archive/ppa/+build/2443315/+files/chromium-browser_10.0.648.205%7Er81283-0ubuntu0.10.10.1_armel.deb
Well this sucks, I did a full wipe/nandroid restore and now that it's done I go to download the files and they're not there. Can anyone re-upload the files for me please?
Why, oh why did Moto not use Chrome? It is faster and I have not had a single low memory warning while using Chrome. In fact, I have yet to have it register over 3% in memory manager. Thanks again V1r7.
I'll setup a host for the files soon. Check back later (im away from computer) tonight.
Sent from my DROID BIONIC using XDA App
Got the file off of my computer, still running into issues though. Verified that all of the correct files are there and installed/uninstalled a few times just to verify. Quick question are you guys running the webtop adaptor or the lapdock? I'm running on the lapdock and wondering if this would make any difference at all if you're using the webtop.
I'm using the lapdock. Sorry I don't know enough to help you out. I'm rooted and followed the instructions and it worked.
Goto your terminal and type
busybox find /osh/usr/bin -name chrom*
Let me know what you find.
Sent from my DROID BIONIC using XDA App
When I type those commands it does absolutely nothing, just goes on to the next terminal line the same as the last.
try:
busybox find /sdcard-ext/webtopchromium/ -name chrom*
v1r7u41 said:
try:
busybox find /sdcard-ext/webtopchromium/ -name chrom*
Click to expand...
Click to collapse
When I type that it comes up with these results:
/sdcard-ext/webtopchromium/chromium-browser-inspector_12.0.742.112-r90304-0ubuntu0.10.10.1_all.deb
/sdcard-ext/webtopchromium/chromium-codecs-ffmpeg_10.0.648.205-r81283-0ubuntu0.10.10.1_armel.deb
/sdcard-ext/webtopchromium/chromium-browser_10.0.648.205-r81283-0ubuntu0.10.10.1_armel.deb
/sdcard-ext/webtopchromium/chromium-browser_10.0.648.205-r81283-0ubuntu0.10.10.1_armel.deb.1
/sdcard-ext/webtopchromium/chromium-browser_10.0.648.205-r81283-0ubuntu0.10.10.1_armel.deb.2
Open terminal:
su
/usr/bin/sudo -H -u root bash
cd /sdcard-ext/webtopchromium
dpkg -i --force-all --root=/osh chrom*
exit
/usr/bin/sudo -H -u adas bash
export DISPLAY:0
chromium-browser
Hey, I wonder if anyone is good with BASH is around here, what I want is simple, but for some reason it didn't work for me
So here is what I want, a .sh (or any other linux executable) file that executes the following code if the user input was the character 'm'
Code:
sudo mkdir /media/mp3
sudo chmod 775 /media/mp3
sudo mtpfs -o allow_other /media/mp3
and this if the input was 'u'
Code:
sudo umount /media/mp3
sudo rmdir /media/mp3
anything else: exit
thanks in advance
are you looking for something like this?
Code:
#!/bin/bash
if [ `whoami` != "root" ]; then
echo "you must execute this script with root priveleges!"
exit
fi
clear
echo
echo "enter m to mount /media/mp3 or enter u to unmount it"
echo
read moru
if [ "$moru" = "m" ]; then
mkdir -p /media/mp3
chmod 775 /media/mp3
mtpfs -o allow_other /media/mp3
elif [ "$moru" = "u" ]; then
umount /media/mp3
rmdir /media/mp3
fi
exit
HTH
the code seems ok, but still not working, the is the output in kate when I pipe it to terminal
(not that I was root when before I pipe it using su)
Code:
Dash-Netbook Desktop # #!/bin/bash
Dash-Netbook Desktop #
Dash-Netbook Desktop # if [ `whoami` != "root" ]; then
> echo "you must execute this script with root priveleges!"
echo "you must execute this script with root priveleges"]; then
bash: syntax error near unexpected token `then'
Dash-Netbook Desktop # exit
exit
[email protected] ~/Desktop $ fi
bash: syntax error near unexpected token `fi'
[email protected] ~/Desktop $
[email protected] ~/Desktop $ clear
[email protected] ~/Desktop $ echo
[email protected] ~/Desktop $ echo "enter m to mount /media/mp3 or enter u to unmount it"
enter m to mount /media/mp3 or enter u to unmount it
[email protected] ~/Desktop $ echo
[email protected] ~/Desktop $ read moru
[email protected] ~/Desktop $
[email protected] ~/Desktop $ if [ "$moru" = "m" ]; then
> mkdir -p /media/mp3
> chmod 775 /media/mp3
> mtpfs -o allow_other /media/mp3
> elif [ "$moru" = "u" ]; then
> umount /media/mp3
> rmdir /media/mp3
> fi
[email protected] ~/Desktop $
[email protected] ~/Desktop $ exit
husam666 said:
Hey, I wonder if anyone is good with BASH is around here, what I want is simple, but for some reason it didn't work for me
So here is what I want, a .sh (or any other linux executable) file that executes the following code if the user input was the character 'm'
Code:
sudo mkdir /media/mp3
sudo chmod 775 /media/mp3
sudo mtpfs -o allow_other /media/mp3
and this if the input was 'u'
Code:
sudo umount /media/mp3
sudo rmdir /media/mp3
anything else: exit
thanks in advance
Click to expand...
Click to collapse
I know it sounds stuff, but I don't know my way around Linux. What does that script actually do?
Sent from my HTC Wildfire S A510e using XDA
Bad-Wolf said:
I know it sounds stuff, but I don't know my way around Linux. What does that script actually do?
Sent from my HTC Wildfire S A510e using XDA
Click to expand...
Click to collapse
the first part mounts my mp3 player (MTP device) on the /media/mp3 directory
The other part unmounts it and deletes the directory
Sent from the brick
What distribution are you using?
Also, what errors do you get when you save that text to a text file (do this in linux, not windows), e.g. mountmp3.sh, make it executable (chmod +x mountmp3.sh) and run it (./mountmp3.sh)?
It seems to run the commands fine here (running Porteus, which is based on Slackware) but I don't have mtpfs installed, so I'm not testing every element...
use this one Husam!
on a terminal:
Code:
sudo -s
chmod +x husam.sh
sh husam.sh
I tweaked the code a bit and added extra functionality
You might wanna try that script without root...
.Ahau said:
What distribution are you using?
Also, what errors do you get when you save that text to a text file (do this in linux, not windows), e.g. mountmp3.sh, make it executable (chmod +x mountmp3.sh) and run it (./mountmp3.sh)?
It seems to run the commands fine here (running Porteus, which is based on Slackware) but I don't have mtpfs installed, so I'm not testing every element...
Click to expand...
Click to collapse
ok, I'm using linux mint kde 12.1, and I use kate for a text editor, I didn't do the chmod thing, I only used sh file.sh
@dex, ok..
.Ahau said:
What distribution are you using?
Also, what errors do you get when you save that text to a text file (do this in linux, not windows), e.g. mountmp3.sh, make it executable (chmod +x mountmp3.sh) and run it (./mountmp3.sh)?
It seems to run the commands fine here (running Porteus, which is based on Slackware) but I don't have mtpfs installed, so I'm not testing every element...
Click to expand...
Click to collapse
ok, it worked
thx
@dex, what kind of idiot do you think I am -_-
I always check executables before executing
husam666 said:
ok, it worked
thx
@dex, what kind of idiot do you think I am -_-
I always check executables before executing
Click to expand...
Click to collapse
oh come on
I know you liked my modifications
dexter93 said:
oh come on
I know you liked my modifications
Click to expand...
Click to collapse
btw, should I check the link you gave me?
husam666 said:
btw, should I check the link you gave me?
Click to expand...
Click to collapse
the "surprise" one? depends.. if you are brave enough
(you already know what it is though)
but the download link in my post is legit, it works
dexter93 said:
the "surprise" one? depends.. if you are brave enough
(you already know what it is though)
but the download link in my post is legit, it works
Click to expand...
Click to collapse
lmao, check my latest fb status then
husam666 said:
lmao, check my latest fb status then
Click to expand...
Click to collapse
that's where i got the idea from
glad it's working for you!
SU v2.65 doesn’t know how to cd /sdcard/Download/ - it apparently doesn’t know how to resolve the sdcard symbolic link. The work-around is you have to either
cd /sdcard/Download/ before you su
exit from su so you can cd /sdcard/Download/ then re-run su
[email protected]:/ # cd /sdcard/Download/
tmp-mksh: cd: /sdcard/Download: No such file or directory
[email protected]:/ # exit
[email protected]:/ $ cd /sdcard/Download/
[email protected]:/sdcard/Download $ pwd
/sdcard/Download
[email protected]:/sdcard/Download $ su
[email protected]:/mnt/shell/emulated/0/Download #
This did not happen prior to updating SuperSU.
Environment: Samsung Tab-S (SM-T800), Android 5.0.2, Kernel version 3.4.39-5941801