yashsingh1/xdaforums huggingface dataset:
[LG Leon Questions & Answers] Charles IV:
Ok, on first boot of twrp, i could see internal storage and sd card on my pc, yet it took ages loading to copy to internal, so i used adb push, anyway, after reboot and install twrp app etc, i rebooted to twrp using adb reboot recovery. Now, i cant back up to external sd card because it is mounted read only? It says failed to unmount '/external_sd' (Device or resource busy) and then later cannot create '/external_sd/TWRP' folder (Read-only file system)

I go into mount, Micro SDCard is ticked, yet i cant untick it, all other partitions work.

Any ideas/help?

edit:

i forgot to mention i formatted my sdcard as internal storage

i think it is the aboot - all apps on sdcard have stopped working.

Restoring aboot, but i dont know if that will fix it/ let me into recovery anymore or what

edit:

ive restored aboot.old, but now reboot recovery reboots normally. Im scared to go in through the lg ui

edit:

i went in through lg's ui, and it said boot verification fail, i pulled battery. In the solution, it said the aboot was because the twrp was for c50 not c50n, so I'm swapping back to aboot.bin, and flashing my twrp. even if it is 3.0.2

edit: my twrp didnt work either, it just looks like the aboot wont support sdcards formated as private
[LG Leon Questions & Answers] leechseed:
Looking good, hopefully there will be a bat /exe (or whatever) in future for noobs. :)
[LG Leon Questions & Answers] Wolftein:
Keep in mind that this phone is low budget, its pretty damm slow; mine took like 5-10 minute to restore 2gb of backup.

Regarding ABoot.new is the android bootloader unlocked, without it you will never be able to boot TWRP because of the signature check, if you flash the old Aboot your phone will not be unlocked.
[LG Leon Questions & Answers] Charles IV:
I had to leave it overnight to restore! -_-

Yeah it didn't work, but after going through the flashing process a few times, I managed to do it, and while the SD card doesn't work in twrp, it works properly when booted.

I think I'll try and build twrp, and see if I can edit something to get it to work, probably an fstab problem
[LG Leon Questions & Answers] hokutojm:
I think it's normal that your sd card doesn't work in twrp because format as internal storage is crypted. The best for install supersu / doing some backup is to use another SD card formatted as FAT32.

After supersu installation, you can plug your official SD card and make a normal boot.

If aboot create some problems with apps and private SD card, maybe you can use twrp to install supersu for root permission. After successful root, you can restore your old aboot (your are root so you can use adb su and dd command to change aboot partition).

TWRP is necessary to enable root permissions, after you will not use it (only for backup/restore).
[LG Leon Questions & Answers] Charles IV:
Strange, because i did the same on another phone, and it worked.

I rooted by putting the zip on internal anyway.
[LG Leon Questions & Answers] Charles IV:
could you give me a start on how to do this?

I was looking around, thinking ill give it a shot, but i cant even find anything on how to disassemble aboot, it appears most people stay away from this!
[LG Leon Questions & Answers] j-m-s:
Do not forget to modify 42-usb-lglaf.rules: usb product id for lg leon is missing.

And I cannot get download mode. I see the charging battery symbol, I press and hold "vol up", and then when pressing the power button, the screen goes off, when pressing the power button again the screen goes on.

I think the way described in https://github.com/Lekensteyn/lglaf is wrong.

You have to first press the "vol up" button and then insert the usb cable.

I wonder what this download mode and protocol is. Is it sth. invented by LG?

Another question: would be possible to modify /default.prop in the un-rooted phone, i.e. without flashing anything? The mount command gives me "rootfs / rootfs rw,seclabel 0 0", but "/" is not writeable.
[LG Leon Questions & Answers] Charles IV:
Yup, I found I had to hold vol up, then connect usb cable. I didn't have to edit any rules files though
[LG Leon Questions & Answers] hokutojm:
Download mode is used by "LG Flash Tool" software, I don't how protocol works. Maybe there some difference between LG models and that why lglaf is incorrect, in my procedure I put the correct way to enter in.

About changing default.prop without root, you need to install twrp. With it you can browse system partition and make some copy/paste with external sd card.

I change some options in my prop file to increase volume steps, I use a propeditor application, with root permission it's easy.
[LG Leon Questions & Answers] j-m-s:
I don't want to install twrp or supersu. I want adb root access so I need ro.secure=0 and ro.adb.secure=0.

