Jesusfreke. Can you or another programmer please consider this. - G1 Android Development

In the next update on the recovery console, would it be possible to add a script that when you type /? like in old dos commands, that you will get a list of bash commands? Or does such an animal already exist.
I have a copy of about 5 sheets of paper listing all linux bash commands (similar to dos but without all the syntax).
While updating one day, I messed up and started from that point on trying to learn the linux commands that copy files, rename files, remount /sdcard and so on. Its fairly simple, but it would be nice to do for example remount/? and give you the proper usage of remount and so on. I know most of you all are not DOS fans, but I need a ground zero to start from if i wanna learn the way this runs, without carrying around a stack of papers with me .

--help works eg. ls --help

dont have a g1 yet so cant try it out, but what if you try remount --help or maybe its just one -

i will try that
I didn't see it in the list.

i dont think that wud the greatest thing becuz wat if ur typing a message anything you type in can damage your phone

kay11224 said:
i dont think that wud the greatest thing becuz wat if ur typing a message anything you type in can damage your phone
Click to expand...
Click to collapse
Huh? Wah?

Well I tried --help
This only helps if you happen to know the bash command. It is a step in the right direction.
What I am referring to is a list of /? help files.
It is a list of commands to include such commands as ls, cp, rm, remount, cd .. and so on. The reason why I say it is because with a small description of the bash commands people that have a working knowledge of computers, but not neccessarily of linux would be able to use it.
I know eventually I will probably remember the commands or at least the ones most important to me. I only ask because it took me about 1.5 hours to figure out a simple delete filename X.zip (rm update.zip), Copy filename X.zip to /sdcard (cp blahblah.zip /sdcard), mv blahblah.zip update.zip.
It took me using another computer to figure out those simple commands. I know it seems like I am asking something very redundant and simple, but I don't understand why linux command line doesn't have a help list of terms.
It wasn't until I read these bash commands that it dawned on me that recovery.sh was the recovery script to be executed from the command line. I couldn't have used it anyways, because by then I had already messed that up too.
Suffice to say I got my phone up and running and I am feeling a little proud of figuring it out on my own.

Brutal-Force said:
This only helps if you happen to know the bash command. It is a step in the right direction.
What I am referring to is a list of /? help files.
It is a list of commands to include such commands as ls, cp, rm, remount, cd .. and so on. The reason why I say it is because with a small description of the bash commands people that have a working knowledge of computers, but not neccessarily of linux would be able to use it.
I know eventually I will probably remember the commands or at least the ones most important to me. I only ask because it took me about 1.5 hours to figure out a simple delete filename X.zip (rm update.zip), Copy filename X.zip to /sdcard (cp blahblah.zip /sdcard), mv blahblah.zip update.zip.
It took me using another computer to figure out those simple commands. I know it seems like I am asking something very redundant and simple, but I don't understand why linux command line doesn't have a help list of terms.
It wasn't until I read these bash commands that it dawned on me that recovery.sh was the recovery script to be executed from the command line. I couldn't have used it anyways, because by then I had already messed that up too.
Suffice to say I got my phone up and running and I am feeling a little proud of figuring it out on my own.
Click to expand...
Click to collapse
"bash comes with help for all built-in commands. To see a list of all built-in commands, type help. To obtain help on a specific command, type help command, where command is the command you need help on. Here's an example:
bash> help alias
...some help text...
Obviously, you can obtain detailed help on the bash shell by typing man bash at your command prompt at any time."
The shell on the G1 doesn't seem to support it though...you would be better off getting comfortable in a real Distro and then apply the knowledge on the much less robust G1

This isn't quite so simple on Android.
First, you're not using bash. You're using either the android shell which is pretty limited or you're using the busybox shell (reachable with "busybox sh") which, I believe, is bourne shell compatible, but lacks some new features of bash.
Busybox is an single executible that implements a bunch of the common linux command line utilities. You're intended to symlink a bunch of command names back to busybox, but last I checked, this wasn't done so as to avoid stomping on the native android commands. You may need to type "busybox <command>" to run the right one.
To get a list of supported commands, run busybox with no arguments. Some commands have a --help option, but that won't be helpful for much of them unless you're already familiar with them.
The full documentation for any command is available as a "man" page (manual) on most linux systems, but you're not going to see it on an embedded system like android. But if you do a google search for "man <command>", you can easily find them. Many of the less basic options listed in the man page may not be available in the busybox version.

