New idea for root (6.0) - Modify selinux - G4 Android Development

From my understanding, the reason root cannot be achieved in the normal way, in android 6.0 are the selinux rules. What if we could modify the selinux rules? I believe we might be able to do this through send_command.exe. If you notice, the selinux partition is mounted as rw when accessing with send_command. Anyone else have input or ideas?
Code:
#mount
rootfs / rootfs rw,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1440236k,nr_inodes=360059,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,noatime,data=ordered 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=continue,data=ordered 0 0
/dev/block/bootdevice/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0

I find it strange how the LG G4 has such troubles being rooted with MM installed, I've heard of other devices being easy to root with MM, did LG do something to make it harder? Strange since in the past they have always been very open for developers.

hi !
very interresting thread ,thank you ...
i don't know all adb possibilities and i don't have development knowledges. .... but it's REALY this selinux who forbide systemless root ??? and if true ,it's possible to modify this selinux by this adb fastboot way ? ( for to have a very small chance to root mm for locked phones)

The question is that if in G4 locked bootloader doesn't cover the selinux partition as well, so it may lead to a bootloop? Not sure if my thinking is right, but theory is only thing I could help with now, cannot go back to MM anymore, and bootloader unlocked as well Anyway I believe you'll finally find a way to root MM!

yes... but these last mounts ,the silence of all devs (and chainfire too) clearly show that there NEVER have way.....or nobody really have searched an exploit by a strong exploration of top from bottom of this damned MM ...

Irrelevant post please delete

calyxim said:
Irrelevant post please delete
Click to expand...
Click to collapse
What is irrelevant?

tabp0le said:
What is irrelevant?
Click to expand...
Click to collapse
You are giving false hopes to people.
Most MM phones cannot be rooted without a modified boot image because of all the security measures introduced. That is a good thing. Hell, even Lollipop was hard to root without a serious security hole.
Just unlock your bootloader, you have no choice.

LightInDark said:
I find it strange how the LG G4 has such troubles being rooted with MM installed, I've heard of other devices being easy to root with MM, did LG do something to make it harder? Strange since in the past they have always been very open for developers.
Click to expand...
Click to collapse
It's the locked bootloader which causes the issues.
Rooting Marshmallow requires a modified kernel, and unfortunately you can't boot a modified kernel with a locked bootloader. With an unlocked bootloader, it's no harder to root Marshmallow than any previous version of Android.

Related

[q] superoneclick

I just downloaded this after finding it online. it says im missing the runtime. how do i fix this
Make sure you use the most recent version which can be found in the Android dev section on these forums.
DirkGently1 said:
Make sure you use the most recent version which can be found in the Android dev section on these forums.
Click to expand...
Click to collapse
I was on the SuperOneClick Android dev. page but it would not allow me to post as I am a horrible underling and have no privileges.
So if anyone can post it there or answer it here then this is the failure error I get for the device (A coby Kyros MID8024)
I have everything set up and the tablet is running android 2.2 all drivers and other files needed are installed.
Installed terminal emulator confirms NO SU allowed.
Getting mount path...
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
none on /proc/bus/usb type usbfs (rw,relatime,devmode=666)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p3 on /data type ext4 (rw,nosuid,nodev,relatime,barrier=1,data=ordered)
/dev/block/mmcblk0p2 on /cache type ext4 (rw,nosuid,nodev,relatime,barrier=1,data=ordered)
/dev/block/vold/179:1 on /mnt/nand type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:9 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=utf8,shortname=
FAILED
Thanks if anyone can assist.
I used the super 1click method to root. It failed the first time but I rebooted my tablet and ran the super1click a second time and it sucessfully rooty my tablet...now looking for instructon for installing market.
Vernox701 said:
I used the super 1click method to root. It failed the first time but I rebooted my tablet and ran the super1click a second time and it sucessfully rooty my tablet...now looking for instructon for installing market.
Click to expand...
Click to collapse
Why not just flash google apps? That should install the market or you could download the apk for the market directly. See this thread: http://forum.xda-developers.com/showthread.php?t=1231290 .

Market fails to download anything on CM7 RC1V2 - screwed up partitioning?

