[APP] LUKS Manager [v2.3] - Encrypted volumes via loopback for rooted phones - EVO Shift 4G Themes and Apps

Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the The Guardian Project.
A statically compiled and stripped version of mkdosfs from dosfstools package for the ARM7.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script, a basic file explorer and simple text editor.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
Or the Android Market:
market.android.com/details?id=com.nemesis2.luksmanager
Changelog
Version 2.3:
Major rewrite to the luks shell script and GUI app to support user defined volume locations.
Encryption cipher and keysize are now user definable. (kernel support required)
Moved storage of volume information from /mnt/sdcard/luks/.data to /data/data/com.nemesis2.luksmanager/.data
Prompts to upgrade if loop device files are found in SDCard .data directory.
Removed top level restriction on file explorer activity.
Default file system changed from EXT4 to EXT2.
FAT file system support now enabled by default.
Added volume mount and unmount desktop shortcuts.
Added notification when volumes are mounted. (Can be toggled off in preferences)
Added landscape support to the main and volume edit activities.
Added basic SDcard support to install binaries routine.
(Fixes java.lang.NullPointerException on binary install.)
Added toggle to disable binary hash checks on startup. This enables
customized luks scripts and/or binaries.
Small fix to application initialization. (hopefully fixes odd reboot
issue on some devices)
Attempts to unmount volumes on ACTION_SHUTDOWN and MEDIA_EJECT broadcasts.
Additional checks and error handling if no volumes exist.
Additional error handling in luks script during volume mounting and creation.
Added required BusyBox applet checks on startup.
About Dialog additions / changes.
Small text changes (formatting and typo fixes).
Version 2.2:
Recompiled lm.crypsetup binary under android-ndk-r6b.
Hopefully this will stop segfaults on various devices.
Version 2.1:
Added widget:
When volumes are mounted the widget will turn red and display the number of currently mounted volumes.
A single touch unmounts all volumes.
Rewrote luks script and internal routines to use busybox all the time to avoid toolbox/busybox symlink conflicts.
Added the ability to password protect the create/remove buttons, volume properties and preferences dialog.
Improved error handling in luks script on mount.
Added additional scripts: pre-mount and pre-unmount.
Added volume management Activity.
Volume mount points are now user defineable.
The volumes loopback device is now user definable.
Added an internal file editor (to edit bash scripts).
(Editor can be used outside of LUKS Manager to edit files).
Fixed Force Close when mounting with a blank password.
Version 2.0: Added Preferences Activity.
Now allows FAT formatted volumes.
(works w/FreeOTFE on windows)
Improved error handling/cleanup on failed volume creation.
Added lm.mkdosfs binary to assets.
The lm.mkdosfs binary is sha1 hashed and replaced if out-dated or changed.
Remove Binaries nows includes the lm.mkdosfs binary.
Added additional menu options to Activities.
Increased debug logging and added system probe.
(Don't enable for normal usage!)
Added option to launch Explorer on volume mount.
Redirected stderr to stdout using redirectErrorStream.
Added validation checks to volume creation. (non-blank, sanitize filename).
Moved to dp units instead of pixels for display scaling.
Fixed a few items that needed to be .destroyed (oops).
SD Card path fix (typo fix).
File Explorer now saves/recalls list view position on directory changes and when opening files.
About Dialog updates.
Added run script on mount/unmount: <volume>.mount.sh and <volume>.unmount.sh
Added su/root check on startup.
Version 1.9:Renamed cryptsetup to lm.cryptsetup to avoid overwriting pre-existing copies.
LUKS script will use cryptsetup if it exists, solves Samsung Galaxy S2 issues.
(Users will need to manually restore the cryptsetup binary if it was overwritten!)
Added sanity checks to File Explorer. (path /mnt/sdcard must exist)
File Explorer now saves and restores path on rotation change.
Moved about html to assets file instead of an inline string.
Version 1.8: Removed Internet Access Permission (decided not to include ads).
The cryptsetup binary is no longer UPX compressed in an attempt to improve compatibility.
The cryptsetup and luks binaries are now sha1 hashed and replaced if outdated or changed.
Since "Unmount All" can take a while to complete it has been changed to an AsyncTask.
When mounted all volumes will get chmod 777 applied recursively to avoid file permission issues.
Numerous improvements and changes to the internal file explorer.
Slight wording changes to activity titles and About Dialog.
Added change log to About Dialog.
Version 1.7: Added file explorer (no longer requires ASTRO File Manager)
Updated the About Dialog
First Market Release
Version 1.6: updated and optimized the icon and background images
Updated the About Dialog
Updated failure logging to syslog
Version 1.5: now quotes passwords (oops)
Spaces in volume names are converted to underscores: _
About dialog updated
Version 1.4: code refactoring
Added about/homepage menu items
Added "Remove Binaries" to remove /system/bin files: luks and cryptsetup
Added explore menu option to explore to volume location (requires Astro Filemanager)
Added background
Version 1.3: moved binaries into apk and added extractor/binary installer
Version 1.2: first public release
Screen Shots

Any Kernals for the OTA Sense
Nemesis][ said:
Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the Guardianproject.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
(I've been a long time lurker but since I'm a first time poster I'm not allowed to post this is the main Android App Dev section nor am I allowed to post external links. )
Screen Shots
Click to expand...
Click to collapse
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply

h4ck0rk1d said:
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
Click to expand...
Click to collapse
This has been mentioned again and again, there will bo NO custom kernels for the 2.3 update until the source is released. Be patient.
Sent from my MiuiSpeedy

Won't download the full file on my phone using the stock browser and dolphin HD. 1 star because I can't install it. Just joking, but can you put up a mirror please? The download link seems to work fine in Chrome, but mobile browsers it seems to crap out on.
Sent from my PG06100 using XDA App

Download Fixed (I believe)
OK. I believe I've fixed mobile downloads on the server so please try again.
And I've also updated LUKS Manager to v1.4. (lots of little fixes, tweaks)
-N2

Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.

Ron Overdrive said:
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
Click to expand...
Click to collapse
Thanks for catching that. Version 1.5 should now quote passwords properly.
Any other issues? (I know I should validate user input more on volume creation; but the luks script should handle failures gracefully.)
-N2

Released v1.6
Version 1.6 notes:
Images updated and optimized using optipng.
Updated the about box text.
Added additional failure logging to syslog.
And did a small bit of code cleanup.

just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.

clarkk said:
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
Click to expand...
Click to collapse
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.

Nemesis][ said:
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
Click to expand...
Click to collapse
Thanks looks great now on the screen, still have a problem mounting though, could it auto-detect the location of busybox or have a changeable option?

Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Sent from my PG06100 using XDA App

Doesn't work on HTC DesireHD/Android 2.3.3 and Tattoo/Cyanogenmod 7.0.3
Code:
# dd if=/dev/zero of=1.vol bs=1024k count=1024
# lm.cryptsetup luksFormat 1.vol
lm.cryptsetup luksFormat 1.vol
...
Verify passphrase: 1
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/loop0.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
#
Relevant syslog lines
Code:
<3>[ 3257.202941] device-mapper: table: 254:0: crypt: Error initializing ESSIV hash
<4>[ 3257.203338] device-mapper: ioctl: error adding target to table
Looks like kernel problem... Any way to fix? YES.
Compile sha256_generic.ko as module, insmod it and all works normally.
Important note - kernel compilations with default NDK toolchain creates
broken module - kexec error - bad relocations: 27 - R_ARM_PLT32.
To compile correct module for your kernel use code sorcery arm compiler.
Details -on cyanogenmod's "compile kernel" page.

on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?

xtam said:
on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?
Click to expand...
Click to collapse
I think it'll work on any rom that has root, but I could be wrong. I use the latest CyanogenMod Nightlies.

Xtam, 2.0 GUI starts working for me with cyanogen 7.x ROM. It requires sha256_generic.ko module for aes-cbc-essiv cipher (FreeOTFE volume), but aes-cbc-plain volume works without additional modules.

Ron Overdrive said:
Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Click to expand...
Click to collapse
Ron,
I'll look into/consider adding some of those. I've add some code to unmount the volumes on shutdown but I'm not 100% sure it's working properly.
I like the idea of unmounting them all on after X number of failed lock screen attempts. Not quite sure how I can hook into that however.
In version 2.1 you can set the mount point; not sure if I'll write a GUI interface for symlinking however.
-N2

I'm having problems unmounting volumes in 2.1. Whenever I attempt to unmount a volume it tells me without any errors its unmounted, but when you try to remount the volume or check the status its still mounted.

I have a Samsung Infuse which is basically an i9000 galaxy S with a bigger screen and like most galaxy S devices I know of, it has internal storage which is mounted to /mnt/sdcard and an external sd card which is mounted to /mnt/sdcard/exteral_sd. I really like the app and it works perfectly, however I have a problem. It wants to create the volume on the internal sdcard instead of the external one. I edited the lukspath in the luks script but it keeps overwriting it when I start up the gui and go to create a volume. Is there a way to make this setting stick in the luks script without recompiling? Or could you update the app to allow people to change where it creates the volume? I just need to be able to create a volume in /mnt/sdcard/external_sd/. Thanks!

Nice app, thank you Nemesis.
Another suggestion for improvement: it would be nice to be able to change a volume password.

Related

UrukDroid 1.6 (Android) on ext4, full r/w access, su (root), SDE

{
"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"
}
This is new Android distribution based on Linux, Android and Archos stock os, using SDE from Archos.
Features:
Easy install method for external (SDcard) and Internal storage
EXT4 (much faster than ext3, can store files >4GB comparing to FAT32)
Full read/write access to every part of system
root (su + superuser.apk) out of the box
new services like: samba, sshd, vpnc, openvpn, dvbt, nfs4
3G/usb tether support
Possibility to remove some google/Archos apps
Swap memory in RAM (CompCache) or on disk by default or when you need it
No 300MB limit for apps (and no faulty app2sd required)
You can have SD card Class 8/10 - that can be much faster than internal flash (check this thread)
Many new new kernel modules (usbserial, ntfs, 3G modems, nfs4, cifs, hfs, iptables etc.)
DVB-T support for selected tuners
updated modules, firmware (like WiFi)
User friendly UrukConfig application
... and much, much more - to much to mention all here - please read changelog
Since 1.0 release main documentation source for UrukDroid is on it's WiKi. Please use it as a first and primary information source for UD.
Link to project (googlecode) page is: http://code.google.com/p/urukdroid
Update (10.09.2015)
Since code.google.com is no longer working (read only for limited time) - here are working links to latest (and final) release of UrukDroid: Dropbox,
I hope that new, much more detailed and complete documentation will help you use UrukDroid at it's full potential.
Changelog, proposed futures
Changelog:
UrukDroid 1.6 (02.01.2012) "DOV FUS LOS Wahl ko Daar Sivaas!"
[CHANGE] Incorporated changes from Archos firmware 2.4.19, 2.4.65, 2.4.80 and 2.4.81
[CHANGE] Updated superuser apk and binaries
[FIX] Fixed some library linking
[NEW] Changed top bar button size to 32px permanently
[NEW] New overclock module from milestone-overclock to change CPU voltage and max frequencies on the fly
[CHANGE] Added overclock support to CPUGovernor service
[FIX] Restored proper busybox binary
[NEW] New patches on kernel from December update from Archos git
[NEW] Full iptables support (with NAT, conntrack etc) - so everything is now possible (redirect, proxies etc)
[NEW] Full kernel timing for power consumption monitoring
[NEW] Recompiled WiFi? and HDMI drivers
[NEW] Added python 2.7, iotop (for watching i/o operations), PowerTOP (for power consumption monitoring - but it's not as useful as on x86)
[NEW] Added ntfs-3g support - full read/write support for NTFS file systems (need to be used manually, vold does not use it)
[CHANGE] Added UrukDroid? Rescue Menu - Repair submenu with disabling overclocking (for those who made their device unbootable with overclocking) and Dalvik cache cleaner
[NEW] New feature in cpugovernor script (genconf, current)
[CHANGE] New features in update subsystem
scripts now tries to keep /data/.tmp directory cleaner,
for those with disk shortage /data/.tmp can be now symlink to directory on sdcard
updater now checks if you have enough free space in /data/.tmp before it begin installation
update process now can be during bootup (better one) if you have enough free space on rootfs, or on running system (not so nice - this is default behavior until UD 1.6 release)
[CHANGE] restoring backup in Rescue Menu now erases partition before restore (until now it was just overwriting)
[FIX] added (again ) xbox pad kernel support (was missed out in new kernel compilation)
[FIX] fixes scp/sftp-server (on some configuration refused to start child processes)
UrukDroid 1.5 (16.0.2011) Manamana!
[CHANGE] Since UrukDroid? 1.1 (both beta1/2/3 and release candidate 1/2/3) had stability and compatibility issues - that I was unable to trace down (too many changes on changes etc.) - I've decided to implement all stuff from beginning on fresh OS. Since all "reverse engineering" stuff was already made and I already have required knowledge - It should be the fastest method. So entire system is cleaned up, updated to latest binaries - and so far looks good . That's why I've bumped version to 1.5 - just to make it a bit more visible it's not a straight continuation of 1.0/1.1.
[FIX] No more "soft reboots" (system reloaded it's graphics UI part)
[FIX] No more turning off WiFi issue (but it happens that WiFi can't pop in after full reboot - another reboot is required)
[FIX] CIFS startup on boot (Issue 57)
[CHANGE] Update process should be now more chatty and report more errors
[CHANGE] Reverted back WPA service (which enable UrukDroid? WPA supplicant with AdHoc? support) - since some people reported problems with adding new networks with Uruk version of WPA supplicant.
[CHANGE] Merged changes from Archos 2.3.28 OS
[NEW] New wpa_supplicant - hopefully with all features and without most of known problems (sometimes it still refuses to start)
[CHANGE] Updated modules and kernel
[FIX] Fix camera support for A43
[CHANGE] Merged changes from Archos 2.3.26 OS
[CHANGE] Redesigned services to output more reliable status
[FIX] Mediascanner fixes (did not rescan data sometimes)
[NEW] Introduced in 1.0 "Rescue Menu" now fully functional (RM)
[NEW] RescueMenu now have Alternative OS? boot feature
[NEW] RescueMenu now have "bare metal" backup/restore functionality
[NEW] Update process will now communicate with user with help of UrukConfig
[NEW] Enabled cgroups
[FIX] "Moved" boot image on A101
[FIX] 3Gmodem_init.sh fixes
[NEW] You can dissable boot from SDCard by naming any of it's partition "noboot" ('[email protected]:/root# e2label /dev/block/mmcblk2p1 noboot')
[NEW] patch (by Sibere) increasing USB current in Host mode
[NEW] New default apps in UrukDroid 1.5: WiFi Manager, FileExpert, QuickPic, Opera browser
UrukDroid 1.0 (30.04.2011)
[FIX] sshfs missing files fix
[FIX] EasyInstall: changed datafs max size from 2GB to 1.95GB (for market to work), fixed partition sizes for A101 16GB when doing internal install with resize, fixed installation for A70H devices
[NEW] small script to copy UrukDroid files from SDCard (external) to Internall (copy_from_sd_to_internal.sh)
[CHANGE] Changed behaviour of dvb service (device configuration)
[FIX] Added some missing modules for DVB support
[CHANGE] New kernel modules for more dvb devices (but it requires manual loading and testing)
[NEW] rsync tool
[CHANGE] swap service now can work on swap partition (or like before on swap file), also after mounting sdcard ext4 partition
[NEW] Ad-Hoc WiFi connection support by default (networks are visible with "*" on beginning of it's SSID)
[CHANGE] Some new progress indicators during install/upgrade
[NEW] Simple Animation during late phase of bootup
[NEW] New service: cifs (to load cifs modules)
[NEW] Added cgroups kernel setting
[NEW] Moved some modules dependencies (cifs,ntfs,dvb) to /etc/modprobe.d
UrukDroid 0.7 (28.02.2011) you're damn right it's a gift!!
[NEW] NFSv4 client support
[NEW] FS-Cache (cachefilesd) support for NFS (local disk cache for NFS files)
[NEW] sshfs support
[FIX] OpenVPN fix - thanks to nenadr
[FIX] PPtP fix - thanks to nenadr
[NEW] vpnc tool for using Cisco VPN connections
[NEW] vpnc UrukDroid service
[CHANGE] Updated to libc6 2.11 (and all binaries recompiled/changed because of it - big change)
[NEW] new gnu tools: nmap
[NEW] EasyInstall now allows installing UrukDroid on internal (mmcblk1) storage in A70 and A101
[NEW] Integrated 3G USB modem and RNDIS USB tethering service by nenadr
[CHANGE] New iobench.sh (with new bonnie++ test)
[CHANGE] Changed device fingerprint to work better with google market (enable download some missing apps)
[CHANGE] Merged Archos 2.1.8 firmware changes
[CHANGE] Changed DVB subsystem support and kernel/modules dependencies to work with new v4l2 modules (it will brake compatibility with most other kernels probably)
[FIX] Changes it UrukUpdate mechanism to work every time when file is moved to "/data/UrukUpdate"
[NEW] Added required modules and iptables service configuration for DroidWall (firewall) application
[NEW] sudo subsystem for launching properly some root tasks
UrukDroid 0.6 (11.02.2011) Eye of the Uruk... in new logo
[CHANGE] Merged changes from Archos firmware 2.1.2/2.1.3/2.1.4
[CHANGE] DVB support with LiveTV.apk from chulri (for selected cards, there are more modules then listed in /etc/uruk.conf/dvb - but it requires to do some experiment and report it back)
[CHANGE] Changed Uruk service to work better with new UrukConfig
[NEW] New services: openvpn, mediascanner
[NEW] IO Benchmark tool: iobench.sh
[NEW] Possibility to turn off mediascanner and use it on demand only
[FIX] Fixed mount_sdcard.sh script to work with 2.1.2 ext3 partitions
[NEW] Updated boot sequence with progress during upgrade/install
[NEW] You can hide soft buttons (Archos buttons) with UrukConfig
[NEW] Easy Install method - no need to know anything about Linux - just plug and wait...
[NEW] Kernel modules for 3g dongle
UrukDroid 0.5 (27.01.2011) Tom Bombadil... in red
[NEW] CompCache (aka ramzswap) support
[NEW] New CPU governor - interactive. Ported from XDA CyanogenMOD
[NEW] DVB: applied patches by chulri, Siano SMS1XXX USB support
[NEW] DVB: modules from outside kernel tree
[NEW] Some more GNU tools: gzip utils, zip utils, unzip utils, nc (NetCut for DVB streaming)
[CHANGE] New services model - so they can be easily run/configured with help of UI
[NEW] New kernel modules: usbnet, lzo
[NEW] Mediascanner modification - it should has much, much smaller impact on system performance
[NEW] sqlite3 (3.5.9) installed, for easy database file manipulation
[NEW] after restart of UrukDroid it will boot once again to Uruk without need of pressing any buttons, to boot on stock OS please use boot menu
[FIX] mount_sdcard.sh fixed so it will mount first ext4 partition on sdcard if exist, and will not interfere with Vold if its vfat
[CHANGE] New update/upgrade/flash model - everything done on UrukDroid - no boot menu required
[NEW] New application to configure UrukDroid - UrukConfig.apk. Installed with this release. Can be uninstalled in default way.
[FIX] Fixed corrupted logo in A101
[NEW] Unified kernel for UrukDroid on SDCard and internal storage (A70S/A101)
[CHANGE] Services ENABLED with this release: CpuGovernor, CompCache
UrukDroid 0.4.2 (21.01.2011)
Just extracted as a separate update file GoogleMarket
UrukDroid 0.4.1 (15.01.2011) Myyy preciousssss...
Some more tools like: bc, proc utils, vim, tcpdump, bzip2, tar etc.
Android apps (Market, Maps, Talk, Calendar, Contact, Feedback, Locator, Updater) by default
Samba (3.2.5) support for sharing /mnt/storage (internal and sdcard storage) from Archos
Dropbear SSH server
Backported modprobe, depmod etc. tools for modules management
WiFI driver recompiled, WiFi HW firmware update (from 6.1.0.0.335 to 6.1.5.44.7)
Initial DVB-T support (Afatech AF9005, Afatech AF9015, DiBcom DiB0700, Terratec CinergyT2/qanu)
Bootlogo with progress steps
Cleanups of initramfs and rootfs
EXT4 drivers backported from 2.6.30 - some mount changes (to prevent config files corruption)
Initial A70H support
SDCard/HD layout changed
Autoupgrade service and installation helper
ADB fixes
Removed two apps. TelephonyProvider.apk, Phone.apk
Since 0.4 all services are DISABLED by default, to enable it edit proper config file in /etc/uruk.conf/
UrukDroid 0.3 (9.01.2011) Rise my Uruk... not yet Hai
iptables, ntfs support
some more USB modules: usbserial, pl2303
fixed bluetooth problem (not working in Uruk 0.2)
automounting improvements (much more bulletproof)
new configuration files (/etc/uruk.conf/) to enable/disable features
new Uruk services (/etc/uruk.d/)
some more GNU utils openssh-client, coreutils
USB charging enabled (NOT tested!!!) - It would required much more power then standard USB in PC can give, use USB wall/car charges or double/triple USB cables
UrukDroid 0.2 (5.01.2011) Go GNU release
"smart" automounting script (that will mount ext4/vfat third partition from sdcard in RIGHT place, AFTER internal storage is mount)
plenty of useful GNU tools: whole e2fstools (mkfs, fsck for ext2/ext3/ext4), parted (for partition resize, format etc.), vfat tools, new toolbox, mtr, top, strace, bash - and much more (look in /usr/local/bin and /usr/local/sbin)
swap memory ON by default (50MIB file /swap01.file)
required compiled libraries libparted, libncurses, libe2fs... etc. (look in /usr/local/lib)
new text editor in text mode: nano (my favourite)
some init.rc cleanups
kernel changes (mostly toward console output)
fixed small (but problematic) misconfiguration in Archos (yep original one) Android in linking /etc/mtab
UrukDroid 0.1 (30.12.2010) Initial "release"
recompiled kernel with ext4, nfs4, fb console
added su and superuser.apk
bootup changes (to make it work)
Features planed in next releases:
backup scripts
proxy settings
CynanogenMOD parts backported
OC/UC kernel be default
FAQ or Tips & Tricks
More information you can find in seperate thread on this forum - FAQ + Question/Awnsers
How to upgrade from previous releases
To upgrade from 0.5 you should download special upgrade file (UrukDroid-0.6-upgrade.tbz2) from first post. You need to place this file in directory "/data/UrukUpdate".
First method:
Put it on your internal storage by any means - this is /mnt/storage (also visible as /sdcard/). Then use file manager (like Astro or RooteExplorer - not build in one) or do as follow in terminal (or over ssh)
Code:
su
cd /sdcard/
mv UrukDroid-0.6-upgrade.tbz2 /data/UrukUpdate/
Second method:
Use UrukConfig to enable SSHD (if you don't have it started already), and use any SCP/SSH client (like WinSCP, or plain scp on Linux) to copy file (default username is "root", password is "UrukDroid") to "/data/UrukUpdate".
In both cases upgrade will start automatically; alter kernel, initramfs and when finished, device will reboot itself.
How to enable/disable and configure UrukDroid services?
UrukDroid services are configured by text files, that can be found in /etc/uruk.conf/ directory. You can use file manager like RootExplorer or Terminal to edit them, but most convinient way is to use SSHD service and some ssh client (for example putty).
You can also use UrukConfig application - build in since 0.5 release. After you do some changes, restart service (/etc/uruk.d/service_name stop/start) or simply reboot Archos. Since 0.5, by default only CompCache and CPUGovernor are enabled.
Currently available services
samba - it's SMBD server allowing mounting your Archos storage directory on your PC. Default user is "storage" and password "UrukDroid"
sshd - SSH server allows you to connect to your Archos with any ssh client, work on terminal. It also allows to copy files with scp/sft. Default user is "root", password "UrukDroid"
swap - this service enable swap memory. It can make Archos a bit less responsive but memory manager won't kill application so quickly (co you can use WWW browser, email an communicator simultaneously - for example of course)
iptables - this pseudo service will load necessary modules to use iptables (firewall) features
ntfs - if you plan to connect NTFS formatted devices to your Archos - enable this service
dvb - this service load necessary modules to watch TV on your Archos. This service requires configuration from your side - it won't work "as is". Please read and edit config file (/etc/uruk.conf/dvb)
compcache - Start/stop CompCache swap memory service. Compcache is a compressed part of memory, where less used object reside. Usual compression ratio is 70%
cpugovernor - Changes default CPU governor and it's parameters. Governor decides how to scale CPU frequency. Since 0.5 there is new "interactive" governor.
openvpn - It's an implementation of popular free VPN service for Uruk. It will act like the one used in Archos stock config with difference it will work all the time - whenever you go, and you have full flexibility of configuration. Config file resides in /etc/openvpn/archos.conf.
VPNC - It's open implementation of Cisco VPN service. You should edit /etc/vpnc/archos.conf file.
NFS4 - NFS v4 client service allows you to mount remote file storage with use of NFS (much faster then SMB for example). You can also enable use of cachefilesd sub-service - that will cache locally, files transferred with NFS (for smooth playback of movies for example)
How to remove some default apps?
App started at the boot time are stored in /system/app, I've already removed some of them by moving it to /system/app.old/ - but you can do it by your own - but remember - some of them are actually required to run system
Some filesystems benchmarks (that's the reason why I wanted ext4 so badly)
Write tests (I've testes different filesystem and partition sizes)...
Tests on Archos:
internal 8GB
0,71Mb/s ext3,ordered,noatime
5,45Mb/s fat32
Lexar 16GB
2,63MB/s ext3,ordered
6,25MB/s ext4,ordered
Test on computer (the same lexar card)
2.93Mb/s 1GB,ext3,noatime
2.78Mb/s 1GB,ext3
3.04Mb/s 1GB,ext2
8.62Mb/s 1GB,vfat
7.61Mb/s 1GB,btrfs
7.87Mb/s 1GB,ext4
7.87Mb/s 16GB,ext4
Card is 16GB SDHC Lexar class 6 only - so this toshiba nand inside is not state of the art either :/
How to roughly check your filesystem write speed
Go to directory where you can write and were is more then 100MiB of free space and do the line. It will sync devices (flush all write caches), write 100MiB file filled with zeros, and fush caches once again to measure real write speed without buffers. Then easy math... and my laptop disk has write speed 16,66MiB/s
Code:
[email protected]:/tmp$ sync; date; dd if=/dev/zero of=test.file bs=1M count=100 2>/dev/null; sync; date
Wed Jan 5 19:02:28 CET 2011
Wed Jan 5 19:02:34 CET 2011
[email protected]:/tmp$ bc -q
scale=4
100/(34-28)
16.6666
quit
UrukDroid configuration system
I've created (or recreated, since Google threw away existing Sytem V and other solutions) something that works like rc/init.d system. It's old fashion, but for only few services will do it's job.
There are few location to remember:
/system/etc/uruk.d/ - directory with services
/system/etc/uruk.conf/ - directory with configuration files
/system/etc/init.d/ - symlinks Sxxserice/Kxxservice (like S01swap) to be run during startup process
Proper path is /system/etc/ but it's symlinked on every Archos to /etc - so you can also work on /etc/uruk.d, /etc/uruk.conf etc.
To enable iptables support (load proper module) it's enought to edit /system/etc/uruk.conf/iptables
To change swap memory settings edit /system/etc/uruk.conf/swap
How to mount ext4 under Windows?
There is project called "ext2read" that claims to work with ext4 also (I've only tested it with ext2 long time ago - it worked) http://sourceforge.net/projects/ext2read/ - please write some commends if you use it.
What is current directory/disk layout?
/ -> SDCard first partition (512M) - for root filesystem
/data -> SDCard second partition (1GB) - for installed apps
/mnt/storage -> internal 6GB partition - for data used by installed apps
/mnt/storage/sdcard -> SDCard third partition - anything you want, nothing by default
/mnt/sdcard2 - proposed mount point for other volumes, not used by default
And there is something called symbolic links (symlinks) - witch is kind of Win shortcut used on UN*X extensively.
/sdcard -> /mnt/storage
/storage -> /mnt/storage
/mnt/sdcard -> /mnt/storage
So you can enter /sdcard - and you are be using files from /mnt/storage. You can also create symblinks by yourself
Code:
ln -s /source destinations
How to gather data report from UrukDroid
Best way is to use SSH. For this, please start "sshd" service on UrukDroid by using UrukConfig application or by editing /etc/uruk.conf/sshd file.
First start will take one minute or so - since sshd has to generate unique encryption keys.
If you use Windows download putty.exe (ssh client) and run it. Write your Archos IP (it has to be visible in network) and connect.
Use
Login: root
Password: UrukDroid
Click to expand...
Click to collapse
Now you can write Linux commands and cut/paste results for help/debug purpose.
Thanks!
I think you talked me into it! I'll play with it tomorrow.
I've found this on Nook Color thread http://forum.xda-developers.com/showthread.php?t=888216
Can someone test is it worth to do on Archos? I think we don't need phone service running in background. Ill try this tomorrow when i get back to home but maybe someone can test earlier?
sorry for asking,but what is the point in doing step 3,i mean what does it actually do?
This is backup of install instruction, leaving more space for custom approach. Instruction in first post is now much simpler with less 'if/or'.
Material for this thread came from discussion here. So please be kind read also this thread before getting to work
This is mini how-to boot modified Archos Android from SD card, using SDE. It's base on 2.0.71.
Since this Android mod/distribution required some name - let it be Uruk-Droid
Why bother:
ext4 (much faster than ext3, can store files >4GB comparing to FAT32)
full r/w access to every part of system
root (su + superuser.apk) out of the box
possibility to remove some google/Archos apps (already done partly)
swap memory when you need it
no 300MB limit for apps (and no faulty app2sd required)
you can have SD card Class 8/10 - and that's much faster storage than internal flash (inside is something equal class 6 or 4)
Warning
Be aware that this modification requires SDE and probably some Linux knowledge.
By doing described below steps you probably can't brick your Archos - but do it on your own risk.
Root access on your devices makes it less secure form malicious software (user more head - less fingers )
Known problems:
Android automounter (vold) does not recognize EXT4 in stock firmware - so it will claim SD card is damaged (it's just a message) (FIXED)
Before you start:
Read about SDE on forum
Install some terminal emulator from Market (eg. "Android Terminal Emulator")
You should have 2.0.71 already installed (I'm not sure if it's required but only with that configuration tested)
All operations described here, done on Linux or Android should be done from root user (you can switch to that user in terminal by typing "su" or "sudo su" command)
If you don't have Linux - find any recent Rescue CD, Live CD or Virtual disk (VirtualBox or VMware) - distributions does not matter
SD card partition design
First of all, preferably buy card class 6+. So it won't be slower than internal storage
I'm currently using 3 partitions
0,5GB / (rootfs)
1GB /data
rest /mnt/storage/sdcard/
but You can create one big partition instead - I've made my configuration because of easiness to backup and upgrade (rootfs is easy to upgrade later on, /data has only runtime data and application, rest is for movies etc.) Size of /data partition determines how many apps you can install on your device.
Here it's how it looks on fdisk
Code:
linux-machine:~# fdisk -l /dev/sdb
Disk /dev/sdb: 16.0 GB, 16012804096 bytes
199 heads, 44 sectors/track, 3571 cylinders
Units = cylinders of 8756 * 512 = 4483072 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 121 529716 83 Linux
/dev/sdb2 122 362 1055098 83 Linux
/dev/sdb3 363 3571 14049002 83 Linux
Step one
Create at least one primary partition on SD card with fdisk, gparted, parted or any other partitioning tool. Assuming your SDCARD is visible as /dev/sdb (on Linux box - check "dmesg").
Code:
su (go root)
fdisk /dev/sdb
fdisk options (it's interactive):
p (print existing partitions)
d n (delete partition by it's number 1,2,3 etc)
n (create partition, you will be asked about type (primary, secondary - go primary), number (give first available), start sector (just enter will set first possible), size (you can give it as +1M, +2G etc)
w (write all changes, until you give this command no changes are made on disk physically)
Format partitions as EXT4 - but without huge_file option (it won't work with this feature since it requires special kernel option that brakes compatibility with existing modules).
Code:
su (go root)
mkfs.ext4 -O ^huge_file /dev/sdb1
If you created more partitions - do those steps for everyone.
Code:
mkfs.ext4 -O ^huge_file /dev/sdb2
mkfs.ext4 -O ^huge_file /dev/sdb3
Kind of "session log" for this steps you can find in this post.
Step two
Extract content of rootfs.tar.gz onto first partition on SD card (it HAS to be first one). Do it from root account on Linux/UNI*X box - or you won't transfer all permissions properly (mainly +s on su/superuser.apk).
assuming your SD Card is visible under Linux as /dev/sdb (you can check it by typing "dmesg" after you connect it)
open terminal/shell - go root: su, or sudo su
create mount point: mkdir /tmp/sdcard
mount it (if it's not mounted already) for example: mount /dev/sdb1 /tmp/sdcard
go to /tmp/sdcard directory: cd /tmp/sdcard
extract rootfs: tar -zxf /path_to_file/rootfs.tar.gz
exit directory: cd
umount your card: umount /tmp/sdcard
Flash initramfs.gz and zImage from SDE boot menu:
reboot Archos70, hold up or down volume key until you see Recovery menu,
choose "Recovery System"->"Developer Edition Menu"->"Flash Kernel and Initramfs",
connect Archos to PC and copy initramfs.gz and zImage to device
Reboot and hold up or down volume, choose "Developer Edition".
You should see all yours apps etc. - it should look like your Archos , but with su/superuser.apk etc. (check it on terminal emulator by typing "su" and enter).
Before go to next step make sure you have booted to SDE system AND it has root access! (check "su" in terminal, run root explorer or titanium backup)
Step three
It's kind of optional - since you have already working system - but it's not fun yet
Now you should copy /data files onto SD card. Use terminal emulator (from market can be "Android Terminal Emulator") or sshd (QuickSSHd and log into your tablet) and do:
If you have ONE partition
Code:
su
cp -rp /data/* /data.new/
If two or more
Code:
su
mount -t ext4 /dev/block/mmcblk2p2 /data.new
cp -rp /data/* /data.new/
umount /data.new/
Poweroff device.
Step four
Put card into computer and:
one partion
remove /data
rename /data.new to /data
On Linux it may look like this:
Code:
su (or sometimes "sudo su")
mkdir /tmp/sdcard
mount /dev/sdb1 /tmp/sdcard
cd /tmp/sdcard
rm -rf data
mv data.new data
edit /init.rc (it's /init.rc on Android - on Linux box it's going to be something like /tmp/sdcard/init.rc) - use any editor to modify file - do it as a root!
Code:
su
vi /tmp/sdcard/init.rc (edit the file)
umount /tmp/sdcard/
What to edit:
Code:
# Comment this
# mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid
# Uncomment this
# mount ext4 /dev/block/mmcblk2p2 /data noatime
mount ext3 /dev/block/mmcblk0p4 /data.old noatime nosuid
two or more partitions
edit /init.rc (it's /init.rc on Android - on Linux box it's going to be something like /tmp/sdcard/init.rc) - use any editor to modify file - do it as a root!
Code:
su (or sometimes "sudo su")
mkdir /tmp/sdcard
mount /dev/sdb1 /tmp/sdcard
cd /tmp/sdcard
vi init.rc (edit file)
umount /tmp/sdcard
What to edit:
Code:
# Comment this
# mount ext3 /dev/block/mmcblk0p4 /data noatime nosuid
# Uncomment this
mount ext4 /dev/block/mmcblk2p2 /data noatime
mount ext3 /dev/block/mmcblk0p4 /data.old noatime nosuid
If you have third partition on SDCARD, whether it's EXT4 (recommended) or FAT32 it should by automounted since 0.2 version.
Reboot - it should work
End
Stuff you can do later:
Vold - automount daemon on android is quit.... crappy - to let go message about "sd card damaged" edit /etc/vold.fstab and hash the line "dev_mount_lun volume_sdcard /mnt/storage/sdcard...."
Other partitions - if, by any reason, you have more partition on SD card (more then 3) you can also mount it putting in init.rc (there are some potential issues with vold to be solved)
for ext4
Code:
mount ext4 /dev/block/mmcblk2p5 /mnt/sdcard2 noatime nosuid
For fat32 partition preferably tweak with Vold config (/etc/vold.fstab) - or add something like this (in init.rc)
Code:
mount vfat /dev/block/mmcblk2p3 /mnt/sdcard2 uid=1000 gid=1015 fmask=0000 dmask=0000
Files (UrukDroid-0.3):
Megaupload.com
initramfs.cpio.gz
zImage
rootfs.tar.gz
Dropbox.com (there can be server error because of download limit)
http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/rootfs.tar.gz
http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/initramfs.cpio.gz
http://dl.dropbox.com/u/1017593/ArchosGEN8/UrukDroid-0.3/zImage
Nm you said it's faster, interesting... I may test that out.
IMHO you should point out that it is a great security risk for having access to root without any password.
BTW this comment is not meant to insult you in anyway, but I think it is only fair to people that will use it and to cover your own ass.
Maurice
Does this require a clean system to do the SDE Root? what happens to everything already installed etc.
MoonPhantasm said:
Nm you said it's faster, interesting... I may test that out.
Click to expand...
Click to collapse
There was already link to my write speed tests (now I've pasted it to second post) - read speed is about the same. In quadrant I have something about ~2300 (one of quadrants test is I/O benchmark) - but that's not my goal - so I don't care much about that kind of speed.
divx118 said:
IMHO you should point out that it is a great security risk for having access to root without any password.
BTW this comment is not meant to insult you in anyway, but I think it is only fair to people that will use it and to cover your own ass.
Click to expand...
Click to collapse
Of course your are right - but that's kind of obvious, and that's the reason why superuser.apk requires to specify what process can gain root access (I know it's not strong security - but better something than nothing)
Is there any way to do this on the a32, or can will there be a solution for the 32.
I had SDE installed before, but I used the uninstall developer edition option in the boot menu. Now, regardless of if I use the .aos file from archos that has SDE, whenever I reboot holding a volume button, I get to a menu that says "Archos A101IT Recovery", and "Would you like to recover your system?" with the following options:
No
Update Firmware
Repair System
Format System
I select update firmware, and all I get is an update failed error.
I don't know what to do. I have a basic linux knowledge, so I have my sd card properly formatted, without the huge file option. I've extracted the contents of rootfs.tar.gz to the first partition.
Any ideas on what to do?
$aur0n said:
I don't have that problem since I use Linux everywhere
My mmcblk2p3 is also EXT4 partition (since fat 32 has 4/2gb file size limitation it's only place where I can put bigger files - mainly movies. It's one of ther reasons why ext4 is good for the task).
To mount (vfat or ext4) during but of Archos put in init.rc
Code:
mount ext4 /dev/block/mmcblk2p3 /mnt/storage/sdcard noatime nosuid
or
mount vfat /dev/block/mmcblk2p3 /mnt/storage/sdcard
just after mount of /data.old for example..
/mnt/storage/sdcard is the place where automounter would normally mount this device.
Click to expand...
Click to collapse
I did try to add it to init.rc, but it wouldn't mount.
Running "busybox mount -t vfat /dev/block/mmcblk2p3 /mnt/storage/sdcard" after boot seems to work however.
Is /mnt/storage mounted yet at that point? It seems to be separately mounted ("mount" shows /dev/block/vold/179:9 mounted on /mnt/storage, but I can't find any line related to that in init.rc)
Since "Preparing internal storage" appears after boot, I assume the SD card has to be mounted after that (unless I mount it somewhere else, which would break compatibility with some apps)
Actually, I'd prefer if the SD card was mounted on /mnt/storage, and the internal storage on /mnt/storage/internal, is there a way to do that?
Edit: Ah, I checked that /etc/vold.fstab file. It seems to be what I need to edit to auto mount the SD card, but I'm not sure what I need to edit.
The line currently reads:
dev_mount_lun volume_sdcard /mnt/storage/sdcard auto /devices/platform/usb_mass_storage/lun1 /class/block/mmcblk2
"auto" seems to be the partition number, I tried to change this to different values as well as changing mmcblk2 to mmcblk2p3, but they result in the same SD card damaged message. Is this a no-go and just won't work or am I doing something wrong? Either way, it seems like it's the only way to mount the SD card at boot if I want it mounted to /mnt/storage/sdcard.
Edit 2:
Adding these 2 lines to init.rc and commenting out the equivalent lines in /etc/vold.fstab seems to work:
mount vfat /dev/block/mmcblk2p3 /mnt/storage
mount vfat /dev/block/mmcblk1p1 /mnt/storage/internal
Now I have the SD card mounted on /sdcard
However, the settings won't show the space information now, so I have to connect it to the PC to check free space. Is there a better way to do it?
Jdbye said:
I did try to add it to init.rc, but it wouldn't mount.
Running "busybox mount -t vfat /dev/block/mmcblk2p3 /mnt/storage/sdcard" after boot seems to work however.
Is /mnt/storage mounted yet at that point? It seems to be separately mounted
Click to expand...
Click to collapse
No, this mount point (/mnt/storage/sdcard) is not ready yet at this point - that's why I've changed it to /mnt/sdcard2 in howto. It's not good solutions (since probably some tools won't find media - like movie player) - but the only one for now. Vold is crappy, and even so it should mount _first_ usable partition (with auto option) but it does not want to do that. I can't check it, since I don't have vfat on sdcard, but probably the only solution is to do separate script/service with delayed mount - that's what I'm going to do for now, later on (in next release).
Q: However, the settings won't show the space information now, so I have to connect it to the PC to check free space. Is there a better way to do it?
A: (kind of joke) - user "df -h" in terminal, probably some more smart tools with gui are also able to show space used by "other" devices.
hurrpancakes said:
Any ideas on what to do?
Click to expand...
Click to collapse
I guess it's some Archos SDE bug and you should report it (I thing that after uninstall of SDE and second install you should see developer menu back - if not,
it's error or faulty "watermarking" at work)
jab12 said:
Is there any way to do this on the a32, or can will there be a solution for the 32.
Click to expand...
Click to collapse
My guess - it may also work for you. All gen8 devices have the same kernel and system - so give it a try.
xShadoWxDrifTx said:
Does this require a clean system to do the SDE Root? what happens to everything already installed etc.
Click to expand...
Click to collapse
Everything that is installed on INTERNAL 8GB storage is untouch. So even when sde fails to boot, you can go back to original Archos Android and work on that.
When you follow my instr. you should see second Android with all yours application installed but on ext4 with root etc. etc.
$aur0n said:
I guess it's some Archos SDE bug and you should report it (I thing that after uninstall of SDE and second install you should see developer menu back - if not,
it's error or faulty "watermarking" at work)
Click to expand...
Click to collapse
I think the error may lie in the fact that I have to access my sd card by mounting it through my a101. Tomorrow (or later today, rather) I will get a sd card reader so I won't have to rely on using the tablet.
Hi, thanks for howto.
Can we keep the superuser mode explained in this topic http://forum.xda-developers.com/showthread.php?t=880321&page=13 And use your method (in case i forgot m'y sd card And need root access)

[READ FIRST] [REF] Dictionary for n00b - What is.../What does ...mean? (2011/01/17)

Dictionary for n00b - What is.../What does ...mean?​
Start read from 1st to last one and don't jump from one to another. If you will read all, it bring complex knowladge, if not you can be confused
Read summary to make sure, that you know everything if you think that some part(s) is not necessary to read for you!
If you post link here, please link to 1st post! Than everybody can know, what he/she can find here
Atin001 helps with some updates/corrections in Dictionary - take a minute to thanks him also.
Did you miss something here? Send me PM what you want to have here!
Basics of Unix-like system (ROOT)
su, root, rooting, superuser app - what is it, why we need it
sh, bash, user/root shell - what is bash, sh; what is user shell; what is root shell; how I can recognise it each other
Bussybox - what BusyBox is, basic list of commands from BusyBox
(in progress) Kernel - what is going on? Do I need it?
Android platform and it's specifics
adb shell - what is it, for what it is
Android SDK - what is it, tool which provides, where to download
Tools for work with Android adb shell - Terminal Emulator, ADB shell from Android SDK and how to use it
Custom recovery
What custom recovery is - what custom recovery is
Tools which custom recovery provides - list of tools with description which custom recovery bringing
ADB as root user
USB-MS Toggle
Backup/Restore
Flash ZIP from sdcard
Wipe menu
Partition sdcard + etx2, ext3, ext4 filesystem description
Mounts
Others
Is it save to install? - possible problems, why should I try it?, backup/restore of original recovery
How this whole thing works - Drellisdee's installation steps description/elaboration
Custom ROMs (generally)
What custom ROM is?
Is save install custom ROM? - potencional problems
What I need for install?
What can custom ROM brings - kernel, update, performance, customization, theme, ....
what is ...
deodexed, zipaglined, png-optimized
JIT, HW:acceleration, VM.Heap Size, stagefright
apps2sd + dalvik2sd
custom kernel (recompiled, ...)
Android versions (collecting informations)
List of versions of Android for Optimus One (official&unofficial) - what we can install into our device
What version can be rooted and how? - version list, how to root, which version can be rooted, which can't
Sources (collecting)
http://en.wikipedia.org/wiki/Android_version_history
Tools which you must have
Android SDK Tools (adb shell)
Terminal emulator
KDZ Updater tool
...
So I'm on way, where I can start doing advanced stuff?
Follow Noejn's sign-post You can find here main point for start.
If you now know basic "words of android world" you can take a look on really great tutorial how to root, install recovery and so on.
Have you some questions? Make sure that you look on Mihir287's FAQ
1. Basics of Unix-like system
su, root, rooting - what is it, why we need it
sh, bash, busybox - what BusyBox is, basic list of commands from BusyBox, bash, sh
Kernel - What is it?
su
Also referred as substitute user - is command for changing of the account in current terminal (usually black screen with blinking cursor). Default account is root account. So if you insert into terminal 'su' and hit enter, you will become root user.
root
Root alias superuser or poweruser is special user account for system administration. Similar to windows having its administrator account, unix-like system have system have the root. With this user you can do anything and if you will run command for delete whole system, unix will just do it! No asking, no confirming. So, watch your steps!
rooting
Rooting is just enabling power of root for applications or our proposes. You can read great article about Rooting on androidpolice. Kepp on your mind, that some steps described on this page are NOT compatible with our Optimus One!!
Superuser app
After rooting is done, you will see new app called superuser in app drawer. This app can delegate applications to use su (root) feature. When app ask for first use, popup window will appear asking if the application should be allowed to use root permission.
sh, bash
is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. So simply, it is some interface, which can execute command(s), which you have entered. Many shells exist, but in scope of android you can (as far as I know) use only sh (standard - Bourne-shell) or bash (compiled in BusyBox or separately on XDA). Both are basically same, but bash has much more future and it is comfortable. It's too big to describe here, so if you are interested in learning more, follow links in sources section.
user/root shell
How do I know if I'm root or normal user? It's simple. Root's shell is ended with # (usually it's shell looks like "bash-3.2# _") and user's ends with $ (usually bash-3.2$ _). In terminal emulator you also can have only [path]($|#) (for root for example "/etc # _")
BusyBox
also called "The Swiss Army Knife of Embedded Linux" is a tool which brings into Android basic tools known from unix system, but is much more smaller than standard tools is. But this "packing" brings also limits in possibilities in comparison to standard tools in unix-system (missing special modes of tool, color output and so on). Many application use this. For example busybox grep (filtering of text) is needed for application called Market enabler.
BusyBox commands
list of commands is really wide, so it's not possible explain all, so I pickup only top few. (hint: if you want what some command do, just search on google for "man <command_name>" for example man mv or enter command here
cd - cange directory - same like in windows. You can switch directory. example: cd /sdcard
ls - list of files in actual directory (have few switches like for example: ls -l /sdcard/*.png (detailed listing)
cat - print file into standart output (like more in windows) Example: cat /sdcard/data.txt
vi - editing of file. But on limited phone keyboard (no keyboard) it is little harder Read more about vi
cp - copy of one or more file. Example: cp /sdcard/bike.jpg /sdcard/media/bike-wallpaper.jpg
mv - moving/rename files, Example: mv /sdcard/bike.jpg /sdcard/media/renamed-moved-bike.jpg
rm - delete file (rm -R for recursive, or for delete whole folder), Example: rm -R /sdcard/wallpaper-bad/*
find - search for files, Example find / -name "best-chopper-ever.avi"
mkdir - make directory - creates directory, Example: mkdir mynewdir
chmod - changes access of files
less - similar like cat, but you can scroll in it and it doesn't produce any output. Example: less /sdcard/funnytext.txt
Please, take due note that man pages are documentation of unix tools. For BusyBox's tool help, just enter BusyBox <command_name> -h.
Many time, when is BusyBox installed, are also symbolic links created. It means, that is not necessary do BusyBox <command>, but only <command> will be enough.
Kernel
http://en.wikipedia.org/wiki/Kernel_%28computing%29
Work in progress...
Links/thanks:
----------------------------------------------------
su (Unix); wikipedia.org
Superuser; wikipedia.org
Bourne shell (sh); wikipedia.org
Bourne-Again shell (bash); wikipedia.org
BusyBox; benno.id.au; BusyBox.net
Kernel; wikipedia.org
----------------------------------------------------
==========================
Main topic
==========================
2. Android platform and it's specifics
adb shell - what is it, for what it is
Android SDK - what is it, tool which provides, where to download
Tools for work with Android adb shell - Terminal Emulator, ADB shell from Android SDK and how to use it
ADB (shell)
ADB - Android Debug Bridge is a versatile tool lets you manage the state of an emulator instance or Android-powered device. It is a client-server program that includes three components:
A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
A daemon, which runs as a background process on each emulator or device instance.
Generally it can be compared with standard cmd prompt in windows (you can write commands which will be executed locally, for example in Terminal Emulator) or it can be just like SSH in unix-like system (you connect to terminal through adb client (in Android SDK) and commands will be run remotely.
Android SDK
Android software development kit is complex set of tools for developing app on Android. It includes fully usable emulator of Android OS on your PC, where you can do everything. You can install/delete apps, browse web page in embedded web browser, play games or make your own application in Eclipse (widely used IDE for development). Of course, with emulator you can use also GPS or camera. Emulated android phone is just like "normal" phone.
Android SDK tools
Fully emulated Android device
Android Development Tools Plugin (Eclipse IDE)
Android Virtual Devices (AVDs)
Hierarchy Viewer
layoutopt
Draw 9-patch
Dalvik Debug Monitor Service (ddms)
Android Debug Bridge (adb)
Android Asset Packaging Tool (aapt)
Android Interface Description Language (aidl)
sqlite3
Traceview
mksdcard
dx
UI/Application Exerciser Monkey
monkeyrunner
Android
zipalign
Tools for work with Android adb shell
You have two ways ho to connect into ADB service - locally and remotely.
Locally - for local access you will need some application which can connect to local adb shell.
Terminal Emulator (free) - probably most commonly used app from market, which works and looks like standard unix shell.
ConnectBot (free) - same as Terminal Emulator, but it can be also used for connecting via SSH or telnet
Remotelly- For remote connection you need phone configuration adjustment:
Home desktop -> [menu button] -> Settings -> Applications -> Development -> USB debugging [ON].
Also you need connect your phone via USB (or finds on market some widget/app, witch enable using ADB also via wi-fi)
adb tool from Android SDK
After download Android SDK, extract archive somewhere (in example I extracted it in c:/AndroidSDK). Then follow instruction on developer.android.com for installation of SDK Platform-tools (contains adb). After installation click on start menu and in Run... (in Windows7 in search bar) enter 'cmd' and press Ok or [enter]. Then write in cmd line:
Code:
cd c:\AndroidSDK\android-sdk-windows\tools [enter]
now you can enter following command to connect to phone's adb shell if you don't have more connected device (virtual or real-one)
Code:
adb shell
If you have more then one, you need explicitly say which one should be used for connection. So list connected devices with
Code:
adb devices
which shows you serial number of connected devices. Than use
Code:
adb -s <serial-number> shell
Links/thanks:
----------------------------------------------------
ADB; android-dls.com; developer.android.com
Android SDK; wiki.androidforum.cz [CZ]
Basic adb/shell commands for noobs; forum.xda-developers.com
15 Useful Android Terminal (ADB Shell) Commands; gadgetsdna.com
----------------------------------------------------
==========================
Main topic
==========================
3. Custom recovery
What custom recovery is
Tools which custom recovery provide - NAND backup/restore, formatting of SDcard, partitioning (ext1,ext2, ext3), wiping, flashing of Custom ROM, ...
Is it save to install that? - potential problems, backup/restore of original recovery
How this whole thing works - installation description (not how-to install, just explanation of what is done during installation)
What custom recovery is
Recovery is image (binary data) stored in internal memory. This image contains something like "program" maybe better say "tool", which can boot-up independently on Android system. In other words, when this tool is running (booted up), than Android system is not. This tool is part of phone system, and in PC terminology recovery can by compared to BIOS with some added features. This recovery state can be reached on all phone, but if you don't have custom recovery, it will do so-called HW reset and automatically restart itself into standard boot mode. So what is difference between original recovery and custom recovery? Custom recovery didn't call master reset after start and also didn't restart itself.
Tools which custom recovery provides
Let's go check what custom recovery brings (I will describe Drellisdee's custom recovery so another recovery can brings another menu and tools)
In Drellisdee's post is picture of main screen with list and description of tools so let's look on it:
ADB as root user
what is root user, and what is adb, you should already know. If not, follow link on main post.
USB-MS Toggle :mounts sdcard as mass storage
It just mounts your phone as USB-mass storage (USB disk) so in PC you will see new disk where you can see folders based on mountes (lower) and were you can upload what you want.
Backup/Restore:
Nand Backup : runs a nandroid backup of data, cache, boot, system
Nand Backup + .android secure : backs up above plus .android_secure on sdcard (froyo native apps on sd)
//Native app which notify "application can be moved into SD card" if you can move some app. It's good to use, if you used it.
Nand + ext backup : data, cache, system, boot, plus apps2sd on ext partition (old style apps2sd)
//old style apps2sd is used on some custom ROM because can move every application into SD card instead of Froyo's apps2sd
Nand Restore : browse to and select nandroid backup to restore
Absolutely GREAT feature. With NAND you can do 1:1 copy (image) of your actual system (phone's memory). It means, that you didn't backup only SMS, contacts or apps, but whole system with all configuration, customization, wallpapers, system's tweaks... just everything - it creates image of whole phone system. This image will be written to your SD card which you are then free to copy around and back up on your computer.
What it means? You find custom ROM which looks awsome so you create NAND backup and install new ROM, but after few hour/days... you know, ROM before was better. So you boot into recovery, use NAND restore of your old ROM backup and .... woala you have your system just like before backup - as if nothing had happened. For about 2 minutes!! It sounds great, isn't? But one, little problem exist. You can not use for restore only some part of backup. You have to restore all, or nothing.
Flash Zip From Sdcard: Update.zip must be in root of sdcard
This tool is designed for install of custom ROM or for tweaks. If you have instruction to install via custom recovery, and file have .zip extension than you should use this menu. Never unzip file, because file contain meta-information about itself with some validate-checks so if you edit it, or unpack and pack back, it shouldn't work. And of course you can't select *.zip file if it doesn't exist because you unpack it, also you have not to rename it to update.zip, you can just select file to update in list of .zip files. And, at the end, file have to be in root (main folder) of sdcard.
Wipe Menu:
Wipe data/factory reset: wipes data & cache
- wipe of users data (contacts, apps, configuration, ...) and cache (caches of applications)
Wipe cache
- wipe cache only
Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd
- wipe of Dalvik cache?
Wipe SD:ext : Wipes Apps2sd ext partition
- if you used Partition SDcard option, you can wipe it here
Wipe Battery Stats
- If you think, that your battery life is too short, you can try delete battery stats. Than let phone fully charge. (more)
Wipe rotate settings
- wipe senzor setting (acceleration, ...)
Wipe .android secure : Wipes froyo native .android_secure on sdcard
- wipe information about moved apps
Partition Sdcard:
Partition SD: Partition's sdcard for apps2sd (this formats card so all non backed-up data is lost)
- will create ext2 partition (you will be asked for size of ext2 and cache)
Repair Sd:ext
SD:ext2 to ext3 : coverts apps2sd ext2 partition to ext3 (requires kernel support for ext3)
SD:ext3 to ext4 : same as above but ext3 to ext4 (requires kernel support for ext4)
ext2 - file system for the Linux kernel (no journal, fast but not recovery of I/O error)
ext3 - file system for the Linux kernel (journal, slower than ext2 because of journal, but provides recovery on I/O error)
ext4 - file system for the Linux kernel (journal, enhanced version of ext3)
Links/thanks
----------------------------------------------------
How to increase battery life; androidforums.com
Comparison of file systems; wikipedia.org
ZeroXtreme's filesystem answer (thanks); forum.xda-developers.com
----------------------------------------------------
Mounts:
Gui mounts to avoid typing in terminal to mount and cd into a dir to mount system, data, cache, sd-ext (if exists), sdcard
Other:
Fix apk uid mismatches
//I'm not sure, can somebody helps?
Move recovery log to SD
Toggle Signature Verify : Turn of signature checking on flashing zips
Key Test : Output keycodes for debugging recovery
I thing that this is clear enough.
Is it save to install that?
Well, nothing isn't without any risk. Anyway, from what I know, nobody has had any problems, if Drellisdee's steps are followed, but you have to have P500, not derivate from Sprint, for example. From my point of view the installation of recovery is without any problems. After update with KDZ_FW_UPD tool I had rewritten also recovery. But this tool is really dangerous, so try to avoid to it.
Anyway, original recovery can be backuped before installation of custom recovery and this can be done by command
Code:
dd if=/dev/mtd/mtd2 of=/sdcard/<name-of-old-recovery>.img bs=4096
for example:
Code:
dd if=/dev/mtd/mtd2 of=/sdcard/my-original-recovery.img bs=4096
For restore,just use same step (command) that you used for flashing, but replace name of .img file.
Code:
flash_image recovery /sdcard/my-original-recovery.img
NOTE: You don't have to do other commands before and after as you done for install of recovery!!
So, where can problems arise?
loss of warranty - LG service have much more advanced software and hardware and they can check what problem caused - make dump of memory and so on
bricking of phone - if something goes wrong, then phone may not start at all
deletion of all data if installation fails - if old recovery remains, than hw reset will be performed
custom recovery doesn't work at all - incompatible devices
Why to try?
NAND backup/restore - the most useful tool ever
you can install custom ROM
high count of successful flashing of custom recovery
for now (what I read on forum), when you had said that you brick your phone by standard LG tool, your warranty repair was approved
How this whole thing works (description of installation's steps)
Let's see on how to:
Copy flash_image and recovery-RA-GNM-thunderg-1.1.0.img to the root of your sdcard
Nothing hard I think.
via adb shell or terminal type this from root su # shell. (Do not type the # as its just for reference to show you need a root # shell not a $ user shell)
Ok, it seems that it doesn't make sense, isn't. But what is root and su we already knows, same as user shell and root shell. Also follows commands probably aren't some "normal" task, so some special user approve will be necessary - so it probably means use of root. So, enter 'su [enter]' for become a root.
Code:
[B]# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remounting of filesystem for write
[B]# cat /sdcard/flash_image > /system/bin/flash_image[/B]
// print contend of flash_image into /system/bin/flash_image (it is just copying)
[B]# chmod 755 /system/bin/flash_image[/B]
// set up file access for running (basic of unix-like systems)
[B]# mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak[/B]
// rename install-recovery as install-recovery.sh.back
// NOTE: many guys haven't this file, so they get error: [I]"failed on '/system/etc/install-recovery.sh' - No such file or directory"[/I]
// it's normal. If it happens, just ignore it and continue.
[B]# mount -o remount,ro -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remount of filesystem into read-only mode
[B]# flash_image recovery /sdcard/recovery-RA-GNM-thunderg-1.1.0.img[/B]
// using of program/script flash_image for flashing of recovery image
// you can do by same way also restore of your original recovery
[B]# reboot recovery[/B]
// reboots into recovery mode
I think, that was also nothing hard. As was said "#" on beginning means that root's shell should be used for running that command. Maybe you remember what I had written, that if you run something on root's account, it doesn't ask for confirmation and will just do it. Same with responses. If there is nothing to say, then nothing will be said. So if command runs without any problems, nothing will be shown. If something doesn't work, than you will be informed.
Key combo to boot custom recovery from powered off is vol_down + home + power and release keys at LG splash.
Nothing special I guess. But I recommend keep vol down + home keep pressed until custom ROM menu appear.
Note this recovery and the one for the LG Vortex have a service that instantly reboots out of recovery once you load it & I disabled it and thats why you get a E: "Bad Boot Message" on inital startup. Its completely fine.
IMPORTANT NOTE!! Too many of n00bs asking "I have problem, E: "Bad Boot Message appeared, what I should do?" Read ALL carefully before every action!!
Recovery Key mapping:
Up & down : vol-up and vol-down
Select : Menu
Backup : Back
Key map for moving in menu (touch screen doesn't work... )
Links/thanks:
----------------------------------------------------
Drellisdee's custom recovery description; androidforums.com
----------------------------------------------------
==========================
Main topic
==========================
4. Custom ROM (generally)
What custom ROM is?
Is it save to install custom ROM? - potential problems
What I need for install?
What can custom ROM brings - kernel, update, performance, customization, theme, ....
what is ...
deodexed, zipaglined, png-optimized
JIT, HW:acceleration, VM.Heap Size, stagefright
apps2sd + dalvik2sd
custom kernel (recompiled, ...)
What custom ROM is?
Custom ROM is every somehow changed manufacturer's ROM or ROM compiled from source code of Android. "Change/s" can starts with adding/removing default application and can extend to kernels, cpu over/under-clocking, enable/disable features (ROOT, HW acceleration, ...), themes (frameworks, color, ...), keyboards and many other features.
Custom ROM is mostly distributed like signed ZIP package with included installation script for custom recovery. This ZIP is flashed via custom recovery tool.
Is it save to install custom ROM?
Yes, it is. May be I can say, that installation of custom ROM is almost mandatory, because it cost you only few minute if you will not be satisfied - you can just restore your old ROM from NAND backup, if you will be satisfied, you can keep it. And yes, you can also use backup tools like for example Astro for backup of your apps or Titanium Backup backup everything (SMS, call list, preferences, APNs, ...) and restore this in your new ROM (NOTE: In this case it's strongly recommended that both ROM should have same or very similar source/base ROM).
So, it is really simple:
1) Do NAND backup
2) Try new ROM
3) Keep new, or restore old one.
What I need for install?
1) Rooted phone
2) Installed custom recovery
3) Signed .ZIP file of ROM compatible with recovery
#) RECOMMENDED: NAND backup of your actual ROM
What does custom ROM bring
Custom ROM brings almost every feature you can image.
ex:
optimization for maximal power (games), long battery life, calling, texting, playing videos,...
awsome look - changed icons, colors, animations, wallpapers, menu, ....
simple work - feature that will short some work (add restart button, reorganized menu, shorts, gestures, ...)
allow tweaking - overclok/underclok your device, ROOT, ....
It's really not possible describe here every possibility what you can do/get with custom ROM.
what is ...
deodexed - needed for using themes. If you want replace/change some file in system (change theme) you need deodex file which you want change. In most cases it's going on services.jar which contains definition of colour for clock for example.
APKs zipaligned - optimization of APK archive, so it takes less memory and is much faster.
png-optimized - png files takes less memory, are loads faster
JIT - just-in-time compilation also known as dynamic translation, is a method to improve the runtime performance of computer programs, but it takes some time to convert into it on start.
HW:acceleration - using of HW acceleration for rendering GUI. Little increase battery consumption.
VM.Heap Size - maximum memory an application can consume
stagefright - In Android 2.2 new media framework that supports local file playback and HTTP progressive streaming
Apps2SD - (mostly DarkTremor's a2sd) If you create ext partition on your SD card, you can mount it like internal memory (you will have more space on phone memory) and move app on SD.
Dalvik2SD - move of Dalvik into SDcard (saves space)
custom kernel - compiled standard unix kernel (can bring support for features like support ext4 for example)
Links/thanks
----------------------------------------------------
P500 custom ROM list; forum.xda-developers.com
What's Deodex and Odex?; forum.xda-developers.com
What Is Zipalign In Android And How To Make Apps Zipaligned; www.addictivetips.com
PNG compress; http://www.gotow.net/creative/wordpress/?p=79
Just-in-time compilation; wikipedia.org
VM Heap size; forum.cyanogenmod.com
stagefright; developer.android.com
----------------------------------------------------
==========================
Main topic
==========================
Thanks
Very good and hard work
Hats off to you.
rakesh_4utoo said:
Very good and hard work
Hats off to you.
Click to expand...
Click to collapse
Thanks You are welcome!!
very very nice guide, cant wait for you to finish it :X ! Thx alot dude for all the hard work!
Very good work!
Please post it on czech androidforum.cz
Thank you,
David Ullmann, Czech Republic
Very nice. A bit rough around the edges but I'm sure most people can understand it easily enough ^__^ Good job. It came like two days too late for me though since I already asked my questions everywhere on xda to install void
raylgo said:
Very nice. A bit rough around the edges but I'm sure most people can understand it easily enough ^__^ Good job. It came like two days too late for me though since I already asked my questions everywhere on xda to install void
Click to expand...
Click to collapse
But you can be happy and proud, that you probably inspired me!
While backing up the old recovery what do you mean by:
recovery-dump-T
My first line went ok in terminal emulator but second line didn't go ok. That's why I am asking this.
Your the Man! Thank You So much! all are much clearer to me now! now lets gets things started!
lekhwani said:
While backing up the old recovery what do you mean by:
recovery-dump-T
My first line went ok in terminal emulator but second line didn't go ok. That's why I am asking this.
Click to expand...
Click to collapse
It is just example
I think this post should be read for evey noob even before powering his mobile on !
Great work !
Sent from my LG-P500 using XDA App
Quite helpful for noobs like me
So...because I wrote what I wanted, you can make suggestions what are you missing here.... I'm looking forward...
how long should the recovery flashing take?
bazo666 said:
how long should the recovery flashing take?
Click to expand...
Click to collapse
Few minutes
hm, i left it running for like half an hour and nothing happenned. then i unplugged the phone from usb and closed the adb shell, because i had to go.
but the phone boots fine so i think nothing has flashed.
what can be the problem?

[SEP 18][V0.3] Stable Customized BT5 for HD2 - Links updated

Zen's Backtrack 5 For HD2 (and other) Android Smartphones
V0.3
----------------------------------------------------------
New app for loading this (and other) Linux Systems! - https://play.google.com/store/apps/details?id=com.linux.autoloader
Image and app support can be found here --> http://www.zenfulapps.com/
Packed - 640mb
Unpacked - 2.6gig (fits on 3.3 img now.)
--GRAB THE UPDATED SCRIPTS ATTACHED TO THIS POST, THEY ARE NOT PACKAGED INTO THE ZIP--
--Scripts are set to load from EXT4 partition, when i modify them for the .img's ill add them to the script pack--
--if you have .img mounting scripts from previous versions, they will work, as long as file names and directories match--
V0.3 Download
http://www.zenfulapps.com/Android/backtrack5-0.3.7z
(MD5 is still the same
MD5sum (of .7z file) - 9a4796f0ed96e03579c2b4a684d026f5
--------------------
Script pack contains
--------------------
btgo - mounts BT5, and askes how you would like to start, CLI or VNC
bts - stops BT5, and unmounts everything for it.
btl - used to login to bt5 after it has been mounted, to avoid all those "resource busy" messages
mkcore - directory installation and swap file creation
-------------
What you need
-------------
Rooted Android Smartphone
Linux on PC
Busybox installed on your device
SDcard adapter or reader, if neccesary
----------
Lets begin
----------
There are 3 different ways you can do this:
1. Fresh install on EXT4 Sdcard partition ( I HIGHLY recommend this method if possible, much better, a bit faster (no double loops to write to)
2. Create Fresh .img
3. Replace old BT5 system .img
=========================================
1. Fresh install on EXT4 Sdcard Partition
=========================================
This portion of the guide is to install BT5 on a FRESH EXT4 partition on your SDcard. Throughout this porcess, you will:
Backup your current sdcard (EVERY PARTITION, this is why we use PC-linux and not windows)
Fully erase and repartition your SDcard
Replace Android system and user data
Install BT5 on third partition
prepare system for chroot and VNC connection
----------------------------------------
Boot into your Linux operating system. **I DO NOT recommend using virtualbox or vmware, as drivers for usb and SDcard connections arent direct, things can go wrong.**
Shutdown your phone, and remove your SDcard. Do not use adb, or any other tools to do this.
insert your SDcard into your computer (adapter or reader yada yada) and mount every partition.
Make careful note of what is on which partition. safest way to back everything up is through the command line with the command
Code:
sudo cp -Rfvp /media/your-sdcard-partition/* /where/your/backup/folder/is
Do this for each partition, whether you have 1, 2, 3, or more.
In my case, my backup directory looks like this:
Code:
[[email protected] sdcard-backup]$ ls -l
total 12
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext2
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext4
drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 fat32
(ignore the empty directory sizes, my TRUE backup folder is MUCH more vulgar and i wont display it publicly, people may tear thier eyes out )
After everything is backed up, open your partition manager (in Gnome it is gparted, cant remember the name in others)
Navigate to your SDcard, and DELETE every partition. every one.
afterwards, recreate them using this strategy:
partition 1 - FAT32 size = total sdcard size minus ext2 and ext4 partition sizes
partition 2 - EXT2 size = 256mb, 512mb, 1gb, depending on how you like your apps2sd
partition 3 - EXT4 size = size you want for linux, minimum should be 4gb (mines at 10gb, i like my linux and got 3 different ones on it at the same time.)
When you are done, copy back your fat32 and ext2 stuff using the SAME COMMAND AS ABOVE (sudo cp -Rfvp from/here to/here)
Now, unzip/tar the .tar.gz package. I recommend extracting it to your pc before trying to put it on your sdcard.
Using the copy command above, put the extracted files onto your sdcard's EXT4 partition.
Double check the partition (navigate to it in nautilus or whatever filemanager your using) and ensure that it has the system copied over properly. You should see /boot /etc /root /sys so on and so forth, NOT just one folder with all of those inside of it.
Insert your SDcard, power on your phone, go to terminal emulator, and enter this:
Code:
su
cd /sdcard/scripts
sh mkcore
Swap file is damn near neccessary if your planning on using any GUI tools (armitage, zenmap)
Your directory structure is now in place, swap file created, and you start BT5 by typing (from /sdcard/scripts OR /data/linux):
Code:
sh btgo
=================================
2. Fresh Image Creation
=================================
for this, we use the dd command and mkfs.ext4 command.
Code:
dd if=/dev/zero of=/path/to/where/you/want/the/img bs=1M count=3300
Change this command as needed, running it as is wont do anything good. Change the of= to where you want your img to be located.
next is mkfs.ext4
Code:
mkfs.ext4 /path/to/where/you/want/your/img
select yes when it cautions about "not a block device"
When this is finished, mount it using these commands:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t ext4 /path/to/your/img /mnt/bt5img
now, extract the BT5 package to a place on your Computer. When finished, run this command:
Code:
sudo cp -Rfvp /path/to/bt5/core/* /mnt/bt5img/
changing parameters accordingly.
After this, copy the .img to /sdcard/bt5 and run the start scripts from your terminal emulator.
================================
3. Replace Existing Image
================================
Mount your bt5 image, erase what is inside of it, and copy in the new system:
Code:
su
-your password-
mkdir -p /mnt/bt5img
mount -t (your ext type) -o loop /path/to/your/bt5/img /mnt/bt5img
rm -Rfv /mnt/bt5img/*
cp -Rfvp path/to/bt5/core/* /mnt/bt5img/
unmount your .img, place it on your sdcard, and your all set.
==============================
Changes in v0.3
==============================
- Trimmed alot of fat, fits inside of 3.3 image now, though space is SEVERLY limited (removed CUPS and sound stuff, who needs to print from within thier phone anyways?)
- various small changes for performace improvements.
- a few new tools installed, but not tested
- restored my personal version that i nuked. It works now.
NEW STUFF TO COME, STAY TUNED!!!
First off, My apologies for starting a second thread on this, I've made ALOT of changes and i feel the first thread is dead and useless. (Reprimand me if needed
-pics coming once I find my camera could be a small while-
---------------------------------------
Backtrack5 for HD2 - v0.2
Customized by z3n
My goal: the perfect stealth
tool in your pocket
just one tap away
---------------------------------------
========================
Codename
Squeaky Wheel
========================
Updated, check second post for changelog
========================
DOWNLOAD
========================
Please use the scripts attached at the bottom of this post instead of the packaged ones, and i havent had a change to update the full image zip with it (uploads take a while )
V 0.2
Part 1 - http://www.megaupload.com/?d=D0MQVAS4
Part 2 - http://www.megaupload.com/?d=M2MRYLAH
MD5 - 06225e18cdbfee6f88daf7e9ee3a1163
SHA1 - eeba19e53565a1643703cf8938be2f8cfc12db9a
V 0.1
Part 1 - http://www.megaupload.com/?d=83B22Y00
Part 2 - http://www.megaupload.com/?d=SB98AA19
mirror - (NOT interchangeable)
Part 1 - http://www.megaupload.com/?d=HU320Z81
Part 2 - http://www.megaupload.com/?d=QN9C560Z
Checksums of bt5.img
MD5 = 863e6db99e5207a81ad0df7d13998235
SHA1 = c84d8f27df8b9b51059e5a6b09e65853f11de970
7zip required to extract.
Just over 1gb packed, unpacked is 4.9gb.
========================
INFO
========================
This is my first release of a customized, working, mostly stable BT5.
Many things have been added, taken out, and configured to be used within the Android system. For a full list, please see the bottom of this post.
Mounting is different than most other linux .img installations, allowing for a full (and expandable) image.
V 0.2 Now has a swap file created when you run the mkdirectory script. This swap file is necessary, as with all my tests, When you run VNC with most of the major tools, there's a high chance of the phone running out of memory (im running no extra apps, completely stock Hyperdroid)
(if you have a swapfile already, you can say no to creating another, just make sure that the file is located at /data/bt and named btswap.)
**This image is in ext4, make sure your kernel supports it!**
**Everything tested on Hyperdroid-CM7 by pongster**
==============
INSTALLATION
==============
You need:
-Full Nandroid Backup in case something goes batty
-16gb HD2
-ext4 support on your ROM/kernel (lost my ext2 image due to my own stupidity, will create another matching one later)
-Linux on PC (to create the ext4 partition)
-Busybox (from market)
-VNC Viewer (from market) (optional)
FAT32/EXT4 Split card
---------------------
1.
Back up your HD2 and SDCard to safe places (off of the phone and sdcard)
2.
Boot your linux installation and open partition manager. erase all the partitions on yor SDcard. Then create them in this order.
1. FAT32 - size of this is total sdcard size minus 6.5g (for bt image) minus 100mb for aps2sd
2. ext2 - 100mb
3. ext4 - 6.5 gb
3.
Copy the bt5.img to the root of your third partition.
copy the bts folder to the root of your FAT32 partition.
4.
if this is your first time using this script/image, run the mkdirectory script first with
Code:
su
sh /pathtoscripts/mkdirectory
Load up your android terminal and type
Code:
su
cd /path/to/scripts
sh go
5.
Now it asks you if you want to log in to the console or start vnc automatically. (check log for port, usually 5901 or 5902)
DEFAULT VNC PASSWORD IS: toortoor
DEDICATED SDCARD
----------------
Same as everything above, minus the FAT32 partition.
"sh ded"
starts for dedicated SDcard instead of
"sh go"
Proper Shutdown Procedure
=====================
Stop script has been modified to shutdown backtrack and all of the (usual) programs that stop things from unmounting properly.
Exit any VNC connection you currently have.
1. Run sh stop (from your scripts location)
2. Reboot phone as a precaution.
One thing i did personally to make this easier was load the scripts onto /data/bt, so switching SDcards or locations doesnt matter.
(I also changed the terminal start directory to my scripts folder easy quick access)
=======================
Main Features I've gotten to work
=========================
-Clean mount/umount, as long as VNC and MySQL are killed BEFORE exiting the chroot - stop script kills these now
-Apps no longer disappear for good with sdcard removed, only disappear until SDcard is reinserted (apps2SD/loop device problem, any ideas?)
-MySQL for metasploit
-Metasploit working
-Armitage working, missing some "Attack" options (looking into it)
-Zenmap installed
-OpenVPN installed
-Traffic analysis possible with tcpdump (local only)
-Enables possibility for FakeAP attacks
-macchanger works (kinda, phone needs a reboot for original MAC to return)
-Armitage Launcher placed on Desktop (takes a while to load, be patient)
-Terminal Launchers in various places (updating may randomly remove your terminal, synaptic placed on desktop as standby to redownload terminals
-guake installed (drop down Terminal, makes commands easier to see while working) (not configured to a key yet)
This probably works with other Android phones too. If you change the scripts, and as long as it has a external SDcard you can partition.
if your using a different phone, this is untested unless specified otherwise.
-boot and shutdown scripts run clean as long as VNC and MySQL are shut off(in almost all cases)
@ XDA
http://forum.xda-developers.com/show....php?t=1152994
PASSWORDS
------------
MySQL - user: root pass: toor
VNC - User: root pass:toortoor
sys pass - user:root pass:toor
(I know, standard ones, but this should answer a few questions)
===============================
Thanks
===============================
anantshri - for the original scripts and BT5 img for android
BT dev team - (of course )
and all of you
===============================
Information, bugs, and oddities
===============================
One important thing, While performing heavy operations, its normal for your screen to not turn on for a while if it turns off. Dont panic, just give it some time to finish whatever you were running and your phone will be back to normal again. DO NOT PULL THE BATTERY UNLESS ABSOLUTELY NECESSARY.
To avoid this, get wakelock (known to cause problems) or set your screen timeout to some large number.
Swap file will help with alot of this.
These are the features I've tested out so far.
No major changes to anything, (except new packages) just configuring everything i see.
If you find anything you want added in or that is acting odd, please let me know. Same goes for if you fix something!!
Overall
-------
-Repo's activated, most things work (upstart processes fail, for now)
-startvnc and stopvnc no longer give that pesky USER error
-startvnc starts mysql database for metasploit
-stopvnc stops mysql (mostly, invoke ps -A and look for mysqld. Kill it with fire(-9) if need be)
-network traffic is capture-able with tcpdump, with wifi hotspot activated
-working on adding in a swap partition on sdcard (if possible)
-openoffice installed
-openVPN installed (the quieter you become...)
-Removed Zoho Web services
MySQL
-----
default user - root
default pass - toor
-Starts automatically with startvnc
-stops automatically with stopvnc
-start manually by invoking "mysqld"
-Only runs as root (for now)
-Console hangs when it is manually loaded or shutdown, service continues running though. killall --signal 9 mysqld if needed.
Metasploit
----------
-Loads up alright (45-90 seconds)
-MySQL already set as default DB
-Must manually connect to MySQL DB each instance of metasploit by invoking (from msf) db_connect root:[email protected]
-working on a possible way to limit cpu consumption to prevent system hangs(cpulimit does some nasty things)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
Armitage
--------
-Takes forever to load (30 seconds for connect screen, 4 minutes or so for main client)
-Causes system hangs frequently (to minimize this, leave the vnc server on your screen, and set the display timeout to 10 minutes-switch it back when done to conserve battery life)
-So far, this is the only connection string ive been able to get to work: root:[email protected]
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Zenmap
------
-Slows phone down (incredibly bad with more complex scans, of course)
-Some Complex scanning options can crash phone (Nothing damaging has happened)
-will attempt to throttle cpu usage in the future
-Can Crash phone if running too big of an operation (Max Phone memory problem, fixed in v.2 with swapfile added)
Aircrack-ng suite
-----------------
-Aircrack-ng works
-Airodump-ng doesnt work (needs monitor)
-Airdecap-ng untested
-Airdecloak-ng untested
-Airbase-ng doesnt work (needs monitor)
-Airmon-ng doesnt work (needs monitor)
-Aireplay-ng doesnt work (needs monitor)
-Airdriver-ng doesnt work (yet)
-Airolib-ng works (doesnt do anything yet)
-Airserv-ng doesnt work (needs monitor)
-Airtun-ng doesnt work(needs monitor)
Plus lots of stuff for the future, stay tuned!!
http://forum.xda-developers.com/show....php?t=1152994
In the future
=========
-nessus
-Booting via HD2 Toolbox by d4n14l (sp?)
-Custom kernel (WAYYYY down the road, but working on it)
and more
--Copyrighted by z3n, 2011
(just kidding, but it looks good )
Looks good will give it a go.
Thanks for sahring
I we could get our wifi card into monitor mode --> awesome!!!!
Thanks to z3nful & everyone made this possible!
Enjoy everyone
The next release is going to be faster, stabler, and more useful
I'm also working on a round-about way for packet injection and monitor mode
Stay tuned
Sent from my Hyperdroid Pocket Laptop
cool.. good job man..
Are you trying to patch the wifi drivers ? =D
Holy crap.....this is a dream in the making Bring on monitor mode and packet injection
I've done some researches.. and found out that many devs have tried making the driver to work on the Monitor mode.. but they failed to do that.
It looks to me that Backtrack on HD2 is kinda useless.
Not useless, just last night I ganked my roommates computer with my phone
As far as monitor mode and injection go, sadly, they may be right that its not possible, but I got some ideas that may make it work, I just need to hammer out some kinks in BT first
And who needs monitor when you can fakeAP?
"Make them hand you the keys and you don't have to break their Window(s)™"
Sent from my Hyperdroid Pocket Laptop
A m a z i n g
Next release is going to be even better this 5gig image is almost full, so I'm going to expand it to 6gig, along with instructions on how to expand your own image if that's to large or want even more space.
Btw, Wine should be good to go in the next one
stay tuned!!
Sent from my HD2 "Pocket Laptop"
I would love to see some Sceenshots (or better: a video) here!
Lol will do, gotta go find my 10 year old Polaroid I've been using this phone or all my pics and videos, so this could be tricky
Sent from my HD2 "Pocket Laptop"
good to see development beyond just starting up the image... I would be taking some pointers from here for my device too....
hope you don't mind that....
Not at all, I've been trying to track down your name again so it can add you to the credits part, as the basis of the scripts was yours lol, I just changed the loops and mounting structures around a bit, and added some stability checks.
The scripts for this image are slightly out of date but I got new ones going up once I have time they should fix a few of the small eerrors people get while mounting
My next version is a little ways out (works gotten crazy busy lately) but it'll be out eventually
Sent from my HD2 Pocket Laptop
Not Booting!
Hi Thank you for sharings this up!!! this is like a dream for alot of people.
i have followed all your steps but i have a problem when i run the scripts, the folders dont get created because when i run go i get a bounch of folder not found.
my SD card had some differences is a 16GB
with
Fat32
Ext-sd/ EXT2 -->1GB
EXT3 --> 100MB
EXT4 --> 6.5GB
could this setup causing the script to look on the wrong partitions? i have alot of time with out playing with Shell scripting but i would like to know if that is the place i should start looking for a fix
-edit- just double checked (forgot scripts were on my phone... its been a long week lol) and you should just need to change the mount -t ext4 /dev/block/vold/179:3 to /dev/block/vold/179:4
Also, did you run the new mkdirectory script? If you have the one packaged with the image its out of date. The attachment on the fist post has the updated ones
Ignore all mmcblk's
For another "buffer" partition, you need t point the sdcard parts (mmcblk0p* and vold/179:*) to what yours are in /dev/block. In your case I think you just need to change any vold/179:3 to 179:4. If you go to /dev/block/vold it will have folders from each partition (they are numbered 0 and up, but 1 would be your fat32, 2 is ext2 so on and so forth)
When I'm near my computer ill figure out the full ones for you
Sent from my HD2 Pocket Laptop
can I get it for Htc desire..??
It should work, as long as you have a big enough sdcard, your phomes kernel suppers ext4, and you might have to change a few small variables
Sent from my HD2 Pocket Laptop

(APP) Link2SD

Instead of moving all applications to SD card with app2sd, I want to move only selected applications.
Because I don't want to move my launcher, soft keyboard and dialer application to SD and make them unavaliable on boot if my SD card has problem or not inserted.
The idea behind is same, linking to SD card's second partition but differs in two ways.
One, instead of linking /data/app folder (that means moving all applications), you can select the applications that you want to move.
Two, it's an application which means has a user interface. You can manage your applications, create or remove links with just few clicks.
It also provides native apps2sd features on Android 2.2 and higher. Plus, it can move any non-protected user apps to SD card (force move), with batch moving capability.
That feature uses Android's standard SD-card installation feature and does not require a second partition. It can break some apps if they are not meant to be moved to the SD card (Such as Widgets).
Features:
- Create and remove link for apk, dex and lib files of the applications you select
- Automatically link newly installed apps
- Move any user apps to SD even though the app does not support moving to SD (for Android 2.2 and higher)
- Shows the apps that support moving to SD with native apps2sd (for Android 2.2 and higher)
- Set the default install location of the apps; auto, internal, or external (for Android 2.2 and higher)
- Batch link, unlink, reinstall, uninstall, "move to SD", "move to phone" functions (multi-select mode)
- Uninstall system applications
- Freeze and un-freeze system and users applications
- Convert system apps into user apps
- Convert user apps into system apps
- Integrate "Updated" system apps into system (ROM)
- Clear data and cache of the application
- Clear all apps cache at once (1-tap cache cleaner without being root)
- List applications, show detailed size information and link status
- Sort and filter applications
- Search applications by name
- Display available space information of internal storage, SD card and SD card 2nd partition
What you need for linking applications:
- root permission
- a second partition on your SD card. You should have two partitions on SD card and both should be primary
The first FAT partition is your standard SD card storage. The second partition is used for application files and can be ext2, ext3, ext4 or FAT32.
ext4 is the latest ext format but several ROMs have issues with it while fewer have issues with ext3 and ext2. FAT works on all ROMs.
I use free "MiniTool Partition Wizard Home Edition" (windows application) for this.
You can create the second partition without repartitioning, formatting or deleting your existing partition with this tool. Connect your SD card to PC with a card reader or phone itself and make it visible as a drive. Open Minitool select this drive and resize down FAT partition, you will see an unallocated area at the end of the card. Create ext2, ext3 or FAT32 partition in that area (create as primary, not logical), click apply. Unplug from the PC and reboot the phone. (To be on the safe side backup your SD card data before starting)[/LIST]- That's all. Just install Link2SD, it will do all necessary. No need to copy files or run scripts.*
* Some phones lack the ext2, ext3 or ext4 file system support and you may get mount errors like "no such device", "invalid argument". These phones need a matching ext2.ko or ext3.ko modules and even some additional modules to be able to mount.
Using FAT32 on the second partition will eleminate such problems, because FAT32 is supported on all phones.
How it works:
Link2SD mounts the second partition of your SD card as /data/sdext2 and makes OS mounts it at boot time.
When you select an application and press "Create Link" button you can select which files of the application will be linked and moved to SD card. Apk, dex and lib files can be moved and you can select all three or any two of three or even only one of them.
Depending on what you select, Link2SD moves apk file, dalvik-cache (.dex) file and lib files (.so) to SD card's second partition and creates symbolic links in original directories.
Note: On Android 1.6 and 2.1, shortcut and the widget of the app should be re-added to homescreen if you move the apk file.
Can I remove the links and put application files back to phone?
Yes, just click on application that is linked and press "Remove Link" button. You can select which files of the application will be unlinked and moved back to internal storage.
Then, Link2SD removes the symbolic links and moves the files you selected to original directories.
What happens if I uninstall or update a linked application?
If you uninstall a linked application apk, dex and lib files will be automatically deleted from the SD card by Link2SD.
If you update a linked application new apk, dex and lib files will be placed in the internal memory at first and then they will be automatically relinked by Link2SD in the background.
You don't have to manually relink after updating applications.
Note: Since the app is linked again, On Android 1.6 and 2.1, shortcut and the widget of the app should be re-added to homescreen if the apk file is linked
Some points
- System applications should not be linked to SD card. Link2SD does not allow these applications to be linked.
- When you connect your phone to PC as mass storage, Android unmounts FAT partition but the second partition remains mounted. Therefore linked applications are not affected and can be run without problems.
- Link2SD does not move application's private data directory; it moves apk, dex (dalvik-cache) and lib files
UPDATE:
2.1.2
- fixed crash if too many apps (400+) are installed on some devices
- improved app search (use "contains" instead of "start with" and higlight the matching characters)
- updated translations
2.1.1
- some fixes and tweaks
- added Croatian language
- updated translations
2.1
- added "relink all application files" feature to scan 2nd partition and relink all the files (can be used when changing or updating the ROM)
- added "relink dex files at boot" option
- changed multi-select UI
- added batch freeze/unfreeze
- added size info of /system and /cache partitions to "Storage info"
- fixed bug in converting system apps into user apps and vice versa
- added Persian language
- updated translations
- some fixes and UI tweaks
2.0.4
- fixed relink lib bug introduced in 2.0.3
- added Catalan and Macedonian translations
- updated some translations
2.0.3
- fixed force close at startup on some devices
- updated translations
2.0.2
- fixed bug in obtaining root access on some devices
- updated translations
2.0.1
- added the ability to convert system apps into user apps
- added the ability to convert user apps into system apps
- added "Updated" mark to show if the app has been install as an update to a system (built-in) app
- added "Updated" filter option
- added the ability to integrate "Updated" system apps into system
- fixed freeze/unfreeze bug on some ICS devices
- improved ICS compatibility
- optimized link/unlink/move operations and speed improvements
- some fixes and UI tweaks
1.9.13
- added an option to change language in application settings
- fixed bug in "Storage info" that displays incorrect values if the partition is >1GB on some devices
1.9.12
- changed a2sd checking
1.9.11
- fixed "Mount warning" issue on some devices that do not have operational init scripts to mount 2nd partition at boot, e.g. new Samsung Gingerbread roms
** if you have this problem run "Recreate mount scripts" from the menu after installing the new version of Link2SD
- added Basque translation
- some fixes and tweaks
1.9.10
- fixed some issues on Android 4.0 (Ice Cream Sandwich)
- added Greek and Slovenian translations
- updated some translations
- some minor fixes and tweaks
1.9.9
- fixed bug in recognizing the second partition on some devices
- updated some translations
1.9.8
- fixed bug in setting install location option
- updated some translations
1.9.7
- moved filter and sort functions from menu to title bar
- added an indicator icon which shows the apps that can be moved to SD with native apps2sd (a small icon in upper right corner, for Android 2.2 and higher)
- added "Movable" filter option which lists the apps that support moving to SD with native apps2sd (for Android 2.2 and higher)
- added "Clear data" to clear user data from the app
- added "Clear cache" to clear the app cache
- added "Cache size" sort option
- added ability to clear cache on all apps at once
- added "View in Market" for applications
- added an option to turn "auto link notification" off
- added Dutch, Serbian, Indonesian, Vietnamese translation
- fixed bug in recognizing the 2nd partition on some devices
- updated some translations
- some minor fixes and tweaks
1.9.6
- added Japanese, Chinese Simplified, French, Arabic, Bulgarian, Czech translation
- updated some translations
- added "Translation Credits" to the About page
1.9.5
- fixed freeze/unfreeze bug on some devices
- added Chinese Traditional, German, Hungarian, Italian, Polish, Portuguese, Portuguese Brazilian, Russian, Slovak, Spanish, Thai, Ukrainian translation
- added an option to use English language instead of system language
1.9.4
- added ability to freeze and unfreeze the user and system applications
- added "Frozen" filter option
- added ability to search applications by name, activated from the menu or search button
- some minor fixes and tweaks
1.9.3
- added "Recreate mount scripts" menu to recreate mount scripts manually when you change fs type or rom
- fixed bugs in "Quick reboot" and setting "Install location" on some devices
- some minor fixes and tweaks
1.9.2:
- added "Dex size" and "Total size" sort options
- some bugfixes
1.9.1:
- fixed FC on some devices
1.9.0:
- added native apps2sd function with batch capability (for Android 2.2 and higher)
** moves any user apps to SD even though the app does not support moving to SD
- added option to set the default install location of the apps; auto, internal, or external (for Android 2.2 and higher)
- added workaround for Roms that do not have install-recovery.sh and init.d scripts to mount 2nd partition at boot, e.g. new Samsung GB roms
** mounts after system finishes booting and you need to perform 'Quick reboot'
- new and safer 'Quick reboot' method
- added context menu to app list (activated on a long press)
- added option for automatic relinking of library files at boot
- added "on SD card" and "on internal" filter options
- added applications count to the title
- some UI changes
1.8.0
- changed the method for determining external storage to support devices that have more than one external storage (MMC and SD)
- added ability to uninstall system applications
- added batch (multi-select) reinstalling
- added batch (multi-select) uninstalling
- added "Relink library files" menu which relinks all the lib files that get unlinked after reboot
- removed "Market Fix" menu
- added "fast scroll thumb" option to quickly scroll through the app list
- added "Data size" to sort options
- some bugfixes
1.7.0
- added batch linking and unlinking (multi-select mode)
- some bugfixes
1.6.2
- fixed force close on application startup on some devices
1.6.1
- added horizontal screen orientation support
- added "Link dalvik-cache files" menu back
- improved loading and scrolling performance of the app list
- added cache size to app list
- fixed "Storage Info" bug on Android 2.3
- better CM7 support
Known issue:
* library files get unlinked after reboot on Android 2.3 and sometimes on 2.1 and 2.2. (PackageManager unpacks all native libraries from the apk files at boot)
1.6.0
- added option to link library (.so) files along with apk and dex files
- added automatic linking option for the new installed apps
- added ability to link/unlink apk, dex and lib files separately
- added '->' linked indicator to Apk, Dex and Lib labels
- added lib file size and link status information
- added lib size to sort options
- some bugfixes
1.5.5
- changed link creation, reboot is not required on Android 1.6 and 2.1 anymore
1.5.4
- added notification to status bar for automatic re-linking after app update
- added "reboot required" notification to status bar after linking app on Android 1.6 and 2.1
- some bugfixes
1.5.3
- changed menu name from "Quick Restart" to "Quick Reboot"
1.5.2
- added "Quick Restart" menu, cuts boot time
- added "Clean up the dalvik-cache" menu
- added "Clean up the 2nd partition" menu
- added ability to link updated system apps (that are located in /data/app)
- optimized refreshing of the app list after linking
- changed App2sd checking
- added support in detecting and mounting the second partition for some roms
- some bugfixes
1.5.1
- fixed background message
1.5.0
- added ext3, ext4 and FAT32 support for the second partition of SD card
- added refresh menu
- added "Not Linked" filter option
- changed App2sd checking
- added support in linking protected (/data/app-private) apps
- added support in detecting and mounting the second partition for some roms
- some bugfixes
1.4.2
- disabled automatic Market status fix after linking
1.4.1
- added option to link dalvik-cache (.dex) files along with apk files
- added automatic re-linking after app upgrade
- added automatic deleting from SD card after app uninstall
- added "Reinstall" button
- added "Link dalvik-cache files" menu which links dex files of all existing linked applications all at once
- added automatic Market status fix after linking
- better froyo support
- added dex file size and link status information
1.3.1
- added support in detecting and mounting ext2 partition for some roms
- some minor bugfixes
1.3.0
- added uninstall feature which deletes apk file also from ext2 for linked apps
- added launch and manage buttons
- added detailed size information of applications
- added support in detecting and mounting ext2 partition for some roms
- some minor bugfixes
1.2.1
- added info message to show which applications have been repaired after "Market Fix"
1.2.0
- added "Market Fix" feature to repair missing Market applications
- added support in detecting and mounting ext2 partition for some roms
- removed "ext2 found" info message at startup
- some minor bugfixes
1.0.5
- added support for some roms which install-recovery.sh is not operational
- added ext2.ko module installation on boot (if exists) for Motorola phones
1.0.4
- changed mount method at startup to be much safer
- some minor bugfixes
1.0.3
- initial release:good:
awesome app..very useful..!
what? are u the developer of link2sd? "BULENT AKPINAR" ??
this one https://play.google.com/store/apps/...?t=W251bGwsMSwxLDEsImNvbS5idWFrLkxpbmsyU0QiXQ.. ???
Never ever. Have you already looked at this?
http://forum.xda-developers.com/showthread.php?t=919326
Gesendet von meinem MT11i mit Tapatalk 2
motorazrv3 said:
Never ever. Have you already looked at this?
http://forum.xda-developers.com/showthread.php?t=919326
Gesendet von meinem MT11i mit Tapatalk 2
Click to expand...
Click to collapse
just another copycat . . what a shame! :/
eewwww i have been usin this app since ages with fat32 partition on my card..!!
Now who is this :|
Sent from my MT15i using xda app-developers app
Which is the best extension to use for an AOSP ROM? was using Sony stock ROM with ext4, now shifted to an AOSP ROM, and the partition doesnt seem to work
Abhilesh7 said:
Which is the best extension to use for an AOSP ROM? was using Sony stock ROM with ext4, now shifted to an AOSP ROM, and the partition doesnt seem to work
Click to expand...
Click to collapse
fat32 is usually supported by almost all roms .
I have a problem when the SD card is partitioned with more that one partition and if is enabled the MSC transfer mode (mass storage mode):
The latest files (e.g. camera pictures) and/or folders are not displayed on PC
This behavior is not visible when the MTP transfer mode is used for connectivity. I'm using the MSC mode for systems compatibilities (Windows / Linux / MAC OS) and my phone.
I tested with three cards (Silicon power, Kingmax and a non name one).
My phone is: MT15i, Android 4.0.4, firmware 4.1.B.0.587, kernel 2.6.32.9-pref
I partitioned:
- first partition - primary partition with fat32 format; (partition size = SD size - 1,5 GB for second partion)
- second partition - primary partition with ext2 (only this format is recognized by my kernel) also I tried and fat32, but I have same problem (maximum 1,5 GB)
I made partitions using:
- GParted - from a live CD and from an Ubuntu 12.04;
- MiniTool Partition Wizard Home Edition 7.6.1 - from my Windows 7 PC;
- DiskUtility from a MAC OS.
The results are the same: the latest files or folders from SD card don't appear on the PC.
Scenario:
1. open the phone;
2. take one picture: DSC_0001.jpg;
3. connect to PC, DSC_0001.jpg is visible on the attached card;
4. disconnect the phone from PC;
5. take another picture DSC_0002.jpg;
6. connect again the phone to PC, only DSC_0001.jpg is visible.
7. reboot the phone (shutdown then power on);
8. connect the phone to the PC: DSC_0001.jpg and DSC_0002.jpg are both visible.
9. take a third picture DSC_0003.jpg;
10. connect the phone to the PC, only first two images are vizible (DSC_0001.jpg and DSC_0002.jpg)
...
After each reboot all files / folders are showed correctly when the phone is connected for the first time.
All this time, the files are stored and displayed correctly on the phone using a file explorer or an album program.
Also, if I'm reading the SD card using an external card reader, all files and folders appear ok.
Anyone have any idea what could be wrong in my case?
What else informations could be helpful?
I attached some files from my phone (/ and /etc/)
Thank you for your time!
Later edit
A possible fix is to install a custom or an original rom. Actually this fixed my issue until I installed again Link2SD with partition mount script.
I installed: [ROM]=- Xperia Ultimate HD™ 2.0.3 -= [ Stable like a Rock ] & [ Best User Interface ] after that I was able to attach my phone using MSC mode multiple times and I can access latest files / folders.
ciubexx said:
I have a problem when the SD card is partitioned with more that one partition and if is enabled the MSC transfer mode (mass storage mode):
The latest files (e.g. camera pictures) and/or folders are not displayed on PC
This behavior is not visible when the MTP transfer mode is used for connectivity. I'm using the MSC mode for systems compatibilities (Windows / Linux / MAC OS) and my phone.
I tested with three cards (Silicon power, Kingmax and a non name one).
My phone is: MT15i, Android 4.0.4, firmware 4.1.B.0.587, kernel 2.6.32.9-pref
I partitioned:
- first partition - primary partition with fat32 format; (partition size = SD size - 1,5 GB for second partion)
- second partition - primary partition with ext2 (only this format is recognized by my kernel) also I tried and fat32, but I have same problem (maximum 1,5 GB)
I made partitions using:
- GParted - from a live CD and from an Ubuntu 12.04;
- MiniTool Partition Wizard Home Edition 7.6.1 - from my Windows 7 PC;
- DiskUtility from a MAC OS.
The results are the same: the latest files or folders from SD card don't appear on the PC.
Scenario:
1. open the phone;
2. take one picture: DSC_0001.jpg;
3. connect to PC, DSC_0001.jpg is visible on the attached card;
4. disconnect the phone from PC;
5. take another picture DSC_0002.jpg;
6. connect again the phone to PC, only DSC_0001.jpg is visible.
7. reboot the phone (shutdown then power on);
8. connect the phone to the PC: DSC_0001.jpg and DSC_0002.jpg are both visible.
9. take a third picture DSC_0003.jpg;
10. connect the phone to the PC, only first two images are vizible (DSC_0001.jpg and DSC_0002.jpg)
...
After each reboot all files / folders are showed correctly when the phone is connected for the first time.
All this time, the files are stored and displayed correctly on the phone using a file explorer or an album program.
Also, if I'm reading the SD card using an external card reader, all files and folders appear ok.
Anyone have any idea what could be wrong in my case?
What else informations could be helpful?
I attached some files from my phone (/ and /etc/)
Thank you for your time!
Click to expand...
Click to collapse
open your link2sd, on 1st time it will ask you to choose mount script which kind of partition you use
after that reboot your phone.. open link2sd if it show same dialogue like 1st time open link2sd reboot go to cwm and mount your sd-ext
hmm... did you link your galery?? if yes unlink it
sorry my bad english
motorazrv3 said:
Never ever. Have you already looked at this?
http://forum.xda-developers.com/showthread.php?t=919326
Gesendet von meinem MT11i mit Tapatalk 2
Click to expand...
Click to collapse
which file system(Fat 32,ext2 etc) should be proper to use with MT11i
Thank you for your answer.
Actually my problems is visible only when I attach my phone second time to PC, after a restart.
Opening the Link2SD I'm not asked to enable the mount script, because this script is already installed and running ok, I guess, because the second partition (/data/sdext2) appear on Link2SD -> Storage Info (see attached image).
Also I'm able to navigate through that linked folder (/data/sdext2/)
The behavior is like first time when I connect my phone to the PC, on the phone is created a 'cache' from where, on second / third / ... time are provided same informations (files and folders are same like on first connection).
I'm suspecting one of scripts: init.semc.rc or init.usbmode.sh (these files are recreated at start up / booting)
I'm not sure if I'm right.
Answering to aakash43
Try for first time to create two partitions with following formats:
- first partition: fat32
- second partition: ext2
More informations you can found here on the official page: Link2SD - Description - What you need for linking applications. ( link2sd.info/description)
If second partition is not mounted try to format to fat32. It is indicated to use a unix file format (ext4, ext3 or ext2) but depends by your phone kernel. In my case the phone (Neo - MT15i with latest firmware) was not able to recognize ext4 or ext3 format.
I want to know that Creating second partition in sd card will delete the data present in sdcard.
Answering to aakash43
Depends what program you use to make partitions.
For example I used, on Windows, the MiniTool Partition Wizard Home Edition 7.6.1
I resized first partition and I added on the remaining space a second partition. I did not lost any file from first partition, but to be sure copy all files to PC, be careful to get hidden files and folders also.
But for a safe partitioning process, back-up all files and folders (including hidden files and folders) to PC first.
And delete all existing partitions and recreate new partitions. Remember, all partitions should be primary and visible.
ciubexx said:
Answering to aakash43
Depends what program you use to make partitions.
For example I used, on Windows, the MiniTool Partition Wizard Home Edition 7.6.1
I resized first partition and I added on the remaining space a second partition. I did not lost any file from first partition, but to be sure copy all files to PC, be careful to get hidden files and folders also.
But for a safe partitioning process, back-up all files and folders (including hidden files and folders) to PC first.
And delete all existing partitions and recreate new partitions. Remember, all partitions should be primary and visible.
Click to expand...
Click to collapse
Great info! :good:
workaround for my MSC issue
I figured it out a workaround in my case, for the issue detailed on previous page at post #9.
It is important to have your phone rooted!
I flashed with a clean firmware (4.1.B.0.587) my phone (MT15i), I rooted my phone and I placed a customized rom: [ROM]=- Xperia Ultimate HD™ 2.0.3 -= [ Stable like a Rock ] & [ Best User Interface ]
I opened the phone and I let it to install and configure all applications.
I rebooted twice to be sure all configurations are made properly.
I turned off my phone, I removed the SD card and I partitioned the card using my laptop card reader.
I partitioned using the MiniTool Partition Wizard Home Edition 7.6.1 on mine Windows 7 machine:
1. I deleted all partitions from my card (previously I had some partitions);
2. I created at the end of the card one primary partition with ext2 file system format; (previously I tested others formats ext3 and ext4, but seems to not be recognized these formats)
3. on the remaining space I created another primary partition with FAT32 file system format.
Like on below image:
I placed formated card into the phone and I turned on.
I modified the file: /system/etc/vold.fstab
I replaced:
Code:
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
with:
Code:
dev_mount sdcard /mnt/sdcard 1 /devices/platform/msm_sdcc.4/mmc_host/mmc1
Format is:
Code:
Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
To found that solution I made some tests after each modification on /system/etc/vold.fstab I rebooted my phone. And I checked to see if the /mnt/sdcard is mounted properly.
I modified the file on PC and after each time I pushed modified file to the phone:
Code:
adb push vold.fstab /system/etc/vold.fstab
(you should have the terminal on the current folder where is your modified file)
Then, with my phone connected to PC I tried to mount the second partition to /data/sdext2/ folder.
Open a terminal and add below commands:
Code:
>adb shell
$su -
Your terminal should look like (this is in Windows):
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\ciubex>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ $ su -
su -
[email protected]:/ #
This folder was not on my phone, so I created: #mkdir /data/sdext2/
On PC terminal I tried to mount the partition using the command:
Code:
mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sdext2
After each mount attempt you can check if the partition is mounted by using df command, the terminal should show like:
Code:
[email protected]:/ $ df
df
Filesystem Size Used Free Blksize
/dev 169.9M 76.0K 169.9M 4096
/mnt/asec 169.9M 0.0K 169.9M 4096
/mnt/obb 169.9M 0.0K 169.9M 4096
/system 312.5M 310.7M 1.8M 4096
/data 380.0M 140.0M 240.0M 4096
/cache 101.5M 1.3M 100.2M 4096
/system/vendor 133.5M 92.1M 41.4M 4096
[b]/data/sdext2 1.4G 82.6M 1.3G 1024[/b]
[email protected]:/ $
If your second partition is mounted properly, you can proceed to install Link2SD.
I installed Link2SD, I let the software to generate mount script /system/etc/install-recovery.sh.
I don't rebooted, but I modified generated file by removing the line:
Code:
I let only the mounting:
Code:
mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sdext2 1>>$LOG 2>>$LOG
Be careful to have an empty last line.
To exit from terminal, use commad: exit
After that I rebooted my phone.
Now I do not have any more problems with my latest created files or folders on the phone, when I connect the phone to PC using MSC protocol.
I attached an archive with modified files (vold.fstab and install-recovery.sh).
i used cwm recovery of lupus kernel and it partitioned my mc into fat32,ext3 n its running flawlessly
when I try to create partition using mini tool partition wizard the unlocated space does not increase above 304 MB plz help
Steps to make partitions
I really don't know what's wrong in your case, is your card empty? It is your card full and remaining empty space is 304MB?
But let suppose you have inserted a formatted card into a card reader with a single partition and want to have two partitions.
Method 1:
resize existing partition and create a second one:
- right click on partition
- select 'Move/Resize'
- click on right side of the partition image from 'Size And Location'
- move the border on left side to desired partition size
- click on 'Ok'
- now on the disks images should appear resized partition and an unallocated space at the end of the card
- right click on the Unallocated space
- select 'Create'
- on the Warning message press 'Yes' (Warning message: The new created partition cannot be used in WIndows....)
- on the 'Create New Partition' dialog window chose:
--- Create As: Primary
--- File System: Ext2
--- Press 'OK' button
- Now, your card is ready for modifications: Press Apply.
Method 2:
in that case the entire card is erased and partition(s) is (are) deleted firstly and created from beginning
- right click on partition or on each partition from card and select 'Delete'
- when entire card appear as Unallocated
- let create second partition at the end
- right click on Unallocated space and select 'Create'
- resize the partition image from 'Size And Location' by clicking on the left side and moving the left border to the right until the new partition have desired size
- select:
--- Create As: Primary
--- File System: Ext2
--- Press 'OK'
- now will create first partition
- right click on the Unallocated space
- select 'Create'
- on the Warning message press 'Yes' (Warning message: The new created partition cannot be used in WIndows....)
- on the 'Create New Partition' dialog window chose:
--- Create As: Primary
--- File System: FAT32
--- Press 'OK' button
- Now, your card is ready for modifications: Press Apply.
That's all.
This is the one I used ^^
I created a ext3 partition on the sd card, I selected what I want to moved or not.
And now, all new apps are installed on the sd card automatically.
Works great , thanks.

Fix for empty app-mounted directories (CifsManager, etc.) in Android 5.0?

Android 5.0 Lollipop breaks apps that mount file systems to be shared with other apps. This includes CifsManager, Mount Manager, essentially anything that mounts cifs shares, FUSE file sytems, etc. The symptom is that the mounted contents appear fine to app that peforms the mount operation (assuming the app itself provides the ability to browse the contents), but every other app only sees an empty directory at the mount point.
Will a fix be possible for Lollipop as it was for Android 4.2?
Fix as pointed out by user glimmling.
Firstly, ensure you have the ElementalX kernel flashed onto your nexus 5.
glimmling said:
Cifs is definitily working on lollipop with my old Nexus 7. I use a patched kernel to make the mounts visible for all apps: http://forum.xda-developers.com/showpost.php?p=36908034&postcount=1
If your kernel doesn't have the patches, there is a second workaround with the SuperSU mount-master option: http://su.chainfire.eu/#how-mount
Important! Both approaches needs the SE Linux mode to be "permissive" to see the files in the mounts.
This example should work:
Code:
su
setenforce Permissive
su --mount-master -c busybox mount -o username=guest,rw,noperm,iocharset=utf8 -t cifs //192.168.178.23/cifsshare /data/media/0/mounts/cifsshare
Click to expand...
Click to collapse
If you can't be buggered typing out lengthy line 3 every time you mount you can use the patched version of Cifsmanager.v1.5a which uses prefixed mount command (su --mount-master -c) however it requires SuperSU and you still need SE Linux mode to be "permissive" to see the files in the mounts. So you can either do that manually in terminal:
Code:
su
setenforce Permissive
or download SELinux Mode Changer to switch for you (note: it's a bit buggy on switching)
After unmounting the share you should go back to Enforcing mode.
Code:
su
setenforce Enforcing
or just use SELinux Mode Changer to change back.
What is the difference between the SE for Android status: Enforcing, Permissive and Disabled?
Enforcing — SE for Android is enforcing the loaded policy. Your device is actively protected from security threats and malicious apps will be denied access.
Permissive — The SE for Android policy file is loaded, but your device is not enforcing it. If a malicious app tries to access a resource that it is not allowed to, the access will be logged but not prevented. This mode is intended for testing and debugging. It generates log files of denied app and allows Samsung to identify new app threats and update its policy files.
Disabled — The SE for Android infrastructure is not enabled, and there is no policy file loaded. Log files are not generated and your system is vulnerable to security threats.
Click to expand...
Click to collapse
bseos said:
If you can't be buggered typing out lengthy line 3 every time you mount you can use the patched version of Cifsmanager.v1.5a which uses prefixed mount command (su --mount-master -c) however it requires SuperSU and you still need SE Linux mode to be "permissive" to see the files in the mounts.
Click to expand...
Click to collapse
If you want to leave SELinux enabled, you can use that patched version of Cifsmanager above and and label the directory in the Options,
Code:
context=u:object_r:rootfs:s0
The full options string i use
Code:
vers=2.1,domain=MYDOMAIN,rw,file_mode=0777,dir_mode=0777,context=u:object_r:rootfs:s0
This works for my Nexus 6, 5.0 & 5.1.
Note: the version 2.1, isn't always enabled in the kernel so you might have to remove vers=2.1.

Categories

Resources