SODP General Treble Build Guidance - Sony Xperia XZ Premium Guides, News, & Discussion

SODP General Treble ROM Build Guidance​
I'm so sorry, I don‘t have enough time to build a treble ROM every week, I decide to write this guide.​
Support devices:​Xperia X, Xperia X Performance, Xperia X Compact
Xperia XZ, Xperia XZs. Xpeira XZ Premium​
Principle​SODP team has done everything to Go treble on AOSP Pie. So if you want to go treble, you need only to do a little work.The key is to enable VNDK and provide a Vendor partition.
As is known to us, there are many partitions exist in our devices. But not all of them are necessary for AOSP. 300KB disk space is enough for our AOSP cache partiton, but sony give us more than 300MB. It's a waste of disk space. Besides, all of these devices I mentioned support Qnovo charging technology, there is a partition in our phone named Qnovo for this stock function. It about 10~30MB. But we don't need it on AOSP. So we can use these two partition to Go Treble.
How to go treble​We need to use cache partition as vendor partition and Qnovo partition as cache partition.
I'll take Maple as an example. How to modify devices tree to support treble.​Enable VNDK​Maple's Devices tree: Link​ We need to add vndk modules config in device.mk. See picture.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Add new partition table config​Yoshino's Devices tree: Link​First Step:
For maple, we need to add partition table config in BoardConfig.mk..
Notice: Because Yoshino platform has 3 devices. XZ1 and XZ1C has a vendor partition. The partition table config is in devices's BoardConfig.mk. For tone and loire platform, all of their devices has the same partition table. Their partition table config is in platform devices tree's PlatformConfig.mk.
The cache and vendor partitions' size shoud depend on phone's actual size. You can use my config. I had set it smaller than actual size.
See picture:
Second Step:
For maple, we need to modified fstab in Yoshino platform device tree, the path is: rootdir/vendor/etc/fstab_legacy.yoshino.
See picture:
Third Step:
We need to modified selinux policy in Yoshino platform device tree, the path is: sepolicy_platform/file_contexts.
See picture:
Fifth Step:
To avoid SELinux policy errors and fail to boot, we'd better to set selinux=permissive in BoardConfig.mk or PlatformConfig.mk.
Modify kernel fstab config​For maple the path is arch/arm64/boot/dts/qcom/msm8998-yoshino-maple_common.dtsi
Notice: For tone and loire platform, you need to find the platform common config in the same floder, like msm8996-tone-common.dtsi, msm8952-loire-common.dtsi
You need to set right vendor path and status, just like configs of system and oem partition
After doing this, you can build a treble ROM​
By Sjll
2019.2.15

Say, what does Qnovo really do on our devices? Since you stated that we don't need it on AOSP... does it mean it's not supported on AOSP, or it has little impact on charging?
Since I'm testing eXistenZ for the time being (until we were able to get upstream fixes for current Treble-related issues), I'm afraid I might have broken Qnovo if I did a wipe with your version of TWRP recovery (since you pointed Qnovo partition as cache). good side is that it can backup OEM partition which is very helpful...

LSS4181 said:
Say, what does Qnovo really do on our devices? Since you stated that we don't need it on AOSP... does it mean it's not supported on AOSP, or it has little impact on charging?
Since I'm testing eXistenZ for the time being (until we were able to get upstream fixes for current Treble-related issues), I'm afraid I might have broken Qnovo if I did a wipe with your version of TWRP recovery (since you pointed Qnovo partition as cache). good side is that it can backup OEM partition which is very helpful...
Click to expand...
Click to collapse
I guess Qnovo is a partition to save Qnovo charging program's data. We don't need it on AOSP. It may be a data or cache partition for Qnovo. Never worried about Qnovo is broken. If you use flashtool, you will find there is a opinion for Qnovo in WIPE menu, it could be erasable

Sjll said:
I guess Qnovo is a partition to save Qnovo charging program's data. We don't need it on AOSP. It maybe a data or cache partition for Qnovo. Never worried about Qnovo is broken. If you use flashtool, you will find there is a opinion for Qnovo in WIPE menu, it could be erasable
Click to expand...
Click to collapse
Thanks for pointing out... I use Flashtool but I didn't really pay attention to that (I only paid attention to userdata in the WIPE section since it's the only thing I might need to wipe under some circumstances)...
So that partition (Qnovo) is just like userdata and cache partition and can be used for other purposes as well... Yeah, this makes it a good candidate for cache (now the original cache partition has become vendor). That's good to hear.
EDIT: On the other hand... is it currently possible to do a stock-based bringup using this guide, if there are available kernel source targeting stock Pie ROM?

hello sir im a total noob here
just want to ask if where exactly can i find this arch/arm64/boot/dts/qcom/msm8998-yoshino-maple_common.dtsi

dennis2wewwew said:
hello sir im a total noob here
just want to ask if where exactly can i find this arch/arm64/boot/dts/qcom/msm8998-yoshino-maple_common.dtsi
Click to expand...
Click to collapse
The dtsi file is in the kernel tree. If you have cloned the kernel source, you can find it there.

I tried to do the build for x compact but it fails with unfinded files, what branch do I have to checkout? Pie-gsi?

nervousapp said:
I tried to do the build for x compact but it fails with unfinded files, what branch do I have to checkout? Pie-gsi?
Click to expand...
Click to collapse
You should modify the device tree based on SODP 9.0. The branch you checkout should according to the guidance on Sony developer website. Check your source code. If you do right steps, there is no error.

Is there any detailed requirements (Compiler versions, JDK versions, etc.) about building SODP? I've attempted a few times in the past but not successful.
I'm using Manjaro Linux (Arch-based) so some compilers might be newer than expected, but I had no problems compiling a working CarbonROM 6.1 (Oreo) build (and I've done that a few times already).
1. The SODP guide suggested using OpenJDK8, but AOSP is shipping with a pre-built JDK9 which is being used in the compilation process. During compilation the java compiler printed quite a few warnings and affected parts won't work when flashing the finished image (that simply FCs). With host OpenJDK8 (by changing Java path manually to it), however, some components simply don't compile (errors).
2. AOSP also shipped with an outdated flex that required LC_ALL=C, but on my system, LC_ALL=C won't fix the build issue and can only be fixed by building my own flex binary, or cherry-picking a fixed copy from LineageOS repo. (I've mentioned it here once)
3. When compiling native codes, a lot of warnings are generated which I think did affect some components (including Java ones that depended on them).
Sorry, no detailed logs yet, though I probably have already posted some warnings I encountered during build process back then when I was attempting to build one... I'll try it again some time and put some warnings here (not all, as it's too many and the text limit per post won't allow that much).
I also suspect the now-deprecated JACK Server might have helped preventing a good amount of warnings from happening when building Oreo.

What kind of rom can you install after going into treble? Gsi? A? B? AB?
Thanks

nervousapp said:
What kind of rom can you install after going into treble? Gsi? A? B? AB?
Thanks
Click to expand...
Click to collapse
A-Only GSI.

Hi all,
I have successfully built the kernel and the rom for X compact but it doesn't boot. When I go to recovery I have the following error :
E:[libfs_mgr]dt_fstab: Failed to find type for partition vendor
When I look to the recovery logs last_kmsg I have some errors :
Missing clock-frequency property
The AUX2 clock cannot be found
msm_iommu 1f0000.qcom,iommu: invalid ressource
i2c-msm-v2 7af8000.i2c: error probe() failed with err:-517
Bus driver not ready
No such file or directory on system/etc/init , product/etc/init , odm/etc/init , vendor/etc/init
Some Command write Permission denied