I have installed CM7 RC1 on top of a brand new SBF179 (did a factory reset after the flashing of that one). While the market initially downloaded all the old apps, it now fails to install or update any apps from the market with a download unsuccessful message. To resolve this, I was looking at s0be's fix which supposedly works:
Here is the s0be's fix
1. adb shell
2. su
3. mkdir /cache/download
4. chown system:cache /cache/download
5. chmod ug+rwx /cache/download
6. chmod a+x /cache/download
I can su but my /cache dir is read only, which presumably is because there is not really a cache partition:
Code:
mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk1p21 on /system type ext3 (ro,noatime,nodiratime,barrier=1,data
=ordered)
/dev/block/userdata on /data type ext3 (rw,nosuid,nodev,noatime,nodiratime,error
s=continue,data=ordered)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
tmpfs on /data/tmp type tmpfs (rw,relatime,size=2048k)
/dev/block/pds on /pds type ext3 (rw,nosuid,nodev,noatime,nodiratime,barrier=1,d data=ordered)
Can anyone shed some light on this? Is there something wrong with the setup here? And why is the cache folder read only?
Market "Download paused" over WiFi
i also had market issue after downgrade cm7 rc1 to froyo rom somebody plz help ......
Market "Download paused" over WiFi
I had the same issue. I found this, and the "fix" worked.
http://www.androidpolice.com/2011/0...on-usb-storage-or-sd-card-problem-on-android/
That does not seem to be my issue - in any case that file does not exist in either locations. In my case I dont even get an error pop up just a silent, quick note in the download bar that the download was unsuccessful.
I still think its weird that my /cache folder is entirely empty and on a read only filesystem to boot?
in my case there is no download folder on /cache
i can able to download file from 2g/2g but download pause if i do it from WiFi ...
did u try flashing google apps again?
it works normally..
how to do it on stock froyo ?
ankit360 said:
how to do it on stock froyo ?
Click to expand...
Click to collapse
well u need to root it and install 2ndInit Recovey and then u can flash anything u like from custom recovery
I just reflashed gapps-2011-03-XX from stable recovery, no change.
nupi said:
I just reflashed gapps-2011-03-XX from stable recovery, no change.
Click to expand...
Click to collapse
i even try gapps-gb-20110613-signed.zip not working
I think I may just go back to RC0 tomorrow, that seemed to be more stable after all
So wiped data and cache on RC1V2, still same issue. Going back to RC0 now
Ok so I did reinstall 177 Nordic, flashed CM7.1RC0 and it STILL does not work.
However, I am still thinking there is something wrong with my partioning of the Defy as custom recovery gave me the following errors:
Can't mount /dev/block/memblk1p24
Can't mount /cache
Can't mount cache:recovery/log
Similarly, stock recovery upon starting also gives me:
Can't mount CACHE:recovery/command
Can't mount CACHE:recovery/caller
Can't mount CACHE:recovery/log
Last vain hope of going back to 177-Nordic and not installing CM7 for now, let's see what happens there.
where apk get save ? /cache/download or /cache ?
when i create download folder in cache it get deleted automatically and downloadfile.apk is get created is this normal plz help me ....
On vanilla 177-NORDIC it works. Confuses the hell out of me.
But also, I get a much different filesystem hierarchy - now I actually get /cache, android secure etc!
$mount
rootfs / rootfs ro,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
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk1p21 /system ext3 ro,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/userdata /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/cache /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=2048k 0 0
/dev/block/pds /pds ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,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,allow_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=0702,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
/dev/block/dm-0 /mnt/asec/com.trueaxis.jetcarstuntslite-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
$
Click to expand...
Click to collapse
I still think there is something wrong with the CM7 mount points I get!
I had the problem at rc0. Also got the mounting error. What worked for me was to unmount the cache and than mount again via recovery.
Sent from my MB525 using XDA App
How do I unmount/mount stuff in recovery? Also, did that fix market issues?
For me it fixed the problem. I had also this problem on RC0 and got the error of cant mount cache.
You can unmount and mount it in custom recovery. It do not exactly know where it is in recovery. Thought it was at the advanced menu.
Sent from my MB525 using XDA App
This explains why this happens and how to fix it:
http://forum.cyanogenmod.com/topic/19100-cm7-rc3-market-fails-to-download-big-apps/
Give me thanks for this if it helps, it took me hours to find this fix! thanks