For this I need to overwrite default.prop, but the root directory is read only.

I wonder if I can change this with the shell access of lglaf.py. Maybe with some mount/remount?
[LG Leon Questions & Answers] Charles IV:
I don't think it's possible then.

Little idea, but I have no idea of it works or how to do it. Maybe you can use the python script to pull the partition (system???), Then then crack open the image (carliv image kitchen???), Then compile it, and reflash it.

Any ideas? I think carliv may just be for boot and recovery, but there's bound to be a tool to do it. Also I'm not sure default. Prop is in the system partition.
[LG Leon Questions & Answers] j-m-s:
I have a nvidia shield tv with abd-root access. If I do "adb root" and then "adb remount", the partitions are remounted with R/W access. Then I can change every file. I do not need to flash anything because I have write access and can change the files as I want.

So I thought if I am root when using lglaf.py it should be possible to mount the file systems with rw. When I run "mount", I get "rootfs / rootfs rw,seclabel 0 0". So it looks like the root directory is r/w, but I cannot write to it.
[LG Leon Questions & Answers] Charles IV:
adb root access is usually disabled, even if you have root.

to get adb root, you need to change the default.prop, or use chainfires app which needs root.

changing the default.prop is hard, even with root.

this python script is very clever, in bypassing lg's defences. I imagine the only way to change the default.prop is to pull the partition, edit it, and push it back.

I was looking around to find where default.prop is stored, and found this, but am not sure if it is true.

This page might help you. It looks like you need to pull the boot partition, change it (im not sure what, but according to the second answer, it appears it can the the build.prop), then repack and flash it. I'm actually going to try this myself, as chainfires app isn't working very well for me.
[LG Leon Questions & Answers] Charles IV:
Do I have to change the size of every recovery i flash, or if i flash it in twrp, do i not need to?
[LG Leon Questions & Answers] leechseed:
COM15 serial port. Thats all i get when i try --debug --list.

Maybe someone is able to put this in an GUI.
[LG Leon Questions & Answers] TheStrongSkye:
Anyone try to root via ADB ?

https://xdaforums.com/showthread.php?t=2684210

Check this out!
[LG Leon Questions & Answers] Leo1590:
I have a error

[QRCODE][QRCODE][/QRCODE][/QRCODE]

[IMG="error"]https://k60.kn3.net/7/5/7/B/6/B/8EB.jpg[/IMG]
[LG Leon Questions & Answers] Marius B:
:rolleyes:

I tried and my phone dont start .

I can see only in control panel like in picturers.

android net usb serial port (com8)

What to do ?
[LG Leon Questions & Answers] ZaInT_:
Exactly the message I am getting. I don't know how to resize partitions on Android without root or parted or fdisk and so on.
[LG Leon Questions & Answers] hokutojm:
Hi, sometimes when COM number is high, download mode commands don't work. You can try to change COM number in Windows device manager and choose a lower numer (COM1-COM6)
[LG Leon Questions & Answers] hokutojm:
Hi, maybe your phone is not exactly the same of mine (h340n updated to marshmallow using official LG rom by WiFi). Perhaps it will work without aboot flash. If it doesn't work you will have an error like “error signature verification” and maybe your phone will not boot.

---------- Post added at 08:02 ---------- Previous post was at 07:59 ----------

