XDA -> Linux pppd "Connect Script Failed" - Networking

Hi
I have followed the (excellent!) instructions to connect my XDA to my Linux box (RH9):
http://wiki.xda-developers.com/wiki/bluetoothnetworking
I'm stuck at the last hurdle though, everything seems OK until pppd when I get the error:
pppd[xxxx]: Connect Script Failed
I've been messing around with this for a couple of days now and I have found a few things out:
1, I did chmod 755 at-cmd.pl and I can execute the script from the commandline, don't know if this is relevant
I cant tell if the script is running - if I'm getting that far
Can anybody help me debug this problem, I'm sure its something simple.
Mank Thanks
Chris.

Related

[Q] Syslog for Android?

I'm trying to start busybox's httpd at boot w/o success. However, I can start it manually post-boot w/o problems. Can I enable a syslog facility so I can see what happens when the bootup script calls it?
Code:
httpd -p 80 -u 80 -h /sdcard/www -c /etc/httpd.conf
I've tried running the process as -u 80 and as -u 0, both work post-boot, not before.
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
KaiserLinux said:
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
Click to expand...
Click to collapse
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
KaiserLinux said:
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
Click to expand...
Click to collapse
I've compiled my own rooted kernel and a new busybox with syslogd to see if I can diagnose why bb's httpd isn't starting at boot. As I mentioned, it starts manually w/o a problem. adb logcat isn't very useful in this particular situation. Thanks for the reply though.
jocala said:
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
coldguy said:
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
Click to expand...
Click to collapse
Weird, the first 500 lines of init.rc are nothing BUT shell commands.
i.e. chmod 0666 /dev/input/event0
Anyway, further along in init.rc the daemon processes are started up. syntax looks like:
Code:
service playlogo /system/bin/playlogo
user root
oneshot
I've tried setting up my programs (httpd,syslogd) as services, no joy.
jocala said:
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
sorry to hijack your post.
but i want to know how do you modify the /init.rc,
because when i reboot, the /init.rc will automatic recovery the old verison.
did you check the /init.rc, is it modified, after your phone reboot?
Does logcat not give you the info you want?
You can go here to find out how to redirect stdout and stderr to the logcat as well.
init.rc is part of the root fs, which is compiled into the kernel. So, a custom kernel is required. Search for custom kernel for details.

[KERNEL] adb "cannot run as root in production builds" fix

Discovering "adb shell" gave joy, experiencing the shell as minimal bash with awful line handling (backspace and command recall) gave annoyance, experiencing "adb root" refusing access gave frustration.
After some tracking, it turns out that adbd behaviour is determined by the property "ro.debuggable" which is set during system init. The initial value is located in the file "/default.prop". In JP6 it is set to 0 resulting is adbd refusing access. However, set to 1, "adbd root" will give the much better response of "restarting adbd as root".
Once set, the property value cannot be changed. To get this fixed you need to change the contents of the file default.prop which is located in the initial ramdisk image.
Optionally, you can put a replacement shell in /sbin of in ramdisk image so that when connected "exec bash" will make things more relaxing. I attached the version I am using, which is statically linked with ncurses/readline.
There is also a simple patch to unlock adbd if you dislike opening and rebuilding the ramdisk image. However, you do need binoffset which is located in the scripts directory of the linux source tree.
Code:
ofs=`scripts/binoffset initramfs.cpio \`echo -n 'debuggable=0' | od -t u1 -An\` 2>/dev/null`
echo 'debuggable=1' | dd bs=1 seek=$ofs conv=notrunc of=initramfs.cpio
Thanks...any help though?
Hi....thanks for the fix....could you point me to a decent howto on editting the initial ramdisk?
Thanks
M
it doesn't sound simple
i will try to figure that one out ...
Dear Hexabit,
I know it's an old topic.
But do you know how can I use this Fix on a windows 7?
tried searching for binoffset software/script..couldn't find anything
I have a Flytouch 3 tablet, rooted(Z4) with terminal emulator and root explorer.
is there a way to use you bash.rar to unlock adb access?
thanks for the help
doekoe87 said:
Dear Hexabit,
I know it's an old topic.
But do you know how can I use this Fix on a windows 7?
tried searching for binoffset software/script..couldn't find anything
I have a Flytouch 3 tablet, rooted(Z4) with terminal emulator and root explorer.
is there a way to use you bash.rar to unlock adb access?
thanks for the help
Click to expand...
Click to collapse
you have to split the kernel, then decompile the ramdisk and edit default.prop and change ro.debuggable to 1, then recompile and flash
confuse but giving me a clue
I use unpackbootimg in my ubuntu pc.
The adb root works not properly after set debuggable=1.
When I saw your thread that told the adbd should be unlocked too, then I replace the adbd with a unlocked one. It works!
Thanks for your help.
I am sorry but I don't understand how to use the file.
teoking said:
I use unpackbootimg in my ubuntu pc.
The adb root works not properly after set debuggable=1.
When I saw your thread that told the adbd should be unlocked too, then I replace the adbd with a unlocked one. It works!
Thanks for your help.
Click to expand...
Click to collapse
Hi,
I can upload nothing to my root catalog of my phone.
So how could I use the adbd file in this case?
Phone is rooted but I have a problem with adb root command like subject of this topic is.
Can u help me with the process because I kept the file in /sbin but still it's not working.
Active system
Sent from my SM-G900T3 using Tapatalk