[Q] Can't root and s-off because of strange trouble...NEEDED HELP PLEASE..!!!

i've tried help to root and s-off my DHD friend..but found very strange trouble on his device..never found this trouble before..
the trouble is when i've tried to downgrade and s-off used AAHK 2 by phiber 2000..at the process of downgrade first..i confirm "y"..then when process step on setup tacoroot and automatic make phone rebooted to stock recovery..the phone stop and stuck at HTC logo..and can't setup tacoroot on stock recovery..
i've tried manual process temp root with tacoroot too but the result still the same as before..when phone reboot just suck at HTC logo..and can't go to stock recovery..
then i tried to check boot to bootloader with volume down + power then choice recovery..i've success go to stock recovery..but when i've used adb command like "adb reboot recovery"..the phone always stuck at HTC logo...
cause of that..i can't used AAHK 2 or manual process to downgrade and s-off the phone..this is really strange trouble for me..
i've already tried too to unlock through HTCdev unlock but can't get token from the phone it say.."command error" and i know i must update the hboot first to version 2.00.0029
but i've already tried to update ruu too from the site it self for update hboot to 2.00.0029.. but result error190..
what i've already done :
1. tried AAHK2 to downgrade and s-off..but stop process on tacoroot setup
2. tried manual downgrade process with installing tacooroot first..result still the same can't setup tacoroot to in stock recovery
3. tried unlock with HTCdev unlock..result can't update hboot already tried with a various ways
4. tried factory reset first but result still the same..just stuck at htc logo
5. tried re flash RUU with the same version of firmware..but the result still the same
6. tried flashing hboot 2.00.0029 of the various ways..some with error result..some with success completed flashing but after reboot the phone..the hboot version still the same as before..nothing change
Update :
7. tried flashing different RUU with goldcard..result is success and completed flashing it..but the strange is..after reboot..nothing any change..the bootloader and the rom still the same like before..
8. tried check and looking partition on eMMC..then compared to my DHD (the normal mine DHD) and turns it like this :
my normal DHD :
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
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
/sys/kernel/debug /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
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.2/by-num/p25 /system ext4 ro,relatime,barrier=1,dat
a=ordered 0 0
/dev/block/platform/msm_sdcc.2/by-num/p26 /data ext4 rw,nosuid,nodev,relatime,ba
rrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.2/by-num/p27 /cache ext4 rw,nosuid,nodev,relatime,b
arrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/platform/msm_sdcc.2/by-num/p28 /devlog ext4 rw,nosuid,nodev,relatime,
barrier=1,data=ordered,noauto_da_alloc 0 0
/dev/block/vold/179:65 /storage/primary/legacy vfat rw,dirsync,nosuid,nodev,noex
ec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp
437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/primary/legacy/.android_secure tmpfs ro,relatime,size=0k,mode=000
0 0
Click to expand...
Click to collapse
my friend DHD that's had troubled :
adb shell mount
rootfs / rootfs ro,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
/dev/block/mmcblk0p25 /system ext3 ro,relatime,errors=continue,barrier=0,data=or
dered 0 0
/dev/block/mmcblk0p28 /system/lib ext3 ro,relatime,errors=continue,barrier=0,dat
a=ordered 0 0
/dev/block/mmcblk0p26 /data ext3 rw,nosuid,nodev,relatime,errors=continue,barrie
r=0,data=ordered 0 0
/dev/block/mmcblk0p27 /cache ext3 rw,nosuid,nodev,relatime,errors=continue,barri
er=0,data=ordered 0 0
/dev/block/mmcblk0p30 /devlog ext3 rw,nosuid,nodev,relatime,errors=continue,barr
ier=0,data=ordered 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
tmpfs /app-cache tmpfs rw,relatime,size=8192k,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
tmpfs /data/secure/data tmpfs rw,relatime,mode=771,uid=1000,gid=1000 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/data/d /data/d debugfs rw,relatime 0 0
htcfs /data/htcfs fuse.htcfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow
_other 0 0
DxDrmServerIpc /data/DxDrm/fuse fuse.DxDrmServerIpc rw,nosuid,nodev,relatime,use
r_id=0,group_id=0,allow_other 0 0
/dev/block/vold/179:65 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,
uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharse
t=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
Click to expand...
Click to collapse
is that possible this trouble come from the partition of that in my friend DHD itself..?
note : the phone always troubled reboot normally..always stuck at htc logo..then success reboot normally after a couple of time must pull out the battery first..
and always back to the state like before even when i've already change disabled the Fast boot in Settings..there's always back enable again while back after reboot the rom..
really need someone help me to go out from this trouble..please..
thanks b4..
If u wanna unlock via htcdev you have the wrong hboot you need the one that ends with 29 there a way to flash it ( google it ) if u try the ruu u wil get a error, that's way u need to look for a way to flash it via fastboot.
lexuz said:
If u wanna unlock via htcdev you have the wrong hboot you need the one that ends with 29 there a way to flash it ( google it ) if u try the ruu u wil get a error, that's way u need to look for a way to flash it via fastboot.
Click to expand...
Click to collapse
i know..and i've already done it..but when i've success completed flashing a hboot 2.00.0029 from bootloader then reboot the phone..the hboot still the same as before..nothing change in there..when i've tried flashing through running utility from the RUU update hboot 2.00.0029 from HTC itself..the result is "error 190 : blah blah i forget".."you must update your phone to 3.13.707.3 first via OTA..blah blah blah..i forget too" this is so silly..because the DHD is already had RUU 3.13.707.4 with hboot 2.00.0027.. and i've already flashing from fastboot reboot oem-78 too..but the result is stop.. fail read <too many link>..blah blah..
then like what i say above..i've already tried too to replaced my RUU with the same version as already had it in the phone and even different version (of course higher not lower version) and different carrier of the RUU too with goldcard and the flashing process is completed all..but the result after reboot the phone is..the hboot and the room still the same as before..nothing change in there..
another solution maybe..??
anyway thanks for trying to help me..
JJeamy said:
i know..and i've already done it..but when i've success completed flashing a hboot 2.00.0029 from bootloader then reboot the phone..the hboot still the same as before..nothing change in there..when i've tried flashing through running utility from the RUU update hboot 2.00.0029 from HTC itself..the result is "error 190 : blah blah i forget".."you must update your phone to 3.13.707.3 first via OTA..blah blah blah..i forget too" this is so silly..because the DHD is already had RUU 3.13.707.4 with hboot 2.00.0027.. and i've already flashing from fastboot reboot oem-78 too..but the result is stop.. fail read <too many link>..blah blah..
then like what i say above..i've already tried too to replaced my RUU with the same version as already had it in the phone and even different version (of course higher not lower version) and different carrier of the RUU too with goldcard and the flashing process is completed all..but the result after reboot the phone is..the hboot and the room still the same as before..nothing change in there..
another solution maybe..??
anyway thanks for trying to help me..
Click to expand...
Click to collapse
I'm also new at this but I know that a week ago I downloaded a mini-adb package with the hboot inside (the ....29) connected the phone via USB and the flash process was shrines after that.
lexuz said:
I'm also new at this but I know that a week ago I downloaded a mini-adb package with the hboot inside (the ....29) connected the phone via USB and the flash process was shrines after that.
Click to expand...
Click to collapse
yap i know..that's the package like behtash had.. that i've already tried too.. but the result is like i said before..just stop fail read <too many links>>
even i tried manual without behtash script too..with "adb reboot oem-78" then "fastboot flash zip rom.zip"..but result still the same..
i think this is the problem come from the partition table that i show in the first post..because of info from my friend itself..this DHD is ever brought to HTC service center for repair dead pixel of lcd before..after that..the lcd is fix..but..some of other hw doesn't seems perfect like before..
ANYONE CAN HELP ME...HOW I CAN REPARTITION THIS DHD WITH DEFAULT LAYOUT WITHOUT USING RIFF BOX JTAG TOOLS..??
THX B4..

