HELP!! Need TWRP build for N950U to test BL Unlock - Samsung Galaxy Note 8 Questions and Answers

It is kinda sad that I don't have a good enough computer at home to build TWRP.
I simply lack the space to even download the sources.
I'm very close to an unlock and I really need TWRP.
Someone out there i'm sure has compiled it by now.
Please share I need this for testing.
Thank You

BigCountry907 said:
It is kinda sad that I don't have a good enough computer at home to build TWRP.
I simply lack the space to even download the sources.
I'm very close to an unlock and I really need TWRP.
Someone out there i'm sure has compiled it by now.
Please share I need this for testing.
Thank You
Click to expand...
Click to collapse
I have a goodish computer at home with lots of space. if I knew how I could build twrp for you. how is twrp built?

stantheandroidman said:
I have a goodish computer at home with lots of space. if I knew how I could build twrp for you. how is twrp built?
Click to expand...
Click to collapse
It's not as easy as asking "how is twrp built?" It requires Linux operating system not Windows and you have to have a build environment set up for that already.. Not as easy as some people think it is.

BigCountry907 said:
It is kinda sad that I don't have a good enough computer at home to build TWRP.
I simply lack the space to even download the sources.
I'm very close to an unlock and I really need TWRP.
Someone out there i'm sure has compiled it by now.
Please share I need this for testing.
Thank You
Click to expand...
Click to collapse
Have you tried contacting afaneh92, the fellow that made Safestrap for the Note 8? It has TWRP built in, though I don't know how that implementation differs from a standard device build. He might be able to help in some capacity, though I wouldn't be surprised if you've already thought of this.

Would the w version help u?

Johnmoerike said:
Would the w version help u?
Click to expand...
Click to collapse
I'm not sure what the difference is with the W version of the device.
if it's qualcomm chip-set it could be an ok starting point.
@CountKrzysztof
Yea i have contacted @afaneh92 and he has given me all of the source for the safestrap build.
He's been helpful. The original safestrap was made by hash of codes and afaneh92 ported to our devices. And a whole lot more.
There is not much documentation on safestrap itself but rightfully so. It primarily is a set of shell scripts. I've been tracing back through them to better understand the entire process.
I was hoping for someone like @Captain_Throwback to have already built TWRP for the N950U. But he is more of a HTC dev so I doubt he will build it for N950U. But you never know. He has helped me in the past and I know his system is setup to build already.
One of the problems with the safestrap build for the N950U is adb is not working. I'ts not the end of the world but its a lot harder to type everything in terminal compared to the PC.
@MrMike2182 is pretty much right that its not that easy to start compiling sources n stuff.
It's not extremely difficult either. Setting up ubuntu is pretty easy and getting the build system setup is not bad at all. It takes quite a bit of time to download sources. If everything goes well compiling isn't too bad either. But when something breaks in the middle of compiling and you have to start modifying .c and .h files and tracking down modules it gets to be time consuming.
At any rate I'm going to need to download sources for TWRP and the kernel.
I'm gonna try to build the kexec modules and see if we cant get that working again. It is always just a matter of having the time to do it all.

This link has complete guide to initialize minimal omni 6.0 source about 1GB size and all steps to compile twrp
https://gist.github.com/mohammad92/e2a131b738ea117c4bd82a5436a6bf23

BigCountry907 said:
It is kinda sad that I don't have a good enough computer at home to build TWRP.
I simply lack the space to even download the sources.
I'm very close to an unlock and I really need TWRP.
Someone out there i'm sure has compiled it by now.
Please share I need this for testing.
Thank You
Click to expand...
Click to collapse
I have an Ubuntu system that pretty much has the entire 18GB android sources and stuff available to you if you want to log in to the system I'll give you full root access to it to do what you want I'm trying to help you out but it looks like I'm about to be dispatched to the border to deal with the migrant issue so I'm running out of time if you have a good internet connection my system is pretty quick I'm not all sure what else needs to be done on its Ubuntu 18.04.. Up to you I'll keep trying until I have to leave I'm running into finding a viable tree to use on github though I mean they have 1 for the exynos version. I have the source code for Samsung though.

I appreciate the offer. The TWRP for the N950W came up and I will use that for now.
Later down the road having a good build system will be helpful. Not sure about Ubuntu 18. I've done a lot with 16.04 and have run into cases where older versions of python and other packages are needed.
Most likely there's a way to use 18.
Thanks again.
Never thought about running off a server. Bet I can rent one cheap these days.

BigCountry907 said:
I appreciate the offer. The TWRP for the N950W came up and I will use that for now.
Later down the road having a good build system will be helpful. Not sure about Ubuntu 18. I've done a lot with 16.04 and have run into cases where older versions of python and other packages are needed.
Most likely there's a way to use 18.
Thanks again.
Never thought about running off a server. Bet I can rent one cheap these days.
Click to expand...
Click to collapse
Yeah I've needed the older packages for several different roms I was doing but I just get them installed and move on until the next issue comes up.. Glad you at least got one TWRP to use! Thanks for all the work you're putting in! By the way do you happen to have a BoardConfig.mk file?