(Working) Ubuntu on A500

Maybe you've heard of this app? https://market.android.com/details?id=com.galoula.LinuxInstall
Note: You need to be rooted for this to work.
I've just installed and run it on my a500 (After a full backup through CWM of course). In settings, I set it to install Ubuntu Maverick Meerkat. It installed fine, although you have to go through some trial and error with the settings panel:
Loop file must be "/data/local/tmp/Linux.loop"
"Bind Android" must be enabled
"Allow write on /system" must be enabled!
Linux is activated through a terminal by typing "linuxchroot". Here is an extract from the terminal. (I'll upload screenshots when I find a working program.)
Code:
#linuxchroot
I: Mounting device for ubuntu maverick...
I: Entering chroot...
I: Executing /etc/init.android/rc_enter.sh
/etc/init.android/rc_enter.sh: 2: /etc/init.d/hostname.sh: not found
[email protected]:/# cat /etc/issue
Ubuntu 10.10 \n \l
[email protected]:/# apt-get install python
Reading package lists... Done
Building dependency tree... Done
python is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:/# python
Python 2.6.6 (r266:84292, Sep 16 2010, 14:12:30)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 3+7
10
>>> exit()
[email protected]:/#
I'm running a stock 4.010.13_COM_GEN2 rom.
I'm working my way around the console now. As you can see, apt-get and python work. I just need to figure out how (if it's possible) to install gnome onto this installation.
Update:
So it turns out "add-apt-repository" isn't installed by default in the usual place. Or the shortcut doesn't work. Either way, I found that the /usr/bin directory contains all the required files. Since this linux seems to log you in directly into root, which might not have well-made shortcuts, you cannot access the applications normally. I cd'd inbto /usr/bin and add-apt-repository works. Now to see if usr can be the default login.
Alright. Forget about trying to get a GUI working on this type of linux. Nvidia's Tegra drivers for Xorg are MIA.
Getting the following:
/system/xbin/linuxchroot.sh: UID: readonly variable
Any thoughts?
Sent from my MB860 using xda premium
just_mike said:
Getting the following:
/system/xbin/linuxchroot.sh: UID: readonly variable
Any thoughts?
Sent from my MB860 using xda premium
Click to expand...
Click to collapse
When do you get the message? Right after you type "linuxchroot"? If so, try typing su then hitting enter; and then typing "linuxchroot"
Same thing happens, will post over in the main thread? Thanks
Sent from my MB860 using xda premium
If you want a working guide with all the necessary files there is an app in the market.
For Ubuntu:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Or for backtrack:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Both work on the iconia. The only fiddling I had to do was change a CD command from the guides suggested command to CD /mnt/external_sdcard. I am able to boot both from my iconia .
profclean2000 said:
If you want a working guide with all the necessary files there is an app in the market.
For Ubuntu:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Or for backtrack:
https://market.android.com/details?id=com.appbuilder.u14410p30729
Both work on the iconia. The only fiddling I had to do was change a CD command from the guides suggested command to CD /mnt/external_sdcard. I am able to boot both from my iconia .
Click to expand...
Click to collapse
I cant load it in the iconia
FearL0rd said:
I cant load it in the iconia
Click to expand...
Click to collapse
Where are you stuck? Maybe I can help.
GNOME
Zen_Jackal said:
I just need to figure out how (if it's possible) to install gnome onto this installation.
Click to expand...
Click to collapse
Idea: Install GNOME and then a VNC client and connect.
I'll try it later. Will post my conclusions/steps taken/results here.
-Cameron
Zen_Jackal said:
Alright. Forget about trying to get a GUI working on this type of linux. Nvidia's Tegra drivers for Xorg are MIA.
Click to expand...
Click to collapse
http://developer.nvidia.com/linux-tegra
Possibly this could help??
You cannot run Xorg with Tegra 2 drivers when your GPU is already in use by Android. Either you have to run some sort of a virtual Xorg driver and use VNC to connect to the Linux, or you have to use native Linux and scrap Android.
Connecting via VNC works just fine, I'm doing it all the time... Just don't try running a heavyweight like GNOME or KDE, use something like LXDE (looks ok, but it's a lot faster!). There are plenty of tutorials on how to set this up on the internet.

[NO LONGER SUPPORTED][GUIDE] How to Triple Boot CM9, WebOS, and Arch Linux

ATTENTION!
This guide is outdated and I can no longer support it as I no longer own an HP Touchpad.
Disclaimer
This guide is intended for users who already have a Cyanogenmod firmware dual-booting with WebOS via Moboot. I, in no way shape or form, take any credit for this. I am simply posting this as a simple, step-by-step guide on how to triple boot (as there aren't any that I have found in this section). All credits go to their respective developers. I am in no way, shape, or form anything beyond an amateur developer who happens to be an advanced Linux and Android user. Also, I cannot be held liable for any issues you may encounter while or after following this guide.
Original Arch Linux port post can be found here: http://forum.xda-developers.com/showthread.php?t=1364034
Obvious Bugs and Things That Don't Work
-Wifi signal is a bit weak
-Camera
-Sound
-Microphone
-Bluetooth (apparently there's a fix for this floating around one of the Ubuntu threads)
-Compositing
-Multi-touch (no right click :/)
Prerequisites
-Cyanogenmod (Touchpad)
-Moboot (Touchpad)
-Novacom Driver (computer)
-Novaterm (computer)
-WebOS SDK (computer)
On Your Touchpad...
-Boot into WebOS
-Connect to your computer via USB (do NOT select USB Drive mode)
-At the home screen in the "Just Type..." search bar, type the following:
Code:
webos20090606
-You will see "Developer Mode" in the search results, open it and turn the toggle in the right hand corner of the card on
-Now stop touching it and get onto your computer
On Your Computer...
-Open Novaterm (if you are running a Linux distribution, this can simply be done in a terminal by becoming root and executing the command "novaterm"
-Now let's make some terminal love!
Mount the boot directory as readable/writable:
Code:
mount -o rw,remount /boot
Change directories to the boot directory:
Code:
cd /boot
CURL!
Code:
curl -O http://archlinuxarm.org/mirror/touchpad/uImage.ArchLinuxARM
CURL AGAIN!
Code:
curl -O http://archlinuxarm.org/mirror/touchpad/moboot.splash.ArchLinuxARM.tga
Change directories to the temporary directory:
Code:
cd /tmp
Kill this process thing!
Code:
pkill -SIGUSR1 cryptofs
Unmount the internal media:
Code:
umount /media/internal
ECHO!
Code:
echo
Resize to make room for Arch (I suggest at least 3000M, but no more than 4000M)
Code:
resizefat /dev/store/media 3000M
Resize partition:
Code:
lvm.static lvresize -L -4096M /dev/store/media
Make a new partition:
Code:
lvm.static lvcreate -L 4096M -n arch-root store
EXT3!
Code:
mkfs.ext3 /dev/store/arch-root
Let's make a directory called "linux":
Code:
mkdir linux
Mount linux:
Code:
mount /dev/store/arch-root linux
Change directories to linux!
Code:
cd linux
CURL AGAIN!
Code:
curl -O http://archlinuxarm.org/mirror/touchpad/ArchLinuxARM-touchpad-2011.12-alpha2.tar.gz
Untar! (this will take a bit...)
Code:
tar xzf ArchLinuxARM-touchpad-2011.12-alpha2.tar.gz
Well... we don't need that tarball anymore, so...
Code:
rm ArchLinuxARM-touchpad-2011.12-alpha2.tar.gz
CHANGE DIRECTORY!!!!
Code:
cd ..
Unmount the linux directory:
Code:
umount linux
Reboot! (You may have to do this a few times, you may get errors... you may keep trying?!)
Code:
reboot
Love Thy Arch
That's it, you're done. I advise opening a terminal once you're booted and updating the system with the "pacman -Syu" command (it definitely improves touch screen a bunch).
???
Profit
nice, might try this real soon when I get a chance, thanks
worked like a CHARM took forever to download and untar but its PERFECT thanks bro
Might give this a shot this weekend.
Sent from my myTouch_4G_Slide using Tapatalk
i'm getting a curl error 6 that it cant resolve dns archlinuxarm.org
i can goto the site in a browser and nslookup works in another terminal...
does my tablet need to be on wifi for this?
edit: it sure does.
In what way would this guide change to install ubuntu instead.? Thsnks
Sent from my XT910 using XDA App
djgavb said:
In what way would this guide change to install ubuntu instead.? Thsnks
Sent from my XT910 using XDA App
Click to expand...
Click to collapse
I want to know too.
added archlinux to my previous dual booting touchpad yesterday and i can no longer write to my external storage now!
I boot into webos and connect via usb I can still see my files but can't write
and CM9 can't see the partition at all....please help!
If i have to delete them, it's okay, but i just want it to work again in android. thanks in advance
getting this error on the very first CURL curl: (23) Failed writing body (714 != 4880)
i encountered MANY MANY issues trying to install this with my previous install of CM9...
had CWM, WebOS, CM9. still failed on many attempts to install from nova.
its best practice to doctor, install cm9, THEN follow these steps, will install perfectly! using right now
only issue im having is pacman command wont run, even with sudo, continuing to troubleshoot
edit** hmmm...after first reboot, arch refuses to load, and my CM9 wont display "sd" card to check uImage.archlinuxarm for commands/paths, same djxstream. WebOS internalz wont install either to view on touchpad :/
got it to work. i didnt have some dependencies installed. How do you bring up the keyboard to type in the terminal?
edit: ok found it.
---------- Post added at 04:03 AM ---------- Previous post was at 03:50 AM ----------
Solidus_n313 said:
i encountered MANY MANY issues trying to install this with my previous install of CM9...
had CWM, WebOS, CM9. still failed on many attempts to install from nova.
its best practice to doctor, install cm9, THEN follow these steps, will install perfectly! using right now
only issue im having is pacman command wont run, even with sudo, continuing to troubleshoot
edit** hmmm...after first reboot, arch refuses to load, and my CM9 wont display "sd" card to check uImage.archlinuxarm for commands/paths, same djxstream. WebOS internalz wont install either to view on touchpad :/
Click to expand...
Click to collapse
did you make sure u were connected to the internet? it worked for me with sudo
zcrugby said:
got it to work. i didnt have some dependencies installed. How do you bring up the keyboard to type in the terminal?
edit: ok found it.
---------- Post added at 04:03 AM ---------- Previous post was at 03:50 AM ----------
did you make sure u were connected to the internet? it worked for me with sudo
Click to expand...
Click to collapse
yeah, got it running after setting up wifi, took like 2 min after posting that, but arch still isnt loading :/
zcrugby said:
got it to work. i didnt have some dependencies installed. How do you bring up the keyboard to type in the terminal?
edit: ok found it.
Click to expand...
Click to collapse
mate, it really helps others if instead you say:
"ok found it, and in case someone needs it, it was like this..."
agree? ;-)
thx
k, got it going, had to start from SCRATCH. wiped partitions, rebuild, doctor to 3.0.0, installed CM9 then arch-linux.
runs great! just working on getting BT running (post 254):
http://forum.xda-developers.com/showthread.php?t=1304475&page=26
I installed XServer and XTerm and Ubuntu Chroot, then got LXDE on there. It runs fine, but I used WebOS Doctor to make a 4GB EXT partition by editing a text file in Linux. I followed a tutorial to do this awhile back. Now I want to tri-boot the actual 0.0.4 Ubuntu, CM9, and WebOS. 1. Is this even possible? 2. Will the 4GB EXT interfere with anything and what do I have to do to that partition?
---
works just fine the instruction a perfect thanks
did try to install applications but no go anyone get firefox or chrome installed ?
unistall arch just in case arch sh
http://dl.dropbox.com/u/68908006/ArchUninstall.sh
anyone want to give it a go see if it works for you
anyone having problems with install can try this and then rerun the install instructions lol just saying hope this helps other people it worked for me but do it at your own risk
i just mod it from other distro unistall sh
run this from webos in terminal
cd /media/internal
cp ArchUninstall.sh /tmp
cd /tmp
sh ArchUninstall.sh
For anyone having issues with installing apparently, run "pacman -Syu". If it doesn't work, please post your output here.
Sent from my htc_shooter using XDA
Bluetooth/Wifi
Solidus_n313 said:
k, got it going, had to start from SCRATCH. wiped partitions, rebuild, doctor to 3.0.0, installed CM9 then arch-linux.
runs great! just working on getting BT running (post 254):
http://forum.xda-developers.com/showthread.php?t=1304475&page=26
Click to expand...
Click to collapse
Anyone tried this?:
sudo depmod -a
sudo gedit /etc/modules
sudo update-rc.d bcattach_srv defaults
sudo reboot
That is the fix for the UBU install, just checking to see if this works on a TP with Arch already installed. I just havent gotten around to installing this yet but want all my ducks in a row for when I do. Thanks.
This may even help the already working WIFI.
edit: After the second command, a text editor should open up. Add "ath6kl" without the quotes to the bottom of the file, push save, close the editor, and go on the the next commands. If the touchscreen stops responding, hold power and home until the device turns off and boot back into Ubuntu and try again. It's a known bug. The last command should reboot the device again. Boot back into Ubuntu and you should have working wifi and bluetooth.
ORIG post :http://code.google.com/p/hp-touchpad-ubuntu/wiki/Installation <===THANKS!!!

[Q] busybox throwing "precmd" errors after rooting ICS

Hello,
Thanks for looking at this post! I wanted to post it to the rooting thread, but I'm too much of a noob to have access to developer threads. I searched around (both here and google), but couldn't find any useful info on my problem.
I'll get right to the point. I rooted my Acer A500 (after doing an OTA update to 4.0.3), as per the instructions on this thread:
http://forum.xda-developers.com/showthread.php?t=1546593
Everything seems to have worked well (I have root access, etc), but there is something quirky with Busybox. Every time I type a command in terminal (it doesn't matter which - I use both connectbot and terminal emulator), I get a "precmd: not found" message (even for simple things like directory changes). The odd thing is: the commands work, but I still get the message. For instance, if I ask for a directory listing, I'll get the listing, and at the end, it will say precmd: not found (usually with the name of the command it's referencing, e.g. bash: precmd: not found).
It seems to be looking for it in /system/xbin/bash, but bash is in /data/local; I tried creating a symlink but it didn't work ("link failed Cross-device link"). This is really a nuisance, and I'd like to try installing some linux user-land tools, but I fear the outcome might be disastrous if the busybox tools are misconfigured somehow.
I'd appreciate and help/suggestions. Many thanks.
mdhobbes said:
"precmd: not found" message
Click to expand...
Click to collapse
Connectbot seems to set shell variable 'PS1' to "$(precmd)[email protected]$HOSTNAME:${PWD:-?} $ ".
It means your shell (the busybox's ash applet) will try to use output from 'precmd' as a part of a command prompt.
So when 'precmd' was not provided, error messages will be generated wenever a prompt was to be shown.
Though the messages should be safe to ignore, you may get rid of them by setting something harmless to PS1 like:
PS1="> "​, or reset PS1 by:
unset PS1​from your (busybox) shell.
# The same method should work for terminal emulator.
precmd is a shell function.
To display it run this from the default shell:
Code:
typeset -f
You will see something like
Code:
function precmd {
typeset e=$?
let " e " && print -n "$e|"
}
If you add that to one of your shell's startup files (".profile", ".bashrc", etc.) you will have a working precmd.
It works (function runs), but shows nothing neither 0 or error code. What is it?
[edit]
Nvm, my fault, figured it out

Categories

Resources