[QUESTION] Making USB boot Linux via Phone - Android Software/Hacking General [Developers Only]

Okay,
So I played with linux literally once or twice in my life and I never really dig into any deeper than that...
However I am aware / have made bootable Linux OS's in the past on just a normal USB, this was a few years back following some guides.
I have a Galaxy S and I know my computer tries to run the USB driver at boot because if my phone is plugged in the PC stalls at the Lenovo splash screen.
therefore it must be possible for it to run as a normal USB Boot so long as the right image in on the SD card in the phone.
My question is, how?
Any help greatly appreciated, going to start researching but any one with any quick ideas please let me know.
regards,
EDIT, I guess I will need to partition the SD Card, can I do this and not affect the Android OS? I presume it would have to be an external one too?

I guess that you could do it as long as your samsung mounts your SD when you boot your PC.
You could use a tool called UNETBOOTIN to create a USB-bootable version of any linux distro.
I would do this as follow:
- back up EVERYTHING in my SD card to a folder on PC
- run UNETBOOTIN and create a bootable linux on a usb stick
- copy everything from the usb stick to the root of your SD
- restore the files you have backed up earlier
If your Galaxy S mounts the SD card right at the boot of your PC then everything should work.
FYI you will not be able to see what is inside your SD, afaik, since linux will stay in a compressed filesystem image. So you won't be able to access your files on your phone, neither use it via ADB or fastboot.
Hope this has been helpful

Based on that last statement does that mean you cannot save anything on your USB boot versions of linux, since they are image files?

Related

Memory and Stock Recovery Info

Everyone,
I've written this a bunch of times but and putting it in
it's own thread so folks can read and use it.
Memory and Storage:
/sdcard -- internal memory of the tablet
/sdcard2 -- microSD card in the external slot
/usbdisk -- USB key slot
Stock Recovery Info:
Main method: Put your recovery folder and update.zip on /sdcard, turn off the tablet, the press power and volume + to initiate standard recovery.
Second method: Put your recovery folder and update.zip on a microSD card. Edit the command file in the recovery folder with Notepad to change the location from /sdcard to /sdcard2 and save it with the name "command" (NO
.txt or other file extension). Then boot recovery with power/volume + and the OS will use the sdcard (assuming you don't have a live recovery/update.zip file in /sdcard).
Third method: If you can boot recovery to CWM but can't get your ROM to work, go in recovery to the mount menu and go down to the mount USB memory option and choose it. Then plug your connector cable from the miniUSB port to your PC. When you plug into your PC an Explorer window should open and you should have a drive letter representing the G-Tablet (it's G: on mine) on your menu. You now can select that letter and you have access to your tablet memory (/sdcard). I've even had a time or two when not a single file showed!!! I added update.zip and recovery and loaded
a ROM!
The tablet boot process apparently checks /SDCARD. If it doesn't find a recovery file there it does the same check if you have a miniSD external card installed. The large USB slot is not useable for booting or recovery so far as I have determined or read.
I hope this helps you.
Rev
EDIT: I didn't put one fact in here about recovery that everyone should know. When you run a recovery operation, the system deletes the command file so you can't accidentally do it again. If you have to run a recovery or
attempt to load something again, make sure you have a command file in the recovery folder with the correct command in it!!! Sorry I omitted this first time around.
Placeholder
Placeholder
Hope everybody who needs this has seen it. I won't kick it up again.
Rev
Can you also add information about partitioning of /sdcard and why would one need it?
Is there another "hidden" flash memory available for firmware or all mods and custom ROMs go into /sdcard only?
Thanks so much, I thought I'm dead cuz I wiped out everything.
This may have been asked before, but how does one perform a full data wipe w/o using CWM? Thanks.
HackaMathecian said:
This may have been asked before, but how does one perform a full data wipe w/o using CWM? Thanks.
Click to expand...
Click to collapse
You need to use nvflash (nvidia tegra SoC flashing utility). There are alot of posts about it. Do be carefull if you go this route, as even though you will not damage your tablet, it may be difficult to put it back to a bootable state if you don't do it properly.
thanks!
thanks great. simple and to the point. should help people that get confused. thanks again!
Vlad_z,
It has been my experience that when somebody gets boot loops, it often involves a
partition problem. Also, sometimes the G-Tablet does flaky things. I have one I
just shut down. Restarted it with boot looping and had to rebuild.
The three locations listed above are the three memory places you can store stuff
unless you find software that custom sets up something else.
Rev
Os Money:
http://forum.xda-developers.com/showthread.php?t=861950
This thread completely explains the NVFlash process.
Rev
That's kind of odd, my removable sd card ended up with the label ex-sd. Doesn't seem to be messing anything up though.
sixtofive,
I've never seen or heard of that with the stock ROM. Are you running a different ROM?
Some of them do change the directories.
Rev
So simply put, we should copy and backup the recovery folder and update.zip in /sdcard (or tablet storage) and when things get f'ed up, we move the recovery folder and update.zip back into the /sdcard?
Maybe it's just me, but I looked into the recovery that was already in the tablet and there's nothing in it; is that normal? If not, can anyone provide the back up recovery folder and update.zip just in case?
sam,
Recovery is simply a folder which holds a file named "command" in it. Command is a file
that has the command line in it with the command and parameters to "recover" or "load" files onto your G-Tablet.
Sometimes when your tablet gets messed up, you can still use recovery and are lucky. But sometimes the recovery partition gets damaged and then you have to look
for other ways to get in and fix things.
http://forum.xda-developers.com/showthread.php?t=1010943
Many of us keep telling people there is a lot to learn here -- and Android doesn't have
all the stuff built into it Windows does. Nor is Android known for it's great documentation!
If everyone would read all the stickies at the start of the forums, it would provide
probably 80% of everything they need to know.
Rev
If OP also put links to stock ROMs, that would be great
interesting...even though I don't have a microSD card in mine /sdcard2 seems to be a valid directory within "root explorer"
what partition and memory structure should I be seeing on my brand new g-tablet? any suggestion on "mount" and "df" output?
Question, which is the best method or quicker to backup before attempting other rom installs?
Deleting CWM
How would one delete CWM so that the tablet can be returned?
Got my gtablet last evening. Seems there is a lot to learn.
thanks butchconner...
Thanks all the people who are contributing at xda. You are doing a wonderful job. In fact I bought this device because of you ( I think Viewsonic owes you guys a lot. At least they avoided a big loss because of you. )
Two questions:
1) Is it recommended to flash back to stock before changing roms?
2) Is there a link to the stock Rom files that I am missing?
Thanks

