UMS enable mass storage?? - Galaxy Note 3 Q&A, Help & Troubleshooting

Has anyone got a fix or kernel to help enable UMS mass storage? MTP is a nightmare for compatibility. I know the N9005 has a kernel fix, what about us? Any developer looking into making this type of mod? If not would love if someone can make it. Thank you

AKM03 said:
Has anyone got a fix or kernel to help enable UMS mass storage? MTP is a nightmare for compatibility. I know the N9005 has a kernel fix, what about us? Any developer looking into making this type of mod? If not would love if someone can make it. Thank you
Click to expand...
Click to collapse
You can mount only External SD to UMS after version of android 4.2.2!
Copy this lines to a file and move to /system/etc/init.d and set permission to 777 for phone starting this at boot if you use my kernel:
#!/sbin/busybox sh
BB="/sbin/busybox";
PROP="/system/bin/setprop";
MOUNT_SD_CARD()
{
$PROP persist.sys.usb.config mass_storage,adb;
if [ -e /dev/block/vold/179:33 ]; then
echo "/dev/block/vold/179:33" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file;
fi;
}
MOUNT_SD_CARD;
echo "UMS enabled";

halaszk88 said:
You can mount only External SD to UMS after version of android 4.2.2!
Copy this lines to a file and move to /system/etc/init.d and set permission to 777 for phone starting this at boot if you use my kernel:
#!/sbin/busybox sh
BB="/sbin/busybox";
PROP="/system/bin/setprop";
MOUNT_SD_CARD()
{
$PROP persist.sys.usb.config mass_storage,adb;
if [ -e /dev/block/vold/179:33 ]; then
echo "/dev/block/vold/179:33" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file;
fi;
}
MOUNT_SD_CARD;
echo "UMS enabled";
Click to expand...
Click to collapse
I'm in the init.d but how do I create a file?

AKM03 said:
I'm in the init.d but how do I create a file?
Click to expand...
Click to collapse
Figured out how to create the file now when I move it to the init.d it says it's read only and cannot be moved. :S

How to change the read only so I can move the file I made to init. D?
UPDATE okay took a few apps to enable and help transfer my file..now that I have that done how do I make it start on boot each time? Never done anything like this before, sorry.

Moved here, as this does not belong in the Development Section....

Related

[HOWTO] for Gamers: dirty workaround to have Gameloft files on external_sd

