Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
max_warheads
Old
(Last edited by max_warheads; 7th October 2010 at 02:02 PM.) Reason: busybox, chmod, factory stock chown, terminal, links for apps. typos
#1  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
Arrow [How To] Enable Non-Market apps on Captivate (consolidated)

(additional CHOWN notes added below. If you are getting "chown: unknown user/group system:system" read them!
Ok, we do have a WHOLE other thread that was made a sticky already, but you need to read the WHOLE thing to get all the properly interesting parts. I'll make sure I keep this OP up to date.

The following methods enable side loading and installing of apps onto the captivate, without the need of a program on a computer attached via the SDK. There are multiple methods, and for the most part, these methods that have worked flawlessly for many users here on this forum. We're just collecting them all in one post for speed and clarity.

Methods that assist in loading applications, without modification to the settings (a.k.a still need a computer attached) can be found at the collective wiki, http://samsungcaptivate.wikia.com/wiki/How_to_Sideload

ALL METHODS REQUIRE ROOT & BUSYBOX:
Root your phone, see http://forum.xda-developers.com/showthread.php?t=725555
Busybox : http://www.appbrain.com/app/stericson.busybox

Please, save a clean, un-altered backup copy of this file. To be safe. Rarely does corruption occur, but if it does, it won't be good.

Method 1: From Win7x64, Samsung Drivers, Android SDK installed.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the command prompt. You will need to know where you installed your SDK, and the tools directory therein.

Once rooted, go install BusyBox installer from the App Market/AppBrain etc and run it. It will download and install the latest version for you.

From my Win7x64, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.

Connect to PC, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.

open command prompt, follow along:
Code:
> c:
> cd \android\tools
> adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the pc,
"USB Connected select to... ", Mount
mine mounted as H:
Code:
> copy H:\settings.db settings.db

> sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit

> copy settings.db H:\settings.db
Eject the drive, safely remove, etc.

"Turn off USB storage" etc, to mount it back to the phone
Code:
> adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit

> adb reboot
Bam. Done.

Method 2: with Root Explorer
(courtesy of kirbo20)
This is a pretty easy process. I went in to Root Explorer - dbdata - databases - com.android.providers.settings, copied settings.db to my sd card, edited it on my pc with a db editor changed 0 to a 1 next to non market apps. Copied it back to the original directory, rebooted and installed a non market app.

(added by gotfolk)
again using FF plug in..

Click Secure on the left pane

click on install_non_market_apps

click edit

number 3 states value click there and type in 1. hit ok
(/gotfolk)

Please use caution. If you want to make sure the db save properly open it on your sd card before you copy and replace the original. It should open up as a readable table. If it opens up in a txt editor its corrupt. This permanently enables non market apps. You can not toggle it on and off.

( This is a sqlite3 database file, you can find many GUI editors that will be able to handle the editing, including a FF plugin. Search "SQLite" )

Method 3: with Root Explorer & Sqlite Editor & Terminal Emulator
(courtesy of ice3186)

- Open Root Explorer
- Browse to /dbdata/databases/com.android.providers.settings/
- copy settings.db to the root of your sd card ( /sdcard/ )
- Click on the newly copied settings.db in /sdcard/, with SQLite Editor installed, you can open and edit it here.
- Select the "secure" table, and update the value of 'install_nonmarket_apps' from 0 to 1, and save.
- close out of SQLite editor
- copy the modified file ( /sdcard/settings.db ), and browse back to /dbdata/databases/com.android.providers.settings/ and paste
- confirm the overwrite if asked and then open again to confirm it's been changed.
- open Terminal Emulator
Code:
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# reboot
- reboot phone.

No PC, no Mac, no drivers, no SDK. Viola.

Method 4: Mac & Android SDK
You will see "[sdcard]" through this method...I don't own a Mac so I'm guessing a bit.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the Terminal. You will need to know where you installed your SDK, and the tools directory therein.

Once rooted, go install BusyBox installer from the App Market/AppDroid etc and run it. It will download and install the latest version for you.

From a Max OS X, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.

Connect to Mac, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.

open Terminal, follow along:
Code:
> cd /android/tools
> ./adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the Mac,
"USB Connected select to... ", Mount
mine mounted as [sdcard]
Code:
> cp [sdcard]/settings.db settings.db

> ./sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit

> cp settings.db [sdcard]/settings.db
Eject the drive, safely remove, etc.

"Turn off USB storage" etc, to mount it back to the phone
Code:
> ./adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit

> ./adb reboot
Method 5: Android SDK only
Of course, this also requires root and BusyBox.

From the android sdk tools folder in a command prompt:
note: all linux/mac should use './adb' in place of just 'adb', and place quotes on the echo statement between echo and |
Code:
adb shell
su
chmod 666 /dbdata/databases/com.android.providers.settings/settings.db
exit
exit

adb pull /dbdata/databases/com.android.providers.settings/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /dbdata/databases/com.android.providers.settings/settings.db

adb shell
su
chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
chown system.system /dbdata/databases/com.android.providers.settings/settings.db
reboot
NOTICE
You must chown the settings.db file and reboot once it is back in its original location. If you do not, you will not be able to alter settings such as WiFi,GPS, default Ringtones, etc. It's also highly likely that you may wish to chmod to 660 (-rw-rw---), so I've tacked that in here and above.

Code:
> adb shell
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit

> adb reboot
Chown Note
In the event that you are getting "chown: unknown user/group system:system" please try 1000.1000 as this has been reported to work on several of the samfirmware-released roms that fail with this message.

Absolutely do not use someone else's settings.db unless you specifially make it a point replace android_id with your android_id!

Special Note
Any of these adb comments can be run from Terminal Emulator (Android Terminal Emulator, free) from the su command. I use the ADB here as it is a lot easier to type into. Terminal Emulator will provide you with a shell that is an exact match of the 'adb shell' command, as they both simply provide the shell to you.

Result:
After completing this process you will be able to load non-market apps directly from the APK files, SDK tools, tools such as DroidExplorer and apps such as APKtor.

You will be able to download the APKs directly, and then install from your favorite file browser (e.g. MyFiles(s), Astro(f), RootExplorer($)...)

Tools
SQLite Administrator (Win, GUI, no FF required) http://sqliteadmin.orbmu2k.de/
SQLite Manager (FF addon, search for it)

Application links
Root Explorer http://www.appbrain.com/app/com.spee...e.rootexplorer
SQLite Editor http://www.appbrain.com/app/com.speedsoftware.sqleditor
Terminal Emulator http://www.appbrain.com/app/jackpal.androidterm
BusyBox http://www.appbrain.com/app/stericson.busybox
The Following 3 Users Say Thank You to max_warheads For This Useful Post: [ Click to Expand ]
 
max_warheads
Old
#2  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
bump.. settings.db people.. please read the threads!!
Samsung Galaxy S ( Captivate )
Stock JH7, Rooted & VooDoo'd (1755)

Liked it enough to turn around and buy one for the gf! (shes enthralled by it)

 
SiL3nTKiLL
Old
#3  
Senior Member
Thanks Meter 65
Posts: 1,930
Join Date: Jun 2006
good stuff!!!
Phones:
1. Galaxy S2 Skyrocket
2. iPhone 4S
Tabs:
Apple iPad 2
Galaxy Tab 10.1

 
Smallsmx3
Old
#4  
Senior Member
Thanks Meter 149
Posts: 1,610
Join Date: Jul 2010
Ok. I can find settings.db with root explorer. i can copy it and i put it in my sdcard folder but nothing is there when i try to find it on my computer. Im trying to use SQlite editor on firefox. Im also on a powermac g4 if that makes a difference. I did download sqlite editor on my phone and I can find where to change the values for installing non market apps but when I change from a zero to a one it denies me. Please help
 
max_warheads
Old
#5  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
Ok, so let me make sure I have your process:

- Rooted
- Installed busybox ?
- Installed Root Explorer
- copied settings.db to /sdcard
-- cant see the file when mounted to Mac, thus can't edit with FF plugin
-- SQLite editor for android wont allow access..
(is this the SQLite Editor you used? http://www.appbrain.com/app/com.speedsoftware.sqleditor)

Try installing "Android Terminal Emulator" from the market (http://www.appbrain.com/app/jackpal.androidterm)
- open Terminal Emulator
$ su
# cd /sdcard
# chmod 777 settings.db
# exit
- Open the sqlite editor, and make the change
- back to Terminal Emulator
$ su
# chmod 660 settings.db
- proceed with rest of instructions.
Samsung Galaxy S ( Captivate )
Stock JH7, Rooted & VooDoo'd (1755)

Liked it enough to turn around and buy one for the gf! (shes enthralled by it)

 
designgears
Old
#6  
designgears's Avatar
Recognized Developer
Thanks Meter 4950
Posts: 3,949
Join Date: Feb 2010
Location: SLC
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
 
max_warheads
Old
#7  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
Quote:
Originally Posted by designgears View Post
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
Please read my initial post, first few lines. I explained why, specifically: Consolidation.
Samsung Galaxy S ( Captivate )
Stock JH7, Rooted & VooDoo'd (1755)

Liked it enough to turn around and buy one for the gf! (shes enthralled by it)

 
Smallsmx3
Old
#8  
Senior Member
Thanks Meter 149
Posts: 1,610
Join Date: Jul 2010
Thanks I will give it a try later today.

Sent from my SAMSUNG-SGH-I897 using XDA App
 
max_warheads
Old
(Last edited by max_warheads; 29th July 2010 at 07:07 PM.)
#9  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
- OP updated to reflect stock ownership settings for 'chown'

Also, which sqlite app are you using? I'll put that up as method 3 if it works out nicely for you.
Samsung Galaxy S ( Captivate )
Stock JH7, Rooted & VooDoo'd (1755)

Liked it enough to turn around and buy one for the gf! (shes enthralled by it)

 
max_warheads
Old
#10  
Senior Member - OP
Thanks Meter 4
Posts: 287
Join Date: Jul 2010
Location: Lancaster
fixed a typo in the chown command.. bad copy paste.. bad.. doh.
Samsung Galaxy S ( Captivate )
Stock JH7, Rooted & VooDoo'd (1755)

Liked it enough to turn around and buy one for the gf! (shes enthralled by it)


 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Gear Up Because it’s Time to Save Earth

*Cue Dramatic Music*Put on your red and blue latex overalls and cape because it’s time to … more

Recognized Contributor Code of Conduct

During the first half of 2012, XDA initiated the Recognized Contributor (RC) program to recognize … more

Careers in Android: What Hiring Managers Won’t Tell You – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more