lineageos – I Can’t Get Root Back After Trying To Modify The Hosts File

I have a Motorola Edge (regular not +) running LineageOS 17.1 (20210528). I had it rooted and decided I wanted to use the hosts file for ad blocking. I couldn’t figure out how to get the OS to allow me to modify the host file. While I was doing so, I somehow corrupted to OS and couldn’t boot into it. That was easily fixed by flashing the the OS, but now I can’t get root back. When I reboot after I flash the Magisk patched boot.img (to both partitions), I get “Can’t load Android system. Your data maybe corrupt…” (This happens when I try to boot into both partitions). Before I see the error message, it goes into a bootloop for a few minutes.

Thanks

lineageos – Xiaomi Mi A2 + Lineage OS 11 = no mobile network internet

I have an Xiaomi Mi A2 with Lineage OS 11 installed.

Calls, texts and wifi work fine but switching off wifi or moving out of range of router results in loss of internet, i.e. my mobile network does not kick in.

I have tried reinserting sim and toggling aeroplane mode with no results.

Putting the sim back in my old phone and the internet works fine,

Any ideas?

Thanks

twrp – Device stuck in boot animation after reverting to LineageOS 17.1

I tried to update my OnePlus One to LineageOS 18.1, following my usual procedure:

  • do a full backup (boot, system, data excl. storage, cache) with TWRP
  • then flash the new image, along with the zip files Magisk and microG

As I then noticed that Android 11 breaks some of the apps I use, I decided to roll back the update by simply booting into recovery, restoring the backup and rebooting. However, this failed with the system being stuck in the boot animation for significantly above 10 minutes.

I then tried the following:

  • boot into TWRP
  • flash LineageOS 17.1 from the previous image I had installed (plus Magisk and microG)
  • restore my backup
  • wipe caches

Still no joy, I am still stuck in the boot animation.

Suspecting the upgrade had converted some app data in /sdcard/Android/data, I moved all app dirs starting with com.android or org.lineageos off the device. (The rest should be user app data. I do not have Google Play services installed.)

That still was not successful, I am still stuck in the startup sequence.

I have never (knowingly) encrypted any data on the device.

What gives? How can I find out where the device gets stuck, so I can hunt the error down? Wiping all user data is not an option.

battery life – Making LineageOS even more lightweight

Smartphones are very powerful and versitile machines. They have useful hardware and fit almost everywhere.

As many of us surely do, I have owned more than 5 smartphones (I started in 2014). Now, it is a shame to not use old hardware at all, and LineageOS is doing a great effort on keeping smartphones as up-to-date as possible. I am using an old Galaxy S5 mini with LOS-GAPPS-free as a wireless touchpad. 🙂

It is nice, but I’d like the battery to last more than a day. (In flight-mode, with the screen off, the s5-mini achieves more than a week of battery life!! remember this is w/o GAPPs!)

How cool would it be to have an old device be your PC’s touchpad and last over a week?!!

It all boils down to the processes that are active.

My device is rooted and I have Termux. There I can run

$ su
# htop

and see that the device is running 83 processes (!).

These are the processes ordered by RAM-consumption:

  1  (||||                                                    5.6%)   Tasks: 83; 1 running
  2  (|||||||||                                              13.6%)   Load average: 2.92 2.41 2.25
  3  (|||||                                                   7.1%)   Uptime: 08:41:45
  4  (||                                                      1.2%)
  Mem(||||||||||||||||||||||||||||||||||||||||||||||||||473M/1.23G)
  Swp(                                                    0K/1024M)

