mods please close thread

Status
Not open for further replies.

timstanley1985

Senior Member
Sep 23, 2010
291
182
0
London
How to compile TWRP recovery?

I followed the guide here http://rootzwiki.com/topic/23903-how-to-compile-twrp-from-source/

To summarize...

1. Install Linux
2. Set up CM10 build environment - this is sssssooooo easy and there are loads of guides available with just a simple google search.
3. Repo sync
4. Build standard cm10 from source
5. Delete the contents of the ~/android/system/bootable/recovery and replace with https://github.com/TeamWin/Team-Win-Recovery-Project/ - i just clicked on the download zip button on the top left and unzipped into the folder but am sure there is a proper way of doing this... zip clone???
6. gedit ~/android/system/device/samsung/galaxys2-common/recovery.rc and add: export LD_LIBRARY_PATH .:/sbin
7. gedit ~/android/system/device/samsung/n7000/BoardConfig.mk and add the following to the bottom of the file

#twrp
DEVICE_RESOLUTION := 800x1280

8. cd ~/android/system
9. make -j3 bootimage (if you have a quad core processor make -j5 bootimage)
10. you can find your boot.img at ~/android/system/out/target/product/n7000
11. Copy to SDCARD and flash with mobile odin
12. Done!!!!!
 

beerbong

Inactive Recognized Developer
Jun 1, 2009
1,623
7,588
0
Palma
Finally here, good work. Will try it as i'm already using TWRP in my N7.

Enviat des d'es meu Nexus 7 amb so Tapatalk2
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,085
0
Owego, NY
Team Win Recovery Project 2.3 for Galaxy Note (CM10 only)

If you do not know what TWRP is, click here first...... now you know what TWRP is (and how very cool it is!!!) we can continue.

Foreword:

I have looked at those with devices with TWRP with envy for the entire time i have owned a Galaxy Note and have been waiting patiently for an experienced Dev to compile a version for the N7000. After a year of ownership this has not happened so i have decided to go ahead and do it myself!!

Why have you called this a proof on concept?

For a few reasons:

1. I am not an experienced Dev... i have built CM6, 7 and 10 from source and done all the usual tweaks to my android devices but that is where my experience ends. This in itself is no big deal in its self but leads me to point 2...
2. This recovery may have MMC_CAP_ERASE / Brick Bug! I do not know how to check if it is present or not! Until an experienced Dev confirms MMC_CAP_ERASE has been fully suppressed you should assume this recovery is dangerous. As soon as an experienced Dev confirms the recovery is safe i will update this post. If it is confirmed it is not safe i will remove all links
3. I unfortunately to do not have time to maintain this recovery. As Samsung recoveries are included in the boot.img (kernel) it will mean the recovery will need recompiling every time a change is merged to the kernel in CM10. As development is still very active on the N7000 kernel i cannot make the commitment to recompile this that often
4. I am not a kernel Dev therefore i can only compile stock kernel with TWRP recovery. We all love (me included) a custom kernel with all the normal tweaks, OC etc. etc. I will never be able to achieve this so want to use this as the seed for somebody else to take and use to build there own custom kernel with TWRP recovery
5. It needs more extensive testing.... I have been playing with it for an hour this morning and everything seems to work fine but needs more testing.

I have included how to compile TWRP in post two... did i hear someone say enough talking, i want to try this out!!!

How to install

I have attached the boot.img at the bottom of this post.

1. Download
2. Copy to SDCARD
3. Flash with Mobile Odin
4. Enjoy!!



Please remember: This recovery may contain MMC_CAP_ERASE / Brick Bug! I do not known how to check! It is built from CM10 sources and there are TWRP ports for other devices so should be safe but i cannopt be positive! Use at your own risk!

Experienced Dev's: Any feedback on whether this recovery is safe would be VERY gratefully received!

As soon as any confirmation of this recovery being unsafe i will remove link immediately!
Based on item #4 (this is using a stock kernel repacked with a new recovery) - it will not be safe for flashing things.

For wipes and backups, it depends on exactly how you built it. Run strings on the binary...

Code:
strings recovery |grep MMC
If you see
Code:
warning: %s: Wipe via secure discard suppressed due to bug in EMMC firmware
The recovery binary is safe to do wipes/backups with, but as said above, if you used a stock kernel, it will be dangerous to flash ZIPs.

Also, of course, as this is a galaxys2-family device, the moment you flash anything containing a new kernel, TWRP will be gone.
 

timstanley1985

Senior Member
Sep 23, 2010
291
182
0
London
Sorry, I should have been clearer. When I say stock kernel I mean stock CM10 kernel. This recovery is built by deleting the /bootable/recovery/ folder and replacing it with TWRP recovery. The rest of the build is standard CM10.



Sent from my GT-N7000 using XDA Premium HD app
 

Moe5508

Senior Member
Jun 18, 2007
3,037
312
213
www.manicorp.com
Some usage feedback: I found it quite hard navigating through a folder filled with many sub-folders and files to select what I want to flash...quite jerky UI and a lot different from the experience I get on my TWRP-recoveried tablet.
But great initial release dev - really, well done!
 

alharaka

Senior Member
Mar 29, 2011
62
14
0
And is this Heimdall flashable or do you strictly recommend Odin only? I have never used Odin since it is blackbox and everyone I knew has been recommending Heimdall. I know the former is designed to best-case mimic the latter, but just want to cover all my bases.
 

