[Q] Bootable Linux Distro on USB with ADB installed - General Questions and Answers

Hello All,
I have a specific question here - I use a program called Sardu to boot into various distros/install windows/troubleshoot PCs. What I would like is to have an ISO of any linux distro (linux mint or DSL comes to mind) that has ADB previously setup and working in a persistence file (very basic linux knowledge here, not sure if it's possible).
Basically I want to be able to choose said linux distro from my bootable USB - launch it any PC i have access too and be able to run ADB commands for the purpose of troubleshooting/rooting of friends/colleagues android devices etc...
If this is at all possible, I am willing to learn the steps needed. I'm not looking for someone to do the work for me (however that would be awesome too ) but I am out of my depth and would love for this to be possible.
TIA for any and all help,
Josh

wilkins502 said:
Hello All,
I have a specific question here - I use a program called Sardu to boot into various distros/install windows/troubleshoot PCs. What I would like is to have an ISO of any linux distro (linux mint or DSL comes to mind) that has ADB previously setup and working in a persistence file (very basic linux knowledge here, not sure if it's possible).
Basically I want to be able to choose said linux distro from my bootable USB - launch it any PC i have access too and be able to run ADB commands for the purpose of troubleshooting/rooting of friends/colleagues android devices etc...
If this is at all possible, I am willing to learn the steps needed. I'm not looking for someone to do the work for me (however that would be awesome too ) but I am out of my depth and would love for this to be possible.
TIA for any and all help,
Josh
Click to expand...
Click to collapse
Look up how to mount an iso read write.
Then mount the iso and add your adb files.
Then write the iso to usb.

Lgrootnoob said:
Look up how to mount an iso read write.
Then mount the iso and add your adb files.
Then write the iso to usb.
Click to expand...
Click to collapse
I'll look into that, thank you

wilkins502 said:
I'll look into that, thank you
Click to expand...
Click to collapse
If you need any more help then you can pm me anytime.

Related

Noob Tutorial: Ubuntu on Transformer

I've been looking around for some good tutorials, but in my opinion, almost everything was pretty difficult to understand for me.
But finally I found out how things are working (except of wifi, can You help me?
http://forum.xda-developers.com/showthread.php?t=1295718)
So I want to share my knowledge with You all and try to make it easy to understand.
1. The ony way in the moment to install Ubuntu on Your Transformer is over a Ubuntu or other Linux PC. (I easily installed Ubuntu virtually in VMware Workstation)
2. Get the required files on Your Linux machine:
http://forum.xda-developers.com/showthread.php?t=1191141
On this link, in the second post is written flash kit for linux:
klick on "here" to download the flash kit.
3. Extract the flash kit into a folder (e.g. Desktop)
4. Now download the Ubuntu root files. They are located here:
http://rootzwiki.com/showthread.php?1072-ubuntu-on-the-transformer
You have to scroll a bit down then You see
"ubuntu-rootfs:
is available here md5sum(95eda389e64461533c51fd1e4e237a30)"
Again, click on "here" to download the rootfiles. (It'll take a while, since the file is 950mb)
4. Once this is done, extract the rootfiles into linux-flash-kit/images. (This folder is the one You have extracted in 3.
5. When You want to Dual-Boot Your device with Andoid AND Ubuntu, read on, otherwise go to point 6.
You have to download a nvflashable rom like for example "PRIME!"
http://forum.xda-developers.com/showthread.php?t=1251044
There You download the NVflash version and extract the image files in it, to linux-flash-kit/images, like You have done it with the ubuntu image file.
6. Now You have to choose.
If You want only linux: remember flash-purelinux.sh
If You want linux and Android Dual-Booting with Android as default OS:
flash-linux-android.sh
If You want linux and Android Dual-Booting with Linux as default OS:
flash-linux.sh
If You want to restore back to android: flash-android.sh
If You want to get to factory state: restore-default.sh
Now You have to install the APX drivers. How to do this, You can read in other threads. Basically download the NVflash file from this thread, in it, You'll find the drivers: http://forum.xda-developers.com/showthread.php?t=1123429
So connect Your tablet to Your PC, turn it off, and turn it on while holding down the Power Button and the Volume+ button.
What You'll see is nothing. Now Your device is in APX mode.
In Your Linux Computer, open up the console and go to the linux-flash-kit directory (In my case it is on the Desktop)
so I do:
cd Desktop\linux-flash-kit
So now You are in Your linux-flash-kit directory. From here You have to type:
sudo sh flash-linux-android.sh
OR You type this in what You have remembered in Point 6.
e.g.
sudo sh flash-purelinux.sh
or
sudo sh flash-linux.sh
This will take a while because the files are transfered to Your device.
7.
When it's done, Your device will start.
Turn it off, and start into Your Ubuntu.
When Ubuntu is Your main system, You start it up normally by pressing the power button.
When Android is Your main system and You are Dual-Booting it, hold down the power button and the Volume down key until the device says that Your have to press the Volume-up key. Do this and You will see a Linux code with two penguins on the top running down Your screen. That's just good like it is.
Finally You should see the Ubuntu Setup with the language selection.
Now You can go on, and now You can set up Your Ubuntu PC!
FYI:
When You have not got a keyboard-dock, Connect Your tablet with Your pc and enter the adb shell
When You don't know how to enter it:
open up Your console, get into the directory of the android-sdk and into the platform-tools.
Then You type:
adb shell
Now You should be in the ADB shell
Now You can type:
DISPLAY=:0 onboard
Then a virtual keyboard should appear on Your tablet and You're ready to go!
Just to create a vocal point, This requires root doesn't it?
Also, is the wifi and stuff working? What's not working?
Mr.Ox said:
1. The ony way in the moment to install Ubuntu on Your Transformer is over a Ubuntu or other Linux PC. (I easily installed Ubuntu virtually in VMware Workstation)
Click to expand...
Click to collapse
Nice guide. There is one correction: it took me a while to find this but there is a windows-flash kit that I've used to install ubuntu on the transformer from Windows 7.
roflcopterofl said:
Just to create a vocal point, This requires root doesn't it?
Click to expand...
Click to collapse
I don't think so, because everything is flashed via nvflash. This way, You can flash a rom without having it rooted, too.
But I'm not quite sure..
moseskim said:
Nice guide. There is one correction: it took me a while to find this but there is a windows-flash kit that I've used to install ubuntu on the transformer from Windows 7.
Click to expand...
Click to collapse
Oh, that's a nice one, I haven't seen this yet! Thank You!
asdfuogh said:
Also, is the wifi and stuff working? What's not working?
Click to expand...
Click to collapse
What's working and not You can read in the Q&A Thread, there is written everything, I just tried to explain it a littlebit easier.
The thread is here:
http://forum.xda-developers.com/showthread.php?t=1191141
There You can see what's working, what not, and how to connect to a WiFi network (For me it doesn't work...)
Thank for this, I am itching to try this... Is there any "easy" way to get back to stock honeycomb after i try this ?
(sorry for this stupid question, I do no know much about these things)
In my opinion it's very easy.
On the one hand, run the command
Flash-android.sh
Or
Restore-default.sh
Or your use nvflash to wipe the device and get a normal rom on it.
Sent from my HTC Desire using xda premium
Thanks, I will try this later today then
tombolek said:
Thanks, I will try this later today then
Click to expand...
Click to collapse
Yeah, when You get Your wifi working, please tell me how because mine does not work
Sent from my HTC Desire using xda premium
Hello yesterday i've try to put linux and android on transformer, all work's great but after 5 minut nvidia apx was disconnected because battery load 0%; i work on vmware machine; after I've charged my dock e tablet and run again the script but that's is the result
sudo sh '/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh'
/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh: 2: /ubuntu/abootimg-i386: not found
/media/Nuovo volume/linux-flash-kit/flash-linux-android.sh: 3: /nvflash: not found
rm: impossibile rimuovere "linux.img": File o directory non esistente
why?
I've already tryed to restore with nvflash all partition and download all in new virtual hdd but not work.

windows/linux

Can i use windows 10 and kali linux simultaneously.
Can it effect my data on my pc
anmol.gupta766 said:
Can i use windows 10 and kali linux simultaneously.
Can it effect my data on my pc
Click to expand...
Click to collapse
Yeah, check your UEFI boot in the bios though, use legacy boot instead.
Before installing it will ask if you want to partition the drives, seperate the windows and then install on the new partition. (This is where you risk wiping the windows data, so be careful.)
Also while separating partitions, might be an idea to set up storage you can access on both sides. I use a vm ssh server with a VHD on a seperate partition.
Finally, id find a different distro, kali is notoriously breakable. There are some much more stable options with the same pentesting/security tools available.

USB debugging not working properly (on Ubuntu)

Hello,
I just got a new U11, hoping to use it to test/debug my Android apps. But I cannot get it connect to ADB reliably. I have tried everything I could, including
enabling developer options + USB debugging
adb kill-server, adb start-server and adb devices
revoking USB debugging authorizations
authorizing & remembering my PC
I've tried countless combinations of the above, but adb keeps showing unauthorized or offline. Very very occasionally adb shows "connected", but Android Studio freezes when I run my app. When I unplug, Android Studio immediately unfreezes. But again, when I plug my phone it becomes unauthorized/offline.
My other Android phone works without any issues. Is it a bug with the stock firmware?
The phone is running stock European firmware, with everything stock (including locked bootloader).
Could anyone please test/confirm this on their Linux laptop/desktop? Any fixes? Thanks a lot!
Strangely, it works on Windows. Maybe Ubuntu kernel update yesterday broke adb :crying:
I get my phone tomorrow and will update adb and try to connect. Have you tried starting the adb server as root?
sudo adb start-server
Sent from my XT1575 using Tapatalk
drzoo2 said:
I get my phone tomorrow and will update adb and try to connect. Have you tried starting the adb server as root?
sudo adb start-server
Click to expand...
Click to collapse
Yes, I did all adb commands after $ sudo -s
As it works without any problems on Windows, perhaps I should ask on a Linux forum?
For now I would use Windows until I found a solution
spolarbear said:
Yes, I did all adb commands after $ sudo -s
As it works without any problems on Windows, perhaps I should ask on a Linux forum?
For now I would use Windows until I found a solution
Click to expand...
Click to collapse
I have the same problem.
I have Debian in my computer (MSI GS40 6QE) and in my girlfriend's computer (Asus UX32V) . Same update state in both of them.
I'm unable to use adb or fastboot in my computer but it works correctly in my girlfriend's computer.
microcris said:
I have the same problem.
I have Debian in my computer (MSI GS40 6QE) and in my girlfriend's computer (Asus UX32V) . Same update state in both of them.
I'm unable to use adb or fastboot in my computer but it works correctly in my girlfriend's computer.
Click to expand...
Click to collapse
Haha, at least the issue is not unique to my phone (and laptop) :laugh:
I suspect Android SDK is most well tested on Windows, at least everything is already set up for you. But Linux allows you to run most dev tools in your HOME folder, so they don't mess things up.
Hopefully someone comes up with a fix.
My Xiaomi running LineageOS (basically AOSP) doesn't have any issue. Perhaps HTC Sense heavily modified some USB options?
spolarbear said:
Haha, at least the issue is not unique to my phone (and laptop) :laugh:
I suspect Android SDK is most well tested on Windows, at least everything is already set up for you. But Linux allows you to run most dev tools in your HOME folder, so they don't mess things up.
Hopefully someone comes up with a fix.
Click to expand...
Click to collapse
I have no problem with my M8 and my computer.
Android "is" Linux. By that, at least, tools like adb and fastboot must be very well tested under Linux :angel:.
Try to open you computer file browser and to browse or copy some files from/to your computer/phone. I'm unable to do that also.
I tried to root my phone in the same day I received it and I was getting really worried because I was unable to use fastboot (I by that I was thinking that my device was defective), even the simple "fastboot getvar all". Then I remembered to switch to another computer and voilà, everything was working perfectly.
Maybe HTC has something broken in the USB3.0 stack.
File transfer and fastboot don't work on my Ubuntu either.
spolarbear said:
File transfer and fastboot don't work on my Ubuntu either.
Click to expand...
Click to collapse
I don't know if it related with kernel (in computer side). I already tried version 4.9, 4.10 and 4.11 (the one I'm running right now).
microcris said:
I don't know if it related with kernel (in computer side). I already tried version 4.9, 4.10 and 4.11 (the one I'm running right now).
Click to expand...
Click to collapse
I tried 4.10 and 4.4, neither worked
I have same problem with Windows 10 64Bit.
All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?
I have solved my problem. I have install Windows 10 new and now all working.
Flinny said:
All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?
Click to expand...
Click to collapse
What Linux distro/version are you running? I've been trying to get this working with Arch and it's driving me nuts!
I run various flavours of Debian and Ubuntu across my machines and have ADB working on them all..
Flinny said:
All working fine here.
Sounds like udev. Have you followed the setting up usb access part of
https://source.android.com/source/initializing?
Click to expand...
Click to collapse
Flinny said:
I run various flavours of Debian and Ubuntu across my machines and have ADB working on them all..
Click to expand...
Click to collapse
Got it working by downloading adb straight from Google instead of using the Arch package.

Debian/Ubuntu/Mint Linux and Moto X4

Personally, after Windows 8, followed by Windows 10, I started to seriously look into Linux (which is free) as my primary desktop. Today LibreOffice (which is free) has more features than Microsoft Office and can open, edit, and save all of Microsoft Office's documents. Thanks to Steam's new deployment, I can even now run my Windows-only games on Linux too. The one thing I found very hard to swallow was trying to get my Andriod device (which is technically Unix too) to actually connect to my computer and I imagine that is because the documentation (even via a Google search) to using ADB or Fast Boot with Linux seems to be hidden among pages upon pages of Windows users.
For simple ease of reference as I couldn't even find this here on XDA, allow me to correct the matter.
Type out (or copy and paste) the following commands to install ADB and Fastboot.
Code:
sudo apt-get install adb
sudo apt-get install fastboot
Now you have both adb and fastboot installed. Next, you'll need to enable adb.
Code:
sudo adb
Now boot your phone to your bootloader screen (you get there by pressing both your power and lower volume keys at the same time). Once there load TWRP with the following command.
Code:
sudo fastboot boot '/your_path_here/twrp-3.2.3-0-payton.img'
Your path will be wherever you happen to have downloaded your copy of TWRP. From there I was able to successfully mount my device within TWRP and upload my ROM zip file as needed.
You will upload files to your phone using the "ADB PUSH" command to your /sdcard/ directory (as admin in windows or root in Linux). For example:
Code:
adb push lineage-16.0-20180921-UNOFFICIAL-payton.zip /sdcard/
I hope this was helpful.
Note: Because you're doing this in Linux, the files you upload to your phone may not have the correct permission settings (chmod settings) after they are uploaded. This is very unlikely, but still technically possible.
Thankfully, the folks at TWRP have thought of this and in the 'Advanced' menu, you will find a file manager. From there select the file of your choice and click the chmod button that reads "chmod 0777". Don't forget to mount the DATA partition (before using the file manager) else you may not see the file you are looking for.
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
munchy_cool said:
or just download the package from here
https://developer.android.com/studio/releases/platform-tools
unzip and have fun
Click to expand...
Click to collapse
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
MotoX4 said:
This is helpful, but most newbies to Linux wouldn't even know how to execute those base files. lol But Windows users coming to Linux do know how to run command prompts (good old Microsoft kept the command prompt around long enough that folks moving to Linux just associate the terminal in the same light). Which is why I thought to have them install a preconfigured program would be easier.
But thanks for the source. It is still useful.
Click to expand...
Click to collapse
lol..i thought the first thing a Linux newbie would learn is command prompt.
you need to read about terminal before you decide using a Linux box.
munchy_cool said:
lol.. I thought the first thing a Linux newbie would learn is the command prompt.
you need to read about terminal before you decide using a Linux box.
Click to expand...
Click to collapse
:laugh: I agree. But there are a lot of folks who feel intimidated whenever learning something new. If I had started this thread with a full introduction to manually configuring and executing everything, most folks would have easily been discouraged. Especially the younger or older generations who fall somewhere between the line of "I don't got time for that" or "why so difficult". lol :laugh: Inoculating folks into using Linux I feel works best. Keep it simple and suggest that there are more in-depth ways of doing things to peak curiosity. -- Which is why I'm glad you pointed that out and why I'm loving writing this reply at the moment. :angel:

Dualboot Android/Linux for Yoga Tab 2 830F

ALARM: the device could be bricked if something will go wrong.
Actually should work for 10' and 13' as well
Introduction
The Yoga Tab 2 devices are built on the Intel Baytrail SOC, which makes them not very different from cheap Intel Atom laptops and idea to make them run something more serious than Android is too tempting to resist. Even more interesting, the Windows version of the devices do exist, so running of the full desktop OS is definitely possible.
Beginning
The easiest method to boot Linux on the Yoga is to unlock bootloader and replace standard EFI loader with GRUB. To do it, use the set of files, available here.. Unzip the file, put the tablet into fastboot mode, connect to PC and use script hack.cmd to flash the ESP with GRUB. Now, the system will be booting the GRUB, which will normally boot Android (if no buttons is pressed). The volume buttons are configured as hotkeys in grub.cfg, so it is possible to load arbitrary system, supported by GRUB.
To modify the grub.cfg from Android, mount the ESP partition:
Code:
su
mkdir /esp
busybox mount /dev/block/by-name/ESP /esp
vi /esp/boot/grub.cfg
Kernel
The device is able to boot mainline Linux kernel in the described way, but due to erroneous ACPI tables majority of hardware won't work. I did my best to repair the tables to make system usable. Still, not everything is working, mainly screen brightness control and sound. The kernel development info is available at https://github.com/Trel725/yoga2linux
System
I've chosen Manjaro Linux as a distro to work with because of my own taste. It shouldn't be a problem to run any other distro with modified kernel, but I provide rootfs only for Manjaro.
How to get it working
1. Flash the modified ESP as desribed above.
2. Download the archive, create folder /factory/manjaro (folder /factory should be already present in the tablet) and unzip archive to that folder. It is necessary because GRUB can't access the external SD, so kernel need to be loaded from internal memory and then find SD card. /factory is just a partition, used for storing tablet configuration, and as it is usually empty for 90-99 % it is convenient to use it to store the kernel and initramfs.
3. Find a good SD card, format it to the ext3 or ext4 FS and unzip RootFS to the SD card. Insert card to the tablet.
4. Reboot and press Volume+ to boot Linux.
Some ideas
1. After tablet has booted Linux and USB is initialized, it keep it's state on reboot. This means that following trick is possible:
boot linux -> reboot -> get to GRUB (by pressing Volume-) -> USB keyboard should work as it was initialized -> go to the GRUB command line (press c) -> type exit, press enter -> should get to BIOS with working keyboard -> if USB flash disk was inserted before entering the BIOS (usb hub is needed as device has only one port) it is possible to boot from it.
2. TODO
Hello, do you have any Linux tutorials installed here?
Wordowg's post failed
Thanks for this, @Trel725.
No problem with 5.2 kernel? isn't it too new for such an old device?
Also -- maybe some stuff from here is relevant? e.g., WM5102.
NaEpoch said:
Hello, do you have any Linux tutorials installed here?
Wordowg's post failed
Click to expand...
Click to collapse
Which tutorials do you mean? Linux usage in general?
raenye said:
Thanks for this, @Trel725.
No problem with 5.2 kernel? isn't it too new for such an old device?
Click to expand...
Click to collapse
Linux is very good in backward compatibility, even support for 80386 (released in 1985) was discontinued only in kernel 3.8. Moreover, I am particularly interested in mainline kernel without need to support ancient code (like for majority of android devices).
raenye said:
Also -- maybe some stuff from here is relevant? e.g., WM5102.
Click to expand...
Click to collapse
Thank you for the suggestion. I didn't try the patch for WM5102 from github, hopefully it will work for mainline kernel. I will try to find some time for it in the future.
sorry,my bad
i mean install linux for yoga tablet2 ' tutorials.
The tutorials in the forums all failed.
If you are free, can you teach me how to install it?
Thanks very much.
Unfortunately I don't have time for complete guidance, but if you have any questions I will readily answer them. The more details you provide the easier to help you.
alright, Thank you all the same.
But if you have time, please help.
My E-mail is [email protected]
Just a simple tutorial.
thank you
I can get Manjaro to boot but it can't load LightDM. I'm on 1050L.
I cant get this to work... All i get is a shell command line. no dual boot. Doesnt default into Android if nothing is imputed.
I tried connecting a keyboard. And cant type anything in.
I feel some steps have been skipped.
Tried this and now can't do anything but sit in empty shell. Can't type, volume buttons do nothing

Categories

Resources