[Q] Turning keypad backlight off patching filesystem - Android Software/Hacking General [Developers Only]

Hi, my phone is a samsung galaxy y PRO. Android 2.3.6 rooted
I am trying to disable the keypad backlights...
In here:
\sys\class\backlight\keypad-led\brightness
when i set it to 0, the lights turn off, and after that i change the file permissons to 444 with chmod.
But when i turn off screen and turn on again (stand by mode) the keypad lights turn on again, and when i go to edit the brightness file again, it shows the value 255.
Any solutions?? Also when i try to remove the file (via terminal with SU) i get a operation not permitted message.
Help please.
Thanks!

BTW, i will donate do the guy that makes it work!

Dumb question, is /system set as r/w?
Sent from my LG-P999 using xda premium

Yes, i tryied with total comander, setting system to r/w

Well, then the alternative is copy it via cwm and set the permissions in the script. I can't do it right now, I about to start work, but if no one has handled this by the time I am off and home, about 9:00pm CA time, I will get it set up.
Sent from my LG-P999 using xda premium

Please do that! I will get in here asap. Cya in a few hours.
Thank you for trying to help!

BTW, i tryed to install ClockworkMod via Rom Manager but it says that there is no support with my samsung galaxy y Pro (GT-B5510)...

Ok, i got a temporary ClockworkMod that i can use when needed...

Ok, did some researching of my own for your phone, check your pm.

Ok, this is sort of simple, the file is called "brightness" and its content must be a zero "0". Thats it. The file must be placed in "/sys/class/backlight/keypad-led/".

I don't know how the script you need should look like, but commands to change the file to disable keypad light should be:
echo 0 > /sys/class/backlight/keypad-led/brightness
And the permission command:
chmod 444 /sys/class/backlight/keypad-led/brightness

I know the basic of how it should look and what is needed for it to work, I have a zip I made for myself for copying over ringtones and notifications from a flashable zip. I need to have what partition it's on and (since I guess it's /sys and not /system) be able to mount /sys so Tue file can be copied. The ROM I found it's for your phone. There seems to be very limited data on your phone. Like I said, I have the zip mostly set up, I just need to make sure my mount command will work and for that I need more info. I think I have it but I can't verify that I do.
Sent from my LG-P999 using xda premium

How can i help? I have sent you some info about partition on private msg...

Here is the file... It is zipped, just extract it...
About the partition, Mount command shows: "sysfs /sys sysfs rw, relatime 0 0 "
BTW, i have been checking and the correct path to the file is: "/sys/devices/platform/keypad-led.0/backlight/keypad-led"
The other path i told you before was a link to this one... Sorry...
Complete result of mount command:
$ mount
rootfs / rootfs rw,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp4370 0
/dev/stl10 /cache rfsrw,nosuid,nodev,relatime,vfat,llw,gid/uid/rwx,iocharset=cp437 0 0
/dev/stl6 /mnt/.lfs j4fs rw,relatime 0 0
/dev/stl12 /efs rfsrw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
/dev/stl11 /data rfsrw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
Can you do something with this? I hope so...

hmm, we may have to change our strategy, maybe not. I need to see about a couple of things before I have you try anything.
On an interesting note, I noticed that for /sys the values after realtime are 0 0, I'm mostly familiar with PC's and learn as I go on Android, but if that means what I think it means, that partition can't be modified at all while the system is booted.
On my phone that directory is mounted, but there are no files that I am able to view either via Droid Explorer or Root Explorer.

Do you know anyone else that could join us on this adventure? do you have anything else in mind? I am able to set the file to 0, but there are some events that set it back again to a certain value, like screen off and on, etc...
I dunno why or how, but i set it to 0, i apply chmod 444 but it still changes the file to a certain value...

News?

Yes.
Place the attached script in: /system/etc/init.d/
reboot and you should be good. Found the info here:
http://forum.xda-developers.com/showthread.php?t=1488492&page=4
Some say it works, some say it doesn't.
edit: file attached, just take it out of the zip file.

I don't have the folder /init.d/ in the /system/etc/ folder :|
This means i don't have init.d support...

Ok, i found a way to run it during boot time:
How to run the scripts during the boot using SManager:
Steps to run the scripts during the boot:
1. Test the scripts out completely before start to run on boot.
2. From the SManager tool, select su and boot icon. Exit the application and reboot the phone.
3. If you did not change the SManger config, then you will see the SManager log after the boot. Check if everything is fine. If the scripts run OK many times without any issue, then you can uncheck the option showing SManager log after the boot.
And during boot it writes 0 to the file and it changes its permissions to 444. But even without the permission to write on the file, the system is able to change the value in the file!

Related

Jailbreaking G1

