Linux Android sdk/adb autoinstaller - myTouch 3G, Magic Android Development

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

Related

Jesusfreke. Can you or another programmer please consider this.

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.

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.

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 .

Development Environment Setup: Hardware?

Asking this question because the attempt to get TWRP on my device is becoming a compound problem as the distance to being able to build it approaches 1. Otherwise known as the law of inverse noobness: Hindsight is always 20/20. Personally, not even half way to 1 in being able to do this, as am fairly new to doing things at the operating system level of programming. Not brand-new though, and knowing how and where to look things up helps, so if you have hints or can point me in the right direction that'd be great. First question is sort of along the lines of "how do you setup your dev environment" if you want to make it modular? More precisely:
So right now, the build page for AOSP concerning my device says to use Ubuntu 14.04 and do all those things to set it up for that. Do I need to do that in order to get TWRP built for my device? To have it set up the same way as the AOSP advises? Having a different computer for each dev environment would be a bit much, but running them in qemu seems even more ridiculous. Perhaps a better idea is to set up a "build environment" on bootable USB sticks that do all the work? That would simply a lot of things, like not having to swap out hard drives, and being able to easily clone a USB drive to "just work" and build AOSP/TWRP at will on any computer.
For reference, it is the Moto G Power (2021) "Sofia" device. They've released sources for it, but not much development going on. So learning how to do this for my device might just unlock TWRP (and with it, probably the Nethunter kernel/chroot environment) for other devices not yet supported.
Help me, help you. Thanks.
(Have other questions, too).
Why not use WSL2?
How to install Linux WSL2 on Windows 10 and Windows 11
The latest version of the Windows Subsystem for Linux is a significant upgrade; for most, it's now easier than ever to install.
www.windowscentral.com
jwoegerbauer said:
Why not use WSL2?
Click to expand...
Click to collapse
I don't use windows.
Bump.
Asking this because it seems that, being new to programming and having no formal training, I'm missing something from tutorials (like the TWRP git page, or some of the tutorials here on this forum that haven't been updated since 2013) and other material that might be thought to be "known" or "implied" and I just can't seem to understand what. Because when I go to build projects or whatever, following tutorials to the letter, still end up with errors and other problems that aren't covered in the tutorial. Part of that problem is installing dependencies, and then having them conflict with other installed things, like having two of python and three versions of java. So having a "build environment" to prevent conflicts is something that wasn't taught, but learned through trial and error, but that isn't the only problem I'm having.
McChadwicke said:
For reference, it is the Moto G Power (2021) "Sofia" device.
Click to expand...
Click to collapse
Hmm. I have the same model, but it's "borneo".
Did you build TWRP for your device? Any pointers or tips?
I usually just modify stock recovery to have rooted, permissive ADB.
I really don't need more than that in a recovery.
I haven't done much with my GP21 since the Firehose loader is restricted.
Renate said:
I usually just modify stock recovery to have rooted, permissive ADB.
I really don't need more than that in a recovery.
I haven't done much with my GP21 since the Firehose loader is restricted.
Click to expand...
Click to collapse
Not sure why the last reply didn't quote you...
Setting up a build environment is an evolving problem. As of this writing it seems the Ubuntu team is switching to a "pro version" system, a paywall, for some services...
Also, AOSP recommends Ubuntu 14 for a build environment. Gave up trying to run it from USBs lol, it is running on a dedicated system. But android-sdk is no longer available in apt, while running Ubuntu 14.04 + latest updates? So went to check why and now AOSP is using its own system for build environment setup and management. Tried running it in Ubuntu 14, but gave errors with the setup script provided.
Seeing now if I can't get the android sdk to run in Mint-XFCE... Will check back. TWRP build page says I need these things to build it (TWRP), right?
Also, how much of the preinstalled vendor crud can be pruned before it breaks?
Thanks.
Edit: reference on the TWRP guide I'm using is https://forum.xda-developers.com/t/...ompile-twrp-from-source-step-by-step.3404024/ (posted 2016)
I think that all build environments are getting more restricted.
"Just do it OUR way" seems to be the new corporate slogan.
I build Android apps without Android Studio, Gradle or an IDE.
Renate said:
I think that all build environments are getting more restricted.
"Just do it OUR way" seems to be the new corporate slogan.
I build Android apps without Android Studio, Gradle or an IDE.
Click to expand...
Click to collapse
Does TWRP have its own build control system? Considering all these changes, should it?
To keep things isolated, clean and manageable on host system, that has no dev tools
or anything extra besides standard desktop stuff. (under main linux distros)
#1 For smallest , fastest deployment of various build/dev environments i use schroot
on devuan/debian , it is a system to manage/automate the use of chrootable containers.
like regular manual chroot but most thigs are automated/preconfigured with
just a few commands and config files.
Basicaly a new root filesystem (userspace) that is independent of hosts root filesystem and just
uses hosts kernel (or as much/little acces to kernel as you give it trough schroot config files)
has its own packages and dependencies and will only see specific sections of hosts filesystem sections you give it access to like say /src/myproject from host. can be a separate /home
or shared with host, all depends on your config.
Using debootstrap to create the filesystems for containers of specific distributions/verions.
Or can just manualy copy an install and rip out the kernel etc...
(Can install ubuntu userspace in debian with debootstrap , if need be.)
(like lineageOS was hard to find all the correct/matching dev tools under devuan, so ubuntu it was)
#2 For something a bit beefier LXC on top of libvirt.
(regular chroot wont run services, or have its own networking , LXCs can , with some extra configuration)
#3 For when you just need an actual full blown VM os installation use KVM/qemu on top of libvirt .
(like installing 15 year old redhat 5.1 in a container wont work, kernels and main libs too far apart)
(or anything that is just too different from current linux kernel , other OS s etc...)
virt-manager is nice for graphicaly managing VMs and LXCs
#1 But schroot is essential and will suffice for more then 90% if not whole 100% of your needs.
if you want a clean host system from being clobbered by constant installing and testing and such . Keeps the environment contained in its own filesystem namespace , have as many as you need .
start fresh,rollback,clone etc.............
Once configured just start another tab in a terminal emulator and schroot in to the container
and your main host system in unaffected, always clean .
#4 Running all of this on top of ZFS takes it a step up, to the next level of effeciency.
zfs helps quite a bit with cloning,branching,snapshots, rollbacks but not essential,
like git versioning for things that are too big for or are not made for git management
(but is another system on to itself to learn, so ignore it if new to linux )
just cloning a 300Mb-1Gb base bootstrap install folder takes no time on regular filesystem on ssds .
With these 3 tools , you can have 10s if not 100s of different environments on a single host
quickly deployable once you get to know the procedures. all usable at the same time without
reboot,
#5 The most important is learning how to hunt for the right version of tools and all of the
dependencies and the correct versions of those , as each project will have their own
and will base it on their own distribution of choice at a specific point in time.
(by being able to install/test/restart in container makes this whole process , easier)
you can test many different ideas at the same time , and merge what works in
to your own dev-build-env for a specific project.
(like hunting down correct tutorial for specific/old/obscure phone and a rom and recovery
and rooting tools associate from a time long past. using wayback machine to source
correct versions of each , as normal web has erased them )
even used schroot to install games for nephew from untrusted sources without hesitation,
and just delete the container when done, but that was a bit more involved as proprietary
nvidia drivers had to be installed on host and partially in containers.
dandudikof said:
To keep things isolated, clean and manageable on host system, that has no dev tools
or anything extra besides standard desktop stuff. (under main linux distros)
#1 For smallest , fastest deployment of various build/dev environments i use schroot
on devuan/debian , it is a system to manage/automate the use of chrootable containers.
like regular manual chroot but most thigs are automated/preconfigured with
just a few commands and config files.
(like hunting down correct tutorial for specific/old/obscure phone and a rom and recovery
and rooting tools associate from a time long past. using wayback machine to source
correct versions of each , as normal web has erased them )
Click to expand...
Click to collapse
neat. schroot looks like a solution. answers a lot of questions, anyway. that last part scares me though. using the wayback machine to source things jeez. there's gotta be a better way, but probably not unless i want to do it myself which will only add time to "the project".
McChadwicke said:
neat. schroot looks like a solution. answers a lot of questions, anyway. that last part scares me though. using the wayback machine to source things jeez. there's gotta be a better way, but probably not unless i want to do it myself which will only add time to "the project".
Click to expand...
Click to collapse
That was just worse case scenario if you get in to very obsolete/old/abandoned stuff (10-20 year old) projects/hardware etc...
dandudikof said:
10-20 year old
Click to expand...
Click to collapse
yeah some of the hardware is in that range. actually upgraded one of the old rigs (because parts are cheap) from an athlon to a phenom lmao thing has 16gb ram, it is stacked now with top of the line things from that era. keeping it around for nostalgia's sake at this point since it still works.
xmrig gets abysmal hash rates, not even worth running on older hardware.

Categories

Resources