Linux Admin => Android - TouchPad General

Hello Android Devs,
I am a linux admin, looking to help out. Is there a good place to do a quick comparison of commands btw linux and android ? Or where various scripts / special android locations of files.
I have been typing into my touchpad's Terminal Emulator and getting pretty irritated with no tab completion. I think I am going to buy a bluetooth keyboard. The other issue I was hoping Devs could help me find is, where is the fsck.vfat ? or e2fsck -o vfat? I have been having heck of time trying to find this and other normal linux commands without locate or tab completion. man e2fsck (no man pages found lol).
My "sdcard" in dmesg says needs to fsck'd, and I would like to help out because I see forum posts here and rootkitz.forums about just deleting the partition lol.
Thanks for advice
SorrowsTyr

Install Hacker's Keyboard from Market, this one has buttons like Ctrl and Tab.

Sweet I will try that thanks!
-Gary

On my Droid3 e2fsck is located in /system/bin. I am also seeing a fsck.msdos, but no fsck.vfat.

I also remember seeing someone was compiling a BASH shell for Android. This would give you the tab completion that Busybox doesn't have.
Sent from my Nexus S using XDA App

yes there is bash in android , just type it, if you want bash with root privies the most reliable way to do that is su -c "bash"
also dont fsck in android that will get you bad results just look at what happened in a1, better way to that is using webos either using tailor in preware which is a nice front end that unmounts and fscks your media partition or install xecutah and using the command line fsck it (remember to unmount first)
ps: path to the media partition is dev/store/media

sorrowstyr said:
Hello Android Devs,
I am a linux admin, looking to help out. Is there a good place to do a quick comparison of commands btw linux and android ? Or where various scripts / special android locations of files.
I have been typing into my touchpad's Terminal Emulator and getting pretty irritated with no tab completion. I think I am going to buy a bluetooth keyboard. The other issue I was hoping Devs could help me find is, where is the fsck.vfat ? or e2fsck -o vfat? I have been having heck of time trying to find this and other normal linux commands without locate or tab completion. man e2fsck (no man pages found lol).
My "sdcard" in dmesg says needs to fsck'd, and I would like to help out because I see forum posts here and rootkitz.forums about just deleting the partition lol.
Thanks for advice
SorrowsTyr
Click to expand...
Click to collapse
You should try this:
http://www.mediafire.com/file/g52q4...1.0-tenderloin-sdcard_check_fix_r4-signed.zip
It installs a fixed fsck_msdos ...
NOTE: This should be included in Alpha3.6, but until then ...

Related

Cant run Debian