Resize partitions is dangerous (and I don't know how to do it easly on android).

Maybe your phone is not exactly the same of mine (h340n updated to marshmallow using official LG rom by WiFi). Perhaps it will work without aboot flash. If it doesn't work you will have an error like “error signature verification” and maybe your phone will not boot.
[LG Leon Questions & Answers] Traky:
I have some problem (picture from device manager in attachment), I tried everything without solution - from this thread https://xdaforums.com/android/general/unbrick-lg-model-download-recovery-t3060184 except shorting test point (dont know which pins).

I do not know if there is a solution.
[LG Leon Questions & Answers] ZaInT_:
Yeah, that's what I got. I'm back on the latest official now, don't even know how but I guess it'll have to be a spare or I'll give it to a friend who needs a burner with internet access lol.
[LG Leon Questions & Answers] sznattila:
Hi,

My findings:

- you need to enable OEM unlock to be able to boot into firmware upload mode (volume up+usb cable)

- when booting into revovery, sometimes the phone boots into safemode instead of recovery.

- twrp still not on the phone no matter how many times and in what combination I tried... (I am using ubuntu - adb can see my phone, fastboot can see my phone, python script can see my phone) - any working solutions, or options to root the device without twrp?

(KIngroot and such solutions don't work on 6.0 on this device... tried them all...)
[LG Leon Questions & Answers] :
Some errors

For some reason i get errors in python

I get either "no handlers for Lglef.py

Or errors about "cryptography"

Can somebody send me a twrp backup of your rooted lg leon 6.0 MM?

(Only system+system image.)
[LG Leon Questions & Answers] Charles IV:
I think I got this, can't remember how I solved it.

Make you you're using the right version of python (2 or 3), but I remember one of the commands would never work for me.

---------- Post added at 07:37 AM ---------- Previous post was at 07:34 AM ----------

I got it working. Make sure you use the modded twrp, and I found it was safer to reboot to recovery from the os (eg twrp app) rather than key combination to make sure you don't accidentally wipe your phone.
[LG Leon Questions & Answers] :
I managed to root my device.
[LG Leon Questions & Answers] sznattila:
Hi,

Please point me to the direction where do I find the modded TWRP?
[LG Leon Questions & Answers] Charles IV:
On page 4 there are instructions to modify it yourself (if I remember correctly you only need to change the file size), and on page 5 someone posted their version.

edit:

original instructions for creating the modified twrp

Wolftein's steps with modded twrp link
[LG Leon Questions & Answers] ZaInT_:
Thread necromancing here, but with the modded files and instructions I finally have root.

I had to find SuperSU on another site though, maybe that should be linked here too.
[LG Leon Questions & Answers] sznattila:
What Android version you had and what was your process?
[LG Leon Questions & Answers] Charles IV:
For me it was Android 6, and I think the method I took was similar to on the third page, can't quite remember
[LG Leon Questions & Answers] gamer4ever35:
Can you plz help me understand some thingss.First : dowload python software step is very hard for me.Which of the files to dowload ( there are two tsg and i think the other ta.xy or something like that ) second : when im trying to execute commands the command prompt cant understand python.what do i do to make the cmd understand the command ???? Sorry im very new to that
[LG Leon Questions & Answers] gamer4ever35:
Anyoneeee?????
[LG Leon Questions & Answers] Charles IV:
Sorry, I forgot to reply.

Downloading python is easy. On linux it's already installed (use the python3 command), and on windows go to https://python.org. It's obvious from there.

For downloading the lglaf thing, just download and extract into a folder.

All the commands are run in cmd. To get cmd to understand python commands I believe there is a checkbox during the installer, but I'm not sure, it's been ages since I've set up python on windows.

Finally you will need to modify the twrp image, and for that you can either do it yourself or I think someone posted their copy somewhere. They're probably on page 4/5.

Finally, just to be sure, this is the post with instructions.
[LG Leon Questions & Answers] woody789:
Will the same instructions work with Cricket LG Risio (c50, LG H-343) running MM 6.0? Especially the part when replacing partitions aboot and recovery? Do I have to download patched aboot.bin for c50? I have all connectivity working with H-343, dumped partitions too to a local PC, downloaded the TWRP for c50, etc.

According to this file I found AndroidDeviceNames/master/json/devices.json (sorry can't post links yet) the H-343 and H-340 are under the same name Leon.

---------- Post added at 06:52 AM ---------- Previous post was at 06:21 AM ----------

My Cricket LG Risio is definitely c50, here's the extract from the bug report:

Build: MRA58K

Build fingerprint: 'lge/c50_crk_us/c50:6.0/MRA58K/162081736f3d4:user/release-keys'

Bootloader: unknown

Radio: msm

Network: (unknown)

Kernel: Linux version 3.10.49-g1f58f7d (lgmobile@LGEACI8R2) (gcc version 4.9.x-google 20140827 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Jul 26 17:45:55 KST 2016

Command line: sched_enable_hmp=1 console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 earlyprintk androidboot.hardware=c50 androidboot.bootdevice=7824900.sdhci vmalloc=508m lge.uart=disable lge.rev=rev_10 model.name=LG-H343 lge.battid=ISL6296_C lge.bootreason=FASTBOOT_mode maxcpus androidboot.mode kswitch androidboot.fota androidboot.fota_reboot gpt androidboot.ddr_size=1073741824 lge.bootreasoncode=0x77665500 lge.hreset=off androidboot.dlcomplete=0 androidboot.verifiedbootstate=green androidboot.emmc=true androidboot.serialno=LGH34381990ba0 qpnp-power-on.warm_boot=1 androidboot.authorized_kernel=true lge.signed_image=true androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_lgd_incellp5_fwvga_video :1:none
[LG Leon Questions & Answers] hokutojm:
First you can try download mode and python script to do an aboot and recovery backup. Check if the files are correctly readed (not empty, something inside).

If procedure doesn't work you can come back to original partition using restore function
[LG Leon Questions & Answers] woody789:
Yep, that part works, both aboot and recovery were able to backup from the phone to the PC. They contain data, checked with Notepad++, aboot is 2048 kB, recovery is 24576 kB.

Is it now safe to flash TWRP only, or is it also necessary to flash the patched aboot.bin as per the original instructions? I don't want to brick the phone though it doesn't have any value for me, but it would be nice to root this phone, since there's no clear manual yet.
[LG Leon Questions & Answers] hokutojm:
The size of your files are exactly the same as mine. If aboot is incorrect, TWRP will not start. But android boot will continue to work. You can normaly go back reflashing backup files using download mode. Don't forget to keep the same file size to upload new recovery.img
[LG Leon Questions & Answers] woody789:
As expected I bricked the LG Risio H343 by using the instructions for Leon. The phone doesn't boot anymore and doesn't display a thing. On the other hand it still seems to be active on USB Serial port COM16, before flashing it was COM6. I think the problem is that I flashed the aboot.bin for c50n instead for c50, and I did it because wouldn't get into the TWRP otherwise. Now when I run "python partitions.py --debug --list" I get this:

C:\Temp\LEON>python partitions.py --debug --list
LAF Crypto failed to import! Error: No module named 'cryptography'
2018-10-28 19:16:45,345 LGLAF.py: DEBUG: Using serial port: COM16
Traceback (most recent call last):
File "partitions.py", line 274, in <module>
main()
File "partitions.py", line 241, in main
comm = lglaf.autodetect_device()
File "C:\Temp\LEON\lglaf.py", line 410, in autodetect_device
return FileCommunication(serial_path)
File "C:\Temp\LEON\lglaf.py", line 263, in __init__
self.f = open(file_path, 'r+b', buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: 'COM16'

Seems like the way forward would be to use LGUP or LGFlashTool and flash some stock ROM, but I can't find necessary h343 DLL file anywhere.

When LGUP tool is run, it doesn't recognize the phone, probably because of the missing DLL file. Says Model: Unknown, Port [COM16,].
[LG Leon Questions & Answers] hokutojm:
Try to change COM port number in Windows and put a lower number. I put a screenshot upper in this thread https://xdaforums.com/showpost.php?p=75044522&postcount=72
[LG Leon Questions & Answers] woody789:
Didn't work, I think the phone is hard bricked, no matter what I tried didn't help. So my conclusion is that these instructions unfortunately don't work for LG Risio H343 c50. I believe that Risio needs a patched aboot in order to be able to boot and access the TWRP recovery eventually.

Anyway, I gave it a try. If you want the log, I can share, but there's nothing much, it ends with the reboot command.

Thanks for the help anyway!
[LG Leon Questions & Answers] vitaldone:
While it is possible that you bricked your phone by flashing the aboot.bin for c50n instead for c50 I do not see the error you get to have anything to do with the brick.

I am also stuck because there is no an aboot.bin file for c50, so I cannot move forward to launch TWRP. But the error you posted I was getting at the very beginning of the process after I just installed Python. I followed the advice from stackoverflow site how to fix it. Basically you need to run the following commands:

pip install cryptography

pip install paramiko

I think I also tried the 64-bit version of Python and then switched to x86 before googling the Python error. I installed Python into the same folder as all the other files for this project.

I checked "Add Python to environment variables" in Advanced Options when installing. I think I also checked "Precompile standard library" option.

So, maybe there is still hope that your phone is not really bricked yet.

Besides that, I had to change the serial number to COM2 from COM33 that was assigned on my PC per advice above on this thread in order to be able to communicate with the phone in Download mode.
[LG Leon Questions & Answers] ghrUser1221:
I followed the instructions without any error. But if i want to go into TWRP recovery(step 11) the normal "factory reset" screen is displayed...

What i have to do now? I checked wheter my phone is rooted right now, but it isnt this case.
[LG Leon Questions & Answers] toonek:
OK so a little digs up.

After 3 days of struggle and countless stocks firmwares changes I had manage to root H340N.

My observations :

- in may case oem boot-lock unchecked

- instruction form post #1 and #45 is almost ok but:

* you need to use special recovery image - this with 25mb - post #45 - twrp-3.1.0-0-c50.img

* it is important to use "power off" instead "reset" command like in post #45 : lglaf.py --debug -c "!CTRL POFF"

* you can use HexCmp to compare images - its quicker (google it)

* after you install Python you need to instal cryptography module - normally in CMD : pip install cryptography

* it is important to wipe and restore partitions then power off, release cable, again vol+ to go to download mode - dump image and compare - if ok power off

* after final power off you need successfully goes to recovery mode by pressing power button + vol- - after logo quick release power button for a sec and press it again until goes to recovery - double yes to hard reset and you goes to TWRP . If you weren`t able to go to recovery mode and boot normally or emergency mode then you need to try again go to download mode wipe and restore partitions. In this LG after restoring partition must go to recovery directly if not software will rewrite recovery partition during normal boot.

It is hard sometimes in LG H340n to go recovery mode because 3 phones I have had problem with power button - it somites work sometimes not - high pressure is the key ;)
[LG Leon Questions & Answers] noerrors:
Hello,

When I performed step 10, the files don't match. What's could be the problem?
[LG Leon Questions & Answers] androidtester50:
Edit3: finally i was able to root, thanks :)
[One (M8) Q&A, Help & Troubleshooting] RafiKhalil:
Hi,

So here's the thing, I wanted to flash the cyanogenmod rom to my HTC One M8 using the TWRP 3.0.2.0. So I wiped the entire phone, including the internal storage and the system. Unfortunately, every time I tried flashing it I received this error:

So I was like ''Ok then I'll just flash a stock ROM'', but I couldn't find any that was matching my firmware since I'm stuck on FW 2.22.401.4 and I am S-ON so I can't flash any other firmware. I've searched literally everywhere and eventually ended up on a german (I think?) forum, and got to download a Nand stock rom (I don't even know the NAND stands for what tbh, but I guess it's the right one?) for my firmware, but now every time I try flashing it I get this error:

I've also heard that you could flash stock roms based on lower firmwares and it would work, but I still get the same error. So yeah, I'm kind of stuck with no OS and no way to flash one. I could really need some help right now.

Thank you!
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
Your low version firmware is the problem ... S-On doesn't stop you to flash firmware.

Post here fastboot getvar all without serial & imei no. then we'll see what you need.
[One (M8) Q&A, Help & Troubleshooting] RafiKhalil:
There you go

https://postimg.org/image/7kyadqsif/
[One (M8) Q&A, Help & Troubleshooting] ckpv5:
Your firmware is 2.22.707.3 as shown in the getvar, not x.xx.161.x

You need to update your firmware to the latest in order to install most of the available custom ROMs. Your current firmware is not compatible.

You have 2 options :

1. Read all steps on post #1, restore 2.22.707.4 and 2.22.707.4 stock recovery then do OTA up to the latest 6.14.707.1

Here is the thread : http://xdaforums.com/htc-one-m8/help/tutorial-how-to-stock-stock-twrp-t3086860

2. Install RUU_M8_UL_L50_SENSE60_MR_hTC_Asia_WWE_4.19.707.2_Radio_1.25.21331147A1.06G_20.69.4196.01_F_release_414204_signed.exe then do OTA to the latest 6.14.707.1

To run RUU, you need : http://xdaforums.com/showpost.php?p=64926362&postcount=4

You also need to relock bootloader with commands

fastboot oem lock

fastboot reboot-bootloader

Note : this RUU procedure will wipe everything in your internal storage, make backup first of important files like musics, photos & etc.

You can get the RUU here : http://androidruu.com/?developer=M8
[G4 Q&A, Help & Troubleshooting] blahdid:
Hello. Many times i tried to unlock my LG G4 bootloader without any success. Apperantly my G4 is not the european model so it cant be unlocked.

Recently i've heard about app calld RASHR that can install a custom recovery on locked bootloader devices

(here is the link https://forums.oneplus.net/threads/...unlocking-bootloader-on-oxygen-os-opx.417946/).

CAN I MAKE IT ON THE G4? AND IF SO ARE THERE ANY RISKS?