unified storage setup on re-partitioned FP1

In reference to the new storage configuration scheme mentioned in this thread
http://forum.xda-developers.com/showpost.php?p=54537828&postcount=677
I would like to create a new discussion for people who already implemented the re-partitioning of their phones following this method
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Please share your experience and confirm if the re-partitioning needs to be reverted prior to implementing the new storage scheme which uses fuse.
Donat.Callens said:
I would like to create a new discussion for people who already implemented the re-partitioning of their phones following this method
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Please share your experience and confirm if the re-partitioning needs to be reverted prior to implementing the new storage scheme which uses fuse.
Click to expand...
Click to collapse
Used that method, worked like a charm. Since I'm using AOSP and there have been zero updates for it, I probably won't reformat unless Fairphone starts updating their AOSP OS as well. Will update this post when/if they do.
to repartition or not to repartition
How about people with a repartitioned phone that applied the new storage scheme? Should we revert back to 1GB for the /data partition beforehand?
Donat.Callens said:
How about people with a repartitioned phone that applied the new storage scheme? Should we revert back to 1GB for the /data partition beforehand?
Click to expand...
Click to collapse
Hello, The partition upgrader rewrites MBR/EBR1/EBR2 *after* performing the update to the /system partition. It assumes the /system partition is not altered. I have not tried modifying the partition layout using the methods discussed on this forum (modifying the extended master boot record). As a result of the upgrade EBR2 is no longer used but remains present. MBR is not altered so only EBR2 and the PMT partition are modified before the cache and data partition are formatted. If only /data and the FAT partition are modified you should be fine. These are at the "end" of the disk.
I previously tried to download the APK from the link on the WIKI bellow but ended up downloading the wrong file(addware from the hosting company?) this is where I gave up.
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
download the repartitioning tool
_keesj said:
I previously tried to download the APK from the link on the WIKI bellow but ended up downloading the wrong file(addware from the hosting company?) this is where I gave up.
http://forum.xda-developers.com/wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone
Click to expand...
Click to collapse
Here is the original thread with the tool:
http://www.movilesdualsim.com/tema/...ilmente-data-apps-com-4gb-8gb-16gb-rom.31769/
This site refers to another download links to the same file:
http://www.china-devices.com/Thread-Tool-App-for-repartitioning-MTK-6589-Memory
As sear for Meteos MTK6589 will pop up many sites where it is to be found.
Donat.Callens said:
Here is the original thread with the tool:
http://www.movilesdualsim.com/tema/...ilmente-data-apps-com-4gb-8gb-16gb-rom.31769/
Click to expand...
Click to collapse
The original thread explains that you should perform a backup of EBR1 and EBR2 for safety. I assume this means only those two are modified. Could this mean we can apply the new cherry partitioning scheme on a re-partitioned phone without prior modification?
Note: hereby the mentionned commands for the backup
su
dd if=/dev/ebr1 of=/sdcard/EBR1 bs=512 count=1
dd if=/dev/ebr2 of=/sdcard/EBR2 bs=512 count=1
Donat.Callens said:
The original thread explains that you should perform a backup of EBR1 and EBR2 for safety. I assume this means only those two are modified. Could this mean we can apply the new cherry partitioning scheme on a re-partitioned phone without prior modification?
Note: hereby the mentionned commands for the backup
su
dd if=/dev/ebr1 of=/sdcard/EBR1 bs=512 count=1
dd if=/dev/ebr2 of=/sdcard/EBR2 bs=512 count=1
Click to expand...
Click to collapse
I changed my partition using the above tool and was able to perform a 1.3 -> 1.6 -> 1.6 FUSE update afterwards. This is not an endorsement but it does seam to work.
it did not seem to work for me
_keesj said:
I changed my partition using the above tool and was able to perform a 1.3 -> 1.6 -> 1.6 FUSE update afterwards. This is not an endorsement but it does seam to work.
Click to expand...
Click to collapse
I'm afraid I must report otherwise from my personal experience. I had previously re-partitioned my phone with a 4GB internal space storage. When applying the new FP partitioning schema, I did not loose my data as I should have. I am now stuck with bizarre values for the partition sizes. I will post the output of these commands here in my next post: df and mount. Please inform me if other information is required or if an official FP support request is preferable.
Donat.Callens said:
I will post the output of these commands here in my next post: df and mount.
Click to expand...
Click to collapse
$ df
Filesystem Size Used Free Blksize
/dev 487M 52K 487M 4096
/mnt/secure 487M 0K 487M 4096
/mnt/asec 487M 0K 487M 4096
/mnt/asec/com.camsam.plus-1 22M 19M 2M 4096
/mnt/asec/com.nuance.swype.dtc-1 36M 32M 3M 4096
/mnt/asec/com.koushikdutta.backup.license-1 1M 280K 1M 4096
/mnt/asec/ginlemon.flowerpro-1 5M 3M 1M 4096
/mnt/obb 487M 0K 487M 4096
/system 639M 351M 288M 4096
/data 3G 1G 2G 4096
/cache 124M 4M 119M 4096
/mnt/cd-rom 1M 1M 0K 2048
/protect_f 8M 4M 4M 4096
/protect_s 8M 4M 4M 4096
/storage/emulated 487M 0K 487M 4096
/storage/sdcard1 7G 6G 425M 32768
/storage/emulated/0 3G 1G 2G 4096
/storage/emulated/0/Android/obb 3G 1G 2G 4096
/storage/emulated/legacy 3G 1G 2G 4096
/storage/emulated/legacy/Android/obb 3G 1G 2G 4096
$ 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
none /dev/cpuctl cgroup rw,relatime,cpu 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/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/dm-0 /mnt/asec/com.camsam.plus-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-1 /mnt/asec/com.nuance.swype.dtc-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-2 /mnt/asec/com.koushikdutta.backup.license-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-3 /mnt/asec/ginlemon.flowerpro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/[email protected] /system ext4 ro,noatime,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected] /data ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/[email protected] /cache ext4 rw,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/loop0 /mnt/cd-rom iso9660 ro,relatime 0 0
/[email protected]_f /protect_f ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/[email protected]_s /protect_s ext4 rw,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
tmpfs /storage/emulated tmpfs rw,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/block/vold/179:97 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/emulated/0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Donat.Callens said:
I'm afraid I must report otherwise from my personal experience. I had previously re-partitioned my phone with a 4GB internal space storage. When applying the new FP partitioning schema, I did not loose my data as I should have. I am now stuck with bizarre values for the partition sizes. I will post the output of these commands here in my next post: df and mount. Please inform me if other information is required or if an official FP support request is preferable.
Click to expand...
Click to collapse
Can you please execute the following (as root e.g. adb shell ; su) and paste the result?
/system/bin/fp_part -r -f /dev/pmt | grep FAT; echo $?
_keesj said:
/system/bin/fp_part -r -f /dev/pmt | grep FAT; echo $?
Click to expand...
Click to collapse
__NODL_FAT,0x74F80000,0x33F3A0000,0x00000000
0
Donat.Callens said:
__NODL_FAT,0x74F80000,0x33F3A0000,0x00000000
0
Click to expand...
Click to collapse
Only the first part of the uprade has happend. The first part replaces the root file system, recovery and some other system partitions.
The second part of the upgrade is launched on the next boot in /system/etc/install-recovery.sh (itself copied from /system/bin/fp1_partition_upgrade ).
It checks if the partition upgrade has happened and if not perform the upgrade.
This step is not working on your phone/layout and to understand why you need to get the kernel messages (dmesg or logcat) while doing the upgrade.
/system/bin/fp1_partition_upgrade
Code:
#!/system/bin/sh
#
# Upgrade the partition layout from FP1 to FP1U
#
#
# dump pmt to see if the upgrade has happend
if /system/bin/fp_part -r -f /dev/pmt | grep FAT > /dev/null
then
echo Starting partition upgrade
cp /system/bin/fs_upgrade.bin /proc/sd_upgrade
echo "--wipe_data" > /cache/recovery/command
reboot recovery
fi
logcat
_keesj said:
This step is not working on your phone/layout and to understand why you need to get the kernel messages (dmesg or logcat) while doing the upgrade.
Click to expand...
Click to collapse
I restarted the partition updater and attach the corresponding logcat
$ logcat -v long
Donat.Callens said:
I restarted the partition updater and attach the corresponding logcat
$ logcat -v long
Click to expand...
Click to collapse
Can you please also provide the dmesg output, possibly using a private message? (the logcat does contains the info I am looking for an might contain private data)
custom recovery might be the source of the problem
_keesj said:
Donat.Callens said:
_keesj said:
The partition upgrdate is not happening, there should be lines containins SD_UPGRADE something like
Click to expand...
Click to collapse
could it be because I have a custom recovery installed?
Click to expand...
Click to collapse
This is an interesting idea.
-The sd_upgrade command is executed when not on the recovery so this is not probable.
-I think the recovery will also be replace back to "original" because we need a diifferent kernel.
Did you run the command and does the device reboot afterwards? A different recovery might not perform the factory reset?
Click to expand...
Click to collapse
I did not run the command, I merely started the FairPhone updater's partition upgrade tool. It displays a progress window like the first time, so I guess it is at least trying.
After the progress window, I get
ROM may flash stock recovery on boot. Fix?
Click to expand...
Click to collapse
I then reply
Yes - Disable recovery flash
Click to expand...
Click to collapse
I can try to let it install the stock recovery and run the partition updater after that to see if it solves the problem.
Donat.Callens said:
I did not run the command, I merely started the FairPhone updater's partition upgrade tool. It displays a progress window like the first time, so I guess it is at least trying.
After the progress window, I getI then replyI can try to let it install the stock recovery and run the partition updater after that to see if it solves the problem.
Click to expand...
Click to collapse
Post partition upgrade:
-The zip files downloaded have a different scattter file (a file describing the partition layout) that gets checked by the normal recovery.
-The zip are signed with a different key
This does not apply to the partition upgrader itself but might impact custom recovery users. The upgrader also replaces the recovery.
_keesj said:
Post partition upgrade:
-The zip files downloaded have a different scattter file (a file describing the partition layout) that gets checked by the normal recovery.
-The zip are signed with a different key
This does not apply to the partition upgrader itself but might impact custom recovery users. The upgrader also replaces the recovery.
Click to expand...
Click to collapse
I replied No to the question: ROM may flash stock recovery on boot. Fix?
This solved the issue. The installer completed and now my phone is back to factory default. I have 13.37 GB total space . I will restore my backups. Thank you for your support _keesj.
Please ensure user are informed they have to let the installer replace the existing custom recovery with the factory one for the partition upgrader to work correctly. You can always restore your custom recovery afterwards
I hereby confirm that, in my case, the partition upgrader worked with a modified partition scheme. For reference, I had changed the internal storage space to 4GB in the past.
Awesome guys!
This is why I like xda-developers and Fairphone and its community accompanied development so much. Not only I can follow the rapid conversations on problems and solutions that I could even run into, I also learn a lot about related techniques, background and the challenges in throwing a fair phone on the market.
I definitely appreciate the work of the xda developers, keejs and joemier - and of course all the others that stand behind that all. KUDOS!
But will all my apps still work, if I do backup the two partitions and then after the upgrade put everything on the one remaining partition? I guess quite a few apps might still "look" for their data on the no longer existing second partition, won't they?
Steps for "fiixing" your upgrade
Some user have repartitioned the partition of their FP1U using tool mentioned in on this forum. FP1U does not need this as the new layout is perfectly fine.
I think the following steps *should* work to get their phone back to "normal"
#get the partition upgrader
wget http://storage.googleapis.com/updat...G13G_partitionUpgrade_v1_6_OTA_2014-07-31.zip
#unzip it
unzip FP1_Fairphone_OS_1G13G_partitionUpgrade_v1_6_OTA_2014-07-31.zip
#attach your device to your pc and make sure adb works
#after that push the new partition layout to your device
adb push system/bin/fs_upgrade.bin /mnt/sdcard/
#the rest of the command need to run as root
adb shell
su.
# tell the kernel to perform the upgrade
cp /system/bin/fs_upgrade.bin /proc/sd_upgrade
#reboot and wipe the data
echo "--wipe_data" > /cache/recovery/command
reboot recovery

