Related
(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.speedsoftware.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
bump.. settings.db people.. please read the threads!!
good stuff!!!
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
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.
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
designgears said:
how many more threads do we need on the same thing? We already have ALL of this info posted, several times.
Click to expand...
Click to collapse
Please read my initial post, first few lines. I explained why, specifically: Consolidation.
Thanks I will give it a try later today.
Sent from my SAMSUNG-SGH-I897 using XDA App
- 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.
fixed a typo in the chown command.. bad copy paste.. bad.. doh.
added method 3 courtest of ice3186
added links to Root Explorer ($), SQLite Editor ($) and Android Terminal Emulator (free) and added the chmod/chown commands to method 3, as they were skipped by accident.
bump** for newcomers, sry.
thanks max for adding the third method. this was by far much easier than the first two methods. I have a hard time getting my mac to talk to my phone sometimes and it was good to not have to plug the lil guy in at all. Worked like a charm
myself and ice3186 are glad we could be of help
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
mkslt4 said:
If I had accidentally deleted the settings.db how should I go about recovering my phone? Now I have the issue that my phone won't boot past the boot animation and I'm notbsure what to do
Click to expand...
Click to collapse
Did you make any kind of backup before hand?
You may have to use someone else's settings.db and then do a factory reset.
Depending on how much you've done with the phone I'd suggest deciding on doing a the reboot process for rooting, but choosing to clear data. This may rebuild it, I am not sure.
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
xetrev said:
my dbdata directory is empty.. My phone is less then 2 hours old and i have some market apps installed..
Click to expand...
Click to collapse
Oh, if it's running, then this folder isn't actually empty.
What are you using to browse this folder?
i followed this guide to a T yesterday when i did this. I used option 1, ADB commands on terminal since i'm a mac and it was super easy, did it in about 5 minutes.
this is just my opinion but i think everyone should try playing with the ADB commands, they're actually really useful and educational to know. and if you should brick your phone, just use clockwork recovery to restore it.
that being said, maybe you should add a disclaimer that when done on a mac, the adb commands require a "./" in front (so adb reboot becomes ./adb reboot). cp, chown, and chmod commands don't need it though (or at least i didn't).
See my previous post before in post#2
This is a simple batch file using ADB..
With this you can use ADB to manage your file or APK , Backup, Push Your File to device, or pull file from device..
ADB Work on Stand by Mode (Home Screen) or in Recovery Mode, just set it up..
Extract ADBTOOLSv1.0.1.zip and you will find :
command.bat : Windows Batch Command
_BACKUP_OUT : folder where your backup process done and made
_FLASHING_OUT:
folder for flashing your :
kernel (place your boot.img here)
recovery (place your recovery.img here),
modem (place your modem.bin here)--only for gt p7300
_MODDING_FILE: Folder where your file were created by PULL process
Folder where file for PUSH process should be here
_BATCH_INSTALL : place your APK here for batch install
tools: ADB.exe and busybox binary
success_APK : A folder created for All apk from _BATCH_INSTALL move here after instalation.
Click to expand...
Click to collapse
Notes:
ADB can access all file from device from CWM Recovery, especially CWMR 5.5.0.4
ALL you need to do is:
From Recovery menu, you need to mount /data and /system for ADB working..
THEN, From Command Prompt set ADB Mode to "recovery".(This Batch File set ADB mode to "Home Screen" by default)
So when you use ADB from Online device ( I mean a stand by device).. you dont need to change ADB Mode..
After you set up, you can use ADB as you like..
Code:
=============================================================================
:::: ADB TOOLS FOR GT P7300 and P7310 by suwandiapr
-----------------------------------------------------------------------------
| [*] Before use read this:
| --make sure you have installed adb drivers for your device
| --enable "USB DEBUGGING"
| from (Menu\Settings\Applications\Development)
| --enable "UNKNOWN SOURCES"
| from (Menu\Settings\Applications)
| --increase screen timeout to 10 minutes
| --connect USB cable to PHONE and then connect to PC
| --MAKE SURE YOU HAVE A ROOTED DEVICE AND BUSYBOX
| --Place the right file in the right folder
| --Some feature like Flashing need more tester..so please be aware
| --If you use adb recovery feature, set ADB Mode to recovery
| mount /data and /system from your device recovery
| --If you use adb from homescreen, set ADB Mode to HomeScreen
| --All you Do is your own Risk, use with carefull
-----------------------------------------------------------------------------
****Turn on the screen and allow superuser permission when asked!****
_____________________________________________________________________________
| Current MODDING FILE: NONE | ADB MODE :HomeScreen | sdcard path: /sdcard/|
=============================================================================
:::: ADB PULL ::::
=============================================================================
0 Pulling file from /data ( see result in _MODDING_FILE)
1 Pulling file from /system partition ( see result in _MODDING_FILE)
2 Pulling file from SDcard ( see result in _MODDING_FILE)
3 Backup recovery ( see result in _BACKUP_OUT)
4 Backup Kernel ( see result in _BACKUP_OUT)
5 Backup modem (for P7300 only-see result in _BACKUP_OUT)
6 Backup /system (tar format-see result in _BACKUP_OUT)
7 Backup /efs (tar and .img format-see result in _BACKUP_OUT)
8 Backup APK from /data/app (tar format-see result in _BACKUP_OUT)
=============================================================================
:::: ADB PUSH ::::
=============================================================================
9 Pushing file to /data ( from _MODDING_FILE to device)
10 Pushing file to /system ( from _MODDING_FILE to device)
11 Flashing recovery ( from _FLASHING_OUT to device)
12 Flashing Kernel ( from _FLASHING_OUT to device)
13 Flashing modem for GT P7300 ( from _FLASHING_OUT to device)
=============================================================================
:::: Setting ::::
=============================================================================
14 Set current working File ( for PUSH and PULL )
15 Install busybox on device (need root)
16 Set ADB mode (if you on recovery mode)
17 Install apk ( from _MODDING_FILE to device)
18 Install batch apk ( from _BATCH_INSTALL to device)
=============================================================================
:::: Reboot Menu ::::
=============================================================================
19 Reboot System
20 Boot Into Recovery
21 Reboot Bootloader
22 Quit
My previous post
inspiration from congox case
when you got a problem with bootlop and you forget make a nandroid backup
only have file from other ROM with flashable.zip and need to push the file from your computer to device
you have a recovery support with mount /system and mount /data (tested on CWM 5.5.0.4 and overcome CWM 5.1.2.6) and you can enter this menu while bootloop happen..
STEP 1 : MANUAL
Connect your device with computer
From device, Go to recovery - mounts and storage - mount /system and mount /data
From your computer go to adb terminal and type this
Code:
adb shell "ls /data/media/"
If you can see list of file from your device sdcard, so you make adb work for your device ..
Place your zip file on your path, says on C://backup.zip and you want to copy the file to /sdcard/download/ and type this code
Code:
adb push backup.zip /data/media/download/.
wait for copying progress done..
After you done with moving file to device sdcard, check content of your sdcard with this code
Code:
adb shell "ls /data/media/download/"
When you found your file from list, you can flash backup.zip from recovery
STEP 2 : WINDOWS BATCH FILE
I made a simple Batch File for windows (sorry i dont have MAC or LINUX distro) , this file will make a folder with name "emergency" in SDCARD and with your files inside that.
Extract the FLASHER.rar somewhere on your Local folder,example: on your " Desktop" Folder
in folder "FLASHER" you will find runme.bat and folder "files"
Rename your file ((flashable.zip files you want to send through ADB) to "backup.zip" and then Put your file into this path /FLASHER/files/myfiles/ (just replace the existing "backup.zip" with files from yours)
Connect your tab with Computer
Reboot into Recovery Menu from your device
From menu Mounts and Storage choose mount /system and /data
From your Computer go To Folder flasher and klik runme.bat
Follow the instruction on window untill copying process done and device reboot to recovery again (copying process will take a minutes depend on your file size)
Now you can flash a emergency ROM from recovery
Window instruction
Code:
-----------------------------------------------------------------------------
ADB EMERGENCY COPYING TOOL for TAB 8,9
created by SUWANDIAPR
-----------------------------------------------------------------------------
[*] This script will:
(1) COPY YOUR FILE FROM COMPUTER TO SDCARD/emergency/*
(2) CHECKING YOUR CONNECTED DEVICE DIRECTORY
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) make sure u have installed CWM 5.5.0.4 ON YOUR DEVICE
(3) connect USB cable to PHONE and then connect to PC
(4) Rename your Flashable .zip file with "backup.zip"
and place inside "myfiles" folder on your Computer
(5) from Recovery Menu, Choose "Mounts and storage" then
-mount /system and -mount /data
(6) CONNECT YOUR TAB WITH PC WHILE ON RECOVERY MENU
---------------------------------------------------------------
CONFIRM ALL ABOVE
Sorry for my Bad english, if there is somebody want to correct every words i use , im very welcome and will change with the proper words and sentence..
Hope this help someone..
Nice guide, thanks!!
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
nail16 said:
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
Click to expand...
Click to collapse
you can use busybox and call the binary from the shell
i assume that your device in normal mode ( in home screen)..
here some example..
Code:
su
adb push busybox /tmp/.
adb shell "chmod 755 /tmp/busybox"
adb shell "tmp/busybox mount -o remount,rw /system"
after you type "su" superuser will prompt a request, choose "allow".
glitschi667 said:
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
Click to expand...
Click to collapse
yes you right glistchi, samsung lock adb root on new firmware on my SG- Note..
And make me flash an older firmware for rooting..
new update
Never mind, got it to work
i want to push same file in data system (/data/data) but my tab is not root. can i??
if from cwm recovery, yes you can.. if from stand by mode (home screen) the answer is no... you need root to make it happen..
i got this error
please help
Running Kali linux shell in Redmi Note 3 by 'chroot'-ing into it after mounting on data/local/mnt folder. Also using VNC to access the LXDE Desktop GUI.
It will run within a virtual machine on your phone alongwith the Android as well.
Required Files-
(Phone must be rooted)
1. Kali 1.0(moto) Image
https://sourceforge.net/projects/li...ux/kalilinux.BASIC.ext4.20131012.zip/download
2. Kali script
https://drive.google.com/open?id=0B_Aq1GXA8aP4UWZOcVB6X1lJUjQ
3. Busybox Installer, Termial Emulator, VNC Viewer- Download from Play Store
Steps for installing for 1st time:
1. Download kalilinux.BASIC.ext4.20131012.zip and Kali script and place them in the root of internal sdcard.
2. Install "Busybox" from Playstore. Then open it and Install Busybox 1.25.1.
3. Install "Termial Emulator" and open it.
4. In "Termial Emulator", type and press enter each time as follow-
i) su
ii) mount -o rw,remount /dev/block/bootdevice/by-name/system /system
ii) cp /sdcard/kali /system/bin/kali
iv) chmod 755 /system/bin/kali
v) kali install
That's all. First time and one time set-up is done, now no need to repeat any step later.
Running and Stoping the linux ( after 1st time set-up):
1. To enter into Kali's shell, Open "Termial Emulator" anytime and type "su" and then "kali start". To Exit type "exit".
2. To enter into Kali's LXDE Desktop, in "Termial Emulator" type "su" and then "kali vnc".
Now minimize or exit "Termial" and open VNC viewer.
Then enter following fields to enter desktop
address-127.0.0.1
port-5901
pass-kalilinux
To stop vnc server, Open "Termial Emulator" anytime and type "su" and then "kali vncstop".
3. To uninstall or exit the shell and all services, Open "Termial Emulator" anytime and type "su" and then "kali stop".
NB. To fix old kali keyring
Run in kali shell (after st set-up)
i) rm -rf /var/lib/apt/lists
ii) apt-get update
iii) apt-get install kali-archive-keyring
Here is the video guide
I think this works on all smartphones (?)
Inviato dal mio SM-G935F utilizzando Tapatalk
Francesco0301 said:
I think this works on all smartphones (?)
Inviato dal mio SM-G935F utilizzando Tapatalk
Click to expand...
Click to collapse
Yes, for all. But remounting system command is different, may be not needed.
For remounting system as rw in redmi note 3
"mount -o rw,remount /dev/block/bootdevice/by-name/system /system"
So...is it possible to run airmon-ng or aircrack-ng to hack Wifi password on RN3?
We already have Kali nethunter ROM 😀
MyStyle0714 said:
So...is it possible to run airmon-ng or aircrack-ng to hack Wifi password on RN3?
Click to expand...
Click to collapse
Yes, but with external wifi dongle, not with inbuilt wifi..
Will upload video if I got dongle
Rishabh1x said:
We already have Kali nethunter ROM 😀
Click to expand...
Click to collapse
Yes, and that is better. But it can be run in any android version and anytime by a simple command. It is very simple and handy..
So...where to buy @
MyStyle0714 said:
So...where to buy @
Click to expand...
Click to collapse
one D-Link 150 mbps dongle supported monitor mode.
But I do not own it now.
Google the wifi chip which support monitor mode, then buy dongle.
Pleasee help
When i run kali install command it become like this. Help me. I'm noob in linux command.
Can that's file and step worked with redmi note 4?
We've to place Kali.zip or kali script in the root folder?
palbadi said:
Running Kali linux shell in Redmi Note 3 by 'chroot'-ing into it after mounting on data/local/mnt folder. Also using VNC to access the LXDE Desktop GUI.
It will run within a virtual machine on your phone alongwith the Android as well.
Required Files-
(Phone must be rooted)
1. Kali 1.0(moto) Image
https://sourceforge.net/projects/li...ux/kalilinux.BASIC.ext4.20131012.zip/download
2. Kali script
https://drive.google.com/open?id=0B_Aq1GXA8aP4UWZOcVB6X1lJUjQ
3. Busybox Installer, Termial Emulator, VNC Viewer- Download from Play Store
Steps for installing for 1st time:
1. Download kalilinux.BASIC.ext4.20131012.zip and Kali script and place them in the root of internal sdcard.
2. Install "Busybox" from Playstore. Then open it and Install Busybox 1.25.1.
3. Install "Termial Emulator" and open it.
4. In "Termial Emulator", type and press enter each time as follow-
i) su
ii) mount -o rw,remount /dev/block/bootdevice/by-name/system /system
ii) cp /sdcard/kali /system/bin/kali
iv) chmod 755 /system/bin/kali
v) kali install
That's all. First time and one time set-up is done, now no need to repeat any step later.
Running and Stoping the linux ( after 1st time set-up):
1. To enter into Kali's shell, Open "Termial Emulator" anytime and type "su" and then "kali start". To Exit type "exit".
2. To enter into Kali's LXDE Desktop, in "Termial Emulator" type "su" and then "kali vnc".
Now minimize or exit "Termial" and open VNC viewer.
Then enter following fields to enter desktop
address-127.0.0.1
port-5901
pass-kalilinux
To stop vnc server, Open "Termial Emulator" anytime and type "su" and then "kali vncstop".
3. To uninstall or exit the shell and all services, Open "Termial Emulator" anytime and type "su" and then "kali stop".
NB. To fix old kali keyring
Run in kali shell (after st set-up)
i) rm -rf /var/lib/apt/lists
ii) apt-get update
iii) apt-get install kali-archive-keyring
Here is the video guide
Click to expand...
Click to collapse
I don't understand where to copy those two files plz explain to me....
silentacker said:
I don't understand where to copy those two files plz explain to me....
Click to expand...
Click to collapse
Extract kali.rar file the copy these files "kali" and "kalilinux.BASIC.ext4.20131012.zip" into Sdcard/ root directory
Hi! In short this is for everybody who need openssh server and bash. Fill free to enjoy this port
How to use:
1. install zip trought recovery
2. boot into android, do remount system partition rw
3. setup password trought terminall emulator using command "passwd"
4. do remount system partition ro
5. generate ssh keys trought terminal emulator using command "ssh-keygen -A"
6. start sshd trought terminal emulator using command "/system/bin/sshd"
Username for things is sshd, password is one which you set.
Forget adb shell and enjoy openssh!
I wanted a way to easily work on GSIs with my phone. These are the fruits of my labor.
Prerequisites:
* Magisk manager > settings > mount namespace mode > global
* Termux
How to dump, edit, and convert your stock OS into a GSI?
1. Using Termux run the following commands. This assumes you have root.
Code:
su
ls /dev/block/bootdevice/by-name
cd /data/local/tmp
For me system is labeled as system_a, so this is what we're going to use. This name may differ by device so it's always a good idea to check. Next command...
Code:
dd if=/dev/block/bootdevice/by-name/system_a of=/data/local/tmp/system.img
2. About 1-2min after running the previous command you'll have a raw system image in your tmp directory. Now we need to mount it like so...
Code:
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop system.img /mnt/a
3. If everything went smoothly your raw image is now mounted at /mnt/a and visible with a root explorer. Not only that, it's also live! So any changes you make while it's mounted will be permanent. Simply make any edits as you see fit using a root explorer, then unmount the image when you're done like this...
Code:
umount /mnt/a
Tip: If you can't unmount due to device or resource busy, back out of /mnt/a or any subfolders with your root explorer. If the files are being accessed then you can't unmount them until you get out.
4. Now that the raw image we dumped into /data/local/tmp has been edited, we need to convert it into a sparse image for flashing. Download arm_img_binaries.zip. Extract the files and copy img2simg to /data/local/tmp and set permissions to 0755. From termux run the following commands...
Code:
./img2simg system.img name-of-gsi.img
cp /name-of-gsi.img /sdcard/name-of-gsi.img
You're done! Now just install it like any other GSI using twrp or fastboot.
To clean up everything simply run...
Code:
rm -rf /data/local/tmp/*
How to edit a GSI that's already in sparse format?
Again we're going to need our arm_img_binaries. This time copy simg2img to /data/local/tmp & chmod 0755 just like before. Copy your GSI to the same location then run...
Code:
./simg2img name-of-gsi.img system.img
From there, just follow the guide starting at step #2.
Sources & Tools used:
Termux: Clang, build-essential, git, and python for compiling arm versions of the needed binaries with my Moto G7 Play. **(Supports Android 8, 9, & 10)**
android-simg2img repo - https://github.com/anestisb/android-simg2img.git
A to AB Port Script -- wip
1. Copy both GSIs and tools.tar.gz to the root of your internal storage. Then rename your A only GSI to a.img and your AB GSI to ab.img. I believe a stock dump converted to a sparse image can also be used for this.
2. Download port_gsi.sh.txt and remove .txt from the name. Then place it in /data/local/tmp and set permissions on the file 0755.
3.Run the script and wait. You're moving gigs of data, so it will take several minutes. To do this with Termux, use the following commands.
Code:
su
cd /data/local/tmp
./port_gsi.sh
4. Once the script finishes check the root of your sdcard. Your new GSI will be named new_gsi.img. Install it with fastboot or twrp and cross your fingers.
Notes:
* I recommend that you have at least 12gb of storage available for this process. To get a rough estimate of how much space you actually need, add the size of both GSIs together then multiply by 3. For the images I tested, this comes out to around 10.8gb
* This will put selinux into permissive mode for the duration of the script. Selinux is returned to enforcing at the end of the script.
* The script has been optimized for storage space. It's also self cleaning. The script doesn't remove itself though. port_gsi.sh will be left in /data/local/tmp. You need to remove it manually. This was by design so I wouldn't have to keep copying it every time I want to run the script.
* In theory some small edits to the script would allow it to port AB to A, or a stock dump to an A or AB GSI.
* The arm binaries provided should also work for converting oem or vendor images between sparse and raw. Android 8, 9, & 10 are supported.
* If anyone can improve upon my work, please do! I'm grateful for any suggestions or ideas.
Tips and Tricks
Backup partitions to inactive slots...
Code:
su
dd if=/dev/block/by-name/oem_a of=/dev/block/by-name/oem_b
dd if=/dev/block/by-name/vendor_a of=/dev/block/by-name/vendor_b
dd if=/dev/block/by-name/system_a of=/dev/block/by-name/system_b
dd if=/dev/block/by-name/boot_a of=/dev/block/by-name/boot_b
How to mount and edit inactive partitions...
Code:
su
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop /dev/block/by-name/system_b /mnt/a
Navigate to /mnt/a with a root explorer and make any changes you want. The changes will be permanent. To unmount simply back root explorer out of /mnt/a or any subfolders then run...
Code:
umount /mnt/a
This works on system, oem, and vendor partitions.
U r an inspiration. Great job! I think I was merely hours from jus walking into oncoming traffic over the frustration this A & B **** has given me for nearly two months. I probably bricked it 15 or more times EVERY SINGLE DAY trying all sorts of things with fastboot and ramdisk combo attacks. Never did better than achieving root shell thru adbd from PC and recovery. I tried every SuperSU zip I could find to try even to jus give magisk root to accomplish and that didn't work either. I have security updates thru Feb '20 and I have a suspicion it plays a part in this. Everything I've read on it when I'd give up for awhile all date six months or more and nothing y'all were doing then we worked much at all. It would but for very temporary....anyhow this is exactly direction we needed to go to fix this very unfriendly to developing trap they call A/B...This phone scrambled my eggs man. Anytime my phone reboots I have an anxiety attack
kapmino269 said:
Nice , good start .
I sugest to add more tools, like convert to dat and rhe opposite ( img2dat.py - dat2img.py ) and ither stuff .... scripts and make android kitchen tool which works on android , I got this idea 2 weeks ago but no time for me (NOW) .
Which I meant :
Tool u can use it like AIK magisk by @osm0sis , but with more better way , better way means to make it easy for user also us ex :
Script :
1- unpack
2- repack
3- convert
4- compress
5- etc...
User : 1
Script :
1- unpack img .
2- unpack squashfs img .
3- unpack (recovery / boot) img .
.....etc
Like that....
User : 1
Script :
Chose which one ?
1- s.img 2- v.img
If convert :
User : 3
Script :
1- convert img to (dat || dat.br) .
2- convert a img to ab img .
Etc .......
And so on ..... That will be very awesome , hope I can see it by u , if no luck np I will try to write scripts for that later .
Hope that my suggest will help u .
Click to expand...
Click to collapse
I get what you're saying. That's actually an awesome idea. I'll see what I can do!
Great guide, many thanks
Successfully made image of my system.. Located in /dev/block/mapper
Getting an error when trying to mount it though, wonder if you have seen it before?
I've got a Redmi Note 9s with dynamic partitioning
Code:
dd if=/dev/block/mapper/system of=systemmiui.img
4838824+0 records in
4838824+0 records out
2477477888 bytes (2.3 G) copied, 23.800180 s, 99 M/s
mkdir /mnt/miui11 && chmod 0755 /mnt/miui11
mount -o loop systemmiui.img /mnt/miui11
mount: '/dev/block/loop9'->'/mnt/miui11': Block device required
I did however manage to unpack and repack on pc.
... That alone has been a saviour with my device only having a closed sourcd twrp clone
Spaceminer said:
A to AB Port Script -- wip
1. Copy both GSIs and tools.tar.gz to the root of your internal storage. Then rename your A only GSI to a.img and your AB GSI to ab.img. I believe a stock dump converted to a sparse image can also be used for this.
2. Download port_gsi.sh.txt and remove .txt from the name. Then place it in /data/local/tmp and set permissions on the file 0755.
3.Run the script and wait. You're moving gigs of data, so it will take several minutes. To do this with Termux, use the following commands.
Code:
su
cd /data/local/tmp
./port_gsi.sh
4. Once the script finishes check the root of your sdcard. Your new GSI will be named new_gsi.img. Install it with fastboot or twrp and cross your fingers.
Notes:
* I recommend that you have at least 12gb of storage available for this process. To get a rough estimate of how much space you actually need, add the size of both GSIs together then multiply by 3. For the images I tested, this comes out to around 10.8gb
* This will put selinux into permissive mode for the duration of the script. Selinux is returned to enforcing at the end of the script.
* The script has been optimized for storage space. It's also self cleaning. The script doesn't remove itself though. port_gsi.sh will be left in /data/local/tmp. You need to remove it manually. This was by design so I wouldn't have to keep copying it every time I want to run the script.
* In theory some small edits to the script would allow it to port AB to A, or a stock dump to an A or AB GSI.
* The arm binaries provided should also work for converting oem or vendor images between sparse and raw. Android 8, 9, & 10 are supported.
* If anyone can improve upon my work, please do! I'm grateful for any suggestions or ideas.
Click to expand...
Click to collapse
thank you very much for your work,
so can i use this on a linux computer? and how ti use?
awesome,realy cool,thanx!!!
hello how to do the opposite. from A/B to A-only. I have an AB img and I want to convert it to A-only. Thanks
Spaceminer said:
I wanted a way to easily work on GSIs with my phone. These are the fruits of my labor.
Prerequisites:
* Magisk manager > settings > mount namespace mode > global
* Termux
How to dump, edit, and convert your stock OS into a GSI?
1. Using Termux run the following commands. This assumes you have root.
Code:
su
ls /dev/block/bootdevice/by-name
cd /data/local/tmp
For me system is labeled as system_a, so this is what we're going to use. This name may differ by device so it's always a good idea to check. Next command...
Code:
dd if=/dev/block/bootdevice/by-name/system_a of=/data/local/tmp/system.img
2. About 1-2min after running the previous command you'll have a raw system image in your tmp directory. Now we need to mount it like so...
Code:
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop system.img /mnt/a
3. If everything went smoothly your raw image is now mounted at /mnt/a and visible with a root explorer. Not only that, it's also live! So any changes you make while it's mounted will be permanent. Simply make any edits as you see fit using a root explorer, then unmount the image when you're done like this...
Code:
umount /mnt/a
Tip: If you can't unmount due to device or resource busy, back out of /mnt/a or any subfolders with your root explorer. If the files are being accessed then you can't unmount them until you get out.
4. Now that the raw image we dumped into /data/local/tmp has been edited, we need to convert it into a sparse image for flashing. Download arm_img_binaries.zip. Extract the files and copy img2simg to /data/local/tmp and set permissions to 0755. From termux run the following commands...
Code:
./img2simg system.img name-of-gsi.img
cp /name-of-gsi.img /sdcard/name-of-gsi.img
You're done! Now just install it like any other GSI using twrp or fastboot.
To clean up everything simply run...
Code:
rm -rf /data/local/tmp/*
How to edit a GSI that's already in sparse format?
Again we're going to need our arm_img_binaries. This time copy simg2img to /data/local/tmp & chmod 0755 just like before. Copy your GSI to the same location then run...
Code:
./simg2img name-of-gsi.img system.img
From there, just follow the guide starting at step #2.
Sources & Tools used:
Termux: Clang, build-essential, git, and python for compiling arm versions of the needed binaries with my Moto G7 Play. **(Supports Android 8, 9, & 10)**
android-simg2img repo - https://github.com/anestisb/android-simg2img.git
Click to expand...
Click to collapse
hello how to do the opposite. from A / B to A-only. I have an AB img and I want to convert it to A-only
i'm trying to mount a gsi image but it says that requires -t option, what should i do?