You should be able to start with the one from the safestrap sources. The TWRP he builds is modified slightly. It adds in a few options to the recovery. But I would guess the boardconfig should be about the same. Just double check any extra flags.
https://github.com/mohammad92/android_device_samsung
https://github.com/mohammad92/androi...very-safestrap

BigCountry907 said:
I appreciate the offer. The TWRP for the N950W came up and I will use that for now.
Later down the road having a good build system will be helpful. Not sure about Ubuntu 18. I've done a lot with 16.04 and have run into cases where older versions of python and other packages are needed.
Most likely there's a way to use 18.
Thanks again.
Never thought about running off a server. Bet I can rent one cheap these days.
Click to expand...
Click to collapse
the guide work for all versions of ubuntu!
but there some extra stuff to get old jdk to be installed on 18

The board_config uses the msm8998 common.
Did you find it.
LOCAL_PATH := device/samsung/msm8998-common
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := kryo
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := krait
TARGET_USES_64_BIT_BINDER := true
ENABLE_CPUSETS := true
ENABLE_SCHEDBOOST := true
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := msm8998
TARGET_NO_BOOTLOADER := true
# Kernel
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
# Image
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.selinux=permissive
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
BOARD_RAMDISK_OFFSET := 0x02000000
# Platform
TARGET_BOARD_PLATFORM := msm8998
TARGET_BOARD_PLATFORM_GPU := qcom-adreno540
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4478795776
BOARD_USERDATAIMAGE_PARTITION_SIZE := 58543898624
BOARD_FLASH_BLOCK_SIZE := 262144
# Recovery
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_SELECT_BUTTON := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_RECOVERY_DEVICE_DIRS := $(LOCAL_PATH)
# TWRP
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
TW_MAX_BRIGHTNESS := 36500
TW_DEFAULT_BRIGHTNESS := 15000
TW_NO_REBOOT_BOOTLOADER := true
TW_HAS_DOWNLOAD_MODE := true
TW_INCLUDE_NTFS_3G := true
TW_EXCLUDE_SUPERSU := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INPUT_BLACKLIST := "hbtp_vm"
# Encryption support
TW_INCLUDE_CRYPTO := true
# System properties
-include $(LOCAL_PATH)/system_prop.mk

BigCountry907 said:
The board_config uses the msm8998 common.
Did you find it.
LOCAL_PATH := device/samsung/msm8998-common
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := kryo
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := krait
TARGET_USES_64_BIT_BINDER := true
ENABLE_CPUSETS := true
ENABLE_SCHEDBOOST := true
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := msm8998
TARGET_NO_BOOTLOADER := true
# Kernel
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
# Image
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 sched_enable_hmp=1 sched_enable_power_aware=1 service_locator.enable=1 swiotlb=2048 androidboot.selinux=permissive
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
BOARD_RAMDISK_OFFSET := 0x02000000
# Platform
TARGET_BOARD_PLATFORM := msm8998
TARGET_BOARD_PLATFORM_GPU := qcom-adreno540
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4478795776
BOARD_USERDATAIMAGE_PARTITION_SIZE := 58543898624
BOARD_FLASH_BLOCK_SIZE := 262144
# Recovery
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_SELECT_BUTTON := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_RECOVERY_DEVICE_DIRS := $(LOCAL_PATH)
# TWRP
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
TW_MAX_BRIGHTNESS := 36500
TW_DEFAULT_BRIGHTNESS := 15000
TW_NO_REBOOT_BOOTLOADER := true
TW_HAS_DOWNLOAD_MODE := true
TW_INCLUDE_NTFS_3G := true
TW_EXCLUDE_SUPERSU := true
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
TW_INPUT_BLACKLIST := "hbtp_vm"
# Encryption support
TW_INCLUDE_CRYPTO := true
# System properties
-include $(LOCAL_PATH)/system_prop.mk
Click to expand...
Click to collapse
Yeah I did thanks I forked it over to my git account. How's the N950W twrp working?

Haven't even tried it yet.
First I want to modify the safestrap so everything is running off the SD. Then It'll be easy to change things for testing.
If it don't boot right just have to pull the SD.

BigCountry907 said:
It is kinda sad that I don't have a good enough computer at home to build TWRP.
I simply lack the space to even download the sources.
I'm very close to an unlock and I really need TWRP.
Someone out there i'm sure has compiled it by now.
Please share I need this for testing.
Thank You
Click to expand...
Click to collapse
Do you still need a build of TWRP?

