[Q] rm: No such file or directory - Android Software/Hacking General [Developers Only]

Hi all,
First post here and of course search is off ATM, so, sorry in advance if it's already been posted.
The problem I'm currently having is via the terminal emulator, from root:
Code:
# rm -rf /datadata/com.skype.raider
rm: /datadata/com.skype.raider/files/<account>/chatsync/21/obj1286: No such file or directory
The whole problem seems related to this Skype problem:
community.skype.com/t5/Android/Please-re-install-skype-PROBLEM/td-p/71138
which has been introduced with the latest release of the app.
Trying to follow the suggestion someone gave on the thread I tried to delete the dir (after uninstalling the app) with the above result.
I've also tried to chmod and chown -R, but nothing has changed.
To me this looks like a dandling reference to the directory content from a bad coded piece of software. But that's just the idea it gave me.
If anyone has an idea on how to recover from this problem, it'll be more than wellcome.
Thanks
PS: /datadata is a yaffs2 fs.

Try /data/data instead of /datadata/ ?

/data/data is a symbolic link to /datadata

ok, quick update on the matter:
tried to touch the file, no errors whatsoever, but now:
Code:
# ls -l /datadata/com.skype.raider/files/<account>/chatsync/21/
-rw-rw-rw- 1 root root 0 Aug 27 15:51 obj1286
-rw-rw-rw- 1 root root 0 Aug 27 15:51 obj1286
#
WTH :-\

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.

fix_permissions improvement