To get a list of busybox commands just type 'busybox'
If it flies off the top of the screen, type 'busybox | more'
I hope that helps.

Thanx everyone for the replies.
I had already printed out a command list which I googled. I will definitely try the busybox command. Although computers are not new to me, linux is. I am just having a slow time getting started, especially since busybox really isn't linux.

Why developers won't implement this request:
Brutal-Force: It's good that you got an answer by printing out a reference. That definitely will help you. Most of the utilities in JF's images support the standard GNU format of --help instead of /? so you're most of the way there.
Now, here are some reasons you won't get your actual request.
1) ? in the sh style shells is a protected character. To get remount /? you would actually have to type remount /\? or remount '/?'
2) All of the applications themselves would the have to be changed. Their relevant "getopts" or self-implemented methods of reading cmdline options would have to have the /? added to them. There's not a common point to change there. A quick count shows me over 150 different applications that would have to be changed.
3) It's ridiculous to cater to such a small crowd for something that is so labor intensive and can be done better with a simple documentation search.
Now go forth and RTFM. You'll be a better hacker for it.
note: JF likes notes. So do I.
note: A "hacker" is somebody like JF who makes hackable things do what hacker wants. Those other malicious @$$holes are called crackers. We don't like them.

whoa whoa whoa
First and most importantly,
BASH != DOS
Ever. Period. Don't even compare the two.
That said, learn how to google. BASH is very complicated with tons of command, keywords, etc. It is a scripting language after all.
Now, I do not see how it took you 1.5 hours (!) to figure out cp, as the first result of 'bash + how to copy files' in google gives you a link to all you could want to know.
For a complete list of command, type 'man busybox' in google and you are all set. Infact 'man YYY' will give you the manual for any command in Linux. Bash is not for those who do not want to learn, but, if one does learn it, there is no turning back from its goodness

Ok, Please take it easy on me.
This was not a "compare dos with linux" thread.
It was not a make my work a little easier thread.
I was updating 1.41 RC33 themes "AS USUAL". One of the theme designers made a boo boo. My phone went into loop while I was at work. The only computer I have access too does not have a USB port and is a Network computer that does not allow me access to this site. That being said, the only reference I had was to google linux commands. From the printout I had to figure out what does what. cp does not equal copy even though it shares two of the same letters. mv does in no way resemble rename so how on earth was I supposed to equate the two.
The problem with most people who already know linux is that they are not as helpful as a Dos or Windows "?" If they were I am sure there would be alot more people willing to give it a try. This is not really a rant, but I was asking for help, not begging to be tortured.
A few of the answers i.e. busybox helped. I did not know this, and at the time I could not look on the forum for help. I do not know about these other commands as well. Despite all that I was able to figure it out from a printout, I was just saying that knowing the list of Android based unix commands with a small one or two word description would go a long way.

P.S.
Thanx Just, Tiber and Boogie for helping me and not flaming me.

Bagkawilo
"Now, I do not see how it took you 1.5 hours (!) to figure out cp, as the first result of 'bash + how to copy files' in google gives you a link to all you could want to know."
See here is where you let your mightier then thou attitude get in your own way. For the record, that was exactly the pages I have printed out. Additionally, those pages give you way to much information to perform a specific task such as copy. Now, if i had gone to cp (Which again by the way does not mean copy to me, yes I might have figured it out quicker) but to me cp might as well have been cd.
Before I even got to that command I first had to figure out how to even access my sdcard. Next because this IS NOT DOS changing directories is, while similar, NOT THE SAME. What you have been practicing for quite some time may seem quite trivial to you, but for others its like learning a new language. I could perform the same functions in Dos or Paschal (The programmers language I learned in 15 years ago), BUT I am trying to learn YOUR language.
Seriously, I hope you never have kids who ask you how to do homework.

