okay, maybe I gave bad advice. you can add your own block of code, but do not add lines in other blocks (for now). as you can clearly see line 17 - 33 is one code block 
Last edited:
on
condition can exist multiple times. we might change it to late-init
later..Still getting same boot-loopyou could try to getdmesg
as early as possible, but there is nothing mounted so no idea where to save log. lets try cache partition. you need to pack some files in boot ramdisk
https://topjohnwu.github.io/Magisk/guides.html#root-directory-overlay-system
myscript.sh
(magisk patched boot.img required for overlay.dCode:#!/system/bin/sh /system/bin/dmesg -w >> /cache/recovery/dmesg.log
or
modifyinit.rc
directly, place myscript somewhere else and hardcode path)
Code:on early-init start myservice service myservice /sbin/myscript.sh oneshot
edit: both is needed, any .rc file and any .sh file, which then execute dmesg (it's like logcat) I hope it's not too confusing.
next you can get a copy of cache.bin and loop mount (you have done it before). if you find
yes, of course you get same boot-loop. this modification is intended to write dmesg log to cache partition,
RestoredIn case you bricked just restore backup boot.img and go for logs incache
partition. loop mount the partition image
Bash:mkdir ~/cache sudo -H mount -t ext4 -o loop,ro,noexec,noload,noatime ./cache.img ~/cache sudo -H thunar ~/cache
boot.bin
and ran the commands given above./dev/loop?
insert the correct loop device displayed in the previous command.sudo
for running commands with root privileges)losetup -vf cache.img
losetup -a
mount -t ext4 -vo loop,ro,noexec,noload,noatime /dev/loop? ~/cache
failed to setup loop device - try to setup manually, then mount the loop device. it's purely linux error shoud not happen. for/dev/loop?
insert the correct loop device displayed in the previous command.
(use prefixsudo
for running commands with root privileges)
Code:losetup -vf cache.img losetup -a mount -t ext4 -vo loop,ro,noexec,noload,noatime /dev/loop? ~/cache
"Setup manually ? Mount the loop device ? Insert the correct loop device? "
I am sorry, didn't get even a single thing.I am a complete novice in the field of Linux and don't understand the terms being used.I love learning new stuff and I have learnt a lot in past few months.Though I adapt quickly ,at this point of time I am occupied with so many things and unable to give my time and focus to learn Linux stuff.It has already been 6 months and I desperately need to retireve my data.I am starting to lose hope."use prefix sudo for running commands with root privileges"
.How would we know which command to be run with sudo
?cd ~/Desktop
sudo losetup -vf cache.bin
losetup -a
cd
into correct directory.Hello, I ranafter myscript.sh was executed from myservice (modified init.rc) you must dump cache partition off device again, as this is the target where the dmesg log is suppposed to saved from myscript.sh
./edl.py r cache cache.img
and that dumped cache.img
inside edl folder
.cache.img
to Desktop
and ran following commandsmkdir ~/cache
sudo -H mount -t ext4 -o loop,ro,noexec,noload,noatime ./cache.img ~/cache
sudo -H thunar ~/cache
/home/optimus/cache/
.cache.img
on Windows,it displayed 7 folders.recovery
folder or create an archive.on early-init
start myservice
service myservice /sbin/myscript.sh
seclabel u:r:init:s0
user root
group root
oneshot
disabled
on early-init
start myservice
service myservice /sbin/myscript.sh
seclabel u:r:magisk:s0
user root
group root
oneshot
disabled
Recovery files I shared were extracted on Windows.How do you obtain these files on Linux where it doesn't let you movemaybe enable View - Show Hidden Files will show all 7 directories.creating dmesg.log was not successful, there is no such file.
recovery
folder or create an archive citing you don't have the right permissions
?fastboot boot
command and dump partitions from adb pull
, otherwise dump from edl.py.fastboot oem adb_enable
fastboot continue
adb logcat > logcat.log
fastboot oem adb_enable
requires unlocked bootloader.boot.img
from Qualcomm HS-USB QDLoader 9008 EDL mode if you have deep flash cable or figure out test point./
with proper path on disk or cd
into directory. home directory ~
might run out of disk space)mkdir ~/tmp
cp -v ./prog_emmc_firehose_8953_ddr.mbn ~/tmp
cd edl
python3 ./Loaders/fhloaderparse.py ~/tmp Loaders
python3 ./edl.py printgpt
python3 ./edl.py r boot boot.img
python3 ./edl.py r system system.img
python3 ./edl.py r cache cache.img
python3 ./edl.py r metadata metadata.bin
python3 ./edl.py r devinfo devinfo.bin
python3 ./edl.py r userdata userdata.img
python3 ./edl.py r ...
default.prop
in boot.img ramdisk with AIKro.debuggable=1
ro.adb.secure=0
ro.secure=0
persist.sys.usb.config=mtp,adb
image-new.img
(which is hopefully AVBv1-signed) back to device and try get logcat while booting android (might brick your device)python3 ./edl.py w boot image-new.img
python3 ./edl.py reset
adb logcat '*:W' -b all | tee ~/logcat.txt
cache
partition. loop mount the partition imagemkdir ~/cache
sudo -H mount -t ext4 -o loop,ro,noexec,noload,noatime ./cache.img ~/cache
sudo -H thunar ~/cache
cd
cd /media/xubuntu/*
# Debian/(X)ubuntu/Mint/etc
sudo apt update
sudo apt install adb fastboot python3-dev python3-pip liblzma-dev git
sudo apt purge modemmanager
sudo systemctl stop ModemManager
sudo systemctl disable ModemManager
sudo apt purge ModemManager
# edl.py (required)
git clone -b 3.52.1 https://github.com/bkerler/edl.git
cd edl
# common firehose programmer collection = factory loaders (optional)
git submodule update --init --recursive
# build + install
python3 setup.py build
sudo python3 setup.py install
sudo cp Drivers/51-edl.rules /etc/udev/rules.d
sudo cp Drivers/50-android.rules /etc/udev/rules.d
lsusb