PINE64
Getting platform tools working like I'm used to? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Android on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=113)
+--- Thread: Getting platform tools working like I'm used to? (/showthread.php?tid=11309)

Pages: 1 2 3


Getting platform tools working like I'm used to? - bastafari - 09-06-2020

To start I'm a complete newb. I downloaded Android tools from the store. Adb works but I have to select file transfer on the phone first otherwise adb devices doesn't list the phone and gives a permissions error. Then in order for fastboot to work I have to type $(which) fastboot. Which doesn't work exactly right because fastboot reboot recovery just rebooted the phone to the os. Additionally I couldn't find a folder for the tools though I thought it would have been /use/bin. What I normally do is keep my platform tools folder on my desktop then I drop my files I want to flash in that folder so all I would do for example is type fastboot boot twrp.img. So I saw Arch wiki had some stuff on platform tools but honestly it's above me at this point. Any pointers, easy instructions or general help I can use? Thanks.

Forgot to say, I'm on Manjaro.


RE: Getting platform tools working like I'm used to? - PakoSt - 09-07-2020

adb and fastboot work fine for me on Manjaro (I use it for file transfer between my LG G7 and for Anbox experiments when I have the time).

Which package did you use to get them? (should be something from AUR)


RE: Getting platform tools working like I'm used to? - bastafari - 09-07-2020

(09-07-2020, 11:00 AM)PakoSt Wrote: adb and fastboot work fine for me on Manjaro (I use it for file transfer between my LG G7 and for Anbox experiments when I have the time).

Which package did you use to get them? (should be something from AUR)

No I haven't enabled AUR in the store. I downloaded android-tools 30.0.3-1 from the normal store repo. I only tried to install a AUR spotify package once and couldnt get it to work. Then I see posts about AUR being risky somehow? I couldnt tell you what a snapd is so its all the same to me, but Im really just learning linux on my own here. So, what package did you download and did you have to take any extra steps for it to work? Are you able to locate the folder where adb is? Thanks.


RE: Getting platform tools working like I'm used to? - PakoSt - 09-07-2020

I use the same package android-tools 30.0.3-1 and yes, it's in the community repository. 

You can use which adb to find it's location. It should turn up with /bin/adb and /bin/fastboot

It sounds as if your device defaults to Charging only (check the Settings on the device and switch to something else). Switch to File transfer and adb/ fastboot will work without a problem. This has to do with Android and a few changes long time ago (adb service not restarting when reconnecting as there is no data transfer).
Except recently the pestering Charging only has become the default option throwing off the usual workflow for 5-10 minutes until the root cause is found Smile


AUR stands for Arch User Repository - people using arch based systems (like Manjaro) can package software that you can install.
The reason why it can be considered unsafe - well, it's open for everyone to submit packages Big Grin

Snap is the container approach like Flatpak or AppImage - it's meant to allow you to install programs which won't require you to install something else (if you have gcc10 and the program relies on gcc8 for example). Snap is a child from Canonical, Fedora is pushing for Flatpaks (I think) and so on.
Neither Snaps or Flatpaks guarantee that you can run the programs on ARM based systems - the snap/ flatpak/ appimage still have to be compiled against x86 and arm platforms but they could go around x86<->x86_64 or armv7<->aarch64 requirements for example (read - you can use RPi snaps on your Manjaro install for example)


PS:I keep forgetting if adb service remains active/ restarts properly if you accept the connection to the laptop (with Always allow).


RE: Getting platform tools working like I'm used to? - bastafari - 09-07-2020

Hmmm. Fastboot as a command itself doesn't work. It seems to have the same permissions issue as the adb command before I switch from charging to file transfer. Which is fine when using adb. But when trying fastboot I don't have a way to choose file transfer in the bootloader. Is there? I tried fastboot mount but it just hangs.


RE: Getting platform tools working like I'm used to? - PakoSt - 09-07-2020

Mm, I haven't tried fastboot mounting so far.

I didn't have a reason to try it as all of my Android devices are actively used. But I guess I could use my sacrificial Nexus 7 2012 for a quick test during the weekend. Could be the permission (I recall I had to alter the permissions or use sudo ages ago on some Ubuntu install).

Out of curiosity, what is the target Android device?


RE: Getting platform tools working like I'm used to? - bastafari - 09-07-2020

(09-07-2020, 03:32 PM)PakoSt Wrote: Mm, I haven't tried fastboot mounting so far.

I didn't have a reason to try it as all of my Android devices are actively used. But I guess I could use my sacrificial Nexus 7 2012 for a quick test during the weekend. Could be the permission (I recall I had to alter the permissions or use sudo ages ago on some Ubuntu install).

Out of curiosity, what is the target Android device?
Currently I'm using a OnePlus 7 Pro.  It's strange in that it's the first device I've had with an a/b partition. So if I'm rom hopping I sometimes have to boot twrp recovery from fastboot then install it. But right now I foreseeably wouldn't be able to even oem unlock a new device.  I'm thinking this is an arm issue as anbox had had issues bring compiled, as I've seen in other threads. No problems on other linux machines.


RE: Getting platform tools working like I'm used to? - PakoSt - 09-07-2020

@bastafari , check this wiki entry: https://wiki.archlinux.org/index.php/Android#Fastboot
Fastboot works for me with sudo.

Will check if android-udev solves the issue with the permissions (once the PBP decides to boot... unfortunate side effect from trying the bleeding edge)

[UPDATE]: Install android-udev and restart. Fastboot should work without the need of using sudo and it will fix adb not connecting when the device is in charging only mode.


RE: Getting platform tools working like I'm used to? - bastafari - 09-07-2020

Android udev got things working mostly. Fastboot reboot recovery still just reboots to android. But fastboot boot recovery.img works if I ever need it I think this suits my purposes for now. Thank you very much for your help. Just trying to get the PBP as my main device. Definitely been a project! Now on to the next thing.


RE: Getting platform tools working like I'm used to? - PakoSt - 09-07-2020

Have you patched the recovery? A/B devices can be a tad tricky (no more separate recovery partition and the system deals with the boot order). I would check XDA for more information later on