nervousapp said:
Hi all,
I have successfully built the kernel and the rom for X compact but it doesn't boot. When I go to recovery I have the following error :
E:[libfs_mgr]dt_fstab: Failed to find type for partition vendor
When I look to the recovery logs last_kmsg I have some errors :
Missing clock-frequency property
The AUX2 clock cannot be found
msm_iommu 1f0000.qcom,iommu: invalid ressource
i2c-msm-v2 7af8000.i2c: error probe() failed with err:-517
Bus driver not ready
No such file or directory on system/etc/init , product/etc/init , odm/etc/init , vendor/etc/init
Some Command write Permission denied
Click to expand...
Click to collapse
Campare ur device tree with mine.
https://github.com/sjllls/device-sony-loire
https://github.com/sjllls/device-sony-suzu

I need to rebuild the kernel right ?

nervousapp said:
I need to rebuild the kernel right ?
Click to expand...
Click to collapse
Of course.

Succesfully built for x compact !!! It works with Pie GSI roms but get stuck at sony logo with Q GSI roms .... Is there a fix to do for that ? Also how do you compile twrp for the X ?
Thanks

Related

[TWRP] Recovery: V10_H901_pplus [V3.0.2-0] [08/16/2016]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
XDA:DevDB Information
TWRP Recovery, Tool/Utility for the T-Mobile LG V10
Contributors
Eliminater74
Version Information
Status: Beta
Created 2016-08-17
Last Updated 2016-08-16
V10_H901_TWRP_Recovery-recovery-signed.zip<---- Stock Theme
2
TWRP Theme Manager
CHANGELOG for 3.0.2-0:
-Fix a bug with the input box affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
-Add Greek translation to some builds.
CHANGELOG for 3.0.1-0:
-support new CM 13.0 pattern encryption (sultanqasim)
-fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
-libtar updated to latest upstream and fixes (jcadduono)
-fixes for loading custom themes (_that)
-TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
-translation updates - added Italian, Czech and Polish and significant updates to Dutch
-progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
-fix input box text display (Dees_Troy)
-reboot option after zip install complete (bigbiff)
-other mostly invisible bug fixes and improvements
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
CHANGELOG for 2.8.7-0:
-Initial ground work for software drawn keyboard (_that)
-Fix handling of wiping internal storage on datamedia devices (xuefer)
-Allow DataManager to set and read values from the system properties (xuefer)
-Fix crash when taking screenshots on arm64 devices (xuefer)
-Fix error message after an ORS script completes (Dees_Troy)
-Fix crashes / error when creating encrypted backups (_that, Dees_Troy)
-Add system read only option – more details below (Dees_Troy)
-Add resize2fs and GUI option to run resize2fs (Dees_Troy)
-Fix crash loop caused by empty lines in AOSP recovery command file (_that)
-Prevent duplicate page overlays such as multiple lock screens (mdmower)
Note: As always, be sure your custom theme is up to date (or remove your custom theme) before updating TWRP.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
DOWNLOAD:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Install Image" button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
Reserved More
Reserved Even More
Thanks ....
Sent from my SGH-T959V using XDA Free mobile app
Thanks @Eliminater74! Installed and works good...
A minor cosmetic bug: progress bar seems a little graphically broken during the animation.
I am not finished working on this. I still wanna fix the date and time issue.. I did manage to get it to read 2015 now. before it would only read 1971...........
I still wanna fix a few more things up.......... Just give me time.. it works good enough to release.. as for good enough to my liking, I say it needs more............
I had to make major changes to the current device tree that was used for this before. and I mean alot of changes.. so much was missing from the Makefiles..........
and many options off that should have been on..
Also, the One big system_image option is still not correct.. it should be listing more then 4gigs............... I will look into that..........
I just hope you all enjoy the new one.
Of course @Eliminater74, I only reported my observation to improve the piece of software.
Again, thanks for your work for us!
This phone is looking sexy now
8bitbang said:
This phone is looking sexy now
Click to expand...
Click to collapse
Yea it looks nice and attractive. However, with no developers working on any AOSP ROMs I have no reason to own this phone. I have a feeling this XDA thread is going to be filled with crickets soon. Although, Stock based ROM's seem to being just fine for this device. So props to the ones bringing us some leeway. Thing is, with the custom ROM that Eliminator brought us.... It has exposed installed which doesn't run with certain apps (like snapchat) I know I know, all you need to do is yadda yadda. Too much of a pain for me, exp. if you sign out then you got to start all over again.
Anyway, I love the speed ,size and feel of the phone. I could do without the 2nd screen and extra gimmicks. Time to switch to something else. Nice knowing you guys...
Eliminater74 said:
I am not finished working on this. I still wanna fix the date and time issue.. I did manage to get it to read 2015 now. before it would only read 1971...........
Click to expand...
Click to collapse
Now you're talking! :good:
Sent from my LG-H901 using XDA Labs
Ive been on v3.0.2-0 since I first installed your first MM V10 rom. Do I need to flash this version for anything?
appreciate all the work you have done, sorry to see you go. You were the last hope for this device. Guess its time to move on from LG for my next phone.
Can I just install with current TWRP ? It doesn't show as an image.. just a .zip.
Cant install this in recovery. Its a zip. Even tried flashify and stil a no go
8bitbang said:
This phone is looking sexy now
Click to expand...
Click to collapse
How did u install this. Its a zip and twrp cant flash it
joshualuna said:
How did u install this. Its a zip and twrp cant flash it
Click to expand...
Click to collapse
I installed the zip in TWRP and then installed a theme with the TWRP theme manager. Are you on the latest TWRP prior to installing this newer version? You can also use the flashify app from the google play store
---------- Post added at 05:34 AM ---------- Previous post was at 05:24 AM ----------
paulsg63 said:
Can I just install with current TWRP ? It doesn't show as an image.. just a .zip.
Click to expand...
Click to collapse
Install it in TWRP
8bitbang said:
I installed the zip in TWRP and then installed a theme with the TWRP theme manager. Are you on the latest TWRP prior to installing this newer version? You can also use the flashify app from the google play store
---------- Post added at 05:34 AM ---------- Previous post was at 05:24 AM ----------
Install it in TWRP
Click to expand...
Click to collapse
I tried installing it as a zip, but it gives me an error.
If I try as an image, it doesnt show up.
Should I rename it to an .img file or something?
Curious.
paulsg63 said:
I tried installing it as a zip, but it gives me an error.
If I try as an image, it doesnt show up.
Should I rename it to an .img file or something?
Curious.
Click to expand...
Click to collapse
You can choose either in twrp image or zip. Zip is default.
Sent from my LG-H901 using XDA-Developers mobile app
paulsg63 said:
I tried installing it as a zip, but it gives me an error.
If I try as an image, it doesnt show up.
Should I rename it to an .img file or something?
Curious.
Click to expand...
Click to collapse
Is the zip damaged?
Did you download it again?
Can you see the content of the zip?
Sent from my LG-H901 using XDA Labs

[Kernel+][Exynos] Kali NetHunter for the Galaxy Note 7