VIRT   RES   SHR S CPU% MEM%   TIME+  Command
349M  213M  182M S  6.1 17.0 10:40.71 system_server
942M   98M 64496 S  0.0  7.8  2:07.61 com.android.systemui
898M 73096 53764 S  0.0  5.7  0:12.71 com.android.launcher3
869M 70724 48804 S  7.9  5.5  0:28.07 com.termux
001M 69448 59892 S  0.0  5.4  0:04.49 zygote
850M 66664 49636 S  0.0  5.2  0:06.64 com.android.inputmethod.latin
858M 58840 45960 S  0.0  4.6  0:04.01 com.android.phone
841M 58288 43200 S  0.0  4.5  0:02.12 com.topjohnwu.magisk
824M 53216 41948 S  0.0  4.1  0:02.28 com.joshsera
828M 51044 38292 S  0.0  4.0  0:29.72 android.process.media
833M 49820 37400 S  0.6  3.9  4:57.86 com.android.nfc
827M 45232 35236 S  0.0  3.5  0:00.38 com.android.deskclock
824M 42824 33144 S  0.0  3.3  0:00.29 com.android.calendar
827M 42032 32384 S  0.0  3.3  0:00.30 org.lineageos.lineageparts
824M 41924 32244 S  0.0  3.3  0:00.25 com.android.traceur
820M 41364 31636 S  0.0  3.2  0:00.40 com.android.settings.intelligence
824M 40452 30620 S  0.0  3.1  0:00.24 org.lineageos.audiofx
822M 39488 29944 S  0.0  3.1  0:00.26 org.lineageos.lockclock
818M 38960 29456 S  0.0  3.0  0:00.21 com.android.keychain
820M 38836 29092 S  0.0  3.0  0:00.21 com.android.se
817M 38252 28512 S  0.0  3.0  0:00.19 com.validity.fingerprint
005M 29012 19480 S  0.0  2.3  0:00.14 webview_zygote
9248 12664  9816 S  0.0  1.0  0:00.97 /system/bin/gpsd -c /system/etc/gps.xml
9304 12476  8460 S  3.6  1.0  2:08.56 /system/bin/surfaceflinger
1136 12120  9208 S  0.0  0.9  0:01.16 /system/bin/audioserver
6084 10360  8172 S  0.0  0.8  0:00.78 /system/bin/mediaserver
1004  9964  5780 S  0.0  0.8  0:00.70 /vendor/bin/hw/rild
4364  8812  5732 S  0.0  0.7  0:01.09 media.codec hw/android.hardware.media.omx@1.0-service
8556  8444  6200 S  0.0  0.7  0:00.50 media.extractor aextractor
0856  6708  4884 S  0.0  0.5  0:00.37 /vendor/bin/hw/android.hardware.camera.provider@2.4-service.kminilte
8504  6040  4656 S  0.0  0.5  0:00.27 /system/bin/drmserver
8300  6004  4656 S  0.0  0.5  0:00.26 media.metrics diametrics
6864  4288  1340 S  0.0  0.3  0:36.68 /system/bin/logd
2432  4028  3180 S  0.0  0.3  0:00.15 /system/bin/keystore /data/misc/keystore
1644  4016  3244 S  0.0  0.3  0:00.10 /vendor/bin/hw/android.hardware.drm@1.0-service
5596  3920  2680 S  0.0  0.3  0:00.44 /system/bin/vold --blkid_context=u:r:blkid:s0 --blkid_untrusted_context=u:r:blkid_untrusted:s0 --fsck_c
6320  3476  2628 S  0.0  0.3  0:00.59 /system/bin/netd
8008  3456  2740 S  0.0  0.3  0:01.03 /system/bin/vcsFPService
9616  3444  2792 S  0.0  0.3  0:01.14 /vendor/bin/hw/hostapd
2012  3400  2616 S  0.0  0.3  0:00.64 /system/bin/statsd
9484  3356  2588 S  0.0  0.3  0:00.65 /system/bin/hwservicemanager
9568  3324  2684 S  0.0  0.3  0:00.64 /vendor/bin/hw/android.hardware.wifi@1.0-service
6512  3312  2604 S  0.0  0.3  0:00.44 /system/bin/gatekeeperd /data/misc/gatekeeper
1808  3236  2620 S  0.0  0.3  0:00.08 /vendor/bin/hw/android.hardware.gnss@1.0-service
5320  3132  2068 S  0.0  0.2  0:01.60 /system/bin/installd
2796  3112  2240 S  0.0  0.2  0:15.73 /system/bin/storaged
0096  3048  2364 S  0.0  0.2  0:00.08 /system/bin/mediadrmserver
8368  3028  2392 S  0.0  0.2  0:00.07 /vendor/bin/hw/android.hardware.keymaster@3.0-service
9284  2964  2296 S  0.0  0.2  0:00.07 /system/bin/wificond
1672  2856  2116 S  0.0  0.2  0:00.07 magiskd
7572  2572  2024 S  0.0  0.2  0:00.06 /vendor/bin/hw/android.hardware.cas@1.0-service
0020  2568  1988 S  0.0  0.2  0:00.06 /system/bin/incidentd
8308  2472  1936 S  0.0  0.2  0:00.06 /system/bin/thermalserviced
7204  2412  1896 S  0.0  0.2  0:00.05 /vendor/bin/hw/vendor.lineage.touch@1.0-service.samsung
6848  2408  1716 S  0.0  0.2  0:00.09 /data/data/com.termux/files/usr/bin/bash -l
5856  2404  1200 S  0.0  0.2  0:03.80 /system/bin/dnsmasq --keep-in-foreground --no-resolv --no-poll --dhcp-authoritative --dhcp-option-force
7012  2376  1900 S  0.0  0.2  0:06.52 /system/bin/healthd
7228  2372  1864 S  0.0  0.2  0:00.05 /vendor/bin/hw/vendor.lineage.trust@1.0-service
7628  2312  1780 S  0.0  0.2  0:00.28 /vendor/bin/hw/android.hardware.graphics.allocator@2.0-service
5780  2284  1332 R 10.3  0.2  1:13.78 htop
3028  2252  1324 S  0.0  0.2  0:02.97 /init
6880  2216  1720 S  0.0  0.2  0:00.04 /vendor/bin/hw/android.hardware.memtrack@1.0-service
6876  2212  1716 S  0.0  0.2  0:00.04 /vendor/bin/hw/android.hardware.ir@1.0-service
7568  2156  1648 S  0.0  0.2  0:00.06 /vendor/bin/hw/android.hardware.configstore@1.1-service
9340  2136  1608 S  0.0  0.2  0:00.04 /system/bin/perfprofd --binder
8128  2064  1592 S  0.0  0.2  0:17.77 /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.0-service
5916  2048  1192 S  0.0  0.2  0:00.12 /system/bin/ip6tables-restore --noflush -w -v
6744  2040  1584 S  0.0  0.2  0:00.04 /vendor/bin/hw/android.hardware.usb@1.0-service.basic
6688  2012  1572 S  0.0  0.2  0:00.11 /system/bin/hw/android.hidl.allocator@1.0-service
6416  1956  1404 S  0.0  0.2  0:01.37 /system/bin/servicemanager
5908  1912  1180 S  0.0  0.1  0:00.13 /system/bin/iptables-restore --noflush -w -v
1160  1720  1204 S  0.0  0.1  0:00.29 /system/bin/mcDriverDaemon -r /system/app/FFFFFFFF000000000000000000000001.drbin -r /system/app/mcRegis
5904  1692  1264 S  0.0  0.1  0:00.02 /vendor/bin/vndservicemanager /dev/vndbinder
4516  1580  1160 S  0.0  0.1  0:00.03 /system/bin/sh
4992  1544  1148 S  0.0  0.1  0:00.74 /system/bin/logcat -s Magisk
6348  1528  1160 S  0.0  0.1  0:00.41 /sbin/cbd -d -t ss222 -b m -m m
4884  1460  1120 S  0.0  0.1  0:00.10 /system/bin/lmkd
6668  1424  1072 S  0.6  0.1  0:02.13 /sbin/su
4680  1420  1076 S  0.0  0.1  0:00.03 /system/bin/tombstoned
4568  1164   760 S  0.0  0.1  0:01.13 /sbin/ueventd
3544   960   532 S  0.0  0.1  0:00.01 /init subcontext u:r:vendor_init:s0 9
3416   952   532 S  0.0  0.1  0:00.00 /init subcontext u:r:vendor_init:s0 10
6936   436   316 S  0.0  0.0  0:00.04 /system/bin/adbd --root_seclabel=u:r:su:s0