I've just installed the last porting of the cyanogen for my Magic 32a. I'm enjoining the idea behind the script fix_permissions. But, observing the structure of the files/folders in my /data/data/, I can see that it is not perfect.
It does chown the folders /data/data/NAME-OF-PACKAGE/ and the subfolders 'databases' and 'shared_prefs'.
Observing the typical contents of my /data/data/ I can see that some applications has further folders and some times also single files in /data/data/NAME-OF-PACKAGE/ that need a touch of chown.
For example:
/data/data/com.htc.android.mail/
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_config
drwxrwxrwx 1 10021 10021 2048 Aug 18 09:00 app_mail_eas
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_mail_temp
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_temp
-rw------- 1 10021 10021 1048576 Aug 18 09:00 bufferFileForMailAP
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 databases
drwxr-xr-x 1 1000 1000 2048 Aug 18 08:41 lib
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 shared_prefs
You can test on your system by yourself:
for APP in /data/data/* ; do echo -e "\n$APP" ; ls -l $APP ; done | more
I'm attaching an improved version that should fix the permissions on all the subfolders different than 'lib' and also on the single files.
I hope it works for you and that it can be included in the future firmwares.
UPDATE: in this thread, several users are making contributions to the original script (with a fast increasing version number ). There is also a report in the Cyanogen bug system: http://code.google.com/p/cyanogenmo...ID Type Status Priority Version Owner Summary
You should find there the last revision. Thanks to all for the contributions.
ankn said:
I've just installed the last porting of the cyanogen for my Magic 32a. I'm enjoining the idea behind the script fix_permissions. But, observing the structure of the files/folders in my /data/data/, I can see that it is not perfect.
It does chown the folders /data/data/NAME-OF-PACKAGE/ and the subfolders 'databases' and 'shared_prefs'.
Observing the typical contents of my /data/data/ I can see that some applications has further folders and some times also single files in /data/data/NAME-OF-PACKAGE/ that need a touch of chown.
For example:
/data/data/com.htc.android.mail/
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_config
drwxrwxrwx 1 10021 10021 2048 Aug 18 09:00 app_mail_eas
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_mail_temp
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_temp
-rw------- 1 10021 10021 1048576 Aug 18 09:00 bufferFileForMailAP
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 databases
drwxr-xr-x 1 1000 1000 2048 Aug 18 08:41 lib
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 shared_prefs
You can test on your system by yourself:
for APP in /data/data/* ; do echo -e "\n$APP" ; ls -l $APP ; done | more
I'm attaching an improved version that should fix the permissions on all the subfolders different than 'lib' and also on the single files.
I hope it works for you and that it can be included in the future firmwares.
Click to expand...
Click to collapse
Btw, I was wondering why we fix only userId and not also sharedUserId
as I'm quite sure I've seen them messed up sometimes after some of my to
ambitious experiments. Shouldn't be difficult to add support for that if there
is some evidence that it is a Good Thing(tm).
farmatito said:
Btw, I was wondering why we fix only userId and not also sharedUserId
Click to expand...
Click to collapse
I don't understand the meaning of the parameter "sharedUserId". Some packages in packages.xml use the parameter "UserId", others the "sharedUserId" one. What's the difference?
ankn said:
I don't understand the meaning of the parameter "sharedUserId". Some packages in packages.xml use the parameter "UserId", others the "sharedUserId" one. What's the difference?
Click to expand...
Click to collapse
shared user id is for the case when you have a program extended by another installable program in order to run in the same process:
http://developer.android.com/reference/android/R.attr.html#sharedUserId
Another improvement could be to fix the file modes as well. I have noticed that sometimes the user permissions on files and directories in /data/data get removed.
Then you get FCs with an sqlite error like below:
Code:
sqlite3_open_v2("/data/data/com.xta.foodmkt/databases/Hungry.db", &handle, 6, NULL) failed
The below commands fixes the access errors:
Code:
find /data/data -type d -exec busybox chmod u+rwx {} \;
find /data/data -type f -exec busybox chmod u+rw {} \;
farmatito said:
Btw, I was wondering why we fix only userId and not also sharedUserId
as I'm quite sure I've seen them messed up sometimes after some of my to
ambitious experiments. Shouldn't be difficult to add support for that if there
is some evidence that it is a Good Thing(tm).
Click to expand...
Click to collapse
I'm attaching another version with support to packages with sharedUserId; fixed the remount mechanism that doesn't work on the other firmware that I'm actually using (HoFo).
smeat said:
The below commands fixes the access errors:
Code:
find /data/data -type d -exec busybox chmod u+rwx {} \;
find /data/data -type f -exec busybox chmod u+rw {} \;
Click to expand...
Click to collapse
This code should fixes all the permission-related problems but it is too risky from the security point-of-view.
ankn said:
This code should fixes all the permission-related problems but it is too risky from the security point-of-view.
Click to expand...
Click to collapse
Why risky, if i understand it right:
directory: 700 (owner only can read, write or enter directory)
files: 600 (owner only can read or write file)
Where is the risk?
You can also use:
chmod 700 directory
chmod 600 files
farmatito said:
Why risky, if i understand it right:
directory: 700 (owner only can read, write or enter directory)
files: 600 (owner only can read or write file)
Where is the risk?
You can also use:
chmod 700 directory
chmod 600 files
Click to expand...
Click to collapse
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.
smeat said:
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.
Click to expand...
Click to collapse
This in my opinion is far more risky than doing
a chmod for the owner only at least in the case
that the permissions are messed up for whatever
reason as some insecure settings will not be corrected
that way, e.g.:
permissions are wrongly set to 666 or 777
than you do chmod +urwx file and the result
will continue to be an insecure setting 666 or
677 that doesn't enforce isolation between apps.
BTW, by looking at ls of /data/data it seems to
me that all folders have 755 permissions so
chmod 755 folder should be safe. For the deeper level:
Code:
/data/data/app 755
/data/data/app/files 700
/data/data/app/lib 755
/data/data/app/shared_prefs 771
but I have not the time right now to check all subfolders
to see if there are exceptions to this default settings.
smeat said:
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.
Click to expand...
Click to collapse
This is true. Sorry!
farmatito said:
This in my opinion is far more risky than doing
a chmod for the owner only at least in the case
that the permissions are messed up for whatever
reason as some insecure settings will not be corrected
that way, e.g.:
permissions are wrongly set to 666 or 777
than you do chmod +urwx file and the result
will continue to be an insecure setting 666 or
677 that doesn't enforce isolation between apps.
BTW, by looking at ls of /data/data it seems to
me that all folders have 755 permissions so
chmod 755 folder should be safe. For the deeper level:
Code:
/data/data/app 755
/data/data/app/files 700
/data/data/app/lib 755
/data/data/app/shared_prefs 771
but I have not the time right now to check all subfolders
to see if there are exceptions to this default settings.
Click to expand...
Click to collapse
fix_permissions is not about removing permissions and never has been from what I can tell. Currently it just goes through the /data/system/packages.xml and finds the listed owner of the /data/data files and then changes ownership of the files and directories.
I am talking about adding an additional chmod to make it so that file and directory owners are added as being able to read/write to the files they own. I have seen an issue were running something made it so that a ton of my application sqlite databases had file permissions of 060. When this happens you get the error I posted originally: sqlite3_open_v2("/data/data/com.xta.foodmkt/databases/Hungry.db", &handle, 6, NULL) failed. Even though the group write and read bit are set and the group is correct the error above happens. Adding the owner back as having read/write permissions fixes this error.
Again, adding permissions to only the user/owner of the files and directories does not open the files up to being written by other processes on the phone.
Again, adding permissions to only the user/owner of the files and directories does not open the files up to being written by other processes on the phone.
Click to expand...
Click to collapse
I know. I was trying to improve the concept of fix permission as you can not know
in advance how the permissions could have been messed up. So it would be better
to enforce some sane defaults rather than to add some hacks to fix a specific problem.
This obviously is only possible if there are some patterns in file and folder permissions of /data/data.
That is what i will try to find out.
farmatito said:
I know. I was trying to improve the concept of fix permission as you can not know
in advance how the permissions could have been messed up. So it would be better
to enforce some sane defaults rather than to add some hacks to fix a specific problem.
This obviously is only possible if there are some patterns in file and folder permissions of /data/data.
That is what i will try to find out.
Click to expand...
Click to collapse
Ahhh, sorry I misunderstood what you were getting at.
If you run:
Code:
find /data/data -type f -exec ls -l {} \;
Will tell you what all the files are currently set to.
A run of:
Code:
find /data/data -type d -exec ls -ld {} \;
Will list the current directory permissions.
What I can find is that any /sslcache directory is 700, /lib 755 and owned by 1000:1000, /database 771, /shared_prefs 771, But I have some apps with 700 directories for everything.
Here is a table for /data/data/app, format: directory/file, permissions, ownership
Directories:
/database 771 appuser:appgroup
/lib 755 1000:1000
/shared_prefs 771 appuser:appgroup
/sslcache 700 appuser:appgroup
/anythingelse 771 appuser:appgroup
Files:
/database/* 660 appuser:appgroup
/lib/* ??? ??????, never seen any files in these directories.
/sslcache/* 600 appuser:appgroup
/shared_prefs/* 660 appuser:appgroup
/anythingelse/* 660 appuser:appgroup
Does this align with what you are seeing? If so we can adjust the script to apply these permissions to the files and directories more selectively.
I was actually wondering about this very thing yesterday. Is there some reason why the initial script only changed the permissions of databases and shared_prefs?
I'm trying to think of a scenario in which you wouldn't just want a recursive chown, but especially in the case of wiping and then copying back data directories, having ALL the subdirectories owned by the app's uid seems preferable to having any of them owned by the wrong uid.
smeat said:
Ahhh, sorry I misunderstood what you were getting at.
If you run:
Code:
find /data/data -type f -exec ls -l {} \;
Will tell you what all the files are currently set to.
A run of:
Code:
find /data/data -type d -exec ls -ld {} \;
Will list the current directory permissions.
What I can find is that any /sslcache directory is 700, /lib 755 and owned by 1000:1000, /database 771, /shared_prefs 771, But I have some apps with 700 directories for everything.
Here is a table for /data/data/app, format: directory/file, permissions, ownership
Directories:
/database 771 appuser:appgroup
/lib 755 1000:1000
/shared_prefs 771 appuser:appgroup
/sslcache 770 appuser:appgroup
/anythingelse 771 appuser:appgroup
Files:
/database/* 660 appuser:appgroup
/lib/* ??? ??????, never seen any files in these directories.
/sslcache/* 600 appuser:appgroup
/shared_prefs/* 660 appuser:appgroup
/anythingelse/* 660 appuser:appgroup
Does this align with what you are seeing? If so we can adjust the script to apply these permissions to the files and directories more selectively.
Click to expand...
Click to collapse
So far this is what i've found:
Code:
/data/data/pkgdir uid/gid 755
/data/data/pkgdir/lib system/system 755
/data/data/pkgdir/databases uid/gid 771
/data/data/pkgdir/databases/*.db uid/gid 660
/data/data/pkgdir/shared_prefs uid/gid 771
/data/data/pkgdir/shared_prefs/*.xml uid/gid 660
/data/data/pkgdir/cache uid/gid 771
/data/data/pkgdir/cache/* uid/gid 771
The only differences are in the anythingelse part wher I have found
all possible combinations of permissions, but I suspect that these files
and dirs are setup by the apk at runtime as no reference could be found
for them in the apk package nor in the installd source code.
So i think it would be a big improvement to try to fix this standard dirs and their
contents with ownership and permissions as shown above.
This could save a lot of headaches to users and devs. Single apps with
exotic permissions could always be reinstalled or fixed manually.
In script 1.3 you should change:
cat /data/system/packages.xml | grep "^<package" | grep userId
to
cat /data/system/packages.xml | grep "^<package" | grep serId
as else no packages with sharedUserId will be found
farmatito said:
So far this is what i've found:
Code:
/data/data/pkgdir uid/gid 755
/data/data/pkgdir/lib system/system 755
/data/data/pkgdir/databases uid/gid 771
/data/data/pkgdir/databases/*.db uid/gid 660
/data/data/pkgdir/shared_prefs uid/gid 771
/data/data/pkgdir/shared_prefs/*.xml uid/gid 660
/data/data/pkgdir/cache uid/gid 771
/data/data/pkgdir/cache/* uid/gid 771
The only differences are in the anythingelse part wher I have found
all possible combinations of permissions, but I suspect that these files
and dirs are setup by the apk at runtime as no reference could be found
for them in the apk package nor in the installd source code.
So i think it would be a big improvement to try to fix this standard dirs and their
contents with ownership and permissions as shown above.
This could save a lot of headaches to users and devs. Single apps with
exotic permissions could always be reinstalled or fixed manually.
Click to expand...
Click to collapse
Yeah, I was assuming on the /anythingelse.
Alright here is my shot at this modification. Not much of a coder... so be gentle.
I created an issue for this on the code.google.com cyanogenmod site. thenefield posted some changes and I have integrated them into a new script.
smeat said:
I created an issue for this on the code.google.com cyanogenmod site. thenefield posted some changes and I have integrated them into a new script.
Click to expand...
Click to collapse
In your rewrite of the script, you forgot to apply the chown to the subfolders that are different than 'databases' and 'shared_prefs' as well as to the single files in the application-root. Look at my first post in this thread: these cases exist and we have to deal with them. In other words: you reverted my changes.

problems accessing to /system using terminal (from the phone)

hi,
after latest upgrade (htc desire, open desire 2.3, busybox, app2sd), i have issues with the access to the file system on /system (via terminal emulator from the phone).
all works fine using adb, but when i try to delete or copy a file to /system (directly on phone), i have a error.
i have searched over inet, but i don't find :/
i attach a example below
Code:
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /system/etc/test
# ls
-rw-rw-rw root root 124 ul 22 13:54 test1
-rw-rw-rw root root 124 ul 22 13:54 test2
# rm test1
error deleting test1: directory not empty
# ls
-rw-rw-rw root root 124 ul 22 13:54 test2
# ls test1
test1
edit:
i have the same issue when i connect to my phone using adb (and the phone started, not in recovery mode)..
Code:
# mount -o rw,remount /dev/block/mtdblock3 /system
# cd /system/app
# cp -f /sdcard/install/nosense/system/app/Terminal.apk .
cp: can't create './Terminal.apk': Out of memory
# cp -f /sdcard/install/nosense/system/app/Terminal.apk .
cp: can't create './Terminal.apk': Out of memory
# cd /system/app
# cp -f /sdcard/install/nosense/system/app/Terminal.apk .
cp: can't create './Terminal.apk': Out of memory
# cd /system/app
# cp -f /sdcard/install/nosense/system/app/Terminal.apk .
cp: can't create './Terminal.apk': Out of memory
Hi there... are you new to the desire?
As far as I can remember, writing to /system/ outside of ADB in Recovery is not possible on the Desire - an unfortunate limitation of the current root methods which hasn't been circumvented yet.
oh! thx!
i have received my desire a few days ago.
my old phone was a nexus.
i agree! and sorry for the inconvenience
What inconvenience?
I was a little confused too when I started reading about root on the Desire, and the info is hard to find (buried in one [or a few] of the many root tutorials)...
The really interesting part, IMO, is whether this limitation causes any problems with root-apps. But there don't seem to be any other than Adfree, and there seem to be patched versions that work with the Desire now (IIRC by moving the Hosts file out of /system/ and symlinking to it)

[How to] get full ubuntu and your favorite desktop in webtop

Ok, Today I will show how to fully unlock the webtop feature in the Atrix 2, so that you can use your favorite Linux apps and desktop, to be more productive while using webtop.
This will be in several posts to make this easier to read and understand.
There are several requirements I will list here, first:
1) A way to use webtop - The HD, or lapdock, or have completed the webtop mod for the HDMI connection Here
2) This is most important, and if you completed 1, then you most likely have done it, root your Atrix 2
3) A USB SDcard reader. I have the Sandisk imagemagick, but any one you like will do
4) Be able to ADB from your computer to your phone
5) Not afraid of a little command line work
Partition Instructions:
Depending upon your operating system, free software is available so that you can partition and format your device without losing all the data on it.
You will need to get one of the apps / iso images below, I recommend the live iso with gparted on it, just because I am a UNIX/ Linux guy by trade and choice, and this is what I use.
Linux gparted live iso image:
http://gparted.sourceforge.net/livecd.php
Windows MiniTool Partition Wizard:
http://www.partitionwizard.com/free-partition-manager.html
You must create a parition on your SDcard for webtop, as this is is a full Operating System and takes a good bit of space. I made mine around 8GB on my 32GB card, and for the purpose of showing you here, I created a 4GB partition on a spare 16GB card I have. 1GB is the minimum, because that is what is already being used on the Atrix2 and I think it is about 80% full or so.
The partition you create MUST be a primary partition and formated to ext3.
For Windows here are some screen shots from another board that may help, with instructions:
This is what the MiniTool Partition Wizard screen looks like when I have an 8 GB SD card inserted. As you can see, there's currently one single FAT32 partition present.
http://forum.xda-developers.com/attachment.php?attachmentid=651143&d=1310342755
When you right click on the partition, you'll see a Move/Resize option. That's the one you want to select for non-destructive partitioning.
http://forum.xda-developers.com/attachment.php?attachmentid=651144&d=1310342755
At that point, you can select how large you want your partition to be. You want to make sure that the "Unallocated Space Before" stays at 0.00 MB, so that the new partition will be the second one. In my case, I've opted to create a 4 GB partition as the second partition.
http://forum.xda-developers.com/attachment.php?attachmentid=651145&d=1310342755
Once that has been set up, right click on the Unallocated space, then select Create.
http://forum.xda-developers.com/attachment.php?attachmentid=651146&d=1310342766
We're not worried about the warning that Windows throws up, particularly since we know we'll be creating a partition that Windows can't read anyways. So just hit Yes.
http://forum.xda-developers.com/attachment.php?attachmentid=651147&d=1310342766
Create the second partition at the maximum size with the following settings:
Create As: Primary
File System: Ext3
http://forum.xda-developers.com/attachment.php?attachmentid=651148&d=1310342766
After that's done, click on the Apply Changes button.
http://forum.xda-developers.com/attachment.php?attachmentid=651149&d=1310342766
And now you're done! Put the card back into your Atrix2
Now for gparted:
If you are familiar with Linux and know how to use gparted, just resize your FAT32 partition to whatever size you want, then create a partition at least 1GB in size (I recommend 4GB), and make it an EXT3.
Now for the rest that are using the iso here is some info and screen prints:
Launch gparted:
Here is a screen print of my desktop with gparted running:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now in the upper right corner there is a little drop down that has something like /dev/sda in it, change this to your SDcard, mine was /dev/sdc.
Next right click on the partition in the middle of the screen, it should be surrounded in green, then click Resize/Move:
Then when the next screen comes up, drag the arrow from the left to the middle of the screen to resize the partition, to the size you want, this is in MegaBytes:
Now will have one partition that is ready to resize, and it should look like this, you will click on the "Apply all Operations button":
Then a little window with the percentage will show up and tell you when it is complete, just click the close button when it finishes.
Next you will right click on the unallocated part of the SDcard and click new:
Then you will tell it how big in new size box, I let it do the whole thing at 4GB, then select ext3 in the File system drop down menu:
Then after you click add in the last screen, you will click the "Apply all Operations button" Again:
Now it will show the percentage window again, and when it is complete, click the close button.
Done! Now it should look like this:
Put your SDcard back into your phone now.
Next will be how to copy over some patches and a script that will do a lot more, and a manual way for the brave.
Ok, so now that we are partitioned we can do some real fun stuff, and by fun stuff I mean command line.
I would make sure you are plugged into a power source when you are doing this part, becuase the script will run for a very long time, it is copying 1GB of data to your SDcard, and installing a patch that includes another 100 or so MB of needed programs.
Go get this tarball
IT IS VERY IMPORTANT THAT YOU COPY THIS INTO /data/local ON YOUR PHONE
Copy this to your system with:
adb push webtop_unlock.tar /data/local
Now connect to your phone with ADB
adb shell
su
cd /data/local
tar -xvf webtop_unlock.tar
chmod 755 setup_webtop.sh
sh ./setup_webtop.sh
This will do a whole lot of things, like copy the webtop install to your SDcard, then patch it, so that you can run synaptic and a termial and disable the FACLs and MACLs that Motorola has implemented, so that it is not locked down anymore.
***Note: I only had a chance to run and test this script once, so if it is an issue please let me know nicely in a post here, or PM me, but please copy any errors or get a screen print if you can, so that I know what to fix. Please don't post a reply with it did not work, give me as much info as you can.
After your phone reboots ADB into it again, and do this:
su
mount -o remount, rw /
**take note that you must run the "mount -o remount, rw /" command anytime you reboot your phone because any programs you get thru apt-get or synaptic will error out during installation
Now that you have most of what you need Do this:
Connect to webtop with whatever method you like, HD dock, or lapdock, or TV (you most likely have to have a bluetooth keyboard mouse to use your TV).
Then when the webtop session starts:
Ctrl+Alt+T
When the Terminal launches type this at the command line and hit return
sudo apt-get update
From here, you can run "gksu synaptic" and use the password "test" to start installing various different programs and packages that are normally available on Ubuntu.
Dependencies
Take caution when modding Webtop because there are some dependencies that will break Webtop if they are upgraded such as anything ending in a .mot or anything resembling that.
Credits
Please thank [mbm] for fixing what Motorola took out, without him, none of this would be possible without his patch.
Sogarth for being the pioneer of Webtop hacking.
Now that you can get into synaptic, go find a desktop you like and install it.
I use gnome and I like it, but here is a list of KNOWN working apps, I am sure there are many more, just know some will not work at all.
Working Programs:
OpenOffice
XFCE4
Xchat
LxTerminal
Transmission
lxpanel
rdesktop
VLC Player (Video is choppy)
Gnome-Panel
Evolution Email
Chrome-Browser
Now that you have a desktop you want to run, lets set it up to start for you instead of that launcher at the bottom of the screen now.
After installing your DE of choice thru apt-get or synaptic, navigate on your phone with Root File Explorer to /osh/usr/local/bin/ and open the file "start-oshwt-2.sh" in the text editor and you will be presented with something that looks like this:
#! /bin/sh
### BEGIN INIT INFO
# Provides: start_lxde2.sh
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: started by adas user at login
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
. /lib/lsb/init-functions
export `fbcp_dsba`
log_action_msg "Will now start OSHWT 2 scripts"
sfalv -i "/usr/lib/gvfs/gvfs-gdu-volume-monitor"
# start OSHWT 2 scripts
sfalv -i "awn-autostart"
sfalv -i "webtop-panel"
sfalv -i "webtop-wallpaper"
sfalv -i "evbridge"
webtop-wallpaper &
evbridge &
sfalv -i "window_switcher"
system-config-printer-applet >/dev/null 2>/dev/null &
sr-test avahi_start &
# IKXWEBTOP-5690 workaround.
# xkb is broken in 10.10 in that each time a keyboard is connected
# the layout of all other keyboards become the layout of
# the last connected keyboard.
# There is an xorg.conf.d rule that forces all keyboards to
# layout 'us(android)' but for some reason it is not working for
# evfwd. Here we force xkb to work with 'us(android)' so evfwd
# is assigned the right layout.
setxkbmap 'us(android)'
Note:
I highlighted the section you are interested in in Blue.
The sfalv -i "awn-autostart" command might also bin the file /osh/usr/local/bin/start-oshwt-1.sh
From here, if you comment out the sfalv -i "awn-autostart", then add to the script sfalv -i "xfdesktop" and sfalv -i "xfce4-panel" if you installed xfce4 or whatever Desktop environment you installed. If you followed this, your script should look like this:
#! /bin/sh
### BEGIN INIT INFO
# Provides: start_lxde2.sh
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:
# Short-Description: started by adas user at login
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
. /lib/lsb/init-functions
export `fbcp_dsba`
log_action_msg "Will now start OSHWT 2 scripts"
sfalv -i "/usr/lib/gvfs/gvfs-gdu-volume-monitor"
# start OSHWT 2 scripts
#sfalv -i "awn-autostart"
sfalv -i "webtop-panel"
sfalv -i "xfdesktop"
sfalv -i "xfce4-panel"
#sfalv -i "webtop-wallpaper"
#sfalv -i "evbridge"
webtop-wallpaper &
evbridge &
sfalv -i "window_switcher"
system-config-printer-applet >/dev/null 2>/dev/null &
sr-test avahi_start &
# IKXWEBTOP-5690 workaround.
# xkb is broken in 10.10 in that each time a keyboard is connected
# the layout of all other keyboards become the layout of
# the last connected keyboard.
# There is an xorg.conf.d rule that forces all keyboards to
# layout 'us(android)' but for some reason it is not working for
# evfwd. Here we force xkb to work with 'us(android)' so evfwd
# is assigned the right layout.
setxkbmap 'us(android)'
Hiya Jim! Thanks for posting this!
Question:
So with this it says you have to have a bluetooth keyboard and mouse for use with a TV. Did they disable the onscreen keyboard and mouse then?
voodoomurphy said:
Hiya Jim! Thanks for posting this!
Question:
So with this it says you have to have a bluetooth keyboard and mouse for use with a TV. Did they disable the onscreen keyboard and mouse then?
Click to expand...
Click to collapse
If you use the webtop patch for connecting to a tv, I THINK you can still use the touch screen on the phone for keyboard and mouse, but I will be real honest, I have not tried it, since I have the HD dock and I have used a lapdock or two to play with.
Jim,
I gparted my **** the other day and made a 4 gig partition called Linux, but when I ran the script I got this:
done. Sit back this will all take a while. ==========================================================
Finding the partition you setup and formatted to ext3....
Copying the scripts that will mount the osh partition on your sdcard at every boot.
Copied mountosh into place
stat: cannot stat '/tmp/osh': No such file or directory
Mounting your sdcard linux partition so that we can copy over the wetop install to it
link_image[1964]: 10279 could not load needed library 'liblog.so' for '/system/bin/mount' (link_image[1964]: 10279 could not load needed library 'libgcc_s.so.1' for 'liblog.so' (load_library[1106]: Library 'libgcc_s.so.1' not found))CANNOT LINK EXECUTABLE
[: 45881: unknown operand
Your SD card did not mount properly; Please send the log to the author of this script
[email protected]:/data/local# Chris-Murphys-MacBook-Pro:~ chrismurphy$
and now the web top will not load to my TV. I am using the hdmi hack for that. Thoughts?
voodoomurphy said:
Jim,
I gparted my **** the other day and made a 4 gig partition called Linux, but when I ran the script I got this:
done. Sit back this will all take a while. ==========================================================
Finding the partition you setup and formatted to ext3....
Copying the scripts that will mount the osh partition on your sdcard at every boot.
Copied mountosh into place
stat: cannot stat '/tmp/osh': No such file or directory
Mounting your sdcard linux partition so that we can copy over the wetop install to it
link_image[1964]: 10279 could not load needed library 'liblog.so' for '/system/bin/mount' (link_image[1964]: 10279 could not load needed library 'libgcc_s.so.1' for 'liblog.so' (load_library[1106]: Library 'libgcc_s.so.1' not found))CANNOT LINK EXECUTABLE
[: 45881: unknown operand
Your SD card did not mount properly; Please send the log to the author of this script
[email protected]:/data/local# Chris-Murphys-MacBook-Pro:~ chrismurphy$
and now the web top will not load to my TV. I am using the hdmi hack for that. Thoughts?
Click to expand...
Click to collapse
ok adb in and remove the files you used.
Code:
adb shell
cd /data/local
rm setup_webtop.sh
rm mountosh
rm mountosh1
rm unlock_webtop.tar
rm webtop_setup.log
mount -o remount, rw /system
cd /system/bin
rm mountosh
mv mountosh.orig mountosh
cd /data/local
mount -o remount, rw /system
End Code
Then go download the tarball again from the link in the OP (I made a slight change in the script that should fix the error about stating the /tmp/osh directory), and do the instructions in OP again.
jimbridgman said:
ok adb in and remove the files you used.
Code:
adb shell
cd /data/local
rm setup_webtop.sh
rm mountosh
rm mountosh1
rm unlock_webtop.tar
rm webtop_setup.log
mount -o remount, rw /system
cd /system/bin
rm mountosh
mv mountosh.orig mountosh
cd /data/local
mount -o remount, rw /system
End Code
Then go download the tarball again from the link in the OP (I made a slight change in the script that should fix the error about stating the /tmp/osh directory), and do the instructions in OP again.
Click to expand...
Click to collapse
ok so when I tried to rm mountosh it gave me permissions denied.
EDIT** Ahh, I needed to be su after going into dab
Edit***: Jim When I try to run the webtop SH file I get this:
[email protected]:/data/local# sh ./setup_webtop.sh
./setup_webtop.sh: 116: Syntax error: "}" unexpected (expecting "fi")
[email protected]:/data/local#
voodoomurphy said:
ok so when I tried to rm mountosh it gave me permissions denied.
EDIT** Ahh, I needed to be su after going into dab
Edit***: Jim When I try to run the webtop SH file I get this:
[email protected]:/data/local# sh ./setup_webtop.sh
./setup_webtop.sh: 116: Syntax error: "}" unexpected (expecting "fi")
[email protected]:/data/local#
Click to expand...
Click to collapse
Ok, I found the issue, I forgot to close out a new if loop I had to add to fix the last issue.
I have updated it, go re download and remove the files in /data/local
check to make sure that there is not a /system/mountosh.orig,
if there is, move it back to mountosh, and remove the mountosh script ONLY if there is a mountosh.orig. I am guessing that there is not one since this most likely did not run at all.
P.S. I can't test it, since I don't have my replacement phone yet, they did not have any in stock at the repair center, so Motorola had to send me a new one on Sat. I should have it tomorrow or Wed. at the latest, I will have to do all of these things again, and I can test it then is depth a little more. Otherwise if you don't mind Being the guinea pig I will fix any issues ASAP.
jimbridgman said:
Ok, I found the issue, I forgot to close out a new if loop I had to add to fix the last issue.
I have updated it, go re download and remove the files in /data/local
check to make sure that there is not a /system/mountosh.orig,
if there is, move it back to mountosh, and remove the mountosh script ONLY if there is a mountosh.orig. I am guessing that there is not one since this most likely did not run at all.
P.S. I can't test it, since I don't have my replacement phone yet, they did not have any in stock at the repair center, so Motorola had to send me a new one on Sat. I should have it tomorrow or Wed. at the latest, I will have to do all of these things again, and I can test it then is depth a little more. Otherwise if you don't mind Being the guinea pig I will fix any issues ASAP.
Click to expand...
Click to collapse
Well Now I get this when I try to open the sh file:
[email protected]:/data/local# sh ./setup_webtop.sh
.: Can't open /osh/upath.sh
[email protected]:/data/local#
I'll Keep trying as long as you think it's fixable. Last thing I want is to lose my web top entirely.
EDIT**: Right now when I connect my phone to my monitor I get a moving Motorola logo like it's a screen saver.
voodoomurphy said:
Well Now I get this when I try to open the sh file:
[email protected]:/data/local# sh ./setup_webtop.sh
.: Can't open /osh/upath.sh
[email protected]:/data/local#
I'll Keep trying as long as you think it's fixable. Last thing I want is to lose my web top entirely.
EDIT**: Right now when I connect my phone to my monitor I get a moving Motorola logo like it's a screen saver.
Click to expand...
Click to collapse
It is fixable! I used to be a system admin, (before I switched to consulting and system architecture) and you can always fix it until it no longer boots.
when you ran the script, did fully run and did you see files being copied, and did it reboot your phone?
ok, now I need you to run a few commands and collect some data. post the output here, after you get it.
Code:
adb shell
su
/system/bin/fdisk -l /dev/block/mmcblk0 | grep -i linux
busybox df -h
ls -l /system/mountosh
ls -l /system/mountosh.orig
cd /osh
cd /osh/etc
ls -l
End Code
I am suspecting that the script somehow applied the patch, and the FACLs and MACLs are still in place.
If things look good, then we will try and move tomoyo out of the way.
jimbridgman said:
It is fixable! I used to be a system admin, (before I switched to consulting and system architecture) and you can always fix it until it no longer boots.
when you ran the script, did fully run and did you see files being copied, and did it reboot your phone?
ok, now I need you to run a few commands and collect some data. post the output here, after you get it.
Code:
adb shell
su
/system/bin/fdisk -l /dev/block/mmcblk0 | grep -i linux
busybox df -h
ls -l /system/mountosh
ls -l /system/mountosh.orig
cd /osh
cd /osh/etc
ls -l
End Code
I am suspecting that the script somehow applied the patch, and the FACLs and MACLs are still in place.
If things look good, then we will try and move tomoyo out of the way.
Click to expand...
Click to collapse
files did copy, but then it all errored out. BTW I went back in and followed your instructions for the partitioning.
here's what I have from the code you asked for:
Chris-Murphys-MacBook-Pro:~ chrismurphy$ adb shell
[email protected]:/$ su
[email protected]:/# /system/bin/fdisk -l /dev/block/mmcblk0 | grep -i linux
/dev/block/mmcblk0p2 33 192864 6170624 83 Linux
[email protected]:/# busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 464.7M 76.0K 464.6M 0% /dev
tmpfs 464.7M 0 464.7M 0% /mnt/asec
tmpfs 464.7M 0 464.7M 0% /mnt/obb
/dev/block/system 477.5M 329.2M 148.3M 69% /system
/dev/block/userdata 4.5G 457.2M 4.1G 10% /data
/dev/block/cache 688.6M 16.7M 671.9M 2% /cache
/dev/block/pds 3.9M 1.1M 2.8M 28% /pds
/dev/block/preinstall
274.7M 23.5M 251.3M 9% /preinstall
/dev/block/vold/179:1
23.8G 4.0G 19.8G 17% /mnt/sdcard
/dev/block/vold/179:1
23.8G 4.0G 19.8G 17% /mnt/secure/asec
df: /mnt/sdcard/.android_secure: Invalid cross-device link
/mnt/sdcard 23.8G 4.0G 19.8G 17% /mnt/sdcard
/dev/block/dm-0 3.0M 1.8M 1.2M 60% /mnt/asec/com.ea.worms_na-1
[email protected]:/# ls -l /system/mountosh
/system/mountosh: No such file or directory
[email protected]:/# ls -l /system/mountosh.orig
/system/mountosh.orig: No such file or directory
[email protected]:/# cd /osh
[email protected]:/osh# cd /osh/etc
cd: can't cd to /osh/etc
[email protected]:/osh# ls -l
[email protected]:/osh# ls
[email protected]:/osh#
voodoomurphy said:
files did copy, but then it all errored out. BTW I went back in and followed your instructions for the partitioning.
here's what I have from the code you asked for:
Chris-Murphys-MacBook-Pro:~ chrismurphy$ adb shell
[email protected]:/$ su
[email protected]:/# /system/bin/fdisk -l /dev/block/mmcblk0 | grep -i linux
/dev/block/mmcblk0p2 33 192864 6170624 83 Linux
[email protected]son:/# busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 464.7M 76.0K 464.6M 0% /dev
tmpfs 464.7M 0 464.7M 0% /mnt/asec
tmpfs 464.7M 0 464.7M 0% /mnt/obb
/dev/block/system 477.5M 329.2M 148.3M 69% /system
/dev/block/userdata 4.5G 457.2M 4.1G 10% /data
/dev/block/cache 688.6M 16.7M 671.9M 2% /cache
/dev/block/pds 3.9M 1.1M 2.8M 28% /pds
/dev/block/preinstall
274.7M 23.5M 251.3M 9% /preinstall
/dev/block/vold/179:1
23.8G 4.0G 19.8G 17% /mnt/sdcard
/dev/block/vold/179:1
23.8G 4.0G 19.8G 17% /mnt/secure/asec
df: /mnt/sdcard/.android_secure: Invalid cross-device link
/mnt/sdcard 23.8G 4.0G 19.8G 17% /mnt/sdcard
/dev/block/dm-0 3.0M 1.8M 1.2M 60% /mnt/asec/com.ea.worms_na-1
[email protected]:/# ls -l /system/mountosh
/system/mountosh: No such file or directory
[email protected]:/# ls -l /system/mountosh.orig
/system/mountosh.orig: No such file or directory
[email protected]:/# cd /osh
[email protected]:/osh# cd /osh/etc
cd: can't cd to /osh/etc
[email protected]:/osh# ls -l
[email protected]:/osh# ls
[email protected]:/osh#
Click to expand...
Click to collapse
Ok, I see one issue, I think I miss-typed on location in those commands...
Run this for me.
Code:
adb shell
su
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
End Code
show that to me...
It looks like /osh just is not mounted or the mountosh script is missing... That is easy to fix, at worst case if it is not there, that I can get for you when I get my replacement today or tomorrow.
jimbridgman said:
You are missing the script to mount the /osh parition completely that is why everything is not working. That means that right now, Android can't see anything on that partition, either the one you created or the one that ships with the phone.
About the best thing I can do right now is to have you hang tight until I have my replacement in hand and I can get a copy of the original mountosh file for you, so that the /osh parition will mount up again, that is a very easy fix for all this. Once I have that for you I will give you instructions on what to do to get you back up and running.
I was hoping that is all it was.
It looks like when you were cleaning up after one of the script runs you removed the mountosh.orig instead of moving it back to mountosh.
Click to expand...
Click to collapse
crap. User error strikes again. No Worries Jim, I will wait patiently. I wish there was a way to restore the whole phone to stock including the OSH info. Resetting up my phone prefs is damned easy. lol
voodoomurphy said:
crap. User error strikes again. No Worries Jim, I will wait patiently. I wish there was a way to restore the whole phone to stock including the OSH info. Resetting up my phone prefs is damned easy. lol
Click to expand...
Click to collapse
Wait I edited my post after you read it... I misread, re read.... oh well, here, twas my issue..
Ok, I see one issue, I think I miss-typed on location in those commands...
Run this for me.
Code:
adb shell
su
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
End Code
show that to me...
It looks like /osh just is not mounted or the mountosh script is missing... That is easy to fix, at worst case if it is not there, that I can get for you when I get my replacement today or tomorrow.
jimbridgman said:
Wait I edited my post after you read it... I misread, re read.... oh well, here, twas my issue..
Ok, I see one issue, I think I miss-typed on location in those commands...
Run this for me.
Code:
adb shell
su
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
End Code
show that to me...
It looks like /osh just is not mounted or the mountosh script is missing... That is easy to fix, at worst case if it is not there, that I can get for you when I get my replacement today or tomorrow.
Click to expand...
Click to collapse
[email protected]:/# ls -l /system/mountosh
/system/mountosh: No such file or directory
[email protected]:/# ls -l /system/mountosh.orig
/system/mountosh.orig: No such file or directory
[email protected]:/#
here's an LS of the directory:
[email protected]:/# ls
cdrom
misc
pds
config
cache
sdcard-ext
sdcard
acct
tmp
preinstall
osh
mnt
vendor
d
etc
ueventd.rc
ueventd.mapphone_umts.rc
ueventd.mapphone_cdma.rc
ueventd.goldfish.rc
system
sys
sbin
proc
init_prep_keypad.sh
init.rc
init.mapphone_umts.rc
init.mapphone_cdma.rc
init.goldfish.rc
init
default.prop
data
bin
root
dev
[email protected]:/#
voodoomurphy said:
[email protected]:/# ls -l /system/mountosh
/system/mountosh: No such file or directory
[email protected]:/# ls -l /system/mountosh.orig
/system/mountosh.orig: No such file or directory
[email protected]:/#
here's an LS of the directory:
[email protected]:/# ls
cdrom
misc
pds
config
cache
sdcard-ext
sdcard
acct
tmp
preinstall
osh
mnt
vendor
d
etc
ueventd.rc
ueventd.mapphone_umts.rc
ueventd.mapphone_cdma.rc
ueventd.goldfish.rc
system
sys
sbin
proc
init_prep_keypad.sh
init.rc
init.mapphone_umts.rc
init.mapphone_cdma.rc
init.goldfish.rc
init
default.prop
data
bin
root
dev
[email protected]:/#
Click to expand...
Click to collapse
I did the same thing.... take a look again.
it is....
Code:
adb shell
su
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
End Code
I typed it wrong the first time....
jimbridgman said:
I did the same thing.... take a look again.
it is....
Code:
adb shell
su
ls -l /system/bin/mountosh
ls -l /system/bin/mountosh.orig
End Code
I typed it wrong the first time....
Click to expand...
Click to collapse
[email protected]:/# ls -l /system/bin/mountosh
/system/bin/mountosh: No such file or directory
[email protected]:/# ls -l /system/bin/mountosh.orig
/system/bin/mountosh.orig: No such file or directory
[email protected]:/#
voodoomurphy said:
[email protected]:/# ls -l /system/bin/mountosh
/system/bin/mountosh: No such file or directory
[email protected]:/# ls -l /system/bin/mountosh.orig
/system/bin/mountosh.orig: No such file or directory
[email protected]:/#
Click to expand...
Click to collapse
Ok, so then they really are not there... So, Sit tight I will get the original mountosh that they ship on my replacement, and get it uploaded for you, then you can run the script again... that is why all the errors happened, since /osh was not mounted, from the original ( do alot of tests for it to be there in my script), and it could not mount since the script that does this was not there, nor the one I hacked to mount our partition over the default one.

[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