How to root Nexus S with Ice Cream Sandwich (ICS): Difference between revisions
Jump to navigation
Jump to search
(Created page with 'Category:English pages Category:Mobiltelefoni Category:Software development <google>ENGELSK</google> ===How to root Nexus S with Ice Cream Sandwich (ICS) manually===…') |
No edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Android}} | |||
<google>ENGELSK</google> | <google>ENGELSK</google> | ||
===How to root Nexus S with Ice Cream Sandwich (ICS) manually=== | ===How to root Nexus S with Ice Cream Sandwich (ICS) manually=== | ||
=====First get a backup of your existing boot image===== | =====First get a backup of your existing boot image===== | ||
#: You can download ClockWorkMod from here: | #: You can download ClockWorkMod from here: | ||
#:* [http://www. | #:* [http://www.clockworkmod.com/rommanager/ ROM Manager and Clockwork Recovery Image] | ||
#Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader | #Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader | ||
# Verify your phone is connected with yout PC: | # Verify your phone is connected with yout PC: | ||
Line 18: | Line 14: | ||
# Make a backup to the of the phone with ClockworkMod | # Make a backup to the of the phone with ClockworkMod | ||
#: '''- backup and restore''' | #: '''- backup and restore''' | ||
#: '''- | #: '''- backup''' | ||
# Boot your phone to Android again, and copy the ClockworkMod backup to your PC. | # Boot your phone to Android again, and copy the ClockworkMod backup to your PC. | ||
#: It is loccated in '''\clockworkmod\backup...''' | #: It is loccated in '''\clockworkmod\backup...''' | ||
Line 60: | Line 56: | ||
#: superboot/superboot.sh | #: superboot/superboot.sh | ||
#: superboot/Superuser.apk | #: superboot/Superuser.apk | ||
# | # $ '''find . | cpio -o -H newc | gzip > ../newramdisk.gz''' | ||
# $ '''cd ..''' | # $ '''cd ..''' | ||
# $ '''./mkbootimg --kernel boot.img-kernel --ramdisk newramdisk.gz --cmdline 'console=ttyFIQ0 no_console_suspend' --base 0x30000000 --pagesize 4096 --output newboot.img''' | # $ '''./mkbootimg --kernel boot.img-kernel --ramdisk newramdisk.gz --cmdline 'console=ttyFIQ0 no_console_suspend' --base 0x30000000 --pagesize 4096 --output newboot.img''' | ||
Line 73: | Line 69: | ||
cat /superboot/Superuser.apk>/system/app/Superuser.apk | cat /superboot/Superuser.apk>/system/app/Superuser.apk | ||
mount -o ro,remount -t ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system | mount -o ro,remount -t ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system | ||
To verify that '''ext4 /dev/block/platform/s3c-sdhci.0/by-name/system''' is the right filesystem on future versions of Android you can type: | |||
# > '''adb shell''' | |||
# shell@android:/ $ '''mount''' | |||
This will show a list of al all filesystems on your phone. | |||
=====Flash the new image to your phone===== | =====Flash the new image to your phone===== | ||
On Windows: | On Windows: | ||
Verify it works before flashing | |||
: >'''fastboot.exe boot newboot.img''' | |||
Flash image | |||
: >'''fastboot.exe flash boot newboot.img''' | |||
: >'''fastboot.exe reboot''' | |||
====Additional information==== | ====Additional information==== | ||
Line 96: | Line 97: | ||
# $ '''cd ../cpio''' | # $ '''cd ../cpio''' | ||
# $ '''gcc mkbootfs.c -o mkbootfs -I../include''' | # $ '''gcc mkbootfs.c -o mkbootfs -I../include''' | ||
copy system/core/mkbootimg/mkbootimg, system/core/cpio/mkbootfs to a directory in your path. | copy system/core/mkbootimg/mkbootimg, system/core/cpio/mkbootfs to a directory in your path. | ||
Line 104: | Line 102: | ||
* [http://android.modaco.com/topic/344834-guide-how-to-create-your-own-superbootimg/ Guide - How to create your own superboot.img Or how to root your phone :)] | |||
====Additional links==== | |||
=====Fastboot===== | |||
* [http://android-dls.com/wiki/index.php?title=Fastboot Fastboot] | |||
* [http://wiki.cyanogenmod.com/wiki/Fastboot Fastboot and partition layout] | |||
=====Commandline parameters===== | |||
[http://www.gnu.org/software/cpio/manual/cpio.html '''cpio''' command line parameters] | |||
* [http://androidsu.com/ AndroidSU.com - The Superuser app for Android's homepage] | * [http://androidsu.com/ AndroidSU.com - The Superuser app for Android's homepage] | ||
* [http://www.androidenea.com/2009/06/android-boot-process-from-power-on.html The Android boot process from power on] | * [http://www.androidenea.com/2009/06/android-boot-process-from-power-on.html The Android boot process from power on] | ||
Line 114: | Line 120: | ||
* [http://forums.androidcentral.com/t-mobile-nexus-s-rooting-roms-hacks/48675-how-compile-nexus-s-kernel-source.html How-To: compile the Nexus S kernel from source] | * [http://forums.androidcentral.com/t-mobile-nexus-s-rooting-roms-hacks/48675-how-compile-nexus-s-kernel-source.html How-To: compile the Nexus S kernel from source] | ||
* [http://android.podtwo.com/romdump/ Romdump (So you've decided to <del>steal cable</del> dump your ROM)] | * [http://android.podtwo.com/romdump/ Romdump (So you've decided to <del>steal cable</del> dump your ROM)] | ||
<google>ENGELSK</google> |
Latest revision as of 12:58, 7 December 2016
<google>ENGELSK</google>
How to root Nexus S with Ice Cream Sandwich (ICS) manually
First get a backup of your existing boot image
- You can download ClockWorkMod from here:
- Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader
- Verify your phone is connected with yout PC:
- >fastboot.exe devices
- Boot your phone with fastboot and the ClockworkMod image on a PC.
- >fastboot.exe boot recovery-clockwork-5.0.2.0-crespo.img
- Make a backup to the of the phone with ClockworkMod
- - backup and restore
- - backup
- Boot your phone to Android again, and copy the ClockworkMod backup to your PC.
- It is loccated in \clockworkmod\backup...
- Locate boot.img in the backup and put it in an empty folder on an Ubunto system
On Ubunto
- Download split_bootimg.pl
- Download The superuser app from here: androisu.com
- copy split_bootimg.pl and mkbootimg to the same folder
- $ chmod +x split_bootimg.pl
- $ chmod +x mkbootimg
- $ ./split_bootimg.pl boot.img
- Page size: 4096 (0x00001000)
- Kernel size: 2858444 (0x002b9dcc)
- Ramdisk size: 143086 (0x00022eee)
- Second size: 0 (0x00000000)
- Board name:
- Command line: console=ttyFIQ0 no_console_suspend
- Writing boot.img-kernel ... complete.
- Writing boot.img-ramdisk.gz ... complete
- Now you have
- boot.img-kernel
- boot.img-ramdisk.gz
- $ gzip -d boot.img-ramdisk.gz (extract the ramdisk)
- $ mkdir tmp
- $ cd tmp
- $ cpio -i -F ../boot.img-ramdisk (extract the ramdisk in the tmp folder to have a clean environment)
- Edit the file init.rc and find the line ## Daemon processes to be run by init.
- After the second ##
- Insert the folowing four lines:
- service superboot /system/bin/sh /superboot/superboot.sh
- class main
- user root
- group root
- oneshot
- Save the file and quit
- $ mkdir superboot
- Create the files:
- superboot/superboot/su
- superboot/su
- superboot/superboot.sh
- superboot/Superuser.apk
- $ find . | cpio -o -H newc | gzip > ../newramdisk.gz
- $ cd ..
- $ ./mkbootimg --kernel boot.img-kernel --ramdisk newramdisk.gz --cmdline 'console=ttyFIQ0 no_console_suspend' --base 0x30000000 --pagesize 4096 --output newboot.img
Content of superboot.sh should be:
mount -o rw,remount -t ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system rm /system/bin/su rm /system/xbin/su mkdir /system/xbin cat /superboot/su>/system/xbin/su chmod 6755 /system/xbin/su cat /superboot/Superuser.apk>/system/app/Superuser.apk mount -o ro,remount -t ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system
To verify that ext4 /dev/block/platform/s3c-sdhci.0/by-name/system is the right filesystem on future versions of Android you can type:
- > adb shell
- shell@android:/ $ mount
This will show a list of al all filesystems on your phone.
Flash the new image to your phone
On Windows:
Verify it works before flashing
- >fastboot.exe boot newboot.img
Flash image
- >fastboot.exe flash boot newboot.img
- >fastboot.exe reboot
Additional information
How to compile mkbootimg
- Get Android source code: http://source.android.com/source/downloading.html
- $ cd /path/to/android-src
- $ cd system/core/libmincrypt/
- $ gcc -c *.c -I../include
- $ ar rcs libmincrypt.a *.o
- $ cd ../mkbootimg
- $ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a
- $ cd ../cpio
- $ gcc mkbootfs.c -o mkbootfs -I../include
copy system/core/mkbootimg/mkbootimg, system/core/cpio/mkbootfs to a directory in your path. location: tools/mkbootimg/mkbootimg.c
Additional links
Fastboot
Commandline parameters
- AndroidSU.com - The Superuser app for Android's homepage
- The Android boot process from power on
- ClockworkMod Homepage
- ClockworkMod Android Market
- HOWTO: Unpack, Edit, and Re-Pack Boot Images
- How-To: compile the Nexus S kernel from source
- Romdump (So you've decided to
steal cabledump your ROM)
<google>ENGELSK</google>