I certainly don’t need that for a touchpad!
(I’ll try to post sceenshots)

So:

How can I minimize the power footprint of my LOS?


I have used Link2SD to deinstall and deactivate software and features in devices before to save machine-resources. It gives the option to Freeze as well, but many times, I have an annoying message that appears every 3 seconds about an app crashing. Like telephony. My smatphone-touchpad doesn’t need telephony or gps services running. I would happily turn them off if the OS would stop annoying me about it being off and rebooting to recovery by itself!


I have come across this xda-post
https://forum.xda-developers.com/t/rom-unofficial-11-r-lineageos-18-1-for-z5c-suzuran.4205135/#post-84135891

and it seems to lead to the right direction.

Does anyone here has experience with something like this? Which apps are the ones I can disable?

aosp – How to update a self built LineageOS without redownloading/rebuilding all the sources?

I have been able to successfully build LineageOS 17.1 for my (unsupported officially) smartphone and I have self signed the build one month ago.
I would like to rebuild it with this month’s new updates, without having to redownload/rebuild everything that had not been changed.
To build it I did:

repo init -u git://github.com/LineageOS/android.git -b lineage-17.1
created .repo/local_manifests/roomservice.xml with all the device specific code
repo sync
Extracted the proprietary blobs
launched lunch to set up my device
make -j8 bacon
mka target-files-package otatools
signed the zip

