Related
UPDATE: So here is the link to a better version of Ubuntu running on your Vibrant. I do not have much time yet to edit the original post, but take a look at the this. You should be able to get it to work.
http://forum.xda-developers.com/showthread.php?t=823370
OLD:
DISCLAIMER: I AM NOT RESPONSIBLE FOR ANY LOSS OR DAMAGE TO YOUR PHONE!! YOU ARE DOING THIS AT YOUR OWN RISK.
Ok, so for those who like to push the limits with their phones I don't think it gets better then this
I would like to thank everyone who has contributed to making this possible. We had gotten a lot of good posts.
But a big thanks goes out to danielmid84, he provided me with the link http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/ and a custom modified script to work with our phones, thank you!!
UBUNTU on Vibrant
INSTRUCTIONS
Prerequisites:
Root
Latest version of BusyBox
Android SDK ( and knowledge of how to use the tools, adb shell, etc... )
Understanding of Linux commands ( but not necessary )
Files needed are located here: http://www.megaupload.com/?d=FALJFT3L
BootUbuntu script modded by danielmid84 here: http://forum.xda-developers.com/attachment.php?attachmentid=385853&stc=1&d=1282503588 NOTE: This file replaces the BootUbuntu file located in the archive above.
VERY IMPORTANT!!!
Step 1:
Connect your phone to the computer and mount your internal storage sdcard (Not your external sdcard).
Step 2:
Now create a new folder under sdcard named "ubuntu" for instance "/sdcard/ubuntu/" and copy ALL of the files in the "ubuntu.zip" archive over to this newly created folder EXCEPT the BootUbuntu file. You will be copying over the BootUbuntu file over from the additional BootUbuntu file link provided above.
Step 3:
Now that we have all of the files in place, make sure to "Turn off USB storage" on your phone to be able t access the SD card from ADB Shell. Also make sure your "USB Debugging Mode" is check under "Settings>Applications>Developement".
Step 4:
We are going to want a windows terminal open and we are going to "cd" into your "/tools" folder, wherever that may be located. For example " cd c:\android\sdk\tools".
Once you are in the "tools" folder, issue this command "adb shell". And for linux users, you will be issuing the command as "./adb shell".
Step 5:
Once you are in ADB Shell, you should see a "#" symbol now.
You are then going to type "su" to enter superuser mode.
Step 6:
We are going to cd into the ubuntu folder by issuing the command "cd /sdcard/ubuntu".
Now that we are located in "/sdcard/ubuntu" we will issue the command "sh ./ubuntu.sh"
This command only needs to be entered once, or if you ever change the file "bootubuntu".
Step 7:
Once that is completed, issue the command "bootubuntu".
If you get the "localhost" prompt, you have just successfully installed UBUNTU onto your Vibrant. Congratulations!!!
Now mind you, this is not with a Graphical User Interface yet and but you can access the power of Linux and Ubuntu by using a Terminal Emulator.
But if you want a running Graphical User Interface to play with, keep in mind that is uses a lot of memory and continue reading and I will have that updated here shortly.
Step 8:
We are now going to install a GUI.
While still being in Ubuntu with the "localhost" prompt, issue the command "apt-get update".
Then issue the command "apt-get install tightvncserver".
Step 9:
Once that is complete, you are going to want to issue the command "apt-get install lxde". This will take a few minutes so let it do its thing.
Step 10:
Next we are going to type:
"export USER=root" then
"vncserver -geometry 1024x800" but you can change the display size to what you prefer.
You will be asked to set a password at this time for login.
Step 11:
Next we are going to add the following commands to /root/.vnc/xstartup.
Now type:
"cat > /root/.vnc/xstartup" it will seem like it is hanging after you push enter, but it is only waiting for additional input. So continue by entering
"#!/bin/sh"
"xrdb $HOME/.Xresources"
"xsetroot -solid grey"
"icewm &"
"lxsession"
Then hit Ctrl+D twice and Enter key.
Step 12:
Now open the Android VNC app on your phone with "localhost" as "address" and "5901" as "port". Enter your password as well and connect!! You will now have a GUI for your Ubuntu!
REMEMBER: EACH TIME YOU WANT TO LOGIN TO YOUR UBUNTU, YOU DON'T NEED TO BE CONNECTED TO YOUR COMPUTER. YOU CAN USE TERMINAL EMULATOR.
This is only for full phone reboots to set up Ubuntu again.
Start Terminal Emulator and cd into "/sdcard/ubuntu"
Then issue these commands:
"su"
"export USER=root"
"vncserver -geometry 1024x800"
and you should be able to log back into the GUI with Android VNC again.
I'm surprised that not one person is interested in this...
I think debian on the vibrant would be sick!
sadly I don't dev
Can I ask what "debain" is? For all of us new guys..
Sent from my Vibrant using XDA App..
Typos/Nonsense due to Swype!
Stock Root + RyanZA LagFix + Captive Camera MOD
itsjusttim said:
Can I ask what "debain" is? For all of us new guys..
Sent from my Vibrant using XDA App..
Typos/Nonsense due to Swype!
Stock Root + RyanZA LagFix + Captive Camera MOD
Click to expand...
Click to collapse
Google is your best friend. http://en.wikipedia.org/wiki/Debian
yeah man, I'm pretty surprised too that no one else is interested in this! I would love to see debian get ported to work on our phones
For those who are asking, debian is a version of desktop Linux. When it works on our phones, it will essentially allow you to do almost anything you can normally do on a desktop computer.
Thanks for the link! This looks luke it would be amazing.. I hope we can eventually get this...
Sent from my Vibrant using XDA App..
Typos/Nonsense due to Swype!
Stock Root + RyanZA LagFix + Captive Camera MOD
post videos.
freekyfrogy said:
It will essentially allow you to do almost anything you can normally do on a desktop computer.
Click to expand...
Click to collapse
You mean, it'll allow you to do almost anything you can normally do on a tiny format linux desktop computer
It's all good and dandy, someone has ported Ubuntu to N1 back in a day, but the question remains:
Why would you want to run a full fledge Linux OS on your phone?
I am a linux user, and have been for quite some time, I do enjoy it on my work laptop with 14.1" of real estate, but I fail to see a huge benefit of running a complete OS on the phone.
And before everyone starts with "you know android is linux" I know that, and it is stripped down linux OS for portable devices like phones, etc. It is as good as it gets, and suits the portable device market well.
Please feel free to address my question:
Why would you want to run a full fledge Linux OS on your phone?
How about we get a port of WINE on android...
lqaddict said:
It's all good and dandy, someone has ported Ubuntu to N1 back in a day, but the question remains:
Why would you want to run a full fledge Linux OS on your phone?
I am a linux user, and have been for quite some time, I do enjoy it on my work laptop with 14.1" of real estate, but I fail to see a huge benefit of running a complete OS on the phone.
And before everyone starts with "you know android is linux" I know that, and it is stripped down linux OS for portable devices like phones, etc. It is as good as it gets, and suits the portable device market well.
Please feel free to address my question:
Why would you want to run a full fledge Linux OS on your phone?
Click to expand...
Click to collapse
I was thinking the same thing. Its kinda a party piece. Look at what my phone can do. You know. I had it on my N1 and i never used it. Just like we could have windows 95 on the HD2. The only good thing i used it for on the N1 was air-crack, and i never got it to work right.
So you can compile android source on your phone, duh!
Sent from my SGH-T959 using XDA App
Yeah, I find it a shame that some people think debian on a phone is simply a party peice. There are too many useful reasons to list, especially the reason to have a smart phone is to expand the abilities past just "a cellphone"
lqaddict said:
It's all good and dandy, someone has ported Ubuntu to N1 back in a day, but the question remains:
Why would you want to run a full fledge Linux OS on your phone?
I am a linux user, and have been for quite some time, I do enjoy it on my work laptop with 14.1" of real estate, but I fail to see a huge benefit of running a complete OS on the phone.
And before everyone starts with "you know android is linux" I know that, and it is stripped down linux OS for portable devices like phones, etc. It is as good as it gets, and suits the portable device market well.
Please feel free to address my question:
Why would you want to run a full fledge Linux OS on your phone?
Click to expand...
Click to collapse
The real question is why not....
I'm sick and tired of all the negative posts in the xda forums.
why would you want camera on a phone?
why would you play games on a phone?
why would you read webpages on a phone?
why would you text on a phone?
why would you listen to music on a phone?
why would you want to go to the moon?
Is it affecting you in some way?
does someone sacrifice a kitten somewhere when someone wants to use a device for something it was not intended to?
do you enjoy stifling development?
jzero88 said:
Yeah, I find it a shame that some people think debian on a phone is simply a party peice. There are too many useful reasons to list, especially the reason to have a smart phone is to expand the abilities past just "a cellphone"
Click to expand...
Click to collapse
good man
scrizz said:
The real question is why not....
I'm sick and tired of all the negative posts in the xda forums.
why would you want camera on a phone?
why would you play games on a phone?
why would you read webpages on a phone?
why would you text on a phone?
why would you listen to music on a phone?
why would you want to go to the moon?
Is it affecting you in some way?
does someone sacrifice a kitten somewhere when someone wants to use a device for something it was not intended to?
do you enjoy stifling development?
good man
Click to expand...
Click to collapse
Agreed, why not explore the possibilities...
Sent from my SGH-T959 using XDA App
And why drive the nails down with a screwdriver?
There is no negativity coming from my question, I just needed to hear the reason people choose to run linux on their phones.
Developing a code for android phones on the phone running full linux, ok I failed to see the benefit, unless you get a hard-on from running a compiler on your phone while on a crapper. I would see how I might benefit from using some of the linux commands on my phone, like tcpdump, etc. but running a full raw OS on it is just overkill in my opinion.
And why drive the nails down with a screwdriver?
There is no negativity coming from my question, I just needed to hear the reason people choose to run linux on their phones.
Developing a code for android phones on the phone running full linux, ok I failed to see the benefit, unless you get a hard-on from running a compiler on your phone while on a crapper. I would see how I might benefit from using some of the linux commands on my phone, like tcpdump, etc. but running a full raw OS on it is just overkill in my opinion.
Click to expand...
Click to collapse
To probably sum it all up... MOBILITY.
First, I am sure you have several games on your phone which you play frequently. Some of those which you could play on your computer, and some maybe only on the device. If you could play games on your computer, why would you want to play them on your phone?
Virtually everything you can do on your phone you can do on your computer, ten times better. The reason we have Office Suites, Calendars that sync, Games, CAMERA!!!!, Photo Editing Tools, etc. etc. etc... the list goes on and on, is to do it mobile.
No offense, but your question is pretty ignorant.
"I just needed to hear a reason people choose to run linux on their phones"
Click to expand...
Click to collapse
as an answer is funny as hell if you ask me,lol.
I think if you have nothing productive to contribute other than asking meaningless questions which is plainly obvious, especially in a forum like this, then don't post anything at all.
Only my $0.02
jzero88 said:
To probably sum it all up... MOBILITY.
First, I am sure you have several games on your phone which you play frequently. Some of those which you could play on your computer, and some maybe only on the device. If you could play games on your computer, why would you want to play them on your phone?
Virtually everything you can do on your phone you can do on your computer, ten times better. The reason we have Office Suites, Calendars that sync, Games, CAMERA!!!!, Photo Editing Tools, etc. etc. etc... the list goes on and on, is to do it mobile.
No offense, but your question is pretty ignorant.
as an answer is funny as hell if you ask me,lol.
I think if you have nothing productive to contribute other than asking meaningless questions which is plainly obvious, especially in a forum like this, then don't post anything at all.
Only my $0.02
Click to expand...
Click to collapse
Why my question is ignorant? I am coming from a development stand point, what android (a linux port for smartphones and mobile tablets) does not do well that the full linux OS can address? I am curious... I've seen some embeded linux systems that are running the OS that requires to complete the task - packet sniffers for instance - I am pretty sure you can run the full OS on it, but it is overkill. I understand that the smartphones are our mobile gateways when we are away from computers, and as they stand right now I failed to see what the full OS can contribute to the whole mobile experience. Games? Well, now you have the whole android community asking when the cadega becomes available on android so that you can run Call of Duty, etc. on your phone.
And as far as me not contributing and asking the meaningless questions - when you come to the development board and demand that something needs to be ported on your device a developer will ask you my question:
Why do you need it? What benefits are you looking for?
So, I still to hear the answer to these questions besides the fun factor to show your co-workers look I have a penguin on my boot screen.
Look at it from this standpoint, every major phone release has hardware that can rival netbooks and ultra-portables, when the dual-core snapdragons hit later on, they may even be on par with low end notebooks. They contain cellular modems as well as wifi so you're constantly connected on a device that can fit in your pocket.
On the software side every major mobile operating system out there is constantly evolving and adding more and more features of that you can find on any PC/Linux/OSX box in the world. Albeit they're slimmed down versions, designed to be lightweight and functional on a smaller sized screen.
Add in google voice, a service that you can have your cell phone calls funneled into a single number or have your google voice number funneled into any other phone number you tell it to, plus you have skype. Installing Debian on a mobile device doesnt change the fact its still a cell phone the only it changes is how much this cell phone can do without restrictions.
Its the people who push software and hardware to there limits and into places they were never designed to be, that push the technology world and push the companies to do new things. There the pioneers who are trying to marry the inevitable before anyone else is ready. Those are the people who make companies like Google, Nokia, Intel, etc etc realize that there is potential in a risk, when there is a community ready to back them up. If it wasn't for the indie developers out there trying to minimalize linux to be used on cell phones we wouldn't have our beloved Android today.
You ask why, I'll answer because its inevitable. You can join the front lines or you can wait.
I hope this is the right place to post this, if not my apologies. I've had my Droid X for two weeks now, and have done a few customizations to it (NexTheme, root, BusyBox) and to be honest I'm bored already even though I'm still getting used to this phone...and even though it's my first Android powered device, and second smartphone.
Anyways, I want to dig into the guts of this and possibly contribute. I have been working with some form of Unix since the early 90's, and I'd like to think I'm quite experienced with it.
This is where I need assistance. Even though I'm quite adept with my Google-Fu, I'm still not able to point myself in the correct direction. I have a terminal app on the phone, and adb on my pc, however...to be frank...they both suck. Perhaps it's the limits of a mobile Linux platform and not having proper term types defined, but I can't get a decent working environment setup to navigate the filesystem in a comfortable and easy to read way. It's making it extremely difficult to see where I am, where I've been, and the files/directories and their permissions, etc etc. Have tried setting and resetting various TERM env types, but nothing seems to change the layout/display.
I had found an SSHd how to hoping I could install SSHd on the phone and just SSH in from a proper terminal, but it's from 2008 and deals with the G1. I wasn't able to get the steps to work for me.
Short of what I've already tried, what other options are there...if any? I don't know what, if anything, I could contribute to the community...but I'd like to give it a real go, and I *really* do love to mess with things heh heh....
The easiest way i have seen to navigate through your file system is using root explorer on the market.
Since you have adb set up, you should be able to execute "adb shell". Also, there seems to be an emulator included in the sdk, though I haven't used it myself.
Sent from my DROIDX using XDA App
mattyboy1013: I'm looking for a non-gui shell based method of navigation. A terminal is a lot easier and quicker for me.
pchop: Yea, I've used adb shell when manually rooting, and I wasn't too keen on how it laid things out. Particularly in a single column making navigation difficult. I'll take a look at the emulator though, and see what it does. Thanks.
I may be wrong but isn't android a java platform sitting on top of unix?
That's my understanding as well, and I'd like to navigate it as if it were a Linux box, ie: through a console. Problem is, the two terminal apps I have access to (as mentioned above - terminal emulator and adb shell) present the file system in a single column and with no sorting. It makes navigating and seeing whats available quite difficult.
What I'm looking for, if it even exists, is a terminal app that will display in rows and columns, and sorting alphabetically with directories first then files. Basically how most Linux distributions do by default and have for years.
I tried some more with my attempts at getting SSHd on the phone by compiling dropbear myself via the android source, but no go. The compile bails on me even after several fixes and attempts. Was hoping SSH in via a gnome-terminal, xterm, eterm, etc on one of my Linux boxes would set a proper TERM environment that the phone would respect, but I may be barking up the wrong tree there as well.
Dunno, I'm just in search of something to play with, and heck...doing all of the above has kept me pretty busy anyways lol.
I've been looking constantly throughout many forums and have not found anyone with a hindrance of talk about running full linux on webtop with full functionality of the phone.
I've been messing around with the terminal and tried to fish around for something and i wasn't able to find anyway to put ubuntu on this app while being able to support the phone dock accessibilities.
So far for what i know is that its running a 32bit(kinda thought it may be possible for a 64bit counting the dual core) custom UI of Debian while having some source code from Ubuntu to run Firefox. I tried to manually install chrome but was not able. From what I've noticed is that there is a special partition hidden in the root for running webtop mode through the /osh folder i believe.
I bought the the laptop dock and honestly i got to say that this phone has a LOT of potential, the problem to me is that the OS build for webtop is WAY too limited. I would like to see this thing run a full linux with possibly openoffice, chrome, etc. If anyone has any info about a possible hack or something, i'd love to learn about it.
it wud be genious to get ubunut as the 'webtop'
why not
It is Ubuntu, but it has had some things stripped out or built from local sources. Many of the packages are package-name-123.123mot and this causes lots of dep res issues when trying to add in something like xterm from ubuntu feeds.
Lets be clear, there is a linux box lurking in there waiting to be freed. Make is there, gcc is there, X is running on HDMI, there are X apps, apt is there, dpkg is there, /etc is there.
I expect we'll get an xterm running on it this week, if not sooner.
I have the laptop dock, as well. The webtop is this phone's killer feature, imo. Being able to use a full desktop browser is a huge benefit in my line of work. It would be a huge improvement to gain root access and run a more complete Ubuntu.
An update: Success on xterm!
I was able to grab a debian armel xterm and extract it (couldn't install) to /osh/tmp (seemed handy) and fire up /osh/tmp/usr/bin/xterm and display it back to my laptop. I'll have to figure out more about dpkg and why it wasn't installing correctly with this command line, which it seems should have worked:
dpkg -i xterm-armel.deb -root=/osh
We should try to use dpkg properly so we have a maintainable /osh moving forward, to do otherwise is to invite issues. I have dd'ed off my /osh file-system so I can revert when if and when I break it. My goals are fairly straight forward with this endeavor:
* SSH via /osh so it is in init.d and supports -X.
* A terminal of some sort. (half ways done)
* All done via a maintainable and revertible package manager.
To go off laying down zip files or copying around files is far from my goals and should be far from yours.
Full linux?
Arm linux is different from x86 linux. When you say full linux what exactly do you mean?
I understand the need to have it more closely resemble and function like 10.04 lts but it is more likely gonna be closer to a distro like Angstrom...
infrared411 said:
Arm linux is different from x86 linux. When you say full linux what exactly do you mean?
I understand the need to have it more closely resemble and function like 10.04 lts but it is more likely gonna be closer to a distro like Angstrom...
Click to expand...
Click to collapse
ARM Linux and x86 Linux are not different, except in the architecture the binaries are compiled for. The functionality is the same, regardless of the target architecture.
When I say a full Linux I mean it looks and feels like a standard Linux/Unix system with a /var, /etc, /usr, etc. with the most of the functionality we would expect (apparently working /etc/init.d and an actual /etc/passwd) and some of the binaries we know and love (dd, bash, perl, python, vim, Xorg X bits)
It appears to be Jaunty 09.04 based from looking at /etc/lsb-release. Having said that, the packages appear to have been rebuilt at Motorola and some of the deps are missing or I am reading the output incorrectly.
You are confusing desktop linux with embedded linux. For example take a look at the differences in udev.
Sent from my MB860 using XDA App
I hear you, but it looks pretty much like a desktop distro to me, including udev. I do note that /proc and /sys are bind mounts onto /osh/proc and /osh/sys from android, so it is bastardized in that respect.
droidbird said:
I hear you, but it looks pretty much like a desktop distro to me, including udev. I do note that /proc and /sys are bind mounts onto /osh/proc and /osh/sys from android, so it is bastardized in that respect.
Click to expand...
Click to collapse
I'm fairly certain it's the full Ubuntu distro. They've probably snagged packages from Launchpad or such, so once we have dpkg set up, we should just be able to start running with it.
It clocks in (/osh) at 677MB with ~77MB free on the file system. It's pretty feature complete as a userspace from what I can tell.
droidbird said:
It clocks in (/osh) at 677MB with ~77MB free on the file system. It's pretty feature complete as a userspace from what I can tell.
Click to expand...
Click to collapse
Only 77MB free... I might grab an SD card and start installing applications onto it. It'd be easy to add the respective paths to the applications on the SD card to the PATH variable via a script. (I'm thinking about being able to make something that we can pass on as a package to others in the future.
I think the biggest problem will be the RAM. I don't know Android much (2nd week messing with it) but we should find a way to close down some of the apps when launching our 'full' linux. Maybe freeze them or something. If we're using an SD card could we not partition 1GB for swap? I heard about memory problems after having 11 tabs up in Firefox, it'll only get worse with more apps.
Throw in a keyboard/mouse and we could have a desktop that we can plug into any HDMI capable tv/monitor, that would be nice!
droidbird said:
An update: Success on xterm!
I was able to grab a debian armel xterm and extract it (couldn't install) to /osh/tmp (seemed handy) and fire up /osh/tmp/usr/bin/xterm and display it back to my laptop. I'll have to figure out more about dpkg and why it wasn't installing correctly with this command line, which it seems should have worked:
dpkg -i xterm-armel.deb -root=/osh
We should try to use dpkg properly so we have a maintainable /osh moving forward, to do otherwise is to invite issues. I have dd'ed off my /osh file-system so I can revert when if and when I break it. My goals are fairly straight forward with this endeavor:
* SSH via /osh so it is in init.d and supports -X.
* A terminal of some sort. (half ways done)
* All done via a maintainable and revertible package manager.
To go off laying down zip files or copying around files is far from my goals and should be far from yours.
Click to expand...
Click to collapse
I'm interested in this too. I was poking around /osh and trying to get gcc to work so I could try compiling some different things.
I think my aims are slightly different than yours, but lots of the same knowledge is needed. I'm interested in getting applications to run on the phone and showing up in the webtop. i.e. I'd like to have the xterm showing up on the top, not just across the network on a remote X display, like your laptop.
I can't get gcc to work because they seem to have left out the ARM 'cc1' binary which is called.
Anyway, do you mind posting the steps you took (and the site where you got the ARM xterm binary) to get the xterm up and running on the phone? I'm trying to get an ARM cc1 so I can get gcc up and going. From there, I'm hoping I'm not from from 'configure' and 'make' to get lots of different things working. (I realize this isn't something most people would want, but I'm looking at this from the point of view of someone who might like to develop applications for the webtop.)
Also, if you can find out what the proper DISPLAY environment variable is for the webtop itself (and what to tell the 'xhost +' command to let it display X on the webtop), that would be huge for me.
I'll post anything I'm able to find out as well. The more shared knowledge, the better.
For your .deb files, take a look at Launchpad. I'm guessing that's where Motorola probably got their files from.
Does anyone have a backup of their /osh? I might of screwed some stuff up and would like to compare.
I do, currently a 4k dd of the device, ~700mb.
Sent from my MB860 using XDA App
the memory problem is not really an issue, you just have to manually set the partition for webtop mode to be bigger, there is an extra 10gigs built in the phone to run, all that is needed is just the edit on that.
what i mean in full Linux is that i wan't to run REAL applications, not web apps. I ran an external hard drive will movies and music and what not. I saw that this device can really handle heavy traffic like 1080p videos and it brought me to think that this device has the performance to handle a full Linux with minimal lag. a 1080p video runs at an average 2gigs and running on the ram with about at a constant of 150-250 Mb/s depending on how it is running the codec. To be honest the ram is VERY efficient, and the only problem i see to be honest is trying to stream 720p off of YouTube because the phone can't take all the speed (even when in wifi off of a t3 network). There is some limitations but the system can definetly handle high traffic off the ram.
Anyways, aside from that. I searched through the /osh and i found that there is a way to script out addons to do specific back door functions. I'm not really a code scripter so this is where im in uncharted territories. Since this is Ubuntu source code, i believe that if you design a special function script to unlock service mode within the webtop, we might get a full terminal and maybe admin functions. Then maybe we will have right to install specific functionalities. Since Motorola built this build, my guess is that they'll have a pretty complicated security to tap into service mode. Anyone find anything of such resemblance in the root of the os?
Mafisometal said:
the memory problem is not really an issue, you just have to manually set the partition for webtop mode to be bigger, there is an extra 10gigs built in the phone to run, all that is needed is just the edit on that.
what i mean in full Linux is that i wan't to run REAL applications, not web apps. I ran an external hard drive will movies and music and what not. I saw that this device can really handle heavy traffic like 1080p videos and it brought me to think that this device has the performance to handle a full Linux with minimal lag. a 1080p video runs at an average 2gigs and running on the ram with about at a constant of 150-250 Mb/s depending on how it is running the codec. To be honest the ram is VERY efficient, and the only problem i see to be honest is trying to stream 720p off of YouTube because the phone can't take all the speed (even when in wifi off of a t3 network). There is some limitations but the system can definetly handle high traffic off the ram.
Anyways, aside from that. I searched through the /osh and i found that there is a way to script out addons to do specific back door functions. I'm not really a code scripter so this is where im in uncharted territories. Since this is Ubuntu source code, i believe that if you design a special function script to unlock service mode within the webtop, we might get a full terminal and maybe admin functions. Then maybe we will have right to install specific functionalities. Since Motorola built this build, my guess is that they'll have a pretty complicated security to tap into service mode. Anyone find anything of such resemblance in the root of the os?
Click to expand...
Click to collapse
We have root. We could go as far as setup our own desktop environment separate from Webtop. There would be no need to worry about Motorola's security problems.
droidbird said:
An update: Success on xterm!
I was able to grab a debian armel xterm and extract it (couldn't install) to /osh/tmp (seemed handy) and fire up /osh/tmp/usr/bin/xterm and display it back to my laptop. I'll have to figure out more about dpkg and why it wasn't installing correctly with this command line, which it seems should have worked:
dpkg -i xterm-armel.deb -root=/osh
We should try to use dpkg properly so we have a maintainable /osh moving forward, to do otherwise is to invite issues. I have dd'ed off my /osh file-system so I can revert when if and when I break it. My goals are fairly straight forward with this endeavor:
* SSH via /osh so it is in init.d and supports -X.
* A terminal of some sort. (half ways done)
* All done via a maintainable and revertible package manager.
To go off laying down zip files or copying around files is far from my goals and should be far from yours.
Click to expand...
Click to collapse
Fair warning, I'm frequently wrong... but off the top of my head, I think you would need to chroot into the webtop environment in order for a dpkg / apt-get install to work correctly. From what others have posted and my own (brief) investigation, the webtop isn't completely standalone... it shares with the android environment. I've been thinking of leaving the webtop alone for now, and trying the method used to run a chrooted Ubuntu instance on the Nexus One. The risk is low, and once that is in place, I could take a shot at starting an X session that runs out the HDMI, instead of just a VNC server...
EDIT: I should have asked if you chrooted before I just assumed... Sometimes I think before I post, but not often enough.
I got xterm and xeyes to run locally
{
"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"
}
(binaries are from a ubuntu-jaunty-arm setup I did in qemu)
After I get a bit more working I'll post better instructions, but for tinkerers:
DISPLAY:0.0 is correct but you also need XAUTHORITY=/data/home/adas/.Xauthority
lxterminal seems to have issues running locally.
Things can be added to the dock by editing /data/home/adas/.gconf/apps/avant-window-navigator/window_manager/%gconf.xml but you'll also need to create a (standard) .desktop file. You can modify the nautilus one to browse /.
i agree package management is needed, but I don't think using the existing one is a good idea. I think either:
1) Create a ubuntu-arm based distro that can be launched when plugged into a dock/hdmi, but leave /osh mostly untouched
2) Or keep everything in a separate prefix, like macports/fink do.
A problem with using /data though is it's mounted nosuid. And /osh is near capacity already.
Hello,
i've spent few days experimenting and i'm totally lost.
I will write some example scenario:
I have function_1 in which give different results on every run (if last call >30s new results, <30s will give old one) (the time is checked using another "Utils class")
I'm hooking 3 processes which use some_method_1
I need to give them exactly same results from my function_1
The problem is every hooked process run another instance (?) of function_1, so i get bad results.
I've experimented a lot with Intents, BroadcastReceiver etc.
Tried implemeting them in initZygote but the problem was i don't know why but i can't load there sqlite file
Code:
SQLiteDatabase db = SQLiteDatabase.openDatabase(PATH, null, 1);
loading of file mostly works only in some parts of handleLoadPackage.
Tried invoking file loading, when all was loaded but still error 14, i guess it's about that BroadcastReceiver was in initZygote , and to be strict it was:
Code:
findAndHookMethod("com.android.server.am.ActivityManagerService", null, "systemReady", Runnable.class, new XC_MethodHook()
I would be glad for any help, thanks in advance!
Actually each process has its own memory. During startup, there is only one process (well, on 32-bit ROMs that is) called Zygote. That's where Android initializes some stuff that is required by every app, and where initZygote() is called. Every time an app is started, it gets a copy of the Zygote process, including its memory at that time, but from that point on, the memory is independent. There is no sync between the app's memory and Zygote anymore, in neither direction, and no sync between apps.
If I understand you correctly, you store the result and the timestamp in variables. As explained above, that variable is not shared between processes due to Android's (or Linux') general architecture. That's what you need IPC for, i.e. using services, intents, files, ... I don't know what exactly you're trying to do and which solution would fit best. Using files is usually the easiest way, but they're not really suitable if you have lots of refreshes and you might run into racing conditions. With intents, you have to check whether you can find a good way to send back the result. And services are generally possible (used e.g. by XPrivacy), but harder to implement, especially under Lollipop.
rovo89 said:
Actually each process has its own memory. During startup, there is only one process (well, on 32-bit ROMs that is) called Zygote. That's where Android initializes some stuff that is required by every app, and where initZygote() is called. Every time an app is started, it gets a copy of the Zygote process, including its memory at that time, but from that point on, the memory is independent. There is no sync between the app's memory and Zygote anymore, in neither direction, and no sync between apps.
If I understand you correctly, you store the result and the timestamp in variables. As explained above, that variable is not shared between processes due to Android's (or Linux') general architecture. That's what you need IPC for, i.e. using services, intents, files, ... I don't know what exactly you're trying to do and which solution would fit best. Using files is usually the easiest way, but they're not really suitable if you have lots of refreshes and you might run into racing conditions. With intents, you have to check whether you can find a good way to send back the result. And services are generally possible (used e.g. by XPrivacy), but harder to implement, especially under Lollipop.
Click to expand...
Click to collapse
IPC would be some good idea, thanks for hints Master, I appreciate your response!
//I aim only KK, don't plan to use LP
Automatically optimizes SQLite databases on boot, on schedule, every X days.
Just a quick and dirty adaptation of an old SQLite3 optimizer script from init.d days to a Magisk Module using a service.sh script instead, with an internal date offset mechanism to run the script every X days (default: 3 - which is plenty, and specifically to stop silliness).
Update And credit note: finally after a fair bit of digging, i think i located the original author of the original init.d version of the main vacuum code snippet ive repurposed (stolen) for this module. It appears to be from user @mcbyte_it (doesnt seem to be current or active) and from a post here. Although i only saw derivative reworkings of this script, and used only the main sqllite script function, i arrived at a different method of tracking last run date, when his is arguably more mainstream/concise. Im fairly certain this is the originator especially as the post also has a zipalign script that was also suggested to me to do....and which i have been fiddling with for months....
The script will wait until boot is completed AND then until avg CPU usage is under 30%, to minimise the risk of possible corruption.
Disclaimer: As always any use of any 3rd party script/software/advice is at the users discretion. All reasonable efforts have been made to make this as safe as possible, but the responsibility ultimately falls to the user whether to use and run the script.
What it does:It:
Reindexes
Vacuums
Analyzes
all .db files under /data.
It runs a 1st run optimize after install (temp file optimsql_first_run on sdcard is used to enable this, and removed after first run), and then on schedule after that.
By default it logs just script progress to /storage/emulated/0/autosqlite.log, but you can choose to enable more detail in the log if you wish
User Configurable Options:The schedule and loglevel can be changed by an external file on sdcard:
Create a file named autosqlite_options on sdcard (/storage/emulated/0/)
Inside create the follow key=value pairs to suit your preference:
interval=x (where x is the number of days between script runs, for the love of god do not put 1 (this goes out especially to the kind of people who put every app on their Magisk magiskhide/deny list) there is no benefit and you just heighten the possibility of corruption)
loglevel=x (where x is either 1 (detailed logging) or 0 (basic logging - default))
Requirements:This module requires a working SQLite3 binary. If your ROM does not provide one (you can check via typing sqlite3 into a terminal), you can choose to use my SQLite3UniversalBinaries module located here:
https://github.com/stylemessiah/SQLite3UniversalBinaries
Dont forget you need to download a named SQLite3UniversalBinaries.vx.x.zip file from the Releases page under Assets. Do not try installing the source code with Magisk Manager, it will not go as you expect
All the modules action takes place in the service.sh file, its commented reasonably well for those wanting to check how it works
* See... now theres something else to use with my SQLite3 Universal Binaries module other than the GPay SQlite Fix Module <- dont use that anymore, it makes me stabby. It is literally the last resort for getting Google Pay/Wallet to work ,
Please note: the included LICENSE only covers the module components provided by the excellent work of @Zackptg5 's Magisk Module Extended, which is available for here for module creators
https://github.com/Zackptg5/MMT-Extended/
All other work is credited above and no one may fork or re-present this module as their own for the purposes of trying to monetize this module or its content without all parties permission. The module comes specifically without an overall license for this intent.
Download:
Repo: https://github.com/stylemessiah/AutomaticSQLiteDBOptimizer
Release: https://github.com/stylemessiah/AutomaticSQLiteDBOptimizer/releases/latest
Powered by Ponkle
@73sydney Nice! If you're looking for newer sqlite3 binaries, I have a build script you can use to build it or you can just grab the precompiled ones at my repo: https://github.com/Zackptg5/Cross-Compiled-Binaries-Android
Zackptg5 said:
@73sydney Nice! If you're looking for newer sqlite3 binaries, I have a build script you can use to build it or you can just grab the precompiled ones at my repo: https://github.com/Zackptg5/Cross-Compiled-Binaries-Android
Click to expand...
Click to collapse
cheers man, i was trying not to pinch all your toys
i mean i could have done an androidacy and scraped your repo for just the files i needed
plus im lazy
73sydney said:
optimizes SQLite databases
Click to expand...
Click to collapse
Nice
how about no schedule, i want to execute it whenever i want
possible ?
loopypalm said:
Nice
how about no schedule, i want to execute it whenever i want
possible ?
Click to expand...
Click to collapse
I refer the gentleman to the name of the module and title of the thread:
"Automatic SQLite DB Optimizer"
the distinct lack of the word "manual" should be a clue
what are they teaching in school these days?
i made this to be automatic and made special note about the intervals because theres people who would abuse this and run it every day if they could, both designed to avoid misuse/abuse:
interval=x (where x is the number of days between script runs, for the love of god do not put 1 (this goes out especially to the kind of people who put every app on their Magisk magiskhide/deny list) there is no benefit and you just heighten the possibility of corruption)
im not really interested in making a manual version option unless you can convince me where there is a use case benefit, because all i see is potential for misuse/abuse that i specifically made this to avoid....
running it by default it runs every 3 days which is twice a week and probably still overkill, but trying to cover all bases
your other option is to ask me for permission (sadly because of abuse in the past from certain entities trying to monetize my and others work, my contributions are not GPL etc) to fork and alter the code yourself....
73sydney said:
I refer the gentleman to the name of the module and title of the thread:
"Automatic SQLite DB Optimizer"
the distinct lack of the word "manual" should be a clue
what are they teaching in school these days?
i made this to be automatic and made special note about the intervals because theres people who would abuse this and run it every day if they could, both designed to avoid misuse/abuse:
interval=x (where x is the number of days between script runs, for the love of god do not put 1 (this goes out especially to the kind of people who put every app on their Magisk magiskhide/deny list) there is no benefit and you just heighten the possibility of corruption)
im not really interested in making a manual version option unless you can convince me where there is a use case benefit, because all i see is potential for misuse/abuse that i specifically made this to avoid....
running it by default it runs every 3 days which is twice a week and probably still overkill, but trying to cover all bases
your other option is to ask me for permission (sadly because of abuse in the past from certain entities trying to monetize my and others work, my contributions are not GPL etc) to fork and alter the code yourself....
Click to expand...
Click to collapse
i was planing to use it once a week
categorizing me with people who do dumb stuff is an 'insult'
i asked a simple question man, don't jump to level 3 mind game please ...
loopypalm said:
i was planing to use it once a week
categorizing me with people who do dumb stuff is an 'insult'
i asked a simple question man, don't jump to level 3 mind game please ...
Click to expand...
Click to collapse
Im sorry, did you miss the double smileys intended to completely avoid any misunderstanding that i was being jovial. the other tip off that i wasnt burning you was taking the time to write several paragraphs
Can i suggest you just set the options file interval to 6 or 7 and let the module do what its described in the title as doing, it would make no functional difference, other than saving you a trip to terminal?
As i said, give me a valid reason for adding a manual option and ill gladly consider it, choosing a reason that fits completely within the actual parameters of the existing module doesnt really fit that offer...
ill go further to why i specifically didnt put in an option to run it manually (really folks are lucky i didnt block the option to run it every day) because you should understand what the sqlite vacuuming and other processes do:
* They copy the data from the db file to temp file before optimising it and writing it back, at any point in this theres the potential for corruption (sudden power loss, other processes accessing the file etc). Ideally any such corruption would be minimised by journaling but anyone who had used Linux for long enough knows not to count on such things.
* If any db is being written to, then the optimization process will NOT optimize that db...for the above possible corruption reasons. Hence why i not only put in a wait till boot completed function BUT also added a function to block the script from running unless avg cpu load over 5 minutes is less than 30%. all this to try and make things as safe as possible. So im not overly fond of a manual option which bypasses these safeties i specifically put there to hopefully safeguard people as best as possible. I dont want to get messages about how my module hosed someones apps.
Perhaps that better addresses my reasons?
As said, you can also ask me to fork the code, and ill even tell you how to add a manual function, but i personally wont be releasing such a version without a better reason than i want to do it every 7 days, when the script as it stands can do that AND at a far more predictably safe time and way than you manually likely can or will use it....
BTw, how is actually responding, even taking the time to do so and being jovial about it "level 3 mind games?", whatever the hell that even is?
73sydney said:
.
Click to expand...
Click to collapse
i was planing to make a recovery backup of "DATA" after the optimization of DB files ...
if you want better result add a comand to kill the coresponding app, then it would be more stable
or tell the people to use FlushRam or something like that before the proccess start, to make sure the result will be good, or make a 2nd module for advanced users ...
even with the condition you said some system apps stays working in the background and messing with their data can lead to corruption
i don't know you or your previous work and i don't have time to care for that
i just asked a simple question
answer with "NO, my module will not do that"
this will save your time and other people time
loopypalm said:
i was planing to make a recovery backup of "DATA" after the optimization of DB files ...
if you want better result add a comand to kill the coresponding app, then it would be more stable
or tell the people to use FlushRam or something like that before the proccess start, to make sure the result will be good, or make a 2nd module for advanced users ...
even with the condition you said some system apps stays working in the background and messing with their data can lead to corruption
i don't know you or your previous work and i don't have time to care for that
i just asked a simple question
answer with "NO, my module will not do that"
this will save your time and other people time
Click to expand...
Click to collapse
1) whether before or after backup, the files will eventually get optimized - if you want a more manual version use SD Maid or as offfered you can ask me how to alter the code as it sits and make your own version.
2) Im not ever releasing a script that kills anyones apps in the background, i would consider that suboptimal, and basically malware
3) I never said that some "system apps stays working in the background and messing with their data can lead to corruption". What i said was i designed the script to best avoid corruption by running only after boot completed and when avg CPU usage over 5 minutes was less than 30%. The sqlite3 itself generally wont allow access to a file in use. Im just adding what i think is a reasonable level of extra safety by deciding when the optimization routine starts to run, and that it isnt abused/misused by running multiple times in an unreasonable timeframe
4) How does
I refer the gentleman to the name of the module and title of the thread:
"Automatic SQLite DB Optimizer"
the distinct lack of the word "manual" should be a clue
not equal "NO, my module will not do that", only with some attempt at humour and a long explanation (soon followed by a more reasoned explanation) because i didnt want to appear dismissive. Yet it looks like you’d have preferred dismissive??
You seem impossible to please anyway someone tried to do it....
To be honest Im tired of this circular conversation. Everyone else knew from the word automatic in the title how things was going to work. Ive made suggestions of alternatives (SD Maid) and even offered to give you the info to change the script for yourself, and cant do more than that.... please choose one and lets move on, please?