[General Topics] S0AndS0:
5. Debugging\Known issues with solutions

Contents

5. Debugging\Known issues with solutions​

5:1 debian install problems

So the first part of unpacking debian kit didn't work?

Answer(s):

Troubleshoot it;

check that you're connected to a stable source of internet

check that the file path is correct and that there's no typos

check that the file downloaded is the correct file, redownload after deleting if not

5:2 debian manual install issues

So the second part where I'm making the loop image failed somewhere and things don't work right or left, do I toss my phone in disgust?

Answer(s):

I've had this happen multiple times, kinda sucks when it's nearing the finish line, but to solve this

run the mk-debian -h command for manual install, edit the options until satisfied just like normal, except, you'll be presented with an option to format the existing, abort, and create new.

Choose your destiny like hitting e (format existing) and trying again with the install process.

Aside from that the other solution that I had to resort to was

reflashing my phones rom, kernel, gapps, and reinstalling only the apps required to perform the installation process.

This worked the best as it freed up most of the phones memory and kept the amount of background running tasks to a minimum. Fear not though as after installing linux and testing that it works I was then able to restore and redownload all the apps I had previously, it just meant that I had to re-unpack, re-install; so step one reset is what it turned out to become.

You may also try to create new with that command. I’ve yet to try this but I expect that running the mk-debian -h and changing the name of debian.img to a slightly different name than the one already on your storage device might allow you to test multiple distributions from the root of your sd card without having to uninstall the previously installed one. This is untested but may be useful for saving time and testing all of them by only sitting though the install process for each once instead of the uninstall, reinstall, and repeat fashion that I’ve had to use so far, think of it like installing multiple OS’s to different hard drives in your computer at home. The biggest issue that may be faced is mounting one specifically and keeping the others from mounting if one is already running and mounted, otherwise we’ll run into major slowdowns and errors I’m sure.

5:3 additional packages problems

So I tried to download and install a bunch of things with apt-get and things were going great until a (phone call, text message, random error, or disconnected prompt) shot everything I was plotting down, what do I do to complete the install or download?

Answer(s):

Fret not once linux is installed and behaving itself(mostly) you're atop the shoulders of giants and all that is usually required is

re-running the apt-get command.

There should be a difference in size of archives to be downloaded or installed from the first time that the command was commanded, there may also be errors stating that some of the items are already present in which case we can ignore them(mostly).

If that doesn't work try running the

shutdown example in connectbot after logging out of any other things accessing the linux system, rebooting the device and trying again.

5:4 reinstallation problems

Things worked once then I thought I'd be clever and run the mk-debian command to format and replace the old debian img file because I filled the original and wanted, but I must have told it to do a bad thing because now I get errors like this (dump below). Can I recover or am I screwed?

ln: /system/bin/deb: Cannot allocate memory

Cannot create symlink /system/bin/deb. You need to start with /data/local/deb/deb

Everything looks fine. Type "deb" to start the second installation stage. Refer to /data/local/deb/debian-kit-*.html for further hints.

# /data/local/deb/deb

e2fsck 1.41.11 (14-Mar-2010)

/dev/block/vold/179_2: clean, 7402/432640 files, 92578/1297408 blocks

Segmentation fault

chroot: can't execute '/usr/bin/apt-get': No such file or directory

chroot: can't execute '/usr/bin/apt-key': No such file or directory

cat: write error: Broken pipe

Answer(s):

Screwed. Going to have to try again, double check everything;

Devices kernel compatibility

Stable network connection

Distributions' compatibility

See section 8:2:4 and see if you can resolve it through brute force

maybe try a different distribution of linux. I'm still working on methods to recover without reinstallation, suggestions welcome.

5:5 How do I solve [My device/linux] issue(s)?

The google links provided can be used for quickly starting a search. Input the specifics of your search either by clicking the link and modifying the loaded pages' search bar or copy/paste them into your address bar and placing plus (+) signs between word instead of spaces.