Just a thought
Brutal - I hope you don't think I was flaming you (you didn't mention me), because I certainly wasn't. It does come to my attention, though, that perhaps having root access on a bleeding edge image on a Linux based phone without any Linux experience is maybe like learning to pilot the Death Star before you figure out how to change the batteries in your light saber. It's good that you're learning along with the rest of us, hang in there. My recommendation: go download a copy of Slackware Linux and install it in a VirtualBox machine. Break it. Fix it. Learn how you fixed it. Break it some more.
/Just sayin...

ccosby said:
It does come to my attention, though, that perhaps having root access on a bleeding edge image on a Linux based phone without any Linux experience is maybe like learning to pilot the Death Star before you figure out how to change the batteries in your light saber.
Click to expand...
Click to collapse
As much as I enjoy a good Star Wars reference, this is a little off. I think it's more like learning to pilot a Speeder Bike before you figure out how to change the batteries in your light saber. We all know an Ewok can do it but just like the furball it's easy to go flying into a tree!
ccosby said:
go download a copy of Slackware Linux and install it in a VirtualBox machine. Break it. Fix it. Learn how you fixed it. Break it some more.
Click to expand...
Click to collapse
I'm not denying that is not a great way to learn, but unless you have a goal you're trying to accomplish it usually doesn't accomplish much. In my case I'd played with a copy of red hat years ago but without purpose so I didn't gain much. Recently I purchased a new router and loaded on a copy of DD-WRT. I had read about using it directly as a server (ftp/web/dlna) and even a bit torrent client. I wanted to use these features, so it took me a week of learning linux to get them installed. I broke the new features alot, but I didn't break my router.
So where am I going with this? I think perhaps instead of telling people to go out and learn it somewhere else, providing the answer and pitfalls to avoid would be more productive.

Like Benmeyers said.
I have had a couple different linux os's on my machine over the years, but they were only installed a very short while. I didn't see the "necessity" over windows.
Like Benmeyers said now I have a need for it. As many have pointed out, the busybox is not actually linux. What I need is to learn all of the busybox commands, which many have given me useful tips. Installing a while distribution of linux on my computer might just be overkill, and with root, I can do it just as well, after all.. it is like installing debian on my phone.
While I lived in Germany for 8 years, I HAD to learn to speak German, I went to a German Trade School because there were no American ones, and people at the one I went to did not speak English. My point is out of neccessity I had to learn it, and there were Germans who were proud that I was taking the time to learn THEIR language. I became very fluent because people took the time to help me. The ones that just laughed at me are the same ones that complained that the stinking Americans and other foreigners never bother to learn their language.
Anyway, thanx for all the help.

Related

Linux Android sdk/adb autoinstaller

I usually hang out over in #koush irc channel nick LrdElderon or the cyanogen boards and most of my time seems like it involves helping users install the sdk, especially on linux distros.
So I made a small install script executable. Just plug in your phone with usb debugging (im a droid person so whatever your equivalent is) and run the script.
kde should run with a single left click, popping open a box to start. gnome you will probably have to right click file -> open with other application -> I believe at the bottom it has command? enter bash press enter and it should work.
If you are on 64 bit ubuntu based distros it will download the 32bit libraries you need if you don't have them. It should hopefully work on rpm distros, but i have no way to test so I'm guessing. It needs yum however.
This is an area that will prob require feedback. Im not an rpm distro fan so not much knowledge for it. it also moves the sdk to /usr/local/androidsdk and links the tools folder to the global path.. at least in ubuntu/kubuntu distros.
it then auto adds a udev file with your user name and phone id vendor number to get it working.
I added all the vendor id codes on Googles page for the various companies making phones hopefully no problems ensue!
when it's done you should be able to unplug / replug if needed then type adb devices and have it start... then adb shell.
Also of note is this should work for ANY android phone.... so if it works for you spread the word. I don't want to get in trouble for cross posting all over. Im still learning the rule hehe
#apparently I can't post outside links?? even when i upload here so a friend will have it in the next post.
Note this is linux android sdk/adb installs only.
feed back comments or donations if you are feeling generous can be sent to the email shown at the end of the program.
Clicky Links:
http://www.mediafire.com/download.php?jnnhzozmj03
http://www.sendspace.com/file/m3us4t