Hi there, i was trying to run Debian on my pro, but i cant install it! i try two methods, the Linux installer Beta 1.7 (say kernel dosnt have ext and loop support) and the SU terminal emulator way (cant chmod to 4755 any file, even using the su command - from here: http://www.talkandroid.com/android-forums/android-development/1091-install-debian-android.html )...
My pro is ROOTED with latest z4root, i even do a factory repair with pc companion...
Any advice???
Regards!
I tried this as well... no loop is no loop ( required for chroot type runs )
works on a Samsung i5700 I have at work tho...
thnx for the reply, so i can add loop and the ext thing? or we need a custom kernel? , what rom have the samsung?, in other hand i dont know why i cant chmod the files, even using root explorer! regards...
needs a new kernel yes.
i5700 is running samdroid cooked ( forget which version, but added multitouch )
damn :/
now why i cant chmod the files using su terminal emulator or root explorer? maybe is because my sdcard is formated in fat32, regards!
fat32 knows nothing about *nix style permissions, in a way though... all files on a fat32 are set 0777, but not really... heh
For what it's worth, I've just had Debian running in a chroot on my X10 Mini Pro, using the instructions at talkandroid.com, as mentioned by the original poster. Sorry, but as a new poster, I'm not allowed to link directly to those directions. This is with stock ROM, upgraded to Android 2.1, rooted with SuperOneClick.
A few modifications are necessary to make it work. I'm going to try to describe what I've done, but I am working backwards, so it's entirely possible that I'll leave something out and you could suffer disastrous consequences. So please be sure you back up all crucial data before proceeding, and be prepared to accept the possibility that your phone could be destroyed in the process.
First of all, the instructions tell you to run scripts from your SD card, which isn't going to work unless the card has a partition with a Linux-compatible file system. I suggest following the directions as far as step 4. Then replace the "bootdeb" file in the "debian" directory with the modified version attached to this post. Rename it "bootdeb". Then you will have to run the following commands manually, preferably using adb shell, but it can be done in a terminal on the phone. Either way, using the ash shell helps by providing command completion and history.
As root (su):
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
mkdir /data/local/mnt
cd /sdcard/debian
cp bootdeb /data/local/bin #note: you may need to mkdir /data/local/bin first
cd /data/local/bin/
chmod 4777 bootdeb
You should now be able to run the bootdeb script to start up Debian.
The installation file says, "Be sure to run /scripts/onetime.sh as root from the shell after your FIRST 'boot'." This will prompt you to set a root password.
At this point, the Debian installation is command line only and root only. The image file needs to be resized before much can be added.
The other files in the Debian directory may be useful, but they all need to be modified before they can be used.
This is only a beginning. I don't know that I'm likely to get very far with it, so anyone else who's inclined to jump in and make this work better is welcome to do so!
edit: correcting grammatical error
Just in case anyone else shares my obsession -- I mean interest in getting Debian to run on an X10 Mini Pro, I thought I should report my progress. Or lack thereof.
Actually, as I said in the previous post, command line Debian works, and that's a lot of power to have available. But it would be nice to get X working, despite the lack of video drivers.
There's a lot of information out there about setting up X with a VNC server on an Android phone, then running a VNC client to access the graphic environment. The source of most accounts seems to be a thread at the androidfanatic forums, with the title "Gnome, KDE, IceWM or LXDE Desktop on your Android!"
(Sorry, I'm still too new at this to be allowed to post links, so this is the only way I can indicate where to find the information.)
I've tried lots of variations on those directions, trying to adapt them to the X10 Mini Pro. And I've had a little success. I can get to the Icewm or LXDE desktop and run the terminal program, but I can't start any programs that use X. Invariably, I get this error:
Error: Can't open display: :1.0
I've run out of ideas, so I'm taking a break from the project. If anyone else is interested enough to try, good luck to you!
For what it's worth, the most recent and comprehensive account of running Debian with X on Android phones appears to be at lanrat.com, in the "android" directory, filename "debian".
@RobbH
Very interesting! I'm waiting a new 8gb card so that I try it! Should you come up with any new progress please report here

[Q] Installing Ubuntu on Thunderbolt question

I've got all the files loaded on my phone, ext2 partition created, adb installed etc. When I go to type in
Code:
sh /sdcard/ubuntu/ubuntu.sh
I get an error [!: not found. Any ideas?
I have tried deleting & adding the folder back, redownloaded the files, still get this error message. I've even went to the ubuntu folder while in adb shell and verified the files could be seen ("ls" command) in the shell, which they could.
Any help would be great!
Ideas?
Anybody have an idea?
I give up... can not figure it out & I can't get any help from anyone. Looks like I'll stick with carrying my laptop around for Ubuntu..
Sent from my Xoom using XDA Premium App
I don't really know what you're trying to do offhand, but if the file is on your sdcard and not in a unix file system (ext) then it wont execute. If it is, then make sure you have execute permissions (chmod 755).
type ls -l /sdcard/ubuntu/ubuntu.sh
to verify
Sorry you're not getting much help. Have you tried sending a private message to the guy who pioneered that whole process?
tbh, not many people have use for ubuntu on droid. It's cool, sure, but I don't dev, and I have far more functionality on gingerbread than ubuntu.

BHT Installer (Basic Hacking Tools)

Hey guys, I came up with a basic set of tools which I find useful. You may redistribute , include in any custom ROMs and/or distributions.
This includes:
Rewrite /default.prop for ADB
Install and deploy busybox in /system/xbin
install bash, ipctool, strace, tcpdump, and viewmem binaries.
To install, you must be rooted.
Unzip the attached file
place it on your nook.
cd to the folder you installed
Run the following
Code:
sh /sdcard/BHT/run.sh
Please note, I use Android Market app QuickSSH to get into my nook terminal, your results may very.. I hope someone else grabs these files and makes it all more user friendly. I've got too many other things going on.
I encourage other developers to include these valuable debugging tools in their packages.
You, sir, are a monster! You get my vote.
Sent from my Nexus S using xda premium
AdamOutler said:
Hey guys, I came up with a basic set of tools which I find useful. You may redistribute , include in any custom ROMs and/or distributions.
This includes:
Rewrite /default.prop for ADB
Install and deploy busybox in /system/xbin
install bash, ipctool, strace, tcpdump, and viewmem binaries.
To install, you must be rooted.
Unzip the attached file
place it on your nook.
cd to the folder you installed
Run the following
Code:
sh /sdcard/BHT/run.sh
Please note, I use Android Market app QuickSSH to get into my nook terminal, your results may very.. I hope someone else grabs these files and makes it all more user friendly. I've got too many other things going on.
I encourage other developers to include these valuable debugging tools in their packages.
Click to expand...
Click to collapse
I can turn this into an apk, if you don't mind. By turn on adb with this method, adb will be rooted and the device will still be allowed to sleep?
brianf21 said:
I can turn this into an apk, if you don't mind. By turn on adb with this method, adb will be rooted and the device will still be allowed to sleep?
Click to expand...
Click to collapse
By all means. Please do.
My vote too. I just hope after you win that you keep up the great work on the Nook Tablet. The last two weeks or so have looked very promising towards getting custom roms on here and a lot of that has to do with Adam's hard work along with a few others
Nearly all of these are already in snowball-mod, but I'll include ipctool, and viewmem for the next release.
cfoesch said:
Nearly all of these are already in snowball-mod, but I'll include ipctool, and viewmem for the next release.
Click to expand...
Click to collapse
How did you get default.prop reread into memory? The only think I can see is the 2nd init hijack? Am I missing something a lot easier?
brianf21 said:
How did you get default.prop reread into memory? The only think I can see is the 2nd init hijack? Am I missing something a lot easier?
Click to expand...
Click to collapse
Note, I said "nearly all". I don't really see though how changing /default.prop would keep over reboots... rootfs is stored in memory and recreated every time, isn't it?
I've added the binaries to NT Hidden Settings. I have not implemented /default.prop swap yet. I have to play with hijacking init before I do. Thanks again.
brianf21 said:
I've add the binaries to NT Hidden Settings. I have not implemented /default.prop swap yet. I have to play with hijacking init before I do. Thanks again.
Click to expand...
Click to collapse
cool. where are you hosting that binary? I currently have a mirror set up at nook1.adamoutler.com for easy access... When someone gets a new device, they need to download 3 things onto their device to make it a real tablet.. nook1=hidden settings, nook2=homecatcher, nook3=market.. I may change 3 to launcherpro, but hidden settings is the number1 tool required for the nook Tablet.
AdamOutler said:
cool. where are you hosting that binary? I currently have a mirror set up at nook1.adamoutler.com for easy access... When someone gets a new device, they need to download 3 things onto their device to make it a real tablet.. nook1=hidden settings, nook2=homecatcher, nook3=market.. I may change 3 to launcherpro, but hidden settings is the number1 tool required for the nook Tablet.
Click to expand...
Click to collapse
Homecatcher? I mean, I understand if you want to keep using the B&N store and stuff, but if you don't care about the B&N stuff, then the hacked SystemUI.apk is a way better option than Homecatcher.
But then, you're advancing "launcher pro", while I would more generally say "any non-B&N launcher"...
I added another option to nt hidden settings to run adb as root. It doesn't require a reboot and it automatically turns off auto mount. I am using nemith's adbd.
remount / as rw
stop adbd
replace /sbin/adbd
remount / as ro
setprop to turn off auto mount
start adbd as root
It's not persistent after reboot, but it works and doesn't kill the battery. I am not going to bother with hkvc's hijacking init method, because it looks like you, hkvc, bauwks, and nemith will be able to replace the os soon. Thanks.

[Q] Noob questions from a linux geek

Hello,
I like to think i'm pretty good with linux, but i'm new to android, so please bear with me.
I have rooted the phone, and I've been poking around a bit and some questions arises:
1. In the root, i found several init.*rc files, which one is used for booting the phone?
2. usbd - this daemon seems to control the USB state (mass storage, pc mode, cdrom) - Is there some documentation for how to control this? I'd like to put some ISOs on my sdcard and use the phone to emulate a cdrom, and I think this would be possible through this.
It opens the socket /dev/socket/usbd, so I assume it will be controlled through this.
When i have time I'll poke more, but its useless if someone else already looked at this.
3. Is there a way to boot the phone into a debug state? I'd like to replace the /osh filesystem, but in order to unmount it I think I need to enter some kind of debug mode/single user mode?
4. Do we have the source code for the kernel with all the TI goodness? And is there a way of updating this?
Other than this I have some issues with sound my heavily modified webtop, alsa is the way to go, right?
Hopefully I'll get this sorted out and I'll be able to enjoy full debian on the webtop and in the terminal.
OMG, I have absolutely no answers for you, but I hope SOMEONE does, cause I wanna see more from this! You pose some great questions/possibilities! Being only a dabbler in Linux makes me useless, but I understand what you're looking for, and I wannit too!
\\Carved into this thread by my RAZR//
http://android-gz.com
I am not a Android developer, but, I like to treat Android as one of the GNU/Linux environment.
Usually, I always starts with dmesg. There are lot's of hints and pointers about the hardware itself.
Snippet from dmesg.
Code:
<5>[ 0.000000] Kernel command line: console=/dev/null rw [email protected] vram=20M omapgpu.vram=0:4M,1:16M,2:16MT init=/init ip=off mmcparts=mmcblk1:p7(pds),p8(utags),p14(boot),p15(recovery),p16(cdrom),p17(misc),p18(cid),p19(kpanic),p20(system),p21(cache),p22(preinstall),p23(webtop),p24(userdata),p25(emstorage) mot_sst=1
From the kernel boot parameters, you can see how Linux kernel allocates the MTD blocks.
2) I also like to 'browse' the filesystem...
Code:
PC$ adb shell
Android$ su
Android# ls -l -R / > /sdcard/lists.txt
Android# exit
Android$ exit
PC$ adb pull /sdcard/lists.txt
Look at tools/utilities in /system/bin or /system/xbin ...
For alsa, try look in /osh/usr/share/alsa ... it may have something useful for you.
Sorry, I cannot answer all of your questions, but, hope the my tips can help you to explore more about Android OS.
To know more about your device, this one might be a good starter...
Code:
PC$ adb bugreport
Anyway good luck.
Thank you.

[Q]How to Mount Archos G9 to (X)Ubuntu 11.10

Hello,
I tried to see the internal storage directly on Xubuntu 11.10 like a hard drive, so I tried to mount it without success.
Ok, to push some file on internal storage I can using adb, but it's not very "look" friendly.
So I've tried many post, this one seem to be the near goal.
[Guide] Mount Internal Storage in Ubuntu
But for me still don't work.
Do you have any idea?
Edit:
1st solution (Thanks iourine) :
. Install it from Synaptics of Application Center and see Multimedia-->gMTP in the system menu. To some degree, it is sufficient to manage the user content on the device
Edit:
2nd solution nut not working for me : help
Please see the file archos9.bash
Plug your device and in a terminal sudo sh "le fichier"
Just tried gMTP, works as it should. Siply install it from Synaptics of Application Center and see Multimedia-->gMTP in the system menu. To some degree, it is sufficient to manage the user content on the device; you don't need adb for that only purpose.
Note that I also have necessary settings in ~/.android/adb_usb.ini and in /etc/udev/rules.d/51-android.rules (I think you too, once you can see the device in adb.)
Also look Wiki for "Media_Transfer_Protocol" for other options. If you have Kubuntu, it will probably work off-the-box, with the above two files.
Or do
Code:
adb shell
and manage the /storage directory by hand.
I wonder, has anybody ported MC onto this device?
Thank you it's work. You just have to open this prog
Do you have a solution to mount automatically this internal storage?
I was just thinking about this "issue"
I've managed to get it mounted and showing up in nautilus, although I think the mtpfs fuse driver may be a little buggy, I had to do a little rain dance to get it to show up.
Which part is not working for you?
So with the first link! I block at the end.
so --> I don"t see in the "Places" menu a Drive marked with 'xoom' (or for me "tablette")
Even if I Plug in archos.
An idea?
Solution
The same thing,
I modified this script, but it not working. Any archos9 seen on xubuntu.
I see in media the dir but that's it. I tried to reinstall the mtfs... nothing, to do it manualy. Same thing.
You can find the script in the first message.
Let me know if it's work for you or how to improve it.
In advance thank you
Link : http://forum.xda-developers.com/attachment.php?attachmentid=921218&stc=1&d=1330292862
What do you think about this line : mtpfs on /media/archos9 type fuse.mtpfs (rw,nosuid,nodev,allow_other)
Do have you tried "MTPFS" ?
Do have you tried "MTPFS" ?
It works like a charm..
I've done this:
sudo apt-get install mtpfs
then
sudo mkdir /media/tablet
..and..
sudo mtpfs -o allow_other /media/tablet
is a piece of cake.
Yes i've tried
Yes, thank you, I tried.
I'm going to trie 2 thing:
- because i'm under 64 xubuntu, i wil install the 32 prog
- instal the last aos from archos, i read that they improve something for that!

Categories

Resources