[Galaxy Ace S5830 Q&A, Help & Troubleshooting] unl0rd:
Samsung Galaxy Ace [GT-S5830] root method (Optus branded units and possibly others)

I tried many methods, and none would work with my Optus branded S5830. I assume it was partly due to having less than 1MB available on the /system partition. After some perseverance, it now has root, here was my method, hopefully it can help others.

Some files mentioned in this are available here: http://goo.gl/6XlwEx

1. Install Samsung USB drivers: SAMSUNG_USB_Driver_for_Mobile_Phones.exe

2. Install and setup (for atleast your android version) the SDK from Google (http://developer.android.com/sdk/index.html)

3. Ensure that the platform-tools (or which ever folder contains adb.exe) is in your system path variable (google it).

4. Put custom recovery image on sdcard: recovery-clockwork-5.0.2.6-galaxyace.zip

5. Turn off device, and boot to recovery (home + power)

6. Flash recovery-clockwork-5.0.2.6-galaxyace.zip and reboot

7. Turn off device, and boot to recovery again (home + power)

8. From a command prompt, run 'adb shell' it should drop you to a shell with root privileges (#).

> adb shell
#

9. Mount the '/system' partition from the custom recovery (mount partitions)

10. Make some room on your '/system' partition, delete Skype, Think Office, etc. You will need to do this as the bloatware has left no room for the su binary and SuperUser.apk

11. To get rid of skype or Think Office, from the command line type the following and then press enter.

# rm /system/app/Skype.apk
# rm /system/app/thinkdroid.apk

12. Extract universal_gb_root_v25.zip to a folder, and open another command prompt at .\universal_gb_root_v25\system\xbin and type the following commands:

> adb push busybox /system/xbin/
> adb push sqlite3 /system/xbin/
> adb push ssh /system/xbin/
> adb push su /system/xbin/
> adb push ..\app\Rootvalidator.apk /system/app/
> adb push ..\app\Supersu.apk /system/app/

13. Go Back to you 'adb shell' command prompt, and type the following to confirm the files have been pushed (you should not get a 'No such file or directory' message)

# ls /system/xbin/su
# ls /system/app/Supersu.apk

14. Set file access permissions (change mode) with the chmod command

# cd /system/xbin
# chmod 6755 su
# chmod 755 busybox
# chmod 755 sqlite3
# chmod 755 ssh
# chmod 644 /system/app/Supersu.apk

15. Now also copy the files you pushed to /system/xbin to /system/bin

# cp su /system/bin/
# cp ssh /system/bin/
# cp busybox /system/bin/
# cp sqlite3 /system/bin/

# reboot

The phone should reboot as normal,

17. Once in turn on USB debugging (google it). Go Back to you 'adb shell' command prompt (which will have quit the shell after the reboot) and type:

> adb shell
$

18. Note that this time there is likely a $ prompt, if so, enter the command 'su' and hit enter. SuperSU should pop up on your device asking for su rights, say yes. If you get the # prompt, you are now rooted.

$ su
#

19. As an alternative to steps 17 and 18, (after the reboot, before turning on USB debugging), you can just open Rootvalidator from your app drawer to test for root privileges. You will also notice the SuperSU and cwm_recovery apps now in the app drawer too.

If it hasn't worked, make sure you've followed the steps correctly, you can safely repeat them, or play with the file's (busybox, sqlite3, ssh and su) user owner/group owners so they match most of the the other files in '/system/bin' and see if it helps. USe 'ls -l', 'chown' and 'chgrp' (again, google their usage)

ie. as an example, below shows that 'busybox' is owned by user 'root' and group 'shell', to change the group ownership to root, i would type 'chgrp root busybox' at a root (#) prompt.

# ls -l

-rwxr-xr-x root shell 2007456 2008-08-01 22:00 busybox
-rwsr-sr-x root root 311872 2013-12-08 09:09 su

- The End -