KM Versions of Android SDK tools from distributions are often disturbingly out of date.

(Mainly referring to Debian/Ubuntu, no idea about Manjaro)

Guess what?
I used a different USB-to-USB-C cable and the phone got recognized!

./fastboot devices
c0dcc5f0 fastboot

However, I am encountering another issue which is not detailed in the tutorial

./fastboot flash recovery twrp.img
Sending 'recovery' (27529 KB) OKAY [ 0.631s]
Writing 'recovery' FAILED (remote: 'Partition flashing is not allowed')
fastboot: error: Command failed

Any idea what is wrong this time?
Shall I unlocked the bootloader before flashing TWRP? I would think so, although I do not exactly know what I am doing and in the instructions I am following the unlocking is not mentioned in such order. On the phone screen I read DEVICE STATE - locked in red.

  • KM replied to this.

    AGI You must enter "fastboot oem unlock" first, or you can't do anything.
    Edit: I think it would delete all data but I guess you don't have important data on the phone's memory yet.

    • AGI replied to this.

      KM Thanks! I had proceeded meanwhile! I am wiping partitions with TWRP. In all the tutorials I have watched I can't see a partition called USB-OTG, which I do have in the list. I guess wiping it is meaningless since, if I understand, USB-OTG is just an external device connected to the phone via USB? None in my case!?

      Doubt before wiping. Shall I back-up something? I mean, I have not used the phone yet, so I have nothing mine. But I wonder, if something goes wrong with PA, is there an easy way for beginners like me to reinstall oxygenOS using the created backup?

      NOTE: In my case there has been a difference to the tutorials I went thru. After unlocking the device via fastboot, I could not turn the phone on in fastboot mode anymore. I had to restart the phone in normal mode as post-factory reset (go thru the choice of the language, fingerprint protection and all that) and tap again 7 times on the Build Number to re-gain developer privileges. Then Developer Options re-appeared among the settings. Inside I saw the OEM resulted unlocked, but USB debugging had turned to off.

      • KM replied to this.

        AGI if I understand, USB-OTG is just an external device connected to the phone via USB? None in my case!?

        Right, it's any device connected by cable.

        Make a backup if in doubt. It would take a while and need a lot of space on the internal memory but I think you could move it to your PC later. All you'd need additionally is the recovery partition which you just rrplaced with TWRP but it can be downloaded from OnePlus ("recovery link"): https://www.oneplus.com/support/softwareupgrade/details?code=4

        Edit: Never ever OEM lock the device again (via fastboot) unless both OxygenOS and the original OnePlus recovery partition are installed, or you will get a black screen at boot. There is a way out of this though but better avoid this.

        • AGI replied to this.

          KM Crap, I forgot about it and wiped. I am a bit nervous...

          But luckily from what you say I could get back to the original OS anyhow by downloading stuff from the net...

          On a different note, my AOSPA zip and Gapps zip files are on my Mac. How do I have TWRP access them? People on youtube flash them from the phone's internal storage. I tried to connect the Mac to the phone via USB but I can't read it. Thanks!

          • KM replied to this.

            AGI With adb. While TWRP is running, you can push files to the phone with "adb push file.xyz /sdcard"

            You might need to copy the files over to your Windows if the phone is only accessible from within Windows.

            • AGI replied to this.

              KM Thanks! I found another solution meanwhile. I cannibalized an USB-OTG cable from somewhere, and I can now read the relevant zip files from an USB stick.
              However, the first attempt of flashing the custom ROM failed. I had ticked the two given options
              1) Zip signature verification (no clue what it is)
              2) Reboot after flashing
              The signature could not be verified. Is it important?

              Okay, I succeeded! I just skipped the zip signature verification. Thanks a lot for your patience!

              The OS looks quite unstable, though. For instance, when I select WiFi settings, Bluetooth settings open. Or, if I select a wifi provider, a different one is shown. Windows appear double or in multiple quantities covering the whole screen, and in some cases keep moving up and down. Have you experienced anything similar?

              Do you know how to take a screenshot? If it works, I can show examples of what I mean...

              Is there something I need to do at the end of the flashing, like locking the device again? Shall I use fastboot for that?

              • KM replied to this.

                AGI I never had such things before. The OS is pretty stable. You can take a screenshot by holding the Power button a little until a menu pops up.
                You flash the ROM first, then immediately Gapps without a Reboot in between.
                I'd wipe everything again (without the data partition), then use TWRP's file browser to delete all folders on the data partition, especially "Android", but leave the zips there. Make sure to clean the dalvik cache, too. I will tak a look into TWRP to remember if I skipped a step. And you did download exactly this file: http://download.paranoidandroid.co/roms/oneplus3/pa_oneplus3-7.3.1-RELEASE-20171030-signed.zip ?

                Edit: OK I'd do the advanced wipe in which you select everything except for "Internal storage". It seems the standard wipe didn't include the system partition. The go in TWRP' main menu, Advanced - File Manager and delete everything in the /sdcard directory manually, except for your Paranoid Android and Gapps files or other downloaded stuff. Then you should be able to do a proper clean install.

                • AGI replied to this.

                  KM I downloaded from http://paranoidandroid.co/downloads/oneplus3

                  I think I had a reboot between flashing the ROM and the Gapps.

                  You are suggesting to wipe everything but Data. Why is that? And via TWRP? So I should wipe twice?

                  Thanks. I will see if I can get some photos. The phone is unusable right now...

                  • KM replied to this.

                    AGI I just confused the exact terms. When you wipe, data is different from internal storage. Internal storage is the /sdcard directory where you saved your downloaded files onto. Maybe the reboot did mess things up. I remember having frequent "play store has stopped" errors when I once flashed Gapps after using the OS. But not the things you describe.

                    Just to make sure we are on the same page. My files are on an external memory stick which I connected to the phone via USB-OTG. I did not wipe the internal storage via TWRP before installing the ROM. That is what I read in multiple tutorials. Is that correct?
                    I watched a video in which both zip files, for ROM and GApps, were selected and installed together. I could try that.

                    EDIT: I saw your EDIT now. Thanks. I could not take photos to illustrate the issues. Funnily, whenever I pressed screenshot the anomalies disappeared. But believe me, everything is weird. For instance, upon shutting down, there were 4 "shutting down" windows, a big, central one, and three in a row at the top of the screen. Some for Wifi and anything else.
                    I have begun another install. This time I have got "Unable to mount storage" in red after each wiped partition wiped, but the wipe was considered successful. I could not delete files from the internal storage manually nor I could wipe it.
                    I re-installed loading both zip files, ROM and GApps, simultaneously. I am still facing the same troubles though ☹️

                    • KM replied to this.

                      AGI OK if they are on a separate stick you could safely tick everything in the Advanced Wipe dialogue (except for USB-OTG of course). Just to be sure there are not leftovers of any kind anywhere. That's what I'd do in this situation.

                      • AGI replied to this.

                        KM I tried multiple times but no changes!

                        I would like to re-install OxygenOS, at least to see if I can revert. I found the below link.

                        https://www.oneplus.com/support/softwareupgrade/details?code=4

                        I would expect to download a zip file but my Mac extracts a folder, and TWRP does not like. I will try with a Windows PC. Is the procedure the same as for the custom ROM, is not it, except I will not have to flash GApps?

                        • KM replied to this.

                          AGI No need for Gapps, just wipe first and then install the zip.

                          • AGI replied to this.

                            KM Mmmm,
                            I just read here

                            To go back to full stock rom, Is this steps works :

                            1. Download full Rom.
                            2. Flash it in twrp.
                            3. Flash stock recovery using fastboot.

                            What is the stock recovery? I hope it is not the backup I forgot to make...

                            • KM replied to this.

                              AGI No they offer it as a separate link (see few posts above). But it should be included in the ROM, too. So when you install the ROM, you'll lose TWRP and instead have the original recovery partition again.

                              Thanks on that too!
                              Shame on me for making this a soap opera. At the end of the "successful" process, TWRP said: NO OS installed, do you still want to reboot? I did that, and the phone vibrated for a long while. Then nothing. Panic.
                              I waited a bit and got into fastboot mode, and started from there. The central red ball and the two white ball spinning around it went on for minutes, but finally I got Oxygen running! For now, the only differences are

                              OxygenOS version: OP3_O2_open_25 --> 5.0.8
                              Android security patch level: September 1, 2017 --> November 1, 2018

                              consequences of installing a fresher version of the ROM, I believe.
                              I did not take note of the Kernel version.

                              Now I will check if it works properly. Thanks a lot for guiding me!

                              KM OK if they are on a separate stick you could safely tick everything in the Advanced Wipe dialogue (except for USB-OTG of course). Just to be sure there are not leftovers of any kind anywhere. That's what I'd do in this situation.

                              I finally managed to get internet data with my sim card, so I may keep the phone. It hurts but not as dramatically as other OLEDs I looked at, i.e., iPhone X and Samsung S10.

                              • Do you remember what is the latest version of OxygenOS which you could use no problem?
                              • I think once you said that previous versions of the OS are not available anymore, aren't they? And even if they were available, could I completely wipe everything and load an old OS? I am making confusion with factory-resetting, I believe. Is it correct that with a factory-reset I eliminate all data and downloaded apps, and restore stock apps to how they came, but OS, security patch and kernel do not change, whereas flashing an old ROM would change OS, security patch and kernel as well?
                              • I may want to try again to flash PA now that I am a bit more familiar with the process, and I know I can revert to OxygenOS. I still have one doubt. I noticed that I could not wipe the internal storage with TWRP. Its size remained the same after wiping, and I could still see files inside. You mentioned an Android folder I should get rid of. I wonder whether that is crucial? But are not the OS files contained in the System folder only?

                              Thanks! By the way, very low priority, no need to rush...

                              • KM replied to this.
                                dev