[Q] Wiped sdcard. Won't connect to computer

Hey guys,
I goofed. Big time. I accidentally wiped the sdcard in recovery mode when flashing to another rom.
I have her booted into red recovery and mounted the USB mass storage but it isn't showing up on my computer (I have a Mac that is running a dual boot of windows) on neither the windows or Mac side. Positive the drivers are installed on both.
Please help. If I can put a rom onto the card I'll be fine...but I can't get onto the card
Any suggestions?
Could use Odin or heimdall I've never tried to use mass storage while in recovery
Sent from my SGH-I997 using xda premium
Downloading Odin currently. Will post results. I hate my slow school Internet :/
ODIN Worked. Thanks
Wiped SD using CWM
So I had a problem almost the same.
I was using JellyBelly 4.2, and didn't like it. I wanted to go back to Cyan 10.0 and installed the files on my phone. I decided it was a good time to wipe everything, and started to do so. One of the files was the SD format. So I did that, and then wipe/data factory reset. Crap. So now I have no rom installed, and no files on my SD card.
I need help to place my zip files for CM 10 on my SD card (they are on my MAC now). I can't start up my phone to enable file transfer. I can only boot into CWM recovery. Is there a (step by step) way to push files from my MAC onto the SD card? Or is there a different way to tackle this?
I have a GNex (Toro) VZW
MacBook running snow leopard.
I am afraid that anything give me advice on you're gonna have to pretend that I am really dumb and need step by step directions. I tried to push via ADB but got this error, I don't know the correct commands for that. View attachment 1508775 Any suggestions?
It seems you do not have the android sdk set up along with adb.
Is this it?
andros11 said:
It seems you do not have the android sdk set up along with adb.
Click to expand...
Click to collapse
I thought I did. Here is what I have, I just don't know how to force my ROM's onto the SD card using it.View attachment 1508841
FIrst make sure you added the tools directory to your PATH.
There's a guide on how to set up the sdk on a mac: http://peter.boctor.net/2010/12/02/installing-the-android-sdk-on-mac-os-x/
you can skip the eclipse parts.
Of course, make sure you use your own path.
After that, adb should be recognized as a command.
To push, use this:
adb push "file.zip" /sdcard/file.zip
change "file.zip" for the location and name of the zip.
I often place files on my Home directory before pushing since it then only requires I specify the file name.
Problems with ADB path
So this is what I get when trying to install different commands into my path. I guess I am still doing it wrong? View attachment 1509964
You need to edit the Path to make it fit yours. Your sdk directory reads android-sdk-macosx 2.
It also depends on where you have that folder.
shooter5635 said:
Hey guys,
I goofed. Big time. I accidentally wiped the sdcard in recovery mode when flashing to another rom.
I have her booted into red recovery and mounted the USB mass storage but it isn't showing up on my computer (I have a Mac that is running a dual boot of windows) on neither the windows or Mac side. Positive the drivers are installed on both.
Please help. If I can put a rom onto the card I'll be fine...but I can't get onto the card
Any suggestions?
Click to expand...
Click to collapse
Pretty sure usbmount never worked with red cem for us...at least ot never did for me
MaxJ360 said:
So I had a problem almost the same.
I was using JellyBelly 4.2, and didn't like it. I wanted to go back to Cyan 10.0 and installed the files on my phone. I decided it was a good time to wipe everything, and started to do so. One of the files was the SD format. So I did that, and then wipe/data factory reset. Crap. So now I have no rom installed, and no files on my SD card.
I need help to place my zip files for CM 10 on my SD card (they are on my MAC now). I can't start up my phone to enable file transfer. I can only boot into CWM recovery. Is there a (step by step) way to push files from my MAC onto the SD card? Or is there a different way to tackle this?
I have a GNex (Toro) VZW
MacBook running snow leopard.
I am afraid that anything give me advice on you're gonna have to pretend that I am really dumb and need step by step directions. I tried to push via ADB but got this error, I don't know the correct commands for that. View attachment 1508775 Any suggestions?
Click to expand...
Click to collapse
Since your on jb with blue recovery you should be able to Mount USB storage from recovery...mounts and storage>mount USB>plug into computer
Sent from my SGH-I997 using Tapatalk 2
Mounts
So when I boot CWR and go to the mounts and storage menu I only see the following options.
Mount /sdcard
Mount /system
Unmount /cache
Unmount /data
Format /sdcard
Format /system
Format /cache
Format /data
I've tried them all while plugged into my Mac, and nothing happens on any of them.
Try getting your adb set up.
I'm pretty sure that if you right click on the tools folder and go to get info or anything similar to properties, it will show you the whole Path.