No need for scripts. Search for GL to SD app, much easier.
------
I'm not a heavy gamer, but usually have tons of games installed on my phone for my kid to play with (trying to resist to the "daddy, I wanna a PSP" while I can, at least with the phone I can control when he plays ).
With the advent of HD games, it become more and more difficult to manage multiple game installations on sdcard. The last drop was Asphalt6, with its +500M of downloaded files.... soon will have to use external hard disks to use games on our phones . Most of the "heavy" games are from Gameloft, and the problem lies on the installation pack that doesn't ask for a location to install additional files, always assuming sdcard.
Looked around, and the only workaround I've found was a crack that opens the game apk and changes the download destination directory. Well, I wasn't very comfortable in using this, and it only worked on some games.
So I configured the following "dirty" workaround, I know it's not perfect, but it resolved my problem so I decided to share here.
Basically I've moved gameloft directory from sdcard to external_sd and created a bind mount point called gameloft on sdcard pointing to external_sd. This has the problem that you can only mount that bind point before using the gameloft games, because if you keep it mounted and use storage usb you'll have problems mounting sdcard.
So I've created two scripts - one to mount it, another to unmount it -, and using script manager created a shortcut (actually is a script manager widget) to both scripts on my screen. Whenever I want to use/install gameloft games I mount it, and in the end dismount the bind.
Additional steps for gamming, but restored my sdcard space and now I can use my 16G external sd for that files. Note that if your external card is slow, the game load will be slower.
EDIT: This procedure needs root and busybox. Sorry forgot to mention earlier, I never had my phone not rooted
So, the how-to for anyone who wants to try:
1 - copy /sdcard/gameloft to /sdcard/external_sd/gameloft (if you don't have any GL games installed just create the folder /sdcard/external_sd/gameloft)
2 - remove /sdcard/gameloft/ contents
3 - create the following scripts on sdcard:
mount_gl.sh
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
if [ -e /sdcard/external_sd/gameloft ];
then
busybox mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
else
echo "no gameloft dir on sdcard"
fi;
umount_gl.sh
Code:
#!/system/bin/sh
# UNmounts bind point
if [ -e /sdcard/gameloft ];
then
busybox umount -l /sdcard/gameloft
else
echo "no gameloft dir on sdcard"
fi;
Run first to mount, and check /sdcard/gameloft/ contents. If everything ok, start game and try.
Remember that to simplify you can create shortcuts of the scripts using script manager.
Try not to leave the bind mounted. If by any chance you forget to unmount the bind and use usb storage, you wont be able to mount sdcard, but there's no need to stress . Just unmount usb storage, open adb shell (or a terminal on phone) and issue the command:
# umount /sdcard/gameloft
after that mount usb storage, unmount it again, and everything will be back to normal.
If you at some point regret the change, just move the content of /sdcard/external_sd/gameloft to /sdcard/gameloft/.
The usual disclaimer: I provide this to share my findings, use it at your own risk. AFAIK there's no risk on this operation, besides the fact you could have to download files again if something goes wrong, but I didn't test this on any other phones besides mine.
EDIT 08/19: updated scripts with feedback from thread - added busybox to mount/umount and added -l switch to umount.
Cheers
nice idea.
Can I do this method with symbolic link too?
No. Symlinks are not supported by fat filesystem, the only way I've found was trough bind mount point.
Sent from my GT-I9000 using XDA App
I tried this method and didn't worked for me =(.
When i execute the script in script manager show me this error:
exec sh '/mnt/sdcard/mount_gl.sh'
$ exec sh '/mnt/sdcard/mount_gl.sh'
: not found
/mnt/sdcard/mount_gl.sh: 11: Syntax error: "fi"
unexpected (expecting "then")
tanke234 said:
I tried this method and didn't worked for me =(.
When i execute the script in script manager show me this error:
exec sh '/mnt/sdcard/mount_gl.sh'
$ exec sh '/mnt/sdcard/mount_gl.sh'
: not found
/mnt/sdcard/mount_gl.sh: 11: Syntax error: "fi"
unexpected (expecting "then")
Click to expand...
Click to collapse
It looks like you don't have busybox installed. Do you have it?
My bad, didn't mention it on OP, sorry.
Try to open a terminal emulator on phone and execute:
$ sh /mnt/sdcard/mount_gl.sh
just to make sure its not script manager related.
Sent from my GT-I9000 using XDA App
u can use busybox umount -l /sdcard/gameloft in case umount doesn't work. when sdcard being used by some background program, normal umount not working. Tested with O2X though
I use JVR with latest semaphore kernel and i guess that this kernel has busybox v1.16.2. Am i wrong?
lunasea said:
Try to open a terminal emulator on phone and execute:
$ sh /mnt/sdcard/mount_gl.sh
just to make sure its not script manager related.
Click to expand...
Click to collapse
I tried that on terminal emulator and i get the same error ;S
tanke234 said:
I use JVR with latest semaphore kernel and i guess that this kernel has busybox v1.16.2. Am i wrong?
I tried that on terminal emulator and i get the same error ;S
Click to expand...
Click to collapse
The code is wrong in the mount script, there's duplication
it should be:
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
and make sure you leave the /sdcard/gameloft folder where it is (even though it'll be empty)
shinigamis said:
u can use busybox umount -l /sdcard/gameloft in case umount doesn't work. when sdcard being used by some background program, normal umount not working. Tested with O2X though
Click to expand...
Click to collapse
can confirm this works, OP's unmount brings up 'files in use' or similar error sometimes..
on a side note, didn't know android was so picky when it comes to case.. if "Busybox" is used then you get a busybox: not found error, has to be lowercase
anyway, for the sake of clarity for other users:
Code:
busybox umount -l /sdcard/gameloft
viva.fidel said:
The code is wrong in the mount script, there's duplication
it should be:
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
and make sure you leave the /sdcard/gameloft folder where it is (even though it'll be empty)
Click to expand...
Click to collapse
I'm testing different locations, so no duplication. But be free to optimize the scripts, my programing is quite rusty this days.
Android is linux based, thus sensitive to capitalised words. About mount needing busybox, already happened to me on some rom/kernel combination. Using surface + talon and don't need to add busybox before the commands thought.
Sorry about the problems, like I said only tested on my sgs.
Cheers
Sent from my GT-I9000 using XDA App
Already tested this "script method" and working flawlessly.
Just a note: Hero of Sparta bounced to homescreen when loading main menu (after the opening video). But I can assure you this is not the fault of the script because HoS also not working when using patching method.
XA-R01 said:
Already tested this "script method" and working flawlessly.
Just a note: Hero of Sparta bounced to homescreen when loading main menu (after the opening video). But I can assure you this is not the fault of the script because HoS also not working when using patching method.
Click to expand...
Click to collapse
Dont have HoS, so thanks for the feedback. Maybe gameloft is making some control over the installed files because of illegal copy. Wish they put the same effort on resolving the installation issue, dont know why its so hard to ask the location instead of assuming a location for the download files.
Sent from my GT-I9000 using XDA App
I thought symlinks could do the trick as well (you wouldn't need scripts), but using mount points is a smart way as well! Thanks for sharing!
Will this work on SG2?
justmiike said:
Will this work on SG2?
Click to expand...
Click to collapse
Don't know mate, the scripts are pretty generic thought, as long there's a sdcard and an external_sd dir.
Taptalked... holding it the right way.
good guide!will try it later...coz im a heavy gamer ..cant resist any RPG game..and it really eat so much space in my int SD, here a "thanks" for u
sgsmaniac said:
good guide!will try it later...coz im a heavy gamer ..cant resist any RPG game..and it really eat so much space in my int SD, here a "thanks" for u
Click to expand...
Click to collapse
Thanks... happy gaming
Taptalked... holding it the right way.
justmiike said:
Will this work on SG2?
Click to expand...
Click to collapse
Yes..
The script is generic, you can make it work on another Android Phone with internal SD such as LG, Atrix, etc.
I'm using this patch (Auto_Patch_APK_for_Samsung_by_Duero__include_Java_.exe) in order to place the game data into external memory. Most of Gameloft games work using this method except games which download from market. Just patch the apk file and after install them your game data will stored in folder Gl at your external memory.
So far only this games which not able to patch into external SD
-assassin creed
-hero of sparta
-hawk
Is it possible to mount and unmount usb storage via script?
What I'd like to achieve is the following:
usb storage mount script:
1. unbind directories
2. mount as usb storage
usb storage unmount script:
1. unmount usb storage
2. 10 sec pause
3. bind directories
This way, instead of running the script when playing games (or in my case, using music streaming app such as MOG and Grooveshark), I can run the scripts when I want to mount/unmount as usb storage. After all, I'd be using music apps more than I would use usb storage.

How do I convert rfs to ext2 or ext4 MANUALLY?

How do I convert partitions manually? What are the commands or procedures without using software?
If you have fugumod or g3mod kernel you can put a fs.convert in their respective folders.
Just make a file with notepad and write for example:
stl6 ext4
And save it without .txt extension and put in /sdcard/Android/data/fugumod (if you use fugumod) or sdcard/Android/g3mod (if you use fugumod)
Remember:
stl6 is system
stl7 is data
stl8 is cache
ale_bot from xda app
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
djjonastybe said:
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
Click to expand...
Click to collapse
For that u'll need the kernel to support the fs so it cant be universal
also the manual way is different in different devices
P.S. : This ain't development, ask your questions in general or q/a
Please notice that even if you do convert manually, kernel is still supposed to support ext2/4 file system. Stock kernel does not support it, so in some way you have always to take in consideration which kernel you are running.
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
djjonastybe said:
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
Click to expand...
Click to collapse
I think "universal" is not so easy possible as you would like. Every device has another hardware and so the OS (although it's android) is not the same...
On Galaxy 3 the /system parition is /dev/stl6... not stl12
There is the app G3mod by Dympy / Dharam.
The "manual" way is advised here for you (convert.fs - file)
both ways only work on G3 with fugmod or G3mod-kernel...
If you wanna make your own "universal" app you need to do it the linux-way with mkfs -t ext?? /dev/stl??
with manual commands or within a script (maybe with cases --> "universal") in adb shell during CWM or script at booting, as the filesystems must not be mounted while converting!
However you won't be coming around learning to handle linux!
So I can do this?
su
mount -o remount,rw /dev/stl12 /system
busybox cp /system/* /sdcard/system_backup/
reboot recovery
Click to expand...
Click to collapse
# Now we are in CWM and we unmount /system manually (unless someone gives me the command I can replace this with the command to unmount /system???)
mkfs -t ext2 /dev/stl12
mount -o remount,rw /dev/stl12 /system
busybox cp /sdcard/system_backup/* /system/*
chmod 644 /system/*
sync
reboot
Click to expand...
Click to collapse
Do you think this process would work??? OR do I need to do something more? I believe ALL my commands are correct. Can I proceed or do I have to declare something somewhere so Android knows it's ext2 or is this fine ?
I hope this is ok ? I am going to try it out in two hours...
I tried it to convert it to ext2...
The conversion went succesfull
But after reboot it detects any partition I convert to ext2 as ext4... But ext4 is not supported :/ WTF?
Should I try mke2fs instead?

[Q] FUSE (Filesystem in Userspace) module for Nook Color? Compatibility, injection?

I'm surprised I couldn't find any real information or discussion on the FUSE module/fuse.ko module injection for the Nook Color.
It's a required component of programs, such as Cryptonite, to do on-the-fly mounting of file systems within an Android system, and also to be able to mount NTFS volumes additionally in a USB OTG scenario..
I've searched google, searched through the XDA threads and posts, and the only thing I found with any pertinent information regarding FUSE and the Nook Color was here-- and actually includes the fuse module in it, zipped and contains within the fuse.ko module to inject.
[14 Apr 2012][USER/DEV] USB Host Support & Development [CM7/CM9]
http://forum.xda-developers.com/showthread.php?t=1459892
(second post, attachment at bottom)
So can someone please give me the run down on the current status of FUSE within the kernels and roms currently existing on the Nook Color, must it be manually injected, are kernels set-up to properly use the module?
It seems easy enough to implement, but I'm no real developer, am I just missing something?
With regards to the fuse.ko module attachment in the above thread, I've downloaded the 'fuse.ko' module and placed it on the root of my sdcard, and attempted to load it in on my CM7 rom.
Just SU'd in terminal emulator, output was
# insmod /sdcard/fuse.ko
#
Click to expand...
Click to collapse
and also tried copy and pasting 'fuse.ko' from my sdcard to /system/lib/modules and doing an 'insmod /system/lib/modules/fuse.ko', and it just simply enters it in with a '#' after.
But that doesn't seem to be working. 'lsmod' doesn't output anything, the mount feature is still not working after testing, so it seems it wasn't actually injected properly.
Any suggestions, information someone can provide, would love to get the module inserted and mounting working properly.
Thanks!
Some more digging and experimenting I came across this post which explains similarities (with another android phone) not being able to do the same thing I'm doing, except within the replies there seems to be some basis for support for getting this up, as the terminal commands to check on the fuse module is outputting some commands.
http://code.google.com/p/cryptonite/issues/detail?id=17&can=1&q=fuse.ko
A member trying to provide support for the issue told the poster to input the following commands to get a more in-depth overview of why FUSE support was not working.
Thanks for the bug report. On a root terminal or adb root shell, what's the output of the following commands:
gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
losetup -f
ls -l -a /dev/fuse
ls -l -a /system/lib/modules
Click to expand...
Click to collapse
Now, when I attempt the above commands in my CM7.2, this is my output
$ su
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
gunzip: : No such file or directory​# CONFIG_FUSE_FS is not set​# losetup -f
/dev/block/loop1​# ls -l -a /dev/fuse
crw------- 1 root root 10, 229 Apr 7 22:53 /dev/fuse​# ls -l -a /system/lib/modules
drwxr-xr-x 2 root root 4096 Apr 7 22:18 .
drwxr-xr-x 2 root root 8192 Apr 7 07:52 ..
---xrwxr-x 1 system sdcard_rw 75046 Apr 7 22:18 fuse.ko​
Click to expand...
Click to collapse
So there seems to be SOMETHING there..
Hope this helps, any suggestions/input would be greatly appreciated!
echoedge said:
Some more digging and experimenting I came across this post which explains similarities (with another android phone) not being able to do the same thing I'm doing, except within the replies there seems to be some basis for support for getting this up, as the terminal commands to check on the fuse module is outputting some commands.
http://code.google.com/p/cryptonite/issues/detail?id=17&can=1&q=fuse.ko
A member trying to provide support for the issue told the poster to input the following commands to get a more in-depth overview of why FUSE support was not working.
Now, when I attempt the above commands in my CM7.2, this is my output
So there seems to be SOMETHING there..
Hope this helps, any suggestions/input would be greatly appreciated!
Click to expand...
Click to collapse
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
leapinlar said:
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
Click to expand...
Click to collapse
That's interesting, because the next thing I was wondering about was how to do this on CM10. I don't have enough technical knowledge of the deep file system and module system/actions to make clear judgment on this issue, if the above is the case (which I'm sure it is since I've been around long enough to know that you know your stuff), then I don't know why it's not working by default to mount file systems. Same program.. was going to try to inject it somehow, or at least check the command line feedback on it to perhaps get a clue. If I get a chance I'll post the response, unless someone has some knowledge on it that can help?
But yeah, backing up, apparently what I did WAS succesful. The fuse module was injected (CM7.2).
But it's not a default start-up module. I have to manually do a terminal emulation and input
modprobe fuse
Click to expand...
Click to collapse
And it is working fine :good:
So good deal, let's see what's up with this in CM10
OK, CM10 is a bit different, here's the run-down.
Again, these commands
gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
losetup -f
ls -l -a /dev/fuse
ls -l -a /system/lib/modules
Click to expand...
Click to collapse
The output (BEFORE doing an manual insmod)
$ su
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
# CONFIG_FUSE_FS is not set​# losetup -f
/dev/block/loop0​# ls -l -a /dev/fuse
/dev/fuse: No such file or directory​
Click to expand...
Click to collapse
also "modprobe fuse" outputs "module 'fuse' not found"
now downloading the fuse.ko file from the USB OTG thread and putting it on the sdcard and doing a
# insmod /sdcard/fuse.ko
insmod: init module 'sdcard/fuse.ko' failed (Exec format error)​
Click to expand...
Click to collapse
and then trying to place the 'fuse.ko' in the system/lib/modules, a "modprobe fuse" command now doesn't output 'modprobe: module 'fuse' not found', but
modprobe: 'fuse.ko': invalid module format
Click to expand...
Click to collapse
so it appears the 'fuse.ko' isn't compatible with CM10, only CM7/9 possibly?
But then again it looks like there is a version of the module FUSE already embedded in CM10, but it's of a specific variant which doesn't support the userbase filesystems?? There is no /dev/fuse, but doesn't
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
# CONFIG_FUSE_FS is not set​
Click to expand...
Click to collapse
imply that it is there-- just not configured to mount the file system with a program like cryptonite?
I've tried all I know to do right now, any direction in this? Would like to get this working on both roms for cross-compatibility purposes. Am hoping getting it to work in CM10 is just a small tweak away, but maybe not? Anyone with more knowledge than I can share advice on the workings of this within the CM10 system?
Thanks ​
leapinlar said:
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
Click to expand...
Click to collapse
Yeah, I'm at a loss for what needs to be/could be done.
I don't understand the technicalities of what you're saying leapinlar, sorry, do you care to reiterate?
I'm not sure what you mean by "look at the mount after boot" and you will see /dev/fuse mount, what action is needed to do this?
Is there a fuse.ko in the CM10/CM10.1 file system? If so, where?
The one for CM7/CM9 is just incompatible I'm guessing, so it's saying invalid module format.
What needs to be done is to "modprobe fuse" to activate the module, or something like you were saying above to get it to recognize and make a pathway for /dev/fuse (can you explain again how to enable this?)
Thanks
echoedge said:
Yeah, I'm at a loss for what needs to be/could be done.
I don't understand the technicalities of what you're saying leapinlar, sorry, do you care to reiterate?
I'm not sure what you mean by "look at the mount after boot" and you will see /dev/fuse mount, what action is needed to do this?
Is there a fuse.ko in the CM10/CM10.1 file system? If so, where?
The one for CM7/CM9 is just incompatible I'm guessing, so it's saying invalid module format.
What needs to be done is to "modprobe fuse" to activate the module, or something like you were saying above to get it to recognize and make a pathway for /dev/fuse (can you explain again how to enable this?)
Thanks
Click to expand...
Click to collapse
Go to terminal emulator and type mount. It will display all of the devices mounted. Sometimes on some devices it shows a device /dev/fuse and its properties.
There is no fuse.ko as far as I know. What I was saying is there is a binary file (/system/bin/sdcard) that is invoked during startup to mount the internal sd card via fuse.
I have no clue whether that helps you with your problem or not, I was just telling you that fuse is sometimes used in CM10.
Sent from my Nook HD+ running CM10 on Hybrid SD

[R&D Ubuntu on a rooted Galaxy S4]

After rooting my S4 I was checking around online for any way to boot into ubuntu on it as I think it would look awesome on the S4 and it would run smoother than it did on my dead Note. While snooping around google I was suprised that no one even mentioned trying to run ubuntu on the new Galaxy S4 so I took it upon myself to try to run it through the terminal into vnc.
Sadly after a lot of attempts I keep getting the script to boot I started looking online for a similar ubuntu.sh script and found one for the S3 herehttp://www.redmondpie.com/how-to-run-ubuntu-linux-on-galaxy-s-iii/. So I got it and changed the /sdacrd that most phones have and changed it to /storage/extSdCard as this is where the external sdcard on the S4 is and now get this error in the terminal.
.../storage/extSdCard/ubuntu # sh ubuntu.sh
ubuntu.sh[17]: syntax error: "if" unmatched
I know this is an error in line 17 which is:
if [ -b /dev/block/loop255 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop255 b 7 255
fi
I'm not really familiar with loops and would be happy for some help with this as others might find it useful too.
I have attached the original ubuntu.sh by zacthespack with only the directories changed.
NOTE: I have an ubuntu.sh that I got to boot last night at home, but all I got is a white screen in vnc. zacthespack says it might be a vnc issue but I doubt it as I have tried multiple different vnc's. I will upload the ubuntu.sh when I get home (if zac allows me )
Sorry...first time posting. Anyway to move it?
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Couple of things...
1. You need to boot or chroot into an Ubuntu image (Complete Linux Installer does this)
2. Running Ubuntu natively is pointless and very difficult since you need a working Freedreno setup and the means to hijack the screen
3. What are you trying to do again?
To boot into ubuntu. I have complete ubuntu installer and it still doesn't work.
To be more specific it says "cannot attach image to loop device"
{
"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"
}
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Ubuntu is nice but would like to see backtrack5 . Nothing like a full (well mostly full if chroot) pentest suite in your pocket.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Bender B. Rodgriguez said:
Ubuntu is nice but would like to see backtrack5 . Nothing like a full (well mostly full if chroot) pentest suite in your pocket.
Click to expand...
Click to collapse
Yeah that would be pretty cool too. Im going to look into it on my free time.
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Bender B. Rodgriguez said:
Ubuntu is nice but would like to see backtrack5 . Nothing like a full (well mostly full if chroot) pentest suite in your pocket.
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
fwiw dsploit does ~80% of what BT5 does
http://www.dsploit.net/
jbe4 said:
fwiw dsploit does ~80% of what BT5 does
http://www.dsploit.net/
Click to expand...
Click to collapse
Yeah I agree, Ive used it before. Still like to have the full bt5 suite tho.
Only so much can be done with MITM , session hijacking stuff. I also like to have dirbuster, and the webapp tools as well.
I also prefer not to use tools that any monkey can pick up on. Not that BT is uber-hard and only for the dedicated pentester, but the linux learning curve is enough to keep it out of the hands of the truly unworthy.
greenzone560 said:
To boot into ubuntu. I have complete ubuntu installer and it still doesn't work.
To be more specific it says "cannot attach image to loop device"
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Are you 100% positive that is the correct mount point?
I ask because with Android 4.2.2 they have emulated mount points for the internal SD card but not 100% sure about the external.
Can you browse to the image using an app like ES file Explorer. If so what is the path you used?
Do an 'ls' command from the prompt you showed and see whats there?
jbe4 said:
fwiw dsploit does ~80% of what BT5 does
http://www.dsploit.net/
Click to expand...
Click to collapse
if you truly know your way around BT5, or the newer Kali Linux, no, dsploit does not do ~80% of what they do, but a mere 5% at most.
scrosler said:
Are you 100% positive that is the correct mount point?
I ask because with Android 4.2.2 they have emulated mount points for the internal SD card but not 100% sure about the external.
Can you browse to the image using an app like ES file Explorer. If so what is the path you used?
Do an 'ls' command from the prompt you showed and see whats there?
Click to expand...
Click to collapse
Im not 100% sure that the external SD has emulated points but, it sure seems like it. Yes I can browse it with Root Browser (personal preference). The mount point for ext. sd card is /storage/extSdCard...Im 100% sure of that.
I used motochoppers exploit to root, so I don't know if that makes a difference. As far as I know it should not affect the emulation process since we are at the root level anyways. Vnc and rdp apps work, so emulation on the internal sd is fine. Its just that it doesn't want to bind internal and external into one process...so to speak.
greenzone560 said:
Im not 100% sure that the external SD has emulated points but, it sure seems like it. Yes I can browse it with Root Browser (personal preference). The mount point for ext. sd card is /storage/extSdCard...Im 100% sure of that.
Click to expand...
Click to collapse
yep, that's the correct mount for the external. I had seen this article previously too for bt5, idk if it'll actually help though
Just reread this post. I see you are making good progress here.
As for the vnc issue. When I did a backtrack chroot on my skyrocket there were similar issues. The fix was basically to edit the vnc ui file and set it to the correct screen dimensions of the phone.
Read this and try the sed command to change them accordingly. The path to the vnc files may be different in ubuntu as well.
Sorry if way off base here , just figured I would offer a suggestion
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
---------- Post added at 01:39 AM ---------- Previous post was at 01:38 AM ----------
greenzone560 said:
After rooting my S4 I was checking around online for any way to boot into ubuntu on it as I think it would look awesome on the S4 and it would run smoother than it did on my dead Note. While snooping around google I was suprised that no one even mentioned trying to run ubuntu on the new Galaxy S4 so I took it upon myself to try to run it through the terminal into vnc.
Sadly after a lot of attempts I keep getting the script to boot I started looking online for a similar ubuntu.sh script and found one for the S3 herehttp://www.redmondpie.com/how-to-run-ubuntu-linux-on-galaxy-s-iii/. So I got it and changed the /sdacrd that most phones have and changed it to /storage/extSdCard as this is where the external sdcard on the S4 is and now get this error in the terminal.
.../storage/extSdCard/ubuntu # sh ubuntu.sh
ubuntu.sh[17]: syntax error: "if" unmatched
I know this is an error in line 17 which is:
if [ -b /dev/block/loop255 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop255 b 7 255
fi
I'm not really familiar with loops and would be happy for some help with this as others might find it useful too.
I have attached the original ubuntu.sh by zacthespack with only the directories changed.
NOTE: I have an ubuntu.sh that I got to boot last night at home, but all I got is a white screen in vnc. zacthespack says it might be a vnc issue but I doubt it as I have tried multiple different vnc's. I will upload the ubuntu.sh when I get home (if zac allows me )
Click to expand...
Click to collapse
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Bender B. Rodgriguez said:
Just reread this post. I see you are making good progress here.
As for the vnc issue. When I did a backtrack chroot on my skyrocket there were similar issues. The fix was basically to edit the vnc ui file and set it to the correct screen dimensions of the phone.
Read this and try the sed command to change them accordingly. The path to the vnc files may be different in ubuntu as well.
Sorry if way off base here , just figured I would offer a suggestion
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
---------- Post added at 01:39 AM ---------- Previous post was at 01:38 AM ----------
Sent from my SAMSUNG-SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Nope, not off topic at all. I will look into the .img file and see if anything is different there. Which I'm assuming I will need to change from sdcard to extSdCard for it to let through to the vnc.
I have finally found a solution to the "if" unmatched problem. The ubuntu.sh needs to edited in a linux enviorment because it breaks if you edit it in windows. I will post the ubuntu.sh later today. Also I think I have backtrack 5 down too
EDIT: Okay, I'm stumped...I have no idea why it can't see "system/bin/sh"
Here is the error:
[email protected]:/storage/extSdCard/bt5 # sh bootbt
BACKTRACK 5 IS STARTING PLEASE WAIT...
loop device exists!
net.ipv4.ip_forward = 1
chroot: can't execute '/bin/bash': No such file or directory
....
unmount: can't unmount /data/local/mnt/dev/proc: invalid argument
unmount: can't unmount /data/local/mnt/sys: invalid argument
etc...
losetup: /dev/block/loop255: No such device or address
And here is the script I used:
echo "BACKTRACK 5 IS STARTING PLEASE WAIT..."
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];
then echo "This Script Needs Root! Type : su";exit;fi
chmod 755 /data/local
mount -o remount,rw /dev/block/mmcblk0p5 /system
export bin=/system/bin/
####Sometimes people have busybox installed in /xbin##########
export bin=/system/xbin/
export kit=/storage/extSdCard/bt5
export mnt=/data/local/mnt
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop255 ]; then
echo "loop device exists!"
else
busybox mknod /dev/block/loop255 b 7 255
fi
busybox mkdir /data/local/mnt > /dev/null 2>&1
busybox mkdir /data/local/mnt/proc > /dev/null 2>&1
busybox mkdir /data/local/mnt/sys > /dev/null 2>&1
busybox mkdir /data/local/mnt/dev > /dev/null 2>&1
busybox mkdir /data/local/mnt/dev/pts > /dev/null 2>&1
busybox mkdir /data/local/mnt/sdcard > /dev/null 2>&1
busybox mkdir /data/local/mnt/extSdCard > /dev/null 2>&1
busybox mkdir /data/local/bin/bash > /dev/null 2>&1
if
[ ! -d "/data/local/mnt/sdcard" ]; then
mkdir /data/local/mnt/sdcard
fi
busybox mount -o bind /sdcard /data/local/mnt/sdcard
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Back Track is configured with SSH and VNC servers that can be accessed from the IP:"
if
config wlan0
echo " "
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM"
umount /sdcard
umount /storage/extSdCard
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop255
If anyone can help, then please do Thanks in advance...
Bump. Anyone?
Sent from my GALAXY [S4] SGH-I337 using xda app-developers app
greenzone560 said:
Bump. Anyone?
Sent from my GALAXY [S4] SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Hey greenzone,
I had a few minutes tonight so I took the scripts that worked for the sgs2 and made a few minor changes to them. I got BT5 to boot! VNC only shows the grey screen though. I will have to take a look at it a little closer. Here are the scripts that used.
Drop files in sdcard/bt
image needs to be named bt.img
Busybox needs to be installed in /system/xbin
Bender B. Rodgriguez said:
Hey greenzone,
I had a few minutes tonight so I took the scripts that worked for the sgs2 and made a few minor changes to them. I got BT5 to boot! VNC only shows the grey screen though. I will have to take a look at it a little closer. Here are the scripts that used.
Drop files in sdcard/bt
image needs to be named bt.img
Busybox needs to be installed in /system/xbin
Click to expand...
Click to collapse
Wont boot on mine..I get system/xbin/busybox not found error. I tried changing it to /bin still no go. What can cause that? I tried reinstalling in both of those directories so dont even go there lol
EDIT: here is a screen.
http://s24.postimg.org/nqoclmal1/Screenshot_2013_05_18_21_54_13.png
Sent from my GALAXY [S4] SGH-I337 using xda app-developers app
greenzone560 said:
Wont boot on mine..I get system/xbin/busybox not found error. I tried changing it to /bin still no go. What can cause that? I tried reinstalling in both of those directories so dont even go there lol
EDIT: here is a screen.
http://s24.postimg.org/nqoclmal1/Screenshot_2013_05_18_21_54_13.png
Sent from my GALAXY [S4] SGH-I337 using xda app-developers app
Click to expand...
Click to collapse
Hrmm..
It definitely looks like busybox is not in /system/xbin from your output. I know you said not go to there but just verify the busybox binary is there. ( ls /system/xbin/busybox).
You can also change the "busybox path" variable in all the scripts to point to where you have busybox installed.
Also all the files and the bt image need to be in /sdcard/bt or the script will not work anyways. Or you can edit the path in the "kit" variable in the scripts to point to the folder you are using on your external sd card.
also run in order
installbt.sh
startbt
bt

[TIPS][SCRIPTS][ROOT]egingell's scripts. Updated 11/22/13 11:30 MST

I will be using this thread to post my scripts and link them to other threads as needed. For this thread, I am assuming you know what you're doing. You don't need mad hacking skills and you don't need to be an expert (I'm sure as hell not), but knowing your way around the file system and basic shell scripting are helpful.
Some background: I am using the stock ROM and kernel (SGS2 - GB27, SGS4 - MDC), so all of my tips revolve around using stock and all of my scripts (even the flashable ones) will work without flashing from recovery (just extract the script from the ZIP and execute it while the phone is in phone-mode - you know... powered on ).
You are welcome to use my scripts in your apps. I only ask that you give me some credit.
I am not responsible for bricking your phone. I have only tested my scripts on my personal Samsung Galaxy S2 and S4 from Sprint. You are welcome to try on your phone, but I offer no warranties or guarantees as to whether they will work or not. Back up your ****!
All of this requires root!
Below is a list of the scripts I have written for y'alls. Enjoy.
Custom df: Shows where irregular mounts ("mount -o bind") are mounted. [ Forum post | Download ]
Currently doesn't work on my SGS4.
Easily move Phonesky.apk and GoogleServicesFramework.apk to /system or /preload for Multi DPI Play Store. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work.
Use your SGS2's internal SD card for Link2SD instead of making a second partition on your external SD card (although, depending on the setup, you may still need to make a tiny partition on your external SD card) and your external SD card as your internal SD card [ Forum post ]
Untested on my SGS4. I have no need for it.
Clean up Link2SD: Delete files associated with Link2SD when uninstalling it. It does not revert the links Link2SD makes. It only deletes the mount scripts. [ Forum post | Download ]
If you use the debuggerd script to enable init.d, running this script will cause you to lose init.d.
Untested on my SGS4, but there's no reason to think that it won't work.
Delete Samsung's bloatware from the Sprint SGS2. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work; however, it was written specifically for the SGS2's bloatware. See thread S4 System Apps Safe To Remove for a list of SGS4 bloatware apps.
Google Home Launcher (from Kit Kat).
Works on Jelly Bean.
Below are some other tweaks.
You can use custom boot animations with the stock ROM. All you need to do is swipe a "/system/bin/bootanimation" binary file from another ROM (such as @rujelus22's Blu Kuban FL24 (ICS) or Blu Kuban GB27 (JB 4.1.2)), paste it into "/system/bin", and make it executable.
For JB 4.2.2, make sure the user and group are root and shell respectively. This doesn't seem to be a problem with JB 4.1.2 and below. It's also possible that my initial testing involved a boot animation that didn't work on my SGS4, so if it works with root as both user and group, then roll with it. :good:
Also for JB 4.2.2, use the file from a JB 4.2.2 ROM, such as The Blu Kuban S4.
You can enable init.d scripts very easily by renaming "/system/bin/debuggerd" to "/system/bin/debuggerd.bin", replace it with the following, and make both files executable. If "/system/bin/debugger.bin" already exists, then edit "/system/xbin/busybox run-parts /system/etc/init.d" into "/system/bin/debuggerd".
As with the above, make sure the user and group are root and shell.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/debuggerd.log
echo "$(date)" > $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "$(date) finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Below are some tips.
Most of the things you can do with a custom kernel, you can do with the stock kernel, it just requires more work and more risk.
If you replace an odexed system app with a deodexed system app, make sure you delete the app's ODEX file (it's the same file name except with the extension .odex).
Conversely: if you replace a deodexed system app with an odexed system app, you better have the ODEX file to go with it.
You can clear the dalvik-cache without a custom kernel by deleting the contents of "/data/dalvik-cache". You can even delete an individual app's dalvik-cache by finding the file "/data/dalvik-cache/[email protected]@[email protected]" or "/data/dalvik-cache/[email protected]@[email protected]" and delete it.
You can manually uninstall a system app's update by finding the file "/data/app/.apk" and delete it.
You can manually delete all user data by deleting the contents of "/data/data". You can even delete an individual app's data by finding the folder "/data/data/" and delete it.
Making scripts and binaries executable:
They must be on an EXT formatted filesystem (e.g. /data, /system, /preload).
They must be at least readable and executable by the user 'shell' (755 (read/execute for all, write only for user - "u=rwx,a=rx" if your busybox supports that method) is what I usually use).
Code:
chown root:shell ""
chmod 755 ""
chmod u=rwx,a=rx "" # busybox must support symbolic modes
Changing file permissions requires read/write access to the filesystem on which the file resides:
Code:
mount -o remount,rw /system # make the /system partition read/write
mount -o remount,ro /system # make the /system partition read only
The stock kernel is considered "production" whether or not it's rooted; therefore, you cannot use ADB to push or pull files directly to or from protected partitions, nor run ADB as root, nor use ADB's remount command, so you have to use unprotected partitions as a sort of buffer. You can, however, access the ADB shell and issue the "su" command wherein you can use "cp" to copy files to or from protected partitions prior to using ADB to push or pull the desired file. However, there is an app aptly named [root] adbd Insecure by @Chainfire that patches the ADB daemon to get around this limitation.
Example:
Code:
c:/android-sdk> adb shell
[email protected]:/ $ su
[email protected]:/ # cp /system/bin/debuggerd /sdcard/debuggerd
[COLOR="green"]-- open a new command prompt window --[/COLOR]
c:\android-sdk> adb pull /sdcard/debuggerd debuggerd
c:\android-sdk> adb push debuggerd /sdcard/debuggerd
[COLOR="green"]-- switch to the first command prompt window --[/color]
[email protected]:/ # mount -o remount,rw /system
[email protected]:/ # cp /sdcard/debuggerd /system/bin/debuggerd
[email protected]:/ # chown root:shell /system/bin/debuggerd
[email protected]:/ # chmod 755 /system/bin/debuggerd
[email protected]:/ # mount -o remount,ro /system
Some noteworthy files and folders:
/proc/self/mountinfo: If you can read it, it tells you where your partitions and folder binds are mounted.
/proc/partitions: Shows all of your SD card's partitions, how many blocks each has, and their vold numbers (eg "179 1 30578964 mmcnlk0p1").
/dev/block/platform/dw_mmc/by-name: This folder contains symlinks to your internal eMMC's partitions indexed by what they are for (eg UMS for your internal SD card - "realpath /dev/block/platform/dw_mmc/by-name/UMS" will print out the device path (ie "/dev/block/mmcblk0p11")).
/dev/block/platform/dw_mmc/by-num: This folder is like the previous except that they are indexed by partition number (eg "p11").
/proc/version: Shows what version of Linux is currently being used.
/data/system/batterystats.bin: Delete this when your battery is fully charged and still plugged in to recalibrate it.
Footnotes:
For "/data/app", "/data/data", and "/data/dalvik-cache" files you need to know the package name. There are various apps that will tell you, including Link2SD (mentioned above), Titanium Backup, and the web URL of the app in the Play Store (ex: https://play.google.com/store/apps/details?id=com.devname.appname).
More:
Random boot sound using your notification sounds
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
Stock ROM - SGS4 - init.d
No-data restore tips
SGS4 Bloatware Remover
Make apps run faster and increase battery life
Random boot sound using your notification sounds
The attached ZIP contains a script that can be run pre or post boot. It just needs to be executable.
Preboot requires init.d. See the OP for enabling it if you are on a stock rooted ROM and requires the file to be readable and executable ("chmod 755" works fine).
Postboot requires an app such as Scripter (ROM Toolbox) or Script Manager to execute the script at boot.
Requires the variable $RANDOM. You can make sure it's available from the command line ("echo $RANDOM").
Use this script at your own risk. I provide no warranties or guarantees.
What does this script do?
Check for carrier boot up sounds (sub folders in the "/system/media/audio/ui" folder) and moves them to "/system/media/audio/notifications" renaming them as needed.
Create symlinks in the above folders to "/system/media/audio/ui/PowerOn.ogg".
Check if "/system/media/audio/notifications/PowerOn.ogg" is present and copy it to "/system/media/audio/ui/PowerOn.ogg" it's not.
Count the number of files in "/system/media/audio/notifications".
Grab a random number between 1 and the number of files found inclusive (math notation: "[1, numFiles]").
Go through "/system/media/audio/notifications" and copy the file at index random to "/system/media/audio/ui/PowerOn.ogg".
Notes:
The stock file is included. If you want a different sound in its place, you can either comment out that line in the script and delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications" or just replace "/system/media/audio/notifications/PowerOn.ogg" with some other sound file and still delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications".
If you want more sounds, just copy them to "/system/media/audio/notifications" (OGG files only).
The script does not check for valid files and blindly renames the destination file to "PowerOn.ogg".
It does not look in "/sdcard/media/audio/notifications" or anywhere else for audio files.
I do not recommend using alarms or ringtones files as they are usually looped which can cause the media scanner to get stuck and overheat your phone or tablet - those files may continue to play even if you can't hear them.
If you can't hear a sound on boot, it is likely that the file is either invalid or has no audio (ex: my /system/media/audio/ui/BST/PowerOn.ogg has no audio).
It was tested and works on a Samsung Galaxy S2 (stock JB 4.1.2) and a Samsung Galaxy S4 (stock JB 4.2.2) both from Sprint and using stock kernels.
There's no obvious reason it won't work on other phones and tablets with other ROMs from other carriers.
Nice work E.
cerj said:
Nice work E.
Click to expand...
Click to collapse
:good:
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
With Android 4.2.2, ADB now requires RSA keys. This poses a problem when attempting to connect to the device's ADB server from the device itself and the device won't ask for authorization unless it's connected via USB. Well, there's hope, yet.
For the following, I'm assuming you used my method for adding init.d support to your device.
Use these scripts at your own risk. I provide no warranties or guarantees.
Add the following script to /system/bin/debuggerd. If you use an alternate method, please note that it must be executed by the debugger daemon. You must do this first or you'll have to manually restart the debugger daemon after editing this file and executing the run-once script (next step), so edit this file first and save it.
Code:
if [ ! -e "/.android" ]; then
busybox mount -o rw,remount /
mkdir /.android
mount -o bind /data/.android /.android
busybox mount -o ro,remount /
fi
Then run this script once from the device (not over ADB on your PC).
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
HOME=/data
adb kill-server
adb start-server
stop adbd
cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys
echo "" >> /data/misc/adb/adb_keys # Add a blank line at the end of the file
start adbd
HOME=/
adb kill-server
stop debuggerd
start debuggerd
Notes:
You can also find the abdkey.pub file on your Windows' PC here, C:\Users\<user name>\.android\adbkey.pub. Copy it to your device by whatever means necessary, then append it to /data/misc/adb/adb_keys and you won't need to initially use the USB to allow the PC connection. Not really necessary unless your PC has no USB or you've broken your USB cable.
This may have inadvertently corrected the mounting issue introduced in Jelly Bean 4.2.2.
You can also allow other Android 4.2.2 devices, but it requires ADB version 1.0.31 and for you to manually append the contents of /data/.android/adbkey.pub from device A (the one you want to use to ADB on) to /data/misc/adb/adb_keys on device B (the target device).
Don't delete /data/.android
This won't fix apps. Just allow you to use ADB to connect to your device from itself.
Tested on my SGS4. No reason it won't work on other devices.
If you already have a /data/.android directory, you may not need to do this. On my SGS4, HOME defaults to "/" which the ADB daemon can't write to, so it can't make the RSA key.
The run-once script temporarily changes HOME to "/data", a writable directory, so the ADB daemon can write the RSA key then it append it to the allowed clients file then restarts the debugger daemon thus binding /data/.android to the /.android directory allowing all Linux users ADB access to the device.
Reassigning HOME to a new value on one user only changes its value for that user which is why I'm binding /data/.android to /.android.
Code:
# Example
[email protected]:/ $ echo $HOME
/
[email protected]:/ $ HOME=/data
[email protected]:/ $ echo $HOME
/data
[email protected]:/ $ su 1000
[email protected]:/ $ echo $HOME
/
Alternatively (much easier):
Make the .android folder in /data (mkdir /data/.android).
Add the script, the first code block in this post, to your debuggerd file or an init.d script.
Restart the debugger (stop debuggerd; start debuggerd) or reboot the phone.
Restart ADB (stop adbd; start adbd).
Copy the newly created public key to the allowed clients (cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys; echo "" >> /data/misc/adb/adb_keys).
Restart the ADB server (adb kill-server; adb start-server).
SGS4 Bloatware Remover
I have written a live-script to delete all of the SGS4 bloatware except GoogleContactsSycAdapter and SecLauncher3. If you want to delete those, remove the "#" from that line in the script. If you want to exclude an app, add a "#" to that line and put the app name in quotes (ie AppName / becomes "#AppName" / (including the forward slash) or just remove that line. If you remove the last item (YouTube in this case), remove the forward slash from the previous line.
Use this scripts at your own risk. I provide no warranties or guarantees.
What this script does:
Move the app's APK and ODEX to /sdcard/SystemAppsBackup.
Delete its dalvik-cache.
Reboot the phone. If it doesn't reboot, you'll have to do this yourself.
What this script does not do:
Delete the app's data. Because the script doesn't know the package name.
Delete its Play Store update (located in /data/app). Because the script doesn't know the package name.
Mount the SD card if it's not mounted. If you want backups, make sure the SD card is mounted.
Care if you delete a system app you wanted to keep. Most apps that you would want to keep may be available in the Play Store.
Restore apps.
Notes:
Apps will crash left and right when you execute this script in running mode. Don't fret, this is normal.
This is a live-script which means you have to manually execute the script either with a terminal emulator, a script executor like Scripter, or ADB.
This is not flashable.
If executing via ADB in Recovery mode, you may need to mount the SD card to /storage/sdcard0 manually or settle for no backups.
If you restore an app from /sdcard/SystemAppsBackup, make sure you get the ODEX file if present and set the permissions for both to 644.
This list is based off the list in the thread, S4 System Apps Safe To Remove.
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
bigtobitobs said:
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
Click to expand...
Click to collapse
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
egingell said:
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
Click to expand...
Click to collapse
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
bigtobitobs said:
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
Click to expand...
Click to collapse
Would that I could.
Sent from my SGS4.
Make apps run faster and increase battery life using Xposed App Settings.
Did you install GravityBox on your SGS4 then uninstall it and now you can't hear your games or music?
I think it has to do with GravityBox's "Volume Steps" option not undoing when GB is uninstalled. This is how I fixed it (forum post).
Stock ROM - SGS4 - init.d
I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn't working. So, I did this and now it works.
Make a file named "install-recovery.sh" and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.
Code:
chown shell:shell "/system/etc/install-recovery.sh"
chmod 755 "/system/etc/install-recovery.sh"
chmod u=rwx,a=rx "/system/etc/install-recovery.sh" # busybox must support symbolic modes
Use this script at your own risk. I provide no warranties or guarantees.
My "/system/etc/install-recovery.sh" script:
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
LOG="/data/install-recovery.log";
echo "Executing install-recovery.sh" > $LOG;
echo "" >> $LOG;
echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[COLOR="green"]# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.[/COLOR]
for N in /system/etc/init.d/*.sh; do
su -c "$N" 1>>$LOG 2>>$LOG
done;
Notes:
Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
$(date) does not provide the correct date (mine said: "Wed Apr 15 13:24:13 MST 1970").
The Package Manager is not available. (There may be other unavailabilities, but I don't intend to test it thoroughly.)
Somethings I discovered recently while doing a no-data system restore for the second time in the same night and some tips relating to system restores:
* When doing a no-data restore, disabled/frozen system apps remain disabled.
* Apps that can't be disabled even with Titanium Backup will not remain disabled after a reboot and will sometimes crash/FC repeatedly until uninstalled.
* If an app won't open or FCs, try converting it to a system app and back to user app or vice versa.
* Don't integrate system app updates into the ROM. In the event that you have to do a no-data restore, those updates will be retained.
* Don't convert user apps to system apps for the same reason.
* Disregard the previous two tips if disk space is a problem. It's just more time consuming (redownloading updates, reintegrating, and reinstalling) after a restore.
* Save all modified system files, such as /system/bin/debuggerd, /system/build.prop, /system/etc/install-recovery.sh, and if your ROM uses /system/etc/unit.d, any modified or extra files there. If you use them, you'll need them after a restore.
* For a smoother post no-data restore, use Titanium Backup's labels so you can batch-uninstall those pesky system apps you don't want.
SGS2 - JB 4.1.2 GB27
SGS4 - JB 4.2.2 MF9
any command for updater script to make directory in root of android ??
HassanMirza01 said:
any command for updater script to make directory in root of android ??
Click to expand...
Click to collapse
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
egingell said:
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
HassanMirza01 said:
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
Click to expand...
Click to collapse
Yes.
Sent from my LG-H811 using Tapatalk
:good:

Categories

Resources