busybox for HTC Hero - Hero CDMA Android Development

Obviously there are some missing tools from the linux OS on the droid, so I'm looking to install busybox. I went directly to the source and tried to compile and install it on the phone, but it doesn't seem to work quite well.
I see a lot of people are including a version of busybox on their custom mods, but I'm not really looking to install a custom mod on my phone quite yet, but I would like the tools.
Does anyone know where I can download a good version of busybox that works on the Sprint HTC Hero without installing a rom?
I searched around the forums, but I'm not able to find anything quite yet.

I compiled one just today for some other stuff, not fully tested, but here you are.
Let me know how it works.
[email protected]:~/android/src/busybox-1.15.2$ file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped

packetlss said:
I compiled one just today for some other stuff, not fully tested, but here you are.
Let me know how it works.
[email protected]:~/android/src/busybox-1.15.2$ file busybox
busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped
Click to expand...
Click to collapse
Nice. Cheers. I'll let you know how it goes.

Care to provide how do you install this into the Hero? I'm also interested as I don't want to use a custom ROM

Nazgulled said:
Care to provide how do you install this into the Hero? I'm also interested as I don't want to use a custom ROM
Click to expand...
Click to collapse
I'm assuming you push it, via adb....correct, packetlss?

NOTE: backup before you try, writing this from the top of my head at 4 am.
To install:
run "adb remount" (to enable rw on /system)
run "adb push busybox /data/local" (so you got busybox somewhere on the phone)
run "adb shell" (to enter shell on phone)
in phone shell:
run "/data/local/busybox mkdir /system/xbin" (wanna make sure the directory exist)
run "/data/local/busybox cp /data/local/busybox /system/xbin/busybox" (copy busybox to xbin)
run "cd /system/xbin"
run "./busybox --install -s /system/xbin" (this should create symlinks for all the busybox applets)
run "ls -al" (you should see alot of symlinks)
run "rm /data/local/busybox" (remove the temporary busybox)

Thanks a lot for that...
Now I just need to learn how to do that directly into a custom ROM. Do you happen to know?

packetlss said:
NOTE: backup before you try, writing this from the top of my head at 4 am.
To install:
run "adb remount" (to enable rw on /system)
run "adb push busybox /data/local" (so you got busybox somewhere on the phone)
run "adb shell" (to enter shell on phone)
in phone shell:
run "/data/local/busybox mkdir /system/xbin" (wanna make sure the directory exist)
run "/data/local/busybox cp /data/local/busybox /system/xbin/busybox" (copy busybox to xbin)
run "cd /system/xbin"
run "./busybox --install -s /system/xbin" (this should create symlinks for all the busybox applets)
run "ls -al" (you should see alot of symlinks)
run "rm /data/local/busybox" (remove the temporary busybox)
Click to expand...
Click to collapse
So I followed that and accomplished it, I'm wondering what next? I have an app called SU File Manager & Terminal installed and it requires busybox. I don't see any new features or benefits? Am I not looking in the right place?

I'm having a permission issue getting this to install on my Hero.
Firstly I can't run 'adb remount'. I get:
remount failed: Operation not permitted
I'm not sure why.
So instead of remounting from there, I went into the adb shell and ran:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
This remounts rw /system just fine. I then I proceed with my install. I copy busybox to the /system/xbin folder and I run:
./busybox --install -s /system/xbin
However, I again get:
./busybox: permission denied
I have root access and I'm in su. I was able to mount system rw and make the xbin directly, along with copy the file to the folder, so I'm curious why i'm not able to install this.
Would anyone have a clue? It's 2:30am here, so I might be missing something or doing something incredibly stupid and just not realizing it.
Thanks!

VoXHTC said:
So I followed that and accomplished it, I'm wondering what next? I have an app called SU File Manager & Terminal installed and it requires busybox. I don't see any new features or benefits? Am I not looking in the right place?
Click to expand...
Click to collapse
posted by mistake ignore...

mrbrice said:
I'm having a permission issue getting this to install on my Hero.
Firstly I can't run 'adb remount'. I get:
remount failed: Operation not permitted
I'm not sure why.
So instead of remounting from there, I went into the adb shell and ran:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
This remounts rw /system just fine. I then I proceed with my install. I copy busybox to the /system/xbin folder and I run:
./busybox --install -s /system/xbin
However, I again get:
./busybox: permission denied
I have root access and I'm in su. I was able to mount system rw and make the xbin directly, along with copy the file to the folder, so I'm curious why i'm not able to install this.
Would anyone have a clue? It's 2:30am here, so I might be missing something or doing something incredibly stupid and just not realizing it.
Thanks!
Click to expand...
Click to collapse
Make sure that busybox is executable:
chmod 755 busybox

VoXHTC said:
So I followed that and accomplished it, I'm wondering what next? I have an app called SU File Manager & Terminal installed and it requires busybox. I don't see any new features or benefits? Am I not looking in the right place?
Click to expand...
Click to collapse
Busybox gives you command line tools. I have no idea what that particular app uses it for. That is something you have to speak to them about.

packetlss said:
Make sure that busybox is executable:
chmod 755 busybox
Click to expand...
Click to collapse
Yeah, I had thought that, so I made sure it was executable before hand
Code:
# ls -la
ls -la
drwxrwxrwx system system 2009-11-29 07:48 nandroid
drwxrwxrwx system system 2009-11-29 05:00 rosie_scroll
-rwxrwxrwx system system 698452 2009-11-28 21:47 busybox
# ./busybox --install -s /system/xbin
./busybox --install -s /system/xbin
./busybox: permission denied
Any other idea why it might be giving me this?