If your set up to do it that would be great.
Right now adb isn't working in safestrap and I use a lot of shell code.
I could easily switch the ramdisk and see.

BigCountry907 said:
If your set up to do it that would be great.
Right now adb isn't working in safestrap and I use a lot of shell code.
I could easily switch the ramdisk and see.
Click to expand...
Click to collapse
Good news, I was able to compile it.
https://www.mediafire.com/file/hx77ff4bn7wfszo/twrp.zip/file
I have included the boot image, ramdisk image, and recovery ramdisk image in addition to the recovery image itself. I hope this helps us get closer to an unlock.

Very Nice.
Thank you very much.

BigCountry907 said:
Very Nice.
Thank you very much.
Click to expand...
Click to collapse
No problem. If there's anything I can do to help you, please let me know.

Related

[DEV] RECOVERY-create own recovery images For Vivid

BoardConfig
Code:
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := msm8660
TARGET_BOARD_PLATFORM_GPU := qcom-adreno200
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_SMP := true
ARCH_ARM_HAVE_TLS_REGISTER := true
BOARD_USES_ADRENO_200 := true
TARGET_BOOTLOADER_BOARD_NAME := rider
BOARD_KERNEL_CMDLINE := console=ttyHSL0 androidboot.hardware=rider no_console_suspend=1
BOARD_KERNEL_BASE := 0x48000000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_USE_SCORPION_BIONIC_OPTIMIZATION := true
# cat /proc/emmc
#dev: size erasesize name
#mmcblk0p34: 000ffa00 00000200 "misc"
#mmcblk0p22: 00fffc00 00000200 "recovery"
#mmcblk0p21: 01000000 00000200 "boot"
#mmcblk0p23: 31fffc00 00000200 "system"
#mmcblk0p25: 06ebde00 00000200 "cache"
#mmcblk0p24: 4aabc400 00000200 "userdata"
#mmcblk0p28: 01400000 00000200 "devlog"
#mmcblk0p30: 00040000 00000200 "pdata"
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 838859776
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1252770816
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_RELEASETOOLS_EXTENSIONS := device/htc/common
TARGET_PREBUILT_KERNEL := device/htc/rider/kernel
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_SDCARD_DEVICE_PRIMARY := /dev/block/mmcblk1p1
BOARD_SDCARD_DEVICE_SECONDARY := /dev/block/mmcblk1
BOARD_SDEXT_DEVICE := /dev/block/mmcblk1p2
BOARD_USES_MMCUTILS := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_CUSTOM_GRAPHICS:= ../../../device/htc/rider/graphics.c
BOARD_USES_RECOVERY_CHARGEMODE := true
First, Extract the contents of the ramdisk with:
Code:
./unpack-bootimg.pl recovery.img
In all ramdisk you will have a few folders and files
Code:
./etc
./res(images for recovery go here)
./sbin(the actually recovery binary goes here & adbd)
./system
./tmp
./init
./default.prop
./init.holiday.rc
./init.rc
lift the security default.prop
Code:
[B]Original source code[/B]
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=0
[B]Changed source code [/B]
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
Pack-up Ramdisk
Code:
./mkbootfs ./recovery.img-ramdisk | gzip > ramdisk_recovery-edited.gz
Repack to IMG
Code:
./mkbootimg --base 0x48000000 --cmdline 'console=-ttyHSL3 androidboot.hardware=holiday' --kernel recovery.img-kernel.gz --ramdisk ramdisk_recovery-edited.gz -o new_recovery.img
is this to dump recovery?
Sent from my HTC-X710a using Tapatalk
Please provide more explanation.
Sent from my HTC PH39100 using xda premium
ceo.mtcl said:
Please provide more explanation.
Sent from my HTC PH39100 using xda premium
Click to expand...
Click to collapse
This is still very much a work in progress.
Even if we do get a custom recovery, we will still need s-off to do anything with it correct
Edit: in fact, there wouldn't even be a way to flash a custom recovery without s-off.
She's too young for you bro.Sent.
This is for Rooted devices
Rooted cwm recovery for vivid & raider(Holiday)
fixed by me
original by 2프로부족(pgpia)
tested
Extract zip file
Fastboot flash recovery root_recovery.img
recovery_download
Recovery working
trell959 said:
Even if we do get a custom recovery, we will still need s-off to do anything with it correct
Edit: in fact, there wouldn't even be a way to flash a custom recovery without s-off.
She's too young for you bro.Sent.
Click to expand...
Click to collapse
I believe this will only work for the Canadian and Korean versions of this phone. You can unlock the bootloaders for those phones but not the AT&T version yet. Hopefully that will change by the time my phone gets here.
pside15 said:
I believe this will only work for the Canadian and Korean versions of this phone. You can unlock the bootloaders for those phones but not the AT&T version yet. Hopefully that will change by the time my phone gets here.
Click to expand...
Click to collapse
Read somewhere that HTC will be unlocking the bootloader for ATT phones within a week.
Sent from my HTC PH39100 using xda premium
pside15 said:
I believe this will only work for the Canadian and Korean versions of this phone. You can unlock the bootloaders for those phones but not the AT&T version yet. Hopefully that will change by the time my phone gets here.
Click to expand...
Click to collapse
Oh thanks man
Sent from my Desire HD using xda premium
This can be used, but it feels somewhat unstable!However, still very grateful to!
now that i have CWM RECOVERY 5.0.2.7 on my phone i guess i just have to wait till we get s-off and then custom roms here i come!
update: nandroid backups work!
Can I have your boot.img and system.img from nandroid
erik10002 said:
now that i have CWM RECOVERY 5.0.2.7 on my phone i guess i just have to wait till we get s-off and then custom roms here i come!
update: nandroid backups work!
Click to expand...
Click to collapse
Sent from my Sensation using XDA App
mohsinkhan47 said:
Can I have your boot.img and system.img from nandroid
Click to expand...
Click to collapse
how and where do i find those files? thanks
also my first nandroid backup worked perfectly and i can restore it but when i try to backup now it gets stuck and freezes at certain points and i have to do a battery pull!
Its inside the nandoid folder.
I think its trying to mount to the system folder or something and its not mounting.
erik10002 said:
how and where do i find those files? thanks
also my first nandroid backup worked perfectly and i can restore it but when i try to backup now it gets stuck and freezes at certain points and i have to do a battery pull!
Click to expand...
Click to collapse
Sent from my Sensation using XDA App
mohsinkhan47 said:
Its inside the nandoid folder.
Click to expand...
Click to collapse
went inside the folder where my nandroid backup is and get these files
.android_secure.vfat.tar
cache.ext4.tar
data.ext4.tar
nandroid.md5
system.ext4.tar
is it any of these that you need?
Yeah that's good. Can you upload the system.tar file please
erik10002 said:
went inside the folder where my nandroid backup is and get these files
.android_secure.vfat.tar
cache.ext4.tar
data.ext4.tar
nandroid.md5
system.ext4.tar
is it any of these that you need?
Click to expand...
Click to collapse
Sent from my Sensation using XDA App
mohsinkhan47 said:
Yeah that's good. Can you upload the system.tar file please
Click to expand...
Click to collapse
it's a huge file, where can i upload and send this to you and FREE please! thanks
Github megaupload
erik10002 said:
it's a huge file, where can i upload and send this to you and FREE please! thanks
Click to expand...
Click to collapse
Sent from my Sensation using XDA App
mohsinkhan47 said:
Github megaupload
Click to expand...
Click to collapse
found github hard to navigate so i will use megaupload but it will have to wait till i get home because the upload speed on my work computers are sh!t.

