System file mixer_paths_0.xml resets after reboot - Samsung Galaxy J7 Questions & Answers

Hi everyone! I'm hoping you're doing well in your houses. I'm quite noob in the AOSP world so I apologise in advance if this is a trivial question but I haven't had any success so far.
I'm trying to fix the low mic gain for Whatsapp (3th party apps in general I assume) in my Samsung Galaxy J7 (SM-J700M) using LineageOS 17.1 (+ Magisk 20.3). Many threads indicate that the file mixer_paths_0.xml must be edited and then everything should work after a reboot.
The problem is that those changes are reset every time I reboot the phone, so I've been unable to check if the solution works (and the idea is that it should works after any other future reboot of course).
So my question is why the file mixer_paths_0.xml is set to its default after the reboot? and how can I make the changes persistent across reboots?
Thanks!

After reading a lot I tried to mount the systems directory with RW permissions but I realised that Magisk is actually in charge of that task and doing so could lead to some issues, so I created a very simple module with the file in question in order to replace/inject the default one but it didn't work the file still have the old values.
Code:
.
|-- META-INF
| `-- com
| `-- google
| `-- android
| |-- update-binary
| `-- updater-script
|-- module.prop
`-- system
`-- vendor
`-- etc
|-- mixer_paths_0.xml
`-- test
I included an empty test file to see if it gets added and indeed it appears but unfortunately mixer_paths_0.xml is not replaced. I assume that the default one is mounted after the module is done and overwrites my custom mixer_paths_0.xml file, if that's the case how can I mount the module files after all the other files are in places?
Thank you!

Related

How to create zip files which can be flashed from clockworkmod recovery.

I was just flashing cyanogen mod 9. And I found that it doesn't have any file manager (and I cannot demand one from the cm team as they already have some more important things to take care of). So I installed one from market....not a big deal.
But I got a thing in my mind that how great it would be if it is possible to install apps directly from clockworkmod recovery. Does anyone know of such thing so that applications can be directly installed from clockworkmod recovery. I think that it is possible as there are many zip files around which can be installed from clockworkmod recovery. Is there any method so that we can convert .apk file to flashable. Zip files........
Sent from my GT-I9100 using xda premium
What does update-binary do?
manishk3008 said:
I was just flashing cyanogen mod 9. And I found that it doesn't have any file manager (and I cannot demand one from the cm team as they already have some more important things to take care of). So I installed one from market....not a big deal.
But I got a thing in my mind that how great it would be if it is possible to install apps directly from clockworkmod recovery. Does anyone know of such thing so that applications can be directly installed from clockworkmod recovery. I think that it is possible as there are many zip files around which can be installed from clockworkmod recovery. Is there any method so that we can convert .apk file to flashable. Zip files........
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
I would also like to know this. I am currently trying to replace the Gtalk app from another ROM. I poked into a flashable zip of gtalk. The directory structure looks like this:
./
|-- META-INF
| |-- CERT.RSA
| |-- CERT.SF
| |-- com
| | `-- google
| | `-- android
| | |-- update-binary
| | `-- updater-script
| `-- MANIFEST.MF
|-- system
| |-- app
| | `-- Talk.apk
| `-- lib
| `-- libtalk_jni.so
`-- talk1.3.update-signed.zip
As you can see, ./system simply contains the files you want to replace, in proper direactory structure.
META-INF->MANIFEST.MF looked like:
Manifest-Version: 1.0
Created-By: 1.0 (Android SignApk)
Name: system/lib/libtalk_jni.so
SHA1-Digest: CS1HUsvOtzoRKbv+oVDH2DYgba4=
Name: META-INF/com/google/android/updater-script
SHA1-Digest: GU2aCGeV8dptZE08Gh4LQAXRobo=
Name: system/app/Talk.apk
SHA1-Digest: NGmFc12Uh43BhSHVEE22XU4ZFNw=
Name: META-INF/com/google/android/update-binary
SHA1-Digest: 8bR5X0XTbEu6II0NLIRK/31A1lE=
This is easy enough, just the sha1sums of all the files involved.
The CERT.* stuff must be related to signing the zip.
The updater-script is also not difficult to understand:
ui_print("");ui_print("Installing Talk 1.3...");ui_print("");
set_progress(1.000000);
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Done!");
ui_print("");
But I have no idea what the update-binary does.
Waiting for help from the more experienced friends.

[KERNEL] [15/04/10][5.1/3G+WIFI][Fix for empty directories after mount] [V18]