[Q] Can't flash from SD Card

Good evening, XDA :cyclops:
I am having issues flashing from recovery!
Some device info: Motorola Xoom WiFi, fully stock and fully updated, unrooted, bootloader unlocked today, device wiped multiple times. This is my first day trying anything custom on this device.
I decided today that i wanted to go custom on my Xoom today and update it to KitKat via this method.
I have downloaded all the required files per the mentioned guide. While in recovery i go to apply update from USB drive, but it is not finding any of the downloaded files from the guide.
What I see is
Code:
Android system recovery <3e>
Choose a package to install:
/sdcard
../
The ../ is my only option to click and it obviously returns me to the main recovery menu.
All the zip files are on the root of the SD card, not in sub folders. I have confirmed via PC and another phone that the files are indeed there. I tried with a different, fresh, formatted (fat32) SD card, but I'm getting the same results.
The Xoom is indeed reading the SD card, confirmed via settings>storage.
I've tried using adb, but it's telling me the image isn't correct, but it's certainly possible I'm missing a step with adb.
Code:
C:\Xoom bootloader unlocker2>adb reboot bootloader
C:\Xoom bootloader unlocker2>fastboot flash R.A.H._TWRPv2.6.3_BigPart_selinux.zip
unknown partition 'R.A.H._TWRPv2.6.3_BigPart_selinux.zip'
error: cannot determine image filename for 'R.A.H._TWRPv2.6.3_BigPart_selinux.zip'
Yes, the zip is in that folder. I thought maybe I'd root first, so I tried that method with the root zip, but I'm getting the same error.
Is there something I can do to repartition this device and get it rommed, or am I doomed to use it stock?
Thank you for your time!
I found some information stating that I need to enable the SD card, but since I'm running up to date SW, and I can see the SD card from settings, I'm assuming that this isn't the case, correct?
I'm still stuck. Anyone around who could give me some advice?
scubab said:
I'm still stuck. Anyone around who could give me some advice?
Click to expand...
Click to collapse
It appears the XOOM does not like SD Cards that were formatted using Windows
(or perhaps Quick Formatted using Windows).
Using a 4GB FlashDrive formatted as Fat32 using Linux (i.e. Linux Mint 17.3 Cinnamon 64 bit boot CD)
resolved the issue.

