Thursday, May 9, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 16801  / 2 Years ago, thu, october 6, 2022, 4:08:10

I am trying to install Cyanogenmod 13 in Oneplus 2 but I cannot get TWRP flashed in the phone because I cannot get adb work as expected with Ubuntu 16.04 in common Ubuntu, Persistent Live Ubuntu and Live Ubuntu.




  1. Common Ubuntu



    The command adb devices and fastboot devices returns nothing, although it should not, since my Android phone is in the developer mode with enabled fastboot.
    Work flow



    masi@masi:~/Downloads$ wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb
    --2016-08-15 17:16:09-- https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz
    Resolving skia.googlesource.com (skia.googlesource.com)... 74.125.136.82, 2a00:1450:4013:c01::52
    Connecting to skia.googlesource.com (skia.googlesource.com)|74.125.136.82|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [application/x-gzip]
    Saving to: ‘STDOUT’

    - [<=> ] 0 --.-KB/s adb
    - [ <=> ] 1.31M 70.0KB/s in 19s

    2016-08-15 17:16:29 (70.0 KB/s) - written to stdout [1374340]

    masi@masi:~/Downloads$ sudo mv adb /usr/bin/adb
    masi@masi:~/Downloads$ sudo chmod +x /usr/bin/adb
    masi@masi:~/Downloads$ adb version
    Android Debug Bridge version 1.0.32
    masi@masi:~/Downloads$ adb devices
    List of devices attached

    masi@masi:~/Downloads$ sudo adb devices
    List of devices attached


    I think the adb version works at least in 14.04 but not now with 16.04.



    Inspecting with lsusb shows that the device is detected in Ubuntu as Bus 001 Device 050: ID 2a70:f003.



    Settings where I already authorized USB debugging



    enter image description here



    I do when masi is in the group plugdev but still unsuccessful result



    # OrganicMarble
    sudo touch /etc/udev/rules.d/51-android.rules

    masi@masi:/$ sudo vim /etc/udev/rules.d/51-android.rules

    masi@masi:~$ groups masi
    masi : masi adm cdrom sudo dip plugdev staff lpadmin sambashare

    masi@masi:/$ cat /etc/udev/rules.d/51-android.rules
    SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"

    masi@masi:/$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

    masi@masi:/$ sudo adb devices
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *

    List of devices attached

    masi@masi:/$ adb devices
    List of devices attached

  2. Persistent Live Ubuntu



    Fails with bugs in /etc/hostname and /etc/hosts, not related to this case but reported here


  3. Live Ubuntu 16.04



    This attempt fails in trying to get adb to work



    ubuntu@ubuntu:~$ wget -O - https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz | tar -zxvf - adb
    --2016-08-15 17:16:09-- https://skia.googlesource.com/skia/+archive/cd048d18e0b81338c1a04b9749a00444597df394/platform_tools/android/bin/linux.tar.gz
    Resolving skia.googlesource.com (skia.googlesource.com)... 74.125.136.82, 2a00:1450:4013:c01::52
    Connecting to skia.googlesource.com (skia.googlesource.com)|74.125.136.82|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [application/x-gzip]
    Saving to: ‘STDOUT’

    - [<=> ] 0 --.-KB/s adb
    - [ <=> ] 1.31M 70.0KB/s in 19s

    2016-08-15 17:16:29 (70.0 KB/s) - written to stdout [1374340]

    ubuntu@ubuntu:~$ sudo mv adb /usr/bin/adb
    ubuntu@ubuntu:~$ sudo chmod +x /usr/bin/adb
    ubuntu@ubuntu:~/Downloads$ adb version
    bash: /usr/bin/adb: No such file or directory



Ubuntu: 16.04

Linux kernel 4.6

Phone: Oneplus 2

Phone settings: Oxygen OS 3.20, Developer mode, fastboot on


More From » command-line

 Answers
2

The reason you do not get anything from adb devices is that your phone is not in the fastboot mode. So put your phone there and try again.



Shortly, here the work flow without rooting your phone. Do where recovery.img is the renamed TWRP image but has to be renamed like that




  1. Enable Developer mode in your phone; enable smart bootloader and the other setting in Developer settings

  2. Start your phone in fastboot; power + volume up; press so long as your phone vibrates

  3. fastboot devices should return the device id; fastboot oem unlock and phone phone reboots

  4. Again to fastboot and run fastboot flash recovery recovery.img

  5. Go now to the recovery mode by Power + volume down

  6. Wipe everything else except internal data

  7. Install and flash with Switch_to_OOS3_H2OSMM.zip such that you can flash your OO Rom

  8. Flash now with Cyanogenmod Rom and Pico Gapps (Arm64) - only for Google Play Store

  9. Wipe Cache/dalvik



Sources




  1. https://forums.oneplus.net/threads/24-06-2016-oneplus-2-how-to-unlock-bootloader-flash-twrp-root-nandroid-efs-backup-and-more.345478/

  2. http://forum.xda-developers.com/oneplus-2/development/6-0-x-cyanogenmod-13-oneplus-2-t3292436/page769



Systems: Ubuntu 16.04, Windows 10


[#14098] Friday, October 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
;