DERP (Device Environment Replacement Program)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
initial pre-alpha version 0.001
(Aug 3, 2013)
by fattire (twitter: @fat__tire)
tldr?
Derp is a general-purpose, platform-independent installer, written in python with wxpython, that executes .derp XML-based scripts to walk the user step-by-step through a ROM installation (or do whatever you want.) The idea is to replace text-based walkthroughs, howtos, and installation instructions by requiring a user to do almost nothing but run a .derp script and sit back. Derp walks through a series of scripted steps (as in, say, a ROM installation) and automatically does all the file downloading/adb/fastboot stuff while the user waits and maybe reads what's happening (at the script author's discretion). Derp also pre-installs and keeps Google's Android SDK tools up to date and even gives adb & fastboot a simple UI. .derp scripts are human-readable XML. Embedding bash and python is also supported in Derp, as is restricting scripts or even script parts to certain platforms. Derp runs as root on the local computer (it's an installer after all), and is open source/GPLv3 licensed. It also comes with sample scripts and a built-in tutorial for creating your own.
Still tldr? It's a script-runner thing!
-----
LONGER DISCUSSION...
WARNING: RIGHT NOW, DEVELOPER TYPES ONLY! This is not for end users...yet. Hopefully people will find bugs and help fix them before an end user uses this on a “live” computer with an actual device. Again, because this is a software installer, DERP AND ITS SCRIPTS RUNS AS ROOT. Never run random .derp or .xml scripts you find on the Internet. This could screw up your device AND your computer, so... treat it just like any other script you’d (not) run as root. Also, the discussion in this forum is how Derp is supposed to work, but of course, there may be (probably are?) bugs.
THE "PROBLEM" AS I SEE IT
Working on the CM wiki, I've grown to appreciate how varied firmware install methods can be. Some devices need rooting. Some need firmware downgrades. Sometimes you can use fastboot. Other times you can’t. Some systems need to unlock the bootloader, etc. etc.
Installing this stuff can be hard. Okay, maybe not for you, but how about your mom or dad? Could your grandparents buy a device today and put CM on it themselves? There's been some chatter on the interwebs about how to make rooting and replacing firmwares easier... some kind of graphical installer seems to be the answer. But there are a million devices out there...
So people have been using text-based HOWTOs, walkthroughs, step-by-step instructions, and/or shell scripts and batch-type files to do this. I thought maybe a generic, unified scripting method might work better that gives the users readable instructions but optionally automatically does technical steps for them.
Hoping to avoid creating yet-another-standard-way-to-do-something, back in February, I searched online for generic installation solutions. But they all seemed to be platform-dependent, or weren’t licensed for general use, or looked really ridiculously complicated....
So (and big caveat here-- I'm not a programmer!) I whipped up a proof-of-concept for developers to play with to start thinking about how to address the issue. It took me a few weeks to get going, but ended up sitting collecting dust for months as I worked on other things and occasionally bothered friends to test the latest version.
Derp is not necessarily intended as any kind of final solution per se-- it’s just for further discussion/testing. A totally legit question to be answered: is this in any way even a good idea?
Let's find out.
SO WHAT IS DERP?
It's a general-purpose installer, written in python with wxpython, that executes .derp XML-based scripts to walk the user step-by-step through a ROM installation, optionally doing all the "technical stuff" like downloading files and running commands in the background. Ideally, you wouldn't have to write a long tutorial for every platform on how to do stuff-- a .derp script could BE the walkthrough.
The first thing Derp does is install the latest adb and fastboot from Google. That looks like this:
(Mac version)
Next, when you run a .derp script, it can automatically download and verify ROM files like CyanogenMod or tools or whatever from the Internet, and then install them.
(Linux version)
(Mac version)
As it does all this, the script can provides information and/or feedback to the user via a UI that hopefully looks like a normal installer. What the user sees is written by the script author in simple HTML. As the .derp script runs, the user simply ftaps "Continue" to proceed through the scripted steps.
As mentioned, .derp scripts are written in XML, which is platform-generic and easy for a human to read. The .derp script syntax, explained below, is also very simple. The script author is also free to embed bash shell scripts or python (or both) if advanced stuff is needed.
Worth mentioning too-- sections, steps, text, actions, or entire scripts can be restricted by the type of computer its running on (ie, don't run certain python commands on Mac, but do run them in Linux, or whatever).
And finally-- while my initial thought was to use this for installations of ROMS like CyanogenMod to a device, I'd think Derp can be used for many kind of installations or scripted operations-- even to wrap a UI around a bash or python script to make it easier for users to run without having to open a Terminal and start typing. Derp scripts don't even have to have to be used for anything to do with mobile devices, though it does pre-set up the Google SDK tools for that purpose.
In fact, a Derp script can do NO actions-- simply serve as a click-through set of HTML-based instructional steps for a user to follow by hand. Conversely, it can say nothing to the user but "Stand by, doing everything." and that's it.
FEATURES:
Easy to install. Debian-based Linux just uses sudo dpkg -i derp_0.001-1_all.deb and it's ready to go. Mac users: it’s Derp.app. Done and done.
Derp is GPLv3-licensed and source code is available now. Read license for terms, conditions, and more disclaimers.
Automatically downloads/updates all SDK tools (primarily adb and fastboot) directly from Google at every launch. So the user is always up to date. (also requires users to agree to Google's T&C...)
Uses an XML-based, OS-neutral installation script format that is easy to write and understand. Just about anything you want the user to do-- restart in bootloader mode, unlock the device, etc-- the derp script should be able to do. Even run bash or python scripts from within the script.
XML Tags:
<derp> - the main tag for a derp script.
<section> - a major category for individual steps.
<step> - Put as many of these in a section as you want.
<info> - The stuff the user sees as the script runs. You can add HTML tags to make it look good.
<file> - tell derp a file’s URL, MD5/SHA hash, and local filename. Derp will grab it and verify it for you automatically. These files can be roms, scripts, recovery images, etc. whatever your script needs to do its job.
<action> - valid “action” types include “adb”, “fastboot”, “python”, and “bash”. Future versions of Derp can add more. <action> allows your script to do stuff. Never worry about whether the user installed and set up the latest versions of adb or fastboot properly. They should "just work".
Using the above tags, you can not only have your scripts automatically do full installations, rooting, bootloader unlocks, etc, but simultaneously tell the user what’s happening behind the scenes if you choose. The user feedback is written in standard HTML-formatted text. The user just hits “Continue” whenever you want to move from one step to the next.
Included are example scripts to install CyanogenMod 10.1.2 on stock Nexus 7, Nexus 4, Galaxy Nexus, and HTC One. The latter script, written by Cowmix, demonstrates how to embed python to interact with the user, and they all include bootloader unlocking.
The only things I can think of that can’t be done automatically are steps that requires hands-on (ie, holding down buttons during power-on) or where, say, debugging mode needs to be manually turned on, or the slider needs to be physically unlocked. In the few cases where user involvement can’t be avoided, the <info> tag can be used to walk them in “real time” through that step.
A built-in tutorial on how to write your own .derp scripts explain how the tags work. (The tutorial itself is a .derp script.)
A console window helps you see what derp is doing in real-time...
Also included: a quick-access adb and fastboot text-entry in the console. This lets you start up Derp and type quick adb or fastboot commands without needing a terminal (or to deal with PATH issues)
“Debug Mode” lets you go through the script without invoking the <action> tags. Makes writing scripts easy.
Derp should automatically detect when a device is connected via adb or fastboot and let you know.
You may filter any Derp tag (including <action> tags) by operating system. This means that using a single script, the user can see different text or the script may behave differently depending on the platform. In fact, you can restrict the entire script to a particular operating system(s).
The script doesn’t actually have to “do” anything. It can be used simply to create walkthroughs or tutorials in a much nicer format than a step-by-step text file. Just link to a .derp file and let it walk the user through whatever. Easy to convert a text walkthrough to an interactive click-through just by adding <section> and <step> tags.
WHY MUST DERP RUN AS ROOT?
Remember, Derp is an installer. It needs to do important stuff, and as such it runs as root. I had considered trying to sandbox the parts that "needed" root and only enable it there and ask for permission for a single operation via an "enter your password" type of dialog box. But because the .derp format is so flexible, there were a million potential places where a script author could do varying kinds of trickery-- by breaking out of Derp to execute python code, spoofing directory paths, abusing the embeddable bash scripts, etc. It just didn't seem to make sense to try to anticipate and counteract all that. Playing cat-and-mouse endlessly is pointless. Again, Derp is an installer. Installers get administration permissions. Just like any installation script you'd run with "sudo" would get. Just like the package installer on OS X. Also, it is much easier to run adb and fastboot with root permission-- you can easily kill all running versions of adb for example, and fastboot seems to prefer it. Plus, it avoids the need for playing with udev configuration stuff in Linux.
This means that, like pretty much every other type of installer, .derp scripts will have full access not only to your mobile device, but to the computer Derp is running on. This seems to make the most sense to me, but I invite others to chime in on improving the design if you disagree.
All caveats and considerations apply. Do not run untrusted scripts, and do not run Derp on a "sensitive" computer (however you wish to define that).
WHAT IS MEANT BY "CROSS-PLATFORM"? (IN OTHER WORDS, WHERE'S THE WINDOWS VERSION?!)
I don't have/use Windows. Right now, Mac & Linux builds are currently available. Derp still needs to be ported to Windows, but since it’s wxpython, and I tried to make as little dependent on the underlying operating system, 95% of the work is hopefully done. Anyone with Windows who’d like to help, let me know.
I think it should be some minor changes to the setup.py file and a few definitions. Also, not sure if Windows supports the “bash” shell...
ANYTHING ELSE?
Ummm... That’s it. Remember, this is a work in progress and a proof of concept... Again, I dunno if anyone will see the value here, and maybe it will need a complete rethink. There are likely to be bugs, maybe even really bad ones. But after a few months of playing around, I kinda feel it’s ready for other developers to at least see and even try in a secure environment (as suggested, maybe a VM or something).
SHOW ME THE CODE!
The code is on github-- please submit commits-- fixes, new features, whatever-- as well as bug reports there. And again, figure there will be tons of bugs to be squashed.
Enjoy.
fattire (@fat__tire)
THANKS TO...
Big thanks for helping me test w/different devices: cowmix, hashcode, kornyone, ciwrl, utkanos, verygreen, and jeagoss
DOWNLOADS:
Debian-based Linux (Debian, Ubuntu, Mint)
derp_0.001-1_all.deb
MD5: 6e8eabe94cdfdba649ea41198211bb64
SHA512: 307aed0ad79de17793bb445d2b588388bf66b42716de36a055227f555bfc12ab3e61d5f0e3de804eb4c0c560f140a6318ea6dd1608cc78ee84b50336895cdfc2
Mac OS X (Tested on: Snow Leopard, Lion, Mountain Lion)
Derp-v0.001-mac.zip
MD5: b738e0a270f53d274baec0ce121577fb
SHA512: 3cf7d438c4dfd0c5c5d7c2f29fe19a76dcbb728acfe73a24e28cdb3f21624510c94f1c4224ad31118851f17205e4d7152619c15281c98189cb33ccac82c1505a
Source code on GITHUB is here.
SAMPLE DERP SCRIPTS
Nexus 7 stock to CM 10.1.2 installer - included (written by me)
Nexus 4 stock to CM 10.1.2 installer - included (written by me)
HTC One stock to CM 10.1 nightly installer - included (written by cowmix)
Galaxy Nexus stock to CM 10.1.2 installer - included (written by cowmix)
EXTERNAL SCRIPTS BY OTHERS
None yet...?
DONATIONS?
Not to me, please. If you feel the need to give someone money, consider donating to the EFF or the Software Freedom Law Center. It's really a donation to your digital rights. (I'm not affiliated with them except as a huge fan and occasional donor.)
REMEMBER, DERP IS EXPERIMENTAL AND YOU RUN IT AT THE RISK OF YOUR COMPUTER, YOUR DEVICE, AND YOUR VERY EXISTENCE AS A HUMAN BEING. I TAKE NO RESPONSIBILITY FOR WHAT DOES OR DOESN'T HAPPEN. DON'T RUN DERP SCRIPTS YOU DON'T TRUST COMPLETELY. YOU ARE ADVISED, JUST IN CASE, TO ONLY RUN SCRIPTS IN A SANDBOXED VIRTUAL COMPUTER. And let me know what y'all think.
Script Syntax (Tutorial)
SCRIPT SYNTAX
So you want to write a Derp installation script? It's easier than you might think. Derp isn't too complicated-- it doesn't have a lot of "logic". It just follows a script and does what you tell it.
To start a script file, just get out any text editor (or XML editor) and name it something with the .derp file extension, such as:
sample.derp
Once you write up a sample script, you can load the file with Derp to see if it works.
The <derp> tag
Every script starts with the <derp> tag and ends with the </derp> tag. Within the "<derp>" tag, at least for this pre-alpha version, you need to put at least one required attribute, app_version:
<derp app_version="0.001">
</derp>
This is to identify the version of Derp that your script is for. Future versions may not support your script. You can put other attributes that might be used in the future:
<derp device_codename="mako" os="Linux Darwin" title="CM10.1-M1 for Mako" device_name="Nexus 4" device_vendor="lge" app_version="0.001" script_version=".5" author = "fattire" author_email="[email protected]" author_twitter="@fat__tire" license="GPLv2">
These additional tags may be required in future versions of Derp, so if you are able to supply 'em, it's recommended. They'll simply be ignored if they're not needed.
The title="CM10.1-M1 for Mako" is a general title for the script. VERY briefly explain what it does. It's not required, but recommended.
The one other important attribute, os="Linux Darwin", will be explained later. For now, just know that it is optional, but you can use it to restrict the whole script to only run only in certain operating systems.
The <section> tag
Every set of instructions should be divided into logical sections, such as the ones on the left. The section has its own required attribute, the name:
<derp app_version="0.001" os="Linux Darwin" script_version=".5">
<section name="This is the first section"></section>
</derp>
Notice the name attribute is used with a section to identify what the section is for.
There's not much more to say about sections. It's easy. Let's move on.
The <step> tag
Each Section can be made of (at least one but) an unlimited number of individual steps. And the tag for that is called <step>. Here's how it's used:
<derp app_version="0.001" script_version=".5">
<section name="This is the first section">
<step name="This is step one"></step>
<step name="This is step two"></step>
</section>
<section name="This is the second section">
<step name="This is step three"></step>
<step name="This is step four"></step>
</section>
</derp>
Notice that steps, like sections, need to have a designated name attribute so that Derp knows what to display. The step name will appear to the user at the top on the right as the centered step heading.
The <info> tag
The stuff that appears in the main info area should be wrapped in info tags.
Example:
<derp app_version="0.001" script_version=".5">
<section name="This is the first section">
<step name="This is step one">
<info>This is the text you'll see! It explains what's going on to the user. <b>I'm bolding this part because it's really important for the user to see.</b></info>
</step>
</section>
</derp>
Note: The stuff that you put between the <info> and </info> tags is...HTML!
So you can format it however you want. You can even include images from the Internet.
Here is the list of HTML tags that are recognized:
A NAME=[string]
HREF=
TARGET=[target window spec]
ADDRES... can add os="Linux Darwin" to the <derp> tag.
RESERVED
RESERVED
Derp
Derp is a pretty slick interface for scripting not only device installation, but resources needed for modifications on Android devices (namely the Android SDK). A developer can create a custom script to automate the installation, decreasing one off bad installs, and ensuring the process is completed as intended.
People new to Android customization or developers could find this of use. I am excited to see where it goes.
kornyone said:
Derp is a pretty slick interface for scripting not only device installation, but resources needed for modifications on Android devices (namely the Android SDK). A developer can create a custom script to automate the installation, decreasing one off bad installs, and ensuring the process is completed as intended.
People new to Android customization or developers could find this of use. I am excited to see where it goes.
Click to expand...
Click to collapse
Thanks.. BTW for those asking about the Windows port (in IRC)...
I simply don't have windows, but it was written to be as platform generic as possible. Anyone with a tiny amount of programming skills (again, I have zero myself) should be able to add Windows compatibility pretty quickly... I think it's a matter of just fixing that setup.py file to work with py2exe. See here for more info.
fattire said:
Thanks.. BTW for those asking about the Windows port (in IRC)...
I simply don't have windows, but it was written to be as platform generic as possible. Anyone with a tiny amount of programming skills (again, I have zero myself) should be able to add Windows compatibility pretty quickly... I think it's a matter of just fixing that setup.py file to work with py2exe. See here for more info.
Click to expand...
Click to collapse
Windows dev here, I may be able to help. Also, any interest in a Mono version? Looking for an excuse...
fattire said:
Thanks.. BTW for those asking about the Windows port (in IRC)...
I simply don't have windows, but it was written to be as platform generic as possible. Anyone with a tiny amount of programming skills (again, I have zero myself) should be able to add Windows compatibility pretty quickly... I think it's a matter of just fixing that setup.py file to work with py2exe. See here for more info.
Click to expand...
Click to collapse
Grats BTW, great idea...
I've come across several usages of Linux only Python functions so far and I don't see drop-in alternatives for Windows, so I've just commented out that particular section (line 1183). I managed to get the tool download working. Suggestion, maybe sticking with MD5 hashes would be simpler as the script receives updates to match Android SDK download updates. I can understand why you would want to use SHA512, but google offers MD5 on the site next the downloads for simple copy/paste replacement. There's the potential for lots of hard-coded configuration and for those configurations to be platform specific, such as the download folders for tool updates. I'll see if I can finish up the first bit of win compat this afternoon, but my Android device is at work and is a Dell Streak at that, so my test options are a bit limited.
http://docs.python.org/2/library/platform.html
1183 - os.geteuid()
1196 - os.uname()
fork:
https://github.com/strvmarv/derp
screen:
Windows... already?!!
Holy crap! I don't think it's been 12 hours and there's an early windows port.. amazing job!
The unix-only stuff was from a last second addition I did when I realized that dero would try to run on ARM-based linux machines. The easy fix is to simply indent everything past:
if platform.system() == "Linux"
so that the if not os.geteuid() == 0: and testarch = os.uname() stuff is conditional on it running Linux. (Unless there's a windows ARM version, in which case it also won't work).
In both cases it would work except for the fact that Google doesn't provide libraries for ARM. Interestingly though, debian does. So if we REALLY wanted, we could just apt-get install the tools for ARM Linux users. But that would (1) require a debian-based version of Linux, and (2) we wouldn't know that adb/fastboot/etc are the very latest from Google. But it might be a good version .002 feature, with a preference to turn it on or something.
Again, amazing work. Keep it up!
strvmarv said:
http://docs.python.org/2/library/platform.html
1183 - os.geteuid()
1196 - os.uname()
Click to expand...
Click to collapse
fattire said:
Holy crap! I don't think it's been 12 hours and there's an early windows port.. amazing job!
The unix-only stuff was from a last second addition I did when I realized that dero would try to run on ARM-based linux machines. The easy fix is to simply indent everything past:
if platform.system() == "Linux"
so that the if not os.geteuid() == 0: and testarch = os.uname() stuff is conditional on it running Linux. (Unless there's a windows ARM version, in which case it also won't work).
In both cases it would work except for the fact that Google doesn't provide libraries for ARM. Interestingly though, debian does. So if we REALLY wanted, we could just apt-get install the tools for ARM Linux users. But that would (1) require a debian-based version of Linux, and (2) we wouldn't know that adb/fastboot/etc are the very latest from Google. But it might be a good version .002 feature, with a preference to turn it on or something.
Again, amazing work. Keep it up!
Click to expand...
Click to collapse
Good deal, glad I could help. If you ever want to give a Mono/GTK# port a try just give me a shout. I could do the majority of the leg work code in C# very quickly, lightweight app, which is excellent these days.
I just pushed up my initial changes for the setup.py. I haven't figured it out yet, there are some imports, specifically in derp.py line 23 (platform) that aren't getting consolidated into the build with py2exe. It's most definitely how I've setup the options in the setup.py, hopefully someone is more familiar with py2exe than I and can provide some insight.
strvmarv said:
Good deal, glad I could help. If you ever want to give a Mono/GTK# port a try just give me a shout. I could do the majority of the leg work code in C# very quickly, lightweight app, which is excellent these days.
I just pushed up my initial changes for the setup.py. I haven't figured it out yet, there are some imports, specifically in derp.py line 23 (platform) that aren't getting consolidated into the build with py2exe. It's most definitely how I've setup the options in the setup.py, hopefully someone is more familiar with py2exe than I and can provide some insight.
Click to expand...
Click to collapse
Okay, let me take a second and fix the bug I described above... then-- damn, I wish I could try the setup.py myself. So you're saying that the platform stuff doesn't get imported into the build for some reason?
Standby for the fix.. just gotta test it and stuff.
Update: Pushed. Also added /build, /dist, and one other mac build-related directory to .gitignore to make things a little easier to see...
strvmarv said:
I haven't figured it out yet, there are some imports, specifically in derp.py line 23 (platform) that aren't getting consolidated into the build with py2exe. It's most definitely how I've setup the options in the setup.py, hopefully someone is more familiar with py2exe than I and can provide some insight.
Click to expand...
Click to collapse
Question, would doing something like this on line 52 do anything:
options = {'py2exe': {'bundle_files': 1, 'optimize': 2, 'compressed': 1,}},
I think you can also do something like:
includeList=["a list", "of modules", "to include"]
first, and then replace the line above with something like...
options = {'py2exe': {'bundle_files': 1, 'compressed': 1, 'optimize': 2, 'includes': includeList}},
see more info here and let me know if the above gets those modules in there! I see some option called "unbuffered".. dunno if that needs to be set to true.
bundle_files to 1 means that it hopefully will end up being a self-contained .exe
Let me know! Thanks!
Suggestion, maybe sticking with MD5 hashes would be simpler as the script receives updates to match Android SDK download updates. I can understand why you would want to use SHA512, but google offers MD5 on the site next the downloads for simple copy/paste replacement.
Click to expand...
Click to collapse
Forgot to answer this. You're totally right that MD5 is the one Google provides, and at first I used MD5 for everything-- then sluo reprimanded me, told me how MD5 can't be taken seriously any more, that it's really really easy for anyone to create a MD5 spoofed file these days... So I figured, since this runs as root, it's better to be very extra super-cautious and make absolutely sure the right file is downloaded
Of course, in a user-provided script, you can use md5s or whatever the author wants, but for the Android tools themselves I figured it was better practice to use SHA512 to be more forward/future looking and make sluo (a *real* programmer) happy
More work done by hashcode on a windows port
Okay strvmarv and other windows folk--
Hashcode helped me out by testing on his machine that has Windows.. we did a little debugging, and the result are these two commits:
Pull Request #1
He was able to run derp successfully and do adb/fastboot commands from the Console interface.
But because he's using win64, he couldn't build (apparently only win32 supports building .exe files) all the way.
So, if you have a win32 system-- after applying these, does python setup.py py2exe build an .exe?
Questions:
* on win32 does it build into an .exe?
* If so, does the .exe run properly as the administrator-- right-click and select "Run as Administrator" I am told
* if so, does it install the android tools and ask you to agree to the License?
* if so, does it download/detect your devices?
* if so, can you run scripts (does it work?)
Note: You may also need to manually install Java, since the android sdk updater uses java.
I'm wondering too if the installer installs any drivers, and/or if any were needed.
Thanks!
fattire said:
Okay, let me take a second and fix the bug I described above... then-- damn, I wish I could try the setup.py myself. So you're saying that the platform stuff doesn't get imported into the build for some reason?
Standby for the fix.. just gotta test it and stuff.
Update: Pushed. Also added /build, /dist, and one other mac build-related directory to .gitignore to make things a little easier to see...
Click to expand...
Click to collapse
Awesome, will take a look tonight. It's very likely I'm just not setting the options in the setup.py correctly.
You're running snow leopard, correct? You could grab a copy of the Windows 8.1 Preview (free until Jan something I believe - http://preview.windows.com) and dual-boot, or even just run a VM...if you wanted. I had to install Python 2.7 x86, wxPython x86, python2exe x86, and then run derp.py from source directly (powershell or cmd) to get where I'm at now.
strvmarv said:
Awesome, will take a look tonight. It's very likely I'm just not setting the options in the setup.py correctly.
You're running snow leopard, correct? You could grab a copy of the Windows 8.1 Preview (free until Jan something I believe - http://preview.windows.com) and dual-boot, or even just run a VM...if you wanted. I had to install Python 2.7 x86, wxPython x86, python2exe x86, and then run derp.py from source directly (powershell or cmd) to get where I'm at now.
Click to expand...
Click to collapse
Ideally I'd like to test it on a win32 system because that's the one that py2exe will make a .exe for. But that said, hashcode has it running and adb installs and works and such. It's now a matter of getting it packaged up properly I think. If you can double-check that it works for you, that would be a good start. Then hopefully the .exe can be made. It should also check to make sure java is installed (which is needed by the Google updater) and if not, maybe help the user do it (or even do it for them)...
Also, his version of windows already had drivers on them, so we're not sure whether derp (well, the android tools installer from Google) will take care of that or not.
One last note-- you may have had problems with the looping downloads because the sha512sum seemed to have been off. I did my own sha and it was different.. The new one worked for hashcode.. it's in his commit linked above..
Thanks!
fattire said:
Okay strvmarv and other windows folk--
Hashcode helped me out by testing on his machine that has Windows.. we did a little debugging, and the result are these two commits:
Pull Request #1
He was able to run derp successfully and do adb/fastboot commands from the Console interface.
But because he's using win64, he couldn't build (apparently only win32 supports building .exe files) all the way.
So, if you have a win32 system-- after applying these, does python setup.py py2exe build an .exe?
Questions:
* on win32 does it build into an .exe?
* If so, does the .exe run properly as the administrator-- right-click and select "Run as Administrator" I am told
* if so, does it install the android tools and ask you to agree to the License?
* if so, does it download/detect your devices?
* if so, can you run scripts (does it work?)
Note: You may also need to manually install Java, since the android sdk updater uses java.
I'm wondering too if the installer installs any drivers, and/or if any were needed.
Thanks!
Click to expand...
Click to collapse
* on win32 does it build into an .exe?
- I'm not win32, I'm running 8.1 x64, but it builds/executes just fine if you're using the 32 bit versions of Python, wxPython, and py2exe due to WOW64, long story
- It does build into an exe, see screen
Output
View attachment output.txt
Screen of dist folder
* If so, does the .exe run properly as the administrator-- right-click and select "Run as Administrator" I am told
- I'm running it with Run as Administrator, no, it still seems to blow up and stop running when it get's to __init__, it appears it can't find it for some reason when built with py2exe, likely the need for inclusion, not exactly sure yet...hard to capture error since it flashes by very quickly and then the console closes
* if so, does it install the android tools and ask you to agree to the License?
- If I run derp.py directly in Python it works just fine, android tools, etc...I haven't tried a script yet
* if so, does it download/detect your devices?
- I haven't tried a script yet
* if so, can you run scripts (does it work?)
- Ditto
Note: You may also need to manually install Java, since the android sdk updater uses java.
- Java SDK already installed, I dabble in Android
These missing modules indicated in build output worry me, not certain how to install them...
The following modules appear to be missing
['Carbon', 'Carbon.Files', 'ElementC14N', '_scproxy', '_sysconfigdata', 'win32api', 'win32con', 'win32pipe']
I've pulled a fresh copy of your repo, added Hashcodes changes, and tweaked the setup.py according to what I've found so far. Still blowing up as indicated above, but still moving in the right direction. If you want to go ahead and merge Hashcode's pull and ignore mine I'll reapply my changes so things don't get weird.
Pull request 2: https://github.com/fat-tire/derp/pull/2
I'll look over py2exe documentation and see if I can figure out what we need to change.
Ah, now we're getting somewhere, I changed console=["src/derp.py"] to windows=["src/derp.py"] as indicated here http://www.py2exe.org/index.cgi/ListOfOptions , get an error on execute, which is dumped into a text file, and looks like this...
Traceback (most recent call last):
File "derp.py", line 48, in <module>
NameError: name '__file__' is not defined
Any ideas?
scriptFolder = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "scripts/")
UPDATE:
This may help...
http://stackoverflow.com/questions/...e-path-of-the-current-executed-file-in-python
Nice.. thanks!
strvmarv said:
* on win32 does it build into an .exe?
- I'm not win32, I'm running 8.1 x64, but it builds/executes just fine if you're using the 32 bit versions of Python, wxPython, and py2exe due to WOW64, long story
Click to expand...
Click to collapse
Ah, cool.
- It does build into an exe, see screen
Output
View attachment 2167579
Screen of dist folder
View attachment 2167586
* If so, does the .exe run properly as the administrator-- right-click and select "Run as Administrator" I am told
- I'm running it with Run as Administrator, no, it still seems to blow up and stop running when it get's to __init__, it appears it can't find it for some reason when built with py2exe, likely the need for inclusion, not exactly sure yet...hard to capture error since it flashes by very quickly and then the console closes
Click to expand...
Click to collapse
The file size looks tiny... it looks like it doesn't build into it all the stuff it needs...
* if so, does it install the android tools and ask you to agree to the License?
- If I run derp.py directly in Python it works just fine, android tools, etc...I haven't tried a script yet
Click to expand...
Click to collapse
^ This is awesome and a good sign for this working once we get the build finished.
* if so, does it download/detect your devices?
- I haven't tried a script yet
* if so, can you run scripts (does it work?)
- Ditto
Click to expand...
Click to collapse
Now that I think about it-- the "welcome" stuff and auto-download of the tools are all a running .derp script (welcome.derp) so yes, you are running them
These missing modules indicated in build output worry me, not certain how to install them...
The following modules appear to be missing
['Carbon', 'Carbon.Files', 'ElementC14N', '_scproxy', '_sysconfigdata', 'win32api', 'win32con', 'win32pipe']
Click to expand...
Click to collapse
Hmm.. Did you try adding them explicitly in the optionList as I suggested above?
And another way to do it is to use the -p and -i paremeters when you do python setup.py py2exe
Also maybe try adding:
import win32com
after "import py2exe" in setup.py I saw some reference to that somewhere...
What else...
looks like elementc14n is something related to the elementree module of python... win32api is here I think... but I think it would be installed when you installed python to begin with.
I've pulled a fresh copy of your repo, added Hashcodes changes, and tweaked the setup.py according to what I've found so far. Still blowing up as indicated above, but still moving in the right direction. If you want to go ahead and merge Hashcode's pull and ignore mine I'll reapply my changes so things don't get weird.
Pull request 2: https://github.com/fat-tire/derp/pull/2
I'll look over py2exe documentation and see if I can figure out what we need to change.
Click to expand...
Click to collapse
I'm looking too... See this?
For py2exe to work with packages loaded during runtime, the main thing seems to be that u explicitly import the modules needed by your app somewhere in your app. And then give py2exe in setup.py with moudlefinder.AddPackagePath( , ) the hint, where to search for modules it couldn't find by std. introspection. in the app
I won't do a full-on pull to the repo until everything is working and tested against linux/mac just to make sure we're only fixing stuff and not breaking the other platforms in the process
strvmarv said:
Ah, now we're getting somewhere..
UPDATE:
This may help...
http://stackoverflow.com/questions/...e-path-of-the-current-executed-file-in-python
Click to expand...
Click to collapse
Ah yes-- does this help as recommended in the link above..?
http://www.py2exe.org/index.cgi/WhereAmI
fattire said:
Ah yes-- does this help as recommended in the link above..?
http://www.py2exe.org/index.cgi/WhereAmI
Click to expand...
Click to collapse
jpath wouldn't pull in for some reason, despite installing via pip and having an import, so I resorted to logic to assign "." as the path (very hacky)...
So, here it is...running from derp.exe compiled with py2exe...when I get a moment I'll put together a quick summary of how to get a local win environment going..
Here's another pull:
https://github.com/fat-tire/derp/pull/3
UPDATE:
Ack, storing sdk tools in Program Files\Common Files is great and everything, but it needs to be store in Program Files (x86)\Common Files since it's x86 compiled. Pretty sure things may go wrong at some point as it is...
Related
Way back when, I could run a c# compiler on my Windows Mobile phone and create apps. I think it would be fun to do on-device "compilation" on my Desire Z too.
I'm not asking for an IDE -- just something that can take Java source code and XML files, compile to bytecode for Dalvik and produce an .apk -- all on the device itself.
Is this possible?
OK -- we'd have to both a javac (java compiler) and a dx tool running on the device to do this. The first compiles the java source, the second takes that file and converts it to Dalvik bytecode.
Anyone else interested in this?
I'm very interested too. I tried sl4a but it's limited for now.
Sent from my Desire HD using XDA App
Dexify java compiler
I'm also very interested!
I develop in Java for the Eve VM on Windows Mobile: [www t-arn com/software.htm]
but for this I needed to install a JavaVM on the device.
But it should be possible to dexify the java compiler. I found following post:
[www ist-music eu/developer-zone/documentation/phoneme-and-osgi/music-on-android]
The porting of OSGi requires the dexification of the OSGi bundles. This is a process which makes any JAR file (compliant with Java VM) compatible with Dalvik VM. It basically consists on adding a new file, classes.dex, into the JAR file. To dexify each OSGi bundle, a two-step process is required by using the Android SDK tools. In windows, the process would be:
* Create the classes.dex file associated to the JAR file:
[ANDROID_SDK]\platforms\android-1.5\tools\dx.bat --dex --output=%CD%\classes.dex my_bundle.jar
* Incorporate the classes.dex file into the JAR file:
[ANDROID_SDK]\platforms\android-1.5\tools\aapt.exe add my_bundle.jar classes.dex
Now, the dexified bundles work on both VMs: Java VM and Dalvik VM.
Click to expand...
Click to collapse
I guess, we could do that for javac. If this does not work, we could try another Java compiler:
- EJC: [thecoderlounge blogspot com/2010/05/ecj-eclipse-java-compiler.html]
- kopisusu: [klomp org/KopiSusu/download.html]
I have no idea how to dexify the dx tool, though :-((
Hope to hear more from you guys
Tom
I have not yet gotten the Android SDK (nor a device...) but it seems that the dx tool itself is written in java. There is a dx.jar in the SKD. This one might already be dexified...or we could dexify with itself.
Tom
On-device development & compiler on a server...
Hi guys, I'm new to this Forum - just got my Archos 101 and now I'm searching for some more fun with it ;-)
So I really liked you guy's idea of having a compiler on the device itself - especially since the java compiler's really fast, so no doubt it can run on a smartphone...
I was really tempted by the open source "Open Blocks" library (education.mit.edu/openblocks) from some of these "Lifelong Kindergarden" people at the MIT... they're having this neat programming environment for teaching children programming, where you can drag/drop your source code like Lego...
Here you can have a look how the programming looks:
education.mit.edu/webdav/How%20to%20Create%20a%20Procedure/How_to_Create_a_Procedure.html
Now even google is using a similar thing, probably the same sources for their "App Inventor" (appinventor.googlelabs.com/about/), but you can only develop online at a real pc, then the .apk file is packaged on the server and downloaded to your android device...
So that's practically another way of having stuff compiled "on your device" - you could do the the development on a device and then have a server dedicated for a fast compiler and dx run...
Basically, I'd say that's the perfect system to write quick programs on a touchscreen device, especially when it's a bit larger tablet...
So if anyone wants to join in, I think I'm really keen on trying to port this OpenBlocks thing to the android screen ;-)
Cheers,
wowbag
Java IDE on Android
Hello everybody
I have just finished the latest version of taJavaIDE (0.3.0)
This APK is meant to become an Android development tool with which you can create native Android apps (APKs) ON the Android device itself.
What is working so far (on my Desire HD):
- Eclipse compiler for Java is integrated and working
- dx tool is integrated (not yet tested properly)
- BeanShell Interpreter is integrated and working.
You can write your own BeanShell script, store it on your SDCard and automate
the build process with it.
What is NOT yet working:
- aapt
- apkbuilder
- jarsigner
- zipalign
apkbuilder and jarsigner should not be a problem. I think, I can integrate those in the same way I integrated ecj.
As far as I know, zipalign is not absolutely needed (I might be wrong here, though).
My biggest problem is aapt which is not a Java application but a C++ application. To make it run on Android, you would need to port it to Java (looks like a REAL challenge!) or use the NDK to create a native library that you could then access from the APK.
I have no experience with the NDK and I also don't have the necessary build environment, so I would really appreciate if someone would help me out here!
Anybody interested in contributing?
Tom
Wow, thanks for getting this started, t-arn!
It's been forever since I did any C++, but I'll take a look at aapt and see what I can figure out.
Hopefully, a true C++ programmer will come along and set us straight
I'm very interested in this project and I would be willing to try to help out if you need it. I'm a second year software engineering student and I'm currently on a work term where all of my work is with android. I may not be of much help but at least I think I have some idea what I'm doing so let me know.
you are correct in saying that zipalign is not necessary. we only need it if we want to sign the apk in release mode(for publishing it to the market). We could just use debug mode and everything would be fine. I'm sure that if someone wanted to release an apk to the market, they could just copy the files over to their pc and zipalign it there. We would still be able to use the apk on the device without using zipalign.
t-arn said:
- jarsigner
Click to expand...
Click to collapse
Serison has an application on the market to sign APK's. Just thought I would let you know it is possible.
I would like this as well, as my phone has a physical keyboard and typing code isn't that bad on it - atleast not for minor edits/tweaks
JavaIDEdroid open source project
Hello everybody
I have created an open source project for JavaIDEdroid:
http://code.google.com/p/java-ide-droid/
Everybody is welcome to join the project (and hopefully contribute to it!)
As soon as I have cleaned up the code a little bit, I'll upload the source and the current APK.
For further questions and discussions, please join the java-ide-droid group. You'll find the link on the project's home page.
See you there!
Tom
Sounds pretty promising,looking forward to give it a try!
Sent from my Dell Streak using XDA App
Sounds possible, if you have the right components. I would love this. Would definitely donate to whoever got it working easily and 100%.
Very interesting project
Look nice. Downloading now.
I have wanted this since I first got an android phone.
I ended up using a virtual debain command line running OpenJava to compile and run the stuff. But if i can do it without that hastle in one app, I will LOVE you.
Edit: I tried it out. Mind explaining how to make a beanShell script? on the ECJ it always gives me a security exception even with just -help.
Code:
java.lang.SecurityException
at java.lang.System.setSecurityManager(System.java:610)
at com.t_arn.JavaIDEdroid,.DE.fnCompile(IDE.java:44)
at com.t_arn.JavaIDEdroid.MainActivity.fnCompile(MainActivty.java:167)
at com.t_arn.JavaIDEdroid.MainActivity.tabCompile_btnCompile(MainActivity.java:137)
......
Done in 1305348377 sec.
Please join the JavaIDEdroid support group at http://groups.google.com/group/java-ide-droid and re-post your question there.
I'd like to keep discussions there.
Thanks
Tom
very interesting, ill join the group, i can make the native lib for the aapt.
I would say get gcc working on the device then you can compile anything. You can compile a javavm. A native binary. Etc. If gcc can be compiled and work then all programs most likely can be compiled on the device assuming the proper libs are there to compile against.
Sent from my Incredible using Tapatalk
Just figured I'd share.
First. All I wanted was an xterm on webtop + ssh client. I don't care about much else, that was my only goal. I already have a webtop dock ($80, well worth it, IMNSHO).
First I had to jailbreak. You can use virtually any method...I did the "moto-fastboot" with preinstall.img. I'm pretty sure all the downloads do mostly the same thing.
Once you have root...you need to install the superuser dohickie (just as the doco's profess). I renamed su to mysu, though 'cause some applications make the determination on if you are "rooted" based solely on the setuid existence of su.
Once there, you can install jaunty armel versions of lxterminal and openssh-client (a simple google search will give you a location for those deb downloads which you can install using dpkg. 4.5.91 (at least mine) does not have lxterminal. There are a lot of errors, but they work fine. I tried apt-get..yadda, but the sources.list includes resources in the 10. range. Don't know WTF that's about.
You need to have an android terminal app installed. In that, you need to change %admin to NOPASSSWD using the method described: http dev.toreishi.net/2011/03/hacking-the-atrix-step-3/
Then create the %gconf.xml as described at the end of the article.
The middle part is where I got screwed initially (broke my webtop entirely, and had to start over from factory reset). It has you going to specific line numbers which are version specific (a version that I didn't have). The things to note is that you want to change the policy for awn. First, make a backup copy of domain_policy.conf. In 4.5.91 is line is 1331. And use VI for christ sake: vi +1331 /etc/tomoyo/domain_policy.conf
The lines look like:
<kernel> /osh/usr/bin/awn
use_profile 3
Click to expand...
Click to collapse
Change the use_profile to 2
Then at the top of the file change the use_profile for lxterminal to 2.
(you made a backup, right)?
:wq!
Then reboot.
Happy xterm'ing.
This was a little messy to follow, but I got the gist from reading your notes and the notes from dev.toreishi.net/2011/03/hacking-the-atrix-step-3
I don't own the phone yet, but been looking around at rooting this phone and seeing what I could get out of it if I did when it turns up. Nothing has really interested me to root the phone. I would of rooted it for CM7 or MUIU roms but as I am getting the Laptop Dock with the phone I wouldn't be able to use the webtop as both of these roms don't have that feature.
When I was looking into the Webtop I came across this post about installing ubuntu apps onto webtop. This did get me interested. Looking into it this seem like it only works with a very dated version of Ubuntu (jaunty) because this was the last version that had armhf support.
As Ubuntu 12.04 was just released I decided to see if this version has got a armhf repo that could be used, and indeed it has.
Code:
deb http://ports.ubuntu.com/ precise main restricted universe multiverse
deb http://ports.ubuntu.com/ precise-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ precise-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ precise-security main restricted universe multiverse
deb http://ports.ubuntu.com/ precise-proposed main restricted universe multiverse
The really cool thing about this repo is it has apps like XBMC that should just work with the device.
And then it hit me. This must be the repo that the Ubuntu for Android that Canonical was showing off a few Months ago must be using.
http://youtu.be/N6eEDZva1W8
So I decided to have a dig around the repo when I came across this: abootimg.
Android devices use a special partition format to boot any
operating system on the devices. These boot-images contain
a kernel image, a ramdisk, optionally a 2nd stage boot loader
and the commandline passed to the kernel when booting.
The original mkbootimg from Android can only create these images
where abootimg can also extract and modify them.
Handling android boot images is necessary when bringing other
operating systems to android devices.
Click to expand...
Click to collapse
So this is a pretty good tell tell sign that this is indeed the Ubuntu for Android that Canonical has been demoing.
As I have said I don't own the device yet but if someone wants to check this out to see if this is indeed the Ubuntu for Android repo that would be awesome.
looks like I can't post links.
Code:
deb ports.ubuntu.com/ precise main restricted universe multiverse
deb ports.ubuntu.com/ precise-updates main restricted universe multiverse
deb ports.ubuntu.com/ precise-backports main restricted universe multiverse
deb ports.ubuntu.com/ precise-security main restricted universe multiverse
deb ports.ubuntu.com/ precise-proposed main restricted universe multiverse
That is the repo but the http part is missing before ports
This sucks I can't post links. I would of had links to the repos and links to videos and to the XBMC app. I get why XDA does this but I really want to edit the OP so its got all the info.
Anyway I thought someone would of said something by now about this. This would work almost the same way as the [MOD] Full Linux (Debian) inside WebTop does but instead of using the Debian repos it would be using Ubuntu 12.04
I get the phone in a few days and it would be cool if someone could test this out. I am going to try it the second I get the phone but would be nice for someone to confirm what I suspect.
The only concern is whether you can get it to become functional without breaking Moto's modded dependencies that are stuck on Jaunty. I think a number of people have been trying to update to the newest Chrome etc and each time when getting the new repos they've killed their webtops.
I for one would love to get a newer version of Ubuntu running on this baby but information and tutorials don't seem to be forthcoming from the experts here. This might be due to the non-existence of such information, lack of time, or competitiveness. But I would love to see this if you can get it to work.
P.S. I think its really cool that you may have stumbled on the Ubuntu Unity for android on there though!!
It sure be cool to browse contacts and access system settings via unity
Sent from my MB860 using XDA
thantos said:
The only concern is whether you can get it to become functional without breaking Moto's modded dependencies that are stuck on Jaunty. I think a number of people have been trying to update to the newest Chrome etc and each time when getting the new repos they've killed their webtops.
I for one would love to get a newer version of Ubuntu running on this baby but information and tutorials don't seem to be forthcoming from the experts here. This might be due to the non-existence of such information, lack of time, or competitiveness. But I would love to see this if you can get it to work.
P.S. I think its really cool that you may have stumbled on the Ubuntu Unity for android on there though!!
Click to expand...
Click to collapse
If CWM can backup and restore Webtop I will have a look into getting Unity working on the phone.
In Synaptic you can freeze/lock packages, so all I would need to do is workout the list of packages that needs to be locked and not updated.
Once I have worked that out I can make a update script to install unity and lock the packages that need locking.
I will get the phone in about a week and will probably take about 3 days to get unity working.
I will let you lot know how it goes.
I am even thinking about trying razor-qt on it. This should work really well on the phone as the DE was made to run on devices like phones.
It looks like Webtop uses GTK and doesn't use any QT packages. So installing QT apps shouldn't break any dependencies.
There are a lot of QT apps now that will install and won't break anything.
Music Players: spotify-qt and Clemetine
Video Players: VLC
These are just to name a few. If you google QT apps there is a site that list all the avable QT apps that will work with Webtop and won't conflict with any of the GTK apps and dependencies it uses.
Looking forward to it. Good luck.
Sent from my MB860 using Tapatalk 2
Just getting the info together for when I start messing around with webtop. Also some people may find the info handy for them to have ago.
Qt-apps
http://qt-apps.org/index.php?xsortmode=high
Razor-Qt
http://www.webupd8.org/2011/12/razor-qt-new-lightweight-desktop.html
Locking Packages
https://help.ubuntu.com/community/PinningHowto
Precise armhf Repo
https://launchpad.net/ubuntu/precise/armhf/
XBMC Armhf Package
https://launchpad.net/ubuntu/quantal/armhf/xbmc
Spotify Qt (they probably don't have a Armhf version so this more and likely won't work)
Code:
# 1. Add this line to your list of repositories by
# editing your /etc/apt/sources.list
deb http://repository.spotify.com stable non-free
# 2. If you want to verify the downloaded packages,
# you will need to add our public key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
# 3. Run apt-get update
sudo apt-get update
# 4. Install spotify!
sudo apt-get install spotify-client
Clementine Armhf
http://packages.debian.org/en/sid/armhf/clementine/download
Run:
Code:
sudo apt-get install gdebi gdebi-core
This will install a program that will let you install .deb files by double clicking on them.
The apps that will work on Webtop that won't mess it up are for Armhf and use Qt (not kde-Qt). So just google for that and you should find loads of programs you will be able to run.
If its not a Qt app look at what it depends on.
Using chromium-browser as an example you can see it depends on a lot of packages that has a good chance of breaking the system. This is because its a GTK app. If it was a Qt app it wouldn't depending on as many system files/libs.
Hi, I have been working on such a port for more than a week now.
And I have thrashed the webtop countless times.
I have modified ubuntu.sh so that it loopmounts /osh from an image from the sd card; then it runs the image's original ubuntu.sh. In this way I am not limited to the 800MB size of the original /osh and I can test/swap different images quickly.
I have made a test environment using QEMU (emulating Cortex A9 and Versatile Express board) and I borrowed a recent kernel and initrd from a Linaro image.
I've been testing various distros: Archlinux for Raspberry Pi, Raspbian (which I modded into a full ARMv7a Wheezy by changing the repos), Linaro 12.04 (heavy and slow IMHO), the original Jaunty 9.04 for armel. The last one just to allow me to check the differences with the Moto's distro, file by file.
My QEMU setup is also able to boot GenTop2 and even the original webtop. But I have also an alternative setup using proot and qemu in user mode which e.g. allows me to run ARM-compiled commands directly inside a loopmounted webtop image.
In GenTop2 and in my Wheezy attempts I've also tried using a more recent, ARMHF compiled Tegra Xorg, see
http://archlinuxarm.org/forum/viewtopic.php?f=5&t=2854 but the only thing I got from it is to display a hardware cursor on the phone - my lapdock would stay blank no matter how I play with xorg.conf.
Although in fairness I'm not a dev and still have a lot to learn. I'm just a very stubborn person. And I'm close to giving up.
My second best option so far is to run GenTop2 from a partition on my external SD. Amazing work that GenTop2 is although I'm not a fan of Gentoo - because heavy compiling and too many small writes (at "emerge sync" time) inevitably shorten the life of the phone and SD card IMHO.
Here a link for you to start (in case you don't have it already):
Analysis of webtop - https://sites.google.com/site/androidnothize/nebtop/webtop
For emulating ARM v7a with QEMU - https://wiki.linaro.org/PeterMaydell/QemuVersatileExpress
Also to boot the original webtop in QEMU, the key is to take that extra getty from /etc/event.d/console out of the way (just delete the file), then change the password for root and adas (so you can get in) - the latter task can be performed e.g. using my qemu user mode way.
good luck and good night
I don't know if this is relevant but, here is a version of Ubuntu natty "webtop construction kit": http://mafipulation.org/blagoblig/linux/atrix/index.html#webtop-kit
I have managed to run it on Blurred and CM7 roms (manually). I had to heavily edit xorg.conf to make it display on my external monitor, but there were issues with the mouse and keyboard (the movements were mirroring on the phone as well), text-antialiasing, etc.
Also, apt-get seems to be a little broken, as I have only managed to successfully install lxde but not xfce, and many other packages.
Will this help?
zomgno1 said:
I don't know if this is relevant but, here is a version of Ubuntu natty "webtop construction kit": http://mafipulation.org/blagoblig/linux/atrix/index.html#webtop-kit
Click to expand...
Click to collapse
Oh yes it helps indeed.
The piece of information I was missing about the broken glibc is fundamental, and probably explain why some of my Debian Wheezy attempts were crashing the phone so badly that I needed to remove the battery before restart.
I'm going to put my hands on this yes yes.
I'll look into xorg.conf and apt-get problems, maybe I get some idea.
Thanks!
G
Bionic port
I am very interested in the progress of this thread, as the addition of the newer version should allow XBMC, which would the the killer app for me that would allow me to completely replace my netbook with my phone.
But, I have a Bionic which uses the TI OMAP4 SoC.
If you work this out, I guess it should port, as long as the OMAP4 driver is in an accessible repository and xorg.conf is modified appropriately?
There is already an ARM/OMAP4 image here:
xxxxx]https://wiki.ubuntu.com/ARM/OmapDesktopInstallxxxxx
(remove the xxs as I still can't post links either)
seems like somehow integrating the webtop binaries into that image and using the abootimg to create it on the phone would be a possible approach?
I have some Linux skills, but I am not a dev, so this may be terribly naive!
This is all very interesting. I cant wait until this gets running on our phones. This webtop environment is a pretty special thing that moto has going on here, but I wonder, can the webtop or something of a similar nature be done on other phones? I image it could very well be, other phones certainly have the power and space requirements. I would be willing to pay quite a bit to get this running on my galaxy s2.
It would be awesome to have FULL Ubuntu 12 on our webtop !
Well, actual webtop is cool but the interface is worse than Unity.
Not sure if any of you developers that have been trying to get Precise to work by messing with the XORG but I think KHOL tried but was unsuccessful and instead decided to boot it after getting into webtop...
http://forum.xda-developers.com/showthread.php?t=1370176
Maybe that might be of some help?
I would love to know if anyone has gotten any where with this looks very promising I wish I could help but know very little about programming althought im trying to learn.
Hello!
Normally when I come on the XDA forums, I am asking a question, because I end up making a silly mistake in Android. I never like to put out promotional content for attention, and that is surely what I am not doing here, I am simply putting my work out there to see if the community would like it and if we do like, we can begin setting it up for other devices immediately. Now, I am not a skilled programmer at all, but I know SOME Visual Basic with Windows Forum Applications, so I thought "why not give it a shot." I just wanted to say that.
So I made this simple little application called Lineage OS Installer. Now, reading through some of the comments on the Lineage OS Reddit page, some people were asking if there would be an installer for Lineage OS, and there was a good amount of people who did not want one, which makes sense; people should know what they are getting into, and understanding ADB and Fastboot is indeed important. However, sometimes, there is a person who is not involved with ROMS, who is fine with OEM Android, who does not want to use root and what not, however, they want the latest version of android possible for their device, and that was a main point of CyanogenMod; users could get the latest version of android on their phone and tablet when their manufacturer/carrier stopped supporting it. However, the installation can be intimidating, and for the user that I just described earlier, the user who does not want root and what not, that could mean they won't bother attempting to install a custom ROM. However, this application automates the process; all the user needs to do is click some buttons, and press Enter a few times to install LineageOS.
I understand I don't need "permission" to distribute this program, however, I am just asking if the overall community would support the use of this program.
NOTICE: The applicaton may fail to start properly. I am investigating this issue. In the meantime, ensure you have the latest .NET Framerwork([url]https://www.microsoft.com/en-us/download/details.aspx?id=55170&desc=dotnet47[/URL]). If that doesn't work, try building from the source ([url]https://github.com/PJBeans/LineageOS-Installer/wiki/How-to-build-from-the-source[/URL])
This is a simple graphical and command-line based installer designed to make it easier to install LineageOS; this program is aimed at beginners. It is not the prettiest program ever, but it still works with my Nexus 7 2013 WiFi just fine
Possible support for flashing root may become available in the future.
If you notice a bug (an issue with the application), please submit it here: https://github.com/PJBeans/Lineage-OS-Installer/issues
Features:
[ADB and Fastboot is required, but NOT included.]
- Instructions for enabling Developer Options, USB Debugging, and OEM Unlocking (if required)
- Embedded browsers to download TWRP, GApps, and LineageOS
- Automatically creates a backup with TWRP.
- Flashes TWRP, LineageOS, and GApps with minimal user interaction; no TWRP interaction required! (The most they really do is confirm they want to unlock the bootloader)
If you have a secondary device that supports LineageOS, perhaps you could try out this program and report your results [in a reply to this thread]! In order to make this as stable as possible, it would require lots of testing, and I do not plan on buying each and every Android phone anytime soon. If you want to test this program, use the prebuilt version, as the Source version may contain undocumented bugs blocking one from their goal. Note that:
- It may screw up your device. No automatic restore process is implemented yet, so make sure to have some sort of recovery tool handy.
- When you report back, please include the version of the program you used (as identified in the Downloads section), along with your device.
- CURRENTLY ONLY FOR NEXUS (AND PROBABLY ONEPLUS) DEVICES! HTC, LG, AND OTHERS THAT REQUIRE A BOOTLOADER UNLOCK SITE OR DEVICES WITH A DIFFERENT INSTALLATION PROCESS ( *cough cough* SAMSUNG) ARE NOT SUPPORTED!!
Screenshots:
Coming Soon
Downloads:
Prebuilt
Prebuilt [VB.NET]: (Version 2.0) https://github.com/PJBeans/LineageOS-Installer/releases (Tested on Nexus 7 2013 WiFi)
CURRENTLY FOR TESTING PURPOSES! - "-development" will be removed in the program once the program is known to be stable.
VB.NET is primarily developed by chompy33 (PJBeans), and C# is primarily developed by Evilarceus. Each branch's source can be found below.
Source
Source: (Version 2.0-development) https://github.com/PJBeans/Lineage-OS-Installer (I encourage absolutely anyone to contribute, even if you would like to make just a minor change!)
Updates:
Past:
UPDATE 1.4.0 and 1.4.1(VB.NET)
(I never published 1.3.0, so here's 1.4.0)
- Scripts have been updated; the user no longer needs to interact with TWRP.
- There is one button to install.
- The script automatically backs up data, cache, and dalvik prior to wiping for installation (no backup before unlocking the bootloader, however)
- (1.4.1) Fix issue with application failing to start (Thanks, @dinesh_redhawk for pointing out this bug that I somehow missed!)
- (1.4.1) Update Installer
UPDATE 1.2.0 (VB.NET)
- User must type "yes" before starting the process to ensure they know to read everything and follow all instructions given.
- Support for GApps
- More messages for user instructions.
- Scripts should be working correctly.
UPDATE 1.1 (VB.NET)
- More Material Design
- 3 step installation (Unlock Bootloader, Flash Recovery, install LineageOS)
- Added a beautiful background image (IMO) of New York City on First Form
Current:
UPDATE 2.0 (VB.NET)
- Check out the release notes on GitHub (Prebuilt Download link)
What is your viewpoint on this? Would you actually want an installer to exist for those who are inexperienced with flashing ROMS?
Sorry for such as long post, and I did not put this in DevDB because it is not directly an Android project.
chompy33 said:
Hi,
---
Normally when I come on the XDA forums, I am asking a question, because I end up making a silly mistake in Android. I never like to put out promotional content for attention, and that is surely what I am not doing here, I am simply putting my work out there to see if the community would like it and if we do like, we can begin setting it up for other devices immediately. Now, I am not a skilled programmer at all, but I know SOME Visual Basic with Windows Forum Applications, so I thought "why not give it a shot." I just wanted to say that.
So I made this simple little application called Lineage OS Installer. Now, reading through some of the comments on the Lineage OS Reddit page, some people were asking if there would be an installer for Lineage OS, and there was a good amount of people who did not want one, which makes sense; people should know what they are getting into, and understanding ADB and Fastboot is indeed important. However, sometimes, there is a person who is not involved with ROMS, who is fine with OEM Android, who does not want to use root and what not, however, they want the latest version of android possible for their device, and that was a main point of CyanogenMod; users could get the latest version of android on their phone and tablet when their manufacturer/carrier stopped supporting it. However, the installation can be intimidating, and for the user that I just described earlier, the user who does not want root and what not, that could mean they won't bother attempting to install a custom ROM. However, this application automates the process; all the user needs to do is click some buttons, and press Enter a few times to install Lineage OS.
I understand I don't need "permission" to distribute this program, however, I am just asking if the overall community would support the use of this program.
---
This is a simple graphical and command-line based installer to make it easier to install LineageOS; this program is aimed at beginners. It is not the prettiest program ever, but it still works with my Nexus 7 2013 WiFi just fine
I did not add support for flashing google apps (gapps) yet, just because I do not know if we will use the same open-gapps package that was used in CyanogenMod, or if we would switch to something different.
Features:
[ADB and Fastboot is required, but NOT included.]
- Instructions to enabling Developer Options, USB Debugging, and OEM Unlocking (if required)
- a file called setup.bat, that will set up the directory where all the required files live
- Embedded browsers to download TWRP and LineageOS*
- Included script that runs `adb devices` to ensure device is recognized
- Installation script that sets up the device to install Lineage OS, and pushes LineageOS to the device.
- Gives instructions for steps that must be completed on the device (Wiping, flashing, etc.)
The program's installation script is finished; it does its job to install a ROM to a device; it will unlock the bootloader, flash TWRP, and push the lineageos image. (I substituted LineageOS for CyanogenMod 13 while testing). *The only thing unfinished it the embedded browser to download LineageOS.
I would not recommend using it currently as it is still in early development
Downloads:
Prebuilt: https://drive.google.com/file/d/0B70zQND1cM1WQVFjYi0yZy1BVnc/view?usp=sharing
Source: https://github.com/PJBeans/Lineage-OS-Installer
I understand that the main focus with LineageOS right now is to set up the website, servers, and images, and I do not want to distract those users. But this is what I would like to ask anyone: Would you actually want an installer to exist for those who are inexperienced with flashing ROMS?
Sorry for such as long post, and I did not put this in DevDB because it is not directly an Android project.
Click to expand...
Click to collapse
Ill be honest. This is most dangerous for inexperienced users. If something goes wrong then they have no idea how to fix or find out how to fix it.
If used it would be best suited for someone that does rom testing where they flash multiple times a day, but as you are required to use a pc I really dont see much use for it.
just my thoughts.
zelendel said:
Ill be honest. This is most dangerous for inexperienced users. If something goes wrong then they have no idea how to fix or find out how to fix it.
If used it would be best suited for someone that does rom testing where they flash multiple times a day, but as you are required to use a pc I really dont see much use for it.
just my thoughts.
Click to expand...
Click to collapse
Thank you for your reply! I completely see what you mean; an inexperienced user could possibly freak out, perhaps disconnect the device while something was going on. Perhaps I/anyone else who contributes could add a support section clearly marked for troubleshooting, complete with a guide to reflash stock. If I/someone else did this, would that make it more friendly for beginners in your eyes?
chompy33 said:
Thank you for your reply! I completely see what you mean; an inexperienced user could possibly freak out, perhaps disconnect the device while something was going on. Perhaps I/anyone else who contributes could add a support section clearly marked for troubleshooting, complete with a guide to reflash stock. If I/someone else did this, would that make it more friendly for beginners in your eyes?
Click to expand...
Click to collapse
Yes that make it more friendly for beginners.
I'd be happy to help this project. I could maybe create a UI for this if all goes well.
Also, you should try learning C# if you already know Visual Basic. It's more widely supported and requires less typing. I can still contribute, since I do know both C# and Visual Basic
I wonder if it would be too much to ask to have this program automatically make a NANDROID backup before starting. Incase an inexperienced user disconnected the device or did something to disrupt the install, and caused a soft brick or similar, the NANDROID backup could be restored, and the user could re-attempt, with no harm done.
evilarceus said:
I'd be happy to help this project. I could maybe create a UI for this if all goes well.
Also, you should try learning C# if you already know Visual Basic. It's more widely supported and requires less typing. I can still contribute, since I do know both C# and Visual Basic
Click to expand...
Click to collapse
Thanks! The source is in the original post. The only thing that does not have a UI is the installation (although the current UI is pretty bad) I will try to learn C# as time goes on. If you would like to make part of the program in C#, feel free!
Doofitator said:
I know Visual Basic, and I'd be happy to help with the development of this application, too.
I also wonder if it would be too much to ask to have this program automatically make a NANDROID backup before starting. Incase an inexperienced user disconnected the device or did something to disrupt the install, the NANDROID backup could be restored, and the user could re-attempt, with no harm done.
Click to expand...
Click to collapse
Thanks for your reply! The source is above. Creating a NANDROID back is a great idea, perhaps we could create an automatic restore option too.
I am worried by the usage by inexperienced users. They are more prone to panic and destroy their phone, which could lead to a bad name for lineageOS on many forums where they will complain that lineageOS just killed their phone, while they did'nt understand the simplest part of the process.
BUT
This can be a tool very useful for experienced users who serially update phones of their many inexperienced friends.
I am doing just that (with around 50 differents phones to date) with my many friends of friends, and a tool like yours would simplify my job. For the moment, i keep a directory of directorys containing rooter scripts, recoverys, roms, gapps, utilities (adb, fastboot, odin, heindall,...) and have a multi-gigabyte library of those.
A utility who prepare a directory for a phone model, download rom, twrp/cwm, gapps, and do the phone rooting for every phone is a very desired thing, but it is a hell of a project to achieve.
So good luck with your project, and dont hesitate to ask me for help if you need, i would be proud to help you achieve your goal.
mlsoftlaberge said:
I am worried by the usage by inexperienced users. They are more prone to panic and destroy their phone, which could lead to a bad name for lineageOS on many forums where they will complain that lineageOS just killed their phone, while they did'nt understand the simplest part of the process.
BUT
This can be a tool very useful for experienced users who serially update phones of their many inexperienced friends.
I am doing just that (with around 50 differents phones to date) with my many friends of friends, and a tool like yours would simplify my job. For the moment, i keep a directory of directorys containing rooter scripts, recoverys, roms, gapps, utilities (adb, fastboot, odin, heindall,...) and have a multi-gigabyte library of those.
A utility who prepare a directory for a phone model, download rom, twrp/cwm, gapps, and do the phone rooting for every phone is a very desired thing, but it is a hell of a project to achieve.
So good luck with your project, and dont hesitate to ask me for help if you need, i would be proud to help you achieve your goal.
Click to expand...
Click to collapse
I see what you mean, and I/other contributors will (hopefully) try to make this process very user friendly, so they won't need to panic. I guess developers could use this if they needed to install the ROM on multiple devices, though currently the installation is kind of slow. I appreciate your response!
chompy33 said:
I see what you mean, and I/other contributors will (hopefully) try to make this process very user friendly, so they won't need to panic. I guess developers could use this if they needed to install the ROM on multiple devices, though currently the installation is kind of slow. I appreciate your response!
Click to expand...
Click to collapse
I would suggest that such a tool should be VERY wordy about telling the user what it is doing, and should NEVER suspend its apparent activity.
My experience (and it is commercial experience, with genuine products in the marketplace) is that the user will get nervous, and may do something unfortunate, if they fear that something has gone wrong...and they WILL fear this if there is no obvious activity for a long time...and "long time" might be only a few seconds.
So, to make this tool "safe", it should be continually reassuring the user that it is doing something. There should be a progress bar, that keeps moving. There should also be a text section that keeps updating what is going on. If the operation under way will take awhile, then this text session should (every few seconds) remind the user "I'm still working on this...estimated time to completion is XX seconds" (or some such).
This operation IS dangerous, particularly if the user does something wrong. So keep reassuring the user that everything is fine.
jiml8 said:
I would suggest that such a tool should be VERY wordy about telling the user what it is doing, and should NEVER suspend its apparent activity.
My experience (and it is commercial experience, with genuine products in the marketplace) is that the user will get nervous, and may do something unfortunate, if they fear that something has gone wrong...and they WILL fear this if there is no obvious activity for a long time...and "long time" might be only a few seconds.
So, to make this tool "safe", it should be continually reassuring the user that it is doing something. There should be a progress bar, that keeps moving. There should also be a text section that keeps updating what is going on. If the operation under way will take awhile, then this text session should (every few seconds) remind the user "I'm still working on this...estimated time to completion is XX seconds" (or some such).
This operation IS dangerous, particularly if the user does something wrong. So keep reassuring the user that everything is fine.
Click to expand...
Click to collapse
Good idea! Thanks for the suggestion, we will definitely incorporate this.
Two thumbs up for a LineageOS installer, plz develop it
Definitely having a LineageOS installer is a great idea!
Unquestionably, it will permit people who are not experienced with flashing custom roms(which accounts for a lot of people), nor do they have an interest in learning about that(e.g. my mom) to easily get the latest Android build on their Android phone (which may no longer be supported by the OEM; an e.g. AT&T LG G2).
44alexsmith said:
Definitely having a LineageOS installer is a great idea!
Unquestionably, it will permit people who are not experienced with flashing custom roms(which accounts for a lot of people), nor do they have an interest in learning about that(e.g. my mom) to easily get the latest Android build on their Android phone (which may no longer be supported by the OEM; an e.g. AT&T LG G2).
Click to expand...
Click to collapse
This is exactly what I am trying to achieve. Provided I/contributors make a stable build by the time a stable build of LineageOS comes out (or at least around there, it's an open source project so there is no official date), it could give LineageOS a reputation of being a very easy ROM to install. Thanks for the reply.
Creating an installer for users who don't event know what's going on from the inside is useless IMO.
If the installer fail to flash they get stuck with a bricked device and don't know what to do.
I added a .gitignore to reduce cloning size and keeping things clean: https://github.com/PJBeans/Lineage-OS-Installer/pull/1
If you want, add me as a collaborator on the GitHub project so I don't have to keep on making pull requests.
p4rot said:
Creating an installer for users who don't event know what's going on from the inside is useless IMO.
If the installer fail to flash they get stuck with a bricked device and don't know what to do.
Click to expand...
Click to collapse
Just FYI, I did say earlier that this installer should have an automatic NANDROID backup take place, so phones would be safe if something happened.
Doofitator said:
Just FYI, I did say earlier that this installer should have an automatic NANDROID backup take place, so phones would be safe if something happened.
Click to expand...
Click to collapse
We will attempt to add this (or at least guide the user) later on. Thanks for your response!
evilarceus said:
I added a .gitignore to reduce cloning size and keeping things clean: https://github.com/PJBeans/Lineage-OS-Installer/pull/1
If you want, add me as a collaborator on the GitHub project so I don't have to keep on making pull requests.
Click to expand...
Click to collapse
I set up a live chat on Telegram, the link is on the Repository's Readme. I appreciate your commitment to this project!
I sent an invite at https://github.com/PJBeans/Lineage-OS-Installer/invitations
chompy33 said:
We will attempt to add this (or at least guide the user) later on. Thanks for your response!
Click to expand...
Click to collapse
If possible, I think making this a mandatory step would be better - we don't want people skipping it and then complaining later.
Hello People. This is basically a combination of batch scripts made by me to make WSL less daunting for people who do not want to do Powershell things and introduce MANY more people to Linux [and make existing dual boot Linux users just stick to Windows w/o the ugly GRUB].
Disclaimer: Only you know what you're doing. I have tested everything on me and my friend's PC and it seems to work fine. If your PC catches fire or starts an apocalypse it's not my fault. So yeah be careful about what you're doing.
Things the scripts can do:
1) Enable WSL 2 in any Windows 10 2004 computer. [NEW: Older versions of windows 10 are now supported.]
2) Download all the available distros with a couple key presses.
3) Automatically detects the downloaded distro and installs it without any user input.
Downloads are attached in the thread and instructions are given in the zip file.
How to know which zip to download (1 or 2) [Don't Skip]:
1) Go to the start menu.
2) Type "Run" and press enter
3) Then type there "winver" and press enter.
4) If you see 2004 there, ONLY THEN are you able to download the WSL-2 zip. Otherwise update your Windows or use the WSL-1 zip.
Note to self: Things to do in the future--
1) Make a GUI of sorts.
2) Anything else the people want.
Not going to force you or anything, but I would appreciate if you pressed the Thanks button after benefiting from my zip (I see 78 downloads but only 2 thanks...)
Edit: NEW DOWNLOAD LINKS
https://mega.nz/file/NAxASK4I#2qr4ra4KJAcliEqDuCNQd0GnJeHe4FXpvw3KUfqtKxc [for WSL 1]
https://mega.nz/file/lE40AKDa#3Qqk6WH04vzYW8wrrcruuOdqpde-KUzYnu0o50tmZzo [for WSL 2]
WSL-2 Changelogs:Version 1:
Initial Release
Version 2:
Complete Redesign
Compressed all my code to 2 very compact Batch files [previously it was 4 Batch files and 5 Powershell files]
Added Distro Downloaders and Installers (x64 only as of now)
Made it more stable [the previous method was very hacky and used bypasses]
Fixed all typos
Made it more user-friendly
Version 2.1
Quality of Life improvements
Version 2.2
Back-Ported the 'more sophisticated' Distro Downloader from WSL-1
Made Instructions better
WSL-1 Changelogs:Version 1:
Initial Build
Version 1.1:
Made the instructions more newbie friendly.
Backported the WSL-2 Distro Downloader and Installer to WSL-1
Version 2.0:
Complete redesign of the Menu [Looks MUCH more visually pleasing]
Made the in-built Distro Downloader A LOT more sophisticated
Cleaned up the back-end a little bit
Improved Instructions
Announcements27/10/2020
I have started learning C++ so let's see if I can make a GUI with that
18/10/2020
Added a new WSL-1 zip file for people who do not have version 20H1
17.5/10/2020
Fixed Everything and restored download link. Now you can download again!
17/10/2020:
Removed download link because I noticed a couple typos. Fixing them and uploading the file please wait.
Thank you, bro, because I use both windows and linux, now I don't have to restart the computer every time.:good:
JohnMes said:
Thank you, bro, because I use both windows and linux, now I don't have to restart the computer every time.:good:
Click to expand...
Click to collapse
you're very welcome
Just have to. Say thanks had this opFeat installed since maybe it was first available in the list and never researched how. To. Use it or. What it really did. Just gotta find out if this will run fine on my surface too (anything except liveOS off usb will work and causes windows to eff up despite grub/4win/stock/grub if it works excites to use kali on there properly}
Nsomnia said:
Just have to. Say thanks had this opFeat installed since maybe it was first available in the list and never researched how. To. Use it or. What it really did. Just gotta find out if this will run fine on my surface too (anything except liveOS off usb will work and causes windows to eff up despite grub/4win/stock/grub if it works excites to use kali on there properly}
Click to expand...
Click to collapse
You're very welcome but I would be happy if the thanks button was pressed Also, it should work fine on any Windows 10 computer [remember I am using a Haswell computer and it still works]. I also have Kali working but it does not support Monitor Mode and Packet Injection just yet [Microsoft does not want to implement this feature due to security concerns]. You can also get a GUI up and running with ONLY kali using Win-Kex [look it up]
Our PC system has been attacked by a ransomewhere virus, called as .lisp file virus and our files has been encrypted to .lisp sub-extension. Any technical advice?
Thanks but any chance of getting clean links that don't require allowing JavaScript before i can access them ?
It's blocked by my browser security and even if i allow it ,the download link gets blocked by Eset.
Doesn't anyone vet the links that get posted in the forum here ?
There's no need for a download link to be like that.
oldman820 said:
Thanks but any chance of getting clean links that don't require allowing JavaScript before i can access them ?
It's blocked by my browser security and even if i allow it ,the download link gets blocked by Eset.
Doesn't anyone vet the links that get posted in the forum here ?
There's no need for a download link to be like that.
Click to expand...
Click to collapse
sure, giving
NullCode said:
sure, giving
Click to expand...
Click to collapse
Great ,links worked ok ,cheers.
oldman820 said:
Great ,links worked ok ,cheers.
Click to expand...
Click to collapse
Are they useful to you?