XDA solved search link

http://www.google.com/search?q=xda+solved

XDA similar sites solved link (input modifications after solved)

http://www.google.com/search?q=solved+similar%3Axdaforums.com&gs_l=heirloom-serp.3...1200805.1281654.0.1282487.42.31.3.3.0.1.1328.6558.0j1j7j7j2j7-1.18.0...0.0...1ac.1.SIKFsmnC-bE&oq=solved+similar%3Axdaforums.com

Linux solved search link

http://www.google.com/search?q=solved+linux

5:6 How to do a dump like the author

You’ve put up a lot of text from the phone running linux, but whenever I try to select a bunch of connectbot it takes way too much time and never gets everything on the screen, especially the text that is off the screen, how do I make a dump like the author so I can get help with debugging?

Answer(s):

I don’t dump with Connectbot; it just doesn’t work for that one task, instead I use ROM toolbox pro because I already purchased it for other tasks (best money I ever spent on an app) if you too have ROM tool box then follow the following directions for making dumps like mine.

open ROM toolbox pro and make sure you're under the ‘tools tab’ (far left hand side)

scroll down to ‘Terminal Emulator’ and tap it

input your “deb” command not “deb s or deb x” just “deb”

This should log you right into root after a second

log in as a user with sudo or skip to next step in this sequence

input the command that you want to investigate and let it run or produce error messages however it’s been doing so far

once the command is finished with outputting results; press and hold on your devices: screen

tap copy all

open a document creator like google drive and paste it in.

Note: if you run lots of commands in sequence and try to copy/paste over 15000 characters into a google doc it might force close out on you as that will tax most devices’ abilities.

Go through your log of everything that you pasted. For personal debugging I use color formatting and font sizing to show things that I can ignore, delete from the dump, highlight errors, that sort of thing.

Note: Once you've begun the last step its a good idea to be looking up solutions at the same time as at some point you'll be interrupted and seeing where the formatting modifications suddenly stop is a good bookmark for where to pick up again.

Take notes for personal use and compile solutions or methods to not encounter the issues again, past it into an educational forum with a "solved" or "mini guide" apart of its title so it can be quickly found and deployed freely.

5:7 Can I use this to completely replace my Android OS

All that I've read about this would lead me to say "no" . However, the device that you are working on is yours and you can try. Some things to consider though:

Debian Kit is dependent on Android for hardware compatibility

If you mess with your devices' internal partition tables and fail somewhere, then likely the device will be bricked

If you do succeed, then the device that you now have would lose many of its capabilities

Worst case scenario is perma-bricked

Best worst case scenario is semi-bricked or boot-looped

Mainly if you're after a native linux experience without Android fluff you'll likely want to seek out projects similar such as "ubuntu touch" or making your own custom kernel and rom that has the bare necessities for compatibility for your devices' hardware. This last option is an extencive project to undertake, but, thankfully many other people have posted guides along those lines.

5:8 How do I add repositories to Debian?

So I want to add repositories to Debian but I get error messages or I don’t want to manually edit the sources file; how do I do that? Answer; this requires that we first install ‘mr’ because squeeze unlike Ubuntu doesn’t come stock with an easy way to mess with repositories.

First open a command terminal or ssh connection with connectbot under your normal username

enter the following command to install

# sudo apt-get install mr

input your sudo password and accept that it will take about 3404kB on your system

once the install has completed run the following command to pull up the help page. Press ‘q’ on your keyboard at any time to exit the help.

# mr help

Now we can add or edit repositories with the following command.

# mr config

5:9 I get java vertual machine errors when trying to open jar files after following 7:4-4.2 Installing Java for ARM from source.

So I followed the directions to the letter now when I run a 'java -jar [path to jar file] I get the following errors

Examples:

Links:

Answers:​

5:10 Sooooo what's the difference between the arm(hf) and arm(el) that's all over development sites and projects?

Examples:

Links:

Answers:​