Linux Archive

Updating US Cellular Galaxy S4 w/ Vanir ROM

Posted April 30, 2016 By Landis V

My wife’s phone was having some space issues that I finally got around to looking at today.  I recently upgraded my S5 to a 32GB SD card and it gave me plenty of space, so I was surprised when I checked hers and saw that it already had a 32GB card.  Had I looked a little closer, I probably would have realized that the card itself was not full, and in fact barely had anything on it.  I didn’t even have it set to store pictures on the external card :/

Having already bought a 128GB Class 10/U1 card, I decided to go ahead and install it.  I had run across an app a while back that actually allows the apps to be linked over to the SD card, so they don’t jump back to main memory every time they update, which is annoying as hell. I deleted the partition table on the SD card (referenced http://superuser.com/questions/373463/how-to-access-an-sd-card-from-a-virtual-machine, specifically answer 5 for a Windows machine… after updating VirtualBox and installing the current version of extensions, I was actually able to recognize and pass through my USB to SD adapter to my Linux guest) and recreated with a 96GB FAT32 partition and a 32GB ext4 partition (great thread on this setup here), formatted both appropriately, copied the data over from the old 32GB card to the FAT32 partition in the new card, installed, and booted.

I then configured the camera to save new pictures to the external SD card (FAT32 partition) and installed the Link2SD application from the Play store.  Had some difficulty figuring out why I couldn’t get root on the Vanir ROM, tried installing a couple of the SU apps with no luck.  Turned out I had not enabled it by 8x tapping the build number in about phone, and then apparently you have to select a different option in the “enable root” developer option… even though it shows apps + ADB, apparently it doesn’t set it.  Once I set it to apps only, I was prompted for root authorization as I had expected.

I then linked several apps over to the SD card, which seemed to be pretty straightforward and to work well.  Assuming this fix holds and continues to work as expected through updates, etc., I should have this phone pretty well fixed up for its usable lifetime.

Be the first to comment

Resizing a Raw VMDK For a VirtualBox Guest

Posted December 27, 2015 By Landis V

Had to resize a partition as I had run out of space on my VirtualBox Linux guests.  Pain in the butt.

Shut the guest down.  Ran a ‘lvextend -L+2GB /dev/amdfx/guestname‘ where “amdfx” is my physical volume and “guestname” is the logical volume name.

Had an extended partition with swap space, so used fdisk to delete the extended partition.  Also deleted and recreated the primary partition making sure to select the same starting sector and setting the end sector using the previous ending value plus 2*1024*1024 (should have been *2 again, but decided it was alright for now).

Recreated the raw disk image for the VM.  First detached and deleted it with ‘vboxmanage storageattach kmm –storagectl “SATA Controller” –port 0 –device 0 –medium none‘, ‘vboxmanage closemedium disk VirtualBox\ VMs/guestname/guestdiskname.vmdk‘, ‘vboxmanage closemedium disk VirtualBox\ VMs/guestname/guestdiskname.vmdk‘, and ‘rm VirtualBox\ VMs/guestname/guestdiskname.vmdk‘.  Then recreated and re-attached it with ‘vboxmanage internalcommands createrawvmdk -filename VirtualBox\ VMs/guestname/guestdiskname.vmdk -rawdisk /dev/mapper/amdfx-guestname‘, ‘vboxmanage storageattach guestname –storagectl “SATA Controller” –port 0 –device 0 –type hdd –medium /home/user/VirtualBox\ VMs/guestname/guestdiskname.vmdk‘.

Restarted the VM, it booted normally.  I was then able to run a ‘resize2fs /dev/sda1‘ from within the guest and realize a gig of extra space (would have been 2GB, except for my screw-up forgetting to multiply by two).

Resources

  • http://askubuntu.com/questions/115310/how-to-resize-enlarge-grow-a-non-lvm-ext4-partition
  • https://forums.virtualbox.org/viewtopic.php?f=7&t=50255
  • http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html
Be the first to comment

LaView CUBE camera system

Posted November 14, 2015 By Landis V

Bought one of these a while ago.  It’s alright.  Not particularly secure, software is annoying, and I think there’s a lot more that can be done with it.  Gradually working on improving it, this post will capture random notes on it.

Bought tinyCam Monitor Pro in the Play store when it was on sale a while back, fought with cameras for a bit before giving up.  Came back to it for a bit today and was able to make it work with the following settings:

  • Camera vendor:  (Generic)
  • Camera model:  Generic URL
  • JPEG/MPEG/RTSP request:  rtsp://ip.addr.or.hostname:554/H264?ch=(1-8)&subtype=1
    • Where ip.addr.or.hostname is the IP or hostname of the LaView device and (1-8) is the channel/camera number you wish to add.
  • Protocol: RTSP over UDP (MPEG/H264/H265)
  • Username: valid username on device (default “admin”)
  • Password: valid password for username provided above (default for admin “123456”)

ONVIF Device Manager on SourceForge, appears to provide an NVR for network video forwarding and storage on port 8000.  Not  a ton of info on the port/protocol, but did run across it in the setup.  http://sourceforge.net/projects/onvifdm/

Somewhat relevant manual:  http://www.laviewusa.com/media/attachment/file/u/s/user_manual_d1_dvr_d5100.pdf

2 Comments so far. Join the Conversation

VM System With VGA Pass-Through

Posted March 31, 2015 By Landis V

Hardware hangup note for Ctrl+C to get past.
http://www.reddit.com/r/debian/comments/25h49k/debain_wheezy_network_installation_freezes_after/

Configured LVM environment with /home, /usr/, and /var on spinning platter drive.

Configured an IP reservation on my DHCP server, though I may change this to a true static address at some point.

Instructions for linux-headers and virtualbox setup:  https://wiki.debian.org/VirtualBox

Downloaded the extension pack with wget http://download.virtualbox.org/virtualbox/4.1.36/Oracle_VM_VirtualBox_Extension_Pack-4.1.36-97684.vbox-extpack (NOTE:  you will need to download the appropriate version for your installed VirtualBox version.  Run vboxmanage -v and compare the output version to the versions available at https://www.virtualbox.org/wiki/Downloads; it apears you will need to match at least Major.Minor version numbers) and installed using instructions at https://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack.

Created a separate logical volume on my SSD drive.  Dedicated it to the Win10 guest (see https://wiki.archlinux.org/index.php/VirtualBox#Create_a_VM_configuration_to_boot_from_the_physical_drive).

Created a VM from the CLI.  Had to actually go into the BIOS and enable AMD-V on my Gigabyte 78LMT-USB3 as it was disabled.  Could not get the version of VirtualBox included with the Debian distribution to give anything except the “Your PC needs to restart” 0x0000005D error, even when trying to force the NX bit using info for setting CMPXCHG16B as found at http://www.makeuseof.com/tag/try-windows-10-youre-running-linux/.  Ultimately ended up loosely following instructions from http://www.admin-magazine.com/Articles/Server-Virtualization-with-VirtualBox but substituting “wheezy contrib” for “lucid contrib” early in the instructions, and substituting 4.3 for 4.1, then running a “modifyvm” and setting ostype to Windows81_64.  Once this was done, I was able to start the install process.  Yay.

Had to modify the e1000g0 adapter config from http://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html to instead be “eth0” since I’m on a linux box (also had to remove it before re-adding, got an error when even attempting to start the machine).

Mouse pointer was batty, like it was scaled.  Ended up downloading the appropriate VirtualBox guest additions to the host machine, mounting them in the DVD drive, selecting the AMD64 file, bringing up properties and setting to compatibility mode Windows 8 (can’t seem to locate where I found this), and was able to install.  Pointer synced, system is on the web.

Second Steps – Debian LXC Guest for KDE

Debian 7.8

#From https://wiki.debian.org/LXC - loosely

apt-get install lxc
apt-get install bridge-utils libvirt-bin debootstrap

# Failed with:
# Failed to fetch http://security.debian.org/pool/updates/main/libx/libxml2/libxml2-utils_2.8.0+dfsg1-7+wheezy3_amd64.deb 404 Not Found [IP: 128.31.0.63 80]
# E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

apt-get
apt-get install bridge-utils libvirt-bin debootstrap

# Successful this time

echo -e "cgroup\t/sys/fs/cgroup\tcgroup\tdefaults\t0\t0" >>/etc/fstab
mount /sys/fs/cgroup
mount

# Confirmed that cgroup is mounted

lxc-checkconfig

# All show enabled
# Check out http://www.turnkeylinux.org/blog/announcing-turnkey-lxc, maybe add
# Turnkey template for some other functionality on this box
# Switched tracks and decided to try out Docker
# From http://docs.docker.com/installation/debian/#debian-wheezystable-7x-64-bit

echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install -t wheezy-backports linux-image-amd64
reboot

# SSH'ed back into machine, verify new kernel

uname -a
wget https://get.docker.com/
chmod +x index.html
gpasswd -a my-account docker
service docker restart

# Service apparently did not restart, so had to start it again manually

service docker start

# Now as non-root
# Determined the following from http://www.syncano.com/getting-started-docker/

docker pull ubuntu:14.10
docker images

# Lists the newly pulled image; attempted to run it.
docker run -t ubuntu:14.10

# At this point, continuously encountered an error similar to the following:
# FATA[0034] Error response from daemon: Cannot start container (container UUID here): [8] System error: write /sys/fs/cgroup/docker/(container UUID here)/cgroup.procs: no space left on device
# There is definitely space left on the device, I do not appear to be lacking inodes as others seem to have encountered similarly, and permissions look OK.
# Started to install strace to troubleshoot further... but I need to get an accounting system back online.
# Switched to a VirtualBox KDE environment plan.  I guess I can always kill it later :)

lvm lvcreate -L 10g -n kmm
wget http://peppermintos.com/iso/Peppermint-5-20140623-amd64.iso
vboxmanage createvm --name kmm --register
vboxmanage modifyvm kmm --memory 1024 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0
VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox\ VMs/kmm/kmmSSD.vmdk -rawdisk /dev/amdfx/kmm
vboxmanage storagectl kmm --name "SATA Controller" --add sata
vboxmanage storageattach kmm --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium ~/VirtualBox\ VMs/kmm/kmmSSD.vmdk
vboxmanage storageattach kmm --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium ./Peppermint-5-20140623-amd64.iso
vboxmanage modifyvm kmm --ostype Ubuntu_64 --vrde on --vrdeport 22888
vboxmanage startvm kmm --type headless

# Able to RDP in and started Peppermint install process.
Be the first to comment

http://www.cyberciti.biz/cloud-computing/use-vagrant-to-create-small-virtual-lab-on-linux-osx/

Good step through on a Vagrant setup.

Be the first to comment

Interface Configuration | ifupdown2 | Webinar

Posted March 11, 2015 By Landis V

http://go.cumulusnetworks.com/ifupdown

Saw a tweet on this, looked intriguing.  Will have to check it out.

Be the first to comment

http://dl.packetstormsecurity.net/papers/wireless/wireless-ids.pdf

Be the first to comment