​
WARNING: When using custom kernels on the Note 7, never turn off developer options or OEM unlock. If you do, you will lose all your data and have to flash a full stock firmware restore to use your device again!
OKAY SO
This is Kali NetHunter 3.15.2 for the Galaxy Note 7.
If you don't know what Kali NetHunter is, well, it's the entire Kali Linux operating system in a chroot on your phone, plus a bunch of awesome apps for executing exploits, fixing things, doing cool things. It goes on, I suppose.
I'm gonna be honest guys, I'm not a security person. When it comes to security, I'm more of a Paul Blart.
What I do know though, is that there is apt-get, and apt-get is life.
Find much more information here: https://github.com/offensive-security/kali-nethunter/wiki
The answer to all your questions, generally the answer is YES, IT CAN DO THAT.
Most ROMs should be supported, as our installer uses a dynamic patching method on your current boot image!
The NetHunter installer zip will add a few files to your /system partition, and install all of the NetHunter apps to your /data partition.
The chroot is located in /data/local/nhsystem, so you don't have to worry about your system partition being full. It's full read/write capable.
Understand that the zip will replace your current kernel with a completely different one.
This is necessary because most stock or custom kernels don't provide the drivers needed to operate most of Kali NetHunter's features.
NetHunter also includes its own Busybox that gives you full large file support and some extra applets.
It will not overwrite your current one, and will happily install alongside it as busybox_nh.
DOWNLOAD
Current version: 3.15.2 (stable, 2016-11-04)
Please be careful to download the right version based on this table:
SM-N930F, SM-N930FD, SM-N930X: kernel-nethunter-gracelte-*
SM-N930K, SM-N930L, SM-N930S: kernel-nethunter-graceltekor-*
All others be sad.
For the apps, chroot, and everything other than just the kernel, you will also need to download:
nethunter-generic-arm64-*
See installation instructions before proceeding!
Downloads are available at: http://build.nethunter.com/nightly/
BEFORE INSTALLING
IMPORTANT: Kali NetHunter requires write access to your data partition!
This means that if your data partition is encrypted, you will need to use the [Format Data] button in TWRP to remove encryption.
This will delete all your data, including internal storage.
You should back everything up first before installing Kali NetHunter.
Samsung Smart Switch Mobile can be useful for this, and allows you to back up your apps to a location on an external SDcard.
Unfortunately it doesn't back up most app data.
The Kali chroot and apps are installed on your data partition (in /data/local/nhsystem for chroot). To initialize the chroot and install Kali Linux, you need to start the Kali NetHunter app.
The generic NetHunter installer will automatically install SuperSU. We try to keep it up to date, but it isn't always.
If you already have SuperSU or another root method installed, please simply delete the supersu.zip from the root of the zip file before installing it.
It's recommended that you restore or flash your ROM's original kernel before installing NetHunter.
FULL INSTALLATION STEPS
Install Team Win Recovery Project to your recovery partition.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Recommended: If you have a custom kernel or SuperSU installed, restore your stock kernel. (called Boot in TWRP)
This isn't entirely necessary, but you may need to flash the NetHunter kernel again if SuperSU replaces it.
If your data partition doesn't mount in TWRP:
Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Once your data partition is formatted, go to [Reboot] -> [Recovery].
Download the kernel-nethunter zip specific to your device.
Without exiting TWRP, transfer the NetHunter kernel installer zip to your device over MTP* and flash it using [Install] in TWRP.
If you wiped your data partition in step 2:
Go to [Reboot] -> [System].
Set up your phone by following the Android setup wizard.
Once it's set up, reboot back into recovery.
For new installations: Download the nethunter-generic-arm64-kalifs zip.
For upgrades: Download the update-nethunter-generic-arm64 zip.
Without exiting TWRP, transfer the NetHunter generic arm64 installer zip to your device over MTP* and flash it using [Install] in TWRP.
Go to [Reboot] -> [System].
Wait 2-5 minutes for your device to finish setting itself up.
Open the NetHunter app to initialize the environment
You're done!
* MTP, known as Media Transfer Protocol, is the same way you transfer files from your PC to your device when booted into system.
UPDATING TO A NEWER BUILD OR UPDATING YOUR ROM
Follow the installation steps above. NetHunter can be installed over itself as many times as you'd like.
If you don't want to lose your chroot, flash the smaller update-nethunter-generic-arm64 zip instead.
THE KERNEL
The NetHunter kernel for the Galaxy Note 7 is based on Samsung's OSRC N930SKSU2BPID kernel sources.
It has the following changes:
Carefully updated to Linux 3.18.44 (with dirtycow vulnerability patched)
SELinux permissive
F2FS updated to Jaeguek Kim's latest kernel.org f2fs-stable sources
F2FS formatted data partition support
Enabled USB (OTG) Atheros, Ralink, and Realtek WiFi drivers
FIOPS IO scheduler as default IO scheduler, SIO available
USB HID Gadget keyboard & mouse support
mac80211 packet injection support
DriveDroid compatibility
Additional drivers built in for the full Kali NetHunter experience
Data partition encryption disabled (not supported by custom kernels at the moment)
Kernel module support, insert your own modules!
CIFS, NFS available through included kernel modules
RAN INTO AN ISSUE OR BUG?
In order for me to help you, you have to at minimum reply with:
The link to the exact zip you downloaded
Your device model
The name of the ROM you're flashing it on
The version and build date of the ROM you're flashing it on
A complete description of your problem
If your issue is with a specific app, it might be better to contact the developer of that app.
For Kali NetHunter bugs/issues, you can open a ticket at: https://github.com/offensive-security/kali-nethunter/issues
If your issue is during the installation (ex. flashing the NetHunter zip), then please collect a TWRP recovery.log for me.
If you found a problem and were able to fix it, and no one's mentioned it in the thread already, it would be kind to state the issue and your fix for others to make use of as well.
You can join me and the other NetHunter developers on IRC at the #nethunter room on freenode to more handily diagnose problems together.
I apologize, but I can't do house calls at this time.
KNOWN ISSUES
USB Keyboard - The keyboard is unusable when using Google Keyboard as your input method. Switch to Hacker's Keyboard.
Reboot after 60 seconds - Sometimes when you boot your device it could reboot after 60 seconds because of a Samsung secure service not responding. Unresolved, but rare, and only happens within 60 seconds of a boot.
DEVELOPMENT
You can see the main branch of NetHunter's development on the Offensive Security GitHub: https://github.com/offensive-security/kali-nethunter
Note 7 NetHunter kernel source: https://github.com/jcadduono/android_kernel_samsung_universal8890/tree/nethunter-6.0
SCREENSHOTS
DISCLAIMER
I am not affiliated with Offensive Security. They seem like cool guys though.
I'm not even a novice when it comes to security and penetration. I'm just a simple system administrator with a passion for breaking Android.
Please restrain yourselves from asking me security related questions.
XDA:DevDB Information
Kali NetHunter for the Galaxy Note 7, Kernel for the Samsung Galaxy Note 7
Contributors
jcadduono, The Kali NetHunter team
Source Code: https://github.com/offensive-security/kali-nethunter
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: 3.15.2
Stable Release Date: 2016-11-04
Created 2016-09-28
Last Updated 2016-11-04
I'd like to use this second post here specifically to thank @Tkkg1994 for his work in finding out how to get custom kernels on the Note 7 to boot.
I've created a thread to guide new users and developers into Note 7 kernel development so that we can bring on the surge of custom development that XDA should be known for.
See: Looking to create your own custom kernel? Start here!
You'll even learn how to build and install the Kali NetHunter kernel yourself!
jcadduono said:
I'd like to use this second post here specifically to thank @Tkkg1994 for his work in finding out how to get custom kernels on the Note 7 to boot.
I'll be creating a thread soon to guide new users and developers into Note 7 kernel development so that we can bring on the surge of custom development that XDA should be known for.
Click to expand...
Click to collapse
well, i couldn't withstand from post this. its unrelated to this thread anyway but Thanks as always. Even the n7 is a new phone, am afraid more and more people will abandon the n7 community due to all the issue.
and than here you guys keep the community strong. could say more. massive respect.
Thank you very much good work
Sent from my SM-N930F using Tapatalk
Hey guys, I just updated to BPI9 now which has the September security patch, the 60% battery charge limit, and a constant popup notification telling you to swap your device for a new one.
Well guess what? Unintended side effect!
The popups are gone and it's charging past 60% lol.
SIr u are a legend...this is world of possibilites... thank you
Can this be flashed over any custom kernel or needs wipes and all??
umijani010 said:
SIr u are a legend...this is world of possibilites... thank you
Can this be flashed over any custom kernel or needs wipes and all??
Click to expand...
Click to collapse
It should be flashable over most custom kernels, and it will keep whatever configurations the previous kernel made to the ramdisk and system. If you have set a feature to a value that the NetHunter kernel does not support, the kernel should be smart enough to ignore it and use default for that.
In some cases you might run out of space on the boot image, but the installer will let you know and not flash it. In such a case you'll want to flash the stock kernel before flashing NetHunter again.
You should never need to wipe anything unless your data partition is encrypted.
jcadduono said:
Hey guys, I just updated to BPI9 now which has the September security patch, the 60% battery charge limit, and a constant popup notification telling you to swap your device for a new one.
Well guess what? Unintended side effect!
The popups are gone and it's charging past 60% lol.
Click to expand...
Click to collapse
Is it possible to create grern battery flash zip?
umijani010 said:
Is it possible to create grern battery flash zip?
Click to expand...
Click to collapse
While it is certainly possible trick the OS into thinking it has a safe battery, that's something I will never do. Sorry. Please exchange your Note 7 as soon as possible.
jcadduono said:
While it is certainly possible trick the OS into thinking it has a safe battery, that's something I will never do. Sorry. Please exchange your Note 7 as soon as possible.
Click to expand...
Click to collapse
See here is the thing .. i did exchange na have a new one and i can prove that if u want... but luckily i did get bpha and during start up i never turned on Wi-Fi so it didnt update. Reason being most of roms here are based on ph7 bootloader... but dur to travel i needed that
---------- Post added at 04:56 PM ---------- Previous post was at 04:54 PM ----------
jcadduono said:
While it is certainly possible trick the OS into thinking it has a safe battery, that's something I will never do. Sorry. Please exchange your Note 7 as soon as possible.
Click to expand...
Click to collapse
So basically i dont want to trick it... just to make it green
What's advantages to this kernel please
Is it better than the other custom kernel for battery and performance?
Sent from my SM-N930F using XDA-Developers mobile app
umijani010 said:
So basically i dont want to trick it... just to make it green
Click to expand...
Click to collapse
It looks like the BPI7 kernel sources are out now so I can merge in the battery check patch, assuming it's in the kernel (it really should be...)
ChimpNippl3s said:
What's advantages to this kernel please
Is it better than the other custom kernel for battery and performance?
Click to expand...
Click to collapse
Read the first post. Everything about the kernel is stated there, it's meant to be used with Kali NetHunter but you can use it standalone if you like. If you're not using it with Kali NetHunter then it serves little purpose other than to completely remove Knox and a very slight performance & battery boost over the stock kernel. (because its code isn't constantly being audited by TIMA/RKP)
It should be no slower and no faster than any other custom kernel, unless people start adding modifications to reduce or increase cpu clocks at the risk of loss of stability.
For the most part, battery differences between kernels are...not noticeable at all. If you notice a difference, it's probably because you've optimized your phone's idle state by rebooting and/or clearing running apps from memory after installing it.
Update: Whoa, I looked through BPI7 battery driver changes, it appears that they also added Qualcomm QuickCharge 3.0 support lol!
jcadduono said:
It looks like the BPI7 kernel sources are out now so I can merge in the battery check patch, assuming it's in the kernel (it really should be...)
Read the first post. Everything about the kernel is stated there, it's meant to be used with Kali NetHunter but you can use it standalone if you like. If you're not using it with Kali NetHunter then it serves little purpose other than to completely remove Knox and a very slight performance & battery boost over the stock kernel. (because its code isn't constantly being audited by TIMA/RKP)
It should be no slower and no faster than any other custom kernel, unless people start adding modifications to reduce or increase cpu clocks at the risk of loss of stability.
For the most part, battery differences between kernels are...not noticeable at all. If you notice a difference, it's probably because you've optimized your phone's idle state by rebooting and/or clearing running apps from memory after installing it.
Update: Whoa, I looked through BPI7 battery driver changes, it appears that they also added Qualcomm QuickCharge 3.0 support lol!
Click to expand...
Click to collapse
Cool ..thanks .. so the updated kernel can work with ph7 bootloader right? ...
QC 3 0 is not supported by Exynos is it?
umijani010 said:
Cool ..thanks .. so the updated kernel can work with ph7 bootloader right? ...
QC 3 0 is not supported by Exynos is it?
Click to expand...
Click to collapse
It should work just fine.
I'm not sure now, this is the Exynos kernel source. They added 12V input acceptance to the drivers, previously it was only 9V. They might have only labeled it as QC30 because it wasn't working properly before on QC3.0 chargers. I don't see QC3.0's dynamic voltage code in there, only the option to go between 5V 9V and 12V, so I guess it's mostly just faster charging support added that should work with QC2.0?
CSID shows my SDI battery only rated for 9V so I can't seem to get it to charge at 12V, it makes me wonder if these new replacement phones are rated for 12V and the reason people are saying they get hot is because...it's charging at 12V?
Okay it seems to be stable for me... Samsung has added a toggle to enable up to 80% battery in charging settings menu under device maintenance 3dot menu, so I don't think I'll be doing any trickery here as I agree with their decision to limit the battery to 80% and I don't want to put others at risk. I'll be updating it ASAP.
Can you please let me know if https://idlekernel.com/nethunter/gracelte/kernel-flasher-gracelte-1.0-20161001-1346.zip enables the green battery for you?
Update: New builds up, rebased to BPI7 and enabled green battery (on good battery) / 60% soft limit (on bad batteries)
Haven't run into the 60 second reboot on the new build, but maybe I've just been lucky.
Whoever rated the thread 1 star, you're a jerk.
jcadduono said:
Whoever rated the thread 1 star, you're a jerk.
Click to expand...
Click to collapse
And this is not related to your work, same happened to all the active thread of N7 development lol ! Keep up !
jcadduono said:
It should work just fine.
Okay it seems to be stable for me... Samsung has added a toggle to enable up to 80% battery in charging settings menu under device maintenance 3dot menu, so I don't think I'll be doing any trickery here as I agree with their decision to limit the battery to 80% and I don't want to put others at risk. I'll be updating it ASAP.
Can you please let me know if https://idlekernel.com/nethunter/gracelte/kernel-flasher-gracelte-1.0-20161001-1346.zip enables the green battery for you?
Update: New builds up, rebased to BPI7 and enabled green battery (on good battery) / 60% soft limit (on bad batteries)
Haven't run into the 60 second reboot on the new build, but maybe I've just been lucky.
Whoever rated the thread 1 star, you're a jerk.
Click to expand...
Click to collapse
Hello,
The kernel installed but the green battery did not show up....?
umijani010 said:
Hello,
The kernel installed but the green battery did not show up....?
Click to expand...
Click to collapse
Settings -> About device -> Software info -> Build number (what is it?)
You have to be on BPI7 or newer for the green battery feature to exist in your ROM framework!
jcadduono said:
Settings -> About device -> Software info -> Build number (what is it?)
You have to be on BPI7 or newer for the green battery feature to exist in your ROM framework!
Click to expand...
Click to collapse
Oh .. still running bph7.. so if there is flashable zip that may patch in rom framework that would be great.. ?
ANyway past that .. mine is replacement .. what can u use to check if it is 12V? or QC3.0
jcadduono said:
It looks like the BPI7 kernel sources are out now so I can merge in the battery check patch, assuming it's in the kernel (it really should be...)
Read the first post. Everything about the kernel is stated there, it's meant to be used with Kali NetHunter but you can use it standalone if you like. If you're not using it with Kali NetHunter then it serves little purpose other than to completely remove Knox and a very slight performance & battery boost over the stock kernel. (because its code isn't constantly being audited by TIMA/RKP)
It should be no slower and no faster than any other custom kernel, unless people start adding modifications to reduce or increase cpu clocks at the risk of loss of stability.
For the most part, battery differences between kernels are...not noticeable at all. If you notice a difference, it's probably because you've optimized your phone's idle state by rebooting and/or clearing running apps from memory after installing it.
Update: Whoa, I looked through BPI7 battery driver changes, it appears that they also added Qualcomm QuickCharge 3.0 support lol!
Click to expand...
Click to collapse
I think if a custom kernel can UV CPU/GPU, battery performance will be better. Phone also have lower temp - an important and sensitive thing now.
I can confirm this based on what I did on my ex-Note5, S6, Note4 ...
Sent from my SM-N930F using Tapatalk
Updated to BPID sources & Linux 3.18.43 as of last night. I'll be maintaining this until I have to send my device back, I suppose.

[MOD] Boot Bridge for Sony ELF

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
About the project
Boot Bridge for Sony ELF is born out of an idea to create support
of systemless tools like SuperSU on the Sony ELF bootimages.
The structure being different from regular Android boot partitions,
these tools never worked to edit the content of the boot image
present on devices like the Xperia SP, T, TX, V, ...
Boot Bridge for Sony ELF allows you to choose the systemless zip
by simply replacing the file install/install.zip with the one to flash.
Warning: BootBridge for Sony ELF is meant to be used on custom ROMs.
For stock ROMs, you'd need to patch the ROM (bootimage securities) first.
Please refer to the currently supported devices list in the second post.
When you flash the Boot Bridge zip, a fake regular bootimage is created
with the contents of the original ELF partition, mapped in the fstab,
then the install.zip is automatically flashed as if you did yourself,
and finally the ELF partition is updated accordingly.
Boot Bridge for Sony ELF also supports being used with MultiROM secondary ROMs.
The project is an extension of the libbootimg originally created by Tasssadar,
that I then reworked to add Sony ELF boot support for Xperia MultiROM.​
Downloads (Unlocked Bootloader only)
BootBridge-SonyELF.zip : https://github.com/AdrianDC/android_boot_bridge/blob/master/release/BootBridge-SonyELF.zip​
Preview of the installation
OPTION 1) Root with Magisk by topjohnwu
Magisk (Latest version) : https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Rename the downloaded zip to install.zip
Open the Boot Bridge zip with a zip manager
Replace the file install/install.zip with the new one
Flash the new Boot Bridge zip in the TWRP recovery
Reboot to Android
OPTION 2) Root with SuperSU by Chainfire
In order to get root access on AOSP based ROMs (2.78 SR5 or newer for 7.1.x),
you need to download the SuperSU project by Chainfire.
SuperSU zip (Latest version) : http://forum.xda-developers.com/apps/supersu
Rename the downloaded zip to install.zip
Open the Boot Bridge zip with a zip manager
Replace the file install/install.zip with the new one
Flash the new Boot Bridge zip in the TWRP recovery
Reboot to Android
OPTION 3) Root with phhSuperUser by phhusson
In order to get root access on AOSP based ROMs (7.1.1 included),
you need to download the phhSuperUser project by phhusson.
superuser.zip : http://forum.xda-developers.com/android/software-hacking/wip-selinux-capable-superuser-t3216394
Rename the downloaded zip to install.zip
Open the Boot Bridge zip with a zip manager
Replace the file install/install.zip with the new one
Flash the new Boot Bridge zip in the TWRP recovery
Reboot to Android
Install the phh's SuperUser application
Source code
Project sources - https://github.com/AdrianDC/android_boot_bridge (branch master)
libbootimg sources - https://github.com/AdrianDC/multirom_libbootimg (branch master)
MultiROM sources - https://github.com/AdrianDC/multirom_core (branch master)​
Boot Bridge for Sony ELF created also thanks to :
- Tasssadar for the original libbootimg / MultiROM sources
- The XperiaMultiROM team for our evolution of MultiROM
- Chainfire for the flashable OUTFD export and boot detection
- Everyone involved in testing it​
XDA:DevDB Information
Android Boot Bridge for Sony ELF, Tool/Utility for the OEM Cross Device Development
Contributors
Adrian DC
Version Information
Status: No Longer Updated
Created 2016-11-25
Last Updated 2020-08-29
Reserved
Changelog
Code:
Boot Bridge for Sony ELF - 26/12/2018
======================================
* Resolve compatibility with Magisk v17+ due to an
internal evolution of its boot partitions detection
Boot Bridge for Sony ELF - 28/05/2017
======================================
* Use android_boot as potential bridge to fix SuperSU
Boot Bridge for Sony ELF - 20/12/2016
======================================
* Fix the 32/64 bits dual support
Boot Bridge for Sony ELF - 18/12/2016
======================================
* Added support for Sony Stock ELF (64 bits) bootimages
* libbootimg changes from my recent updates
Boot Bridge for Sony ELF - 29/11/2016
======================================
* Fix the boot partition detection with symlinks
* Restore phhSuperuser support
Boot Bridge for Sony ELF - 27/11/2016
======================================
* Add support for newer Sony ELF partitions
* Allows to root Stock Sony ROMs on the Xperia Z2
* Updated in collaboration with Alexander Diewald
Boot Bridge for Sony ELF - 25/11/2016
======================================
* Initial public release on XDA
Devices supported
Code:
Sony Xperia SP (Huashan): Magisk, SuperSU, phhSuperSU
Sony Xperia T/TX/V (Mint, Hayabusa, Tsubasa): Magisk, SuperSU, phhSuperSU
Sony Xperia Z2 (Sirius): SuperSU on Stock ROMs
Sony Xperia X Performance (Dora): Stock ROM patching
...
It's great news! thanks a lot, will try it soon. :fingers-crossed:
hi @Adrian DC,
Thanks for your mail that pointing me on this thread.
As you now I'm maintaining a ROM for Xperia S and your project can be a good fit for it
For now I have a built-in support of root but no solution for those who wants SuperSU.
I'm generating the boot.img for Xperia S with the commandline :
python $(MKELF) -o [email protected] $(PRODUCT_OUT)/[email protected]$(BOARD_KERNEL_ADDR) $(PRODUCT_OUT)/[email protected]$(BOARD_RAMDISK_ADDR),ramdisk $(RPMBIN)@$(BOARD_RPM_ADDR),rpm
With parameters below :
# boot image
BOARD_KERNEL_ADDR := 0x40208000
BOARD_RAMDISK_ADDR := 0x41500000
BOARD_RPM_ADDR := 0x20000
Is your project compatible with the way I'm generating boot.img for Xperia S ?
If yes, I will test it with SuperSU (sepolicy for SuperSU systemless is already supported on the ROM).
Thanks for your feedback and work on that topic
mickybart said:
Thanks for your mail that pointing me on this thread.
Click to expand...
Click to collapse
No problem.
Normally the full port of Sony ELF partitions I made inside libbootimg for MultiROM
is compatible with all bootimages structures from these series of Sony devices.
I invite you to have your ROM's boot.img flashed into boot directly,
then flash my Boot Bridge as it is, even without a rooting zip, like in my screenshot,
and let it run to see the bridge creation then restore perform.
If anything goes wrong and the bootimage is not readable,
the process will stop and nothing will be done.
In the very worst case, the rebuilt boot image doesn't start
and you simply fastboot the image you came from.
Also recently I worked with Diewi (Alexander) to extend ELF support
to the newer version of Sony's last ELF devices, the 8974 (Z2) boot
that had ELF Stock images but also support for Android normal ones.
Once fully tested and confirmed, the update will be done on this project too.
On a side note, about root, SuperSU works fine on my devices on 6.0 & less,
for 7.1 the installation is fine too but the root features failed (with sepolicies totally fixed),
this is apparently common / randomly affecting some devices,
Chainfire is aware of it, so do not be surprised if that happens on yours,
and give phhSuperUser a go too as it is the fully working method on my AOSP 7.1 now.
Bye !
Amazing! Worked like a charm..no issues at all..thanks a [email protected] Adrian DC
Boot Bridge updated to support newer Sony ELF devices,
including the Stock Sony ROMs, allowing an easy SuperSU root process.
Hi Adrian, Sorry if is a noob question but im facing ERROR: 7 after instaling the BootBridge-SonyELF.zip, i've already replace the install.zip, it says in TWRP ------> Found bootimg @ /dev/block/platform/msm_sdcc.1/by-name/kernel ----> assert failed: run_program(''/tmp/boot_bridge/flash_zip.sh'', ''/tmp/boot_ brdge'', ''install.zip'') == 0 .... what i'm doing wrong? .. Im on AOSP 25/11 . Thanks for your time
Miggystar said:
Hi Adrian, Sorry if is a noob question but im facing ERROR: 7 after instaling the BootBridge-SonyELF.zip, i've already replace the install.zip, it says in TWRP ------> Found bootimg @ /dev/block/platform/msm_sdcc.1/by-name/kernel ----> assert failed: run_program(''/tmp/boot_bridge/flash_zip.sh'', ''/tmp/boot_ brdge'', ''install.zip'') == 0 .... what i'm doing wrong? .. Im on AOSP 25/11 . Thanks for your time
Click to expand...
Click to collapse
I've got the same error, did everything exactly according to instructions.
Where could the error be?
MichaBit said:
I've got the same error, did everything exactly according to instructions.
Where could the error be?
Click to expand...
Click to collapse
Thanks for reporting the issue.
It was introduced with the new update to support Z2 devices, and affected only phhSuperuser.
The issue is now fully fixed, please download the new version and try again.
Adrian DC said:
Thanks for reporting the issue.
It was introduced with the new update to support Z2 devices, and affected only phhSuperuser.
The issue is now fully fixed, please download the new version and try again.
Click to expand...
Click to collapse
Installation completed!
#root successfully :good:
Many thanks and greetings Adrian :highfive:
does it work with locked bootloader?
I have Xperia Z2 MM deodexed rooted with xposed
a.hamameh96 said:
does it work with locked bootloader?
I have Xperia Z2 MM deodexed rooted with xposed
Click to expand...
Click to collapse
This mod intervenes in boot image (kernel) so most probably it wont work. But I am not 100% sure
MichaBit said:
Installation completed!
#root successfully :good:
Many thanks and greetings Adrian :highfive:
Click to expand...
Click to collapse
Work for lbl???
vandiaz_sairavinz said:
Work for lbl???
Click to expand...
Click to collapse
dont try on lbl it will brick ur phone
nhicko95 said:
dont try on lbl it will brick ur phone
Click to expand...
Click to collapse
Ok, thank you
This is happening to me when I move App to system in link2Sd...
Greetings Adrian,
So nice that you still support our old Sony devices, particularly Xperia V. :good:
The thing is I used your Elf Bridge and succeeded to install Magisk 11.6. But then a new version of it came, 12.0. And I did all the same way as with 11.6 but failed. It was written that the boot image was so small. However, I flashed Magisk 12.0 with no Elf Bridge. And the weird thing that that time there was enough space. I knew that flashing without the Bridge would cause soft-brick, but I knew what to do next in that case, I flashed the proper boot image after all and the device started working again.
The question is following: is it possible to flash Magisk 12.0? I also forget to tell that the size of these two versions are almost similar. The log is attached here.
Thanks!
magisk 11.6 and above have elf support
Speed of a Puma, Brain of a Chicken
myxomop25 said:
Greetings Adrian,
So nice that you still support our old Sony devices, particularly Xperia V. :good:
The thing is I used your Elf Bridge and succeeded to install Magisk 11.6. But then a new version of it came, 12.0. And I did all the same way as with 11.6 but failed. It was written that the boot image was so small. However, I flashed Magisk 12.0 with no Elf Bridge. And the weird thing that that time there was enough space. I knew that flashing without the Bridge would cause soft-brick, but I knew what to do next in that case, I flashed the proper boot image after all and the device started working again.
The question is following: is it possible to flash Magisk 12.0? I also forget to tell that the size of these two versions are almost similar. The log is attached here.
Thanks!
Click to expand...
Click to collapse
Thanks.
Yes I got reports on that, but I think the faulty half-ELF support causes the issues you are having.
Better stick to the working version for the time being.
flipside101 said:
magisk 11.6 and above have elf support
Click to expand...
Click to collapse
Not really, it's faulty and breaks ELF bootimages (tunrs them back to regular bootimages,
which is where BootBridge plays a role to have proper read and write of the ELF bootimages
structures (32bits 8960 or newer 64 bits like 8996 Stock) without ELF support in the tools.

