LG2 install lineages OS 17.1 - G2 General

Hi ,
I have a LG2 D802 with lollipop.
I try to install lineage OS 17.1 with TWRP and I have an error.
The updater-script does :
assert(run_program("/sbin/sh", "-c", "aboot=`strings /dev/block/platform/msm_sdcc.1/by-name/aboot | grep mdss_mdp.panel=`; if [ -z \"$aboot\" ]; then exit 1; fi") == 0 || abort("Wrong Aboot version, please update!");
But the command shell strings doesn't exit on my phone. I checked that myself with adb prompt.
Mayby I can remove this script line.
Does someone know how check that my aboot is ok for lineage OS 17.1 ?
I noticed that lineage OS 17.1 flash the boot partition, so I would like to be sur that aboot can launch it.
To give more informations I used LGG2-D80230d-OneClickRootRecovery to root and install TWRP on my phone.
LGG2-D80230d-OneClickRootRecovery has flashed aboot , laf , and boot partitions.
Thanks.

Related

Weird brick, maybe Hard-Brick,need help.

I had a couple of times before the problem with random format of partitions and last time with restarts after install any app on AOSP 5.0 by artas182x.
Last time partition /recovery /system and maybe /data was formatted so i flash cwm by fastboot then i flash other 5.0.x based cm by cwm and next day when i flash official gapps mini for android 5.0.x from xda, after restart...
Phone stuck on LG logo and i can't enter in fastboot or do anything... (i don't see security error or anything like that):crying:
vol- home power = not working
vol+ home power = not working
phone without batery is recognized as "Texas Instruments, Inc." (I'm working on ubuntu)
I tried to use this script but it does not work. (still scanning usb devices and waiting for phone response )
Can anyone here help me ?
"# simple menu script by wkpark at gmail.com (found in omapboot-for_optimus-v1.21)
# uses x.img and u.img from
#*********(i can't post links)
which fastboot || echo install fastbooot first, e.g. on ubuntu sudo apt-get install android-tools-fastboot
which fastboot || exit
echo 'Connect LG L9 *without battery* to PC using data cable'
sudo ./usbboot p940-aboot.2nd p940-u-boot_fastboot.bin && echo usbboot ok || exit
echo 'DO NOT disconnect usb cable. Insert battery, then press enter'
read x
sleep 10
echo fastboot devices:
sudo fastboot devices
echo flashing bootloader
sudo fastboot flash u-boot u.img && sudo fastboot flash x-loader x.img && sudo fastboot reboot && echo Everything OK, rebooting phone"

Help building Samsung recovery image from boot.img using install-recovery.sh

Trying to build the recovery image from the stock boot.img using the script in install-recovery.sh:
#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/platform/dw_mmc.0/by-name/RECOVERY:7708672:f604ede5ef4f7e94b3381cd7f156488ccc10a9ae; then
applypatch EMMC:/dev/block/platform/dw_mmc.0/by-name/BOOT:7497728:9dfe8bcc465662a98e8e76d6e52000faa7f5ef64 EMMC:/dev/block/platform/dw_mmc.0/by-name/RECOVERY f604ede5ef4f7e94b3381cd7f156488ccc10a9ae 7708672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:/system/recovery-from-boot.p && log -t recovery "Installing new recovery image: succeeded" || log -t recovery "Installing new recovery image: failed"
else
log -t recovery "Recovery image already installed"
fi
From the stock firmware I have pushed boot.img, recovery-from-boot.p, install-recovery.sh and recovery-resource.dat to /data/local/tmp on my Samsung tablet.
Then do:
adb shell
cd /data/local/tmp
applypatch boot.img:7497728:9dfe8bcc465662a98e8e76d6e52000faa7f5ef64 recovery.img f604ede5ef4f7e94b3381cd7f156488ccc10a9ae 7708672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:recovery-from-boot.p
However after running this all I get is:
8672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:recovery-from-boot.p <
1|[email protected]:/data/local/tmp $
This just creates a 0k/b file named CON and nothing else.
Does anyone have idea where I'm going wrong here?
It seems, I'm having issues with Sha1of the boot.img or the actual boot image itself as it works when I use the path to the actual boot partition.
Does anyone have idea where I'm going wrong here or a solution, a different applypatch binary maybe?
.
ashyx said:
Trying to build the recovery image from the stock boot.img using the script in install-recovery.sh:
#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/platform/dw_mmc.0/by-name/RECOVERY:7708672:f604ede5ef4f7e94b3381cd7f156488ccc10a9ae; then
applypatch EMMC:/dev/block/platform/dw_mmc.0/by-name/BOOT:7497728:9dfe8bcc465662a98e8e76d6e52000faa7f5ef64 EMMC:/dev/block/platform/dw_mmc.0/by-name/RECOVERY f604ede5ef4f7e94b3381cd7f156488ccc10a9ae 7708672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:/system/recovery-from-boot.p && log -t recovery "Installing new recovery image: succeeded" || log -t recovery "Installing new recovery image: failed"
else
log -t recovery "Recovery image already installed"
fi
From the stock firmware I have pushed boot.img, recovery-from-boot.p, install-recovery.sh and recovery-resource.dat to /data/local/tmp on my Samsung tablet.
Then do:
adb shell
cd /data/local/tmp
applypatch boot.img:7497728:9dfe8bcc465662a98e8e76d6e52000faa7f5ef64 recovery.img f604ede5ef4f7e94b3381cd7f156488ccc10a9ae 7708672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:recovery-from-boot.p
However after running this all I get is:
8672 9dfe8bcc465662a98e8e76d6e52000faa7f5ef64:recovery-from-boot.p <
1|[email protected]:/data/local/tmp $
This just creates a 0k/b file named CON and nothing else.
Does anyone have idea where I'm going wrong here?
It seems, I'm having issues with Sha1of the boot.img or the actual boot image itself as it works when I use the path to the actual boot partition.
Does anyone have idea where I'm going wrong here or a solution, a different applypatch binary maybe?
.
Click to expand...
Click to collapse
Should work with the system binary with the ld path prefix. Makes sure your script is using LF line endings and the spaces are spaces (I've had this happen from bad copy/pastes before), and double check the syntax on my Complete Shell Zip Replacement thread.

modifications in system.img ignored after flashing

Hi All,
I slightly modified system.img (details below), flash it, boot and none of my changes can be seen. It would be great if some expert could give me a hint on what I oversee here.
In detail: the device is a Sony XA2 and it was flashed successfully with AOSP Oreo 8.1 before. My approach worked on another mobile with 4.4 before, so I copied it.
What I've done: I unpacked the original system.img with simg2img, mounted it, modified a simple text file by adding a comment line (nothing crucial), pack it again with ext2simg and flash the new file. The commands were
> simg2img system.img system_unfold.img
> sudo mount -t ext4 -o loop system_unfold.img system
# modify...
> ext2simg -v system_unfold.img system_new.img
and then flashed it back via
> fastboot flash system system_new.img
Flashing worked in general, e.g. for AOSP Oreo 8.1. (also to slot A). Only the modified system_new.img does not lead to different files in /system
Any ideas?
Many Thanks!

Android root on FydeOS?

Is there any way to root the Android subsystem on FydeOS? I'm new to Chromium OS and I don't know all the ins and outs. I do know, however, that there's this way to root Android on Chrome OS. Does it also work on FydeOS? If not, is there any other relatively simple way to root?
I tried to run sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions $(( $(rootdev -s | sed -r 's/.*(.)$/\1/') - 1)), but I got a message saying that I don't have developer firmware.

[Root] Check root and reboot recovery mode (script?)

I have a samsung A50 stock rooted (Magisk + TWRP).
But Now, on the Android rooted, you mustn't reboot your device otherwise you lost you root.
You must only reboot in the recovery mode or just shutdown your device.
But it's a probleme. Because I often forget about this problem and I reboot and lose my root.
And, I use my phone without realizing that my afWall firewall (root only) is disabled for example.
So I am looking for a solution to detect at startup if my phone is rooted, and if it is not, restart it automatically in the recovery mode.
I think maybe a sh script could do this but I don't know how or where to put it to boot.
Thank you very much
laclac said:
I have a samsung A50 stock rooted (Magisk + TWRP).
But Now, on the Android rooted, you mustn't reboot your device otherwise you lost you root.
You must only reboot in the recovery mode or just shutdown your device.
But it's a probleme. Because I often forget about this problem and I reboot and lose my root.
And, I use my phone without realizing that my afWall firewall (root only) is disabled for example.
So I am looking for a solution to detect at startup if my phone is rooted, and if it is not, restart it automatically in the recovery mode.
I think maybe a sh script could do this but I don't know how or where to put it to boot.
Thank you very much
Click to expand...
Click to collapse
Testing for a rooted Android is difficult to do, it is almost impossible if Android is rooted via Magisk.
I don't really write a script but it is not possible to have:
Code:
try{
cd "/system/"
}catch (e){
#no root
shutdown();
}
@laclac
2 examples useable in a SH-script:
Code:
if [ "$(whoami)" == "root" ] ; then
# you are root
if [ -f "/system/bin/recovery" ]; then
$(/system/bin/reboot recovery)
fi
else
# you are not root
fi
Code:
if [ "$(id -u)" -eq 0 ]; then
# you are root
if [ -f "/system/bin/recovery" ]; then
$(/system/bin/reboot recovery)
fi
else
# you are ordinary user
fi
BTW:
You also may use this JAVA script as template:
https://github.com/rickyazhari/root...a/com/neki/rootchecker/RootCheckerPlugin.java
Can easily be rewrittten as SH script, IMO.

Categories

Resources