[Q] Phone is not seeing any of it's memory

I don't know what happened, my battery died, I plugged it in, turned the phone back on, and boom, my phone is throwing errors out left and right, and ES File Explorer is saying '/sdcard/' is not found. I've tried going to storage/emulated/0 & legacy, but I get the same not found message.
Storage in System Settings shows that the storage is still being used, and the file browser in TWRP shows all the files are still there. It just seems like the mount points or bindings got all screwy.
My phone is on the BOF5 firmware, it's stock rooted. I've had no problems restarting my phone, usually have to atleast twice a week. Nothing funky installed, atleast nothing that would mess with the SD card. No SW was uninstalled, just frozen, and it wasn't much [Voicemail, Internet (Browser), Hangouts]
I'm really just hoping that someone, somewhere knows a way to help me fix this so I don't have to restore!
krakerx said:
I don't know what happened, my battery died, I plugged it in, turned the phone back on, and boom, my phone is throwing errors out left and right, and ES File Explorer is saying '/sdcard/' is not found. I've tried going to storage/emulated/0 & legacy, but I get the same not found message.
Storage in System Settings shows that the storage is still being used, and the file browser in TWRP shows all the files are still there. It just seems like the mount points or bindings got all screwy.
My phone is on the BOF5 firmware, it's stock rooted. I've had no problems restarting my phone, usually have to atleast twice a week. Nothing funky installed, atleast nothing that would mess with the SD card. No SW was uninstalled, just frozen, and it wasn't much [Voicemail, Internet (Browser), Hangouts]
I'm really just hoping that someone, somewhere knows a way to help me fix this so I don't have to restore!
Click to expand...
Click to collapse
Youre taking all the fun out of it. Backing up and restoring from scratch is half the fun with android phones. If youre gonna root to have fun, be prepared to do the dirty work as well. JMHO
xxSTARBUCKSxx said:
Youre taking all the fun out of it. Backing up and restoring from scratch is half the fun with android phones. If youre gonna root to have fun, be prepared to do the dirty work as well. JMHO
Click to expand...
Click to collapse
Well, I'm looking to do the dirty work, otherwise I would have just restored the phone from my backup weeks ago. But I don't want to do that, because, honestly, there has got to be a way to see this data. With that said, here is the output from running 'mount' in TWRP and Terminal Emulator:
C:\MiniADB\adb shell
~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1418352k,nr_inodes=154938,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1418352k,nr_inodes=154938)
pstore on /sys/fs/pstore type pstore (rw,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/mmcblk0p27 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p27 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p25 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
===========================================================================================================
[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1414720k,nr_inodes=153121,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=1414720k,nr_inodes=153121,mode=750,gid=1000 0 0
pstore /sys/fs/pstore pstore rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,size=1414720k,nr_inodes=153121,mode=700 0 0
tmpfs /mnt/secure/asec tmpfs rw,seclabel,relatime,size=1414720k,nr_inodes=153121,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=1414720k,nr_inodes=153121,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=1414720k,nr_inodes=153121,mode=755,gid=1000 0 0
/dev/block/bootdevice/by-name/modem /firmware-modem vfat ro,context=ubject_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/apnhlos /firmware vfat ro,context=ubject_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,norecovery 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/bootdevice/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,errors=panic,data=ordered 0 0
/dev/block/bootdevice/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/bootdevice/by-name/efs /efs ext4 rw,seclabel,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/carrier /carrier ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persdata /persdata/absolute ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
tmpfs /storage/emulated tmpfs rw,seclabel,nosuid,nodev,relatime,size=1414720k,nr_inodes=153121,mode=050,gid=1028 0 0
tmpfs /storage/emulated/legacy tmpfs rw,seclabel,nosuid,nodev,relatime,size=1414720k,nr_inodes=153121,mode=050,gid=1028 0 0
[email protected]:/ #
Hopefully someone with BOF5 rooted stock can take a look at their mount points and see if they lineup with what I'm getting
krakerx said:
Well, I'm looking to do the dirty work, otherwise I would have just restored the phone from my backup weeks ago. But I don't want to do that, because, honestly, there has got to be a way to see this data. With that said, here is the output from running 'mount' in TWRP and Terminal Emulator:
Click to expand...
Click to collapse
Thanks for posting this.
Hopefully someone who is still on OF5 can match and compare/contrast whats there or not there. Maybe unrooting and OG5 is the way to go or simply trying it in your laptop(if it has a SD cardslot reader and see if it functions properly there) Might be time to get a new card
SD card is fine, internal memory is fine... Found the issue was a corrupted sdcard pointer, once fixed, phone runs like it should

Categories

Resources