越过Samsung bootloader lock烧写custom kernel

首先,阅读一些解锁必须要知道的事

http://wiki.cyanogenmod.org/w/Install_CM_for_n7000


工具准备过程:

(以下内容是google出来的,在我的编译过程中,找不到libusb-1.0但ldconfig -p | grep libusb却明明确确的摆在那,又重装了一个。。。

在重新编译heimdall过程中,提到libusb.h没定义LIBUSB_LOGXXX等等没有定义。。。。一看。。。。的确没定义。。。。哎。。。。

http://libusb.sourceforge.net/api-1.0/libusb_8h_source.html 的内容替换 /usr/include/libusb-1.0/libusb.h )

如果是在MAC上,要关闭以下几个三星驱动才能刷

http://blog.scott.wallace.sh/2012/03/getting-heimdall-to-work-on-your-mac.html


There is a bunch of information about doing this already.  I'm just documenting what I steps I took to do this under Linux.

First, I got the Heimdall 64 bit binary.  This would not run, not sure why:

wskellenger@marquette ~/utils $ ./heimdall
bash: ./heimdall: No such file or directory


Even as root, it refused to do anything useful:

wskellenger@marquette ~/utils $ sudo ./heimdall

Okay, so I downloaded the 32 bit version.

wskellenger@marquette ~/utils $ ./heimdall
./heimdall: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory


I don't really understand this either, as I have libusb:

 wskellenger@marquette ~/utils $ sudo ldconfig -v | grep libusb
/sbin/ldconfig.real: Can't stat /lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Can't stat /usr/lib/i686-linux-gnu: No such file or directory
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
    libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
/sbin/ldconfig.real: Cannot stat /usr/lib/x86_64-linux-gnu/libnss_db.so    libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
: No such file or directory
    libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
    libusb-0.1.so.4 -> libusb.so
/sbin/ldconfig.real: Cannot stat /usr/lib32/libnss_db.so: No such file or directory
    libusbmuxd.so.1 -> libusbmuxd.so.1.0.7


After some Googling around and coming up empty, I just decided to build heimdall from source.  This was easy enough.

cd ~/Projects
git clone https://github.com/Benjamin-Dobell/Heimdall.git
cd Heimdall
git checkout v1.4.1RC2

Now you should have all of the sources you need to build.  The following instructions are from the Heimdall README. 

wskellenger@marquette ~/Projects/Heimdall $ cd libpit
wskellenger@marquette ~/Projects/Heimdall/libpit $ ./configure
wskellenger@marquette ~/Projects/Heimdall/libpit $ make
wskellenger@marquette ~/Projects/Heimdall/libpit $ cd ..
wskellenger@marquette ~/Projects/Heimdall $ cd heimdall
wskellenger@marquette ~/Projects/Heimdall/heimdall $ ./configure
wskellenger@marquette ~/Projects/Heimdall/heimdall $ make

wskellenger@marquette ~/Projects/Heimdall/heimdall $ sudo make install

You'll see this message after doing the install, do what it says:

 IMPORTANT - You must reboot your machine or execute the following as root:
service udev restart


If you want the frontend, also do:

wskellenger@marquette ~/Projects/Heimdall/heimdall-frontend $ qmake-qt4 heimdall-frontend.pro
wskellenger@marquette ~/Projects/Heimdall/heimdall-frontend $ make
wskellenger@marquette ~/Projects/Heimdall/heimdall-frontend $ sudo make install


That's it.  If you type 'heimdall' at a prompt now you should see some stuff on the screen.

Now, I took a brand new SGS3, and pressed HOME (the single button), Volume DOWN, and POWER at the same time.  You will feel a small buzz of the vibrator, and then see a screen about how this is dangerous and so forth.  Press volume UP to proceed.

At this point you'll see just our little green android guy and an indication that it is "Downloading...", but we haven't done anything yet.

Let's get the recovery installed first.  First I checked to see if anything from Samsung was connected.  Indeed there was:

 wskellenger@marquette ~/Projects/Heimdall/heimdall $ sudo lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 04e8:685d Samsung Electronics Co., Ltd 
Bus 001 Device 003: ID 2635:0601  
Bus 001 Device 004: ID 0a5c:21d7 Broadcom Corp. 
Bus 001 Device 005: ID 0c45:6495 Microdia 


Now I just moved the clockworkmod image that I downloaded from here over to my utils directory.

wskellenger@marquette ~/utils $ mv ~/Downloads/recovery-clockwork-6.0.2.3-d2att.img .

I also renamed it to recovery.img, probably isn't necessary but I did so anyway:

wskellenger@marquette ~/utils $ mv recovery-clockwork-6.0.2.3-d2att.img recovery.img

Now let's try to flash it with Heimdall:

wskellenger@marquette ~/utils $ heimdall flash --recovery recovery.img --no-reboot
Heimdall v1.4 RC2

Copyright (c) 2010-2012, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Attempt failed. Detaching driver...
Claiming interface again...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.

Initialising protocol...
Protocol initialisation successful.

Beginning session...

This device may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
Releasing device interface...
Re-attaching kernel driver...


At this point I just tried to reboot the device into recovery to see if I had CWM installed or not.  I popped the battery out to get out of the previous download mode.  Maybe there is a better way to do this, not sure.  Now reboot into recovery.  Hold Volume UP, HOME, and POWER.  When you feel the small vibration, keep holding for a little while longer.  You will see the SGS3 logo and then hopefully boot into CWM recovery.

Once inside CWM, the first thing I'm going to do is a Nandroid backup of this baby.  Go to backup and recovery and select backup.  This will take a little while so be patient.  In the meantime I'll download CM10.

Edit 6-May-2013:  If you just want to root your device, and keep the stock Samsung ROM, at this point you cansideload the UPDATE-SuperSU-v1.xx.zip file available here.  After this, reboot, check to see if the SuperSU app is installed, and you're done.

Okay, back to installing CM 10.  I went with one of the 10.1 monthly release snapshots, available at http://get.cm.

Now that you've got the CM package and you've made a backup, we can sideload the CM10 .zip file onto the device.  First let's see if we can see the device or not:

wskellenger@marquette ~/utils $ adb devices
List of devices attached 
3c1b4cf7    recovery


Pretty sweet.  Let's go to 'install zip  from sideload' in the Clockworkmod menu.  The screen should show:

Sideload started ...
Now send the package you want to apply
to the device with "adb sideload <filename>" ...

So, let's do that:

wskellenger@marquette ~/Downloads $ adb sideload cm-10.1-20130121-EXPERIMENTAL-d2att-M1.zip 
sending: 'sideload'  100% 


After this you'll see the phone open and install the update automatically.  This is pretty sick.  We also need gapps so let's download and install that the same way.  I got gapps from goo.im.

Again, select "install zip from sideload", and adb sideload the gapps package:

wskellenger@marquette ~/Downloads $ adb sideload gapps-jb-20121212-signed.zip sending: 'sideload'  100% 

That's pretty much it folks.  I actually did a wipe data, wipe cache, wipe dalvik.  After that I feared that I perhaps undid the gapps installation so I installed gapps again after this.  Then I did "reboot system now" and unplugged the USB cable.

Booyah, I'm seeing the familiar CyanogenMod bootscreen. 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值