Broken symlinks in the /system - General Questions and Answers

Hello everybody, first time asking here.
Problem is with endless booting, sometimes it restarts back to TWRP.
After disabling MTP in TWRP and adb shell I see:
$ adb shell
linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbolic links
encountered
WARNING: linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbol
ic links encountered
Click to expand...
Click to collapse
So I look deeper and found
~ # ls -all /system/etc
linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbolic links
encountered
WARNING: linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbol
ic links encountered
lrw-r--r-- 1 root root 11 Jan 1 2009 /system/etc -> /system/etc
Click to expand...
Click to collapse
Seems that the symlink is broken and points to itself. Is it true? I found more symlinks like that:
bin -> /system/bin
product -> /system/product
system_ext -> /system/system_ext
vendor -> /system/vendor
Click to expand...
Click to collapse
so I am not sure whether this is broken system issue or something else. At least in Linux I would consider it broken but AndroidOS is not so familiar for me.
I have A3 (2016) [a3xltee] with unofficial 18.1 but the problem was also on the previous official 17.1 - I upgraded to see whether it fix the [rpbem. I did it before I found the issue with symlinks.
Any advice?
The phone itself has issues, was swimming with me in the pool, and it life is expecting to end but I would like at least to run it to sync all data and export to new phone.
BTW, those are all ld.config.txt files I found with find
~ # find . -name ld.config.txt
linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbolic links
encountered
WARNING: linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbol
ic links encountered
./system/system/apex/com.android.conscrypt/etc/ld.config.txt
./system/system/apex/com.android.media.swcodec/etc/ld.config.txt
./system/system/apex/com.android.art.release/etc/ld.config.txt
Click to expand...
Click to collapse

_rl said:
Hello everybody, first time asking here.
Problem is with endless booting, sometimes it restarts back to TWRP.
After disabling MTP in TWRP and adb shell I see:
So I look deeper and found
Seems that the symlink is broken and points to itself. Is it true? I found more symlinks like that:
so I am not sure whether this is broken system issue or something else. At least in Linux I would consider it broken but AndroidOS is not so familiar for me.
I have A3 (2016) [a3xltee] with unofficial 18.1 but the problem was also on the previous official 17.1 - I upgraded to see whether it fix the [rpbem. I did it before I found the issue with symlinks.
Any advice?
The phone itself has issues, was swimming with me in the pool, and it life is expecting to end but I would like at least to run it to sync all data and export to new phone.
BTW, those are all ld.config.txt files I found with find
Click to expand...
Click to collapse
If it went swimming with you, it is more likely that the hardware is damaged, not the software.

It was like two years ago. Was dried out by a technician. Was working fine since then. And all problems started yesterday. Could be that hardware was degradated over the time (corrosion)
But I was able to push the problem further.
I wiped out system and installed unofficial 18.1, now the /system is OK but still is endless booting.
Current other problem is with:
$ adb shell
error: exec '/system/bin/sh' failed: No such file or directory
Click to expand...
Click to collapse
Of course file exists. I tried to browse for similar cases ut none of the proposed solutions was working for me.

Related

[APP] Linux Installer Taken almost 4 Days to Install

It has taken me almost 4 Days (Since Sunday at 1pm Central Time to now) to download and install Linux on my ASUS Transformer TF101 running AOKP Build 33 using Linux Installer from Google Play... AND IT IS STILL NOT DONE!!!! It is at package number 50,280 of Debian Testing. I don't want to press the Home or Back button cause that might screw up my device... And I can't cancel cause the button disappeared... I tried to email the maker of the app to ask them if this was normal or if I could do anything about it and haven't got a reply back...
Can anybody help me?
It is probably your internet connection.
Just download it to your computer and transfer it as per this thread
http://forum.xda-developers.com/showthread.php?t=1449678&highlight=linux+installer
mrevankyle said:
It is probably your internet connection.
Just download it to your computer and transfer it as per this thread
http://forum.xda-developers.com/showthread.php?t=1449678&highlight=linux+installer
Click to expand...
Click to collapse
One, It has been done downloaded cause my WiFi has been turned off for 3 of the now 5 days.
Two, I am not using that app, I am using https://play.google.com/store/apps/details?id=com.galoula.LinuxInstall
Three, It says it is Verifying Packages and it is at 70,000 something.
EDIT: Okay I canceled using that app and am now using the one you suggested...
However I get a bunch of errors
Kinda like this:
/ $ su
~ # cd sdcard/ubuntu
/mnt/sdcard/ubuntu # sh ubuntu.sh
mkdir failed for /data/local/mnt, File exists
Loop device exists
mount: Invalid argument
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory
mount: mounting /sdcard/external_sd on /data/local/mnt/external_sd failed: No such file or directory
net.ipv4.ip_forward = 1
ubuntu.sh: line 31: can't create /data/local/mnt/etc/resolv.conf: nonexistent directory
ubuntu.sh: line 32: can't create /data/local/mnt/etc/resolv.conf: nonexistent directory
ubuntu.sh: line 33: can't create /data/local/mnt/etc/hosts: nonexistent directory
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/root/init.sh': No such file or directory
Shutting down Ubuntu ARM
failed.
failed.
failed.
failed.
failed.
failed.
/mnt/sdcard/ubuntu #
Not exactly the same but I also get an extra one saying loop255 not found and I looked and all my stuff in my dev folder has the year 2012 in front of it. So loop255 says "2012 loop255" making the script not work.
Edit 2: Here is correct output from terminal, I am on AOKP build 33.
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ su
[email protected]:/ # cd /sdcard/ubuntu
[email protected]:/sdcard/ubuntu # sh ubuntu.sh
Loop device exists
mount: mounting /sdcard on /data/local/mnt/sdcard failed: I/O error
mount: mounting /Removable/MicroSD on /data/local/mnt/external_sd failed: I/O error
net.ipv4.ip_forward = 1
ubuntu.sh[58]: cannot create /data/local/mnt/etc/resolv.conf: Not a directory
ubuntu.sh[59]: cannot create /data/local/mnt/etc/resolv.conf: Not a directory
ubuntu.sh[60]: cannot create /data/local/mnt/etc/hosts: Not a directory
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/root/init.sh': Not a directory
Shutting down Ubuntu ARM
failed: I/O error
failed: I/O error
losetup: /dev/block/loop255: No such device or address
1|[email protected]:/sdcard/ubuntu #
Any update on the issue with the never ending "validating packages"?
I have the same issue. Was running it for the whole day until it reached 7000, then I canceled and tried again.
The weird fing is, when i tried it the first time, it worked very wuickly and without any issues. But as I had a far too small 500MB image, I tried it again. But since that, no success.
Is it possible that there are some old data kept somewhere?
Is it possible to do a clean start?
I tried already the "reset config" function.
Neverending Validating Packages, No Network Required same as previous poster...
gruinelli said:
Any update on the issue with the never ending "validating packages"?
I have the same issue. Was running it for the whole day until it reached 7000, then I canceled and tried again.
The weird fing is, when i tried it the first time, it worked very wuickly and without any issues. But as I had a far too small 500MB image, I tried it again. But since that, no success.
Is it possible that there are some old data kept somewhere?
Is it possible to do a clean start?
I tried already the "reset config" function.
Click to expand...
Click to collapse
I am having the same issue, I also have a Transformer TF-101
I had issues with the "other" Complete Linux Installer that resulted in I/O errors that I've read about being a problem on Transformer tablets or possibly NVidia Tegra tablets
I am using Linux Installer STD or "Galoula" linux installer
I e-mailed a note to [email protected] but it was kind of wordy and didn't include any attachments, don't know if I will get a reply
I did not mention to them that it was a TF-101
I will probably try debootstrap for myself in a while. I think they've put out a ****load of documentation and I can probably learn more from that documentation than I could by just running the app and installing...
Anyway, I too am not convinced that it's doing anything, I waited for 7000 last night and gave up.
Here is a screenshot of the last status report before I cancelled this time.
This is a really useful looking tool, that could save me a lot of time, but with ext2 filesystem I'm not sure how useful it would be...
Does anyone know how to get mkfs.ext4 on a transformer? It has kernel support, all of the existing filesystems are ext4. But no mkfs.ext3 or mkfs.ext4 seems to be available or on the disk already. I am thinking about preparing my loop file on another machine with some instructions from the wiki instead. It's just debootstrap... I already know how to use debootstrap. Hopefully this tool will recognize the installed system and prompt me to update my linuxchroot script, if it does that it would still be worthwhile to use.
--Kingdon
lol @ waiting 4 days, I'd have cancelled after 40 minutes
dotmaniac said:
It has taken me almost 4 Days (Since Sunday at 1pm Central Time to now) to download and install Linux on my ASUS Transformer TF101 running AOKP Build 33 using Linux Installer from Google Play... AND IT IS STILL NOT DONE!!!! It is at package number 50,280 of Debian Testing. I don't want to press the Home or Back button cause that might screw up my device... And I can't cancel cause the button disappeared... I tried to email the maker of the app to ask them if this was normal or if I could do anything about it and haven't got a reply back...
Can anybody help me?
Click to expand...
Click to collapse
4 days? Damn that's a long time. I could have flashed 4 nightlies. It took me 20 minutes on a low wifi connection with the epic 4g
treat ur girl like how u treat ur epic
I have the feeling it could have to do something with the /etc/hosts file
i blanked mine out (came prefilled by rom dev) and used AdFree
now it does not stuck at "validating", now its stuck at "resolving dependencies"
finaFub every
fixed in latest release

[GUIDE][CWM] WLAN Calibration and MAC address fix [CM]

This is for CyanogenMod and its derivates. Stock ROMs should be fine.
If you are inrested in editing your MAC address, there's a guide linked below. I don't know if stock ROMs will automcatically correct the MAC. In this case I think you have to edit /efs/imei/.nvmac.info (read more something about /efs before playing with it!)
Click to expand...
Click to collapse
The easiest way to do the calibration is:
Turn wifi ON and run
Code:
tiwlan_plts -n
This is the script called from a oneshot init service in my init.latona.rc if someone is interested. It will calibrate and correct the MAC automatically, even after a data wipe:
Code:
#!/system/bin/sh
if [ ! -f /data/misc/wifi/nvs_map.bin ]; then
insmod /system/lib/modules/tiwlan_drv.ko
/system/bin/tiwlan_loader -i /system/etc/wifi/tiwlan.ini -f /system/etc/wifi/firmware.bin
/system/bin/tiwlan_plts -n
rmmod tiwlan_drv
fi
____________________________________
Older method
Click to expand...
Click to collapse
UPDATE: I found an easy way to get the real MAC.
Download the apk attached or run the following commands:
Code:
su
mount -o remount,rw /system
ln -s /system/lib/modules/tiwlan_drv.ko /system/etc/wifi/tiwlan_drv.ko
#Make sure wifi is off
./mfgloader -l #Take the binary from a stock ROM
./mfgloader -u
rm /system/etc/wifi/tiwlan_drv.ko
mount -o remount,ro /system
After that your MAC address shoud begin with D0:C1:B1 and not 08:00:28.
To see your current MAC: System Settings > About phone > Status (turn wifi on)
Click to expand...
Click to collapse
____________________________________
This is the first post with some more informations about the calibration
Click to expand...
Click to collapse
While I was reading some logs, I noticed these lines
Code:
TIWLAN: 1089.979242: Starting to process NVS...
TIWLAN: 1089.983698: No Nvs, Setting default MAC address
TIWLAN: 1089.989007: pHwInit->uEEPROMCurLen: 1c
TIWLAN: 1089.993462: ERROR: If you are not calibating the device, you will soon get errors !!!
...
TIWLAN: 1094.726827: Station ID : 08-00-28-12-03-58
...
You can see that the device is not calibrated and that the default MAC address is assigned.
Each device should have a unique MAC address, two devices with the same MAC address in the same network will give problems.
________
UPDATE
I made two flashable files:
wlan_calibration.zip will only do the calibration
wlan_calibration_rand.zip will do the calibration and will randomize the last three octets of the address
Click to expand...
Click to collapse
If you still want to do it on your own, here the guide:
_______________
WLAN Calibration
Here the steps you need to follow (taken from: WLAN Calibration):
1) Turn wifi off
2) From ADB/terminal emulator run the following commands [1]:
Code:
$ su
# cd /data/misc/wifi
# insmod /system/lib/modules/tiwlan_drv.ko
# start wlan_loader
# ifconfig tiwlan0 up
# tiwlan_cu -b
/ w p 1 l 2 f 2
/ t b v 21
/ t b t 1 0 0 0 0 0 0 0
/ q
# rmmod tiwlan_drv
This will create this file: /data/misc/wifi/nvs_map.bin. If it's not there, you did something wrong.
After that you should not get the error while turning wifi ON.
________
MAC address fix
Even after the calibration, you'll still have the default MAC address (Station ID : 08-00-28-12-03-58). But no problem, you can 'easly' change it: Editing the MAC Address.
You need to get the newly created /data/misc/wifi/nvs_map.bin and edit it with an hex editor as described in the guide linked above.
I still don't know if the calibration will improve anything, but it surely won't hurt:
For optimal Wi-Fi performance it is mandatory to calibrate the Wi-Fi hardware
Click to expand...
Click to collapse
NOTE: nvs_map.bin is in /data, so if you do a factory reset you have to do this again.
___
[1]
ADB: System settings > Developers options (ON) > Root access > Apps and ADB
Wow...good solution buddy. I think u shouldpost this in development thread. People dont look much in general thread.
this should be added to the cm9/10 instalation .zip file
I did flash the zip file, ran the other commands thru terminal and see the file /data/misc/wifi/nvs_map.bin.
I don't understand the next step to be done.
I cannot open the bin file using hexeditor, I gave it root access.
And, in case i open it what mac address should i use? Is some address hard coded to each phone?
Hetalk said:
I did flash the zip file, ran the other commands thru terminal and see the file /data/misc/wifi/nvs_map.bin.
I don't understand the next step to be done.
I cannot open the bin file using hexeditor, I gave it root access.
And, in case i open it what mac address should i use? Is some address hard coded to each phone?
Click to expand...
Click to collapse
I don't know how MAC are assigned, I simply randomized the last part of the address (I kept the first part: 80:00:28).
Anyway I just uploaded a new zip file to make things even simpler. It will automatically randomize the last four three groups. If you want to use it, you need to delete /data/misc/wifi/nvs_map.bin first. EDIT: I changed the script, now you can do the calibration without removing the file.
Anyway I don't know what's wrong with your editor, I did it from my computer.
I tried using hex editor from play store.
I'll try the new zip tomorrow..
As I wrote in the OP, today I found the way to get the original MAC.
I don't know what is needed to make the commands work while in recovery (services needed etc...), so I made a dummy app (I simply adapted the code of an app I made few days ago to do a similar thing).
No fancy icon (it's the default one), no checks, ugly etc... It simply does the job (my Java knowledge is almost zero)
EDIT:
I almost forgot to say that the real MAC is in /efs/imei/.nvmac.info. It was the first place where I looked, but it's an hidden file an I didn't see at first.
bam....
Dear @loSconosciuto
I following this guide to solve the problem that actually I have in my phone with CM 11. In the Status menu, "non available" appears in my device WIFI mac. I following the guide step by step and I couldn't change it.
Could you help me?
carniman78 said:
Dear @loSconosciuto
I following this guide to solve the problem that actually I have in my phone with CM 11. In the Status menu, "non available" appears in my device WIFI mac. I following the guide step by step and I couldn't change it.
Could you help me?
Click to expand...
Click to collapse
This guide is for the kernel 2.6.35 which uses a completely different driver, it's quite an old thread. The calibration is done in a different way and I don't think that's the problem.
I'm not using CM11, so it's quite hard for me to know exactly what's wrong.
loSconosciuto said:
This guide is for the kernel 2.6.35 which uses a completely different driver, it's quite an old thread. The calibration is done in a different way and I don't think that's the problem.
I'm not using CM11, so it's quite hard for me to know exactly what's wrong.
Click to expand...
Click to collapse
Ok, sir. Thank you for your help.
Hi there
trying to fix Samsung s4 active i9295 wifi problem. at least got the MAC address showing (was 02:lots of zeroes) still unable to start wifi. is there anything else I should search for? tiwlan_drv.ko was not there so I downloaded it sepparately. do I need some more modules to be added? using stock 4 file engineering FW Android 5.0.1

TWRP backup over ADB not working

I am trying to execute a TWRP backup over adb via
Code:
adb backup --twrp
I get the prompt:
"Now unlock your device and confirm the backup operation..."
But nothing happens on the phone.
Android Debug Bridge version 1.0.39
TWRP version - 3.2.1-0
I have tried switching USB cables, charging the phone to 75% (per a thread I read), and booting the twrp.img from fastboot (instead of the flashed recovery).
I tried setting my desktop backup password in Developer options per this post https://forum.xda-developers.com/showpost.php?p=29403015&postcount=288 but no luck.
I also tried enclosing the backup command parameter(s) in single quotes per this posthttps://stackoverflow.com/a/41083851 also no luck.
Based on a comment in this video https://www.youtube.com/watch?v=clBVD6QOpRQ, I checked the contents of the "backup.ab" file that gets generated when I execute the command:
/sbin/sh: /system/bin/bu: not found
Why are you trying to make a backup this way anyways? Why not just use the twrp gui?
I don't have enough free space on my phone (32GB version), and I've had horrible luck getting OTG to work in TWRP. Is there a way to backup to my computer from the TWRP GUI that I'm missing?
Thanks for the question, btw. I probably should have mentioned the reason in the OP.
Did you ever get this to work? I'm in the same situation you were.
I never got this working. I was actually messing with it last night. I mounted /system in TWRP (I tried both ro and rw), and I get a slightly different error message than before:
Code:
linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbolic links encountered
WARNING: linker: error reading config file "/system/etc/ld.config.txt" for "/sbin/busybox" (will use default configuration): error reading file "/system/etc/ld.config.txt": Too many symbolic links encountered
/sbin/sh: /system/bin/bu: not found
I thought I might be onto something, because I had busybox installed in the default location where ROM Toolbox puts it (/system/xbin). However, after moving it to /sbin, I get the same error message.
While in TWRP, if I run the following (in adb shell):
Code:
cat /system/etc/ld.config.txt
I get
Code:
cat: /system/etc/ld.config.txt: Too many symbolic links encountered
However, if I reboot into Android and run the same command, I get the contents of the file.
Just to close the loop on this, this issue appears to be resolved as of TWRP 3.3.0.0.
This isn't resolved even in twrp 3.3.1-5 for me, and i found this
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/877#issuecomment-289128732
To clear up any confusion, the 3.3.0.0 update works for me, but on the Pixel 3, not the OG Pixel.

"No such file or directory" if tried run binary file in TWRP

I need to run a binary file, dalvikvm which located in /system/bin from TWRP terminal, but no matter what, it says, "No such file or directory found", and then I found that this is link file located another directory, I cd'd there and tried, but still the same result
I can be able to run the same file in Termux without any issues
Can anybody please help me on this?
Thanks
Hi, I think you need to mount the system partition before being able to access it. It's not mounted by default on TWRP, but when the phone is on it is (otherwise Android wouldn't work)
If you need help on how to mount partitions on TWRP, ring me (or google it, it's actually pretty simple)
Raiz said:
Hi, I think you need to mount the system partition before being able to access it. It's not mounted by default on TWRP, but when the phone is on it is (otherwise Android wouldn't work)
If you need help on how to mount partitions on TWRP, ring me (or google it, it's actually pretty simple)
Click to expand...
Click to collapse
Thanks for replying, it wasn't mounted at first, so I had mounted, still it didn't work, while some of the files in bin do work, some don't.
Then I copied the file to /sdcard and /tmp, and tried execute from these folders, still
Well, if when you're free, can you confirm if it's running on yours?
File: /system/bin/dalvikvm
Thanks once again
mizzunet said:
Thanks for replying, it wasn't mounted at first, so I had mounted, still it didn't work,
...
Thanks once again
Click to expand...
Click to collapse
I didn't found it inside, but it may be because I'm not rooted.
While searching around I've found this :
No such file or directory while running dalvikvm
I built AOSP Android and push the dalvik virtual machine in my device just to see if my built dalvik vm runs properly. I pushed it my device /opt directory but when I run dalvikvm, I get the error...
stackoverflow.com
It might get you out of trouble
Raiz said:
I didn't found it inside, but it may be because I'm not rooted.
While searching around I've found this :
No such file or directory while running dalvikvm
I built AOSP Android and push the dalvik virtual machine in my device just to see if my built dalvik vm runs properly. I pushed it my device /opt directory but when I run dalvikvm, I get the error...
stackoverflow.com
It might get you out of trouble
Click to expand...
Click to collapse
I looked into it.
I had no opt folder in root directory. So I made one, and moved dalvikvm to there and tried execute this time, it said permission denied, so I gave it chmod 755. But after that, it says "there no such file or directory".
Well, do you telegram account, so I could contact you there.
Thanks
Raiz said:
I didn't found it inside, but it may be because I'm not rooted.
While searching around I've found this :
No such file or directory while running dalvikvm
I built AOSP Android and push the dalvik virtual machine in my device just to see if my built dalvik vm runs properly. I pushed it my device /opt directory but when I run dalvikvm, I get the error...
stackoverflow.com
It might get you out of trouble
Click to expand...
Click to collapse
And even "file" binary, it says, there no file.
mizzunet said:
I looked into it.
I had no opt folder in root directory. So I made one, and moved dalvikvm to there and tried execute this time, it said permission denied, so I gave it chmod 755. But after that, it says "there no such file or directory".
Well, do you telegram account, so I could contact you there.
Thanks
Click to expand...
Click to collapse
This is really curious, tbh I'm not an expert around that subject, idk what's wrong with this binary...
Hopefully someone who knows more may help you with that. Have a nice day
This is because the binary you are trying to execute was compiled to run in the Android context, but you're trying to execute it in the TWRP one. Each binary has a path to a linker used during execution. The problem is that it refers to a linker that doesn't exist in TWRP.
Suppose we want to execte a binary file and obviously we can't:
Bash:
x00h:/ # /system/bin/awk
/sbin/sh: /system/bin/awk: No such file or directory
Let's take a look to its linker:
Bash:
x00h:/ # strings /system/bin/awk | head -n 1
/system/bin/linker64
Then, you will actually discover that it's sym linked to a linker that is available only when Android is running:
Bash:
x00h:/ # ls -ald /system/bin/linker64
lrwxr-xr-x 1 root shell 38 2009-01-01 00:00 /system/bin/linker64 -> /apex/com.android.runtime/bin/linker64
Since TWRP comes with its linker in /sbin/linker64, we can sym link it to /system/bin/linker64.
So, the hack:
Bash:
x00h:/ # mkdir -p /apex/com.android.runtime/bin/
x00h:/ # ln -s /sbin/linker /apex/com.android.runtime/bin/linker
x00h:/ # ln -s /sbin/linker64 /apex/com.android.runtime/bin/linker64
Retry, and it works:
Bash:
x00h:/ # /system/bin/awk
usage: /system/bin/awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
Pray to God the TWRP's linker will be compatible and do the job (most binaries works fine), but sometimes you may get CANNOT LINK EXECUTABLE.

[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