[UTILITY][21.04.2012]Falkdroid 3.1.0, a simpe Linux/Fedora Tool for Android Device - Android Software Development

First of all i want to apologize for my bad english
This is my first post and I hope to write well in the right category and in the right way.
In my spare time I wrote a small tool script to manage Android devices from Linux, in particular I have created a rpm package for fedora.
I have tested it with fedora 16 and 17 x86_64 and my lg dual 2x.
If any of you is interested I'm looking for people to test it or want to create a .deb package for debian/ubuntu.
Here Latest screenshot and features.
Here The install screenshot and launch icon.
Here download lastest. 21-04-2012
16-04-2012 Update to 3.0.9-1 version
21-04-2012 Update to 3.1.0-1 version
Changelog:
## VERSION="3.0.9" ## 11042012 Bug RestoreApp.sh script
## VERSION="3.1.0" ## 21042012 Bug InstallAndroidSDK.sh + Test on F17 Beta
Compatible wirh Fedora 16 and Fedora 17 Beta.
How to:
INSTALL: rpm -ivh falkdroid-3.1.0-1.fc17.x86_64.rpm
REMOVE: rpm -e falkdroid-3.1.0-1.fc17.x86_64
CHECKINSTALL: rpm -qa | grep falkdroid
THIS IS EXPERIMENTAL SOFTWARE. USE AT YOUR OWN RISK. I AM CAN NOT BE HELD LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO HARDWARE OR SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING FROM THE USE OF THIS SOFTWARE. IF YOU DO NOT AGREE TO THESE CONDITIONS, YOU ARE NOT PERMITTED TO USE OR FURTHER DISTRIBUTE THIS SOFTWARE. IF YOU PLAN TO COMMERCIALLY USE OR DISTRIBUTE (AND SELL) THE SOFTWARE, YOU HAVE TO ACQUIRE THE NECESSARY LICENSES AND PERMISSIONS FROM ALL SOFTWARE COPYRIGHT HOLDERS OF NON-FREE SOFTWARE COMPONENTS, OR REMOVE THESE COMPONENTS BEFORE DISTRIBUTING THE SOFTWARE.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Thanks

Is it compatible with Ubuntu? If so I'll take a look

JackJack762 said:
Is it compatible with Ubuntu? If so I'll take a look
Click to expand...
Click to collapse
it's a simple sh script with zenity , if you have gnome 2/3 and linux it's compatible!!!

maccumaccu said:
If any of you is interested I'm looking for people to test it and can help me to create a .deb package for debian/ubuntu.
Click to expand...
Click to collapse
You can simply convert your rpm package to a .deb using alien. Simply install it over apt, and then make sudo alien --scripts falkdroid.rpm
and you have your deb.

TearsDontFalls said:
You can simply convert your rpm package to a .deb using alien. Simply install it over apt, and then make sudo alien --scripts falkdroid.rpm
and you have your deb.
Click to expand...
Click to collapse
yes ok! but i haven't a ubuntu/debian machine for test it.
If anyone is interested in using it on ubuntu/debian i don't not waste my time to prove it.
: )

maccumaccu said:
yes ok! but i haven't a ubuntu/debian machine for test it.
If anyone is interested in using it on ubuntu/debian i don't not waste my time to prove it.
: )
Click to expand...
Click to collapse
If not tested already, I could test on Ubuntu for you.

Does it feature fastboot? Would be interested if so. Still haven't found a way to change kernels on Ubuntu

hey, i cant seems to find your e-mail.. can you PM me the Down Link? thanks.. im using fedora 16 now

you can contact me on g+ : )

## VERSION="3.1.0" ## 20042012 Bug InstallAndroidSDK.sh + Test on F17 Beta - Compatible wirh Fedora 16 and Fedora 17 Beta.

Related

Wanted: Compile for Android ON THE DEVICE!

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

Webtop2sd 2.0.1 with Ubuntu 12.04 Precise

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.

[TOOL] NEW! Derp -- scriptable, platform-neutral device installer

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...

GNU/Linux on SM-P6XX, What is your experience installing / using ?

Please let us know something about what you installed; how you did it; what works, what doesn't; which tools/apps work best.
My only problem at the moment is a persistent disk (sd card) crash. Anyone else see this ?
I will post a guide/notes for my current installation. I can make some files available if anyone wants them.
I use debian-kit with modifications:
* Install armhf instead of armel (hardware floating point)
* Debian testing distribution. It is actually quite stable.
* We can use a larger loop disk image, because the internal sdcard on SM-P600 is ext4.
* Replacement resolve.conf daemon for tracking the Android nameserver configuration. The
original one does not work for me.
* Script for starting xrdp. Original does not work for me.
* Mod to install multiple distributions. e.g Ubuntu, debian, different distribution, different arch.
Start them with e.g. "deb1", "deb2", ... I only do this hoping that one of them is stable. No
luck yet, but I ordered a new sd card; we'll see
* xrdp disconnects every time you copy to the x clipboard. E.g. killing text in emacs. I made a one
line patch to xrdp to fix it. I installed the new binary to /usr/local rather than building a new xrdp package.
I can supply the patch or binaries. I reported this upstream, but it was first reported four years ago.
I could add some of these mods to Sven-Ola's kit. It is very well laid out and easy to build. He put a huge
amount of effort into it. But, I don't know if I can afford the time.
Packages to xrdp and resolv.conf
Here are some packages that can be used with debian-kit.
http://www.johnlapeyre.com/debian-kit/
I could not get the androresovld package to work. So, I made a new version of
andromize that does what the previous andromize did and installs a different version of androresolvd as well. The new androresolvd is included in the andromize package; no separate androresolvd package. It is all architecture independent. You will have to uninstall the original androresolvd package if you have it installed.
I also built the xrdp package with a fix for the clipboard-disconnect but, but only for debian armhf arch and testing distribution. So it may or may not work with what you have installed (eg wheezy armhf)
Both are only tested on my installation of debian armhf, not Ubuntu and not armel.

[SCRIPT] [WIN-10] WSL 1/2 Utility for Windows 10 x64

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
Announcements​27/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?

Categories

Resources