[Q] tried every everything cannot upgrade to bigpart

I have two identical xooms. The model number lists as "Xoom". Android version is 4 .1.2 , build JZ054K, kernal version 2.6.39.4-g4e32b94 . I've been trying for days to update at least one of them. I'm using a Linux Mint 17 desktop. No Windows available.
I've tried everything I found on these forums, and nothing has worked. I have 32gb external sd cards in both of them. My first trak was to do it from the SD card but I found that recovery cannot see my SD card. I also tried putting " BigPart" in a directory called downloads, but that didn't help. I also tried loading it onto the internal card. Can't see it either way.
I downloaded the Linux android files and plugged in the USB cable. I could talk to the Xoom, and tell it to reboot the bootlooder into fastboot or recovery, and the Xoom would reboot but lock up at the "loading fastboot" screen. I tried sideloading the BigPart file, but the install would fail on validation. If I try to enter fastboot by rebooting it locks on the loading screen. If I load recovery on boot it appears to come up but It can't see the SD cards or accept the files from the computer (From adb).
One of these Xoom's I gedfied and the other was a google device when I bought it. Both got all of their last bunch of updates thru Google, until Google dropped them. Could the google updates have left something needed out??
As I understand the process getting Big part on the device is the first step. I have all needed files for the upgrade,on my SD cards and on my Linux machine. I just can't use them. Anyone have any ideas? Does anyone know where and what the OS is looking for during that attempted USB update??
Ok turning of Developer options
GreyBeard51 said:
I have two identical xooms. The model number lists as "Xoom". Android version is 4 .1.2 , build JZ054K, kernal version 2.6.39.4-g4e32b94 . I've been trying for days to update at least one of them. I'm using a Linux Mint 17 desktop. No Windows available.
I've tried everything I found on these forums, and nothing has worked. I have 32gb external sd cards in both of them. My first trak was to do it from the SD card but I found that recovery cannot see my SD card. I also tried putting " BigPart" in a directory called downloads, but that didn't help. I also tried loading it onto the internal card. Can't see it either way.
I downloaded the Linux android files and plugged in the USB cable. I could talk to the Xoom, and tell it to reboot the bootlooder into fastboot or recovery, and the Xoom would reboot but lock up at the "loading fastboot" screen. I tried sideloading the BigPart file, but the install would fail on validation. If I try to enter fastboot by rebooting it locks on the loading screen. If I load recovery on boot it appears to come up but It can't see the SD cards or accept the files from the computer (From adb).
One of these Xoom's I gedfied and the other was a google device when I bought it. Both got all of their last bunch of updates thru Google, until Google dropped them. Could the google updates have left something needed out??
As I understand the process getting Big part on the device is the first step. I have all needed files for the upgrade,on my SD cards and on my Linux machine. I just can't use them. Anyone have any ideas? Does anyone know where and what the OS is looking for during that attempted USB update??
Click to expand...
Click to collapse
Ok after 70 views and no responses, I'm giving up for now. Turn off deleloper options, and letting Google have their way with my Xoom android 4.1.2 . "I think" part of the problem is my Xooms will NOT boot into Fastboot. For what ever reason I do not know. The bootloader is still locked because I can't get to it to unlock it (using my Linux box) I know they can be unlocked because I did it a few years ago with my XP box (long gone). Is JellyBean the end for my Xooms?

Android phone as windows to go device?

Im wondering if its possible to create windows to go on android phone. I need as test device for laptops. But it would be awesome if this is even possible. Maybe creating additional partition from storage and them making that partition in rufus bootable. When connecting phone so u have option to make thar partition behave as usb stick so it will boot windows directly from that phone storage. Is this possible
Get drivedroid it's on the play store. IT REQUIRES ROOT ACCESS!!!!
wallor77 said:
Im wondering if its possible to create windows to go on android phone. I need as test device for laptops. But it would be awesome if this is even possible. Maybe creating additional partition from storage and them making that partition in rufus bootable. When connecting phone so u have option to make thar partition behave as usb stick so it will boot windows directly from that phone storage. Is this possible
Click to expand...
Click to collapse
Awesome! Why not have a try and let us know the result!
Hello, booting an iso or any kind of image file from your phone to pc is possible, but you may encounter some problems.
DriveDroid is a good app but it requires root
here is a guide
http://www.geekomad.com/2013/08/how-to-make-android-phone-as-bootable.html
good luck!

Categories

Resources