FORUMS
Remove All Ads from XDA

[ROOT REACHED] Rooting Android N Preview 2/3/4 - Preview 3/4 rooted

1,711 posts
Thanks Meter: 2,402
 
Post Reply Email Thread
I am sharing the progress of my work, so you can help make our devices working seamlessly with root
Android Preview N sources have been published so I built a kernel from them

Modifications:
Removed dm_verity (zImage and ramdisk dependencies)
Built with Permissive selinux (command line)

Status N preview 2:
root working
mount RW working
although packaged as selinux permissive is still enforcing what causes some problems like not recognition SIM card, reboots and startup delays.
in some tests by adding only sepolicy patch he presented this problem

How to install:
flash recovery FOTA partition thanks to @shoey63
Code:
fastboot flash recovery recovery.img
make full backup in recovery to return later
flash my kernel (rename to boot.img)
Code:
fastboot flash boot boot.img
flash @Chainfire SuperSU 2.71 via TWRP

Note:
Android N Preview use new bootloader!
To enter the menu unplug the appliance plug the USB cable into your computer or charger and plug the device by holding volume up
Navigate the menu and choose the desired option

github repository

Update N preview 3:
Root post SuperSU 2.74-2 working in preview 3 thanks @shoey63
Quote:
Originally Posted by shoey63

Guys, please follow instructions EXACTLY.
- Use flashtool to flash This FTF fromThis thread
- Fastboot a recovery image. (There is one in the OP, and it works)
- Reboot to recovery mode in the N Preview 3 bootloader menu using buttons.
- Install SuperSU-v2.74-2-20160519174328.zip
- Let the device boot. You can re-enter recovery using a reboot app.

Also please note:
- Do NOT attempt to flash a "system root" SuperSu zip. I Have tried and the phone wont fully boot.
- Do NOT flash byeselinux, you will get a kernel panic, and end up back in recovery. (Same goes for RecRoot)
- Do NOT expect all apps working on LP or MM to work properly on N-Preview.
- Do NOT use F-Droid Adaway, use the one from This thread, and flash the AdAway_systemless_hosts_v2.zip from the that threads OP before installing the app.

Please do not spam
.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20160425-213114.png
Views:	6182
Size:	149.0 KB
ID:	3730680  
The Following 14 Users Say Thank You to Gustavo RD78 For This Useful Post: [ View ] Gift Gustavo RD78 Ad-Free
 
 
26th April 2016, 05:34 AM |#2  
Senior Member
Flag Gelsenkirchen
Thanks Meter: 31
 
More
Also for locked bootloader right?

Gesendet von meinem D6603 mit Tapatalk
26th April 2016, 08:29 AM |#3  
gregbradley's Avatar
Forum Moderator
Flag Probably marking work or drinking beer...Maybe both
Thanks Meter: 6,574
 
Donate to Me
More
Quote:
Originally Posted by Maddinuser

Also for locked bootloader right?

Gesendet von meinem D6603 mit Tapatalk

Of course not.....

This is a developer section, please only post here if you can help this project go forward.
The Following 2 Users Say Thank You to gregbradley For This Useful Post: [ View ] Gift gregbradley Ad-Free
26th April 2016, 02:11 PM |#4  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,729
 
Donate to Me
More
Quote:
Originally Posted by Gustavo RD78

I am sharing the progress of my work, so you can help make our devices working seamlessly with root
Android Preview N sources have been published so I built a kernel from them....

First of all, good work getting the repo up and fixing the build errors so that we can compile the kernel.
We are faced with two main issues.
1/ - Chainfire's systemless root patches the sepolicy in the ramdisk, and in the process borks recognition of the sim card and causes reboots.
This doesn't occur on Nexus devices which he supports, so it is unlikely he will look at it for the z3 N preview.
2/ - If we try to bypass the need to patch the sepolicy, we need system root. This requires the kernel to be set to permissive.
However, trying to set it in the kernel or the command line doesn't work, because the /init binary sets it back to enforcing during boot.

So we need a hacked init binary or an update to Supersu.
Or something else? Any ideas?
The Following 3 Users Say Thank You to shoey63 For This Useful Post: [ View ] Gift shoey63 Ad-Free
26th April 2016, 05:11 PM |#5  
Chainfire's Avatar
Moderator Emeritus / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 87,905
 