SM-P605 based on Note 3 device tree

Hey there,
I hope that you don't mind me posting here, but I figure that this is the best place to get some assistance. I'm attempting to port CM11 to the Galaxy Note 10.1 2014 Edition (SM-P605). This is a very similar device to the Note 3, and as such, I've started by forking the Note 3 device tree. This is the first port that I've attempted, so I am very new to all of this.
I am using the Samsung stock 4.3 kernel sources for my device. When I run "make recoveryimage", everything seems to work fine and I get a recovery.img file. However, despite fiddling with all manner of settings in BoardConfig.mk, I cannot get it to boot. It just gets itself into a bootloop, saying "Recovery boooting..." at the top left, and then rinse-repeat.
I suspect that my problem lies with the ramdisk, and/or the ramdisk offset. The following is taken from the Note 3 BoardConfig.mk.
Code:
# Kernel
BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02900000 --tags_offset 0x02700000
BOARD_KERNEL_SEPARATED_DT := true
BOARD_CUSTOM_BOOTIMG_MK := device/samsung/hlte/mkbootimg.mk
I presume that those offsets are different per device. After a bit of research, I came across an app called unmkbootimg which can supposedly tell me what I need to know. After feeding it my boot.img, I got the following result.
Code:
unmkbootimg version 1.2 - Mikael Q Kuisma <[email protected]>
Kernel size 7536872
Kernel address 0x8000
Ramdisk size 1375263
Ramdisk address 0x2000000
Secondary size 0
Secondary address 0xf00000
Kernel tags address 0x1e00000
Flash page size 2048
Board name is ""
Command line "console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F"
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Extracting kernel to file zImage ...
Extracting root filesystem to file initramfs.cpio.gz ...
All done.
---------------
To recompile this image, use:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x1dfff00 --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F' -o new_boot.img
---------------
I've tried 0x00200100 and 0x2000000 for ramdisk offset (purely because I am not sure which one is correct there), but both give the same result (ie. nothing).
I've also tried outputting the log to the LCD with
Code:
BOARD_KERNEL_CMDLINE := console=tty0,115200 fbcon=rotate:1 fbcon=font:VGA8x8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F
This made no difference at all either.
I'm not sure what else to try, so I'm looking for any suggestions please.
If you'd like to take a look at my device tree, it is here:
https://github.com/StNick
Thanks in advance.
Code:
*** WARNING ****
This image is built using NON-standard mkbootimg!
OFF_KERNEL_ADDR is 0xFE208100
OFF_RAMDISK_ADDR is 0x00200100
OFF_SECOND_ADDR is 0xFF100100
Please modify mkbootimg.c using the above values to build your image.
****************
Just to get that out of the way, did you try the above values?
What board does the SM-P605 use? (MSM8974AB?) Is it a Qualcomm or Exynos device?
You are able to get no output?
This may or may not be the right place to post such a question, but I think you'd be more likely to find the answer to your question here
StNickZA said:
Hey there,
I hope that you don't mind me posting here, but I figure that this is the best place to get some assistance. I'm attempting to port CM11 to the Galaxy Note 10.1 2014 Edition (SM-P605).
...
Click to expand...
Click to collapse
Are you certain that this one isn't a better place to start:
http://forum.xda-developers.com/galaxy-note-10-2014/development
xclub_101 said:
Are you certain that this one isn't a better place to start:
http://forum.xda-developers.com/galaxy-note-10-2014/development
Click to expand...
Click to collapse
Fairly certain, yes. The work being done on the Note 10.1 2014 Edition all pertains to the Exynos version which is less relevant to my device than the Note 3.
Just looking for some help from guys that have built for a similar device.

