integrate google apps to the build to be installed in /data/app - General Omni Discussion

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.

Related

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.

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

[CLOSED][OUTDATED][2017.2.7][GUIDES & DOCS] Magisk All-In-One Wiki

This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk All-In-One Wiki​
Table of Contents
Module Creation And Online Repos
Create your first Magisk Module; Submit to Magisk Module Repo
Notes Regarding Magisk Module Repos
Magisk Guides and Tricks
How Do Magic Mount Behave
Manipulate system props (build.prop)
Remove files / folders
Cache mounts
Magisk Details (DEV)
sepolicy-inject tool
Work flow
File structure
Boot stages
Module Creation And Online Repos
Create your first Magisk Module; Submit to Magisk Module Repo
Details are all listed in the module template on Github.​
Notes Regarding Magisk Module Repos
Magisk module can be different kinds, for example it can be used to debloat your system; it can be used to install your favorite application into system to give it the privilege of system apps.; it can be a full custom rom; it can also be cool mods like Xposed and root. However I view the "Magisk Module Repo" as a platform to share modules that can be used on lots of devices, preferably universal to all Android devices. Device specific modules are OK if stated clearly in the descriptions, and actually doing something that is non-trivial.
I will moderate the "Magisk Module Repo" in my personal preference and standard, here are some that will not be included:
Modules that are too large. A full custom rom, for example, is too large to be hosted on Github effectively. You can share them on XDA forums in your device specific forums
Modules that are too trivial. For example: mods that simply just add apps to system; debloating selective apps; doing things that can be done in simple boot scripts. I'll add more here if when I face requests that I consider "trivial"
Modules that contains copyright property (unless given permission)
Modules that violates XDA rules
This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk Guides and Tricks
How Do Magic Mount Behave
Magic Mount by default merges the files in $MODPATH/system into the real /system. You can think as it dirty flashes the contents into /system.
Existing files will be replaced; new files will be added; will not remove any files
Directories under $MODPATH/system that contains a file named ".replace" will NOT merge into the system. It will directly replace the correspond directory in /system.
In the module template, you can list them in "config.sh", the scripts will create the ".replace" file automatically for you.
You can think as it wipes the existing folder, and then adds contents to that folder in /system.
The directory that contains ".replace" will replace the one in /system, all contents originally in the folder will be discarded
Adding items to system is relatively expensive, Magisk would need to do many under-the-hood tasks to achieve it (thus, called "Magic Mount")
Furthermore, the higher level the file is added, the more it effects the overall system
Only add new items if necessary! Think twice before adding items to /system root!
Replacing a whole folder is recommended if viable, it reduces the complicated process and speed up the booting time
Manipulate system props (build.prop)
Since the early days of XDA, people love "build.prop" mods. It can bring cool effects to our devices.
build.prop files are loaded early in the boot process, and once read-in, the values cannot be modified... in theory.
Magisk included a tool called "resetprop", it can modify any system props you want easily.
In the module template, you can set PROPFILE=true, then add your props into the file common/system.prop
Magisk by default reads the system.prop of each module and set the props.
Further resetprop options:
Code:
usage: /data/magisk/resetprop [-v] [-n] [--file propfile] [--delete name] [ name value ]
-v :
verbose output (Default: Disabled)
-n :
no event triggers when changing props (Default: Will trigger events)
--file propfile :
Read props from prop files (e.g. build.prop)
--delete name :
Remove a prop entry
Remove files / folders
It is complicated to actually remove a file (possible, not worth the effort). Replacing it with a dummy file should be good enough
Add an empty file with the same name and path into your module (easy way), or add this code to the updater-script to create it at flash time
Code:
# Example: you want to remove /system/media/audio/alarms/Argon.ogg
# Note: mktouch is a function defined in my updater-script, it is not a standard command!
mktouch $MODDIR/system/media/audio/alarms/Argon.ogg
It is complicated to actually remove a folder (possible, not worth the effort). Replacing it with an empty folder should be good enough
Add the folder to the replace list in "config.sh" in the module template, it will replace the folder with an empty one
Cache mounts
Some files requires to be mounted much earlier in the boot process, currently known are bootanimation, and some libs (most users won't change them).
You can place your files into the corresponding location under /cache/magisk_mount, Magisk will automagiskally manage selinux contexts, permissions and the mounting for you. For example, you want to replace /system/media/bootanimation.zip, copy your new boot animation zip to /cache/magisk_mount/system/media/bootanimation.zip, Magisk will mount your files in the next reboot​
More to come ...
This thread is outdated and will never be updated
Please check the official Magisk documentation on Github!
Magisk Details (DEV)
sepolicy-inject
Before starting, check the complete document from Chainfire
SELinux Policy Section in How-To SU
The included sepolicy manipulation tool is called "sepolicy-inject", it supports live patching, and also supports policy statements following the same syntax as supolicy:
Code:
sepolicy-inject [--live] [--minimal] [--load <infile>] [--save <outfile>] [policystatement...]
--live: directly load patched policy to device
--minimal: minimal patches for boot image to let Magisk live patch on boot
Supported policy statements:
"allow #source-class #target-class permission-class #permission"
"deny #source-class #target-class permission-class #permission"
"auditallow #source-class #target-class permission-class #permission"
"auditdeny #source-class #target-class permission-class #permission"
"create #class"
"permissive #class"
"enforcing #class"
"attradd #class #attribute"
"typetrans source-class target-class permission-class default-class (optional: object-name)"
source-class and target-class can be attributes (patches the whole group)
All sections (except typetrans) can be replaced with '*' to patch every possible matches
Sections marked with '#' can be replaced with collections in curly brackets
e.g: allow { source1 source2 } { target1 target2 } permission-class { permission1 permission2 }
Will be expanded to:
allow source1 target1 permission-class permission1
allow source1 target1 permission-class permission2
allow source1 target2 permission-class permission1
allow source1 target2 permission-class permission2
allow source2 target1 permission-class permission1
allow source2 target1 permission-class permission2
allow source2 target2 permission-class permission1
allow source2 target2 permission-class permission2
Work flow
Code:
--------post-fs---------
(Device Boots) -> Mount Magisk cache files -> (build.prop and persist prop loads) ->
-----------------------------post-fs-data---------------------------------
-> Live patch sepolicy -> mount magisk.img -> Preparation -> 5 stage of tasks ->
--------------late_start--------------
-> (System Start Up) -> run all service.sh -> Start Magisk Hide
-> (Parallel with other processes....)
(Preparation) Magisk will travel through all enabled module directories to collect info
(1st stage) Mount system (vendor) mirrors. This is used to revert dummy files
(2nd stage) Clone the system structure, and mount the dummy directories to provide a dummy skeleton
(3rd stage) Mount module items into the system (and dummy skeletons)
(4th stage) Execute scripts
(5th stage) Mount the mirror items back to the remaining dummy files
File Structures
A "Magisk Module" is a subfolder under magisk root directory
The structure of a Magisk Module do not have a strict restriction. However, here are some key files / folders:
Code:
/magisk
|
|-.core <--- Magisk auto-generated files. Do not mess with them :)
| |
| |
| |-hosts <--- This file will be mounted to /system/etc/hosts to enable
| | systemless support for AdBlocker apps.
| |-magiskhide <--- This folder holds the hide list and add/rm/list/enable/disable scripts
| | | Include the magiskhide binary
| | |-magiskhide
| | |-hidelist
| | |-add
| | |-rm
| | |-list
| | |-enable
| | |-disable
| |
| |-su <--- This folder holds the MagiskSU binaries and scripts
| | | Include the magiskhide binary
| | |-su
| | |-magisksu.sh
| | |-sbin_bind <--- This folder will bind mount to /sbin
| | |-.....
| |
| |-post-fs-data.d <--- Place scripts that should be executed at post-fs-data here
| | |-.....
| |
| |-service.d <--- Place scripts that should be executed at late_start service here
| |-.....
|
|
|-other_module
| |-.....
|
|-your_module
| |
| |-auto_mount <--- If this file exists, auto mount is enabled
| |
| |-disable <--- If this file exists, the module is disabled
| |
| |-remove <--- If this file exists, the whole module folder
| | will be removed in the next reboot
| |-module.prop <--- This files stores the info of your module
| |
| |-system.prop <--- This file will be read by resetprop
| |
| |-post-fs-data.sh <--- This script will be executed in post-fs-data
| |
| |-service.sh <--- This script will be executed in late_start service
| |
| |-system <--- If auto mount is enabled, Magisk will "Magic Mount" this folder
| | |-....
| | |-....
| | |-....
| | |-....
| |
| |-vendor <--- Auto generated. A symlink to $MODID/system/vendor
| | Dealing with separate vendor partitions
| |-..... <--- Any other files/folders are allowed
|
|-another_module
| |-.....
|-...
Other important folders (under /dev), these will be created every boot
Code:
/dev/busybox <--- Busybox applet symlinks will be created here
|-.... Will be bind mounted to /system/xbin if enable busybox in Magisk Manager
|-....
|-....
/dev/magisk
|
|-dummy <--- Lies all cloned dummy structures
| | Folders in here will be mounted to /system
| |-.....
|
|-mirror <--- Lies all mirrors
| |
| |-system
| | |-....
| |
| |-vendor <--- Could be a symlink to /dev/mirror/system/vendor
| |-....
|
|-mnt <--- Lies all mounting info
|
|-dummy <--- Lists all dummy mounts
| |-....
|
|-mirror <--- Lists all mirror mounts
| |-....
|
|-system <--- Lists all /system mounts
| |-....
|
|-vendor <--- Lists all /vendor mounts
|-....
Boot Stages
If you are working on complicated projects, you shall need more control to the whole process.
Magisk can run scripts in different boot stages, you can fine tune exactly what you want to do.
post-fs mode:
This stage is BLOCKING. Boot process will NOT continue until everything is done, or 20 seconds has passed
Happens after most partitions are mounted, except /data
Magisk will bind mount items in: /cache/magisk_mount/system (*1)
post-fs-data mode:
This stage is BLOCKING. Boot process will NOT continue until everything is done, or 60 seconds has passed
Happens after /data is ready (including encrypted data)
Happens before Zygote is started (which means pretty much everything)
/data/magisk.img will be mounted to /magisk
Magisk will bind mount items in: /magisk/$MODID/system (*2)
Magisk will run script: /magisk/$MODID/post-fs-data.sh
Magisk will run scripts in: /magisk/.core/post-fs-data.d
late_start service mode:
This stage is NON-BLOCKING, it will run parallel with other processes
Put time consuming but non time critical tasks here. In other modes, the boot process will be stuck if it took too long to finish your tasks.
Happens when class late_start is started . Most things are are loaded/loading in this case.
Magisk will run script: /magisk/$MODID/service.sh
Magisk will run scripts in: /magisk/.core/service.d
(*1) Bind mounting in post-fs only support simple bind mounts, which mean you cannot add files or replace directories.
It will only mount files that exist in the current system.
(*2) Bind mounting in post-fs-data support complex bind mounts. Please refer to the "Magic Mount" section
Thanks for this @topjohnwu.
If github is the where all modules need to be hosted, how do we plan on supporting closed source modules?
Or is closed source modules not supported?
@topjohnwu is there any thought about aroma installers being supported? is this already possible? or are you planning to add something similar?
I've tried to build a v7-compatible zip file for an app and Magisk Manager kept crashing with the following in its module.prop:
Code:
versionCode=7.1.3231428
Is it supposed to be a single round number (like a versionCode for Android apps)?
anantharam said:
Thanks for this @topjohnwu.
If github is the where all modules need to be hosted, how do we plan on supporting closed source modules?
Or is closed source modules not supported?
Click to expand...
Click to collapse
You can host closed source binary on Github.
ibrokemypie said:
@topjohnwu is there any thought about aroma installers being supported? is this already possible? or are you planning to add something similar?
Click to expand...
Click to collapse
You can flash the Magisk Module template in aroma with the same method to flash SuperSU. However if the module itself is made with aroma, it will not be able to flash in Magisk Manager
stangri said:
I've tried to build a v7-compatible zip file for an app and Magisk Manager kept crashing with the following in its module.prop:
Is it supposed to be a single round number (like a versionCode for Android apps)?
Click to expand...
Click to collapse
Yes, the versionCode is the similar concept of Android application's version code. It has to be a single number. You can place your long version number into version, which supports any string.
i have a problem with MagiskManager 2.0 launch.... app stopped after open it.
Zenfone ZE520KL...
Also, plz help - where can i found new supersu 2.78 for magisk?
topjohnwu said:
Yes, the versionCode is the similar concept of Android application's version code. It has to be a single number. You can place your long version number into version, which supports any string.
Click to expand...
Click to collapse
Still, the magisk manager shouldn't crash on invalid versionCode.
I need to patch in lines to audio_effects.conf rather than replace the file. Is there any way to do a systemless merge of lines within a conf with Magisk?
Hello, I'm trying to bring the OnePlus Camera to Magisk, and I'm having issues. I feel that I understand how to create a Magisk module from following your tutorial on Github, but apparently I don't. I just spent about 25 minutes trying to figure this out on my own, and couldn't.
When I flash my zip, I get error 255 in TWRP. It claims "/tmp/updater" doesn't exist. Magisk Manager also claims it's not a Magisk module when trying to manually add it in the app.
Below is the recovery.log, and link to the Github repo for what I'm working on. Any help is appreciated!
Source: https://github.com/ryanguy426/OnePlus-Camera-Magisk
recovery.log (PasteBin): http://pastebin.com/z0B9jaSM
ryanguy426 said:
When I flash my zip, I get error 255 in TWRP. It claims "/tmp/updater" doesn't exist. Magisk Manager also claims it's not a Magisk module when trying to manually add it in the app.
Source: https://github.com/ryanguy426/OnePlus-Camera-Magisk
recovery.log (PasteBin): http://pastebin.com/z0B9jaSM
Click to expand...
Click to collapse
AFAIK If you use the Magisk v7 template (from github), you do not flash resulting ZIP in recovery. Also, I'm not sure if just downloading the ZIP file from github will do, AFAIK doing that creates a nesting folder which is probably why Magisk refuses to add the module.
I can create the correct ZIP and I would have tried it on my phone, but I followed your support link and it leads to the generic Magisk thread and doesn't list specific models it's compatible with, so I refrained.
PS. Fix REPLACE in your config.sh
stangri said:
AFAIK If you use the Magisk v7 template (from github), you do not flash resulting ZIP in recovery. Also, I'm not sure if just downloading the ZIP file from github will do, AFAIK doing that creates a nesting folder which is probably why Magisk refuses to add the module.
I can create the correct ZIP and I would have tried it on my phone, but I followed your support link and it leads to the generic Magisk thread and doesn't list specific models it's compatible with, so I refrained.
PS. Fix REPLACE in your config.sh
Click to expand...
Click to collapse
I haven't created a support thread yet, as XDA doesn't allow placeholder threads. I'll create the thread when the module works.
I'll start over with it, and see if I can get it working. They're for the tips!
I have created a module that will enable miracast by adding a line to the build.prop. When I try to manually add the module to magisk I get an error saying "This zip is not a magisk module!!" Can someone please tell me what I'm doing wrong.
Here is the module : github.com/blake1029384756/EnableMiracast
Blake1029384756 said:
I have created a module that will enable miracast by adding a line to the build.prop. When I try to manually add the module to magisk I get an error saying "This zip is not a magisk module!!" Can someone please tell me what I'm doing wrong.
Here is the module : github.com/blake1029384756/EnableMiracast
Click to expand...
Click to collapse
If you are downloading the zip from github it nests a folder within it which magisk doesnt like, you need to zip up the files in the root of the zip.
ibrokemypie said:
If you are downloading the zip from github it nests a folder within it which magisk doesnt like, you need to zip up the files in the root of the zip.
Click to expand...
Click to collapse
I am aware that it does that and have made sure all files are in the root of the zip. Idk why it doesnt add to magisk manager
ahrion said:
I need to patch in lines to audio_effects.conf rather than replace the file. Is there any way to do a systemless merge of lines within a conf with Magisk?
Click to expand...
Click to collapse
Just make a copy of the file as /magisk/your_mldule/system/etc/audio_effects.conf, and modify the fake aidio_effects.conf which will be mounted during boot.
But the weird thing is that some setprop commands don't work when it is written in post-fs-data or post-fs, at least under Magisk v6 OnePlus 3 Oxygen OS. I have to write the setprop modifications in a fake build.prop instead.
Here is the module that I transplant from guitardedhero's ViPER4Audio_5.4_Stock.zip. Maybe it would help.
BTW: The attachment doesn't work well on v7, it stuck at boot animation. While it works well on v6.
Iceyogurt said:
Just make a copy of the file as /magisk/your_mldule/system/etc/audio_effects.conf, and modify the fake aidio_effects.conf which will be mounted during boot.
But the weird thing is that some setprop commands don't work when it is written in post-fs-data or post-fs, at least under Magisk v6 OnePlus 3 Oxygen OS. I have to write the setprop modifications in a fake build.prop instead.
Here is the module that I transplant from guitardedhero's ViPER4Audio_5.4_Stock.zip. Maybe it would help.
BTW: The attachment doesn't work well on v7, it stuck at boot animation. While it works well on v6.
Click to expand...
Click to collapse
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
ahrion said:
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
Click to expand...
Click to collapse
It is not easy to find a bug in my mobile browser. I'll try to look through your script more carefully when I get a PC. Now there is a mistake in the config.sh.
Code:
# This is an example
REPLACE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"
# Construct your own list
REPLACE="
/system/etc
/system/vendor/etc
"
The first variable REPLACE is an example, so just delete it.(oh sorry, I forget it will be revalued because of the second one) And leave the second REPLACE void.
Code:
# Construct your own list
REPLACE=""
Since the value of REPLACE are folders, it mean replace an existing folder with a same-name-folder. The modified fake audio_effects.conf file will be mounted to replace the existing file automatically. No need to replace a whole folder.
ahrion said:
Perhaps you might be able to tell me why Magisk Manager isn't recognizing my zip as a Magisk module...https://github.com/therealahrion/Audio-Modification-Framework
Click to expand...
Click to collapse
Sorry about it, i can't figure out the reason either. I don't recommend you do the modification of the audio config files in post-fs-data.sh, which will be executed during every boot. I love your dax, wish it be a magisk module soon.