mrbrice said:
Yeah, I had thought that, so I made sure it was executable before hand
Code:
# ls -la
ls -la
drwxrwxrwx system system 2009-11-29 07:48 nandroid
drwxrwxrwx system system 2009-11-29 05:00 rosie_scroll
-rwxrwxrwx system system 698452 2009-11-28 21:47 busybox
# ./busybox --install -s /system/xbin
./busybox --install -s /system/xbin
./busybox: permission denied
Any other idea why it might be giving me this?
Click to expand...
Click to collapse
Don't run it from /sdcard, copy it to /data/local.
/sdcard is mounted noexec.

packetlss said:
Don't run it from /sdcard, copy it to /data/local.
/sdcard is mounted noexec.
Click to expand...
Click to collapse
Ahh. My bad. I had followed your instructions initially but I must not have changed the permissions that time around (messing around at 2am, you make mistakes. )
Thanks for all the help, not only compiling this, but for the assistance getting it working.
Cheers man. Good job.

If you guys want some other applets added to it, let me know and I'll compile a new one.
I think I got all the useful stuff in there though.

packetlss said:
If you guys want some other applets added to it, let me know and I'll compile a new one.
I think I got all the useful stuff in there though.
Click to expand...
Click to collapse
I'm trying to make my own custom ROM (nothing too fancy, just something to fit my needs) and I'm including busybox. It would be nice to have a list of all the busybox utilities (after the --install thing) so I could do the appropriate changes to the update-script manually.
Thanks for taking your time with this