[7.1.2][UNOFFICIAL] LineageOS 14.1 for Lenovo P2

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
/*
* I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...).
* Please do some research if you have any concerns about features included in the products you find here before flashing it!
* YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
* Your warranty will be void if you tamper with any part of your device / software.
* Same statement for XDA.
*/
LineageOS is a free, community built, aftermarket firmware distribution of Android 6 (marshmallow), which is designed to increase performance and reliability over stock Android for your device.
LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.
What's working :
Boots
Touch
RIL [Calls, Mobile Data]
Wi-Fi
Wi-Fi Hotspot
Bluetooth
Camera
Audio
Sensors
Fingerprint
Flash
GPS
NFC
Known issues:
VoLTE doesn't work.
LED.Note: You can use LED with this awesome method: https://forum.xda-developers.com/lenovo-p2/themes/lenovo-p2-rooted-custom-led-t3589859
This is the one of the first builds for p2a42, so minor bugs are expected.Please report them if any.
Instructions :
Flash Twrp :- LINK
Download the latest build and GApps
Reboot to recovery
Flash the latest build and GApps
Reboot
Downloads :
Latest build [19/06/2017]: https://mega.nz/#!KgcS1boY!f1veK_D-kw_8WYDMD9Id0qytacZuHVN3xvQzB7t0SP0
Google Apps: http://opengapps.org/
Credits :
One Team Forum
XDA:Rom Information
LineageOS 14.1,p2a42, ROM for the Lenovo P2
Contributors
wzedlare
ROM OS Version: 7.1.x Nougat
Version Information
Status: Stable
Created 2017-03-18
Last Updated 2017-06-19
#rezerved for me
How to install Root for Apps on Android Nougat Custom Rom
Download and transfer the Lineage SU addon zip file from the download link above to your device’s storage.
Boot your device into TWRP recovery.
Tap on Install and select the Lineage SU addon zip file that you transferred to your device in Step 1.
After selecting the .zip file, do Swipe to Confirm Flash on the bottom of screen to begin the flashing process.
Once Lineage SU addon is flashed, you’ll get Reboot System option, select it.
How to Enable Root for Apps on Lineage OS
Once you’ve installed the Lineage SU addon zip, do the following to enable root for Apps on Lineage OS:
Enable Developer options: Go to Settings » About phone » Tap seven times on Build number.
Go back to Settings main menu and open Developer options from there.
Look for Root access setting, and set it to Apps and ADB or Apps only, as per your need.
That’s all. Your Android device running on Lineage OS should have full root access for apps now.
If you ever need to disable root access, just go to Settings » Developer options » Root access and select the Disabled option from there.
Download;
addonsu-arm64-signed.zip
Great job, no idea how you build new kernel 3.18.31 for lineage14.1
Thank You!
i want to Root LOS 14.1
is it the same way?? or should i do anything more??? !!
i am thinking of SystemRoot..
please give your suggestions ..
nandakis4 said:
i want to Root LOS 14.1
is it the same way?? or should i do anything more??? !!
i am thinking of SystemRoot..
please give your suggestions ..
Click to expand...
Click to collapse
LineageOs AdeenSu
Download And Flashing
Developer Setting>Root
@wzedlare kindly you fix framework folder, it look so ugly with boot oats and boot arts, i have file folder framework to manage throw thems, but make home button not wake up the screen light when it pressed, i hope it will be fix for next release
Thanks! Very good job. It may be crazy but I think I stay with Android 6, because I love the led notifications.
But maybe I will flash it, because who give a F?
Do you need to format as ext4 or other filesystem?...
Will my SD work, it's exfat??
---------- Post added at 13:27 ---------- Previous post was at 13:16 ----------
hendibudi said:
@wzedlare kindly you fix framework folder, it look so ugly with boot oats and boot arts, i have file folder framework to manage throw thems, but make home button not wake up the screen light when it pressed, i hope it will be fix for next release
Click to expand...
Click to collapse
Why not fix it yourself?
hendibudi said:
@wzedlare kindly you fix framework folder, it look so ugly with boot oats and boot arts, i have file folder framework to manage throw thems, but make home button not wake up the screen light when it pressed, i hope it will be fix for next release
Click to expand...
Click to collapse
They(boot.oat) are being generated automatically if you compile any custom rom.Home button wakes up the device, I won't disable that feature.It is useful for everyone.
ilmervanhattem said:
Thanks! Very good job. It may be crazy but I think I stay with Android 6, because I love the led notifications.
But maybe I will flash it, because who give a F?
Do you need to format as ext4 or other filesystem?...
Will my SD work, it's exfat??
---------- Post added at 13:27 ---------- Previous post was at 13:16 ----------
Why not fix it yourself?
Click to expand...
Click to collapse
You don't have to format anything.Just make your wipes and flash it.
ilmervanhattem said:
Thanks! Very good job. It may be crazy but I think I stay with Android 6, because I love the led notifications.
But maybe I will flash it, because who give a F?
Do you need to format as ext4 or other filesystem?...
Will my SD work, it's exfat??
---------- Post added at 13:27 ---------- Previous post was at 13:16 ----------
Why not fix it yourself?
Click to expand...
Click to collapse
I am sorry, i just junior member on xda, i didn't mean that, i just want to give little contribution to revive our community user p2 experience
WiFi is not working here...
When I turn on WiFi it turns off instantly...
Fawk
I've used the 'super' version of gapps for 7.1 (64bits) btw. Also tried it with TWRP 3.0.2.0 and the aroma installer of gapps, same WiFi error.
Hi there, i am thinking of buying this device for my gf because she needs something with a ****load of battery power. So this device seems the obvious choice. But i have a question:
i noticd that on every rom there is no led and no fingerprint. Is this something that will be added in the future or is it not possible due to unavailabe firmwares?
Kind regards
DDQW said:
Hi there, i am thinking of buying this device for my gf because she needs something with a ****load of battery power. So this device seems the obvious choice. But i have a question:
i noticd that on every rom there is no led and no fingerprint. Is this something that will be added in the future or is it not possible due to unavailabe firmwares?
Kind regards
Click to expand...
Click to collapse
I couldn't fix them, that's my fault.It is not caused by firmware or something.I don't know what will happen in the future.
ilmervanhattem said:
WiFi is not working here...
When I turn on WiFi it turns off instantly...
Fawk
I've used the 'super' version of gapps for 7.1 (64bits) btw.
Click to expand...
Click to collapse
Flash stock rom and use it for ten minutes, wipe data,system,cache,dalvik cache (don't wipe your internal storage, wiping it causes bugs.), then flash the rom.
wzedlare said:
Flash stock rom and use it for ten minutes, wipe data,system,cache,dalvik cache (don't wipe your internal storage, wiping it causes bugs.), then flash the rom.
Click to expand...
Click to collapse
OK my friend.
Got some error and passcode error when restoring. Will try some things and talk to you later.
UPDATE: wifi is working but have to root.
UPDATE: Rooted with version 2.79
UPDATE: Now restoring 484 apps with Titanium Backup
UPDATE: ROM is working smooth af, for how much I experienced by now
i was wondering why i couldnt get gapps to install , then realised i was trying to install the wrong version lol
The Mero said:
i was wondering why i couldnt get gapps to install , then realised i was trying to install the wrong version lol
Click to expand...
Click to collapse
7.1 > arm64 > choose whatever you want, pico is the smaller zip.
cpu-z is saying governor is stuck on performance .. constantly running at 2016mhz on all cores .
Is it possible to change it to dynamic ?
The Mero said:
cpu-z is saying governor is stuck on performance .. constantly running at 2016mhz on all cores .
Is it possible to change it to dynamic ?
Click to expand...
Click to collapse
Use a kernel editor?
which one would be safe / recommend to use ilmervanhattem ?
I wouldnt have a clue where to start ,

[GSI][arm64] Ubuntu Touch (ubports) [DRG/B2N/PL2]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
What is Ubuntu Touch?
Ubuntu Touch is the touch-friendly mobile version of Ubuntu.
This operating system is developed and maintained by UBports: An international community of passionate volunteers.
This means Ubuntu Touch is 100% community driven and independent.
What is Halium?
Halium is the collaborative project to unify the Hardware Abstraction Layer for projects which run GNU/Linux on mobile devices with pre-installed Android.
How it is a GSI?
First of all, I should mention ubports GSI definition is different from android, but both are generic.
ubports root file system was always generic and works for most cases, but devs were porting halium system image to add device-specific (HALs and configs) support to ubports Android container.
But after project treble which introduced in android 8, all device-specific parts of android system image moved to vendor partition and we can use "Generic system images" over one vendor partition.
In halium version 9, we use this adventure and have a totally generic system image + root file system.
Requirements:
The only Requirement of booting this GSI is having Halium patched kernel.
Keep in mind having android 9 firmware installed on the device as GSI base is mandatory (GSI can be used on android 8.0 and 8.1 vendors but experimental and not supported yet)
How to install?
1. Boot TWRP and FORMAT data
2. Flash vendor image and halium-boot.img (Halium-boot.img confirmed working on DRG and PL2, B2N needs testing)
3. Flash GSI installer zip
4. Reboot
Note: if the device is stuck on the splash screen on boot, simply force reboot using the power/volume button combo meant for your device
Download:
GSI - built by @mrcyjanek (download ONLY target.zip)
Vendor images
Halium-boot
Whats suppose to work?
Bluetooth
Camera
Cellular Radio
Mobile Data
GPS
Graphics
Sensors
Sound
In-call Audio
Touch
Wifi
Vibration
Anbox
Media Playback
Known bugs?
Random (but rare) BSOD + reboots
no way to unlock using Fingerprint
Touching Fingerprint sensor can reduce media volume
oh and of course VoLTE
Camera (on B2N)
Supports:
Halium telegram group
UBports telegram group
UBports Porting telegram group
ErfanGSIs telegram group
Report Bugs:
Explain your bug in proper support telegram groups (from above)
Please don't ask about spoon-feeding or helping on building kernel or device specific builds.
Please don't ask about picking/reverting commits or any basic git commands.
bug reports without logs will be ignored
logs we need are: android logcat, kernel log, syslog
kernel log:
Code:
dmesg
syslog:
Code:
cat /var/log/syslog
logcat:
Code:
sudo -s
LD_LIBRARY_PATH=/system/lib64 lxc-attach -e -n android -- /system/bin/logcat
Taken with all due respect from Erfan's Thread
Appendix:
Anbox installation guide (by SevralTi on Github)
Code:
sudo mount -o rw,remount /
sudo apt update && sudo apt install -y anbox-ubuntu-touch android-tools-adb
mkdir ~/anbox-data
wget http://cdimage.ubports.com/anbox-images/android-armhf-64binder.img -O ~/anbox-data/android.img
touch ~/anbox-data/.enable
sudo chmod -R o+wrx /home/phablet/anbox-data/data
sudo start -q anbox-container
reboot, wait 2 minutes the reboot again
To symlink anbox files to system:
ln -s ~/anbox-data/data/media/0/Documents ~/Documents/android
ln -s ~/anbox-data/data/media/0/Pictures ~/Pictures/android
ln -s ~/anbox-data/data/media/0/Music ~/Music/android
ln -s ~/anbox-data/data/media/0/Movies ~/Videos/android
To make the QS panel occupy the whole screen, install UT Tweak Tool from the Open Store and increase device display scaling
Libertine containers can't be created from the settings app for now. To create a container, pass the command "TMPDIR=/tmp" in the terminal and follow documentation here
IMPORTANT
I take NO credit for the UBPorts community. All that I've simply done is patch our kernel to make it compatible.
Default password is "phablet" (without the quotes)
If you like my work, consider buying me a coffee and join our telegram groups
Cheers,
Sid
I would like to offer a special thanks to a bunch of people who've been with me through this ridiculous journey of mine:
@Sahil_Sonar - for all the help and advice he's given
@krushndayshmookh - for being a generally sweet guy and looking out for me
@CarbonGTR and @Nikhilkumar038 - for being solid friends and motivators throughout my struggle
@Catharsis007 - for being best boi
@ArcherTanu - for being extremely helpful
The UBPorts community
EVERYONE who's worked on the LOS sdm660 Kernel
and a special unnamed best friend who helped me power through the last couple of months.
Cheers,
Sid
Wonderful Work!! GBU!!
Pru
Updated #1 with a new GSI link that doesn't have the reduced storage bug
Awesome work!!! (though I can't try it out--I have a PL2)
Vedanth Padmaraman said:
Awesome work!!! (though I can't try it out--I have a PL2)
Click to expand...
Click to collapse
You can! Our kernel sources are unified and known to work on all 3 devices, DRG, PL2, and B2N
I've listed the bugs specific to DRG only because I own only a DRG, but in theory, you should be able to flash this on PL2 or B2N as well
Ok! Installing it soon
It works on the PL2, encountered nothing broken so far :good:. I received an SMS, downloaded some stuff, etc (but haven't tried calling yet). Once in while it does hang with a black screen while booting, but simply holding Vol. up + Power to force-restart does the trick, like mentioned in the OP. Set up whatsapp successfully on Anbox, but graphics on any anbox app are jerky and laggy at times, in a manner similar to that of the anbox installation on my Linux Mint, so this doesn't seem to be an issue pertaining to this GSI/Halium port. Still, would be nice to have an improvement
Updated kernel to fix media playback. Download from link in OP
Oh looks like really interesting. I'm downloading now. I'll test this for a few days. Question: It isn't Android totally. It's Ubuntu yes? Does it meant that other OS's can be ported as well like HarmonyOs? If that's true how it is can be ported.
SamandaR1112 said:
Oh looks like really interesting. I'm downloading now. I'll test this for a few days. Question: It isn't Android totally. It's Ubuntu yes? Does it meant that other OS's can be ported as well like HarmonyOs? If that's true how it is can be ported.
Click to expand...
Click to collapse
It isn't Android, it isn't exactly Ubuntu Desktop either. Canonical was working on Ubuntu Touch/Ubuntu Phone until 2017, and after they dropped the project, the UBports community was born and carried it forward. I'm not sure about HarmonyOS
#1 updated with halium-boot.img (confirmed working on DRG and PL2, B2N needs testing), new flashing method added
Which flashing method is prefered? Anybody who can tell a little on how it is in use? (Does it feel snappy or any lags)
Just about to flash to my B2N. The file B2N####-vendor.img needs to be set to a partition. "Select partition to flash image". I'm guessing boot or system, but honestly I have no idea. help?
---------- Post added at 11:43 AM ---------- Previous post was at 11:32 AM ----------
So.. I'm not exactly known for my patience.. Using method 1 I flashed the vendor image to system image, and boot image to boot partition. then changed to zip and flashed gsi. Twrp prompted me to install official twrp app, I was curious to see if it would work so I chose to do so. Then reboot turned me into a bootloop...
n00bDroid said:
Just about to flash to my B2N. The file B2N####-vendor.img needs to be set to a partition. "Select partition to flash image". I'm guessing boot or system, but honestly I have no idea. help?
---------- Post added at 11:43 AM ---------- Previous post was at 11:32 AM ----------
So.. I'm not exactly known for my patience.. Using method 1 I flashed the vendor image to system image, and boot image to boot partition. then changed to zip and flashed gsi. Twrp prompted me to install official twrp app, I was curious to see if it would work so I chose to do so. Then reboot turned me into a bootloop...
Click to expand...
Click to collapse
Code:
fastboot flash vendor <B2N####-vendor.img>
fastboot flash boot halium-boot.img # NOT B2N-0-354H-00WW-boot.img
Let the keyword "vendor" in <B2N####-vendor.img> serve as a reminder that it is meant to be flashed to the vendor partition.
Vedanth Padmaraman said:
Code:
fastboot flash vendor <B2N####-vendor.img>
fastboot flash boot halium-boot.img # NOT B2N-0-354H-00WW-boot.img
Let the keyword "vendor" in <B2N####-vendor.img> serve as a reminder that it is meant to be flashed to the vendor partition.
Click to expand...
Click to collapse
Immidiately after my post I made the same realization that vendor.img = vendor partition. So I did that, and it still didn't work.. But then again, I actually flashed B2N-0-354H-00WW-boot.img because I hadn't seen the halium-boot
So I went again. Now according to recipe. Then reboot system..I've been stuck on the "AndroidOne" logo for 15 minutes....after a forced reboot I see the Ubuntu Touch logo!!! thank you!
Camera isn't working. Any tips?
i did not thank you @Sid127 ! That's done !
Sorry for the recent inactivity
n00bDroid said:
Camera isn't working. Any tips?
Click to expand...
Click to collapse
I notice you're on B2N... System logs would be helpful from when you're trying to use the camera. That'd be the dmesg. Without that, I can't be of much help.

Categories

Resources