HELP!! Need TWRP build for N950U to test BL Unlock

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.

Question Twrp for Tab A8 SM-X205

Hello Guys,
I need Twrp for My Tab A8 SM-X205. I've already try to build but no success and is not list on twrp.me please i need HELP !
device tree for Tab A8 SM-X205 : https://github.com/U4I5/twrp_device_samsung_Tab_A8_4G who can build img file ?
rename ~/TWRP/twrpdtgen/output/samsung/gta8/omni_gta8.mk to twrp_gta8.mk
delete vendorsetup.sh
Make a copy of recovery.fstab and rename to twrp.flags
Move both files recovery.fstab and twrp.flags to recovery/root/system/etc
(create these folders)
open twrp_gta8.mk and :
1. delete the 3 lines below # Inherit from those products, Most specific first.
replace those 3 lines with this
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
2. delete $(call inherit-product, vendor/omni/config/gsm.mk)
3. change omni to twrp (2 places)
open AndroidProducts.mk
change omni to twrp (4 spots)
4. Optional: add extra items to BoardConfig.mk
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh
• Make a directory called ~/a12s-twrp
cd ~/twrp
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j1
copy ~/TWRP/twrpdtgen/output/samsung to /twrp/device
Building
========
. build/envsetup.sh
lunch twrp_gta8-eng
mka recoveryimage –j1
Recovery.img at out/Samsung/gta8/...img
Dkpost3 said:
rename ~/TWRP/twrpdtgen/output/samsung/gta8/omni_gta8.mk to twrp_gta8.mk
delete vendorsetup.sh
Make a copy of recovery.fstab and rename to twrp.flags
Move both files recovery.fstab and twrp.flags to recovery/root/system/etc
(create these folders)
open twrp_gta8.mk and :
1. delete the 3 lines below # Inherit from those products, Most specific first.
replace those 3 lines with this
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
2. delete $(call inherit-product, vendor/omni/config/gsm.mk)
3. change omni to twrp (2 places)
open AndroidProducts.mk
change omni to twrp (4 spots)
4. Optional: add extra items to BoardConfig.mk
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh
• Make a directory called ~/a12s-twrp
cd ~/twrp
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j1
copy ~/TWRP/twrpdtgen/output/samsung to /twrp/device
Building
========
. build/envsetup.sh
lunch twrp_gta8-eng
mka recoveryimage –j1
Recovery.img at out/Samsung/gta8/...img
Click to expand...
Click to collapse
Hey bro thank but I have to rename omni to twrp of these ligne : PRODUCT_NAME := omni_gta8 $(call inherit-product, vendor/omni/config/common.mk) ?
Dkpost3 said:
rename ~/TWRP/twrpdtgen/output/samsung/gta8/omni_gta8.mk to twrp_gta8.mk
delete vendorsetup.sh
Make a copy of recovery.fstab and rename to twrp.flags
Move both files recovery.fstab and twrp.flags to recovery/root/system/etc
(create these folders)
open twrp_gta8.mk and :
1. delete the 3 lines below # Inherit from those products, Most specific first.
replace those 3 lines with this
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
2. delete $(call inherit-product, vendor/omni/config/gsm.mk)
3. change omni to twrp (2 places)
open AndroidProducts.mk
change omni to twrp (4 spots)
4. Optional: add extra items to BoardConfig.mk
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh
• Make a directory called ~/a12s-twrp
cd ~/twrp
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j1
copy ~/TWRP/twrpdtgen/output/samsung to /twrp/device
Building
========
. build/envsetup.sh
lunch twrp_gta8-eng
mka recoveryimage –j1
Recovery.img at out/Samsung/gta8/...img
Click to expand...
Click to collapse
Can you do it for me i got some error please : build/make/core/dex_preopt_libart.mk:18: error:
Ur!el said:
Can you do it for me i got some error please : build/make/core/dex_preopt_libart.mk:18: error:
Click to expand...
Click to collapse
Google
Ur!el said:
Hey bro thank but I have to rename omni to twrp of these ligne : PRODUCT_NAME := omni_gta8 $(call inherit-product, vendor/omni/config/common.mk) ?
Click to expand...
Click to collapse
omni_gta8 NO
twrp_gta8.mk - yes
Dkpost3 said:
rename ~/TWRP/twrpdtgen/output/samsung/gta8/omni_gta8.mk to twrp_gta8.mk
delete vendorsetup.sh
Make a copy of recovery.fstab and rename to twrp.flags
Move both files recovery.fstab and twrp.flags to recovery/root/system/etc
(create these folders)
open twrp_gta8.mk and :
1. delete the 3 lines below # Inherit from those products, Most specific first.
replace those 3 lines with this
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
2. delete $(call inherit-product, vendor/omni/config/gsm.mk)
3. change omni to twrp (2 places)
open AndroidProducts.mk
change omni to twrp (4 spots)
4. Optional: add extra items to BoardConfig.mk
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh
• Make a directory called ~/a12s-twrp
cd ~/twrp
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j1
copy ~/TWRP/twrpdtgen/output/samsung to /twrp/device
Building
========
. build/envsetup.sh
lunch twrp_gta8-eng
mka recoveryimage –j1
Recovery.img at out/Samsung/gta8/...img
Click to expand...
Click to collapse
Why not to create twrp file instead of this for every normal user like me to flash it and use
Did this worked with anyone
Dkpost3 said:
rename ~/TWRP/twrpdtgen/output/samsung/gta8/omni_gta8.mk to twrp_gta8.mk
delete vendorsetup.sh
Make a copy of recovery.fstab and rename to twrp.flags
Move both files recovery.fstab and twrp.flags to recovery/root/system/etc
(create these folders)
open twrp_gta8.mk and :
1. delete the 3 lines below # Inherit from those products, Most specific first.
replace those 3 lines with this
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
2. delete $(call inherit-product, vendor/omni/config/gsm.mk)
3. change omni to twrp (2 places)
open AndroidProducts.mk
change omni to twrp (4 spots)
4. Optional: add extra items to BoardConfig.mk
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh
• Make a directory called ~/a12s-twrp
cd ~/twrp
repo init --depth=1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
repo sync -c --no-clone-bundle --no-tags --optimized-fetch --prune --force-sync -j1
copy ~/TWRP/twrpdtgen/output/samsung to /twrp/device
Building
========
. build/envsetup.sh
lunch twrp_gta8-eng
mka recoveryimage –j1
Recovery.img at out/Samsung/gta8/...img
Click to expand...
Click to collapse
??
And if worked ,why no one published ithe file ??
I have a bit of experience building TWRP for the Galaxy Tab A 8.0 (2019), Galaxy Tab A 10.1" (2019) and Galaxy Tab A7 (2020), so when I saw the $149 deal this week I thought I'd give the A8 a try. I unlocked the bootloader, updated to XAR-X200XXU1AVG1-20220804205906, and made my first build of TWRP 3.6.2_11.
My first attempt generated a boot loop, which isn't all that unusual. I pulled my camera out to capture the diagnostic log that was flashing on the screen, but the boot loop stopped after about a dozen iterations. I didn't worry at the time, since I assumed I could force a reboot using Power & Vol Down...but that's not working, no matter how long I hold the two buttons.
Unfortunately, without the ability to force restart, I can't get back to Download Mode to flash the stock recovery in Odin. I'm basically dead in the water until my battery is depleted, which could be weeks.
Any suggestions on how to force restart if Power & Vol Down isn't working? I've never had an issue doing this with Samsung tablets based on Qualcomm or Exynos chipsets, but this is my first experience with Unisoc.
UPDATE: A week was sufficient reset time and connecting USB with Vol Up & Down got me to Download Mode. I'm back in business. Moral of the story is to catch a boot loop quickly to return to Download Mode. Don't let it loop more than a few times.
(And the X200XXU1AVG1 kernel source is now posted.)
Okay, I have a TWRP 3.6.2_11 build booting and running on SM-X200 except for user data encryption, which I'll continue to work on tomorrow. If anyone has any insights into how to get TWRP to recognized metadata encryption on this device, please let me know.
Update: Now posted here: https://forum.xda-developers.com/t/...-for-2021-galaxy-tab-a8-10-5-sm-x200.4488691/
Can't use the TWRP user interface. no function available. what am I doing wrong. had to install stock recovery again
I have TWRP ready for SM-X205. However, this will not work because there is such a thing as Android Verified Boot. It can be disabled by patching vbmeta.img
Now I'm trying to do it, but so far without success. TWRP starts, but instead of the system. Android does not start, TWRP starts. If any of you are ready to help in resolving this issue, I would be very grateful.
unpack and add magiskboot in orangefox.zip
OK, I'll try this.
AndrewMarkov621 said:
OK, I'll try this.
Click to expand...
Click to collapse
send me a tree, I'll make twrp
TWRP is already there
Dkpost3 said:
unpack and add magiskboot in orangefox.zip
Click to expand...
Click to collapse
Does not work, Odin refuses to flash the device.
Actually, here is the result of the TWRP build. When booting into the system, it writes something like "Warranty bit: boot" "Warranty bit: recovery". And goes into the bootloop. At the moment I'm trying to assemble a patched vbmeta, however, so far without success, I can't even get the encryption keys, because a lot of time has passed since writing the guide on the Internet and Android protection has stepped far ahead. I hope that someday I will be able to at least get off the ground.
P.S. The version that one of the participants of the SM-X200 theme put together works on the SM-X205 in the same way as mine. Magisk is installed on the device, root is received.
I was able to install TWRP definitively. It works fine with Android. However, it cannot perform any functions, the internal storage does not see, it gives this:
If you remount the partitions to ext2 and then to ext4, then everything works. However, the Storage section is not mounted in any way, it was in vfat, and remained. The system does not load after these manipulations, only the installation of stock firmware helps. Something like that.

Categories

Resources