alharaka

Senior Member
Mar 29, 2011
62
14
0
Alright will give it a go. Thanks for the quick reply.
Yeah, so maybe I did not understand entirely but when I flashed I got a success with Heimdall 1.3.1 CLI on OS X (10.6.8).

Code:
my-bacbook-pro:~ root# heimdall flash --recovery /Users/myusername/Downloads/boot.img --verbose
Heimdall v1.3.1, Copyright (c) 2010-2011, 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...
      Manufacturer: "SAMSUNG"
           Product: "Gadget Serial"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 021B
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 83
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0200
          polling interval: 00
Claiming interface...
Setting up interface...

Checking if protocol is initialised...
Protocol is not initialised.
Initialising protocol...
Handshaking with Loke...

Beginning session...
Session begun with device of type: 131072

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

Uploading RECOVERY
0%File Part #0... Response: 0  0  0  0  0  0  0  0 

2%
File Part #1... Response: 0  0  0  0  1  0  0  0 

5%
File Part #2... Response: 0  0  0  0  2  0  0  0 

7%
File Part #3... Response: 0  0  0  0  3  0  0  0 

10%
File Part #4... Response: 0  0  0  0  4  0  0  0 

12%
File Part #5... Response: 0  0  0  0  5  0  0  0 

15%
File Part #6... Response: 0  0  0  0  6  0  0  0 

18%
File Part #7... Response: 0  0  0  0  7  0  0  0 

20%
File Part #8... Response: 0  0  0  0  8  0  0  0 

23%
File Part #9... Response: 0  0  0  0  9  0  0  0 

25%
File Part #10... Response: 0  0  0  0  A  0  0  0 

28%
File Part #11... Response: 0  0  0  0  B  0  0  0 

31%
File Part #12... Response: 0  0  0  0  C  0  0  0 

33%
File Part #13... Response: 0  0  0  0  D  0  0  0 

36%
File Part #14... Response: 0  0  0  0  E  0  0  0 

38%
File Part #15... Response: 0  0  0  0  F  0  0  0 

41%
File Part #16... Response: 0  0  0  0  10  0  0  0 

44%
File Part #17... Response: 0  0  0  0  11  0  0  0 

46%
File Part #18... Response: 0  0  0  0  12  0  0  0 

49%
File Part #19... Response: 0  0  0  0  13  0  0  0 

51%
File Part #20... Response: 0  0  0  0  14  0  0  0 

54%
File Part #21... Response: 0  0  0  0  15  0  0  0 

57%
File Part #22... Response: 0  0  0  0  16  0  0  0 

59%
File Part #23... Response: 0  0  0  0  17  0  0  0 

62%
File Part #24... Response: 0  0  0  0  18  0  0  0 

64%
File Part #25... Response: 0  0  0  0  19  0  0  0 

67%
File Part #26... Response: 0  0  0  0  1A  0  0  0 

70%
File Part #27... Response: 0  0  0  0  1B  0  0  0 

72%
File Part #28... Response: 0  0  0  0  1C  0  0  0 

75%
File Part #29... Response: 0  0  0  0  1D  0  0  0 

77%
File Part #30... Response: 0  0  0  0  1E  0  0  0 

80%
File Part #31... Response: 0  0  0  0  1F  0  0  0 

83%
File Part #32... Response: 0  0  0  0  20  0  0  0 

85%
File Part #33... Response: 0  0  0  0  21  0  0  0 

88%
File Part #34... Response: 0  0  0  0  22  0  0  0 

90%
File Part #35... Response: 0  0  0  0  23  0  0  0 

93%
File Part #36... Response: 0  0  0  0  24  0  0  0 

96%
File Part #37... Response: 0  0  0  0  25  0  0  0 

98%
File Part #38... Response: 0  0  0  0  26  0  0  0 

100%
RECOVERY upload successful
Ending session...
Rebooting device...
But I rebooted and was back in ClockwordModRecovery 6.1.2. Did I misunderstand the directions? Sorry, my first time using Heimdall to write to my device; last few times I just detect'n'dump-ed to avoid destroying my phone because it was unnecessary.
 

alharaka

Senior Member
Mar 29, 2011
62
14
0
I'll give that a try. Who knows what the deal is then.
Ok, so I configured Mobile ODIN Lite (thanks for the pointer, by the way, amazing app I thought I had to pay for when I saw it a few weeks ago; had no idea I could test a lite version on XDA, sweet). So, installed it and got the N7000 add-on. What partition do I work with: Hidden?
 

timstanley1985

Senior Member
Sep 23, 2010
291
182
0
London
Just click open file, select the boot.img and then scroll down and click flash image.

You click yes to confirm and then it will flash and reboot

Sent from my GT-N7000 using XDA Premium HD app
 
  • Like
Reactions: alharaka

alharaka

Senior Member
Mar 29, 2011
62
14
0
Just click open file, select the boot.img and then scroll down and click flash image.

You click yes to confirm and then it will flash and reboot

Sent from my GT-N7000 using XDA Premium HD app
Sorry for all the silly questions, and thanks again. I just wanna be sure since the recovery, well, makes mistakes less serious and I rely on it heavily. Once that is broken fixing my phone will get much more technical than I have time for.
 
Status
Not open for further replies.