Donate to Me
More
Quote:
Originally Posted by shoey63

First of all, good work getting the repo up and fixing the build errors so that we can compile the kernel.
We are faced with two main issues.
1/ - Chainfire's systemless root patches the sepolicy in the ramdisk, and in the process borks recognition of the sim card and causes reboots.
This doesn't occur on Nexus devices which he supports, so it is unlikely he will look at it for the z3 N preview.
2/ - If we try to bypass the need to patch the sepolicy, we need system root. This requires the kernel to be set to permissive.
However, trying to set it in the kernel or the command line doesn't work, because the /init binary sets it back to enforcing during boot.

So we need a hacked init binary or an update to Supersu.
Or something else? Any ideas?

If you want support from my end you need to provide all the necessary info (logs, anything helpful you can think of) in the SuperSU threads or forum.
The Following 17 Users Say Thank You to Chainfire For This Useful Post: [ View ]
27th April 2016, 01:41 PM |#6  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,729
 
Donate to Me
More
Quote:
Originally Posted by Chainfire

If you want support from my end you need to provide all the necessary info (logs, anything helpful you can think of) in the SuperSU threads or forum.

Here are all the logs I could gather, plus the the ramdisk and kernel parts for anyone to peruse and offer feedback. I will post them in Chainfire's main thread as well.logs.zip
The Following 5 Users Say Thank You to shoey63 For This Useful Post: [ View ] Gift shoey63 Ad-Free
1st May 2016, 01:39 AM |#7  
shafiq01's Avatar
Senior Member
Thanks Meter: 110
 
More
Have you tried Tobias waldvogels script already? And supersu beta 2.71

Sent from my 10ZE45RG99QY86B1 using XDA-Developers mobile app

---------- Post added at 02:39 AM ---------- Previous post was at 02:28 AM ----------

http://forum.xda-developers.com/show...php?p=64990566

Sent from my 10ZE45RG99QY86B1 using XDA-Developers mobile app
1st May 2016, 01:30 PM |#8  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,729
 
Donate to Me
More
Quote:
Originally Posted by shafiq01

Have you tried Tobias waldvogels script already? And supersu beta 2.71

Sent from my 10ZE45RG99QY86B1 using XDA-Developers mobile app

---------- Post added at 02:39 AM ---------- Previous post was at 02:28 AM ----------

http://forum.xda-developers.com/show...php?p=64990566

Sent from my 10ZE45RG99QY86B1 using XDA-Developers mobile app

I'm very interested in that method of patching the kernel, in particular the way a TA backup can be incorporated to restore full functionality of the DRM keys. However, we need to wait for Chainfire to release a new version to accommodate Sony's sepolicy (and maybe /init?) for N preview. 2.71 is not working properly as stated above.
20th May 2016, 06:33 AM |#9  
gregbradley's Avatar
Forum Moderator
Flag Probably marking work or drinking beer...Maybe both
Thanks Meter: 6,574
 
Donate to Me
More
This is a development thread. Posts just saying "I have just updated" or "how do i update to this" do not belong here.

Thread cleaned
The Following 3 Users Say Thank You to gregbradley For This Useful Post: [ View ] Gift gregbradley Ad-Free
20th May 2016, 03:04 PM |#10  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,729
 
Donate to Me
More
We have a breakthrough!
SuperSU 2.74-2 successfully roots N-3 preview in system-less mode. R/W access to /system as well. I will post a flashable zip for testing over the weekend.
No need for a flashable zip. N-Preview 3 FTF has been posted Here
The Following 17 Users Say Thank You to shoey63 For This Useful Post: [ View ] Gift shoey63 Ad-Free
21st May 2016, 02:21 PM |#11  
Senior Member
Flag Bucharest
Thanks Meter: 54
 
More
Quote:
Originally Posted by shoey63

We have a breakthrough!
SuperSU 2.74-2 successfully roots N-3 preview in system-less mode. R/W access to /system as well. I will post a flashable zip for testing over the weekend.

waiting for testing
Post Reply Subscribe to Thread

Tags
root android n preview sony
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes