userdebug / eng build needed - Moto G Stylus (Moto G Pro) Questions & Answers

Hi folks,
I have seen some great quality ROMs here, big thanks for your work/support for those.
For a project, I need to alter the config settings of the wifi baseband in my Moto G pro, which I can access at /vendor/etc/wifi/WCNSS...ini.
My problem is that even with a rooted phone (su on adb shell working fine) and custom ROMs, the /vendor partition is remaining Read-Only and I cannot change this config file. I have had access to debug builds before that have allowed me to change this file by pushing/pulling using adb, but with rooted stock or rooted custom ROMs I am not able to use adb root (Production Build) or adb push (read-only file system) or adb disable-verity (User build).
Trying to use shell to remount as r/w:
# mount -o rw,remount /vendor
'/dev/block/dm-4' is read-only
I think my solution here is to try running a custom ROM that is built as 'userdebug' or 'eng'. Could you point me to any ROMs available that run in these modes? or is anyone in a position to build these quickly?
Thanks in advance for your pointers
Liam
Moto G Pro XT2043-7

liam_L said:
Hi folks,
I have seen some great quality ROMs here, big thanks for your work/support for those.
For a project, I need to alter the config settings of the wifi baseband in my Moto G pro, which I can access at /vendor/etc/wifi/WCNSS...ini.
My problem is that even with a rooted phone (su on adb shell working fine) and custom ROMs, the /vendor partition is remaining Read-Only and I cannot change this config file. I have had access to debug builds before that have allowed me to change this file by pushing/pulling using adb, but with rooted stock or rooted custom ROMs I am not able to use adb root (Production Build) or adb push (read-only file system) or adb disable-verity (User build).
Trying to use shell to remount as r/w:
# mount -o rw,remount /vendor
'/dev/block/dm-4' is read-only
I think my solution here is to try running a custom ROM that is built as 'userdebug' or 'eng'. Could you point me to any ROMs available that run in these modes? or is anyone in a position to build these quickly?
Thanks in advance for your pointers
Liam
Moto G Pro XT2043-7
Click to expand...
Click to collapse
This may help
[Closed] Universal SystemRW / SuperRW feat. MakeRW / ro2rw (read-only-2-read/write super partition converter)
Welcome to the one and only, the original, universal, System-RW / Super-RW feat. Make-RW / ro2rw (read-only-2-read/write super partition converter) by lebigmac Also known as: THE-REAL-RW, FULL-RW, EXT4-RW, EROFS-RW, EROFS-2-RW, F2FS-RW...
forum.xda-developers.com

Thank you @sd_shadow for your helpful response.
I have spent some time playing around with various options (and some time pretending my problem doesn't exist ).
Both the SystemRW script, and the superrepack tool linked in thatpost were unsuccessful for the Moto G Pro.
SystemRW script:
- v1.31 was kind of promising - While running the script, it printed that /vendor was "already R/W". After running, sure enough the partition kind of thought it was R/W, but was throwing other errors that showed it clearly actually wasn't. In the end the script threw error 73 and failed to create super_fixed.img file.
- v1.32 at least knew that /vendor was RO, but also failed to create super_fixed.img file (73).
I have log files handy if @lebigmac is interested.
- The v1.32 repair tool was useful in extracting information, and it managed to find a super_fixed.img file. So I tried to flash manually, but the phone was stuck during boot, so I'm guessing it wasn't created properly.
MY SOLUTION:
In the end, what solved my issue was to create a new Magisk module that would replace the config file I needed on every boot- seeing as I was using Magisk to get the root access anyway, this will be a good solution for my case.
For anyone interested, go and have a look at Magisk documentation:
Magisk Github Dev Guides
To simplify: you place the module files in /data/adb/modules/Your_Module,
and anything inside Your_Module/system/... will replace that in various partitions. So for my case I wanted to replace /vendor/etc/wifi/... , I created My_Module/system/vendor/etc/wifi/config_file_name.ini

sd_shadow said:
This may help
https://forum.xda-developers.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/
Click to expand...
Click to collapse
Hi @sd_shadow thanks for your helpful response.
Have you tried my script on your device yet and did it work? Is it a Xiaomi device?
liam_L said:
Thank you @sd_shadow for your helpful response.
I have spent some time playing around with various options (and some time pretending my problem doesn't exist ).
Both the SystemRW script, and the superrepack tool linked in thatpost were unsuccessful for the Moto G Pro.
SystemRW script:
- v1.31 was kind of promising - While running the script, it printed that /vendor was "already R/W". After running, sure enough the partition kind of thought it was R/W, but was throwing other errors that showed it clearly actually wasn't. In the end the script threw error 73 and failed to create super_fixed.img file.
- v1.32 at least knew that /vendor was RO, but also failed to create super_fixed.img file (73).
I have log files handy if @lebigmac is interested.
- The v1.32 repair tool was useful in extracting information, and it managed to find a super_fixed.img file. So I tried to flash manually, but the phone was stuck during boot, so I'm guessing it wasn't created properly.
MY SOLUTION:
In the end, what solved my issue was to create a new Magisk module that would replace the config file I needed on every boot- seeing as I was using Magisk to get the root access anyway, this will be a good solution for my case.
For anyone interested, go and have a look at Magisk documentation:
Magisk Github Dev Guides
To simplify: you place the module files in /data/adb/modules/Your_Module,
and anything inside Your_Module/system/... will replace that in various partitions. So for my case I wanted to replace /vendor/etc/wifi/... , I created My_Module/system/vendor/etc/wifi/config_file_name.ini
Click to expand...
Click to collapse
Hi @liam_L
Please feel free to PM me your log files from this folder on your phone and I will look into your issue with my script
/data/local/tmp/systemrw_1.32/log/
Error 73 is probably some kind of selinux kernel panic mode that is triggered if too many I/O operations happen in a short time period. The included sysrw_repair script (Linux only) should be able to fix that.
If you want to do adb root you need to patch your adbd daemon to run as root user. More info here

Related

[Completed] irulu 10.1 root/remount problems solved

I own an irulu K1001L1 10.1 (build number A20_K1001_K1001L1.20130713), a cheap one.
Many people complain about "partial rooting" and being unable to remount system in rw mode. Clueless as I was, I had tried several times with Uberizer, z4root and SRSroot, to no avail (the problem is not in the root, in my tablet su came by default in xbin directory).
D_rex (http://forum.xda-developers.com/showthread.php?t=2606510&page=2) found an effective solution which also helped in my situation: I think my tablet came with "su" application by default (notice overclocking worked) but due to /dev/block/nandd ext4 partition (I think /system starts at some offset) containing some errors (seen in dmesg) and due to this partition having the "s_errors" flag (behavior when errors detected) set to "mount read-only (02)", the partition is ALWAYS mounted read only, and remount as root doesn't change anything. More info on this ext4 option can be found here
For me, the solution that worked was changing that flag s_errors to continue (01). I wasn't able to run e2fsck as the partition is already mounted; and I wasn't able to do a fsck in recovery mode since the recovery mode of this tablet lacks seems to lack both shell and e2fsck.
Tune2fs (old version precompiled here) can change that flag in the partition. Using adb shell I pushed it to de device, set attribute as executable and run it, successfuly changing that "behavior when errors detected" in both partitions.
It has been suggested filesystem errors are linked to stability and realiability problems. Unfortunately this tablet lacks a version of CWM o TWRP as a recovery custom rom. I also adjusted the "max-mount-counts" value via tune2fs -c hoping it forces Android to run e2fsck, but it seems dmesg keeps displaying errors. I can only hope this problem is given more attention by developers.
After this I used the usual tools to root the device, noticing I had spent many hours in this cheap tablet.
On a side note, the adb driver setup tool found here didnt work for me (it seems &USER_PROFILE% in the .bat file should be replaced by "%USER_PROFILE%" and Desktop should be replaced according to the language of your operating system. Nevertheless the tool didn't work for me and I had to install another driver found in Uberizer distribution as the official "android_winusb.inf" didn't work in my Windows XP computer.
Thanks to the creators of tune2fs, to D_rex and other people/programs mentioned here. This is my experience with this problem; I'm not responsible if anyone tries this and bricks his device. All brands are property of their owners.
edition: should also mention by default now my tablet mounts in read-only mode (which is of course safer) but lets me change to rw whenever I want
Hi there,
Sorry but this forum is not for guide and tutorials.
The mission of XDA Assist is to provide basic help to those who have tried searching but can't find what they are looking for and need assistance. This is not a "helpdesk" providing technical assistance but more to point you in the correct direction with your problem. Perhaps you can't find posts on how to root your phone, install custom recovery or maybe you have questions about how to navigate and use features on the site.
Click to expand...
Click to collapse
You can post your thread, in this forum:
> Android Development and Hacking > Android Q&A, Help & Troubleshooting
Good luck
Thread closed

[REQ] List of /data partition needed (rooted 5.1.1)

Hi guys,
I'm trying to achieve privileged code execution using Hs20Settings bug (described on blog.quarkslab.com). This will allow me to execute code with system_server permissions which are highest after root.
Bug allows me to write files almost anywhere into /data partition (verified), however I can't read it's content, which makes it really difficult to find correct attack vector. DEX file [email protected]@[email protected]@classes.dex doesn't exist in 5.1.1 (even APK doesn't contain classes.dex), so I need to find another one.
If someone with rooted stock (TouchWiz) 5.1.1 ROM is willing to help me, I need simple thing:
Open adb shell and enter su command
ls -lR /data > /sdcard/ls_data.txt
Upload me file ls_data.txt from /sdcard
If I'll be successfull, I'll share my findings with you .
Thanks in advance.
- Filip

Deleting file after system start not working with tasker.

Hi all,
because there is actually no persistend root on the Huawei Mate 9 (system modifivations are discarded after reboot) i would like to run system modifications directly after booting the device.
To do that i am going to use tasker.
For example i want to delete the "camera_click.ogg" file to avoid sounds when making photos with WhatsApp.
Using root explorer i only have to tap on mount system r/w and delete the file.
So i tried the following code in the android shell (which can be run within tasker):
Code:
su
mount -o rw,remount /system
rm -f /system/media/audio/ui/camera_click.ogg
But the system is still not writeable! And mountimg via root explorer only works again after a reboot...
Once with a similar code i got an error message like "resource busy".
What can cause this Problem and how can i delete this system file?
(note: i am not so familiar with Linux, only Raspberry Pi knowledge )
Thank you for helping in advance!
It is same dm-verity problem.
You have to modify boot to turn dm-verity off.
5[Strogino] said:
It is same dm-verity problem.
You have to modify boot to turn dm-verity off.
Click to expand...
Click to collapse
Thank you for your answer!
I will try this tutorial:
https://forum.xda-developers.com/mate-9/development/root-root-mate-9-t3556590
Hope it works...

[TOOL] KDZ Writer

Tool for writing portions of KDZ files to LG devices. As long as KDZ files for the particular device are available and LGE doesn't change the format in an incompatible fashion, this will handle upgrades. Presently this tool targets the format as is used with UFS devices. The LG G5 and LG V20 are examples; the G6 and V30 may turn out to be compatible.
KDZ files are available for several LG V20 variants. Notably H918TN (US T-Mobile), H990 (non-US single-SIM), H990DS (non-US dual-SIM), H990N (Korea dual-SIM), US996 (US unlocked), and VS995 (US Verizon).
The primary goal of this tool is updating /system and /firmware, though updating other areas is in theory possible.
XDA:DevDB Information
KDZ Writer, Tool/Utility for the LG V20
Contributors
emdroidle
Source Code: https://github.com/ehem/lg-v20-tools
Instructions
Boot into TWRP. Upload an appropriate KDZ for your phone somewhere on your phone. This can be on a SD card, since all known KDZ files are just under 3GB even TWRP's in-memory filesystem is sufficient. Download(the Downloads tab, above), and upload kdzwriter to your phone:
Code:
adb push kdzwriter.gz /
Then in a shell (`adb shell`):
Code:
gunzip -c /kdzwriter.gz >/sbin/kdzwriter
chmod 755 /sbin/kdzwriter
[STRIKE]umount /system
ln -s /sbin /system/bin[/STRIKE]
The `umount` command may give an error. If you're on TWRP 3.0.2-1 /system won't have been mounted and you'll get "invalid argument"; if you get an error saying "busy" there is a problem. If using version 1.95 or later, the second two commands are unnecessary.
From here you can invoke `kdzwriter` with various arguments to write /system and /firmware:
-v
Increase verbosity. At lower levels not too much is added, at level 3 `kdzwriter` starts gushing debugging information.
-r
Report mode, tells you about how the chunks in the KDZ file match your phone.
-t
Test mode, tells you whether `kdzwriter` has decided the KDZ is an appropriate match for your phone (safety check). If used with other options, `kdzwriter` will run through the write procedure and tell you whether all the steps succeed.
-a
Write areas known safe to apply to the device. As of right now this is /system, /firmware and /cust. (equivalent to -s -m -a)
-s
Write /system. If you only want to update /system, this is the option for you. By default -s will attempt to preserve the kernel modules present on /system and overwrite the ones on the new /system image with those. This is appropriate if you've installed a custom kernel.
-M
Disables preserving kernel modules from the current /system. If you've got a stock kernel you want this option. If /system has been corrupted, this also avoids mounting /system and ensures -s succeeds.
-m
Write /firmware (aka modem).
-c
Write /cust. Some files of these files appear related to VoLTE. I'm unsure whether they're critical or optional. One (seemingly harmless) error message generated when switching regions can be avoided by writing this area.
-k
Write boot (/dev/block/bootdevice/by-name/boot). If you're opting to stay with the stock kernel then you'll want this option. This can also be used to recover from a failed Magisk/SuperSU/Superuser installation.
-P
GPT restoration mode. If a "ROM" has modified the GPTs this will attempt to restore them closer to stock. There are plans to have LineageOS do just this, so I wanted to be prepared to return to stock.
-R
Modified GPT restoration mode. "userdata" is moved closer to the begining of the device potentially allowing additional data to be merged without needing to wipe.
The most common invocation will be `kdzwriter -a <some location>/<KDZ_for_your_device>.kdz`, as noted you can use "-at" to simulate the process and confirm no errors occur.
The -b option has been allocated, but are not yet implemented. A deliberate attempt to minimize flash wear has been made. Blocks will not be rewritten if possible. Empty areas will be discarded/TRIMed.
`kdzwriter` attempts to preserve some files when writing areas. When writing /system unless -M is specified, `kdzwriter` will attempt to preserve kernel modules. When writing /cust, `kdzwriter` attempts to preserve "official_op_resize.cfg" (see GPT restoration mode for details). There are plans for v2.0 to try to preserve the contents of "open_path_mapping.cfg" and "op_list.cfg".
If you get an error message about "Failed while writing /system, major problem, PANIC!" this is most likely to be caused by a corrupt KDZ file. In this case retrying the download is the most likely solution.
Apparently for some devices/KDZ files it is necessary not to skip too many revisions. Notably going from H990N version 10b to version 10o does not work; instead you need to do 10b -> 10e ->10o. This hasn't yet been observed on other devices, but beware big skips can fail.
GPT Restoration mode
There are plans to have a future version of LineageOS hack off a piece of /system to utilize as /vendor. This is reasonable for LineageOS (or another "ROM"), but a problem if you desire to return to stock. As such v1.95 has been brought out which features the ability to restore the GPTs.
Crucial item: In the interest of safety this operation demands a KDZ which is a better match for your device! You will need to use a KDZ file matching what your device was at when you initially rooted! (H990ds10b* or so for most devices)
You can confirm whether a given KDZ is appropriate using the "-t" option. If `kdzwriter -t <someKDZfile>.kdz` gives the message "KDZ appears applicable to this device" then kdzwriter will not use that file for this operation, that command must give the output "KDZ appears applicable to this device and matches original" in order to be acceptable for this operation.
On the H990 some space is stolen from userdata for use as /OP. Everything in /OP appears to be bloatware, but since I'm trying to make it possible to go back close to stock, I've got to do something about /OP. The size of /OP is controlled by the file "/cust/official_op_resize.cfg". As I didn't have a better way of handling it, I simply grab the first line and use that. If /cust is unavailable (hasn't been restored?) a size of 0 will be assumed. If a size of 0 is found, `kdzwriter` will wipe the slice^Wpartition and the space will in fact end up as part of /data (hint, hint).
Important note: Since the normal order is system, cache, cust, OP then userdata, modifying the size of /OP will require wiping /data!
The -R option restores a modified GPT. The modified GPT mode tries to reorders the slices^Wpartitions as userdata, OP, cust, system, cache. The theory is that if cust isn't needed in LineageOS, cust could be removed from the GPT and the space merged into userdata. Since userdata is then first, it could be enlarged without the need to wipe and restore.
Examples
I expect by far the most common usage to be `kdzwriter -a <somekdz>.kdz`, but as typed there extra flags for certain situations:
Recovering from bad flash attempt -sM
If there was a problem when attempting to write /system there is a decent chance it won't be possible to mount /system for saving kernel modules. In this case using `kdzwriter -sM <somekdz>.kdz` is your need. This skips mounting /system at the cost of being unable to preserve kernel modules, you will need to reinstall whatever kernel you were using.
Partial unrooting -k
If you want to switch between Magisk, SuperSU, and Superuser this is your need. `kdzwriter -k <somekdz>.kdz` overwrites the boot/kernel area with the image from the KDZ file. Your next step will likely be to reinstall whatever kernel you were using. Afterwords all traces of a systemless install will have been wiped and you can install a different `su` implementation.
Going mostly back to stock -ak
For owners of the V20s where the stock kernel works, you can use a combination of these two options to update /system and to a newer kernel (you don't want to be hit by DirtyCOW). After doing this you'll need to reinstall whichever `su` implementation you were using.
Version Information
Status: Stable
v1.98a
Identified which check was preventing installation of 20a KDZ files. That is now disabled. There is also a force option which will override the safety check, but please be careful. That safety check was written to try to make it hard to generate bricks...
v1.98
Implemented modified GPT restoration mode. This mode reorders the slices^Wpartitions during restoration. This allows for potentially merging more space into /data without needing to wipe /data again.
v1.95
Found the appropriate compiler flag for setting the runtime linker. Thanks to the TWRP folks, kdzwriter is now a bit easier to use.
Implemented GPT restoration mode. This allows for restoring modified GPTs back to stock. This is valuable if a "ROM" has modified the GPTs. Given how there are plans to have LineageOS do just that, I'm figuring a number of people may be rather interested in this feature.
v1.3
Fixed testing for whether a KDZ is applicable to the device. This should merely be a safety precaution, but I need it there so I don't get fingers pointed my way on failure.
Finally tracked down the issue with kernel module preservation. This is a really stupid bug. There should no longer be any need to reinstall modified kernels after updates!
v1.2
Added additional debugging information around calls to Zlib. There has been a report of difficulty around Zlib so extra information is available. Some of this is only available at verbosity level 3 though.
Created 2017-07-31
Last Updated 2019-01-02
v1.2
MD5: 49b06410f8f90606f9829cc8ff8ed82a
SHA1: ce1f84f579c94e788539e462febc2f2e293a64ff
SHA512: 47a94ae6c6d1157dd406319d2d44ba72c9f954c3f0ad6b892eafbb818d01a7bf9c14b0a9f01ab6f092c07537d3273f8981b83c80ebf67f2cf9e33c26f8838ad3
v1.3
MD5: a412c7fe58722b6e63560c5074bc59b7
SHA1: 8e7e1fbd2edef0ff10516c57a84b642a1a92a758
SHA512: a5b9d3a66bf4237138264a5756f1637ba849a3aeb78d935e0fe6033486de41ad56a0ca5c62b3d94546fd2b4fe86e9edf7958e80481f1f10ef7ef2b6b562a412a
v1.95
MD5: 5f8797b5829ca5a919d1d685404a2726
SHA1: 62d7476ec50a2ea3a682b86654dd1ddc03da0c24
SHA512: ee717f3803e43862dc6faac3788e16267d9661bf98f8fdeebedd6b871dcd4cadb7dc4ee5208dc6072f5f7ba44e46440a759425536a354b530584f824570283c7
v1.98
MD5: 7dfee90d7e0711f5742b94efb81a8b18
SHA1: f020345935b078ebc336e88e3b0623e0792f71ad
SHA512: 71e82f535d33cc64fe023425db0b6d924c6d11677b04843628a9c6ca90cc6700d0a6c5e868c964e31d54f7d3c835d9ecd3b6c33108926da29e75e3be3e1456b2
v1.98a
MD5: 31f207a865b453472271eed29544833e
SHA1: 42ab0486cfc100b52dde9c6bac9bca684eccfde2
SHA512: fe127bece0e25ae4927f3499d708d1533b5fe0a00513de9cb8565ffc24b3e4ee08e9000d828a0177feb4b3b449137836b63cda72cf178b5cd67ae377997a1d37
@emdroidle I'm getting "permission denied" from KDZWriter when I execute the kdzwriter -a /external_sd/H990_something.kdz command in TWRP Terminal. I noticed that I can't umount /system either, it says it's an invalid argument?
Would this be something to do with the locking of /system I read about earlier? I did try manually mounting /system in TWRP before trying anything too, but that doesn't seem to have helped at all.
I've also tried doing mount -o rw,remount,rw /system
I'm running rooted 10C-TWN firmware with Magisk (interestingly, phone will flat out refuse to boot if I flash SuperSU, so Magisk it is). When I go to install Magisk it says "mounting /system" with no problems at all
Thanks very much for your work.
Iam confused about the instructions im not very familiar with adb shell . can you please elaborate more the steps for easy running of kdzwriter. thank you and let me tell you that you are awesome
Where is kdzwriter.gz? No attachment? Works kdzwriter from Dirty Santa thread?
i am getting kdzwriter: permission denied
iDefalt said:
I'm running rooted 10C-TWN firmware with Magisk (interestingly, phone will flat out refuse to boot if I flash SuperSU, so Magisk it is). When I go to install Magisk it says "mounting /system" with no problems at all
Click to expand...
Click to collapse
My first attempt to install Magisk failed, "Unable to repack ramdisk". At which point I had a problem. Suddenly the "-k" option came into existence and a retry succeeded.
iDefalt said:
@emdroidle I'm getting "permission denied" from KDZWriter when I execute the kdzwriter -a /external_sd/H990_something.kdz command in TWRP Terminal. I noticed that I can't umount /system either, it says it's an invalid argument?
Would this be something to do with the locking of /system I read about earlier? I did try manually mounting /system in TWRP before trying anything too, but that doesn't seem to have helped at all.
I've also tried doing mount -o rw,remount,rw /system
Click to expand...
Click to collapse
Okay, I guess I'm not that great at writing instructions. The added `chmod` will fix the "permission denied" error.
The `umount` is more an issue if you've updated to TWRP 3.1.1-0 which does successfully mount /system, whereas TWRP 3.0.2-1 didn't. The "invalid argument" is saying it isn't mounted and you can simply proceed. It is a problem if it says "busy". In this case you would get an error "Failed mounting system for kmod saving: <message>", then "kdzwriter: Failed while reading kernel modules" and `kdzwriter` wouldn't proceed.
Also replace "/external_sd/H990_something.kdz" with the filename/where you installed it (did you really rename the KDZ file to H990_something.kdz?).
dadme said:
Where is kdzwriter.gz? No attachment? Works kdzwriter from Dirty Santa thread?
Click to expand...
Click to collapse
Notice the "Download" tab at the top of this thread?
does anyone have the link to TWRP 3.1.1-0 for the h990ds? My device didn't seem to like the command 'kdzwriter -a /external_sd/H990ds10f_00_OPEN_TW_DS_OP_0622.kdz' I received the error "Failed while writing /system, major problem, PANIC!" . It's in a bootloop now should have run '-at' first!
second attempt...
You have to try harder than that message to make me panic
i figure my 10f kdz must be corrupt, so tried 10e
kdzwriter -a /external_sd/H990ds10e_00_OPEN_TW_DS_OP_0517.kdz
errors recieved were:
Failed mounting system for kmod restoring: Invalid argument
kdzwriter: Failed while restoring kernel modules, recommend kernel reinstall!
I reinstalled the kernel. Not sure what the kmod error means?
Anyway android upgraded and works a charm. Didn't fix my camera focus issue but i guess that must be down to the kernel.
Thanks for this awesome tool emdroidle, are you taking donations?
Sorry, Emdroidle i use classic theme, so download tab is not visible. Can use this TWRP https://forum.xda-developers.com/v20/development/recovery-twrp-3-1-0-0-touch-recovery-t3603760, elsa version? TWRP can be updated from TWRP 3.0.2.1 or from fastboot?
Got this on 10f H990DS TWN,
Failed mounting system for kmod restoring: Invalid argument
kdzwriter: Failed while restoring kernel modules, recommend kernel reinstall!
Finished rewrite of system area
Begining rewrite of modem area
ooo...ooo.oooooooo.ooooo...oooooooo.o*
Finished rewrite of modem area
dadme said:
Sorry, Emdroidle i use classic theme, so download tab is not visible. Can use this TWRP https://forum.xda-developers.com/v20/development/recovery-twrp-3-1-0-0-touch-recovery-t3603760, elsa version? TWRP can be updated from TWRP 3.0.2.1 or from fastboot?
Got this on 10f H990DS TWN,
Failed mounting system for kmod restoring: Invalid argument
kdzwriter: Failed while restoring kernel modules, recommend kernel reinstall!
Finished rewrite of system area
Begining rewrite of modem area
ooo...ooo.oooooooo.ooooo...oooooooo.o*
Finished rewrite of modem area
Click to expand...
Click to collapse
Either TWRP should work, just there is a small behavior difference. TWRP 3.0.2-1 has a small bug and never manages to mount /system; while TWRP 3.1.1-0 does manage to mount /system. With 3.0.2-1 the `umount /system` can be skipped, with 3.1.1-0 that command needs to be run before /system is upgraded.
Mars104 said:
does anyone have the link to TWRP 3.1.1-0 for the h990ds? My device didn't seem to like the command 'kdzwriter -a /external_sd/H990ds10f_00_OPEN_TW_DS_OP_0622.kdz' I received the error "Failed while writing /system, major problem, PANIC!" . It's in a bootloop now should have run '-at' first!
second attempt...
You have to try harder than that message to make me panic
i figure my 10f kdz must be corrupt, so tried 10e
kdzwriter -a /external_sd/H990ds10e_00_OPEN_TW_DS_OP_0517.kdz
errors recieved were:
Failed mounting system for kmod restoring: Invalid argument
kdzwriter: Failed while restoring kernel modules, recommend kernel reinstall!
I reinstalled the kernel. Not sure what the kmod error means?
Click to expand...
Click to collapse
Well seeing that "PANIC" message means something rather problematic occurred, and the state of /system is Bad(tm).
"kmod" is short for "kernel module". The Linux kernel has the capability to load/unload extra bits of code (generally drivers) while the kernel is running. These are specific to the particular kernel and trying to load modules for the wrong kernel could fail or cause problems.
I was surprised to learn the Bluetooth and FM Radio drivers are modules, as well as the exfat filesystem is a module. The userspace portion of talking to the Bluetooth chip won't load unless it successfully loads "brcm_bt_drv.ko" into the kernel.
The kernel modules are located in /system/lib/modules. When writing /system, `kdzwriter` first tries to mount /system and save copies of the modules. Once /system has been rewritten it tries to restore them. If either of those steps fails, there is need to reinstall the kernel since the modules on /system will match LG's stock kernel, not the static-fixed kernel I built.
Mars104 said:
Thanks for this awesome tool emdroidle, are you taking donations?
Click to expand...
Click to collapse
Well I don't send them back.
emdroidle said:
The added `chmod` will fix the "permission denied" error. (did you really rename the KDZ file to H990_something.kdz?).
Click to expand...
Click to collapse
Haha no mate I didn't, was just using the name for the KDZ from your example
Just wanted to say thanks as well. Used your tool with the updated instructions. Booted into TWRP, plugged into PC, used ADB from Command Prompt to do the whole thing. Went perfectly. It gave me a line when it was done about recommending a kernel re-install, so once the tool was finished I re-flashed the H990 kernel zip from your other thread, Magisk, the latest Aroma GAPPS package, and then rebooted. After the optimization process, I'm now on V10F-TWN with a patch date of 1st June, and rooted.
It's a touch of a process to get to this point, but if you follow everything properly to the letter, it works. Cheers mate.
i rename my kdz into "some.kdz" i run kdzwriter -at /external_sd/some.kdz itsays : Next chunk starts beyond end of file, Failed to open KDZ file, aborting what does this mean thank you
iDefalt said:
Haha no mate I didn't, was just using the name for the KDZ from your example
Click to expand...
Click to collapse
Okay, fine. I just wanted to make sure since there are people who don't realize you're supposed to adapt the name and complain when things don't work. Just one of those things that makes one go wait-a-minute...
kuachi00 said:
i rename my kdz into "some.kdz" i run kdzwriter -at /external_sd/some.kdz itsays : Next chunk starts beyond end of file, Failed to open KDZ file, aborting what does this mean thank you
Click to expand...
Click to collapse
Most likely you don't have the full file. Were you downloading it and the download got interrupted?
Success! Upgraded to 10f with root
emdroidle
Can you please make a small tool that extract the content of the KDZ file and the system.img file to modify things with ease on PC, and can easier interchange between versions to see what bugs can be avoided....
zinou213 said:
emdroidle
Can you please make a small tool that extract the content of the KDZ file and the system.img file to modify things with ease on PC, and can easier interchange between versions to see what bugs can be avoided....
Click to expand...
Click to collapse
There already are tools for this. https://github.com/Bigcountry907/kdztools and https://forum.xda-developers.com/showthread.php?t=2600575
Though I'm not sure they are completely compatible with the newest kdz's. Simple extraction should work.
-------
Nice tool btw. Now if only it where possible to flash kdz's directly in EDL mode, that would be great !!
askermk2000 said:
There already are tools for this. https://github.com/Bigcountry907/kdztools and https://forum.xda-developers.com/showthread.php?t=2600575
Though I'm not sure they are completely compatible with the newest kdz's. Simple extraction should work.
-------
Nice tool btw. Now if only it where possible to flash kdz's directly in EDL mode, that would be great !!
Click to expand...
Click to collapse
Thank you, I know this tools but i want a confirmation about there compatibility with v20's KDZs, and what is the EDL mode you talk about ??
zinou213 said:
Thank you, I know this tools but i want a confirmation about there compatibility with v20's KDZs, and what is the EDL mode you talk about ??
Click to expand...
Click to collapse
That last part was not for you specifically. It's Sahara Download Mode, or Emergency Download Mode I was talking about, something you probably won't know much about until you brick your phone
askermk2000 said:
That last part was not for you specifically. It's Sahara Download Mode, or Emergency Download Mode I was talking about, something you probably won't know much about until you brick your phone
Click to expand...
Click to collapse
OK Sahara Download Mode i know, i saw this with my old bricked gflex 2 that i unbricked with too many tools and processes that i forget now...
why is it that only the android security patch has been changed and the version is still v10e iam trying to upgrade to v10g thanks
---------- Post added at 11:09 PM ---------- Previous post was at 10:47 PM ----------
also my cpu load is alway going 90 to 100 percent even tho im not using any app did not also do cpu adjustments . it drains my battery fast
@emdroidle
Your donation button doesn't work:
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
Click to expand...
Click to collapse

[GUIDE]How to install Bromite SystemWebView without Magisk (Android 12+ included)

This has not been tested on any other version other than Android 12.1. If you have issues please report them here or open an issue on GitHub.
I just upgraded to LineageOS 19 from 18.1 and as usual I want to apply my own modifications on top of it but the NanoDroid script that I previously used doesn't seem to work on 19. I couldn't find an answer neither on r/LineageOS, r/fossdroid or even XDA so I wrote a way to install Bromite SystemWebView in a way that's a lot more elegant and doesn't need Magisk or root.
Method 1 (preferred):
Download the flashable package and install it in recovery mode either by placing it on the SD card or by sideloading, then reboot:
Bash:
adb sideload BromiteSystemWebViewOverlay.zip
Download the latest Bromite SystemWebView release and install it as you would a regular app.
Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
Method 2 (legacy):
Enable Rooted debugging by navigating to Settings > Developer options > Rooted debugging.
Connect your phone to your PC and type
Bash:
adb root
Mount the vendor folder:
Bash:
adb shell mount -o rw,remount /vendor
Copy the package downloaded from here to the overlay directory:
Bash:
adb push treble-overlay-bromite-webview.apk /vendor/overlay
Mount the system as read-write:
Bash:
adb shell mount -o rw,remount /
Copy the OTA survival script to the appropriate location:
Bash:
adb push 99-bromite-webview.sh /system/addon.d
Make the script executable:
Bash:
adb shell chmod 755 /system/addon.d/99-bromite-webview.sh
Reboot the device:
Bash:
adb reboot
Download the latest Bromite SystemWebView release and install it as you would a regular app.
Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
For a more in-depth explanation check the GitHub repository.
It is worth mentioning that after installing Bromite SystemWebView, developers will not provide any support when their banking applications are not functioning properly. Proven in practice.
ze7zez said:
It is worth mentioning that after installing Bromite SystemWebView, developers will not provide any support when their banking applications are not functioning properly. Proven in practice.
Click to expand...
Click to collapse
I never encountered a mobile banking app that uses WebView (at least for the main functionality), but your mention is most welcome.
I've been debloating and degoogling and old HTC 10 running android 8. I've been wanting to get bromite installed because chrome is installed as the webview. I'm rooted, but unfortunately the webview manager magisk module fails to install.
I just found this thread and would love to give this approach a try.
I have the /system/addon.d directory. I have /vendor but not /vendor/overlay. I have /mnt but not /mnt/system. The scripts I have in /system/addon.d (fdroid and minmicrog) only reference the system app and priv-app directories so no help there, unless those locations are fallback options. Can your instructions be adjusted for android 8?
I also have a rooted microg LOS 19 moto g7 that's served as a reference with my debloating/degoogling effort. I looked at the contents of /vendor/overlay there and found that all but one of the apk's in there had "vendor" in the name, so I searched recursively from / on my HTC and didn't find any apk's with "vendor" in the name. Do you have any other ideas on how I might identify the equivalent directory on my HTC?
TheShanMan said:
I have /vendor but not /vendor/overlay.
Click to expand...
Click to collapse
Then try looking into /system/product/overlay.
TheShanMan said:
I have /mnt but not /mnt/system.
Click to expand...
Click to collapse
Your path will be /mnt/system only if you mount the root from recovery mode.
TheShanMan said:
all but one of the apk's in there had "vendor" in the name
Click to expand...
Click to collapse
The name doesn't matter, you can call the apks anything and they will still work.
Can you attach the output of the following command?
Bash:
adb shell cmd overlay list
arovlad said:
Then try looking into /system/product/overlay.
Click to expand...
Click to collapse
I don't have a /system/product directory. Here are the contents of my /system directory:
Code:
addon.d
app
bin
build.prop
compatibility_matrix.xml
customize
etc
fake-libs
fake-libs64
fonts
framework
lib
lib64
lost+found
manifest.xml
media
priv-app
tts
usr
vendor
xbin
And since "vendor" is part of the discussion, here are the contents of my /system/vendor directory:
Code:
app
bin
compatibility_matrix.xml
etc
firmware
framework
lib
lib64
manifest.xml
media
radio
rfs
ueventd.rc
arovlad said:
Can you attach the output of the following command?
Bash:
adb shell cmd overlay list
Click to expand...
Click to collapse
The output from that command is nothing.
I'm happy to try as much as you'd like, including experimentation (I've gotten very used to nandroid backups and restores while degoogling and debloating ). Thanks for the help!
Try it out:
Installing SystemWebView
Bromite is a Chromium fork with ad blocking and privacy enhancements; take back your browser! - bromite/bromite
github.com
Yeah I've seen that. It's a bit complicated, which is why I was hoping to either do it via the magisk manager module or via these steps. Ultimately if all else fails, I may give that a try. Hoping @arovlad will have the magic touch here, but I totally understand if there's no desire to invest time figuring out how to do this on an old device and android version.
TheShanMan said:
I totally understand if there's no desire to invest time figuring out how to do this on an old device and android version.
Click to expand...
Click to collapse
I am all for supporting old hardware. The thing is I actually thought every device running Project Treble (TL;DR Android 8 and above) use overlays of some kind.
I have the following ideas:
Do steps 1-3 as explained above and then make a folder called overlay inside the vendor partition:
Bash:
adb shell mkdir -m 755 /vendor/overlay
Do step 4 and then run the following command:
Bash:
adb shell cmd overlay enable com.arovlad.bromite.webview.overlay
TheShanMan said:
The output from that command is nothing.
Click to expand...
Click to collapse
Does it output nothing or does it output cmd: Can't find service: overlay? If the service cannot be found then the device may not be Treble-enabled. Please check if it is.
If it is try running:
Bash:
adb shell cmd overlay dump
and paste the output here.
TheShanMan said:
Thanks for the help!
Click to expand...
Click to collapse
Thank you for your patience and investing time in this.
Edit: added link for Treble support
It outputted nothing, and the treble check app says it's not enabled. Does that mean I'm out of luck or is there anything else to try? Thanks!
TheShanMan said:
It outputted nothing
Click to expand...
Click to collapse
You mean the first command, the second, or both? Please use quotes accordingly so I can know what you're referring to.
TheShanMan said:
the treble check app says it's not enabled. Does that mean I'm out of luck...?
Click to expand...
Click to collapse
You may be. You mentioned earlier that the Magisk module fails to install and that may be because your ROM is not Treble-enabled.
TheShanMan said:
is there anything else to try?
Click to expand...
Click to collapse
Have you tried creating the overlay folder manually and then enabling it via ADB as I wrote above?
Sorry, when I said it outputted nothing, it was in response to your question about the command "adb shell cmd overlay list". I tried creating the overlay folder and enabling it. The enable command gave no output so I don't know if it worked or not. I tried rebooting and then checking the webview setting in dev options, but it's still not there.
I'm guessing you assumed I would also then do steps 6 and 7. Is that right? If so, I'll have to try creating a magisk module to put the script in that location and hope it runs. I can't touch the actual system partition because doing so causes VoLTE to stop working on my phone, so I'm doing all my debloating/degoogling through magisk modules. I don't mind giving this a try, but since my phone isn't treble enabled, I'd like to verify that you think I ought to before I spend the time creating a magisk module for it.
Appreciate the help!
TheShanMan said:
The enable command gave no output so I don't know if it worked or not. I tried rebooting and then checking the webview setting in dev options, but it's still not there.
Click to expand...
Click to collapse
Run the following command:
Bash:
adb shell dumpsys webviewupdate
and if it outputs org.bromite.webview is NOT installed then it works.
TheShanMan said:
I'm guessing you assumed I would also then do steps 6 and 7. Is that right?
Click to expand...
Click to collapse
If your phone is old and doesn't receive official updates anymore, there's no need for addon.d, so no.
May I have the contents of the / (root) folder? Is there any partition called oem or odm? If so, what do they contain?
I'm a little confused by you saying it works if it says "NOT installed", but no, it doesn't say anything about bromite. Here's the output:
Current WebView Update Service state
Fallback logic enabled: true
Current WebView package (name, version): (com.google.android.webview, 62.0.3202.84)
Minimum WebView version code: 320208452
Number of relros started: 2
Number of relros finished: 2
WebView package dirty: false
Any WebView package installed: true
Preferred WebView package (name, version): (com.google.android.webview, 62.0.3202.84)
WebView packages:
Valid package com.android.chrome (versionName: 62.0.3202.84, versionCode: 320208452, targetSdkVersion: 27) is NOT installed/enabled for all users
Valid package com.google.android.webview (versionName: 62.0.3202.84, versionCode: 320208400, targetSdkVersion: 27) is installed/enabled for all users
And the contents of / are:
acct
bt_firmware
bugreports
cache
carrier
charger
config
cota
crashdump.d
cwkeys
d
data
default.prop
dev
devlog
dsp
etc
fataldevlog
file_contexts.bin
firmware
fstab.qcom
init
init.environ.rc
init.hosd.cradio.rc
init.hosd.htc_pme.rc
init.hosd.usb.configfs.rc
init.hosd.usb.rc
init.hosd_fusion.usb.rc
init.htc.storage.exfat.rc
init.htc.storage.mocana.rc
init.rc
init.recovery.common.rc
init.recovery.htc_pme.rc
init.usb.configfs.rc
init.usb.rc
init.zygote32.rc
init.zygote64_32.rc
mnt
nonplat_file_contexts
nonplat_hwservice_contexts
nonplat_property_contexts
nonplat_seapp_contexts
nonplat_service_contexts
oem
persist
plat_file_contexts
plat_hwservice_contexts
plat_property_contexts
plat_seapp_contexts
plat_service_contexts
preload
proc
res
root
sbin
sdcard
sdcard2
sepolicy
storage
sys
system
tombstones
ueventd.htc_pme.rc
ueventd.rc
vendor
vndservice_contexts
vzw
vzwqualitylogger
/oem is empty.
TheShanMan said:
I'm a little confused by you saying it works if it says "NOT installed"
Click to expand...
Click to collapse
Yeah, it's a little confusing, but if the overlay was successfully installed it should output NOT installed.
TheShanMan said:
but no, it doesn't say anything about bromite. Here's the output:
Click to expand...
Click to collapse
Then it doesn't work.
TheShanMan said:
/oem is empty.
Click to expand...
Click to collapse
Then try putting the overlay package inside, enable it (even if there is no output, just in case) and reboot the phone.
If it doesn't work, then you are out of luck as far as I know and your only option is to patch framework-res.apk manually.
Edit: clarification
Not only did that not work, but the /oem directory got wiped out after booting up. It must get populated by something during boot. Thank you very much for putting in this much effort to figure out how to make this work in my case. I wish I could've reported victory, but maybe I'll get it figured out via framework-res. I've tried one approach with that unsuccessfully so far (which hung during boot). I'll try more things and hopefully get it figured out! Best of luck with your project and thanks for offering it to people!
TheShanMan said:
Thank you very much for putting in this much effort to figure out how to make this work in my case.
Click to expand...
Click to collapse
Don't sweat it! Thank you for your patience and sorry I couldn't find a proper solution.
TheShanMan said:
I'll try more things and hopefully get it figured out!
Click to expand...
Click to collapse
If you actually DO find a way, it would be awesome if you could report back. Maybe it will help others in the same situation. Good luck!
Hi. Thank you for that step by step process of installing Bromite Webview.
I am a little confused about the 'vendor' part. What does that mean and why is it there? And as a consequence of that, I do not understand steps 6 & 7 beyond adb 'push' or 'shell'.
Any help is massively appreciated!
arovlad said:
This has not been tested on any other version other than Android 12.1. If you have issues please report them here or open an issue on GitHub.
I just upgraded to LineageOS 19 from 18.1 and as usual I want to apply my own modifications on top of it but the NanoDroid script that I previously used doesn't seem to work on 19. I couldn't find an answer neither on r/LineageOS, r/fossdroid or even XDA so I wrote a way to install Bromite SystemWebView in a way that's a lot more elegant and doesn't need Magisk or root.
Prerequisites:
adb
Rooted debugging or a custom recovery
Installation guide:
Enable Rooted debugging by navigating to Settings > Developer options > Rooted debugging.
Connect your phone to your PC and type
Bash:
adb root
Mount the vendor folder:
Bash:
adb shell mount -o rw,remount /vendor
Copy the package downloaded from here to the overlay directory:
Bash:
adb push treble-overlay-bromite-webview.apk /vendor/overlay
Mount the system as read-write:
Bash:
adb shell mount -o rw,remount /
Copy the OTA survival script to the appropriate location:
Bash:
adb push 99-bromite-webview.sh /system/addon.d
Make the script executable:
Bash:
adb shell chmod 755 /system/addon.d/99-bromite-webview.sh
Reboot the device:
Bash:
adb reboot
Download the latest Bromite SystemWebView release and install it as you would a regular app.
Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
For custom recoveries: skip the first two steps, enable ADB from recovery mode and follow steps 3-10 replacing /vendor/overlay with /mnt/system/vendor/overlay and /system/addon.d with /system/system/addon.d.
For a more in-depth explanation check the GitHub repository.
Click to expand...
Click to collapse
Hi, @arovlad thanks for this workaround. I'm running the exactly same LOS version than you on a OP6. But at step 5 i'm getting the following error : /dev/root is read-only any idea what can i do ? Thx for your help !
amanajosh said:
I am a little confused about the 'vendor' part. What does that mean and why is it there?
Click to expand...
Click to collapse
Starting Android Oreo, the vendor partition is a separate partition containing proprietary manufacturer code not part of AOSP. This separation ensures that the Android system can be updated without recompiling the device-specific software. The vendor partition is typically overlayed over the system partition, making it easy to apply tweaks and modifications without actually touching the system. These modifications are typically named systemless.
Did you install Bromite WebView successfully?
bre75 said:
at step 5 i'm getting the following error : /dev/root is read-only any idea what can i do ?
Click to expand...
Click to collapse
Try the following command instead of step 5 and see if works for you:
Bash:
adb remount

Categories

Resources