[Emulator][How-To] Manually Root and Debloat BlueStacks - Android Software/Hacking General [Developers Only]

Ahoy, I'm Rumbla Threepwood....a mighty pirate...
...wait, that's for another time, another story....​
Hello fellas, here I am with an adventure in the Fabulous world of "BlueStacks Rooting and Debloating".
When I first started rooting BlueStacks this way, you needed a linux machine/VM to mount the root.fs in a read/write mode and modify it.
That's not very practical, isn't it?
Also, lately, they changed the format of these "filesystem" file to 'vdi' (Virtual Box format?) and these are not so easily mountable anymore.
So what?
Well, I came up with another, much simpler and less demanding method.
This new one, won't require any linux OS, nor copy around your filesystems!
Keep in mind that's always better have a backup of these filesystem you're going to modify, but even that it's not really necessary.
You could always just uninstall/reinstall BlueStacks and start anew!
Ohh....and this method should be working with EVERY BlueStacks version.
That's it, from 0.9.x to the latest 2.3.x
Once again, I don't know if this method will work with future BlueStacks versions, but hey, I will gladly accept a crystall ball as donation, if you wish to do so!
Like in the previous thread, we will still be using the closed-source classic Android App "SuperSU" (from chainfire!)
Here's the link: http://download.chainfire.eu/921/SuperSU/UPDATE-SuperSU-v2.65-20151226141550.zip
If you want to know more about it here are some links:
https://su.chainfire.eu
http://forum.xda-developers.com/apps/supersu
http://forum.xda-developers.com/showthread.php?t=1538053
If you don't like "Closed Source" you could try this method using the WiP Open-Source Android app "SuperUser", but then you're on your own.
As for SuperSU, here's some links about "phh's SuperUser":
http://www.xda-developers.com/the-importance-of-open-source-in-root/
http://forum.xda-developers.com/android/software-hacking/wip-selinux-capable-superuser-t3216394
https://github.com/phhusson/Superuser
Well, let's get started!
First of all, to root BlueStacks this way you need access to just one thing: "cmd.exe" (with admin-privileges, for some tasks)
You will also need some linux knowledge. It's not stricly necessessary, but I won't provide any support about the part dealing with linux commands. You could just follow my instructions blindly and probably you will be able to root it, but it might not be that simple...well, at least, I told you.
The second step requires you to gather the necessary software. Namely, an Android App to handle root-permission (SuperSU/SuperUser).
At this time, you should be able to find SuperSu v2.65 (Stable). The instructions should be the same with other SuperSU versions. I can't really say.
About SuperUser, you're on your own (but if you try and you succeed, I would like to read about your discoveries...and instruction, so I can add them here!)
Here is a link (it should be the direct link from the developers...ChainFire!):
https://download.chainfire.eu/921/SuperSU
Well, you should now have all the needed software, but you may want to gather some APKs with the software you like the most...so you can install it right away!
In fact, if you follow this How-To fully, you would end up even without the stock BlueStacks launcher, so be prepared.
This How-To assumes you already have BlueStacks installed on your system, but make sure it isn't running.
So, let's get started.
WARNING These instructions are for BlueStacks 2.3.29.6222. They may be slightly different for older/newer versions, but the method is the same!
Click to expand...
Click to collapse
1) Unpack SuperSU/SuperUser zip archive somewhere. You need to copy files from this archive into your Root.fs!
1b) Unpack your busybox (I usually use this one: https://busybox.net/downloads/binaries/latest/busybox-i686, already unpacked!) and keep it ready.
1c) You could install busybox using an APK, the outcome should be same...I usually don't do that tho (see 1b)...
2) Start up your cmd.exe. This will be your best-friend for the next 10/15 minutes
3) Let's start changing some "Registry" values.
These changes should stop your BlueStacks calling back-home.
They will turn off BlueStacks Camera.
They will fake your "position" to 0.0/0.0, turning off the GPS too.
They will turnoff SystemStats (is this really needed?).
They will take away some of the default "Shared-Folders"
Code:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Agent\AppSync /f /v Enabled /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Agent\Cloud /f /v Host /t REG_SZ /d https://127.0.0.1
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Agent\Cloud /f /v Host2 /t REG_SZ /d https://127.0.0.1
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Agent\Cloud /f /v CCPinCheckSecs /t REG_DWORD /d 0xffffffff
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Agent\Cloud /f /v SyncIntervalSecs /t REG_DWORD /d 0xffffffff
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Config /f /v OEM /t REG_SZ /d BlueStacks
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v Camera /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v IsFrontendFirstLaunch /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v SystemStats /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v UsbAutoMount /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v GpsMode /t REG_DWORD /d 0
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v GpsLatitude /t REG_SZ /d "0.0"
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v GpsLongitude /t REG_SZ /d "0.0"
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\Config /f /v OEM /t REG_SZ /d BlueStacks
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Updater /f /v ManifestURL /t REG_SZ /d "http://127.0.0.1/updates/manifest_2.3.29.6222"
# Admin Privileges required for these changes ###########
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\1 /f /v Name /t REG_SZ /d "InputMapper"
reg add HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\1 /f /v Path /t REG_SZ /d "C:\BlueStacks\UserData\InputMapper\"
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\2 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\3 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\4 /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\BlueStacks\Guests\Android\SharedFolder\5 /f
4) To speed up BlueStacks slightly, you could turn off both BlueStacks Updater and BlueStacks Logs
How? Very simple, but you need admin privileges to do so:
Code:
# Admin Privileges required for these changes ###########
move "C:\Program Files (x86)\BlueStacks\HD-LogRotatorService.exe" "C:\Program Files (x86)\BlueStacks\HD-LogRotatorService.norun.exe"
move "C:\Program Files (x86)\BlueStacks\HD-LogRotator.exe" "C:\Program Files (x86)\BlueStacks\HD-LogRotator.norun.exe"
move "C:\Program Files (x86)\BlueStacks\HD-LogCollector.exe" "C:\Program Files (x86)\BlueStacks\HD-logCollector.norun.exe"
move "C:\Program Files (x86)\BlueStacks\HD-Updater.exe" "C:\Program Files (x86)\BlueStacks\HD-Updater.norun.exe"
5) Now, let's get to the "core" of the rooting process!
First of all we need adb working so:
Code:
sc start BstHdAndroidSvc
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" kill-server
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" start-server
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" wait-for-device
6) Now, let's start an adb shell and get done with the "SECRET" (or the core of this rooting method)
Code:
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" shell
Now you should have an user-prompt (can you see that $?).
To modify our filesystem we need root privileges, tho....
...but BlueStacks' guys were so kind they left an hidden "su" for us!
Let's run it...getting some root privileges!
Code:
/system/xbin/bstk/su
Now you should have a root-prompt (can you see that #?).
Keep this cmd.exe windows open....remember? It's your best-friend now.
7) Now that we are the Nietzsche's SuperHuman, we can go on and do all of our stuff!!!
First of all, let's mount "system" as read/write. I also create a tmp directory there, to store my tmp stuff
Code:
mount -o remount,rw /dev/sda1 /system
mkdir /system/tmp
Now, you should open another cmd.exe window and use it to push some stuff in our newly-create directory
Code:
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/SuperSU/2.65/common/SuperUser.apk /system/tmp
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/SuperSU/2.65/x86/su /system/tmp
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/SuperSU/2.65/x86/supolicy /system/tmp
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/SuperSU/2.65/x86/libsupol.so /system/tmp
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/busybox/busybox-i686 /system/tmp/
Get back at your android-root-prompt.
Time to copy the apk:
Code:
chown system:system /system/tmp/SuperUser.apk
chmod 664 /system/tmp/SuperUser.apk
mv /system/tmp/SuperUser.apk /system/app
This will actually permanently "root" out BlueStacks
Code:
chown root:root /system/tmp/su
chown root:root /system/tmp/supolicy
chown root:root /system/tmp/libsupol.so
chmod 775 /system/tmp/su
chmod 775 /system/tmp/supolicy
chmod 664 /system/tmp/libsupol.so
cp /system/tmp/su /system/xbin/daemonsu
mv /system/tmp/su /system/xbin/
mv /system/tmp/supolicy /system/xbin/
mv /system/tmp/libsupol.so /system/lib/
Busybox installation...not really needed, but I do it!
Code:
chmod 775 /system/tmp/busybox-i686
chown root:root /system/tmp/busybox-i686
cp /system/tmp/busybox-i686 /system/xbin/
mv /system/tmp/busybox-i686 /system/xbin/busybox
init.sh modification to have the su binary listening as a daemon
Code:
awk '/\tdo_init/{print;print "\t\t/system/xbin/daemonsu --auto-daemon &";next}1' /system/etc/init.sh > /system/etc/init.sh.tmp
mv /system/etc/init.sh /system/etc/init.sh.bs
mv /system/etc/init.sh.tmp /system/etc/init.sh
chown system:system /system/etc/init.sh
chmod 664 /system/etc/init.sh
Let's now "Debloat" our system. This is not necessary, but I do it!
Code:
ls /system/app/
rm /system/app/BasicSmsReceiver.apk
rm /system/app/Calculator.apk
rm /system/app/Calendar.apk
rm /system/app/Camera2.apk
rm /system/app/DeskClock.apk
rm /system/app/DocumentsUI.apk
rm /system/app/DownloadProviderUi.apk
rm /system/app/Gallery.apk
rm /system/app/LiveWallpapersPicker.apk
rm /system/app/Music.apk
rm /system/app/NotePad.apk
rm /system/app/PicoTts.apk
rm /system/app/PrintSpooler.apk
rm /system/app/QuickSearchBox.apk
rm /system/app/SoundRecorder.apk
rm /system/app/TelephonyProvider.apk
rm /system/app/com.google.android.apps.uploader.apk
rm /system/app/com.google.android.syncadapters.calendar.apk
rm /system/app/com.google.android.syncadapters.contacts.apk
ls /system/priv-app/
rm /system/priv-app/BackupRestoreConfirmation.apk
rm /system/priv-app/CalendarProvider.apk
rm /system/priv-app/Contacts.apk
rm /system/priv-app/ContactsProvider.apk
rm /system/priv-app/Dialer.apk
rm /system/priv-app/MusicFX.apk
rm /system/priv-app/OneTimeInitializer.apk
rm /system/priv-app/SharedStorageBackup.apk
rm /system/priv-app/TeleService.apk
rm /system/priv-app/WallpaperCropper.apk
Now let's clean up our mess (not really a mess, is it?) and remount "system" as read-only
Code:
rm /system/tmp/*
rmdir /system/tmp
mount -o remount,ro /dev/sda1 /system
Some more "Debloating" in process
Code:
mount -t ext4 /dev/block/sdd1 /mnt/prebundledapps
ls /mnt/prebundledapps/downloads/
rm /mnt/prebundledapps/downloads/AppGuidance.apk
rm /mnt/prebundledapps/downloads/AppSettings.apk
rm /mnt/prebundledapps/downloads/BstFakeGps.apk
rm /mnt/prebundledapps/downloads/MyBluestacks.apk
rm /mnt/prebundledapps/downloads/S2P.apk
rm /mnt/prebundledapps/downloads/WindowsFileManager.apk
rm /mnt/prebundledapps/downloads/bluestacksHome.apk
rm /mnt/prebundledapps/downloads/bluestacksServices.apk
rm /mnt/prebundledapps/downloads/newAppFinder.apk
rm /mnt/prebundledapps/downloads/setupWizard.apk
ls /mnt/prebundledapps/app/
rm /mnt/prebundledapps/app/com.google.android.apps.photos-1.apk
ls /mnt/prebundledapps/system-app
rm /mnt/prebundledapps/system-app/com.google.android.apps.uploader.apk
rm /mnt/prebundledapps/system-app/com.google.android.syncadapters.calendar.apk
rm /mnt/prebundledapps/system-app/com.google.android.syncadapters.contacts.apk
ls /mnt/prebundledapps/system-priv-app
umount /mnt/prebundledapps
ls /data/app/
rm /data/app/com.google.android.apps.photos-1.apk
Man, we should be done now. Let's clear the Dalvik-cache!
Code:
find /data/dalvik-cache/ -type f -exec rm {} +
exit
exit
And we're DONE!!!
8) Let's now restart BlueStacks...and see what happend!
From your cmd.exe
Code:
sc stop BstHdAndroidSvc
#### wait some seconds (10?)
sc start BstHdAndroidSvc
Now, I usually go modify the Oem.cfg file (admin privileges are needed to do so).
Why? Becase I don't EVER start BlueStacks using "GameManager", but merely the "classic" FrontEnd.
So, open the file and search for:
Code:
<IsFrontendBorderHidden>true</IsFrontendBorderHidden>
Change it to
Code:
<IsFrontendBorderHidden>false</IsFrontendBorderHidden>
This will bring back the "classic" windows' decoration to the Frontend!
And here is how I ALWAYS start my BlueStacks:
Code:
"C:\Program Files (x86)\BlueStacks\HD-Frontend.exe" Android
If you want to use GameManager, you should probably skip the last couple of tasks...
Keep in mind that I won't give any support if you decide to do so (cause I NEVER tested it)
WoW.....scary, isn't it? Nothing appears on your BlueStacks window but a black background and a tiny "#" notification on top.
You should also get a request for your "Position"....I usually decline that...
Well, nothing to fear about. It's just our "almost completely debloated" BlueStacks running.
If this is the case....YES...YOU DID IT!
Just click the "#" notification.
You will be prompted about a SuperSU update. Choose the "normal" way and after the update, restart your BlueStacks.
Code:
"C:\Program Files (x86)\BlueStacks\HD-Quit.exe"
"C:\Program Files (x86)\BlueStacks\HD-Frontend.exe" Android
The notification should be gone now!
Your BlueStacks is now Rooted&Debloated.
9) BlueStacks like this, is not really usable...so we need to do something more.
Remember when I told you to gather your preffered APKs somewhere...well, this is the reason.
It's time to install these now.
From a cmd.exe window
Code:
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" kill-server
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" start-server
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" wait-for-device
Now we can use "push" and "shell pm"
Code:
### Apex Launcher 3.1.0 (PlayStore)
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push apk\com.anddoes.launcher-3.1.0-3101-minAPI15.apk /sdcard/Download
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" shell pm install /sdcard/Download/com.anddoes.launcher-3.1.0-3101-minAPI15.apk
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" shell rm /sdcard/Download/com.anddoes.launcher-3.1.0-3101-minAPI15.apk
Here is an example to install ApexLauncher!
Do the same with all of your APKs and you're done.
You could probably Drag the APS directly on BlueStacks' window...
Here is what I usually install
ApexLauncher
Fx (RootExplorer!)
Full!Screen
ConnectBot (terminal emulator and ssh client)
As always, please, report back any mistake you spot....
...and any suggestion you may have about all this how-to!
Hope you enjoyed this how-to and I hope you will enjoy your newly rooted BlueStacks.

Thanks for the tutorial.
Could you describe how to install xposed as well?
Edit: I forgot that I can just use the installer :silly:

Hey guys, I'm sorry, I know that this is an old thread that was started back in June of 2016, so if I am posting this question in the wrong place or if there's a newer, more relevant thread please point me in the right direction. I found this topic by doing a web search.
As I was following the steps in this topic everything worked as expected until I reached step 7. The first part you have to mount the system as read/write and then create a temp directory to store everything in. I did that in adb shell but then you go back to command window to push some things to your new temp directory and each thing I tried to push, the command window did not give me an error but each time it spits out a long list of instructions/ commands to use in ADB.
Will someone please assist me? Thank you for your help

TRexombo said:
Hey guys, I'm sorry, I know that this is an old thread that was started back in June of 2016, so if I am posting this question in the wrong place or if there's a newer, more relevant thread please point me in the right direction. I found this topic by doing a web search.
As I was following the steps in this topic everything worked as expected until I reached step 7. The first part you have to mount the system as read/write and then create a temp directory to store everything in. I did that in adb shell but then you go back to command window to push some things to your new temp directory and each thing I tried to push, the command window did not give me an error but each time it spits out a long list of instructions/ commands to use in ADB.
Will someone please assist me? Thank you for your help
Click to expand...
Click to collapse
If it is just returning the usage of ADB like you said, it really sounds like a typo in the command being ran. Either the filename or directory is slightly off.
IDK for sure based on your post. But when ADB does that to me, it is 9.5 times out of 10, because of a character out of place in the command.
Hope that helps.

TRexombo said:
Hey guys, I'm sorry, I know that this is an old thread that was started back in June of 2016, so if I am posting this question in the wrong place or if there's a newer, more relevant thread please point me in the right direction. I found this topic by doing a web search.
As I was following the steps in this topic everything worked as expected until I reached step 7. The first part you have to mount the system as read/write and then create a temp directory to store everything in. I did that in adb shell but then you go back to command window to push some things to your new temp directory and each thing I tried to push, the command window did not give me an error but each time it spits out a long list of instructions/ commands to use in ADB.
Will someone please assist me? Thank you for your help
Click to expand...
Click to collapse
After having the same issue (and reading your post), I thought I'd throw you a bone... when you see the author using the term path_to/SuperSU/2.65/..., he is implying that the user input the "path to" the directory you have your files. In other words, if you created the SuperSU directory on the root of your C: Drive, then you would substitute path_to with C:/.
So,
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push path_to/SuperSU/2.65/x86/su /system/tmp
should really be entered as
"C:\Program Files (x86)\BlueStacks\HD-Adb.exe" push C:/SuperSU/2.65/x86/su /system/tmp
:victory:
For those not familiar with Linux (or Windows, for that matter), it is all too easy to assume that path_to is a special command. :laugh:

Related

[Q] adb shell in batch

Hi,
I'm making a batch file (*.bat) for myself to try make some things easier file where I enter commands with adb.exe.
The problem is, any code after 'adb shell' is not executed in the batch.
So if I had a batch with the following:
Code:
adb shell
su
'su' will not be executed and stays at '$'.
It seems like it's too deep for a batch file to enter codes.
I also tried pushing a sh with the same script and run it from adb but then all I get it permission denied.
I have also tried 'adb shell su' without any luck.
Anyone with a solution?
Anyone? Or how about a .rc file that gets su and runs commands...
Sent from my HTC
To execute a script, you can always push your script and then execute it:
Code:
adb push script /sdcard/script
adb shell sh /sdcard/script
As for the commands you have shown, keep in mind that su doesn't simply change the running shell's permissions or the like but creates a new child environment within its own shell. You leave your script and after the new shell has finished, you're back in your old environment and the script continues.
mizch said:
To execute a script, you can always push your script and then execute it:
Code:
adb push script /sdcard/script
adb shell sh /sdcard/script
As for the commands you have shown, keep in mind that su doesn't simply change the running shell's permissions or the like but creates a new child environment within its own shell. You leave your script and after the new shell has finished, you're back in your old environment and the script continues.
Click to expand...
Click to collapse
yes, is there any way to automate the script inside the shell and use exit to finally go back to the batch script.
Can you provide me with an example of what you want to achieve?
To execute shell commands from a batch, it doesn't matter if I have to push a script and execute it. It's so that I get su and automate commands after that. Like flash_image, remount, chmod etc..
you will need to use the 'adb shell command' ad 'sh' files
I am trying to create a unix script file that copies files from /dbdata/databases to another folder as a backup.
When I try running the script in adb shell as SU, I get
cd: can't cd to /dbdata/databases
This is on a rooted Captivate. Any help would be greatly appreciated!
Hi,
su -c "command" should do the job for you. You will need to enclose the whole of the command in quotes however, otherwise su will be expecting the command to execute, doing nothing.
Example: adb shell "su -c 'sqlite3 /data/data/my.db/databases/mydb.db < /sdcard/dump.sql'" (run from a Unix or Windows(?) shell). Notice the use of "" and ''.
(in this case dump.sql contains .dump, for instance)
Of course the sqlite3 command could be placed within another script on the android device.
Hope that helps.
I looked around a bit and found the answer.
The simple answer is, wrap the command
Code:
cp "source" "destination"
in double quotes!
Thank you grindingbob for the adb shell "su -c 'sh /mnt/sdcard/tmp/2.sh'" command.
No probs I was more referring to executing commands as a su without interacting with adb shell.
As a side-note, cp might not be a good idea, unless you're sure no db accessing is taking place at the same time.
I am pretty sure well as sure as a novice can be! The files I am backing up are log files, call history and text message history.
The results from running a unix script which contains
Code:
cp "/dbdata/databases/com.android.providers.contacts/contacts2.db" "/mnt/sdcard/tmp4/contacts2.db"
cp "/dbdata/databases/com.android.providers.telephony/mmssms.db" "/mnt/sdcard/tmp4/mmssms.db"
cp "/dbdata/databases/com.sec.android.provider.logsprovider/logs.db" "/mnt/sdcard/tmp4/logs.db"
are only the logs.db file is copied, the other two are not.
grindingbob said:
No probs I was more referring to executing commands as a su without interacting with adb shell.
As a side-note, cp might not be a good idea, unless you're sure no db accessing is taking place at the same time.
Click to expand...
Click to collapse
Permission issues for *.sh files from ADB
Dear All,
I have a 3.2 device with Root permissions & Busybox.
I created a sample *.sh file, Pushed to SDcard, and gave '777' Permissions. When i Try to run it from ADB shell its not working Any help...
CMD prompt Traces:
Step -1: Created a sh file
cat TAB.sh
#!/bin/sh
cd /data/data/com.android.gallery/shared_prefs
Step -2 Pushed the file to SDcard
# ls -l *.sh
ls -l *.sh
-rw-rw-r-- root sdcard_rw 56 2012-03-13 15:06 SP.sh
-rw-rw-r-- root sdcard_rw 62 2012-03-13 15:05 TAB.sh
Step -3 Gave 777 permission for *.sh files
# chmod 777 *.sh
chmod 777 *.sh
# ls -l
ls -l
-rw-rw-r-- root sdcard_rw 56 2012-03-13 15:06 SP.sh
-rw-rw-r-- root sdcard_rw 62 2012-03-13 15:05 TAB.sh
Execute permission not applied
Tried other operations, dint workout
Step 4 other options:
# chmod +X *.sh
chmod +X *.sh
Bad mode
# chmod +x *.sh
chmod +x *.sh
Bad mode
# chmod u+x *.sh
chmod u+x *.sh
Bad mode
Any Help?

[DUMP] Sidekick 4G Partition + Kernel Source (Bootloader, Recovery, etc)

Credit to sofauxboho for performing dumps.
Partition Dump
http://gititbit.ch/sk4g2 - partition dump
Code:
bml1 256 KB contains boot.bin (262144 bytes), Primary Boot Loader (low-level hardware initialization)
bml2 256 KB contains PIT file first 512 bytes
bml3 10240 KB /dev/block/stl3 /efs
bml4 1280 KB contains Sbl.bin (1310720 bytes) Secondary Boot Loader (loads the Linux kernel and passes the necessary arguments)
bml5 1280 KB contains Secondary Boot Loader (for recovery, ect)
bml6 5120 KB param.lfs /mnt/.lfs j4fs
bml7 7680 KB contains zImage and initramfs
bml8 7680 KB empty - on Epic 4G and Fascinate, contains recovery.bin
bml9 293376 KB factoryfs.rfs ( /system RFS Partition) /dev/block/stl9
bml10 137216 KB dbdata.rfs ( /dbdata RFS Partition) /dev/block/stl10
bml11 35840 KB cache.rfs ( /cache RFS Partition) /dev/block/stl11
bml12 12800 KB modem.bin
EDIT: It has come to my attention that the Super One Click works, no need for a script.
More Mirrors
http://gititbit.ch/sk41 - Sidekick 4G system dump
http://gititbit.ch/sk4g1 - Sidekick 4G Info Dump
dev.txt
devblock.txt
efs.txt
mount.txt
partitions.txt
proc.txt
Kernel + Platform Source
http://gititbit.ch/sk4g5 - SGH-T839_OpenSource.zip
Now for custom roms...
SK4G development chat can be found at irc.freenode.net #sk4g
hey, sorry i'm not super code-savvy.... do i simply place the .rar file on my sd card, or open it with say, 7zip, and copy the autoroot folder over? i'm getting 'unable to chmod, operation not permitted' the second way, and 'not found, no such directory, etc' when i place the .rar file on my sd card. both of these are appearing after the first line with chmod 755 etc.
Use winrar to extract the .rar then place the extracted folder onto the sdcard.
dasmoover said:
Use winrar to extract the .rar then place the extracted folder onto the sdcard.
Click to expand...
Click to collapse
ok, think i did that, but am still getting 'operation not permitted'..... perhaps i'll hold off and see if someone else has success with it?
Hmm...
Should line 14 specify the su file rather than the containing directory?
It currently reads:
Code:
cp su /system/xbin/ && chmod 4755 /system/xbin/
But perhaps it should read:
Code:
cp su /system/xbin/ && chmod 4755 /system/xbin/su
Updated the script in the main download.
yogi2010 said:
hey, sorry i'm not super code-savvy.... do i simply place the .rar file on my sd card, or open it with say, 7zip, and copy the autoroot folder over? i'm getting 'unable to chmod, operation not permitted' the second way, and 'not found, no such directory, etc' when i place the .rar file on my sd card. both of these are appearing after the first line with chmod 755 etc.
Click to expand...
Click to collapse
Im getting this when I try the lines too.
When I copied the autoroot folder to my SK4G, the contents of the folder were already set to 775, so there should be no need to chmod (though I also get the permission error when trying to chmod them).
The bigger issue is that my device doesn't have the cp command. I'd assume it would be in /system/bin along with things like ls and mv, but it's not.
Huh. That's odd. You guys are using the newer download, right?
Do you have any idea which chmod command is erroring out? I'm wondering if it's the chmod on the rage...bin in line 9 or the chmod on su in line 14.
Unfortunately I can't test without wiping my SK4G back to unrooted, which I would rather not do as it's my primary handset.
If you don't know which line is causing the trouble, could you try copying the kit but then entering each line manually?
sofauxboho said:
Huh. That's odd. You guys are using the newer download, right?
Do you have any idea which chmod command is erroring out? I'm wondering if it's the chmod on the rage...bin in line 9 or the chmod on su in line 14.
Unfortunately I can't test without wiping my SK4G back to unrooted, which I would rather not do as it's my primary handset.
If you don't know which line is causing the trouble, could you try copying the kit but then entering each line manually?
Click to expand...
Click to collapse
No I was usin the old link didn't try new one yet. Still says same thing on new version
Sent From SK4G
sofauxboho said:
Huh. That's odd. You guys are using the newer download, right?
Do you have any idea which chmod command is erroring out? I'm wondering if it's the chmod on the rage...bin in line 9 or the chmod on su in line 14.
Unfortunately I can't test without wiping my SK4G back to unrooted, which I would rather not do as it's my primary handset.
If you don't know which line is causing the trouble, could you try copying the kit but then entering each line manually?
Click to expand...
Click to collapse
I tried the newer download. All of the chmods error because my user doesn't own those files or already have write permissions for any of them. I don't have read, write, or execute permissions for /data/local/tmp either, so I can't list or copy to that location. But, separate from that, there is no cp command, so I can't copy anything anywhere.
jarrodlombardo said:
When I copied the autoroot folder to my SK4G, the contents of the folder were already set to 775, so there should be no need to chmod (though I also get the permission error when trying to chmod them).
The bigger issue is that my device doesn't have the cp command. I'd assume it would be in /system/bin along with things like ls and mv, but it's not.
Click to expand...
Click to collapse
Ah, right! That's why I used cat instead of cp when I rooted mine.
Try this:
Code:
#!/bin/sh
#autoroot script for sidekick v0.1
#chmod 755 autoroot.sh
echo "Copying binaries to /data/local/tmp/"
cat su > /data/local/tmp/su
cat Superuser.apk > /data/local/tmp/Superuser.apk
cat rageagainstthecage-arm5.bin > /data/local/tmp/rageagainstthecage-arm5.bin
cd /data/local/tmp/
echo "I'm about to chmod rageagainstthecage-arm5.bin"
chmod 755 rageagainstthecage-arm5.bin
echo "Executing exploit, please wait"
./rageagainstthecage-arm5.bin
sleep 20
echo "Attempting to spawn root shell"
sh
whoami
echo "Attempting to mount /system read-write"
mount -o remount,rw /dev/block/stl9 /system
echo "Attempting to copy and chmod su"
cat /data/local/tmp/su > /system/xbin/su && chmod 4755 /system/xbin/su
echo "Attempting to copy Superuser.apk"
cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
sleep 5
mount -o remount,ro /dev/block/stl9 /system
#add root entry to passwd and group
echo "root::0:0:root:/data/local:/system/bin/sh" > /etc/passwd
echo "root::0:" > /etc/group
echo "autoroot completed succesfully."
I've also added a bunch of echoed comments to help us track where things go wrong if it doesn't work.
sofauxboho said:
Ah, right! That's why I used cat instead of cp when I rooted mine.
Try this:
Code:
#!/bin/sh
#autoroot script for sidekick v0.1
#chmod 755 autoroot.sh
echo "Copying binaries to /data/local/tmp/"
cat su > /data/local/tmp/su
cat Superuser.apk > /data/local/tmp/Superuser.apk
cat rageagainstthecage-arm5.bin > /data/local/tmp/rageagainstthecage-arm5.bin
cd /data/local/tmp/
echo "I'm about to chmod rageagainstthecage-arm5.bin"
chmod 755 rageagainstthecage-arm5.bin
echo "Executing exploit, please wait"
./rageagainstthecage-arm5.bin
sleep 20
echo "Attempting to spawn root shell"
sh
whoami
echo "Attempting to mount /system read-write"
mount -o remount,rw /dev/block/stl9 /system
echo "Attempting to copy and chmod su"
cat /data/local/tmp/su > /system/xbin/su && chmod 4755 /system/xbin/su
echo "Attempting to copy Superuser.apk"
cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
sleep 5
mount -o remount,ro /dev/block/stl9 /system
#add root entry to passwd and group
echo "root::0:0:root:/data/local:/system/bin/sh" > /etc/passwd
echo "root::0:" > /etc/group
echo "autoroot completed succesfully."
I've also added a bunch of echoed comments to help us track where things go wrong if it doesn't work.
Click to expand...
Click to collapse
Type this into terminal right?
Actually, I whipped up a modified version of dasmoover's tool with my changes:
http://notfine.com/android/sk4g/autoroot-V01b-sfb.zip
Unzip that and copy the "autoroot" folder to your SD card.
Next, eject your SK, turn off USB Storage mode, and unplug it from your computer.
Then follow dasmoover's instructions (I've cleaned them up slightlly):
1. Place autoroot folder on sdcard
2. Install the Terminal Emulator app from the Marketplace
3. Open the Terminal Emulator app and type the following commands exactly, one at a time, hitting enter at the end of the line:
Code:
chmod 755 /sdcard/autoroot/autoroot.sh
./sdcard/autoroot/autoroot.sh
If the sdcard is mounted as noexec, follow these steps:
1. Place autoroot folder on sdcard
2. Install the Terminal Emulator app from the Marketplace
3. Open the Terminal Emulator app and type the following commands exactly, one at a time, hitting enter at the end of the line:
Code:
cat > /sdcard/autoroot/autoroot.sh /data/local/tmp/autoroot.sh
chmod 755 /data/local/tmp/autoroot.sh
cd /sdcard/autoroot/
./data/local/tmp/autoroot.sh
Click to expand...
Click to collapse
All credit to dasmoover, btw! Thanks, and I hope you don't mind me modifying and repackaging your tool. Just trying to help get it working.
BTW, here are some good goodies on how this root exploit works for the technical and curious:
I'd read this one first: http://intrepidusgroup.com/insight/2010/09/android-root-source-code-looking-at-the-c-skills/
And this one second:
http://dtors.org/2010/08/25/reversing-latest-exploid-release/
How did you get rid of the $ sign and get a # ? When I type the first line with the ca it sayd directory can't be found.
Sent From SK4G
I copied the new cat version onto my device and did the following:
$ chmod 755 /sdcard/autoroot/autoroot.sh
Unable to chmod /sdcard/autoroot/autoroot.sh: Operation not permitted
$ cat /sdcard/autoroot/autoroot.sh > /data/local/tmp/autoroot.sh
Cannot create /data/local/tmp/autoroot.sh: permission denied
So, I'm still stuck since /data/local/tmp isn't writable. (Also, you'll note I fixed the small error in the cat line I used.)
Ace42 said:
How did you get rid of the $ sign and get a # ? When I type the first line with the ca it sayd directory can't be found.
Sent From SK4G
Click to expand...
Click to collapse
So, the # means root. The $ means not root. The whole point of this is to get the #, which indicates a root prompt.
If it says the directory can't be found then either the command was typed incorrectly or the files are in the wrong place. The files have to be in the exact right places with the exact right names.
Download my modified version:
http://notfine.com/android/sk4g/autoroot-V01b-sfb.zip
Unzip it, and it should give you a folder called "autoroot". Inside that should be four files:
autoroot.sh
rageagainstthecage-arm5.bin
su
Superuser.apk
Make sure there is only a folder named "autoroot" with those four files inside. If there is another directory inside it won't work. If the names are at all different it won't work.
Copy this "autoroot" folder to the top level of your SD card. There should be other folders there like Music, DCIM, Playlists, and Android. Maybe some others. Make sure it's at the very top level, along with these other directories.
Here, take a look at my directory structure:
{
"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"
}
(Yes, I'm on a Mac, but your SK and Android don't care. File locations work the same on Windows or Linux or whatever. Also, I may have some folders you don't have. That's ok.)
Next, eject your SK, turn off USB Storage mode, and unplug it from your computer. **I forgot this part earlier! It's important.**
Then open up Terminal Emulator an your SK4G. Type:
Code:
cd /sdcard/autoroot
Then type:
Code:
ls
This should list the same four files above. If it does, you're ready to start the instructions I posted previously.
If it doesn't, type:
Then type:
Code:
ls /sdcard/
Let me know what it says.
jarrodlombardo said:
I copied the new cat version onto my device and did the following:
$ chmod 755 /sdcard/autoroot/autoroot.sh
Unable to chmod /sdcard/autoroot/autoroot.sh: Operation not permitted
$ cat /sdcard/autoroot/autoroot.sh > /data/local/tmp/autoroot.sh
Cannot create /data/local/tmp/autoroot.sh: permission denied
So, I'm still stuck since /data/local/tmp isn't writable. (Also, you'll note I fixed the small error in the cat line I used.)
Click to expand...
Click to collapse
Yeah, I've confirmed this problem.
Folks, this thing won't work right now. We need a location that is both writable and allows execution. Any ideas?
(To confirm, you can still root by using adb to manually put these files at /data/local/tmp/ For some reason, adb has rights to this location. However, the standard Terminal Emulator does not. This is only a hang-up for on-device rooting, not rooting in general.)
sofauxboho said:
Yeah, I've confirmed this problem.
Folks, this thing won't work right now. We need a location that is both writable and allows execution. Any ideas?
Click to expand...
Click to collapse
I've poked around some and not found anywhere yet. :/

[Q] Help using Android command line dev tools

I'm trying to deconstruct the Android app development process by creating and installing a sample app entirely from the command line (without even using Ant). I've composed a script which seems to work until the very last command, at which point I get the message
134 KB/s (10496 bytes in 0.076s)
pkg: /data/local/tmp/MyActivity-debug.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
Please don't be put off by the fact that my script is a Windows .bat script. I'm just calling code from the SDK's tools and platform-tools directories. Anyway, here's the script. If find what I'm missing that's giving me the NO_CERTIFICATES error, please reply...
call "c:\program files (x86)\Android\android-sdk\tools\android" create project --target 10 --name MyAndroidProject --path c:\MyProjects\MyAndroidProject --activity MyActivity --package com.allmycode.samples
cd \MyProjects\MyAndroidProject
mkdir C:\MyProjects\MyAndroidProject\res
mkdir C:\MyProjects\MyAndroidProject\libs
mkdir C:\MyProjects\MyAndroidProject\bin
mkdir C:\MyProjects\MyAndroidProject\gen
mkdir C:\MyProjects\MyAndroidProject\bin\classes
"C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe" package -f -m -M C:\MyProjects\MyAndroidProject\AndroidManifest.xml -S C:\MyProjects\MyAndroidProject\res -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-9\android.jar" -J C:\MyProjects\MyAndroidProject\gen
"c:\program files\java\jdk1.7.0\bin\javac" -d C:\MyProjects\MyAndroidProject\bin\classes -classpath C:\MyProjects\MyAndroidProject\bin\classes;C:\MyProjects\MyAndroidProject;c:\ant\lib\ant-launcher.jar;"C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip";C:\ant\lib\ant-antlr.jar;C:\ant\lib\ant-apache-bcel.jar;C:\ant\lib\ant-apache-bsf.jar;C:\ant\lib\ant-apache-log4j.jar;C:\ant\lib\ant-apache-oro.jar;C:\ant\lib\ant-apache-regexp.jar;C:\ant\lib\ant-apache-resolver.jar;C:\ant\lib\ant-apache-xalan2.jar;C:\ant\lib\ant-commons-logging.jar;C:\ant\lib\ant-commons-net.jar;C:\ant\lib\ant-jai.jar;C:\ant\lib\ant-javamail.jar;C:\ant\lib\ant-jdepend.jar;C:\ant\lib\ant-jmf.jar;C:\ant\lib\ant-jsch.jar;C:\ant\lib\ant-junit.jar;C:\ant\lib\ant-junit4.jar;C:\ant\lib\ant-netrexx.jar;C:\ant\lib\ant-swing.jar;C:\ant\lib\ant-testutil.jar;C:\ant\lib\ant.jar;"C:\Program Files\Java\jdk1.7.0\lib\tools.jar" -sourcepath C:\MyProjects\MyAndroidProject\src;C:\MyProjects\MyAndroidProject\gen -target 1.5 -bootclasspath "C:\Program Files (x86)\Android\android-sdk\platforms\android-9\android.jar" -encoding UTF-8 -g -source 1.5 c:\MyProjects\MyAndroidProject\src\com\allmycode\samples\*.java
call "C:\Program Files (x86)\Android\android-sdk\platform-tools\dx.bat" --dex --output=C:\MyProjects\MyAndroidProject\bin\classes.dex C:\MyProjects\MyAndroidProject\bin\classes
"C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe" package -f --debug-mode -M C:\MyProjects\MyAndroidProject\AndroidManifest.xml -S C:\MyProjects\MyAndroidProject\res -I "C:\Program Files (x86)\Android\android-sdk\platforms\android-9\android.jar" -F C:\MyProjects\MyAndroidProject\bin\MyActivity-debug-unaligned.apk
"C:\Program Files (x86)\Android\android-sdk\tools\zipalign.exe" -f 4 C:\MyProjects\MyAndroidProject\bin\MyActivity-debug-unaligned.apk C:\MyProjects\MyAndroidProject\bin\MyActivity-debug.apk
start "Launch an emulator" "C:\Program Files (x86)\Android\android-sdk/tools/emulator.exe" -avd Gingerbread
timeout /T 60
"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" install -r C:\MyProjects\MyAndroidProject\bin\MyActivity-debug.apk
You need to sign your apk
Hey, I believe all you need to do is sign your .apk with a certificate.
Here is a link about creating a certificate if you dont already have one. I tried to include a link but it wont let me. (sorry im a new user)
Once you have acquired a certificate, you can then use the JDK utitility called jarsigner. The terminal command should be something like this...
jarsigner -verbose -keystore my-release-key.keystore final.apk alias_name
Click to expand...
Click to collapse
Hope this helps ya out.

[GUIDE] Basic Unix/Linux command to use with ADB SHELL

I am sure that many of the new people in here are not exactly sure how to use ADB under linux.
So Ive been reading the Evo 3D forum, and I found this really nice guide by vboyz103. You can find the thread HERE
All props go to vboyz103 for creating it, im just sharing it with you guys.
P.S. - I found it in the Android Development forum, so Im putting it in ours. If it does not belong here - MODs - please move it to General.
vboyz103 said:
So I have been reading quite a few threads here on XDA, and the one thing I noticed for noobs to linux/unix world is that they are struggling with some basic command once adb shell is gained. I decided to whip out this quick tutorial to help those noobs out to become more of an expert...like me...lol j/k
Here we go:
Prerequisites:
You must know how to invoke a adb shell command already to drop into your phone.
ALL commands in Unix/Linux are case sensitive
For more details, go to this ADB tutorial (very good one): http://forum.xda-developers.com/showthread.php?t=517874
Let's get going:
Once a shell is gained via adb, let's look at some of the basic commands you can do to navigate around the filesystem. Note: you must remove the double-quotes (") for the actual command.
Code:
"cd" = is change directory
to change to any directory, you type: cd dir_name (where dir_name is a full path)
Example: I want to go to /data/local/tmp in my phone, I would do
cd /data/local/tmp <hit ENTER>
You can also use the ".." to go UP one directory.
Example: I'm in /data/local/tmp and I want to go up to /data folder, a command would be: cd ../.. alternatively, if I do cd .. then i'll drop into /data/local folder instead.
Code:
"ls" = list files/directories
to list files/directories within a folder, the command should be:
ls <hit enter> => this will list all NON-HIDDEN file/directories within your CURRENT directory.
ls /data/local/tmp => this will list all NON-HIDDEN file/directories within /data/local/tmp directory.
ls -l => this will list all NON-HIDDEN file/directories within your CURRENT directory, plus additional details. Consider this is like a "Details" view in Windows Explorer.
ls -a => this will list all files/directories (including hidden files) within your CURRENT directory.
ls -la => this will list all files/directories (including hidden files) within your CURRENT directory, plus details.
Code:
"chmod" = change mode
Goes to wikipedia for more details: https://secure.wikimedia.org/wikipedia/en/wiki/Chmod
Most commonly used modes on android phones are:
"755" or "777".
So if you have a root.sh shell script that you downloaded from XDA, and uploaded to your phone and try to execute it with ./root.sh and it said "Permission denied". That means your script does not have the execute permission. You need to do:
chmod 755 root.sh <hit enter>
[B]IMPORTANT: There is *NO* negative sign (-) in front of the mode bit. So it is NOT chmod -755 root.sh[/B]
If you get a "File or directory not found" error, which means you are chmod-ing a file that doesn't exist in your current directory. To execute a chmod on root.sh in /data/local/tmp you do:
chmod 755 /data/local/tmp/root.sh
If you want to chmod an ENTIRE DIRECTORY and ALL files underneath it you do:
chmod -R 755 /data/local/tmp => this will set /data/local/tmp and ALL files/folders underneath it to be 755.
Code:
"chown" = change ownership
Go to wikipedia for details: https://secure.wikimedia.org/wikipedia/en/wiki/Chown
Most common used chown for android is: "root:root" or "root:shell"
Example: if you want to change ownership of root.sh to root:shell then you do:
chown root:shell root.sh
NOTE: the -R (recursive) option is also available for chown.
chown -R root:shell /data/local/tmp
Code:
"pwd" = print working directory
so when you are within a directory and you want to know which directory you are in, then you issue the command:
pwd <hit enter>
The system will reply back with the currently directory you are in.
I'll try to add more if I think of anything else useful, or if you have suggestions, please feel free to add.
Click to expand...
Click to collapse

[GUIDE] How to restore logd to your device/fix adb logcat read failure or empty logs

A few days ago, I flashed a zip onto my phone that set SELinux to permissive. However, there was a problem: it deleted logd, which is essential to adb logcat. Considering I'm an Android developer, that isn't a good thing! It took me a bit to figure out how to get it back, so I'm making this guide to share with you guys to help whatever poor soul has to fix this next.
Note that these steps were designed with Linux in mind, though they might be adaptable to Cygwin/OSX with some effort.
Also, make sure you delete any SELinux permissive scripts from init.d/su.d first!
Prerequisites
The OTA or custom rom zip that your device is currently running
adb
simg2img (available in the Ubuntu software repositories)
sdat2img (available here)
Instructions
Put your OTA/custom ROM zip file in a new folder and unzip it (this example is using the Pure Nexus ZIP):
Code:
mkdir restore_logd
cp pure_nexus_hammerhead-7.0-20161025-HOMEMADE.zip restore_logd
cd restore_logd
unzip pure_nexus_hammerhead-7.0-20161025-HOMEMADE.zip
Now, look for a file named either system.new.dat or system.img.
If you have system.img, then run:
Code:
simg2img system.img system.raw.img
If you have system.new.dat AND system.transfer.list, instead run:
Code:
sdat2img.py system.transfer.list system.new.dat system.raw.img
Either way, you should now have a file named system.raw.img. Next, mount it:
Code:
mkdir system_mnt
sudo mount -t ext4 -o loop system.raw.img system_mnt
This will mount the system image onto the system_mnt folder.
Plug in your device to your computer and make sure USB debugging is enabled, then run:
Code:
adb push system_mnt/bin/logd /sdcard/logd
adb shell
You should now be in a shell connected to your device. Inside, run:
Code:
su
mount -o rw,remount /system
cp /sdcard/logd /system/bin/logd
chmod 755 /system/bin/logd
exit
This will install the logd binary and close the shell.
This next part is very important! Making sure you closed the adb shell and are still inside the directory you created, run:
Code:
ls -Z system_mnt/bin/logd
If the output looks like this:
Code:
? system_mnt/bin/logd
then you have nothing else to do. Otherwise, it might look a bit like this:
Code:
u:object_r:logd_exec:s0 system_mnt/bin/logd
Copy part before the path; in this case, it's:
Code:
u:object_r:logd_exec:s0
Then, run:
Code:
adb shell su root chcon permission /system/bin/logd
replacing permission with the string you copied.
Now you can unplug and restart your device; logd should now be fully working!
Last but not least, run:
Code:
sudo fusermount -u system_mnt
to unmount the system image from your computer.
Enjoy!
Execute command failed while replacing permission
Code:
adb shell su root chcon permission /system/bin/logd
u:object_r:logd_exec:s0
/system/bin/sh: <stdin>[1]: u:object_r:logd_exec:s0: not found

Categories

Resources