Time to necro this thread again
New busybox out for those that cares, 1.15.3.
Code:
Code:
BusyBox v1.15.3 (2009-12-13 23:28:29 CET) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!
Currently defined functions:
[, [[, arping, ash, awk, basename, bbconfig, bunzip2, bzcat, bzip2,
cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, cksum, clear,
cmp, cp, cpio, cut, date, dc, dd, depmod, devmem, df, diff, dirname,
dmesg, dnsd, dnsdomainname, dos2unix, du, echo, egrep, env, ether-wake,
expr, false, fbset, fbsplash, fdisk, fgrep, find, fold, free,
freeramdisk, fsck, fuser, getopt, grep, gunzip, gzip, head, hexdump,
hostname, ifconfig, insmod, install, ip, ipaddr, ipcalc, iplink,
iproute, iprule, iptunnel, kill, killall, killall5, last, length, less,
ln, losetup, ls, lsattr, lsmod, md5sum, mkdir, mkdosfs, mkfifo,
mkfs.vfat, mknod, mkswap, mktemp, modprobe, more, mount, mountpoint,
mv, nc, netstat, nice, nmeter, nohup, nslookup, od, patch, pidof, ping,
pipe_progress, printenv, printf, ps, pscan, pwd, rdev, readlink,
realpath, renice, reset, resize, rm, rmdir, rmmod, route, sed, seq,
setconsole, setlogcons, setsid, sh, sha1sum, showkey, sleep, sort,
split, stat, strings, stty, sum, swapoff, swapon, switch_root, sync,
sysctl, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, time,
top, touch, tr, traceroute, true, tty, tunctl, udpsvd, umount, uname,
uncompress, uniq, unix2dos, unzip, uptime, usleep, uudecode, uuencode,
vi, watch, wc, wget, which, who, whoami, xargs, yes, zcat

Changelog?
Thanks for the binary by the way
EDIT: This is weird... the binary you just posted is smaller compared to the previous one I had, 682Kb compared to 1.78Mb. Why such a big difference?

Nazgulled said:
Changelog?
Thanks for the binary by the way
EDIT: This is weird... the binary you just posted is smaller compared to the previous one I had, 682Kb compared to 1.78Mb. Why such a big difference?
Click to expand...
Click to collapse
Bug fix release. 1.15.3 has fixes for ash (compilation with signed chars, SIGHUP handling fix), awk, flash_eraseall (fix for newer kernel headers), grep, mount (mount -a won't mount everyting again on 2nd run), ping (fix unaligned access), split (accepts "-" as stdin now), build system (parallel build).

Related

Override system binaries on CM-mod

This is hack for the userinit.sh script that allows to override
system programs with different binaries or just add some new
executable programs to your rom as you can use your ext3 partition
as storage. One more advantage is that your customizations
will be persistent even after a update.
For this to work you have to add this lines to your /system/sd/userinit.sh script:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
After a reboot, you'll find a newly created bin
directory in /system/sd/ linked to /usr/bin.
/usr/bin is the first directory to be searched
in path in CM-mod ROMs so any program dropped
there will be found and executed before others with
same name in the system. So you can simply:
Code:
adb push new_program /usr/bin
adb shell
cd /usr/bin
chmod 755 new_program
chown root.shell new_program
This is experimental stuff and therefore USE IT AT YOUR OWN RISK.
Tested on CM-mod-3.6.7.2 and CM-mod-3.6.8 and works fine for me.
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
followinginsanity said:
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
Click to expand...
Click to collapse
This only lets your run cli programs. This is below the dalvik system so it won't help you change the launcher.apk for ahome or dxtop.
Ok I see what your saying now. Misunderstood the exact intent of the changes
Cool trick, thanks. I already had a /system/sd/bin, so I modified it a little to skip creating it and doing the chmod etc on it.
Slight mod to avoid the whole thing if /usr is already there.. .
Code:
if ! [ -d /usr ]
then
mount -o remount,rw /dev/rootfs /;
mkdir /usr;
chown root.root /usr;
chmod 755 /usr;
ln -s /system/sd/bin /usr/bin;
mount -o remount,ro /dev/rootfs /;
fi
This is useful to me as my userinit.sh is the new one from the compcache thread and can be run to get status info on compcache after boot. No need to remount the filesystem and all that when what we need is already there.
I don't think you can skip the creation of /usr as it is lost
after a reboot at least on cm-mod, you can skip the creation
of system/sd/bin if it already exists tough. OTOH running:
Code:
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
will do no harm as mkdir and ln will fail if the targets already exist
and chown and chmod will just ensure that you can run your
programs.To be on the safe side i would suggest:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
# we should check if /system/sd is mounted
if [ ! -d /system/sd/bin ] ; then
mkdir /system/sd/bin
chown root.root /system/sd/bin
chmod 755 /system/sd/bin
fi
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
ttabbal said:
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
Click to expand...
Click to collapse
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
farmatito said:
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
Click to expand...
Click to collapse
Nope. Is there a binary available? I don't have a cross compiler set up right now.
Try this, You can create all the symlinks with this command:
Code:
adb push busybox /usr/bin
adb shell
cd /usr/bin
./busybox --install .
For full functionality you should also add /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow. I link them to /system/sd/etc/ to have them rw
Code:
mkdir /system/sd/etc
chmod 644 /system/sd/etc
/system/bin/chown root.root /system/sd/etc
/system/bin/chown root.root /system/sd/etc/passwd
/system/bin/chown root.root /system/sd/etc/group
/system/bin/chown root.root /system/sd/etc/shadow
/system/bin/chown root.root /system/sd/etc/gshadow
/system/bin/chown root.root /system/sd/etc/fstab
chmod 644 /system/sd/etc/passwd
chmod 644 /system/sd/etc/group
chmod 600 /system/sd/etc/shadow
chmod 600 /system/sd/etc/gshadow
ln -s /system/sd/etc/passwd /etc/passwd
ln -s /system/sd/etc/shadow /etc/shadow
ln -s /system/sd/etc/group /etc/group
ln -s /system/sd/etc/gshadow /etc/gshadow
Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Code:
rm /usr/bin/su
You should also:
Code:
passwd root
addgroup -g 65534 nogroup
You can even use ash as your default shell by doing:
Code:
if [ -e /usr/bin/busybox ] ; then
mount --bind /usr/bin/sh /system/bin/sh
fi
# Fix scripts in /system/bin
for i in am ime input monkey pm svc
do
if [ `grep -c "#!/system/bin/sh" /system/bin/$i` -eq 0 ] ; then
echo "#!/system/bin/sh" > /system/bin/$i.tmp
cat /system/bin/$i >> /system/bin/$i.tmp
mv /system/bin/$i.tmp /system/bin/$i
chown root.shell /system/bin/$i
chmod 755 /system/bin/$i
fi
done
Thanks! That worked great.
farmatito said:
Try this, You can create all the symlinks with this command:Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Click to expand...
Click to collapse
Hey farmatito - just stumbled onto this thread and am going to follow this but I am unclear on how to remove the su link to busybox? Any direction would be appreciated! Thanks.
Edit: I realize you mean to just rm it from /system/sd/bin - duh. thanks for this thread! I like having the full busybox bin.
cd /usr/bin
rm su
farmatito said:
cd /usr/bin
rm su
Click to expand...
Click to collapse
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
prscott1 said:
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
Click to expand...
Click to collapse
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
What terminal are you using?
I use konsole on linux and everything looks fine.
Cannot say if there is a suitable terminal for windows,
maybe the one that comes with the mingw compiler.
If nothing works you can just:
Code:
cd /usr/bin
rm ls
farmatito said:
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Click to expand...
Click to collapse
Many thanks!
Oh, sorry, I should have specified that.
This was using adb from my Vista x64 laptop (yeah, sorry, stuck with win32 for using adb so terminal choices rather limited).
So, basically, it was just running "adb[.exe] shell" from a Windows command prompt.
Tried bash under cygwin and even though it has full ansi coloring support, it looks like adb.exe isn't very terminal friendly because extended/escaped ansi still don't translate.
No big deal; I'll remove /usr/bin/ls for now or temporarily alias 'ls' to /system/xbin/bb/ls while I'm in an adb shell.
Wondering what else I could be using via the USB connection to get a shell prompt within my G1... easiest way is to turn on the wifi and telnet/ssh in, I guess?
EDIT: Duh, just started telnetd and forwarded the port using adb and problem solved (using putty to telnet in as described here and it works very nicely).
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
If you are on a windows pc, try using cygwin - works great.

Mac Terminal system remount syntax

I have an Atrix on AT&T. Which means there's a bootloader encryption, and the carrier prevents non-market apk installations, which I have resolved since my phone is rooted and I have changed the boot animation already.
In order to do these things, I found Ghost Commander that would let me chmod my system directories...which is fine, but I feel kind of gimped that I can't do it on terminal.
Basically, what I want to be able to do is remount /system as rw using terminal.
This method doesn't work on both terminal and emulator on my phone. I have done:
Terminal:
Code:
sudo su
cd [sdk directory]
./adb devices
./adb shell
su
mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system
and this is where I get stuck because I just get an Invalid argument error.
Here is some info about my sytem -
Usage: mount [-r] [-w] [-o options] [-t type] device directory
/dev/block/mmcblk0p12 /system ext3 ro,noatime,nodiratime, data=ordered 0 0
Been searching for the answers for a while now and tried all kinds of syntax, and now I'm here. What am I doing wrong? Thanks
Try:
mount -o remount,rw /system
The remount option automatically looks up the info for /system so you shouldn't have to bother with the details.
Hmm, I tried that thanks, and I still got 'Usage: mount [-r] [-w] [-o options] [-t type] device directory'
Hmm, I can't think of any reason that wouldn't work but it sounds like your phone is locked down pretty tight. Do you know if others have been able to remount /system?
What version of busybox do you have? Maybe you could try updating it. There are one or two free busybox updater apps on the market, if you can use them.
Have you tried just 'adb remount'?
Does the mount command require busybox? Do you have that properly installed?
That requires adbd itself to be run in root mode (this is different from being rooted on the phone) & you could do that only on insecure boot image. mount/unmount both happen to come from the busybox package. It would be hard to contemplate that Motorola actually changed that but nothing would stop them from. You could try updating the busybox utility onboard your phone. There is nothing with your usage of the command - it would work the same way on my Nexus S
I do have Busybox in /system/xbin. Thinking that maybe the xbin directory may need to have the rewrite permissions, I changed its permissions to 777 using the chmod command in phone Terminal. I did the remount command 'mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system' in shell on the phone, and I THOUGHT I BRICKED! Haha, but it just turned off, and I rebooted to find that my button backlights were turned off...which I fixed with the brightness file.
Anyhow, I think I'll just use the chmod command because that seems to work. NeoA, I think you are right about the adbd to run in root mode, because I've seen discussions about that before.
Thanks for the feedback guys! At least I know I wasn't having syntax errors to say the least
So did it remount it as rw? The mount command was running before, just giving errors, but if it's running that should mean the permissions were ok.
try
Code:
busybox mount -o remount,rw /system
Fr4gg0r said:
try
busybox mount -o remount,rw /system
Click to expand...
Click to collapse
"mount: can't find /system/app in /proc/mounts"
but
Code:
busybox chmod 777 /system
is good enough for me, for now
marlasinger said:
Code:
busybox chmod 777 /system
is good enough for me, for now
Click to expand...
Click to collapse
Using chmod to change permissions won't actually give you rw access to the system partition since it won't change whether it's mounted as read-only or r/w. To be able to run the chmod command, the system must already have been mounted as r/w or you would have received a "Read-only file system" error. It must have gotten mounted as read/write when the remount command caused a reboot. You can see how /system is mounted by just typing "mount" in adb shell which will list all of the mounted partitions.

Issues with c4droid. "Permission Denied". [Solved]

I have a rooted ASUS Transformer running Revolver 2.1.1 (Android 3.2).
I am a programmer and want a simple programming environment for my Transformer. I purchased an app called c4droid the other day and have had issues compiling c++ code using the g++ compiler.
When I try to compile/run code, I get the messages below:
C4droid has been granted superuser permissions
Click to expand...
Click to collapse
Then....
sh: /sdcard/Android/data/com.n0n3m4.droidc/files/gcc/compile-g++.sh: Permission Denied
Click to expand...
Click to collapse
How can I get this to work? Did I root wrong?
If you face these issues, click on the link below -
http://forum.xda-developers.com/showpost.php?p=16604606&postcount=6
What about trying this:
$su
#chmod 755 /sdcard/Android/data/com.n0n3m4.droidc/files/gcc/compile-g++.sh
I'm not sure what type of FS /sdcard is on the TF, so I don't know if those permissions will a) be allowed to be set, and b) work, but I doubt if any shell script will give anything but a permissions error without having +x permissions.
By the way:: If you can't do a chmod and that is due also to a permissions error, then I'm guessing you're not really rooted or not correctly rooted.
Good luck.
hachamacha said:
What about trying this:
$su
#chmod 755 /sdcard/Android/data/com.n0n3m4.droidc/files/gcc/compile-g++.sh
I'm not sure what type of FS /sdcard is on the TF, so I don't know if those permissions will a) be allowed to be set, and b) work, but I doubt if any shell script will give anything but a permissions error without having +x permissions.
By the way:: If you can't do a chmod and that is due also to a permissions error, then I'm guessing you're not really rooted or not correctly rooted.
Good luck.
Click to expand...
Click to collapse
did.......
su then chmod 755 /sdcard/Android/data/com.n0n3m4.droidc/files/gcc/compile-g++.sh and it had no such error but if I ran both on the same line I got a "Permission Denied" error. Either way, it still provided me with the permission denied error through c4droid.
Also, I've used root checker to verify that it's rooted.
So is it a sure thing that the .sh file you're getting the error on is actually the problem or could it be something inside it that is also having a permissions error?
I guess you could easily test that by writing a single line test.sh script that does an ls or a ps command.
Code:
example:
--start of test.sh--
#!/system/bin/sh #or whatever the path is for your case
ls > /sdcard/ls.txt
-- end of file ---
# cd {pathoftestfile}
# chmod 755 test.sh
# ./test.sh
# more ls.txt # or cat ls.txt, etc.
If that doesn't give an error then something in your 'real' shell script is.
One other thing worth a shot, which I "think" I've noticed on droids in the past is to just test the script inside the /system FS and see if it does any better there. At least we know that scripts have no problems in for example, /system/xbin or /system/bin, so mount /system rw (mount -o remount,rw /system) and move the test.sh over there , fix permissions, (mount -o remount,ro /system) and cd to /system/*bin/ and ./test.sh.
You've probably tried all this already, but if not.
NOTE: Never mind: I just tested my stuff ^^ myself, and it just doesn't work in the /sdcard tree. I moved it to /system/xbin after mounting rw and it works fine without any change.
There might be some way past this, but I can't recall ever getting a shell script working while on the /sdcard share.
I tried making the shell script but I had no luck actually running it. I chmodded it without error and ran it without error but it didn't produce a .txt file so I guess it failed to run or didn't have permissions to create a file.
The app developer/creator specifies that the compiler I'm using should work fine on rooted phones. I don't have an android phone to test it. I've tried working out problems with the developer but he couldn't figure it out either.
Okay, the creator helped me out and we resolved it. Here are the steps I took to do it, for other users.-
Pre-requisites: You must have BusyBox, SuperUser, C4droid, GCC for C4droid, and a Terminal Emulator installed. You also need a rooted device.
1. Open Terminal emulator and type "su" and press enter. A superuser screen will pop up and you need to click allow.
2. Type the following lines into the terminal (one by one):
cd /Removable/MicroSD/
mkdir Android
mkdir Android/data
cp -r /sdcard/Android/data/com.n0n3m4.droidc/ /Removable/MicroSD/Android/data/
su
mount -o remount,rw,exec -t vfat /dev/block/vold/179:9 /Removable/MicroSD
/system/xbin/mount -o bind /Removable/MicroSD/Android/data/com.n0n3m4.droidc/ /sdcard/Android/data/com.n0n3m4.droidc/
3. Change the default compiler in C4droid to G++ + bionic (Root required)
4. Done
Congratulations!
I guess it was mainly the 'noexec' switch of the mount -o {} that kept things from being executable.
I didn't notice that and am glad you posted the solution and I also wasn't really aware of the use of the "mount -o bind" for dual-pathing as well.
-- Thanks.