Mac Users&Android

Recently I've been trying to teach myself how to develop for our phone, but I'm using a Mac. I have a Windows Partition, and can run Windows on my Mac, but it's a pain to have to restart just to use a single program for whatever it is that I need done. So I've done some research and thought it would be nice to share all the programs that I've found that help in Android Development.
It would also be nice if other Mac Users would share what they have found as well or what they use when trying to accomplish certain tasks when working with android. So here goes:
--Android SDK--
This is rather obvious…that being said you can download this from android.com. However, if you chose to install Eclipse I find installing the SDK from Android to be rather Redundant, if you agree go on and read the part about Eclipse.
--Wine/MacPorts/xCode--
First, sometimes it's useful to use Windows programs on Mac, and an one quick way to do that without having to reboot is with Wine. It takes a while to set up, but it is useful for running MOST executables. The last two programs you install as part of the tutorial, so follow on:
So here is the website I used to set up Wine: http://www.davidbaumgold.com/tutorials/wine-mac/
All of his instructions are accurate excluding where he talks about installing xCode. It is OK to install xCode through the App Store, all you have to do afterwards is install Command Line Tools. To do this:
1. Open xCode
2. Open Preferences (cmd+,)
3. Click the Downloads tab
4. Use the link to create an Apple Dev account
5. Click Command Line Tools
Now you can continue to follow the rest of the Tutorial
--Eclipse--
This program is useful for creating Android Applications on your phone. If you choose to install Eclipse I would follow this guide once you're done. I realize it is for creating Android Applications but it also explains how to set up a working environment.
So here is the website I used to set up Eclipse: http://www.vogella.de/articles/Android/article.html
I would start at section 5.1
Also Eclipse can be used for compiling .9.png files…I found a good tutorial for this on XDA: http://forum.xda-developers.com/showthread.php?t=487001
Go hit damnitpud's thank meter if you find his thread useful
--APK Manager--
I found this tool extremely useful for pulling APK's and pushing them to your phone. This app can be used for Themeing apks, or editing the XML files.
I found this application on XDA as well: http://forum.xda-developers.com/showthread.php?t=1285130
Go hit s0niq3's thanks button, maybe it'll convince her that people actually care about her program.
--android-utility or AU--
This little program looks to be extremely useful, I found it while searching for a way to compile .9.png files without having to use Eclipse. But it also has a host of other applications and uses. Make sure you read the thread thoroughly and follow all instructions.
I found this application on XDA as well: http://forum.xda-developers.com/showthread.php?t=1167623
Go hit tommytomatoe's thanks button as well, he gave us a marvelous little program. There is also a version for windows now, well at least part of it.
[For windows, and Linux Users: http://forum.xda-developers.com/showthread.php?t=1272513]
Go hit kakomalo's thanks button
If you download the version 1.0.1 and you try to compile a .9.png file, and you receive an error telling you that aapt is missing, all you have to do is drag and drop the aapt from the Android SDK into /android-utility/utility/
--xUlitimate--
I'm not sure if this one is worth mentioning for Mac, but it would be kinda cool if someone figured out how to get this to work with Wine…so here it is:
So here is its link: http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
This one has some theme tools. I found it specifically for the Draw9Patch Compiler, but I could not get it to work nicely with wine.
--Gimp--
This one is well known, so I don't think it needs much explanation…but it is image editing software.
Here is the download link if you don't already have it: http://gimp.lisanet.de/Website/Download.html
---Finally
After spending hours searching, downloading, and finding out what works I thought I would share to save someone else the expense of having to go through the trial and error. I would love it if other Mac Users, or any one else would share their knowledge on programs they use when working with Android; to theme, compile ROMs, or any other activity related to Android while pertaining to Mac.
Also, if you mess up your computer while doing this it is your own responsibility
Don't know why you haven't got any thanks for this, here's one from me for a very detailed and informative post. I am not a Mac user but thanks for your contribution.
Well I guess I just gave you your first thanks!
This post should be a little useful for Mac users... especially those that don't understand Unix.
Developing on Mac can be very similar to developing on Linux. Mac is just slightly more GUI oriented. Unix commands are the same, though.
So Linux users could use this guide as well!
EDIT: After I posted... I noticed 4 more users had thanked you as well... o-o that was fast
Haha oh thanks guys! After the first couple of days I thought my thread was going to get swallowed up. I'm starting to think that Mac Users are rare amongst Android developers. I do realize that other Unix OSs like Ubuntu are favored more, but sometimes it's a pain to run these back and forth. I've even tried to VM UBUNTU, but I had a problem getting the USB to interface with the program, whether it was how I sent it up, or the program itself I have no idea. So I went out looking for alternatives. There is always triple booting I suppose.
Sent from my SAMSUNG-SGH-I727
I'm use a Mac at my office, and not by choice. Thank you for this extremely helpful post!
Great guide for anyone who is looking to start developing for Android. Better yet, for people who need to get the jist of what is going on in UNIX!

Linux/Android help for a beginner

Hey all-
I'm very interested in learning Linux in order to not only do cool stuff at home with my own computer, but also to perhaps be of service in developing ROMs and give back to the devs who've helped breathe life into my ol' OG Evo for nigh-on two years now. If I ever got to the point of doing some 'grunt work' and helping out on a project, that'd be awesome for me.
Here's where I'm currently at with Linux: I've followed instructions to dual-boot Ubuntu on my Windows 7 laptop (yay!!!!), but other than installing Chrome and using all my Google services (Gmail/Docs/etc.) through that, I'm not really sure what else to do in order to become fluent with Linux. It's kind of like reading a book on how to build a car, but not knowing one end of a wrench from another.
Here's where I'm at with Android: I can follow instructions to root my phone, flash ROMs, install the Car-O-Dope tweaks on GB ROMs using System Tuner and ROM Toolbox, and most basic things that include using Smelkus' recovery (flashing, wiping, nandroid/restoring, etc). I'd say I know more than the average Android user, but certainly not as much as the experts here.
I've looked on a variety of forums both here and on Ubuntu's site, but I'm not really sure how people got their start using Linux and how they progressed from there in terms of fluency with Linux, applying that to Android developing, and also generally using it as a 'one-stop shop' for home use. I've read about people being able to build HTPCs on the cheap, using a computer as a file server/web site host (my wife's a graphic designer, but hates technology, natch)/media streamer/home security server, but as soon as the instructions get to "Ok, now open up your command line and follow these 28 steps......", I get a bit gun-shy.
If anyone's got any helpful tips on how they got started, any good beginner's guides (project-oriented would be great, just as reading a book on speaking a foreign language is no substitute for conversing with a native/fluent speaker), and how they grew in fluency or just any general advice, it'd be greatly appreciated. I'm putting this here and spreading it around in the hopes that some of the WAY talented XDA devs and members I've read so much from will toss a bone in my direction.
Thanks for reading and for any help!
Get very familiar with Terminal. For Android dev or otherwise, it is essential. Reading man-pages is also good to learn new commands better. In Terminal, just type "man man" minus quotations. That will get you going.
Sent from my PC36100 using xda premium
You should definitely make an effort to become comfortable with the Linux command line environment (also known as Shell, the most common Shell currently is BASH).
Try giving yourself some useful activities to do, such as: setting up a home file server with Samba, setting up a media streaming server (DLNA - Plex Media Server is a great program for this), just little things like that.
Before you know it you'll be a pro
markinaus said:
You should definitely make an effort to become comfortable with the Linux command line environment (also known as Shell, the most common Shell currently is BASH).
Try giving yourself some useful activities to do, such as: setting up a home file server with Samba, setting up a media streaming server (DLNA - Plex Media Server is a great program for this), just little things like that.
Before you know it you'll be a pro
Click to expand...
Click to collapse
So, is Bash something I download/install, or should it be already 'packaged' in with Ubuntu?
go to the development forum on ubuntuforums.org and find out how to upgrade to ubuntu 13.04. As that version is currently in development you should get a chance to learn a few things. That's how I learned modern linux distros. Also setting up and playing around with Ubuntu server edition might be helpful.
For app development Google some Java tutorials. Once you get the beginners stuff out of the way you should be ready to learn android development with your new Java skills.
Sent from my GT-I5500 using xda app-developers app
---------- Post added at 06:01 AM ---------- Previous post was at 05:47 AM ----------
just using Ubuntu for your day to day tasks should also help. When the other Guy was talking about bash he was talking about the terminal in Ubuntu. its a command line that lets you enter various commands. Google 'Ubuntu terminal' for more info
Sent from my GT-I5500 using xda app-developers app
Joshmccullough said:
So, is Bash something I download/install, or should it be already 'packaged' in with Ubuntu?
Click to expand...
Click to collapse
No Bash is something that is already packaged with Ubuntu, it is one of the most essential elements of Ubuntu (and Linux in general) because it gives you a means of interfacing with everything else. If you have a type of Linux with no graphical interface, then the shell is your only means of interfacing with the operating system at all.
So in short, yes Bash is packaged with Ubuntu and every other kind of Linux out there (if it's not, a different shell will be packed with it, but Bash is the most common one).
Maybe something for later but I have seen a number of different Dev threads about getting started with AndroidDev, I know that I have seen at least about 10, all from different perspectives/starting points. One that I could find easily was the following:
http://forum.xda-developers.com/showthread.php?t=1778984
Check it out. Basically, says ... Linux (fundamentals), CLI (command line interface or shell, fluent), Java (fundamental), XML (medium), SDK (medium) and Time - to start with at least. Hope that is useful.

[Q] Need help increasing a Linux logical volume size

I need some help increasing my root directory size in a Linux distro. Its 20GB and I want to make it 40GB. My root "/" is type ext4 and is mounted as /dev/loop0 on /dev/sdb1. I have 158GB fee space on /dev/sdb1 that I want to expand into. What is the correct command (lvextend, fsadm?) and parameters??
elfaure said:
I need some help increasing my root directory size in a Linux distro. Its 20GB and I want to make it 40GB. My root "/" is type ext4 and is mounted as /dev/loop0 on /dev/sdb1. I have 158GB fee space on /dev/sdb1 that I want to expand into. What is the correct command (lvextend, fsadm?) and parameters??
Click to expand...
Click to collapse
/dev/loop0 must have a backing file, not a partition - and what kind of filesystem is on /dev/sdb1?
(and how is this related to the TF700?)
_that said:
/dev/loop0 must have a backing file, not a partition - and what kind of filesystem is on /dev/sdb1?
(and how is this related to the TF700?)
Click to expand...
Click to collapse
ntfs
(its not exactly, but could be relevant for a dual ubuntu boot config)
Ok so getting no reply, I get the message that this post should not be on any Android forum, it should have been posted on a Linux forum which I subsequently did and found my answer (but the support there is very slow and not nearly as good as here ) Furthermore, I understand you are not paid to support Linux here only Android. Sorry, its just that you are such a valuable one-stop resource for such things I guess I got carried away and overlapped between OS's and issues and support. Even though Android is watered down Linux, I will keep the distinction clearly in mind when posting here at XDA in the future.
To close out this thread, the question was related to a dual boot Linux Mint (Debian, Ubuntu) installation done thru Windows Wubi vs live CD. The problem with such an installation is there is no default way to grow and shrink LFS space unlike a full install to a dedicated partition then use GParted to adjust the partition size on the fly. But then there is, if you did into it. I was just hoping to get a pointer in the right direction from you @_that. But you may not actually know about this since you are smart enough to never use Windows to install Linux. I felt it was safer to not have to repartion, but that decision quickly lead me to other problems like running out of root and user space. I'm glad a few solutions to this problem exist and I don't have to do two (2) full reinstalls (one at home and another at work). And what's really frustrating is I did my homework, read the installation guide, and nowhere is this discussed, its implications and limitations, until its too late and you realize you are quickly out of space. Its at least a good thing to know about. Wiki has two guides also you can get to from this link. Done here now.
http://matthewcasperson.blogspot.com/2012/10/increasing-ubuntu-wubi-disk-image.html
elfaure said:
Furthermore, I understand you are not paid to support Linux here only Android.
Click to expand...
Click to collapse
I'm paid to support Android here? What are you smoking? :cyclops:
elfaure said:
To close out this thread, the question was related to a dual boot Linux Mint (Debian, Ubuntu) installation done thru Windows Wubi vs live CD. The problem with such an installation is there is no default way to grow and shrink LFS space unlike a full install to a dedicated partition then use GParted to adjust the partition size on the fly. But then there is, if you did into it. I was just hoping to get a pointer in the right direction from you @_that.
Click to expand...
Click to collapse
You could have mentioned the Wubi stuff before. When I have little time or motivation, I only answer good questions. As you guessed correctly, I have no experience with Wubi and I'd have to do some research myself - contrary to common belief () I don't know everything, but I can use the web to find answers. You found the answer yourself, so you don't need me to do your homework. :victory: Isn't that more satisfying than getting answers spoon-fed from me?
@elfaure: don't be the lightly flammable guy. As you mentioned yourself: this is an Android forum, and I know jack **** about Linux, at least not above the level of shell knowledge I need to administer my NAS system and the tiny bit of shell work I have done on the 700. No hard feelings on my side, but this just isn't the prettiest place to post questions like this.
_that said:
I'm paid to support Android here? What are you smoking? :cyclops:
You could have mentioned the Wubi stuff before. When I have little time or motivation, I only answer good questions. As you guessed correctly, I have no experience with Wubi and I'd have to do some research myself - contrary to common belief () I don't know everything, but I can use the web to find answers. You found the answer yourself, so you don't need me to do your homework. :victory: Isn't that more satisfying than getting answers spoon-fed from me?
Click to expand...
Click to collapse
Most satisfying is finding nothing on the net that works, figuring it out for yourself from bits, pieces, and clues then putting it all together in a guide to spoon feed others. Nothing paid about open source I guess. I didn't know. And if I told you what I was smoking, I'd have to take the 5th.
http://forums.linuxmint.com/viewtopic.php?f=46&t=138781&p=738127#p738127

Surely This Wouldn't Work, Right??

Hello fellow forum go-ers of the Security section!!!!
This is my favorite area on this site & always makes me start thinking outside the box so to speak.
So i was thinking about Ubuntu & the ability to run a SU shell within it (not sudo but an actual SU shell by typing 'su' & providing your set password)
Would I be able to launch ADB commands from this SU shell & in turn run commands as any form of top tier user on my unrooted Android device???
Any responses appreciated!!! I really would like some input here on why this would or wouldn't be possible & how well the translated binary performs.
Thanks
No; but Yes. To some extent. This is why, in the *very* early days on Android, many XDA'ers had Terminal Emulator installed on our G1s. We could do build prop edits, push apps to install as system apps, "pull" backups, etc, etc.
These days I'm not sure, since I haven't experimented. However, I've got Kali on my tablet & a terminal app that lets me open either a Kali or Android command line either as a regular user, or as su.
I'm not sure if I helped here... Or if I just muddied the waters even more.
equi_design said:
No; but Yes. To some extent. This is why, in the *very* early days on Android, many XDA'ers had Terminal Emulator installed on our G1s. We could do build prop edits, push apps to install as system apps, "pull" backups, etc, etc.
These days I'm not sure, since I haven't experimented. However, I've got Kali on my tablet & a terminal app that lets me open either a Kali or Android command line either as a regular user, or as su.
I'm not sure if I helped here... Or if I just muddied the waters even more.
Click to expand...
Click to collapse
Little bit of both but that's fine as Kali is a small download! lol, thank you by the way, as my first device was an s2 skyrocket & I remember when it was literally almost all Unix/Linux & much more simple . More or less it killed me by falling out of the computer changes in tech while I caught up on the mobile side.
Again thank you!! as now im closer to certain that i haven't been wasting my time.
LilAnt530 said:
Hello fellow forum go-ers of the Security section!!!!
So i was thinking about Ubuntu & the ability to run a SU shell within it (not sudo but an actual SU shell by typing 'su' & providing your set password)
Would I be able to launch ADB commands from this SU shell & in turn run commands as any form of top tier user on my unrooted Android device???
Click to expand...
Click to collapse
Your android device has an operating system, which gets to make the rules about root. So does your computer. So, being root on your computer is not going to make you root on any other device -- that is, not unless the operating system on the other device is set up to really trust your computer a whole lot (or screws up).
So we might ask: why isn't it configured this way? Well, by way of analogy, imagine if anybody could get into your car and drive away, so long as they had the keys to some car! Or, to make that a slightly more fair analogy: imagine that your car would automatically assume that anyone who drives up in some other car, should be trusted and allowed to drive yours. Sounds like a bad policy, right?
As you may have noticed, some locks -- quite a lot of them, really -- actually do work that way: anybody with any key can unlock them. But those are not the kind of locks you want protecting your valuables while you're away
anonywimp said:
Your android device has an operating system, which gets to make the rules about root. So does your computer. So, being root on your computer is not going to make you root on any other computer -- that is, not unless the operating system on the other computer decides that it really trusts your computer a whole lot (or screws up).
We might ask: why isn't it configured to trust you? Well, by way of analogy, imagine if anybody could get into your car and drive away, so long as they had the keys to some car! Or, to make that a slightly more fair analogy: imagine that your car would automatically assume that anyone who drives up in some other car, should be trusted and allowed to drive yours. Sounds like a bad policy, right?
As you may have noticed, some locks -- quite a lot of them, really -- actually do work that way -- anybody with any key can unlock them. But those are not the kind of locks you want protecting your valuables while you're away
Click to expand...
Click to collapse
But theoretically in the real world i would just pop your cars hood, link up a NAPA BlueFuel On Board Diagnostics Tool (costs about $80 on Amazon) to your cars CPU, then proceed to unlock the doors with a button or simple OBDT terminal command. Then I could Jump Start your vehicle (after i stuck any similar models key into your ignition) & proceed to drive your car wherever i wanted just as if it were my own.....
What enabled me to do this? Having a similar models keys & some in depth administrative authority over your vehicle
For the sake of comparison those keys (Linux Kernel) and the Administrative Authority (The OS used to build the phones platform) should give me the same results (in my mind)
LilAnt530 said:
But theoretically in the real world i would just pop your cars hood, link up a NAPA BlueFuel On Board Diagnostics Tool (costs about $80 on Amazon) to your cars CPU, then proceed to unlock the doors with a button or simple OBDT terminal command. Then I could Jump Start your vehicle (after i stuck any similar models key into your ignition) & proceed to drive your car wherever i wanted just as if it were my own.....
What enabled me to do this? Having a similar models keys & some in depth administrative authority over your vehicle
For the sake of comparison those keys (Linux Kernel) and the Administrative Authority (The OS used to build the phones platform) should give me the same results (in my mind)
Click to expand...
Click to collapse
Actually, this is very often how Windows Domains work. Just "run as Administrator" and you have rooted your whole organization. Obviously that's not how it's intended to work and this would represent a mis-configuration of your Domain if your IT department intended to maintain administrative control. But, for whatever reason, this really does happen; it's not even all that rare.
anonywimp said:
Actually, this is very often how Windows Domains work. Just "run as Administrator" and you have rooted your whole organization. Obviously that's not how it's intended to work and this would represent a mis-configuration of your Domain if your IT department intended to maintain administrative control. But, for whatever reason, this really does happen; it's not even all that rare.
Click to expand...
Click to collapse
Okay Windows is not based on the Linux Kernel, you have no SuperUser capabilities as described on Ubuntu,
The main points of this disccusion were to point out the similarities in platforms & then again in the SU Binaries used on each specifically, thus (hopefully) creating a gap we could bridge, allowing for previous "unrootable" devices to gain root .

Categories

Resources