Hey Guys,
mkasick released in his thread a fix for the mounting problems in Android >= 4.2.
Description of the issue:
mkasick said:
Android >= 4.2 breaks Dalvik-apps that mount file systems to be shared with other apps. This includes CifsManager, Mount Manager, essentially anything that mounts cifs shares, FUSE file sytems, etc. The symptom is that the mounted contents appear fine to app that peforms the mount operation (assuming the app itself provides the ability to browse the contents), but every other app only sees an empty directory at the mount point.
Click to expand...
Click to collapse
As I said - mkasick released a solution - so I compiled my own kernel. Now we can again easy mount cifs and others! All old apps should work. Only limitation: the mount point needs to be outside of /storage (and also /mnt/sdcard/). Fix for this: Mount within /data/media/0 -- android will redirect the mount so you can access the mounted-files from this folders.
The kernel is a "stock kernel" and also includes:
mkasick Patch
Built-In cifs, md4, utf8, nfs, f2fs (Since V17)
kexec hardboot patch (The full patch, allows boot as host and as guest)
As Modules: .ko: snd-usb-audio and all of its devices (Installed, but not modprobe'd since V17)
[Since V16/Android 5.0.2] Fix for baseband_xmm_power wakelock on tilapia (see Hints and Bugs since V16 / Android 5.0 / Lollipop ; for Android 4.4.4 see this post)
mkasick recommends in his thread to patch dalavik, but for the stock-roms it is easier to patch the kernel.
Known Bugs:
Since Android 5.0.X/V16: SELinux is now blocking the access of cifs/nfs even in read. Also nfs isn't loaded at boot time anymore. For more information look below.
Since Android 4.4.X: There is a known bug with mounting cifs (you can't write). The solution is (try at your own risk) here. If you want to do this workaround at boot-time, you can flash the zip linked here.
With SuperSU >= 1.50 && < 1.65 the mounted folders are empty. Please update! (For more Info see hide-box "SuperSU Information" below)
Hints and Bugs since V16 / Android 5.0 / Lollipop:
SELinux, cifs and nfs
SELinux is since Android 5.0 "more" enforced. Because of that, even the read on nfs / cifs isn't working anymore without disabling selinux by "setenforce permissive" as root. Be careful, disabling selinux is an security hole. USB is still working with selinux at enforcing.
Because of the same reason the nfs and sound modules are not loaded at boot anymore. Because I don't want to mess around with selinux at boot time, you can modprobe them yourself, if you need it. Run the following commands as root to use nfs / sound modules (a installed busybox is required):
Activate sound modules:
Code:
busybox modprobe snd-usb-audio
Activate NFS File System:
Code:
busybox modprobe nfs
Workaround for baseband_xmm_power wakelock
Some people have massive issues with tegra3 + cellular devices with the baseband_xmm_power wakelock. The wakelock drains all the battery. With V16 I included a possible fix for this. The fix is based on the work of jfmcbrayer and Sgt. Meow. By default, the fix isn't active and the kernel uses the stock behaviour.
If you want to disable the wakelock entirely, you can flash this zip: CWM_activate_baseband_xmm_power_wakelock_workaround_vorcers_rev2.zip
I used this this workaround for some time with Android 4.4.4 and I had no issues. Well, I did not test the mobile data... Please tell me, if something isn't working (And the workaround is active). I just wanted to get rid of that battery drain. I was on flight mode all time.
Technical:
The workaround is enabled by echoing a number into a baseband_xmm_power module parameters:
Code:
echo 0 > /sys/module/baseband_xmm_power/parameters/bb_timeout
Possible Values:
< 0 - disable workaround, stock behaviour [Default (-1)]
= 0 - disable the baseband_xmm_power wakelock completely
> 0 - how long the wakelock can stay active, every time the wakelock is triggered, in 10ths of a second. Meaning: Value 5 = 500 ms, 10 = 1 second, 20 = 2 seconds....
You find the patch I used in the actual Patchset. (Included since Android 5.0.2)
Downloads
(Kernels since v8 are only tested by me for the 3G version (tilapia) - but should also work with wifi (grouper).)
The flash of the kernel shouldn't break anything, but I recommend to backup your system.
Download-Links for grouper and tilapia:
Android 5.1: Kernel: Grouper: boot-grouper-vorcers-gf5d7b8b-v18.zip ; Tilapia: boot-tilapia-vorcers-gf5d7b8b-v18.zip
Android 5.0.2: Kernel: Grouper: boot-grouper-vorcers-g6ff7a51-v16.zip ; Tilapia: boot-tilapia-vorcers-g6ff7a51-v16.zip
Android 4.4.4: Kernel: Grouper: boot-grouper-vorcers-g1e42d16-v13.zip ; Tilapia: boot-tilapia-vorcers-g1e42d16-v13.zip
In V11 the kernel modules are placed in /data instead of /system. If you are upgrade from < V11 and you want to delete the modules in /system, you can delete the folder "/system/vorcers_kernelmodules" manually, or you use this CWM-Zip to delete.
Download-Links only for grouper: (try on tilapia at your own risk)
Android 4.3: Kernel: boot-grouper-vorcers-g1e8b3d8-v7.zip Kernelmodules: integrated
Android 4.2.2: Kernel: boot-grouper-vorcers-g05b777c-v4.zip Kernelmodules: kernelmodules-vorcers-g05b777c-v2.zip
Extra-Links:
My Repository for this Kernel (also contains old versions): https://www.mediafire.com/folder/j9iocde4l20c7/Kernel
Stock-Kernels: https://www.mediafire.com/folder/d3mj3k3v61jzu/Stock Kernels
A zip which contains the Patches and modifications I made: https://www.mediafire.com/folder/kvdmcsl16x0ox/Sources
Integration wishes for new kernelmodules to support new hardware are always welcome (you will get .ko's for my kernel)
Have a lot of fun!
Sources:
http://forum.xda-developers.com/showthread.php?t=2106480 (Mount fix)
http://forum.xda-developers.com/showthread.php?t=2104706 (Hardboot patch)
http://source.android.com/source/building-kernels.html
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://nek0s.blogspot.de/2012/12/nexus-7-ramdisk.html
Changelog:
Android 5.1: gf5d7b8b-v18 (2015/04/10)
- Switched to gf5d7b8b / android-tegra3-grouper-3.1-lollipop-mr1
- Build-In nfs
- Disabled Module auto loading for snd-usb modules -- are still installed
- Added f2fs Filesystem, untested, standard is ext4
Android 5.0.2: g6ff7a51-v16 (2015/01/31)
- Switched to g1e42d16 / android-tegra3-grouper-3.1-lollipop-release
- Added Workaround for the baseband_xmm_power wakelock on tilapia (Please see "Hints and Bugs since V16 / Android 5.0 / Lollipop" for more information)
- NFS and Sound Modules are not loaded anymore by default but can loaded manual via "busybox modprobe nfs" / "busybox modprobe snd-usb-audio".
Android 4.4.4: g1e42d16-v13 (2014/06/06)
- Switched to g1e42d16 / android-tegra3-grouper-3.1-kitkat-mr2
Android 4.4.3: g4776c68-v12 (2014/06/03)
- Updated Grouper and Tilapia ramdisks for Android 4.4.3.
Android 4.4.2: g4776c68-v11 (2014/01/11)
- To save space in /system, the kernel-modules had been moved from /system/vorcers_kernelmodules to /data/vorcers_kernelmodules.
If you want to delete the modules in /system, you can use this zip: CWM_delete_system_vorcers_kernelmodules.zip
- Nothing else is new
Android 4.4.2: g4776c68-v10 (2013/12/11)
- Updated Kernel Config and Ramdisks. (Both changed in Android 4.4.2/KOT49H)
Android 4.4: g4776c68-v9 (2013/12/10)
- Created separate files for grouper and tilapia (their ramdisk differ, kernel not)
Android 4.4: g4776c68-v8 (2013/12/07)
- Switched to Android 4.4: g4776c68 ; KRT16O (?) ; android-tegra3-grouper-3.1-kitkat-mr1 KRT16S is gee1a0b2 / (?)(?) android-tegra3-grouper-3.1-kitkat-mr0 (?)(?)
Android 4.3: g1e8b3d8-v7 (2013/09/01)
- Modules Support for Android 4.3
- Packed all modules inside zip...
- I go back to the old version scheme and only count up the numbers...
Android 4.3: g1e8b3d8-v6 (2013/07/29)
- Forgot somehow UTF8
- Really added /proc/config.gz
Android 4.3: g1e8b3d8-v5-km-v4 (2013/07/25)
- Switched to Android 4.3: g1e8b3d8 ; jwr66v ; android-tegra3-grouper-3.1-jb-mr2
- This kernel has also: /proc/config.gz and an loadable module support (Stock has not)
- I also provided the patchset I used for Android 4.3
Android 4.2.2: g05b777c-v4-km-v2 (2013/02/19)
v4-Kernel (boot-grouper-vorcers-g05b777c-v4.zip):
- Switched to different version schema: boot-grouper-vorcers-<android-kernel-hash>-v<count of changes of kernel (overall)> ; For the kernelmodules it is: kernelmodules-vorcers-<android-kernel-hash>-v<count of changes of kernel-modules (overall)>. This means for you: if the number is higher, there is something new Version-Number at Changelog: <android-kernel-hash>-v<count of changes of kernel (overall)> -km-v<count of changes of kernel-modules (overall)>
- Added init.d (/system/etc/init.d/) support to the kernel/init.rc. If the directory exists, the scripts inside the directory get run via "run-parts" from busybox. This means: The script need to be runable (+x) and mustn't have an file-extension.
- Removed the mount of /mounts out of init.rc (is now in an script called by init.rc)
v2-Kernelmodules (kernelmodules-vorcers-g05b777c-v2.zip):
- Made a CWM flashable package which autoloads the modules in my kernel.
Android 4.2.1: v3 - boot-grouper-4.2.2-vorcers-v3.zip : (2013/02/15)
- Switched to Android 4.2.2 - Kernel, jdq39, g05b777c, android-tegra3-grouper-3.1-jb-mr1.1
- Added Modules for OTG-USB-Sound (see kernelmodules*.zip)
Android 4.2.0: v2 (2013/01/19)
- I added a tmpfs mount for /mounts, so you don't need to do "mount -o remount rw /" and create your inital-mountpoint yourself. /mounts is writeable by all apps. (done in init.rc)
Android 4.2.0: v1 (2013/01/19)
- inital release
SuperSU Information:
Information for SuperSU Users
It seemed that SuperSU >= 1.50 && < 1.65 doesn't work correctly with this kernel. Well, the Version 1.65 seems to work again (The folders where empty after mount). The SuperSU Version 1.45 worked the best. If you want to use 1.45, you can download the old Flashable-Version here: http://download.chainfire.eu/343/SuperSU/UPDATE-SuperSU-v1.45.zip.
As I said, the version 1.65 seems to work again. It maybe can happen, that the folders gets empty, after some time. This has been noticed with Version 1.60. But 1.65 not (yet).
If you still have problems with the empty folders on my kernel, you should try superuser by koush.
koush's superuser is opensource and is the same as in cyanogenmod. And with that, the mount-technique is working without bugs: https://play.google.com/store/apps/details?id=com.koushikdutta.superuser
Some gimmick: One"click"mount-Shell-Script
Because I want to get rid of stickmount, I written a little shell-script to mount all connected devices. It is very similar to stickmount, but it supports: ext, fat32, ntfs. Well, ntfs only, if you provide the path to an ntfs-3g binary. (In the variable NTFS_BINARY) I used in the script the paragon-ntfs binary. Just install the Paragon-App.
Download V2.2: http://www.mediafire.com/download/rjmsdt06cf0cp6b/oneclickmountv22.sh.gz
Download V3: http://www.mediafire.com/download/xppx2m3awcf3oq3/oneclickmount-v3-20130221172223.tar.gz
glimmling created a tasker apk for this script. I but it still bases on v11 of the script.
from v3 on, ocm needs -m parameter. If you want the old behavior, use "-m auto"
from v3 on, ocm also mounts /dev/block/sdX partitons (e.g. /dev/block/sda), but only if my script can use a busybox with blkid with TYPE output. (I provided one)
I added in v3 an fstab-like future usable with -f <file> see my example.
Please be careful with the new v3. I works, but I would call it "beta"...
You can't run ocm >= v3 inside /mnt/sdcard. All files (except for ocm.fstab and ocm-library) need the x right. Copy the files too /data/local/, "chmod 777 *" them and run ocm from /data/local.
example for ocm.fstab.
syntax:
Code:
<device> <mountpoint> <fs-type> <options>
example:
It is is very importent that the options seperated by one space!
Code:
//192.168.100.1/username username cifs username=<username>,password=password,ro
192.168.100.1:/home/username nfs nfs nolock,ro
/dev/sda1 sda1 ntfs
Thanks to:
mkasick - for the patch
farhanito - for the basic code in the .zip
glimmling - for the tasker apk's running the One"click"mount-Shell-Script
jfmcbrayer / Sgt. Meow - for the baseband_xmm_power wakelock workaround
Hi and thanks for this!
I'm a Linux noob and have some questions.
If I understand it correctly, I don't need Stickmount anymore with your kernel. Do I need to mount an usb stick in the terminal or is there a way to automate this with tasker for example?
What is the correct mount command syntax?
The old way to mount a network share with cifs manager in 4.1.2 I used this guide with external modules:
http://forum.xda-developers.com/showpost.php?p=29055478&postcount=10
Can you please show an example configuration for Cifs Manager, when I use your kernel?
Many thanks!
You still can use stickmount. You will see no difference, because stickmount uses the old "debuggerd" method. (Well, I did not test stickmount with the new fix, but it should work...)
For cifs:
I already included cifs in my kernel. You don't need to load them anymore. You can now easy use cifs manager, if you are mounting under /mounts (with the v2 of my kernel)
Here an screenshot of an configuration I use with CifsManager:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It is only important, to use a path in /mounts/. As I tested, CifsManager automatically creates the mount-point inside /mounts/.
It is possible, that applications which doesn't support browsing in file system, can't access /mounts. But some provide an option to the start directory or something like that (OfficeSuite for example) the directory just need to be set to /mounts. This is the reason, why stickmount uses an mountpoint inside /mnt/sdcard ... I am using OI Filemanager. It is a quite nice application. It also supports starting apps with the selected file.
I hope, I could help you.
AW: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Thank you.
Cifs is working for me now, but I want to get rid of stickmount.
Since android 4.2.x I always get empty folders with stickmount, even with the latest version. I want to replace it with a new method. But I don't know the mount command and the device name to mount a standard usb-stick.
mount [devicename?] /mounts/usb ???
EDIT: I replaced stickmount with usb otg helper http://forum.xda-developers.com/showthread.php?t=1588940. Now I can see the files of a mounted usb-stick in every app, no more empty folders.
Gesendet von meinem Nexus 7 mit Tapatalk 2
Ah. I forgot USB-OTG helper. Well, with this app, the mounting of devices already worked without the fix. It also uses the "debuggerd" workaround like stickmount. You will need the kernel-fix only for mounting cifs.
I stay at my new oneclickmount-shellscript, because I want to know what the applications do ^^ I don't trust stickmount and usb-otg-helper...
AW: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Can you please share your script?
Gesendet von meinem Nexus 7 mit Tapatalk 2
Look in the first post, I attached it there
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Thanks vorcers,
Here is flashable zip of v2
http://www.mediafire.com/download.php?gnn4n5p8plhdkv8
Md5= 0394f49ae911ec7a2d7cf845c5916fb6
Hope you can figure out the /storage problem
Every other kernel should implement this fix
Sent from my Nexus 7 using Tapatalk 2
This is a great! Question, since the mount point needs to be outside of /storage and /mnt/sdcard does that mean I can not use this to mount app data? ex. gameloft, etc (using Directory Bind)
It would be really awesome if a fix or hack to this issue (empty directories if app is not launched before mounting) could be found without requiring a kernel patch.
I tried the debuggerd method supposedly used by StickMount and found that it didn't work: app still sees empty mount if its process is started after mount.
Btw, app sees mounts if its process is started before because mounts are propagated in that case. They are just not inherited on process creation due to how zygote spawn app processes and initializes their mounts.
I never understood how hacking debuggerd could work to fix this issue as this is not much different to me than running a shell script invoking adb shell in loopback mode (requires root), since debuggerd and adbd run with identical priviledges:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect localhost
adb shell mount ....
I've found a workaround that involves hijaking the obb directory by mounting whatever you want over /mnt/shell/emulated/obb. This directory is systematically bind mounted by the Zygote process in <external storage root>/Android/obb (see source code) when it spawns an app's process
Unfortunately this hack is not very usable because it has the side effect that any app expecting its data in the obb directory will not find it. And you can only mount one filesystem here.
Conclusion: with the new 4.2 multiuser support, Google made miserable all apps dealing with mounting.
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
I havent tried this kernel yet, but it might appear by simply set the mount point to /data/media/0/MOUNTNAME
Might appear in storage that way.
worked for me using sshfsandroid mounting the pc harddrive over the wifi.
EDIT: I just flashed this kernel and its working the way I said. THANKS A BUNCH.:thumbup:
Sent from my Transformer TF101 using Tapatalk HD
Half-OT: Did someone tested with the new fix the superuser-function in non-primary accounts?
----------------------------------
farhanito said:
Thanks vorcers,
Here is flashable zip of v2
http://www.mediafire.com/download.php?gnn4n5p8plhdkv8
Md5= 0394f49ae911ec7a2d7cf845c5916fb6
Hope you can figure out the /storage problem
Every other kernel should implement this fix
Sent from my Nexus 7 using Tapatalk 2
Click to expand...
Click to collapse
Very nice, If you don't object, I would use your zip in the future as base and would only offer .zip's.
Doncabezon said:
This is a great! Question, since the mount point needs to be outside of /storage and /mnt/sdcard does that mean I can not use this to mount app data? ex. gameloft, etc (using Directory Bind)
Click to expand...
Click to collapse
As mkasick said in his patch, also fixing the /storage/ folder, can cause other problems:
mkasick in his patch said:
Unfortunately bind mounts from outside /storage may retain the recursive-shared property (bug?). This means any additional namespace-specific bind mounts (e.g., /storage/emulated/0/Android/obb) will also appear, shared in all namespaces, at their respective source paths (e.g., /mnt/shell/emulated/0/Android/obb), possibly leading to hundreds of /proc/mounts-visible bind mounts. As a workaround, mark /mnt/shell/emulated also as recursive-slave so that subsequent bind mounts are confined to their namespaces.
Click to expand...
Click to collapse
To "fix" the /storage problem, only 6 lines of the patch need to be removed. But it also can break the multiuser-feature. I will test it in the next days.
bubbleguuum said:
It would be really awesome if a fix or hack to this issue (empty directories if app is not launched before mounting) could be found without requiring a kernel patch.
Click to expand...
Click to collapse
As an alternative (which is not really an alternative...) is to use the dalavik patch. But I think the Kernel-Patch is easy for stock.
Anyway, I think there will never be a 100% solution without patching. Only Google can solve this problem, by changing their multiuser architecture... (Or they mark by stock the root folder as non-slave, but that wouldn't fix the /storage problem...)
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
What if I don't need multiuser support. Don't care much if it becomes broke, since my son has a kindle and my wife dare not touch my tablet save for playing Temple Run Brave
Sent from my Nexus 7 using xda premium
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
vorcers said:
----------------------------------
Very nice, If you don't object, I would use your zip in the future as base and would only offer .zip's.
Click to expand...
Click to collapse
Of course, no problem
Sent from my Nexus 7 using Tapatalk 2
Thank you so much for that kernel! That is exactly what I have been looking for!
I added .zip's and released a new oneclickmount.sh version. :highfive:
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
YayYouFixedIt said:
I havent tried this kernel yet, but it might appear by simply set the mount point to /data/media/0/MOUNTNAME
Might appear in storage that way.
worked for me using sshfsandroid mounting the pc harddrive over the wifi.
EDIT: I just flashed this kernel and its working the way I said. THANKS A BUNCH.:thumbup:
Sent from my Transformer TF101 using Tapatalk HD
Click to expand...
Click to collapse
So using this method, directory bind works?
Sent from my Nexus 7 using xda premium
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Actually it did seem too. No idea why. Both on the n7 and tf101 for sshfsandroid only.
But eventully I just made it mount to /Removable/pcharddrivefoldermountpointnamelong examplee and that was OK for me too. Ssomone mentioned it can be mounted anywhere outside storageed
EDIT: only using this kernel and I am using dirty aokp2.8 ATM.
I just checked again and the bind works as /data/media/0/PC which wouldnbe good if you want to download directly from dolphin into the PC.
vorcers said:
I added .zip's and released a new oneclickmount.sh version. :highfive:
Click to expand...
Click to collapse
Just wanted to give a HUGE THANKS for compiling your kernel and making it available, to farhanito for the flashable zip, and of course to mkasick for the concept
CIFS Manager works like a charm, and DeaDBeeF Player can see my shares, so me=HAPPY!
Nice to be on 4.2.1 now.
Y'all rule :highfive:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'll just add that Mount Manager also works like a charm, automounting under /mounts whatever shares you define.
I created a new oneclickmount version, with some bug-fixes.
http://forum.xda-developers.com/attachment.php?attachmentid=1690089&d=1359582536
They appeared if you use more then one device at the nexus parallel. It simply only mounted one device.
I also set the standard-mountpoint to /data/media/0/mounts. With that, we can use our files also in /mnt/sdcard. :highfive: (Android re-directs it...)
This also works for bind's. I could bind /mounts/ to /data/media/0/mounts . It also works... Maybe someone helps that for using some games.

[DEV][TEMPLATE] AnyKernel3 - Easily Mod ROM Ramdisk + Pack Image.gz [Flashable Zip]

AnyKernel3 -- Flashable Zip Template for Kernel Releases with Ramdisk Modifications
"AnyKernel is a template for an update.zip that can apply any kernel to any ROM, regardless of ramdisk." - Koush
The concept of AnyKernel has been around for awhile, (originally by Koushik Dutta/ClockworkMod,) which allowed a device-specific kernel zImage to be flashed over device-specific ROM and use the ramdisk that came with the ROM to reduce the chance of any issues arising from the custom kernel pairing.
The drawback to this was that some kernels require modifications to the ramdisk to enable/set up kernel features, and in the old AnyKernel format there was no way to do this. Enter AnyKernel2.
AnyKernel2 pushed the format even further by allowing kernel developers to modify the underlying ramdisk for kernel feature support easily using a number of included command methods along with properties and variables to customize the installation experience to their kernel. AnyKernel3 adds the power of topjohnwu's magiskboot for wider format support by default.
A script based on Galaxy Nexus (tuna) is included for reference. An example of ramdisk-only changes can be seen in my GN Synapse Injector repo. For an example that also modifies ROM and properly injects init.d support using busybox run-parts and sepolicy-inject see CosmicDan's CosmicTweaks project. For a multi-partition example and an example of how to handle a device which only has a ramdisk when rooted see my N5X/6P BLOD Workaround Injector. Other working AK2/3 examples for more recent devices may be found on eng.stk's blu_spark device repos under Releases.
Please see the linked posts here for instructions on enabling full AVBv1 (Pixel), AVBv1, A/B slot and/or system-as-root (SAR) or 2-stage init (2SI) device support, and further guidelines for system-as-root/2-stage init (/system/system in recovery) modifications in general.
Please also see the post here for important notes about the current state of AOSP vendor_boot v4 support and AVBv2 flag options.
Magisk root is automatically detected and retained by patching the new Image.*-dtb as Magisk would!
My development work on my many projects comes out of my free time, so if you enjoy this project or anything else I've done on xda, please consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thank you for your support!
Source: https://github.com/osm0sis/AnyKernel3/
Download: https://github.com/osm0sis/AnyKernel3/archive/master.zip
Instructions
1) Place final kernel build product, e.g. Image.gz-dtb or zImage to name a couple, in the zip root (any separate dt, dtb, recovery_dtbo, dtbo and/or vendor_dlkm should also go here for devices that require custom ones, each will fallback to the original if not included)
2) Place any required ramdisk files in /ramdisk (/vendor_ramdisk for simple multi-partition vendor_boot v3 support) and module files in /modules (with the full path like /modules/system/lib/modules)
3) Place any required patch files (generally partial files which go with AK3 file editing commands) in /patch (/vendor_patch for simple multi-partition vendor_boot v3 support)
4) Modify the anykernel.sh to add your kernel's name, boot partition location, permissions for any added ramdisk files, and use methods for any required ramdisk modifications (optionally, also place banner and/or version files in the root to have these displayed during flash)
5) `zip -r9 UPDATE-AnyKernel3.zip * -x .git -x .github README.md *placeholder`
The LICENSE file must remain in the final zip to comply with licenses for binary redistribution and the license of the AK3 scripts.
If supporting a recovery that forces zip signature verification (like Cyanogen Recovery) then you will need to also sign your zip using the method I describe here:
[DEV][TEMPLATE] Complete Shell Script Flashable Zip Replacement + Signing [SCRIPT]
Not required, but any tweaks you can't hardcode into the source (best practice) should be added with an additional init.tweaks.rc or bootscript.sh to minimize the necessary ramdisk changes. On newer devices Magisk allows these within /overlay.d - see examples.
It is also extremely important to note that for the broadest AK3 compatibility it is always better to modify a ramdisk file rather than replace it.
If running into trouble when flashing an AK3 zip, the suffix -debugging may be added to the zip's filename to enable creation of a debug .tgz of /tmp for later examination while booted or on desktop.
Staying Up-To-Date
Now that you've got a ready zip for your device, you might be wondering how to keep it up-to-date with the latest AnyKernel commits. AnyKernel2 and AnyKernel3 have been painstakingly developed to allow you to just drop in the latest update-binary and tools directory and have everything "just work" for beginners not overly git or script savvy, but the best practice way is as follows:
1) Fork my AnyKernel3 repo on GitHub
2) `git clone https://github.com/<yourname>/AnyKernel3`
3) `git remote add upstream https://github.com/osm0sis/AnyKernel3`
4) `git checkout -b <devicename>`
5) Set it up like your <devicename> zip (i.e. remove any folders you don't use like ramdisk or patch, delete README.md, and add your anykernel.sh and optionally your Image.*-dtb if you want it up there) then commit all those changes
6) `git push --set-upstream origin <devicename>`
7) `git checkout master` then repeat steps 4-6 for any other devices you support
Then you should be able to `git pull upstream master` from your master branch and either merge or cherry-pick the new AK3 commits into your device branches as needed.
Enjoy!
Questions, comments and feedback welcome.
Credits & Thanks: All authors of the included binaries and the tools I used to port them over for their amazing work. koush for the original AnyKernel concept.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
Script Commands Reference
Everything to edit is self-contained in anykernel.sh. A quick-reference for the commands and properties included are as follows.
Properties / Variables
These are some values that will be read during the install process, allowing you to customize your installation, e.g. block= is a shell variable to specify the kernel/boot block partition that the dump_boot command method will copy and unpack.
Code:
kernel.string=KernelName by YourName @ xda-developers
do.devicecheck=1
do.modules=1
do.systemless=1
do.cleanup=1
do.cleanuponabort=0
device.name1=maguro
device.name2=toro
device.name3=toroplus
device.name4=tuna
supported.versions=6.0 - 7.1.2
supported.patchlevels=2019-07 -
block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
patch_vbmeta_flag=auto;
do.devicecheck=1 specified requires at least device.name1 to be present. This should match ro.product.device, ro.build.product, ro.product.vendor.device or ro.vendor.product.device from the build.prop files for your device. There is support for as many device.name# properties as needed. You may remove any empty ones that aren't being used.
do.modules=1 will push the .ko contents of the modules directory to the same location relative to root (/) and apply correct permissions. On A/B devices this can only be done to the active slot.
do.systemless=1 (with do.modules=1) will instead push the full contents of the modules directory to create a simple "ak3-helper" Magisk module, allowing developers to effectively replace system files, including .ko files. If the current kernel is changed then the kernel helper module automatically removes itself to prevent conflicts.
do.cleanup=0 will keep the zip from removing its working directory in /tmp/anykernel (by default) - this can be useful if trying to debug in adb shell whether the patches worked correctly.
do.cleanuponabort=0 will keep the zip from removing its working directory in /tmp/anykernel (by default) in case of installation abort.
supported.versions= will match against ro.build.version.release from the current ROM's build.prop. It can be set to a list or range. As a list of one or more entries, e.g. 7.1.2 or 8.1.0, 9 it will look for exact matches, as a range, e.g. 7.1.2 - 9 it will check to make sure the current version falls within those limits. Whitespace optional, and supplied version values should be in the same number format they are in the build.prop value for that Android version.
supported.patchlevels= will match against ro.build.version.security_patch from the current ROM's build.prop. It can be set as a closed or open-ended range of dates in the format YYYY-MM, whitespace optional, e.g. 2019-04 - 2019-06, 2019-04 - or - 2019-06 where the last two examples show setting a minimum and maximum, respectively.
block=auto instead of a direct block filepath enables detection of the device boot partition for use with broad, device non-specific zips. Also accepts any partition filename (from by-name), e.g. boot, recovery, or vendor_boot.
is_slot_device=1 enables detection of the suffix for the active boot partition on slot-based devices and will add this to the end of the supplied block= path. Also accepts auto for use with broad, device non-specific zips.
ramdisk_compression=auto allows automatically repacking the ramdisk with the format detected during unpack. Changing auto to gz, lzo, lzma, xz, bz2, lz4, or lz4-l (for lz4 legacy) instead forces the repack as that format, and using cpio or none will (attempt to) force the repack as uncompressed.
patch_vbmeta_flag=auto allows automatically using the default AVBv2 vbmeta flag on repack, and use the Magisk configuration (Canary 23016+). Set to 0 forces keeping whatever is in the original AVBv2 flags, and set to 1 forces patching the flag (only necessary on few devices).
customdd="<arguments>" may be added to allow specifying additional dd parameters for devices that need to hack their kernel directly into a large partition like mmcblk0, or force use of dd for flashing.
slot_select=active|inactive may be added to allow specifying the target slot. If omitted the default remains active.
no_block_display=1 may be added to disable output of the detected final used partition+slot path for zips which choose to include their own custom output instead.
Command Methods
Code:
ui_print "<text>" [...]
abort ["<text>" [...]]
contains <string> <substring>
file_getprop <file> <property>
set_perm <owner> <group> <mode> <file> [<file2> ...]
set_perm_recursive <owner> <group> <dir_mode> <file_mode> <dir> [<dir2> ...]
dump_boot
split_boot
unpack_ramdisk
backup_file <file>
restore_file <file>
replace_string <file> <if search string> <original string> <replacement string> <scope>
replace_section <file> <begin search string> <end search string> <replacement string>
remove_section <file> <begin search string> <end search string>
insert_line <file> <if search string> before|after <line match string> <inserted line>
replace_line <file> <line replace string> <replacement line> <scope>
remove_line <file> <line match string> <scope>
prepend_file <file> <if search string> <patch file>
insert_file <file> <if search string> before|after <line match string> <patch file>
append_file <file> <if search string> <patch file>
replace_file <file> <permissions> <patch file>
patch_fstab <fstab file> <mount match name> <fs match type> block|mount|fstype|options|flags <original string> <replacement string>
patch_cmdline <cmdline entry name> <replacement string>
patch_prop <prop file> <prop name> <new prop value>
patch_ueventd <ueventd file> <device node> <permissions> <chown> <chgrp>
repack_ramdisk
flash_boot
flash_generic <partition name>
write_boot
reset_ak [keep]
setup_ak
"if search string" is the string it looks for to decide whether it needs to add the tweak or not, so generally something to indicate the tweak already exists. "cmdline entry name" behaves somewhat like this as a match check for the name of the cmdline entry to be changed/added by the patch_cmdline function, followed by the full entry to replace it. "prop name" also serves as a match check in patch_prop for a property in the given prop file, but is only the prop name as the prop value is specified separately.
Similarly, "line match string" and "line replace string" are the search strings that locate where the modification needs to be made for those commands, "begin search string" and "end search string" are both required to select the first and last lines of the script block to be replaced for replace_section, and "mount match name" and "fs match type" are both required to narrow the patch_fstab command down to the correct entry.
"scope" may be specified as "global" to force all instances of the string/line targeted by replace_string, replace_line or remove_line to be replaced/removed accordingly. Omitted or set to anything else and it will perform the default first-match action.
"before|after" requires you simply specify "before" or "after" for the placement of the inserted line, in relation to "line match string".
"block|mount|fstype|options|flags" requires you specify which part (listed in order) of the fstab entry you want to check and alter.
dump_boot and write_boot are the default method of unpacking/repacking, but for more granular control, or omitting ramdisk changes entirely ("OG AK" mode), these can be separated into split_boot; unpack_ramdisk and repack_ramdisk; flash_boot respectively. flash_generic can be used to flash an image to the corresponding partition. It is automatically included for dtbo and vendor_dlkm in write_boot but can be called separately if using "OG AK" mode or creating a simple partition flashing only zip.
Multi-partition zips can be created by removing the ramdisk and patch folders from the zip and including instead "-files" folders named for the partition (without slot suffix), e.g. boot-files + recovery-files, or kernel-files + ramdisk-files (on some Treble devices). These then contain Image.gz, and ramdisk, patch, etc. subfolders for each partition. To setup for the next partition, simply set block= (without slot suffix) and ramdisk_compression= for the new target partition and use the reset_ak command.
Similarly, multi-slot zips can be created with the normal zip layout for the active (current) slot, then resetting for the inactive slot by setting block= to the partition (without slot suffix) again, slot_select=inactive and ramdisk_compression= to the desired options for the target slot and using the reset_ak keep command, which will retain the patch and any added ramdisk files for the next slot.
backup_file may be used for testing to ensure ramdisk changes are made correctly, transparency for the end-user, or in a ramdisk-only "mod" zip. In the latter case restore_file could also be used to create a "restore" zip to undo the changes, but should be used with caution since the underlying patched files could be changed with ROM/kernel updates.
You may also use ui_print "<text>" to write messages back to the recovery during the modification process, abort "<text>" to abort with optional message, and file_getprop "<file>" "<property>" and contains "<string>" "<substring>" to simplify string testing logic you might want in your script.
Binary Inclusion
The AK3 repo includes current ARM builds of magiskboot, magiskpolicy, lptools_static and busybox by default to keep the basic package small. Builds for other architectures and optional binaries (see below) are available from the latest Magisk zip, or my latest AIK-mobile and Flashlt packages, respectively, here:
https://forum.xda-developers.com/t/...kernel-ramdisk-win-android-linux-mac.2073775/ (Android Image Kitchen thread)
https://forum.xda-developers.com/t/...-and-ends-multiple-devices-platforms.2239421/ (Odds and Ends thread)
Optional supported binaries which may be placed in /tools to enable built-in expanded functionality are as follows:
mkbootfs - for broken recoveries, or, booted flash support for a script/app via bind mount to /tmp (deprecated/use with caution)
flash_erase, nanddump, nandwrite - MTD block device support for devices where the dd command is not sufficient
dumpimage, mkimage - DENX U-Boot uImage format support
mboot - Intel OSIP Android image format support
unpackelf, mkbootimg - Sony ELF kernel.elf format support, repacking as AOSP standard boot.img for unlocked bootloaders
elftool (with unpackelf) - Sony ELF kernel.elf format support, repacking as ELF for older Sony devices
mkmtkhdr (with unpackelf) - MTK device boot image section headers support for Sony devices
futility + chromeos test keys directory - Google ChromeOS signature support
boot_signer-dexed.jar + avb keys directory - Google Android Verified Boot 1.0 (AVBv1) signature support
rkcrc - Rockchip KRNL ramdisk image support
Optionally moving ARM builds to tools/arm and putting x86 builds in tools/x86 will enable architecture detection for use with broad, device non-specific zips.
Boom . dibs on first :good:
You get 2 thank button presses fro me lol
Awesome work man as always
Good thing that this amazing work has it's own thread. Congrats buddy.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
Thanks guys!
I figured it would be nice to get it out there and also have it as a "Help Desk" thread for kernel devs who have questions about implementation, etc. too. Some devices might require switching it from dd to MTD-Utils, so I can help with that. So on and so forth.
Once we get a few devs who know how to use it, it should be pretty easy to help others. I'm looking at you Smitty. No pressure.
I finished my thanks ... but as always a great job.
ak said:
I finished my thanks ... but as always a great job.
Click to expand...
Click to collapse
So wait im confused. ?.. so 1) those that mean I can flash ak kerenl 4.2 with ur any kernel to my 4.4 .
2) those it have to be same kerenl for same phone manufacturer. Meaning can I be stupid enought to flash a nexus 4 kernel in my gnexus?
I understand any kernel cause I have been using smitty so thanks
milojoseph said:
So wait im confused. ?.. so 1) those that mean I can flash ak kerenl 4.2 with ur any kernel to my 4.4 .
2) those it have to be same kerenl for same phone manufacturer. Meaning can I be stupid enought to flash a nexus 4 kernel in my gnexus?
I understand any kernel cause I have been using smitty so thanks
Click to expand...
Click to collapse
Haha I wrote "device-specific" in the OP to try and avoid this very confusion.
Since I answered this same question earlier tonight in my Odds and Ends thread I'll just paste it here:
caspboy said:
so now devs can use kernels from other devices with their roms?
Click to expand...
Click to collapse
osm0sis said:
No. That's crazy talk. :laugh:
The concept of AnyKernel has been around for awhile, (originally by Koushik Dutta/ClockworkMod,) which allows device-specific kernels to be flashed over device-specific ROMs and use the ramdisk that came with the ROM to reduce the chance of any issues arising from the custom kernel pairing.
The drawback to this is that some kernels require modifications to the ramdisk to enable/set up kernel features, but in the old AnyKernel format there was no way to do this. Until now.
AnyKernel 2.0 makes it easy for kernel devs to use a number of simple command methods to automate the process of adding tweaks into a ROM's underlying ramdisk during the flashing process. :good:
Click to expand...
Click to collapse
Hopefully that helps. Basically exactly what's in the OP since that's where I edited it in from.
The only way I can explain it any further is with the very basics: that kernel boot.img files contain a zImage and a ramdisk. "AnyKernel Classic" just slaps the custom kernel zImage on top of the ROM's untouched default kernel boot.img ramdisk. AnyKernel 2.0 allows kernel devs to also modify the ramdisk to add anything required for kernel features in addition to the usual repacking it with the custom zImage and flashing it.
Great thread!! Best of lucky bro!!!
Sent from my Galaxy Nexus using xda app-developers app
AnyKernel will work on my phone now ? Thanks for enhancing awesome @osm0sis but DrRamdisk to the rest of you guys ?
wow,thats very cool,great work.
Github updated with my own forked native compiles of mkbootimg+unpackbootimg.
This should expand AnyKernel 2.0 device support a lot by using all the available offsets in mkbootimg, as exported by my drastically updated unpackbootimg. :good:
osm0sis said:
Github updated with my own forked native compiles of mkbootimg+unpackbootimg.
This should expand AnyKernel 2.0 device support a lot by using all the available offsets in mkbootimg, as exported by my drastically updated unpackbootimg. :good:
Click to expand...
Click to collapse
Hi osm0sis,
Have You update anykernel 2.0 to work with cyanogen11 roms ? Thanks for Your hard work !
Should already?
It uses the ROM kernel ramdisk like AnyKernel always has. Your custom kernel dev just needs to use it. Spread the word. :good:
osm0sis said:
Should already?
It uses the ROM kernel ramdisk like AnyKernel always has. Your custom kernel dev just needs to use it. Spread the word. :good:
Click to expand...
Click to collapse
Recently I had used Your method on Cyano11 but boot stopped on "Google".. new Cyano11 (that required ramdisk changes) had just come out and maybe anykernel 2.0 was not ready yet (I had just discovered your brillant work on It ! : Dita incrociate.
I'll try again ... if I have trouble going to ask you for help ...
I am already spreading the word : Cool:
Thanks man : Good:
What custom kernel were you trying to adapt to AnyKernel so you could flash it on CM?
osm0sis said:
What custom kernel were you trying to adapt to AnyKernel so you could flash it on CM?
Click to expand...
Click to collapse
Two kernels... My custom kernel (from cyanogenmod sources) and recently Fancy kernel (dirty-fancy)... now I want to try Fancy Kernel .. I need of a hibryd ramdisk for best final results and Your project is perfect for It !!! You're a genius !!!
Please, Can You link me Your dirty-V kernel re-pack by Anykernel 2.0 ? So I can follow It as an example. Thanks a lot...
So if I understand you, you're trying to make an AnyKernel 2.0 of Fancy Kernel so that you can flash it on any ROM for your device?
Should be doable. The DirtyV AnyKernel 2.0 is the example posted to the GitHub repo in the OP. Just follow the instructions to make your own anykernel script so that it will add the /sbin/ scripts and other ramdisk modifications (init.d, etc.) that @boype uses, instead of the DirtyV ones.
Good luck!
osm0sis said:
So if I understand you, you're trying to make an AnyKernel 2.0 of Fancy Kernel so that you can flash it on any ROM for your device?
Should be doable. The DirtyV AnyKernel 2.0 is the example posted to the GitHub repo in the OP. Just follow the instructions to make your own anykernel script so that it will add the /sbin/ scripts and other ramdisk modifications (init.d, etc.) that @boype uses, instead of the DirtyV ones.
Good luck!
Click to expand...
Click to collapse
Yes !
osm0sis ? If I want include init.rc original file by "real" ramdisk can I copy It as is into patch folder ?
It would go against the idea of AnyKernel to include the file like that. Remember, everything automatically comes from the original ramdisk, I just give you the ability to alter those files to add tweaks. :good:

[DEV][TOOL][Linux]Android System Extraction and Repack Tool

Introduction
You probably know already that starting from Android 5.x (Lollipop) compiled roms (aosp,cm,stock) are not compressed anymore the way they used to be on previous android versions. On previous versions all content inside /system folder that has to be extracted within our device was either uncompressed (simple /system folder inside our flashable zip) or compressed in a system.img file, which it is a ext4 compressed file; both of these, anyway, were readable and we could see all system files (app,framework, etc).
The problem comes in >=5.0 versions, this method is not used anymore. Why? Because roms started to be always larger, so it is necessary to compress them even more.
Note : Introduction was taken from here : https://forum.xda-developers.com/an.../how-to-conver-lollipop-dat-files-to-t2978952 by @xpirt so thanks to him
So in order to save myself and others who most port Custom & Stock Roms, i decided to use some part of my time to write this script for easy work done.
What this script does :
It basically Unpack and Repack system.new.dat alongside with file_context.bin convertion which is seen in android 7.0/7.1
ITS USAGE:
NOTE
First Clone the repo.
Make sure that Android_System_Extraction_and_Repack_Tool is located at Desktop
Run "Xtrakt" from it's location in terminal
Copy "file_contexts.bin" from your Rom to "file_context_zone" folder
Use "f" from menu to convert "file_contexts.bin" to text readable "file_contexts"
Copy : system.new.dat, system.transfer.list & file_contexts to "convert-dat" folder.
Use "i" from menu to unpack, which the output will be name as "rom_system" for modifications of apks & files.
Use "y" from menu to repack, which the complete new "system.new.dat", "system.patch.dat" & "system.transfer.list" will be located at "Finish-new.dat" folder
Done !
EXAMPLE:
Again , Make sure that Android_System_Extraction_and_Repack_Tool is located at Desktop
In your terminal, type the following to start the script:
Code:
git clone https://github.com/iykequame/Android_System_Extraction_and_Repack_Tool.git
mv android_system_extraction_and_repack_tool ~/Desktop/
cd ~/Desktop/android_system_extraction_and_repack_tool/
./Xtrakt
OR
Code:
Double-click the Xtrakt file and choose "Run in Terminal" if your OS supports it.
##ALERT!!!##
sudo is requested in the script.
How To Get It {Tool]
Clone from one of the below ;
From GITHUB :
Code:
git clone https://github.com/iykequame/Android_System_Extractrion_and_Repack_Tool.git
From BITBUCKET :
Code:
git clone https://[email protected]/zac6ix/android_system_extraction_and_repack_tool.git
Or
Download zip
AFH
GIT-RELEASE
Sources :
Android_System_Extraction_and_Repack_Tool
GITHUB
BITBUCKET
Threads :
sdat2img 1.0 - img2sdat 1.2
For file_context.bin conversion by: Pom Kritsada @ MTK THAI Developers.
Credit to :
@xpirt
@SuperR.
-all xda threads which helped
-Android Matrix Development - here
-Nana Yaa for her time.
hi, your tool sounds good but it seems it doesnt work.
i press f and nothing happen ..
Use "f" from menu to convert **"file_contexts.bin"** to text readable **"file_contexts"**
Blackball said:
hi, your tool sounds good but it seems it doesnt work.
i press f and nothing happen ..
Use "f" from menu to convert **"file_contexts.bin"** to text readable **"file_contexts"**
Click to expand...
Click to collapse
Sorry for the Late reply !
Directories linking has been fix .
You can go ahead and try again
Thanks for sharing!
Don't work
When i press i ..Don't work.say file missing.but i already put all file..Please help meView attachment 4249470
Doesn't do anything with file_context.bin, doesn't even check if file is there.
oreo supported???
I am getting this error on repacking:-
Code:
WARNING! WARNING!! WARNING!!!
Please Check & Trace Where Errors.
There Is NO rom_system found
file_contexts -->> Missing !
Android SDK -->> not detected !
Please help.
Black_J said:
I am getting this error on repacking:-
Code:
WARNING! WARNING!! WARNING!!!
Please Check & Trace Where Errors.
There Is NO rom_system found
file_contexts -->> Missing !
Android SDK -->> not detected !
Please help.
Click to expand...
Click to collapse
I see that this thread is not supported.
Anyways, I observed that the tool works for file_contexts.bin but not for other options.
So , I followed the other link in the thread for individual commands and was successful.
Works perfectly on Android Pie! Have to do some tweaks, PM me if anyone wants to make this work for Android Pie.

[Patch] Persistent automatic disabling SELinux in any kernel

Warning: SELinux – important security feature.
After disabling it you obliviously make Android less secure. Use it on your own risk.
Why it needed?
SELinux can prevent work some mods, like Viper. Or you can have own reasons.
Executing in Terminal "setenforce 0" or via scripts / apps turns SELinux off only after booting: this is not good.
This solution disables SELinux directly in kernel.
Compatible with any MIUI or custom ROM.
How it works
After flashing ZIP creates kernel dump, then it repacks with new command line androidboot.selinux=permissive and writes back.
Into /system/bin copied script.sh and two binaries: mkbootimg and unpackbootimg plus auto-restore script (addon.d)
Last required for keeping and launching that files at every ROM update. This works only on custom ROM's, on MIUI you need re-apply patch manually.
Note: on previous phone at some rare unknown conditions after updating ROM kernel repackaging ended with error and device can't boot.
In this case enter recovery and restore boot from backup or flash boot.img from ROM via fastboot / TWRP.
How to install
1. Once flash attached ZIP
2. Then flash required mods
How to delete
1. Delete file /system/addon.d/99-selinux.sh (and other, that belong to mods that not work with SELinux)
2. Flash current ROM
P.S. This patch probably will work on any device (at least with custom ROM because stock kernel can use different structure).
Rare, but may be required change path to boot partition in script.sh: /dev/block/bootdevice/by-name/boot, twice.
Hi does this method still work in Android 10 and newer?
Great job. This is exactly what I was searching for!
lebigmac said:
does this method still work in Android 10 and newer?
Click to expand...
Click to collapse
Very likely, don't know for sure because still on Pie. Try yourself and share result
When I run this command:
Code:
cat /proc/cmdline
I get this result:
Code:
BOOT_IMAGE=/boot/vmlinuz-5.0.0-13-generic root=UUID=XXXXX-XXXX-XXXX-XXXX-XXXXXXXXX ro quiet splash vt.handoff=1
Maybe in Android 10 and newer they moved the androidboot.selinux=permissive parameter to somewhere else kind of like how they moved the system partition into the super image?
lebigmac said:
Maybe in Android 10 and newer they moved parameter to somewhere else
Click to expand...
Click to collapse
Parameter not present by default.
It's not clear if you tried to flash ZIP. If yes and got no result: probably script can't handle changes in boot.img structure because it was created 4 years ago. Try some tool on PC to unpack boot and add line manually.

Categories

Resources