[Q] Root access without rooting

Hi,
I want to perform some basic root level tasks e.g. remove standard applications, move to SD card, changes some ROM config files (i.e. reset the file numbering for camera) etc. But I do not want to root the phone. I do not intend to use utilities like Gingerbreak, SuperOneClick etc.
I would prefer to use standard desktop tools like adb to access my phone and perform these tweaks. I do not want to install something on my phone specifically for gaining root access.
Is this possible? any guide available?
Regards,
Gkp
Using Optimus One with Android 2.3.4
NO!
why are u afraid to root the god damn obsolete phone?
Can u tell me wat are things can be done after rooting (except the above mentioned points)??
carrthee89 said:
Can u tell me wat are things can be done after rooting (except the above mentioned points)??
Click to expand...
Click to collapse
In short as posted above, it's not possible to do what you are wanting without rooting,
As long as you follow the instructions to root, you shouldn't have any problems
After Rooting, you can basically change anything, you can add ringtones directly to your ROM & remove them from the SD, you can backup applications using Titanium Backup, in regards to removing some stock apps, I found Titanium backup works wonderfully, as the title of the app states, basically it will make a backup on your SD card, (do not delete until you know your rom still runs correctly), Using Titanium, I was able to successfully remove unwanted google apps (youtube and some driving app).
Even if you did root, you can always unroot once the apps are removed. Although I don't see why you would want to unroot, having it rooted is better, but that's just my views.
you can gain world domination by rooting your phone, especially O1
There was an option for temporary root with z4root. I think gingerbreak has it too.
Sent from my LG-P500 using xda premium
Joel Chan said:
There was an option for temporary root with z4root. I think gingerbreak has it too.
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
I think gingerbreak will not work on gingerbread it will only work on froyo so use superoneclick..after rooting you can see there's option for unroot via unroot you can unroot your cell..
Sent from my HTC One V using xda premium
rooting the O1 is like transforming it into a Samsung Galaxy (a lot faster !!!) even without a rom
How can I obtain root permissions without rooting my android device?
Sorry, I am a newbie in xda-developers (see my profile)
Is there any possible way on how to obtain root access even without rooting any device?
My phone is Sony Ericsson Xperia mini ST15i i can upgrade/downgrade it using FlashTool, then
I'm trying to mount, remount or unmount " /system " directory on my device so i can push files on it.
I'm performing " adb shell " on Android Debug Bridge v1.0.31 (command prompt)
Since, the codes from " busybox " are the only commands running in " adb shell "
Can someone give me some simple commands on " adb shell " how to push files to a directory
Because, codes from " busybox " are too many, I don't know which is the correct one
Code:
adb shell
$
Busybox commands:
Code:
$ busybox
busybox
BusyBox v1.18.4 (2011-04-04 18:40:20 CDT) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: busybox --list[-full]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,
fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,
fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty,
grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid, hostname,
httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup,
inetd, init, insmod, install, ionice, iostat, ip, ipaddr, ipcalc,
ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kbd_mode, kill,
killall, killall5, klogd, last, length, less, linux32, linux64,
linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma,
lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,
mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.vfat,
mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount,
mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice,
nmeter, nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof,
ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir,
poweroff, powertop, printenv, printf, ps, pscan, pwd, raidautorun,
rdate, rdev, readahead, readlink, readprofile, realpath, reboot,
reformime, remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod,
route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir,
rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole,
setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum,
sha256sum, sha512sum, showkey, slattach, sleep, smemcap, softlimit,
sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum,
sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac,
tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time,
timeout, top, touch, tr, traceroute, traceroute6, true, tty, ttysize,
tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand, uniq,
unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode,
uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog, wc, wget,
which, who, whoami, xargs, xz, xzcat, yes, zcat, zcip
" adb push " is not a command in " adb shell " just make sense,
I'm trying to push files to a mounted Read-Write " /system " directory running in " adb shell "
Code:
$ adb push
adb push
adb: permission denied
I did the commands below when I rooted my device ↓
Mounting " /system " directory or the " root folder " to Read-Write
Code:
$ mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
Checking if " /system " directory was mounted to Read-Only or Read-Write
Code:
$ mount | grep /system
mount | grep /system
/dev/block/mtdblock0 /system yaffs2 rw,realtime 0 0
Now, as written on the top ↑ Can someone give me the command on how to push files in " adb shell "
I've been doing this and serching for it for 4 days straight :silly:
I have edited some works of DooMLoRD just to know how to remount " /system " then it works,
but I want to know more and the other commands to be used to; mount to read-write, push files without root,
without zergRush, without Busybox, without SU binary, without Superuser app or any ROOT access !
Thanks a lot in advance :angel: :victory:
gkp2007 said:
Hi,
I want to perform some basic root level tasks e.g. remove standard applications, move to SD card, changes some ROM config files (i.e. reset the file numbering for camera) etc. But I do not want to root the phone. I do not intend to use utilities like Gingerbreak, SuperOneClick etc.
I would prefer to use standard desktop tools like adb to access my phone and perform these tweaks. I do not want to install something on my phone specifically for gaining root access.
Is this possible? any guide available?
Regards,
Gkp
Using Optimus One with Android 2.3.4
Click to expand...
Click to collapse
Theoretically, no. But you can use SuperOneClick to root it, do that stuff, then unroot it with SuperOneClick.

