Prepare Your Build Machines: Ubuntu 14.10 Utopic Unicorn Now Official

Today is an important day for any and all Linux enthusiasts. One of the … more

Track the Time You Waste on Social Media with Socials Addict

When you use your phone, you often don’t even realize how much time you … more

Document the Story of Your Social Life with 8tory

The different forms of social media are growing every day. It’s hard to imagine a day … more

Make Calling Your Loved Ones Easier and Cheaper this Diwali

Diwali, or Deepawali as some Indians call it, is the pride and joy of Indian … more
Post Reply

[Q] Help moding infocus m512 snapdragon msm8926

OP sirpy

31st August 2014, 07:56 AM   |  #1  
OP Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Oct 2013
I'm trying to understand how to be able to mod a recently bought chinese phone "infocus m512", it's based on qualcomm snapdragon msm8926 and has android 4.4.2 installed which comes with "su" already installed, so basically the phone is already rooted.

I've found out the following:
/system is read only and cannot be remounted with r/w using the "su" available.
powering with both volume buttons pressed boots into some mode where the system is r/w but any changes made are not kept. I think it is FTM mode, the device is then recognized by ADB but not by FASTBOOT.
powering with vol down button pressed boots into download mode and the device is not recognized by ADB or FASTBOOT.

Any help understanding how to:
1. modify the /system partition
2. what can be done in FTM mode, and why changes to system do not stick
3. how to possibly use download mode to flash modified imgs?
4. find out if any write protection is enabled on the device

Thanks
5th September 2014, 09:29 PM   |  #2  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More
Quote:
Originally Posted by sirpy

I'm trying to understand how to be able to mod a recently bought chinese phone "infocus m512", it's based on qualcomm snapdragon msm8926 and has android 4.4.2 installed which comes with "su" already installed, so basically the phone is already rooted.

I've found out the following:
/system is read only and cannot be remounted with r/w using the "su" available.
powering with both volume buttons pressed boots into some mode where the system is r/w but any changes made are not kept. I think it is FTM mode, the device is then recognized by ADB but not by FASTBOOT.
powering with vol down button pressed boots into download mode and the device is not recognized by ADB or FASTBOOT.

Any help understanding how to:
1. modify the /system partition
2. what can be done in FTM mode, and why changes to system do not stick
3. how to possibly use download mode to flash modified imgs?
4. find out if any write protection is enabled on the device

Thanks

Had any luck?
7th September 2014, 11:07 AM   |  #3  
OP Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Oct 2013
moding infocus m512 progress report
I was able to get fastboot to recognize the device using the -i option.
I was able to extract the recovery img and unpack it, also compiled a modified mkbootimg.
I did re-flash the splash img using fastboot so it seems there's no some kind of protection against flashing.
I will try to flash a modified boot and recovery that will mount the /system as rw and see if it works.
I still think maybe there's some kind of selinux settings involved preventing mounting system as rw, i will have to dig deeper for that.
Quote:
Originally Posted by GalaxyWhy

Had any luck?

7th September 2014, 01:24 PM   |  #4  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More
Quote:
Originally Posted by sirpy

I was able to get fastboot to recognize the device using the -i option.
I was able to extract the recovery img and unpack it, also compiled a modified mkbootimg.
I did re-flash the splash img using fastboot so it seems there's no some kind of protection against flashing.
I will try to flash a modified boot and recovery that will mount the /system as rw and see if it works.
I still think maybe there's some kind of selinux settings involved preventing mounting system as rw, i will have to dig deeper for that.

Sounds good Keep me posted!

EDIT:
Are you running the most updated software? - http://www.infocusphone.com/m512updates.html
10th September 2014, 01:31 PM   |  #5  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More
Yours came rooted you say? Where did you buy it from? - I got mine in pandawill.com and I'm waiting for it to arrive, hooeukly its rooted 😇

Sent from my LG-D802
10th September 2014, 02:40 PM   |  #6  
OP Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Oct 2013
rooting infocus m512
Quote:
Originally Posted by GalaxyWhy

Yours came rooted you say? Where did you buy it from? - I got mine in pandawill.com and I'm waiting for it to arrive, hooeukly its rooted 😇

Sent from my LG-D802

I bought it on lightinthebox.com anyways it shouldn't be much a problem to root it, since it's possible to flash a boot img to the device using fastboot.

I finally was able to trace the issue of not being able to mount /system as read/write to an error in the ext4 file system
it seems like the stock system.img has errors in its file system, so when the device initially mounts the /system partition it immediately remounts it as read-only because of the errors.

I was unable to flash a repaired system.img using fastboot (it dies in the middle, maybe because its such a large file), but I was able to modify the boot.img fstab.qcom to add the option errors=continue to the mount options of the /system partition. and now it is possible to mount /system as read write and you can do whatever you want as root.
10th September 2014, 04:28 PM   |  #7  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More

In this picture it shows the phone having a recents button but on the website I bought it off it has a menu button. Which one does yours have?

You seem to know more about this stuff than me, I've usually bought well supported devices and rooting was a one click process. I just wanna get root access to be able to use Xposed Modules

Sent from my LG-D802
1st October 2014, 11:27 AM   |  #8  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More
How'd you go?

I just received mine and I want to root it
1st October 2014, 02:24 PM   |  #9  
OP Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Oct 2013
rooting infocus m512
Quote:
Originally Posted by GalaxyWhy

How'd you go?

I just received mine and I want to root it

are you sure your device isn't already rooted? try to install supersu.
if you are sure it is not rooted you can root it the following way:
1. install adb
2.download su binary from somewhere
3. boot into Field Test Mode by (with phone turned off and connected to usb) holding both volume keys and power key together, when phone turns on release the power button and wait until the blue led turns off, then release volume keys. after a sec or two you should see some text on the screen.
4. connect to device via abd, run "adb shell"
5. mount the system as read/write by
(i'm not sure about /dev/block/mmcblk01/platform/by-name/system, it is something similar but you can find out yourself by search the subdirectories)
Code:
mkdir systmp
mount -t ext4 -o rw /dev/block/mmcblk01/platform/by-name/system /systemp
chmod 4755 /systmp/xbin/su
6. exit shell and run "adb push <path to su binary> /systmp/xbin
7. run "adb reboot"
8. install supersu or some other su manager.

let me know how it went.
2nd October 2014, 05:39 AM   |  #10  
GalaxyWhy's Avatar
Senior Member
Thanks Meter: 41
 
316 posts
Join Date:Joined: Dec 2013
More
Quote:
Originally Posted by sirpy

are you sure your device isn't already rooted? try to install supersu.
if you are sure it is not rooted you can root it the following way:
1. install adb
2.download su binary from somewhere
3. boot into Field Test Mode by (with phone turned off and connected to usb) holding both volume keys and power key together, when phone turns on release the power button and wait until the blue led turns off, then release volume keys. after a sec or two you should see some text on the screen.
4. connect to device via abd, run "adb shell"
5. mount the system as read/write by
(i'm not sure about /dev/block/mmcblk01/platform/by-name/system, it is something similar but you can find out yourself by search the subdirectories)

Code:
mkdir systmp
mount -t ext4 -o rw /dev/block/mmcblk01/platform/by-name/system /systemp
chmod 4755 /systmp/xbin/su
6. exit shell and run "adb push <path to su binary> /systmp/xbin
7. run "adb reboot"
8. install supersu or some other su manager.

let me know how it went.

Yeah 100% mine didn't have root but I figured it out after lots of searching around. I posted my method here http://forum.xda-developers.com/gene...7#post55787107 so others could do it if they wanted to

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Q&A, Help & Troubleshooting by ThreadRank