[Q] 'Correct' way to compile a permissive SELinux kernel?

As the title suggests, I'm attempting to compile a (Lollipop) Nexus 5 kernel with SELinux in permissive mode by default. For reference, I am using the msm kernel source tree at commit 8a80a0e.
I have managed to accomplish this by modifying msm/security/selinux/selinuxfs.c and inserting new_value = 0; into sel_write_enforce to prevent the mode being changed:
Code:
length = -EINVAL;
if (sscanf(page, "%d", &new_value) != 1)
goto out;
new_value = 0; /* inserted this line */
if (new_value != selinux_enforcing) {
length = task_has_security(current, SECURITY__SETENFORCE);
if (length)
goto out;
audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
"enforcing=%d old_enforcing=%d auid=%u ses=%u",
This method, however, doesn't seem particularly good, as it relies on the intricacies of the specific implementation of SELinux used in this kernel, and prevents the mode being changed later.
This post suggests changing the CONFIG_ALWAYS_ENFORCE flag for a Samsung device, however the Nexus 5 kernel does not appear to have such an option. Setting the default state of SELinux using various menuconfig options and kernel command line parameters does not appear to have any effect, and disabling it entirely causes the device to crash after boot, before any logcat output is produced.
I have noticed than when started with a kernel with SELinux enabled, one of the first messages from logcat is from auditd, of the form enforcing=1 old_enforcing=0 auid=... ses=..., indicating that something is setting the SELinux mode to enforcing almost immediately after boot.
Thus, I am wondering if anyone knows where this command to set SELinux to enforcing comes from, how to disable it, or another way to compile a kernel with SELinux set to permissive?
I believe you need to change the kernel config to allow command line switching of SELinux:
Code:
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
then modify the boot parameters of your boot.img adding to the cmdline:
Code:
enforcing=0 androidboot.selinux=permissive
I think that's the way. I went through all this but ended up just disabling SELinux altogether so I can't remember for sure if that's all.
Gene Poole said:
I believe you need to change the kernel config to allow command line switching of SELinux:
Code:
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
then modify the boot parameters of your boot.img adding to the cmdline:
Code:
enforcing=0 androidboot.selinux=permissive
I think that's the way. I went through all this but ended up just disabling SELinux altogether so I can't remember for sure if that's all.
Click to expand...
Click to collapse
Doesn't work. The system boots up in permissive mode, but immediately switches to enforcing, as it usually does. The first few lines of logcat:
Code:
--------- beginning of main
I/installd( 0): installd firing up
W/auditd ( 169): type=2000 audit(0.0:1): initialized
I/auditd ( 169): type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
W/auditd ( 169): type=1404 audit(0.0:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
Are you using the google boot image, or the AOSP image (they're quite different)? I just checked mine (built from source) and init has -DALLOW_DISABLE_SELINUX=1 which may not be present in the distro version of init.
Gene Poole said:
Are you using the google boot image, or the AOSP image (they're quite different)? I just checked mine (built from source) and init has -DALLOW_DISABLE_SELINUX=1 which may not be present in the distro version of init.
Click to expand...
Click to collapse
I wasn't aware there was a difference. I compiled the kernel from source, enabling the relevant config options, then got boot.img from the Nexus 5 factory image, and extracted and replaced the kernel and boot parameters as suggested by this document.
The boot.img built as part of the AOSP build (with USERDEBUG flag) is not locked down the way the factory boot image is. There may be something built-in to the init process to ensure selinux is available in the kernel and cannot be disabled.
I wish I knew more about this. My original goal was to implement the things I needed in the AOSP build and set up selinux permissions to allow it, but I gave up and ended up just removing selinux from the kernel altogether.
Hmm... I'll take a look in the initrd of the Android boot images to see if there's anything in there that might be setting the SELinux mode.
Update: Bah. It seems the AOSP source of init can be configured to accept a ro.boot.selinux parameter, but I see no indication that the code is present in the stock init binary. The code also explains why the phone immediately reboots into recovery when SELinux support is disabled in the kernel.
Update 2: After attempting to download 18GB of AOSP source code, I think my dodgy way of disabling SELinux is really the best method.
Gene Poole said:
I believe you need to change the kernel config to allow command line switching of SELinux:
Code:
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
then modify the boot parameters of your boot.img adding to the cmdline:
Code:
enforcing=0 androidboot.selinux=permissive
I think that's the way. I went through all this but ended up just disabling SELinux altogether so I can't remember for sure if that's all.
Click to expand...
Click to collapse
bootloop ¯\_(ツ)_/¯
Just disable it in the config?
Why do you need it if you don't use it?
Jo_Jo_2000 said:
Just disable it in the config?
Why do you need it if you don't use it?
Click to expand...
Click to collapse
I prefer CONFIG_ALWAYS_ENFORCE = false instead of new_value = 0

Root for ZE500KL and ZE500KG

Compatible models:
Original posts by @miau9202: (Go and leave a thanks to him!)
>ZE500KL
>ZE500KG
Compatible System Version:
>WW_12.8.5.118 (Original relase)
>WW_12.8.5.156 (Tested by me and some user) [There is also the version made by @gavrila with the new kernel version, see above]
>WW_12.8.5.172 (Tested by @aschitaka and @96DANGER96 )
How To:
1 - Install adb and fastboot driver (follow THIS guide)
>Now you can connect the phone to your computer​2 - Reboot in fastboot mode with one of the following method:
a -Volume Up while booting up​b -With adb, after enabling USB debugging in developer settings, using:
Code:
adb reboot bootloader
3 - When you are in the bootloader, run this command:
Code:
fastboot boot mod_boot.img
IMPORTANT: DON'T FLASH IT OR YOU WILL GET BOOTLOOP!!!
>Now your phone should automatically reboot with root installed and working!
Bug:
>While not everyone had it, there was a case where com.asus.services started crashing every boot after rooting, the only way to fix it was to reflash the OTA and wipe the data partition
>While new version come out, new bug may appear, please let us know!
Note:
NO ONE IN THIS FORUM, NOR THE FORUME ITSELF, IT'S RESPONSABLE OF YOUR ACTION!
THIS GUIDE COULD BRICK YOUR PHONE, FOLLOW IT AT YOUR OWN RISK!
Download:
ZE500KL: Original Post - Mirror
ZE500KG: Original Post - Mirror
Version .156 kernel made by @gavrila: Original Post - Mirror
Tested root apps:
Code:
Link2SD - Working
ES File Browser - Working
No-frills CPU Control - Not Working (feqs locked)
ADB Shell - Working
Xposed Framework - Working
AdAway - Working
Greenify - Working
Titanium Backup - Working
ROM Toolbox - Working
To install Xposed framework go HERE!
To remove root:
1 - Download from the Asus site your firmware version or above
2 - Put it in your external sd card (IMPORTANT. It will NOT work if it's in the internal memory)
3 -Reboot your phone and enter in recovery with one of the following methods:
a -Volume Down while booting up​b -With adb, after enabling USB debugging in developer settings, using:
Code:
adb reboot recovery
4 - When in recovery select "Install from zip" and select the zip you downloaded
5 - When done, wipe cache and reboot your phone. Now root is gone and all the system apps are back.
Credits:
@miau9202 - Original developer
@shakalaca - For technical and knowledge support
@Jhyrachy - Tester ZE500KL
@96DANGER96 - Tester ZE500KL
@visioncored - Tester ZE500KG
@gavrila - For updated root and twrp
Resources (for Asus ZE500KL)
> Asus Official Firmware and Kernel Source
> Original boot.img
> Decompressed original boot.img (with unpackbootimg)
> Official recovery (linked by @miau9202, credits to @shakalaca )
> Original dt.img (extracted from official recovery)
> Device Tree
> Rooted boot.img
Jhyrachy said:
Hi everybody!
First of all i want to say I'm not a "devoloper", just a guy with a phone and a little background in programming, so anything i may write is an interpretation or an idea i made up of something and probably it's wrong, so feel free to correct me (obviusly with proof and documentation)
In another thread we (people with a ze500kl) started to think a way to root our phone and made some try (especially thanks to @wiiliamchung )
Actually we menaged pretty nothing but since we are a community we can share tought and ideas to try to make something working!
For now our best bet is inspired from the root method of the ZE551ML (Point 3.1, method 2)
So we are trying to compile a new recovery to push supersu in the /system folder
@williamchung already tried compiling the CWM but it didn't worked.
Actually i'm downloading on a server the Omnirom source to compile the TWRP.
For compiling TWRP and CWM you need the boot.img, that I have extracted from the official Asus firmware , that is a simple .zip file, so i just opened it and extracted the boot.img, that you can also download HERE, if you don't want to download the 1.3Gb of firmware.
Using THIS guide we can extract the required info from boot.img and start building our recovery, at least in theory!
I'll update this post when we discover something new!
Click to expand...
Click to collapse
Nice! I used cm10.1 to compile cwm6 on the previous build and at the time of this writing, I'm compiling cwm on the cm12.1 branch. Let's just hope it works! :fingers-crossed:
Good luck on your twrp build!
Edit: I'm also doing a twrp build too. What branch are you using? I'm using Omni 5.1 or is it 5.0 I have to check again
Have you managed to extract Boardconfig.mk after all?
i had trouble dumping boot.img so i downloaded the firmware
Jhyrachy said:
Have you managed to extract Boardconfig.mk after all?
i had trouble dumping boot.img so i downloaded the firmware
Click to expand...
Click to collapse
Nope. I keep getting errors. I think I need to re-sync the branch as I think I'm missing some stuff.
wiiliamchung said:
Nope. I keep getting errors. I think I need to re-sync the branch as I think I'm missing some stuff.
Click to expand...
Click to collapse
Well, on my 30Gb server i finished the space and i needed to expand it!
Btw, download the boot.img I uploaded, maybe it will works.
Jhyrachy said:
Btw, download the boot.img I uploaded, maybe it will works.
Click to expand...
Click to collapse
Sure, I'll check it out. Did you get it from the WW…118 or the WW…106 firmware?
wiiliamchung said:
Sure, I'll check it out. Did you get it from the WW…116 or the WW…108 firmware?
Click to expand...
Click to collapse
i downloaded the WW118
UPDATE: thansk to @bigbiff and @Dees_Troy in the TWRP chat i learned that BoardConfig.mk and recovery.fstab are not included in the boot.img
I will study how to make them
Jhyrachy said:
UPDATE: thansk to @bigbiff and @Dees_Troy in the TWRP chat i learned that BoardConfig.mk and recovery.fstab are not included in the boot.img
I will study how to make them
Click to expand...
Click to collapse
This can help you
http://forum.xda-developers.com/showthread.php?t=1943625
People already compiled twrp for s4 mini plus, that has got same cpu
96DANGER96 said:
This can help you
http://forum.xda-developers.com/showthread.php?t=1943625
People already compiled twrp for s4 mini plus, that has got same cpu
Click to expand...
Click to collapse
thanks, but sadly is not just a copy paste :/
Also looks like their cpu is slightly different, but i'll take a look
96DANGER96 said:
This can help you
http://forum.xda-developers.com/showthread.php?t=1943625
People already compiled twrp for s4 mini plus, that has got same cpu
Click to expand...
Click to collapse
s4 mini is totally different in comparison of ze5500kl or ze550kl.
Jhyrachy said:
thanks, but sadly is not just a copy paste :/
Also looks like their cpu is slightly different, but i'll take a look
Click to expand...
Click to collapse
I know, but you are on the right way i think
Ok, i smashed up together what i can found about the BoardConfig.mk and make this stuff:
Code:
# Data from https://github.com/TeamWin/android_device_samsung_serranoveltexx/blob/android-4.4/BoardConfig.mk
TARGET_BOARD_PLATFORM := msm8916
TARGET_BOARD_PLATFORM_GPU := qcom-adreno306
TARGET_BOOTLOADER_BOARD_NAME := MSM8916
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_ARCH_VARIANT_CPU := cortex-a9
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
TARGET_CPU_VARIANT := cortex-a7
DEVICE_RESOLUTION := 720x1280
# Data from https://github.com/TheSSJ/device_asus_zenfone2/blob/master/BoardConfig.mk
HAVE_SELINUX := true
ANDROID_COMMON_BUILD_MK := true
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_HAS_LARGE_FILESYSTEM := true
USE_OPENGL_RENDERER := true
TARGET_BOOTLOADER_IS_2ND := true
COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
BOARD_FUNCTIONFS_HAS_SS_COUNT := true
TARGET_KERNEL_CONFIG := msm8916_sec_defconfig
TARGET_KERNEL_SOURCE := kernel/asus/ze500kl
BOARD_KERNEL_IMAGE_NAME := bzImage
BOARD_FLASH_BLOCK_SIZE := 2048
BOARD_KERNEL_BASE := 0x80078000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x01f88000
#I do not understand this line at all, so if someone could help me about this would be good
BOARD_KERNEL_CMDLINE := init=/init pci=noearly loglevel=0 vmalloc=256M androidboot.hardware=mofd_v1
BOARD_KERNEL_CMDLINE += watchdog.watchdog_thresh=60 androidboot.spid=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx androidboot.serialno=01234567890123456789
BOARD_KERNEL_CMDLINE += snd_pcm.maximum_substreams=8 ip=50.0.0.2:50.0.0.1::255.255.255.0::usb0:on debug_locks=0 androidboot.selinux=permissive
#This line is provided by [user=5097283]@miau9202[/user] data
BOARD_KERNEL_CMDLINE += console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk
#change this to "twrp" to make a TWRP recovery, or any other recovery which might be released
RECOVERY_VARIANT := twrp
# TWRP
ifeq ($(RECOVERY_VARIANT),twrp)
TARGET_RECOVERY_FSTAB := device/asus/zenfone2/twrp.fstab
else
TARGET_RECOVERY_FSTAB := device/asus/zenfone2/recovery.fstab
endif
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
TW_INCLUDE_CRYPTO := true
TW_NTFS_WA := true
RECOVERY_SDCARD_ON_DATA := true
RECOVERY_GRAPHICS_USE_LINELENGTH := true
TW_FLASH_FROM_STORAGE := true
TW_INTERNAL_STORAGE_PATH := "/sdcard"
TW_INTERNAL_STORAGE_MOUNT_POINT := "sdcard"
TW_EXTERNAL_STORAGE_PATH := "/external_sd"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"
TW_NO_SCREEN_BLANK := true
TW_NO_SCREEN_TIMEOUT := true
TW_EXCLUDE_SUPERSU := true
TWRP_EVENT_LOGGING := false
TW_NO_USB_STORAGE := true
since the phone should be the same, i have some hope it would work.
Like always, no idea if is going to work.
EDIT: updated with @miau9202 data
I use the ZenFone2-boot-tools extract the boot.img and get the cmdline
here's the full info:
page_size : 2048
base_addr : 0x80078000
kernel_offset : 0x00008000
kernel_size : 16481272
ramdisk_offset : 0x01f88000
ramdisk_size : 1168673
cmdline : console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk
Click to expand...
Click to collapse
miau9202 said:
I use the ZenFone2-boot-tools extract the boot.img and get the cmdline
here's the full info:
Click to expand...
Click to collapse
you extracted them from my boot.img?
Jhyrachy said:
you extracted them from my boot.img?
Click to expand...
Click to collapse
No, it's from WW118, stock OTA package.
[EDIT]
if you need stock recovery.img, I had upload to your previous thread:
http://forum.xda-developers.com/showpost.php?p=63279307&postcount=13
miau9202 said:
No, it's from WW118, stock OTA package.
Click to expand...
Click to collapse
Ok. (it's the same i linked in the OP, btw)
I updated the Boarconfig.mk, i'll try to compile it now
I tried building a recovery with the CWM recovery builder, it should appear here:
https://builder.clockworkmod.com/done?build_id=dcb611e82f17d2a52e37bd5d29f666db
This is the build id: dcb611e82f17d2a52e37bd5d29f666db
This is the Device Tree, in case someone want to watch it!
https://github.com/Jhyrachy/Asus-Zenfone-2-ZE500KL-Device-Tree
Good luck with the project Just PM me on XDA or maybe you can find me on the TWRP chat again if you get more issues

integrate google apps to the build to be installed in /data/app

Hi all;
i try to make my own rom, and I want add google-apps to the build to be installed in /data/app
this is the steps :
1 - create new folder called "gapps" in vendor/ dir
2- in "gapps" add data/app/Youtube/app/youtube.apk,
3- create android.mk file in "gapps" folder with this content
Code:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := YouTube
LOCAL_SRC_FILES := data/app/YouTube/YouTube.apk
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_OWNER := GOLDROM
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
4 - go to the build dir in the android root files build/target/product/core.mk and add YouTube to the PRODUCT_PACKAGES var
5- build, flash, but youtube not found.
plz correct me , if i made any errors.
Don't know, it's honestly something none of us have ever done since there's little to no advantage over simply flashing a separate gapps package.
The effort to do it for personal builds is greater than that of flashing gapps, and for legal reasons it'll NEVER happen for official builds.
solution is to add your module to PRODUCT_PACKAGES var
rootAndroid/build/target/product/generic_no_telephony.mk
Click to expand...
Click to collapse
and then youtube (or any other google-app) will work fine in /data as a user app
but its still a not clean solution.

Categories

Resources