[GUIDE] Rooting Samsung Galaxy [email protected] GT-B5330

This might work on other devices.
WARNING: this might brick your phone use it at your own risk.
Warning you have to have some knowlage of linux to do this kind of stuff.
WARNING: actually you have to have _good_ knowlage of linux/gnu stuff to do it.
The idea is this is to make the /system/bin/toolbox from the stock rom suid (permision 6755, it originaly has 0755)
This is how I did it. It might be simpler.
get a stock rom that you want. for me it was B5330XWALH3
it is now available at samsung-updates.
You need odin (heimdal will not work with my phone) (my was 3.07)
unpack the zip.
you get a .tar.md5 file (the tar file has broken headers so tar from ubuntu 12.04 will not unpackit).
the tar file works in sectors of 512 bytes.
take out the md5sum at the end of file. (some thing like: head -c (the size up to the last md5sum) original.tar.md5 > file1)
split the file so you will have the system.img.md5 separated (some thing like: head -c (the size upto "system.img.md5") file1 > file2;
head -c (the size upto "dt-blob.md5") file1 | tail -c +(the size upto "system.img.md5" + 1) > file3;
tail -c +(the size upto "dt-blob.md5" + 1) file1 > file4
file3 now has the system.img.md5, trim the md5sum from the tail and the tar headr from head (ex.:
head -c (upto the md5sum output from the rear of the file) file3 | tail -c +513 > file5)
file5 is a sparce image file of an ext4 filesystem. run simg2img (from ext4fs_utils (search on xda)) (ex.:
simg2img file5 file6)
sudo mount -o loop,ro file6 /mnt
look for the file /mnt/bin/toolbox (ex.: ls -l /mnt/bin/toolbox) it will give you an output like this:
-rwxr-xr-x 1 root 2000 99068 Aug 9 07:59 /mnt/bin/toolbox
sudo umount /mnt
the permisions and the size of the file yield the following hex sequence that you get in the file (we will hexedit the ext4 fs): ED 81 00 00 FC 82 01 00
in file3 edit the sequence (it should be only one in the file) from ED 81 00 00 FC 82 01 00 to ED 8D 00 00 FC 82 01 00 (practically adding the suid guid bits to the inode of the toolbox)
we are almost done, now to pack our bags and go.
verify that you have indeed put suid guid to toolbox:
head -c (upto the md5sum output from the rear of the file) file3 | tail -c +513 > file5;
simg2img file5 file6;
sudo mount -o loop,ro file6 /mnt;
ls -l /mnt/bin/toolbox
It should give an output:
-rwsr-sr-x 1 root 2000 99068 Aug 9 07:59 /mnt/bin/toolbox
sudo umount /mnt
recalculate the md5sum to the _expanded_ image: md5sum file6 > file7
overide the md5sum at the end of file3 with the one from file7
now pack the pieces in one tar: cat file2 file3 file4 > myfirmware.tar
add the md5sum to it: md5sum myfirmware.tar >> myfirmware.tar
change the name to .tar.md5: mv myfirmware.tar myfirmware.tar.md5
copy the file on a windowze machine (that has odin and the samsung drivers intalled).
update with odin the new firmware (which you should put in the PDA section) (don't forget to un check the repartitioning).
you should have now a practivally rooted device.
in order to have su and Superuser.apk on it you have to do the following steps:
push with adb su, busybox and Superuser.apk into /data/local/tmp on device (you get the files from other forums here at xda)
the next steps are on device (use adb shell)
verify that indeed we have a suid toolbox: ls -l /system/bin/toolbox should give that wanderfull -rwsr-sr-x permission.
find a rw mount that has suid (in my case a tmpfs is mounted /mnt/obb)
copy su to /mnt/obb (remember that we have suid toolbox this means that toolbox now gives you root on any command):
dd if=/data/local/tmp/su of=/mnt/obb/su
give su suid and make it owned by root: chmod 6755 /mnt/obb/su; chown 0.0 /mnt/obb/su
run su now and enjoy the #: /mnt/obb/su -
Click to expand...
Click to collapse
Ofcorse after you get # you should remount /system as rw, copy su in /system/xbin, copy Superuser.apk in /system/app, copy busybox in /system/xbin, make symlinks to busybox for all the comands in /system/xbin.
You should also upon success remove suid from toolbox so as to not mistakely do damage to the system (for instance "rm /")
And here you have it.
If you do not understand what I have done, you should read more linux / tar / ext4 / md5sum.
This method should work for any phone provided that it has odin as bootloader and there is the stock rom available.
hello
I don't have knowledge about how you have rooted the firmware for b5330, the steps you made are waaaay to dificult for me . Could you provide here an already rooted firmware, to download and install. thanks in advance
ETTT said:
This might work on other devices.
WARNING: this might brick your phone use it at your own risk.
Warning you have to have some knowlage of linux to do this kind of stuff.
WARNING: actually you have to have _good_ knowlage of linux/gnu stuff to do it.
The idea is this is to make the /system/bin/toolbox from the stock rom suid (permision 6755, it originaly has 0755)
This is how I did it. It might be simpler.
Ofcorse after you get # you should remount /system as rw, copy su in /system/xbin, copy Superuser.apk in /system/app, copy busybox in /system/xbin, make symlinks to busybox for all the comands in /system/xbin.
You should also upon success remove suid from toolbox so as to not mistakely do damage to the system (for instance "rm /")
And here you have it.
If you do not understand what I have done, you should read more linux / tar / ext4 / md5sum.
This method should work for any phone provided that it has odin as bootloader and there is the stock rom available.
Click to expand...
Click to collapse
bogdan_rize said:
I don't have knowledge about how you have rooted the firmware for b5330, the steps you made are waaaay to dificult for me . Could you provide here an already rooted firmware, to download and install. thanks in advance
Click to expand...
Click to collapse
no need to upload 400M for this little modification.
I'm unable to post links, goto samsung-updates
go and download B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME stock firmware.
and apply this xdelta patch over it.
xdelta patch sGTB5330.patch B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME.tar.md5 myfrm.tar.md5
Click to expand...
Click to collapse
after that you have the firmware that I use to root my phone.
Still... this firmware will not have "su" install, it will just be a rootable firware because it has a suid'ed toolbox.
a suid'ed toolbox in android means that you can exec chown and chmod as a root.
So. After the patching of the stock rom and flashing it. you have to have this md5sum output:
032b4344ab503c8413db9127efaa3d83 myfrm.tar.md5
Click to expand...
Click to collapse
odin will accept it (I've used Oding 3.07).
after that you push the files from the attached tar.gz to /data/local/tmp
tar -xzf superuser_stuff.tar.gz
adb push su /data/local/tmp
adb push Superuser.apk /data/local/tmp
adb push busybox /data/local/tmp
Click to expand...
Click to collapse
after that you bassically have to run this commands in an android shell in order to get to a stardard rooted android:
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
Click to expand...
Click to collapse
have fun.
I downloaded this firmware: Samsung-Updates.com-GT-B5330_COA_1_20120913171601_pducfx5hbw.zip. Where, how, what???...i unzipped it and now how to apply the patch? The rest of the stept i think i get it....i think For you it's easy to say, for me it's hard to do. I've had sgs1, sgs2 and sgs3, and the root of those was sooooooo easy... but this piece of crap b5330 drives me crazy )
ETTT said:
no need to upload 400M for this little modification.
I'm unable to post links, goto samsung-updates
go and download B5330XWALI2_B5330OXXALI2_B5330XWLH1_HOME stock firmware.
and apply this xdelta patch over it.
after that you have the firmware that I use to root my phone.
Still... this firmware will not have "su" install, it will just be a rootable firware because it has a suid'ed toolbox.
a suid'ed toolbox in android means that you can exec chown and chmod as a root.
So. After the patching of the stock rom and flashing it. you have to have this md5sum output:
odin will accept it (I've used Oding 3.07).
after that you push the files from the attached tar.gz to /data/local/tmp
after that you bassically have to run this commands in an android shell in order to get to a stardard rooted android:
have fun.
Click to expand...
Click to collapse
bogdan_rize said:
I downloaded this firmware: Samsung-Updates.com-GT-B5330_COA_1_20120913171601_pducfx5hbw.zip. Where, how, what???...i unzipped it and now how to apply the patch? The rest of the stept i think i get it....i think For you it's easy to say, for me it's hard to do. I've had sgs1, sgs2 and sgs3, and the root of those was sooooooo easy... but this piece of crap b5330 drives me crazy )
Click to expand...
Click to collapse
I've used xdelta package.
if you are on win then you're on your own.
there is xdelta.org and it seems to have pachage for windows.
for sgs[123] was easy because are main streams. may hackers were working on it.
this device is very new/obscure.
I whould have made a script, but alas, "heimdal" firmware loader whould not work with this device.
I've used linux to patch the firmware and windowze to upload it.
So a script whould be imposible, but after you pach .tar.md5 file and load it on your phone is just about cut and paste form my previous post.
My hope is that a more android savy guy will take this concept and make it a script.
I am just happy that I can now have debian on my phone.
yes, i am on win....there is no way to patch that COA firmware (i am from romania) and upload somewhere to download???i know i am probably asking to much from you, but i dont't think i will manage by my own...this rooting busines is driving me crazyyyyy :crying::crying::crying: thank you so much for your answer!!!
ETTT said:
I've used xdelta package.
if you are on win then you're on your own.
there is xdelta.org and it seems to have pachage for windows.
for sgs[123] was easy because are main streams. may hackers were working on it.
this device is very new/obscure.
I whould have made a script, but alas, "heimdal" firmware loader whould not work with this device.
I've used linux to patch the firmware and windowze to upload it.
So a script whould be imposible, but after you pach .tar.md5 file and load it on your phone is just about cut and paste form my previous post.
My hope is that a more android savy guy will take this concept and make it a script.
I am just happy that I can now have debian on my phone.
Click to expand...
Click to collapse
bogdan_rize said:
yes, i am on win....there is no way to patch that COA firmware (i am from romania) and upload somewhere to download???i know i am probably asking to much from you, but i dont't think i will manage by my own...this rooting busines is driving me crazyyyyy :crying::crying::crying: thank you so much for your answer!!!
Click to expand...
Click to collapse
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Interesting, reading carefully
Sent from my GT-B5330 using xda app-developers app
Thank you so much, tomorow morning i know how i'll spend my time...installing and rooting my b5330, unfortunately this evening i don't have my laptop on me forgoted at work ), but i've downloaded the firmware from phone and now waiting to have it done...finally!!! I'll let you know what have i done. Have a nice day and once again thanks!!!
ETTT said:
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
it's not working, when i'm trying to adb remont it says: remount failed: Opertaion not permited. After i flashed with odin the firmware you gave to me, i think i do not have permission to make any changes, and i don't know why
ETTT said:
ok here it is the modified firmware.
http://dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
Can you make patch for dxlh3..? Thanks
Sent from my GT-B5330 using xda app-developers app
bogdan_rize said:
it's not working, when i'm trying to adb remont it says: remount failed: Opertaion not permited. After i flashed with odin the firmware you gave to me, i think i do not have permission to make any changes, and i don't know why
Click to expand...
Click to collapse
There commands are supposed to be given in a command line box (cmd on win).
where does it gives you error?
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
finally it worked
yeeeees, damn you're good!!!! i have managed to root my b5330, root checher tell me that i am rooted and busybox is instaled...the only problem is that it shows me that i do not have installed superuser and supersu. Is there a problem if i just copy paste the apk file (supersu.apk and superuser.apk -> i've downloaded the pro version of bouth of them ) straight into the directory /data/local/tmp where it should be? or to copy-paste in another directory. Thanks in advance, CMD(and adb shell) gave me headache, but i finally got it an succedeed )) :victory::good:
ETTT said:
There commands are supposed to be given in a command line box (cmd on win).
where does it gives you error?
adb shell # enter the in the phone
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nologer with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
Click to expand...
Click to collapse
bogdan_rize said:
yeeeees, damn you're good!!!! i have managed to root my b5330, root checher tell me that i am rooted and busybox is instaled...the only problem is that it shows me that i do not have installed superuser and supersu. Is there a problem if i just copy paste the apk file (supersu.apk and superuser.apk -> i've downloaded the pro version of bouth of them ) straight into the directory /data/local/tmp where it should be? or to copy-paste in another directory. Thanks in advance, CMD(and adb shell) gave me headache, but i finally got it an succedeed )) :victory::good:
Click to expand...
Click to collapse
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
i was having trouble understanding adb shell and cmd from the begining. I never used this command tool...ever ) and i think from yesterday to this day i managed really ok . Anyway i think i will just copy-paste the superuser.apk in "app" folder directly in the system (it's the same thing, isn't it??). I have done that in item 11., and after a restart supersu was instaled, only superuser.apk didn't, i think i wrote something wrong in adb shell
ETTT said:
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
Click to expand...
Click to collapse
hihihi
neeeah, my bad, i thought that in "superuser_stuff" is superuser and supersu files, it was just su->for superuser.apk, easy peasy, it worked and installed from the first time...it was just me verry verry dizzy and confused. Your guide is 100% OK, my phone is rooted and now i can enjoy !!!
ETTT said:
1. I'm glad you got it.
2. You should give thanks (that button) if I helped you.
3. I'm you dont read instructions. Maybe it's a problem with us romanian engineers, or maybe engineers in general
look at item 11. from my previous post. maybe I just c&p here.
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk
So, when you are in adb shell and you go root (su command, you get the promt with #) and you have the /system mounted rw.
Then any apk that you copy to /system/app folder will get intalled and when you list your application (the button with 16 squares) you should see it.
Have fun.
Click to expand...
Click to collapse
can you release xdelta patch for your XWALH3 because we have the same device..
phyxar said:
can you release xdelta patch for your XWALH3 because we have the same device..
Click to expand...
Click to collapse
I've started a new more universal thread:
http://forum.xda-developers.com/showthread.php?t=1965600
There you have the shell-script that will patch the firmware for you.
If you still want an xdelta patch I'll make one for you but:
Give a man a fish and it will be full for the day, teach him how to fish and it will never go hungry again.
Have fun.
ETTT said:
ok here it is the modified firmware.
dl.transfer.ro/myfrm-transfer_ro-29oct-8a4089.zip
Click to expand...
Click to collapse
Hello, i'm new here and i don't know about scripting, so need your help..
i downloaded your firmware and install it to my b5330 and did the cmd command, and it worked, thanks..:good:
but now i've a new problem that my b5330 can't type a question mark ('?').. can you help me please..
whenever i want to type a question mark it always typed a comma (',') in the screen..:crying:
it also it change the symbol and language key to emoticon and symbol, but that's not a problem for me..
andhikarogue said:
Hello, i'm new here and i don't know about scripting, so need your help..
i downloaded your firmware and install it to my b5330 and did the cmd command, and it worked, thanks..:good:
but now i've a new problem that my b5330 can't type a question mark ('?').. can you help me please..
whenever i want to type a question mark it always typed a comma (',') in the screen..:crying:
it also it change the symbol and language key to emoticon and symbol, but that's not a problem for me..
Click to expand...
Click to collapse
That's because you have use the romanian firmware. whitch has a qwerty layout keyboard.
you have to do it the right way:
first. find the firmaware for your region:
http://samsung-updates.com/device/?id=GT-B5330
second. find a linux machine and run the script from the thread.
It is unrealistic for me to just upload all the 40 version of the firmware patched.
That is why I've made the script.
If you don't have a linux machine then look for a virtual box ubuntu and run on it.
Cheers.

Categories

Resources