I'm having troubles trying to encrypt the phone. with ICS works fine, but after the JB update from CM, phone encryption just does not work.
by example, if I try to encrypt the phone using the GUI, the android robot logo appears and nothing happens (no reboot, no encryption, no nothing).
Then... if I try to use the followings commands:
Code:
su
vdc cryptfs enablecrypto wipe $qwerty123
or
Code:
su
vdc cryptfs enablecrypto inplace $qwerty123
The result is:
Code:
200 0 -1
I don't know what it means, but there is no phone encryption, nor sdcard encryption.
Working ROMS:
Code:
UCLJ3-ATT-NEW.zip
Not Working ROMS:
Code:
cm-10.2-20130905-UNOFFICIAL-i927.zip
pac_i927_4.3.Build-1_20130908-143850.zip
BTW: $ is added here to avoid someone to use that weak password or to use the wipe method which deletes all your current data.
Thanks in advance.
unmanarc said:
I'm having troubles trying to encrypt the phone. with ICS works fine, but after the JB update from CM, phone encryption just does not work.
by example, if I try to encrypt the phone using the GUI, the android robot logo appears and nothing happens (no reboot, no encryption, no nothing).
Then... if I try to use the followings commands:
Code:
su
vdc cryptfs enablecrypto wipe $qwerty123
or
Code:
su
vdc cryptfs enablecrypto inplace $qwerty123
The result is:
Code:
200 0 -1
I don't know what it means, but there is no phone encryption, nor sdcard encryption.
Working ROMS:
Code:
UCLJ3-ATT-NEW.zip
Not Working ROMS:
Code:
cm-10.2-20130905-UNOFFICIAL-i927.zip
pac_i927_4.3.Build-1_20130908-143850.zip
BTW: $ is added here to avoid someone to use that weak password or to use the wipe method which deletes all your current data.
Thanks in advance.
Click to expand...
Click to collapse
Doing some research, I found this:
http://forum.xda-developers.com/showthread.php?t=1754771
and executing logcat, the footer error appeared even if I resized the partition several mb under the size...
In effect, the CM versions does not come with "setprop vold.post_fs_data_done 1". And...
I tried to repack the boot.img that comes with the .zip, but its pretty hard and tricky....
So, this is a request for change :cyclops:
We need both sha256 in kernel, the setprop, and out of the box encryption for /data and /sdcard :$
should be nice to use something better than aes, something like serpent-xts with 512bit (256bit for serpent) xD
unmanarc said:
Doing some research, I found this:
http://forum.xda-developers.com/showthread.php?t=1754771
and executing logcat, the footer error appeared even if I resized the partition several mb under the size...
In effect, the CM versions does not come with "setprop vold.post_fs_data_done 1". And...
I tried to repack the boot.img that comes with the .zip, but its pretty hard and tricky....
So, this is a request for change :cyclops:
We need both sha256 in kernel, the setprop, and out of the box encryption for /data and /sdcard :$
should be nice to use something better than aes, something like serpent-xts with 512bit (256bit for serpent) xD
Click to expand...
Click to collapse
Thanks.
will test, and include next release.
edit:
AES in the kernel:
zcat /proc/config.gz |grep AES
# CONFIG_SND_MAESTRO3 is not set
CONFIG_CRYPTO_AES=y
edit:
encypt works in http://dualhoki.vim.hu/bubor/dev/10.2/cm-10.2-20130911-UNOFFICIAL-i927.zip
I will put pacman update later.
bubor said:
Thanks.
will test, and include next release.
edit:
AES in the kernel:
zcat /proc/config.gz |grep AES
# CONFIG_SND_MAESTRO3 is not set
CONFIG_CRYPTO_AES=y
edit:
encypt works in LINK
I will put pacman update later.
Click to expand...
Click to collapse
Hi!
Thank you very much for your support and work,
I have a little question, I'm unable to encrypt the phone yet, now the message is little different:
Device is already running encrypted, aborting
Click to expand...
Click to collapse
Looking at source, it comes by:
property_get("ro.crypto.state", encrypted_state, "");
if (strcmp(encrypted_state, "unencrypted")) {
SLOGE("Device is already running encrypted, aborting");
goto error_unencrypted;
}
Click to expand...
Click to collapse
and doing getprop:
[email protected]:/ # getprop ro.crypto.state
getprop ro.crypto.state
[email protected]:/ #
Click to expand...
Click to collapse
I also noticed that init.rc still have commented the line "# setprop vold.post_fs_data_done 1"
^_^ thank you so much again.
unmanarc said:
Hi!
Thank you very much for your support and work,
I have a little question, I'm unable to encrypt the phone yet, now the message is little different:
Looking at source, it comes by:
and doing getprop:
I also noticed that init.rc still have commented the line "# setprop vold.post_fs_data_done 1"
^_^ thank you so much again.
Click to expand...
Click to collapse
Haha!
I tricked the android and completed the encryption process... look:
[email protected]:/ # vdc cryptfs enablecrypto inplace 123456
vdc cryptfs enablecrypto inplace 123456
200 0 -1
[email protected]:/ # setprop ro.crypto.state unencrypted
setprop ro.crypto.state unencrypted
[email protected]:/ # vdc cryptfs enablecrypto inplace 123456
vdc cryptfs enablecrypto inplace 123456
[[email protected] ~]$
Click to expand...
Click to collapse
From this point, the encryption process begin and the "encrypting phone" screen magically appears.
However!!! the boot process is not asking for any password... and If you look into "df" or "mount", /data is now a tmpfs with 128M.
I think we still need for setprop vold.post_fs_data_done 1 on init.rc (remove the #), because, without that setprop, the encryption may never work.
http://source.android.com/devices/tech/encryption/android_crypto_implementation.html
Thank you again.
Regards.
unmanarc said:
Haha!
I tricked the android and completed the encryption process... look:
From this point, the encryption process begin and the "encrypting phone" screen magically appears.
However!!! the boot process is not asking for any password... and If you look into "df" or "mount", /data is now a tmpfs with 128M.
I think we still need for setprop vold.post_fs_data_done 1 on init.rc (remove the #), because, without that setprop, the encryption may never work.
http://source.android.com/devices/tech/encryption/android_crypto_implementation.html
Thank you again.
Regards.
Click to expand...
Click to collapse
no need, there is in device specific section.
Strange, my phone was encypted when I ask mount, it says /dev/dm-0
Tried again, and it works with gui (settings->security .....), I use pin code.
My latest cm 10.2 build, full wipe, without sd card (encypt only data)
bubor said:
no need, there is in device specific section.
Strange, my phone was encypted when I ask mount, it says /dev/dm-0
Tried again, and it works with gui (settings->security .....), I use pin code.
My latest cm 10.2 build, full wipe, without sd card (encypt only data)
Click to expand...
Click to collapse
well, lets see whats happening with my phone
thanks again
you did a great work.
unmanarc said:
well, lets see whats happening with my phone
thanks again
you did a great work.
Click to expand...
Click to collapse
after a day of working, I introduce TWRP with encypt support. http://forum.xda-developers.com/showthread.php?t=2225657
bubor said:
after a day of working, I introduce TWRP with encypt support. http://forum.xda-developers.com/showthread.php?t=2225657
Click to expand...
Click to collapse
You were right. "setprop vold.post_fs_data_done 1" does not make any effect on this... xD I used abootimg to repack the boot.img with that option and still does not work
I tried to reformat the partition using the TWRP with ext4 and the 16kb, but nothing yet.
I'll keep trying
thanks for your support again bro.
unmanarc said:
You were right. "setprop vold.post_fs_data_done 1" does not make any effect on this... xD I used abootimg to repack the boot.img with that option and still does not work
I tried to reformat the partition using the TWRP with ext4 and the 16kb, but nothing yet.
I'll keep trying
thanks for your support again bro.
Click to expand...
Click to collapse
do you have enything logcat?
End of the day, I use encypt header on /efs partition not the last 16k, so you dont need reformat.
bubor said:
do you have enything logcat?
End of the day, I use encypt header on /efs partition not the last 16k, so you dont need reformat.
Click to expand...
Click to collapse
I know, I saw the encryptable on fstab.n1, moreover, at the time I used the setprop ro.crypto.state to trick the OS and encrypt my system, and the /efs/metadata created successfully with essiv-sha256, as we expected.
the logcat says what I expected... when I don't have the encryption, it says: already encrypted, but, checking for this message at the android source code, and doing the getprop, I know that is just because the ro.crypto.state is not set.
-----------
I think the problem has something to do with: int do_mount_all(int nargs, char **args)
that function is the responsible to set the ro.crypto.state...
But, ERROR("fs_mgr_mount_all returned an error\n"); does not appear at my logcat :s, so I don't understand why it does not work :s
lol... I will keep trying =) I love OpenSource =)
unmanarc said:
I know, I saw the encryptable on fstab.n1, moreover, at the time I used the setprop ro.crypto.state to trick the OS and encrypt my system, and the /efs/metadata created successfully with essiv-sha256, as we expected.
the logcat says what I expected... when I don't have the encryption, it says: already encrypted, but, checking for this message at the android source code, and doing the getprop, I know that is just because the ro.crypto.state is not set.
-----------
I think the problem has something to do with: int do_mount_all(int nargs, char **args)
that function is the responsible to set the ro.crypto.state...
But, ERROR("fs_mgr_mount_all returned an error\n"); does not appear at my logcat :s, so I don't understand why it does not work :s
lol... I will keep trying =) I love OpenSource =)
Click to expand...
Click to collapse
maybe remove file from efs?
bubor said:
maybe remove file from efs?
Click to expand...
Click to collapse
I tried. but not
getprop |grep crypt
[ro.crypto.state]: [unencrypted]
if you wanna change boot.img, you can find script/programs here
Related
There are many changes on initrd that affect both 2.6.25 and 2.6.32, so:
When you update you need to apply this.
If someone post something like wifi doesn't work and he/she didn't apply the update i'll find a way to burn his phone remotely!
I fixed the problem of wifi for polaris (now we use the same module, thanks dzo)
The new initrd:
switch to correct version of modules between 2.6.25 and 2.6.32
change the name of the device
probably fix data corruption
2.6.32 kernel has a new parameter for fake sync so you can make all test you want (please post results in this thread)
2.6.25 is unchanged so when you flash you change only the initrd.
Haret users please download initrd from here.
if you have problem with data connection please let me know!
I suggest you to download latest version directly from atools.
To apply update you can use the boot menu or atools (BSE->select data and system partitions-> select intall update-> put install-seq.sh in sdcard/andboot/)
Download page here
changelog:
updated androidupdate.tgz with su fix
For releaser:
Entract the update on your distro
remove the /system/etc/ppp directory
put the ppp file (extract the zip) on /system/etc/
Click to expand...
Click to collapse
Release your new distro.
Thank You l1q1d
Appreciate everything you do!
I am a Vogue user on sdcard sys-date.img (not ext2), I have updated the 'must' and used the haret lzma, and zImage-11-23-10 .32 kernel but still get this:
sh:2 unknown operand
Automode for system
/init: line 319: /bin/losetup: not found
/init: line 319: /bin/e2fsck: not found
[ 24.743286] EXT2-fs: unable to read superblock
mount: mounting /dev/block/loop1 on /system failed: Invalid argument
Failed
Failed to mount /system
try now, when i update busybox some apps are moved in /sbin/
Thank you for the info
l1q1d said:
try now, when i update busybox some apps are moved in /sbin/
Thank you for the info
Click to expand...
Click to collapse
Sorry got the same result with the new 'NEED' updated.
Do you have di problem with atools or when you boot?
Somthing is wrong with download link i get this ::
XML Parsing Error: not well-formed
Location: http://androidhtc.git.sourceforge.net/git/gitweb.cgi?p=androidhtc/kernel-release.git;a=tree
Line Number 23, Column 117:function padLeftStr(input,width,str){var prefix='';width-=input.toString().length;while(width>0){prefix+=str;width--;}
--------------------------------------------------------------------------------------------------
try with another browser...
Yep link is working just fine. Tried it in IE8 and firefox with no issues. Sounds to me like your browser is having a hell of a time trying to parse xml.
Well it seems to work ok for me, wifi still works, and I will experiment with the vsync setting later.
One problem, the superuser app doesn't work anymore, typing su in a terminal gives:
su: unknown user root
and now roguetools won't work either obviously.
Any ideas what could have caused this? Clearing superuser data didn't help.
I would try to remove the superuser apk and reinstall it from the market, but I can't remove it because I don't have root access now!
So does each kernel now have it's own module folder?
Yes every kernel has his own dir
for su problem:
Code:
mount -o remount,rw /system
echo "root::0:0:root:/:/bin/sh" > /etc/passwd
mount -o remount,ro /system
l1q1d said:
Yes every kernel has his own dir
for su problem:
Code:
mount -o remount,rw /system
echo "root::0:0:root:/:/bin/sh" > /etc/passwd
mount -o remount,ro /system
Click to expand...
Click to collapse
Unable to mount error (not root)
can we just make a passwd file and put
root::0:0:root:/:/bin/sh
will that work?
BTW, very nice update
clemsyn said:
Unable to mount error (not root)
can we just make a passwd file and put
root::0:0:root:/:/bin/sh
will that work?
Click to expand...
Click to collapse
That worked I am able to su now, it doesn't open my su app but I can logcat and rogue tools work (after letting it sleep)
clemsyn, how did you do it?
I put "root::0:0:root:/:/bin/sh" in system/etc/passwd in an androidupdate.tar, but it hasn't worked, I still get the same error
l1q1d said:
if you have problem with data connection please let me know!
Click to expand...
Click to collapse
I applied the patch to 3 different rom freshly installed, Clemsyn's latest international, Scoot's CyanogenMod RLS4c and latest fat free froyo.
Wifi is working correctly but I cannot get 3g-gprs data to work.
APN seems correctly configured.
Am I the only one?
No overclock, panel 3, tilt, atools 1.02 and 0.11 (tried both)
Thank you for update,
is there any chance, that this update can fix thiis problem?
http://forum.xda-developers.com/showthread.php?t=844695
I flashed like hell on weekend and wasnt able to load any page with any 2.6.25 build (I tested many FroYos and even one Eclair). Sad is, that other than WiFi, system was fast and stable :-/
With 2.6.32 I was able to randomly load google.com page but very slow (less than 1kb/s) and cant connect with google acc still. On the top of that system wasnt so stable as with 2.6.25.
Its really weird, that I am only one, who have problem with loading pages
Can it also be caused by my radio: 1.65.38.14 (Touch Cruise Polaris POLA100 panel=1)? Its great for WM 6.5.3, but maybe not so great for WiFi on Andorid? Or is there anyone with working WiFI and that radio?
Otherwise, can someone post a link to tested and best radio for Android (I prefer Fat Free FroYo build, if someone tested it)
mmec2 said:
clemsyn, how did you do it?
I put "root::0:0:root:/:/bin/sh" in system/etc/passwd in an androidupdate.tar, but it hasn't worked, I still get the same error
Click to expand...
Click to collapse
dont put quotations "".
Grandelama said:
I applied the patch to 3 different rom freshly installed, Clemsyn's latest international, Scoot's CyanogenMod RLS4c and latest fat free froyo.
Wifi is working correctly but I cannot get 3g-gprs data to work.
APN seems correctly configured.
Am I the only one?
No overclock, panel 3, tilt, atools 1.02 and 0.11 (tried both)
Click to expand...
Click to collapse
You are not alone I am also having issues with mobile data. I'll look into it later on. I believe it's just a PATH issue in the sysinit.rc but I could be wrong.
for data connection try this:
Code:
mount -o remount,rw /system
rm -r /system/etc/ppp
ln -s /smodem /system/etc/ppp
mount -o remount,ro /system
@spellshaper: next time use search button in polaris section!!!! Flash 1.59.46.12 radio.
l1q1d said:
Do you have di problem with atools or when you boot?
Click to expand...
Click to collapse
The problem lies when I boot, it's before the animation starts or after the 'D-PAD press' to get into the options menu for installation, etc.
These rom's is not any releases but only Christmas presents for all the flashjunkies on XDA.
My little contribution to the hero community
NR1. CM-6.2.0-RC0-Hero, Built this evening,well all know what it is,apps2sd etc.. + all google apps, everything included.
Wipe of all + ext partion
Flash rom
Well you know yourselves what you should do.
Here > http://www.elelinux.se/extra/CM-6.2.0-RC0-Hero-signed.zip
NR2. Gingerbread_2.3.1_r1_alpha1 This is a pure alpha, borrowed some from Lox_Dev particular solution on how to boot up
How to install then
1: Wipe of all in recovery
2: In recovery, adb shell run command
Code:
mount /system && rm -rf /system/* && umount /system
then flash the rom
3: Reboot boot and then when everything is ready
4: Reboot to recovery and flash gapps and reboot again
5: Enjoy
Rom here > http://www.elelinux.se/extra/Gingerbread_2.3.1_r1_alpha1.zip
Gapps http://www.elelinux.se/extra/gapps-mdpi-2010-10-20-signed.zip
What works in cm rom everything I tried in all cases,and in gingerbread well it's a surprise, at least it is booting up
Credits to erasmux for the kernelsource and to Lox_Dev for the gingerbread rom
Merry Christmas, I wish all
I'm the first one who will say thanx man for youuuuu good work
downloading now and i will leave my feedback soon
thanks and theres me just setting up my new rom lol , merry xmas and a biggg thank you
it gave me an error that i can't remove system/lost+found for CM7
elelinux were do i put the comand mount /system && rm -rf /system/* && umount /system ,, sorry mate a bit new to all this
and fastboot doesn't do anything just say Failed
or adb shell show me an erorr about dev/block/mtdblock3
yadabwoy said:
elelinux were do i put the comand mount /system && rm -rf /system/* && umount /system ,, sorry mate a bit new to all this
Click to expand...
Click to collapse
boot to recovery mod by power and menu and connect ur device by the usb and write in CMD in windows {7 or vista press WINDOWS Button AND R } and write cmd and press enter then write the directory to the sdk in cmd like this
cd C:\AndroidSDK\tools
Click to expand...
Click to collapse
then write adb shell and u will see this # write the command after it directly
required :
SDK
HTC SYNC
sameh_elhakim said:
it gave me an error that i can't remove system/lost+found for CM7
Click to expand...
Click to collapse
I got that. I flashed anyway and it still boots
+1 ..........
sameh_elhakim said:
it gave me an error that i can't remove system/lost+found for CM7
Click to expand...
Click to collapse
You don't need to only flash
elelinux said:
You don't need to only flash
Click to expand...
Click to collapse
sry i didn't understood what u meant
if u mean that i have to write the adb shell command so i did that and all errors above
and i tried to only flash without any command with adb shell but it's failed too
Hmm, the only problem I have is that WiFi gets stuck on obtaining an IP address.
Other than that, it's actually not too bad
sameh_elhakim said:
sry i didn't understood what u meant
if u mean that i have to write the adb shell command so i did that and all errors above
and i tried to only flash without any command with adb shell but it's failed too
Click to expand...
Click to collapse
What I mean is wipe of all(factory reset and dalvik cache), then the command don't care about the errors,then flash and reboot should work for all.
Xtiro said:
Hmm, the only problem I have is that WiFi gets stuck on obtaining an IP address.
Other than that, it's actually not too bad
Click to expand...
Click to collapse
Well as I say, pure alpha but the direction is correct in all cases. the graphics are ok,so for those who have the strength, this is a good rom to build on.
thanks for the reply , i get an error saying mount is not recognized as an internal or external comand ??
This gingerbread actually works pretty well and smooth! I also get the "obtaining address", but it scans okay.
Btw, why ADW and not stock launcher?
Keep it up, Ele
Like i said gooood work :
for who want to know whats working and whats not.:
Working
1-calls
2-SMS
3-High Speed
4-Sounds (ringtons and media )
5-u can install any application on it
6-APP2SD Working Perfectly !!!
7-Gallery 3D
Not Working :
1-WIFI
2-USB doesn't detected
3- Something is worng with Battery use in option i thing the top toolbar have some errors or something in colors
4-Camera
5-No arabic the dev. deleted it and this the worst thing in this release (only for Arabian )
6- Sensor doesn't work at all (Rotation ... etc)
i will update the post if there is anything else....Enjoy and thanx for the dev (LOX & elelinux)
i just hope to see kernel .34 for our htc hero gingerbread soon this will fix alot and gave us alot of speed i think
is it necessary to update from your 2.2.1_update1? Thanks!
Do you have plan to fix flash?
I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.
any way to make the volume adjustment be in smaller increments/jumps? samsung have an addon that allows you to adjust it as fine as you like.
If you're rooted, you can play with the following properties:
Code:
[ro.config.media_vol_steps]: [25]
[ro.config.vc_call_vol_steps]: [7]
Just use 'resetprop' in the su shell, for example:
Code:
> adb shell
$ su
# resetprop ro.config.media_vol_steps 30
Not resetprop, just setprop
great! are those figures of 25 and 7 what they are stock or just example numbers you used? is there any max I can use? I would like to double the current number.
25 and 7 are the stock numbers. Not sure if there is any max. I have not played with those.
They are defined in vendor/build.prop:
Code:
./vendor/build.prop: ro.config.vc_call_vol_steps=7
./vendor/build.prop: ro.config.media_vol_steps=25
96carboard said:
Not resetprop, just setprop
Click to expand...
Click to collapse
setprop won't work as it is a read only property.
Code:
[email protected][/]# setprop ro.config.media_vol_steps 24
Failed to set property 'ro.config.media_vol_steps' to '24'.
See dmesg for error reason.
=>
[29513.011289] init: Unable to set property 'ro.config.media_vol_steps' from uid:0 gid:0 pid:5313: Read-only property was already set
Hi,
would you know how this works on a Moto G6 Plus?
Both above mentioned entries are missing in the build.prop. I however can find a line:
ro.config.vc_call_vol_steps=8
ok i tried this using resetprop as intitally advised. doesn't seem to be working. any clues what is wrong? I'm using adb from my PC, SU is being accepted, resetprop command appears to be accepted. just doesn't change it.
edit:
presumably the build prop file under vendor should reflect changes made?
whatsisnametake2 said:
ok i tried this using resetprop as intitally advised. doesn't seem to be working. any clues what is wrong? I'm using adb from my PC, SU is being accepted, resetprop command appears to be accepted. just doesn't change it.
edit:
presumably the build prop file under vendor should reflect changes made?
Click to expand...
Click to collapse
Did you try rebooting after modifying it? I don't know if that's necessary, just an idea.
roirraW edor ehT said:
Did you try rebooting after modifying it? I don't know if that's necessary, just an idea.
Click to expand...
Click to collapse
yes tried that. there's a build prop editor on the play store. would that work?
whatsisnametake2 said:
yes tried that. there's a build prop editor on the play store. would that work?
Click to expand...
Click to collapse
I do not know the answer to that question. Your mileage may vary and if it were me, I probably wouldn't chance it. When depending on root, always be prepared for the worst. Good luck if you do try it.
I'm sure @foobar66 will give you very sound advice when they have time.
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
VanGreat said:
The purpose of this is to use my phone via scrcpy for my sms verification and stuff.
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Any workaround? thanks
I'm using OrangeFox recovery.
Click to expand...
Click to collapse
Orange Fox has enabled ADB by default. Your screen is broken? How do you know OF has been booted?
VanGreat said:
So far I've tried these methods of editing default.prop/prop.default, and setprop persist.sys.usb.config etc etc
but still undetected from "adb devices"
Click to expand...
Click to collapse
How did you edit these files? Did you un-/repack the recovery.img inside the downloaded zip?
The prop.default in your ramdisk.img shows:
ro.adb.secure=0
persist.sys.usb.config=adb
Everything seems to be correctly from device's site. No need to edit sth.
No. Somehow I need to access to adb on OS and those settings has been disabled on new rom. As I said i need to access to my sms app
You'd like to patch the setting files via recovery to gain access with ADB in system? USB-debugging is toggled off? Are there already the adb_keys of your PC in /data/misc/adb to allow access?
Yes I need to enable usb debugging through recovery.
I think i have to enable adb first before authorizing my device on /data/misc/adb
We do both via OF:
First you should find the needed setting file and check its permissions for restoring it correctly afterwards (assuming you're already in the device's shell by entering 'adb shell'):
Code:
ls -al /data/system/users/0/settings_global.xml
Note the permissions.
Then leave the device's shell and pull the file:
Code:
exit
adb pull /data/system/users/0/settings_global.xml
Open setting_global.xml with an editor and set the line
Code:
package="com.android.settings" defaultValue="0" defaultSysSet="true" /> <setting id="7676" name="adb_enabled"
to value=1
Push the file back:
Code:
adb push settings_global.xml /data/system/users/0
and check the permissions:
Code:
ls -al /data/system/users/0/settings_global.xml
Authorizing:
On your PC search for
Code:
C:\Users\<USER>\.android\adbkey.pub
copy that file into your ADB folder. Then push it to:
Code:
adb push adbkey.pub /data/misc/adb_keys
and set the permissions:
Code:
adb shell chmod 0640 /data/misc/adb_keys
adb shell chown system:shell /data/misc/adb_keys
okay i'm now on your authorizing part, it now says something but it still says unauthorized on "adb devices"
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
USB debugging seems to be active. But I don't know why it says unauthorized. Maybe there is another setting related to ADB in settings_global.xml that needs to be activated for Xiaomi devices like yours.
VanGreat said:
what i actually did was to flash aosp rom and edit build.prop there and set the adb variables
Click to expand...
Click to collapse
Do not edit any file but the setting file. You must not change the props.
something wrong with /data encryption. I for sure pushed the adb_keys on /data/misc/adb but when I rebooted at the recovery or system it goes back nothing.
some say this was aosp system as they won't allow /data modification?
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
If yes, you don't have any problems with encryption
WoKoschekk said:
Are you able to open /data in OF and do you see the folders/files in there? With the correct names?
Click to expand...
Click to collapse
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
VanGreat said:
i only saw recovery folder. also gave me "cant mount /data (invalid argument)" when i try to mount it first.
Click to expand...
Click to collapse
Then you have no chance to activate ADB and get access to your SMS.
assuming encryption is healthy in boot mode, you can enable usb-debugging and authorize RSA key from either /system or boot, no access to /data needed.
this is for custom ROM by modifying /system
[OTA] ADB-Enabler - Flashable UPDATE.ZIP File
This tool is not meant to be used on Android devices with dm-verify or Android Verify Boot (AVB) enabled Every Android device has a stock recovery installed. That default recovery typically at least offers you the 4 options reboot system now...
forum.xda-developers.com
this is for stock ROM by modifying boot
Accessing my phone with a dead screen
So my phone screen connector was liquid damaged. No touch or display. It's an Essential Phone which supports HDMI output, however I can't unlock it because I don't see the lock screen on the monitor I just see a lock icon. I have...
forum.xda-developers.com
take note (on stock MIUI only) scrcpy won't work on xiaomi devices, com.miui.securitycenter prevents that. unless you have bonded mi account, you can't enable USB debugging (Security settings) in developer options.