breaking..ok, old news: RC30 (jailbreak fix)
http://www.tgdaily.com/content/view/40063/140
Curious about this. Im not in the know enough to do anything with root, but for all of you that have access, if others update, will they be able to use anything that you develop or create with access to root? hopefully....
I 'm wondering how can I prevent this. I'm in about the same boat as you honda. Root is a stranger to me... But, I'm sure it would suck if I get stuck out side of the loop :/
sonikamd said:
I 'm wondering how can I prevent this. I'm in about the same boat as you honda. Root is a stranger to me... But, I'm sure it would suck if I get stuck out side of the loop :/
Click to expand...
Click to collapse
If you look there is another thread where someone else posts what to do... although he hasn't got the files on the forum yet he is having some issues uploading them.
sonikamd said:
I 'm wondering how can I prevent this. I'm in about the same boat as you honda. Root is a stranger to me... But, I'm sure it would suck if I get stuck out side of the loop :/
Click to expand...
Click to collapse
JUST DON'T UPDATE TO RC30. It's that simple.
If you don't understand how to get root, just wait till someone (I would but haven't had time) makes a very detailed yet simple method.
Ah, I'm still running RC19 and have yet to experience Google's update process.
I thought the update was mandatory and done without user input, just a "congratulations, you phone is now a little slower!"
So we can just deny the update with the stock sw?
sonikamd said:
So we can just deny the update with the stock sw?
Click to expand...
Click to collapse
When you get the OTA update, it pops up a message window asking if you want to install. You say either say yes, or "not right now". I think it will keep bugging you to install, and possibly go ahead and automatically install it if you say "not right now" enough times. (I'm not positive about that.. I just remember seeing something like that when I was looking through the source for the updater app).
I think it works like Windows updates, it gives you option to update now or later and if neither is hit in a certain time it will install it automatically. I am going to test this when my update comes. I will hit Update later and see what it does. but i have read others comments saying they never seen the update now or later window and got the new version anyhow.
I'm on the train right now so someone else (or me) can post detailed directions. But if you get root and rename/remove /etc/security/otakeys.zip they (probably) can't update you automatically.
While that file is in place they might be able to upgrade without prompting (anyone want to search the code for info?)
UPDATE: They -can- forcibly update you: http://forum.xda-developers.com/showthread.php?goto=newpost&t=443328
google should wonder ppl do thing themselves...wen they have to come up with 3 update in less than a month....there always worried about security and not functionality..lol...i mean cmon i had to buy a new sdcard jus to get RC 29...cause it sure wasnt commin to me via OTA....i wonder wat i have to do to get RC 30..
SmartBrother90 said:
google should wonder ppl do thing themselves...wen they have to come up with 3 update in less than a month....there always worried about security and not functionality..lol...i mean cmon i had to buy a new sdcard jus to get RC 29...cause it sure wasnt commin to me via OTA....i wonder wat i have to do to get RC 30..
Click to expand...
Click to collapse
Correct spelling and punctuation may be a good place to start
sonikamd said:
Ah, I'm still running RC19 and have yet to experience Google's update process.
I thought the update was mandatory and done without user input, just a "congratulations, you phone is now a little slower!"
So we can just deny the update with the stock sw?
Click to expand...
Click to collapse
Well, I accepted RC29 and I've noticed the phone is faster and has better battery life.
I've also been very conservative with usage because I'm waiting to install and run apps from the SD card.
jailbreaking the t-mobile RC30 update
From what I have read so far it is not possible to re do the images on the G1 because of the RC30 patch from T-Mobile. Mainly because you do not have root, and the second because without root you can't remount the /system partition as RO.
adb allows you to mount the /system partition as RW. Would this not do the trick.
Code:
./adb shell
#mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
This was the out put that I got. Now to run the remount from adb.
Code:
adb remount
-
remount succeeded
now to make sure that this really worked.
Code:
./adb shell
-
# mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 rw 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
as you can see the /system directory is not in rw mode and not ro mode.
To test to see if this is the case.
Code:
vi test.push (:wq)
adb push test.push /system
adb shell
# cd /system
# ls
test.push
lib
media
framework
fonts
etc
build.prop
bin
usr
sounds
recovery.img
app
lost+found
As we can see this did seem to work. I do not have a T-Mobile RC30. I have mine jailbroken already. with the steps that JesusFreke laid out.
I was wondering if it would be possible to do the same steps but with using adb to mount the fs in rw, and then using adb push to push the recovery.img to the device into the /system dir.
doing another push of the test.push file seems to take.
Code:
adb push test.push /system
vi test.push (i incerted the leter i)
adb push test.push /system
0 KB/s (2 bytes in 0.048s)
adb shell
# cat /system/test.push
i
#
So this might be the break that people are looking for that have the T-Mobile RC30. JesusFreke I know that you said that you have one with an RC30 from T-Mobile. Would you be willing to try this at the risk of bricking the phone? I know that is a $400 question, or anyone else for that matter.
If you do try it, please let me know the results. I have a friend, whos wife has the RC30 from T-Mobile. He is not willing to risk his wife's wrath.
It works on emulator.exe but will the live RC30 adb server accept remount? I notice that there are no references to remount in the official documentation. Alas I don't have any official RC30 G1 to test with.
Id bewilling to trythis right now. I have a Modded RC30 that I will update to the official RC30 that I am sending back anyways for defects. Anyone wanna tell me how to flash mine back to Official RC30 and Ill get to trying.
mouseclone said:
From what I have read so far it is not possible to re do the images on the G1 because of the RC30 patch from T-Mobile. Mainly because you do not have root, and the second because without root you can't remount the /system partition as RO.
adb allows you to mount the /system partition as RW. Would this not do the trick.
Code:
./adb shell
#mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
This was the out put that I got. Now to run the remount from adb.
Code:
adb remount
-
remount succeeded
now to make sure that this really worked.
Code:
./adb shell
-
# mount
rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/mtdblock3 /system yaffs2 rw 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p1 /sdcard vfat ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8 0 0
as you can see the /system directory is not in rw mode and not ro mode.
To test to see if this is the case.
Code:
vi test.push (:wq)
adb push test.push /system
adb shell
# cd /system
# ls
test.push
lib
media
framework
fonts
etc
build.prop
bin
usr
sounds
recovery.img
app
lost+found
As we can see this did seem to work. I do not have a T-Mobile RC30. I have mine jailbroken already. with the steps that JesusFreke laid out.
I was wondering if it would be possible to do the same steps but with using adb to mount the fs in rw, and then using adb push to push the recovery.img to the device into the /system dir.
doing another push of the test.push file seems to take.
Code:
adb push test.push /system
vi test.push (i incerted the leter i)
adb push test.push /system
0 KB/s (2 bytes in 0.048s)
adb shell
# cat /system/test.push
i
#
So this might be the break that people are looking for that have the T-Mobile RC30. JesusFreke I know that you said that you have one with an RC30 from T-Mobile. Would you be willing to try this at the risk of bricking the phone? I know that is a $400 question, or anyone else for that matter.
If you do try it, please let me know the results. I have a friend, whos wife has the RC30 from T-Mobile. He is not willing to risk his wife's wrath.
Click to expand...
Click to collapse
The RC30 you have from JesusFreke gives the adb daemon root permissions. What you listed will not work on a Google RC30.
Koush said:
The RC30 you have from JesusFreke gives the adb daemon root permissions. What you listed will not work on a Google RC30.
Click to expand...
Click to collapse
Meaning that as soon as you type in adb shell and hit enter it will not even start the daemon?
Get official RC30 zip (here), use SignApk.jar from AndroidMod.zip (here) on it and place it in root of sdcard as update.zip. Reboot into recovery and Alt+S.
ballaholyk84 said:
Meaning that as soon as you type in adb shell and hit enter it will not even start the daemon?
Click to expand...
Click to collapse
Most likely it just gives the shell at $ instead of #.
Edit: gah, dyslexic.
Koush said:
The RC30 you have from JesusFreke gives the adb daemon root permissions. What you listed will not work on a Google RC30.
Click to expand...
Click to collapse
I was thinking that was just for the adb shell command. The adb remount is something that is in the helpfile from the SDK. Just typing in adb will give you the list of commands to use.
If not going though the shell how ever, did they disable all of adb's root privs? If you have one and try the remount and get a success, the adb still has root privies, just not on with the adb shell command.
Really this is just a thought. I wish that I really had a device to test it on.

/efs not mounted - need help from Linux experts and others rooted i580x users!!!

After a sleepy ODIN flash, using SPICA ops with G3 firmware => STUPID??? NO, not done yet , next ODIN flash segment, accidentally stick clear phone EFS via Debug options (DOUBLE CRAZY!!!) NOW i lost the precious IMEI and /efs partitions corrupted as well.
i've got the fixed nv_data.bin and both stl4.img and bml4.img from [email protected] (attached). Thanks for his kindness and supportive to the community!
But even with those i still can't fix the issue!!!! /efs did not mounted via mount command...
as in a GOOD G3, mount command result will be as below:
Code:
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
/dev/block/stl6 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
/dev/block/stl7 /data rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
/dev/block/stl8 /cache rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0
[B]/dev/block/stl4 /efs rfs rw,nosuid,nodev,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0[/B]
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,f mask=0702,dmask=0602,allow_utime=0020,codepage=cp4 37,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
in my case the bold line just missing... so this is must be the problem.
I tried to do the same as SPICA's method as below:
Code:
$su
#dd if=/sdcard/bml4.img of=/dev/block/bml4
#reboot
It's OK then but...
Code:
$su
#dd if=/sdcard/stl4.img of=/dev/block/stl4
/dev/block/stl4: cannot open for write: Invalid agrument
With this error my /efs cannot be mount... and still missing from the mount command. I'm just a linux noob so pls help me out. How can i restore the stl4 partition properly???
My girlfriend now really mad at me due to she don't have her beloved phone this christmas already. OMG!!!!!
and to all rooted i580x user Pls kindly help compare your "good" /efs folder... maybe mine missing something???? due to one time Erase Phone EFS using Odin Debug Options.
Mine /efs now as below:
Code:
/efs/nv_data.bin
/efs/imei/.nvmac.info
/efs/.files/.dm33 (empty folder)
/efs/.files/.dx1 (empty folder)
/efs/.files/.mp301 (empty folder)
And if you can do adb shell, it'll be very kind of you by sharing your good backup stl4 and bml4 - for research purpose (those partitions did not content any of yours personal data - so PLS HELP!!!). Pls do the backup partions as below and share your img here if possible.
Code:
$su
#cat /dev/block/stl4 > /sdcard/efs_dev-block-stl4.img
#cat /dev/block/bml4 > /sdcard/efs_dev-block-bml4.img
TIA and Best Regards
P/S: when do the ls /dev/block/stl* the stl4 is there but cannot restore using the backup img. it's weird...
Code:
#ls /dev/block/stl*
/dev/block/stl1
/dev/block/stl10
/dev/block/stl2
/dev/block/stl3
/dev/block/stl4
/dev/block/stl5
/dev/block/stl6
/dev/block/stl7
/dev/block/stl8
/dev/block/stl9
same for bml4...
I suggest you remove the images.zip
This contains your IMEI, so anyone can clone it.
Szaby59 said:
I suggest you remove the images.zip
This contains your IMEI, so anyone can clone it.
Click to expand...
Click to collapse
This zip only bml4.img and stl4.img, the fixed nv_data.bin still inside the phone @ SAMSUNG SC . Now they still can not redo IMEI yet so i must find someway else.
kenblat said:
This zip only bml4.img and stl4.img, the fixed nv_data.bin still inside the phone @ SAMSUNG SC . Now they still can not redo IMEI yet so i must find someway else.
Click to expand...
Click to collapse
fixed ur phone yet? noob idea: can u try flashing but this time with the right ops?
were you able solve the problem? I am facing exactly same problem.

[Q] CLEAN reboot app/applet == mission impossible?

Anyone found anything that cleanly reboots the system (normal reboot/into recovery)? Must have tried at least 20 of these things and all result in overclocking not applied after reboot due to unclean shutdown...
Is this an Android bug or what? Power off/power on via the HW button works correctly.
(Froyo 2.2.2 here, other details - see signature.)
C'mon, folks, second thread I have posted and once again am I talking to myself...
simmer down now - i've always used and had recommended to me Quick Boot.
its always kept my cpu settings afterboot.
question is if your HW button reboot doesnt reset cpu, why do you want an app?
jessehclark said:
question is if your HW button reboot doesnt reset cpu, why do you want an app?
Click to expand...
Click to collapse
Hmmm? Well, it is obviously more convenient? Or because it can boot to recovery and other modes as well without breaking your fingers trying to press the required buttons combo?
Why not root and get cyanogenmod or set cpu overcpock
Sent from my U20i using XDA Premium App
daproman said:
Why not root and get cyanogenmod or set cpu overcpock
Click to expand...
Click to collapse
I am rooted.
SetCPU or No-Frills does not matter, exactly the same problem since they both check for unclean shutdown and no not overclock automatically after reboot (feature, not a bug).
Again, the problem here is unclean shutdown, not SetCPU or anything else really.
I would say the issue is this: http://forum.androidcentral.com/899945-post5.html - except that it does not quite make sense why does a power off / power on cycle work cleanly and reboot does not.
I have seen many people having the same problem on different ROMs, so - I am seeking a technical explanation and solution, not workarounds.
Code:
# cat /system/etc/vold.fstab
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.1/mmc_host/mmc0
# vdc volume list
110 sdcard /mnt/sdcard 4
200 Volumes listed.
# mount
rootfs / rootfs ro,noatime,nodiratime 0 0
tmpfs /dev tmpfs rw,noatime,nodiratime,mode=755 0 0
devpts /dev/pts devpts rw,noatime,nodiratime,mode=600 0 0
proc /proc proc rw,noatime,nodiratime 0 0
sysfs /sys sysfs rw,noatime,nodiratime 0 0
/dev/block/mtdblock1 /system yaffs2 ro,noatime,nodiratime 0 0
/dev/block/mtdblock9 /data yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
/dev/block/mtdblock3 /lgdrm yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
tmpfs /mnt/asec tmpfs rw,noatime,nodiratime,mode=755,gid=1000 0 0
/dev/block/mtdblock8 /cache yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
/dev/block/vold/179:2 /data/sdext2 ext4 rw,noatime,nodiratime,barrier=0,data=ordered 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,a
llow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0
702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Technical explaination(1): there is no public API to ask for a phone reboot.
Quick rebooting apps just call the command "reboot" (from a "hidden" terminal, let me put it this way for simplicity's sake) which reboots the phone without "shutting down" the Android UI layer.
(1): call it guesswork, really. I haven't checked CyanogenMod's source to see what they do in the power-poweroff button.
hrk said:
Technical explaination(1): there is no public API to ask for a phone reboot.
Quick rebooting apps just call the command "reboot" (from a "hidden" terminal, let me put it this way for simplicity's sake) which reboots the phone without "shutting down" the Android UI layer.
(1): call it guesswork, really. I haven't checked CyanogenMod's source to see what they do in the power-poweroff button.
Click to expand...
Click to collapse
Good, moving in the right direction. I guess I should have posted this in the development section in the first place... meh.

[Guide] Undelete / Data Recovery - Internal Memory

Hello here is a guide to Recover Deleted files from internal memory From Any android Phone
You Need
1.Rooted Android phone ( In my case i used Note 2 N7105 )
2.Install busybox ( Note : Install in /system/bin NOT at system/xbin )
3.Drivers Installed on your computer
4.Download The Recovery Tool.rar [ https://www.box.com/s/zw0sfprtlx4dqysd018o ]
5. Download Recuva [ http://www.piriform.com/recuva/download ]. This is the Software going to recover your file , or you can use your favourite Data recovery software . But i suggest Recuva
Steps :
1. Take your rooted phone . Go to Setting->Devoloper Option -> Tick on Stay awake and USB debugging
2.Connect your Phone to the Computer , Let the driver Install .
3.Extract Recovery Tool.rar to c:/ ( You will Find two folder AB and Cygwin )
4.Click Start -> Run ,
Type " CMD " Press Enter
5.Dos Window will open up Now Type " cd c:\ab\ " Press Enter
6. Type " adb devices " Press Enter
** Make sure it returning out Some numbers (IMEI) under list of devices
7.Type " adb Shell mount " Press Enter
Now this is something important , After the command adb shell mount it will give a long List you need to fine "dev/block/mmcblkop"xx" /data(or user data "
Note : The xx can be any number
In N7105 its " mmcblk0p16 " is data Partition .
The last two number (xx) will change from mobile to mobile . Just note the partition name . In my case its " mmcblk0p16 "
8.Close the CMD window . Go to My Computer->C:/->Cygwin->Open Cygwin Terminal
9.Type " export PATH="/cygdrive/c/ab":$PATH " Press Enter
10.Type " adb forward tcp:5555 tcp:5555 " Press Enter
11.Type " adb shell " Press Enter
12.Type " su " Press Enter
13.Grant Superuser Right on your Phone
14.Type " /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p16 " Press Enter
15.Minimize the window , Open another cygwin Terminal i.e. My Computer->C:/->Cygwin->Open Cygwin Terminal
16.Type " export PATH="/cygdrive/c/ab":$PATH " Press Enter
17.Type " adb forward tcp:5555 tcp:5555 " Press Enter
18.Type " cd /aa " Press Enter
19.Type " nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p16.raw " Press Enter
20. Now let it Run this will take long time for me it took me One hour to complete
21.After it Compltes Click start->Run Type " cmd " Press Enter
22. Type " cd c:\cygwin\aa\ " Press Enter
23.Type " VhdTool.exe /convert mmcblk0p16.raw " Press Enter
24.Now Close Everything .. Right Click My Comuter->Manage
25.Now Select Storage-->Disk Management.
26.In the menu select Action-->Attach VHD.
27.For Location enter " c:\cygwin\aa\mmcblk0p16.raw " and select the OK button.
28.Right-click on the name (e.g. "Disk 1") to the left of the Unallocated space and select Initialize Disk.
29.Select the GPT (GUID Partition Table) radio button and select the OK button.
30.Right-click on the Unallocated space and select New Simple Volume...
31.In the Wizard select Next>, leave the default for the volume size, select Next>, select a drive letter (e.g. K), select Next>, MAKE SURE to select
the 'Do not format this volume' radio button, select Next>, select Finish.
32.A box will pop up asking you to format the drive. You DO NOT want to format the drive at this time.
33.Right-click on the RAW space and select Format... MAKE SURE to change the File system to FAT32. Set the Allocation unit size dropdown to 'Default.' MAKE SURE that the Perform a quick format checkbox is CHECKED. You do not want to overwrite the entire new drive with all zeroes (0's) and destroy your data. Quick Format means that it will only attempt to destroy the index for the drive by establishing a new index. Without this box checked the Windows operating system will write zeroes (0's) across the entire volume, potentially destroying your data. Select the OK button.
34.A box will pop up saying that Formatting this volume will erase all data on it. That would be doubly true if you actually didn't check the 'Perform a quick format' checkbox. Double check that you actually did check the box and select the OK button.
35.Open the Piriform Recuva application. In the wizard select the 'Next >' button. Select the 'Other' radio button and select Next >. Select the 'In a specific location' radio button and enter: k:\ (assuming K is the drive letter you chose...) Select the Next > button. Select the Enable Deep Scan checkbox.
36.The application may take about an hour to do the 'Deep Scan.'
37.Once the application has returned its results you can choose which files to recover using the checkboxes. Select the 'Recover...' button and choose the location to which you wish to output your files.
No need to Thank me , This is not my work , i just gathered information and some Copy/Paste . Have a nice day
Note : Im not Responsible if you brick your phone . I did this and it worked for me . So im Sharing with you guys .
THANKS A LOT WARTICKLER , Its his work
Galaxy Nexus Users can look at his thread for - > http://forum.xda-developers.com/show....php?t=1994705
:laugh:
Reserved
I might need it
help identifying partitions
capt.nizam said:
7.Type " adb Shell mount " Press Enter
Now this is something important , After the command adb shell mount it will give a long List you need to fine "dev/block/mmcblkop"xx" /data(or user data "
Note : The xx can be any number
In N7105 its " mmcblk0p16 " is data Partition .
The last two number (xx) will change from mobile to mobile . Just note the partition name . In my case its " mmcblk0p16 "
Click to expand...
Click to collapse
Hello, I'm hoping to get some help.. as you can see this is my first post and I'm a total noob. I accidentally flashed my phone this morning have been working all day trying to recover some of the pictures. I've been at it all day and asking for help is my last resort.
When I run the "adb shell mount" command in step 7, I can't find "dev/block/mmcblkop"xx" anywhere. I did also try the same command with a captal S in Shell like in your post, but that seemed to just bring up help commands (I did look for mmcblkop in there too, nothing). I looked through all sorts of posts and searched for another way to identify the userdata partition for my phone, but couldn't find any other way to do it. The closest I found was this post ( http://forum.xda-developers.com/showthread.php?p=28115791 ) but due to my lack of knowledge, I don't know what program those commands work in. I tried running:
"su
ls -l/dev/block/platform/omap/omap_hsmmc.0/by-name/" command in cygwin terminal and a terminal emulator on my nexus but neither worked.
Eventually I just guessed and used "mmcblk0p12" since it was listed in the post I linked, and followed through the rest of your directions. It did work, but it seems like the partition I recovered didn't have any of my photos in it. It was a just a bunch of zip files containing folders with what seemed to be application info, lots of pictures of ads used in apps and app icons. So this gives me hope that maybe I can recover some of my data if I could locate the correct partition. ANY help would be greatly appreciated!
I have a Verizon Galaxy Nexus CDMA running 4.1.1
Kernel Version 3.0.31-g396c4df
Build number JRO03O
I used WugFresh Nexus Root Toolkit v1.6.2 this morning to unlock and root phone.
This is the data that is returned when I run the "adb shell mount" command:
c:\AB>adb shell mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro,relatime,barrier
=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro,relatime,barrier=1
,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 rw,nosuid,nodev,noati
me,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data ext4 rw,nosuid,nodev,noa
time,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,d
efault_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.discoverfinancial.mobile-1 ext4 ro,dirsync,nosuid,nodev
,noatime,barrier=1 0 0
/dev/block/dm-1 /mnt/asec/com.duckduckgo.mobile.android-1 ext4 ro,dirsync,nosuid,node
v,noatime,barrier=1 0 0
/dev/block/dm-2 /mnt/asec/jp.co.canon.bsd.android.aepp.activity-1 ext4 ro,dirsync,nos
uid,nodev,noatime,barrier=1 0 0
Again, any pointers would be welcome. Thank you for reading.
Same Issue
I've been a stalker of Xda since I received my Nexus 7 a month ago, finally have a problem i can't just search my way through. The fact the file system has that stupid 0 folder and inside really messed me up.... when I deleted it. I'd like it back. and I need help.
I have the same issue as the person above, running adb Shell mount lists commands but adb shell mount shows almost the exact same thing as the above.
c:\AB>adb shell mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,noatime,user_xattr
,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,nosuid,nodev,noatim
e,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=writeback,noauto_d
a_alloc,discard 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,nosuid,nodev,noatime
,errors=panic,user_xattr,acl,barrier=1,nomblk_io_submit,data=writeback,noauto_da
_alloc,discard 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_i
d=1023,default_permissions,allow_other 0 0
After running
[email protected] /aa
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p38.raw
(the 38 at the end is because I'm on a different device) I get
$ nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p38.raw
0 B 0:00:00 [ 0 B/s] [<=> ]
and than about three seconds later, i get
[email protected] /aa
again. Help?
thanks!
for phones unable to connect via "Mass Storage"...
hi all
Thanks to all those that made this recovery option possible!
What I learned:
i have a razr hd, latest update, therefore no mass storage conx ability, so the method described in this thread is CRUCIAL.
different phones have different data partition labels....long story short, install DiskDigger from PlayStore, open DiskDigger, allow superuser once, a list of "blocks" will be shown, specific to your phone.
look for the " /data " line
you want the info within the parentheses " (...) " after " /data " ;
i replaced the data block in instruction #14
[14.Type " /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p16 " Press Enter]
with my specific data block, or " /dev/block....... "
I have received a lot of help from this forum and hope this helps someone else
bad news for me is that I still lost a lot of my jpg's, but this thread helped me recover what little I could
Thanks for the Guide!
However i just manage to recover those photo and files which located in Whatsapp folder and Wechat Folder, I did not manage to recover all photo from Camera Folder.
Anyone encounter the same issue with me ?
1 Connect your Android device to the computer
You need to enable USB debugging on your Android phone. According to the Android OS version running on your device, choose a way to enable it.
1) For Android 2.3 or earlier: Enter "Settings" < Click "Applications" < Click "Development" < Check "USB debugging"
2) For Android 3.0 to 4.1: Enter "Settings" < Click "Developer options" < Check "USB debugging"
3) For Android 4.2 or newer: Enter "Settings" < Click "About Phone" < Tap "Build number" for several times until getting a note "You are under developer mode" < Back to "Settings" < Click "Developer options" < Check "USB debugging"
2 Scan your Android device for lost data
After enabling the USB debugging, you'll get the window as follows. Click "Start" to anaylize your device.
3 Preview and recover contacts, messages, photos and video from Android
When the scan completes, you'll get a scan result below. You can preview SMS, contacts and photos scanned out. Choose those you need and click "Recover" to preserve them on your computer.
Read more:
Ruuker said:
Hello, I'm hoping to get some help.. as you can see this is my first post and I'm a total noob. I accidentally flashed my phone this morning have been working all day trying to recover some of the pictures. I've been at it all day and asking for help is my last resort.
When I run the "adb shell mount" command in step 7, I can't find "dev/block/mmcblkop"xx" anywhere. I did also try the same command with a captal S in Shell like in your post, but that seemed to just bring up help commands (I did look for mmcblkop in there too, nothing). I looked through all sorts of posts and searched for another way to identify the userdata partition for my phone, but couldn't find any other way to do it. The closest I found was this post ( http://forum.xda-developers.com/showthread.php?p=28115791 ) but due to my lack of knowledge, I don't know what program those commands work in. I tried running:
"su
ls -l/dev/block/platform/omap/omap_hsmmc.0/by-name/" command in cygwin terminal and a terminal emulator on my nexus but neither worked.
Eventually I just guessed and used "mmcblk0p12" since it was listed in the post I linked, and followed through the rest of your directions. It did work, but it seems like the partition I recovered didn't have any of my photos in it. It was a just a bunch of zip files containing folders with what seemed to be application info, lots of pictures of ads used in apps and app icons. So this gives me hope that maybe I can recover some of my data if I could locate the correct partition. ANY help would be greatly appreciated!
I have a Verizon Galaxy Nexus CDMA running 4.1.1
Kernel Version 3.0.31-g396c4df
Build number JRO03O
I used WugFresh Nexus Root Toolkit v1.6.2 this morning to unlock and root phone.
This is the data that is returned when I run the "adb shell mount" command:
c:\AB>adb shell mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/system /system ext4 ro,relatime,barrier
=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/efs /factory ext4 ro,relatime,barrier=1
,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache ext4 rw,nosuid,nodev,noati
me,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data ext4 rw,nosuid,nodev,noa
time,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,d
efault_permissions,allow_other 0 0
/dev/block/dm-0 /mnt/asec/com.discoverfinancial.mobile-1 ext4 ro,dirsync,nosuid,nodev
,noatime,barrier=1 0 0
/dev/block/dm-1 /mnt/asec/com.duckduckgo.mobile.android-1 ext4 ro,dirsync,nosuid,node
v,noatime,barrier=1 0 0
/dev/block/dm-2 /mnt/asec/jp.co.canon.bsd.android.aepp.activity-1 ext4 ro,dirsync,nos
uid,nodev,noatime,barrier=1 0 0
Again, any pointers would be welcome. Thank you for reading.
Click to expand...
Click to collapse
I know this is an old post, but I see no one answered your question.
Hers your answer here "/dev/block/platform/omap/omap_hsmmc.0" so I am going to guess that you use omap_hsmmc.0 instead of the mmclk0p
Seeing every phone is different and they don't all have user data at mmclk0p or have the samething dump out with adb shell mount.
This is what I did to find the correct info for my userdata.
Now when you are in terminal and type adb shell mount you may get stuff like this
/dev/block/platform/msm_dscc.1/by-name/userdata
Click to expand...
Click to collapse
Now to find the info needed to your user data, you will need terminal on your phone or, see i already had cygwin terminal open and connected to the phone with adb shell. I typed SU to become super user. I then followed this thread here http://forum.xda-developers.com/showthread.php?t=1743872 and used this command to get the info I needed( the command is wrong in that thread so I will correct it here.
Tpye this in terminal now
Code:
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name/
It should spit out something like this now
lrwxrwxrwx root root 2012-07-01 01:03 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-07-01 01:03 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2012-07-01 01:03 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-07-01 01:03 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-07-01 01:03 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2012-07-01 01:03 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-07-01 01:03 param -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-07-01 01:03 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-07-01 01:03 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-07-01 01:03 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-07-01 01:03 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2012-07-01 01:03 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2012-07-01 01:03 xloader -> /dev/block/mmcblk0p1
Click to expand...
Click to collapse
In this case you will see userdata is mmcblk0p12. This is for a Nexus. I am using a Galaxy S3 and it works on it too. Mine was mmcblk0p15 instead. I hope this help some people out.
I had success recover deleted files from android phone memory card with an android phone data recovery guide:
how to recover data from android phone
The tutorial is really helpful and easy to follow. I recommend that you try it if you need to recover files from android phone.
Addings
Hi, first of all - thanks!
This saved all my vacation pictures!
Note: the link box.com/s/zw0sfprtlx4dqysd018o is obsolete
You can download cygwin and Android SDK separately instead, it will change some of the paths.
It doesnät matter if Busybox is in /bin or /xbin
One tricky thing about some Xperia phones:
These phones have a "virtual SD card where most of the deleted files are stored.
I don't understand why - there is no SD card slot - but that's how the design is made.
Nevertheless. When running the df command you'll notice this, and your files wont be stored in /data
My files were found in something like /SD/179:16
Good luck!
UNDELETE
There an android app called undelete, i found it on blackmart it might do the job for you
A big THANKS
tool.rar link is outdated can u upload it again
Thanks
Great guide.....
After doing most of it I realised I didn't have enough space to create my raw file.....
So now I don't know what I need to free up is it the d:/ or c:/ or my phone.....
I have the same problem
I have tha same problem.
According to the instruction I can't copy the raw file.
I check the path in my computer and I foud a raw file empty.
I have confirmed the partition name: mmcblk0p12.
Finally, have you solved your problem?
Va1ha1a said:
After running
[email protected] /aa
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p38.raw
(the 38 at the end is because I'm on a different device) I get
$ nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p38.raw
0 B 0:00:00 [ 0 B/s] [<=> ]
and than about three seconds later, i get
[email protected] /aa
again. Help?
Click to expand...
Click to collapse
is it possible to recover deleted titaniumbackup folders like this??
I wanna try this to get back my lost Data from Xperia Z Internal SD Card but i cant download it from https://www.box.com/s/zw0sfprtlx4dqysd018o
Maybe anyone got another link?
hi,
my device is Xperia Z1 rooted & locked bootloader, FW KK .757... when i try to do the command i get this adb wait-for-device - block until device is online
so i didn't find anything after typing ''adb Shell mount'' looks like it shows my phone as offline, but i followed all the steps correctly! usb debugging + screen awake!
why i got this?
thx

NEC Terrain: ADB/CDC Serial Driver, 3e Recovery Password, and Root

Those of you who are trying to root the NEC Terrain, I've slapped together an ADB driver from the NEC NE-103T to help you out. Basically, I just modified the INF file. Really, we're supposed to use driver version number NA002 with the Terrain but I could only find NA001. It works though and you can get ADB shell etc. Despite the ADB access, I was unsuccessful at rooting the NEC Terrain with SuperOneClick and Root_with_Restore_by_Bin4ry etc. Hopefully, posting these drivers here will help someone else in cyberspace develop a feasible root method.
Here's what the zip file contains:
Obviously the modified ADB driver for NEC Terrain use
Not sure if this is correct but I also applied the ADB driver to the CDC Serial Driver and Windows didn't have a problem.
Here's what I need:
Root Method
Default Recovery Password - NEC password protected recovery mode. :-/
(Sigh), they weren't kidding when they said this phone was secure! I know this is not going to be a popular phone but dang it, I love blackberry keyboard-style Android phones and I really need a decent rooted phone to replace my aging Motorola Pro/Pro+.
tl;dr - I'm providing the missing drivers for the NEC Terrain. Someone please find a way to root it cause I've tried everything! Also, I'm looking for the default password to use Android Recovery 3e.
Hello, Is there anyway we can have help from other people to root this device?
I have tried with SuperOneclick also and with UnlockRoot and it didn't work.
Let me know. I am willing to do anything to make this work except of course stupid stuff.
Thanks Danik
Good news:
I found an exploit over here that gains a root shell (binary attached).
Bad news:
Unfortunately, even from there, running "mount -o remount,rw /system" fails.
Similarly, since /data is marked nosuid, you can't use any su command you install in there.
So...
I am able to remount / as rw and then drop an su command in /sbin. I also set up busybox in /data/local/tmp/xbin and mounted it over /system/xbin and included a link to /sbin/su in there. Of course, that gets overwritten on reboot but it's simple enough to do all this in a script and seems to be enough to get SuperSU and TiBu to run.
The next step is to figure out how to patch boot.img to disable ro.secure, etc. Extracting it should be easy now that we have root. We just need to find the right partition. There seem to be plenty of tools around for working with these images. Then we need someone brave enough to flash it back and try it.
Good news
This is good news...
One problem now, is that there is A LOT of partitions (+30).. It will take some time to get through them...
But it's a step in the right direction... great work...
/Martin
justDave said:
Good news:
I found an exploit over here that gains a root shell (binary attached).
Bad news:
Unfortunately, even from there, running "mount -o remount,rw /system" fails.
Similarly, since /data is marked nosuid, you can't use any su command you install in there.
So...
I am able to remount / as rw and then drop an su command in /sbin. I also set up busybox in /data/local/tmp/xbin and mounted it over /system/xbin and included a link to /sbin/su in there. Of course, that gets overwritten on reboot but it's simple enough to do all this in a script and seems to be enough to get SuperSU and TiBu to run.
The next step is to figure out how to patch boot.img to disable ro.secure, etc. Extracting it should be easy now that we have root. We just need to find the right partition. There seem to be plenty of tools around for working with these images. Then we need someone brave enough to flash it back and try it.
Click to expand...
Click to collapse
MrMEEE said:
This is good news...
One problem now, is that there is A LOT of partitions (+30).. It will take some time to get through them...
But it's a step in the right direction... great work...
/Martin
Click to expand...
Click to collapse
Look at 9 and 11.
justDave said:
Look at 9 and 11.
Click to expand...
Click to collapse
You are right.. There are some boot stuff (kernel and init's) on parts 9 and 11..
I have changed the ro.secure in the inits.. but I'm not able to reflash the two partitions..
I don't get any errors from dd, but got the following messages in dmesg:
<<mmc_write emmc lock write error 0x00097800 : 11
Besides from that, a lot of I/O errors.. so seems like the phone is EMMC locked as well..
hey folks, I managed to get an unlocked terrain. No joke, really unlocked! I just got it from ebay and I am using it on the Telus network in Canada. If it helps your effort to unlock it, let me know if there is any files or even the rom from this phone that you want to see. I just need instructions. On the side note, IMO, the phone is actually quite decent despite that it's running on slower CPU. It's more than capable of running all the most common apps on the market. My only problem is that the "system storage" only has 787M, while the "phone storage" has 4.34G. I can't install apps directly to the phone storage and that 787M is not enough for my use. It would be nice if I can re-partiion all the space and allocate all 4.5G to system.
Please let me know what I can do to help. Would love to see this phone root as well.
Cheers
MrMEEE said:
You are right.. There are some boot stuff (kernel and init's) on parts 9 and 11..
I have changed the ro.secure in the inits.. but I'm not able to reflash the two partitions..
I don't get any errors from dd, but got the following messages in dmesg:
<<mmc_write emmc lock write error 0x00097800 : 11
Besides from that, a lot of I/O errors.. so seems like the phone is EMMC locked as well..
Click to expand...
Click to collapse
Hey folks, so as I said in my previous post, my Terrain is unlocked, so I am just poking around and see if I can gain root to it. Looks like the ROM that my phone is using is the new one from NEC and maybe that's why it's already unlocked. Anyway, I need some help trying to root it. Looks like it's pretty lock down, I can't even access /data/local to put that run_root_shell in it, and so I put it to /sdcard but no good there neither, it won't let me run there.
[email protected]:/sdcard $ ls -la
ls -la
drwxrwxr-x system sdcard_rw 2014-04-29 23:50 .estrongs
drwxrwxr-x system sdcard_rw 1980-01-01 00:00 Android
drwxrwxr-x system sdcard_rw 2014-04-29 22:58 Download
drwxrwxr-x system sdcard_rw 1980-01-01 00:00 LOST.DIR
drwxrwxr-x system sdcard_rw 1980-01-01 00:00 Notifications
drwxrwxr-x system sdcard_rw 2014-04-29 23:49 backups
-rwxrwxr-x system sdcard_rw 89968 2013-12-06 08:54 run_root_shell
[email protected]:/sdcard $ ./run_root_shell
./run_root_shell
/system/bin/sh: ./run_root_shell: cannot execute - Permission denied
126|[email protected]:/sdcard $
Also, there aren't 30+ partitions anymore....or I could be looking at this wrong.
[email protected]:/ $ df
df
Filesystem Size Used Free Blksize
/dev 327M 76K 327M 4096
/mnt/asec 327M 0K 327M 4096
/mnt/obb 327M 0K 327M 4096
/system 1G 480M 558M 4096
/data 787M 347M 439M 4096
/persist 7M 4M 3M 4096
/cache 354M 24M 330M 4096
/tombstones 68M 4M 64M 4096
/firmware 127M 39M 88M 16384
/data/camera_socket 327M 0K 327M 4096
/data/secure/data 327M 0K 327M 4096
/mnt/sdcard 4G 3M 4G 32768
[email protected]:/ $
Any idea and help would be appreciated. And let me know if you need me to upload any files from it that can help people here to unlock theirs.
cheers
aluminumx said:
Hey folks, so as I said in my previous post, my Terrain is unlocked, so I am just poking around and see if I can gain root to it. Looks like the ROM that my phone is using is the new one from NEC and maybe that's why it's already unlocked. Anyway, I need some help trying to root it. Looks like it's pretty lock down, I can't even access /data/local to put that run_root_shell in it, and so I put it to /sdcard but no good there neither, it won't let me run there.
Click to expand...
Click to collapse
Same thing here, also unlocked device
Code:
[email protected]:/data/local $ ls
ls
opendir failed, Permission denied
Code:
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p12 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p15 /persist ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /cache ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p17 /tombstones ext4 rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p1 /firmware vfat ro,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
tmpfs /data/camera_socket tmpfs rw,relatime,mode=775,gid=1000 0 0
tmpfs /data/secure/data tmpfs rw,nosuid,relatime,mode=755,gid=1000 0 0
/dev/block/vold/179:14 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Forgive me for this slight OT-posting, but it's not that easy to find people with this device - let alone an unlocked one. I'm located in Germany and the device works just fine - except for the fact that neither WIFI tethering works nor syncing with Gmail App (although sync works once I connect to a WIFI Hotspot). Has anyone experienced something similar?
Have a look on my postings list or search for El Grande Partition List (if I remember that right ) by @E.V.A. there's tools for reading partition info
Bashing away at my HTC Desire C
Has anyone seen this yet? Do you think we can use it? http://i.imgur.com/TXKDpOI.png
Lets continue discussion in one thread!
http://forum.xda-developers.com/showthread.php?p=59514154#post59514154
I created a GitHub repo to collect information, also on how to disable apps (since thats as good as it gets for now).
I'm not sure how to install these drivers (it's not an executable so I've got no idea ). Where do I copy the files? to the ADB folder?

Categories

Resources