What should I do to avoid fully redownloading and rebuilding everything? Is it enough running repo sync, mka target-files-package otatools and signing the new zip? Is there something I should do to clean up from the previous build?

Black screen when opening a random camera app on Galaxy S7 Edge on LineageOS 18.1

Since last week I upgraded my Samsung Galaxy S7 Edge from Samsung’s stock firmware to LineageOS 18.1 by using this message of the XDA forum and installed the “full” edition of NicGApps. Since yesterday the camera does not work any time, which is a behavior I never experienced on the stock Samsung firmware at all. When I open the camera app the screen is black. Also, when I change to the front facing camera. The only temporary solution is to reboot my device and everything works again.

During these two days, I rebooted my device three times, and that cannot be the intention. I tried this with several apps: OpenCamera, Footej Camera, the QR Code scanner of my banking app, all the same and as I wrote, after a reboot everything runs normal again. Does someone know a permanent solution?

lineageos – sftp to lineage

In lineage 17.1 I installed the app SSH server (by Banana Studio, from Play store).
When starting and accessing by my PC (smartphone and PC are in WiFi) via sftp -P 2222 myuser@192.168.0.7 I see no files there, but there are photos in the smartphone folder /storage/emulated/0/DCIM/Camera.
When doing cd storage the connection is closed. My PC has ubuntu 18.04.

lineageos – Custom ROM always stucks in bootloop

I have lenovo K3 Note (k50a40) device. I am trying to flash custom ROM. I tried several for my device Lineage OS 14, 15.1, 15.2 . But after installing, on reboot it always stuck on lenovo logo. But when I install my stock ROM it starts working again.

Should I keep trying new ROM’s or is something wrong with my device.

Stuck in bootloop after flashing ROM doesn’t answer my question, because I know how can I recover from bootloop. I just want to know how can I flash ROM and avoid bootloop.

9.0 pie – OpenGapps problem in Redmi 4X with LineageOS

I am running LineageOS 16 on a Redmi 4X device.

I tried installing the relevant opengapps pico version selecting ARM64 and Android 9.

I booted to TWRP, selected install and clicked on the opengapps zip file. It installed successfully with absolutely NO error code whatsoever. I then cleared Dalvik/cache(TWRP menu after installing opengapps) and rebooted to system.

I ran through setup and it all finished smoothly. I can install apps from the play store and all services too are working.

However this keeps happening and android says that setup keeps crashing.

However this keeps happening and android says that setup keeps crashing.

I then redownloaded the opengapps zip again,rebooted to TWRP and installed it again. There was no error message. This time I booted to system without clearing Dalvik/Cache.

I ran through setup again. Everything happened properly, all my google stuff is working but again this setup screen keeps reappearing and Android keeps saying that setup keeps crashing.

crashes right after this screen when i click not now
It crashes right after this screen when I click not now.

Even now this notification is always present in the notification bar.
All my google apps are working but this is still in the notification bar!!

Surprisingly all my google apps are still working perfectly including play store,gmail,classroom. I can also call, get messages and do everything else a phone is supposed to do.

This thread talks about bootloop which is definitely NOT my issue. I didn’t find any other thread related to santoni+lineageos16.

This is how I went about rooting my device.

I don’t know how to obtain android system logs/logs relevant to opengapps so I am unable to post any of them. I will really appreciate any help I get since this is becoming quite annoying.