[Dev-request][HACK] Increase Internal Memory Size - Galaxy 3 General

Galaxy 3 Devs , please take a look on this.
http://forum.xda-developers.com/showthread.php?t=1398797
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Kernel needs to be patched for this. I am not having access to my PC so if any kernel dev can pull this off then it would be great.
Instructions:-
1-Add Ext4 kernel Modules
Compile the jbd2.ko and ext4.ko modules for the Kernel and put them into /lib/modules inside the ramdisk:
Code:
gandalf $ ls -l ./ramdisk/lib/modules/
totale 1304
-rw-r--r-- 1 root root 236116 11 dic 08.24 ext4.ko
-rw-r--r-- 1 root root 363932 11 dic 08.24 fsr.ko
-rw-r--r-- 1 root root 211200 11 dic 08.24 fsr_stl.ko
-rw-r--r-- 1 root root 58176 11 dic 08.24 jbd2.ko
-rw-r--r-- 1 root root 260568 11 dic 08.24 rfs_fat.ko
-rw-r--r-- 1 root root 90968 11 dic 08.24 rfs_glue.ko
-rw-r--r-- 1 root root 99532 11 dic 08.24 sec_param.ko
gandalf $
2- Patch init.rc file
Patch the init.rc file into the ramdisk to load these modules into the kernel immediately after the first boot stage of the firmware:
Code:
# insmod fsr/rfs modules
insmod /lib/modules/fsr.ko
insmod /lib/modules/fsr_stl.ko
insmod /lib/modules/rfs_glue.ko
insmod /lib/modules/rfs_fat.ko
insmod /lib/modules/sec_param.ko
insmod /lib/modules/jbd2.ko
insmod /lib/modules/ext4.ko
3- Add busybox
Add a copy of busybox into /sbin.
We need it to mount ext4 filesystems on microSD later on.
Code:
gandalf $ ls -l ./ramdisk/sbin/
totale 2088
-rwxr-x--- 1 root root 117948 11 dic 08.18 adbd
-rwsr-xr-x 1 root root 2016700 11 dic 08.21 busybox
lrwxrwxrwx 1 root root 7 11 dic 08.18 ueventd -> ../init
(i686) gandalf ~ (i686) $
4- Patch init.rc again
Change the mount command for /data!
Original code:
Code:
# Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
# We chown/chmod /data again so because mount is run as root + defaults
[COLOR="Red"]mount rfs /dev/stl6 /data nosuid nodev check=no[/COLOR]
chown system system /data
chmod 0771 /data
Patched code:
Code:
# Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
# We chown/chmod /data again so because mount is run as root + defaults
[COLOR="red"]exec /sbin/busybox sh /init.data.sh[/COLOR]
chown system system /data
chmod 0771 /data
5- Add init.data.sh file
Add an external shell file, used to mount microsd /data avoiding the Android Init Language used by init.rc.
Code:
gandalf $ cat ./ramdisk/init.data.sh
#!/sbin/busybox sh
/sbin/busybox mount -o nosuid,nodev -t ext4 /dev/block/mmcblk0p2 /data || /sbin/busybox mount -o nosuid,nodev -t rfs /dev/stl7 /data
gandalf $

nice...but it's only for stock ROMs and would probably cause the phone to run slower...

Great concept, particularly but with data to sd, you can put almost all files of app to sd...
Lots of space without increasing memory...
Yet a good concept...

I actually like the implementation of this, but what happens when the SD card is removed?

"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone

kylandomos said:
"If I want to remove the microSD from the slot, FIRST I NEED TO SWITCH OFF THE PHONE!"
No SD, No Phone
Click to expand...
Click to collapse
Yeah... pass.

Doesn't Hybrid Data2Sd already do this?
If not, what is the difference between the two?

maverickgenius said:
Doesn't Hybrid Data2Sd already do this?
If not, what is the difference between the two?
Click to expand...
Click to collapse
Initial app2sd scripts by apollo used to show ext4 space in task manager but currently no script does so. No idea what Hybrid Data2SD actually is.
Sent from my GT-I5800 using Tapatalk

arunmcops said:
Initial app2sd scripts by apollo used to show ext4 space in task manager but currently no script does so. No idea what Hybrid Data2SD actually is.
Sent from my GT-I5800 using Tapatalk
Click to expand...
Click to collapse
even my wait is long to see a kernel/rom to actually show ext4 space in task manager.
G3MOD kernel 2.0(and lower version) supports this feature in the form of data2sd(not apps2sd or hybrid data2sd). But the developers of this kernel messed up the code and later versions of their kernel doesn't seems to support this.

how to compile a script
How to compile a script?

arunmcops said:
Galaxy 3 Devs , please take a look on this.
Kernel needs to be patched for this. I am not having access to my PC so if any kernel dev can pull this off then it would be great.
Click to expand...
Click to collapse
umm.... did i hear the word "HACK' okay ill take and merge this script on my sense port.... maybe in build 1

arunmcops said:
Initial app2sd scripts by apollo used to show ext4 space in task manager but currently no script does so. No idea what Hybrid Data2SD actually is.
Sent from my GT-I5800 using Tapatalk
Click to expand...
Click to collapse
If I remember it right, apollo used the same thing in dual boot kernel. He said its very easy. You can request him to make a new kernel.

This is interesting... Devs pls try this on our G3.
Sent from my GT-I5800 using Tapatalk

Nice job making it to the front page!
Just an idea.
If ClockworkMod is merged with the kernel, people that like to remove their SDCARD can first flash the stock kernel, or any kernel with ClockworkMod and then remove the SDCARD.
Unless I totally read that wrong.
Sent from my Samsung Galaxy S II w/ CM9

The Dark Lestat said:
Nice job making it to the front page!
Just an idea.
If ClockworkMod is merged with the kernel, people that like to remove their SDCARD can first flash the stock kernel, or any kernel with ClockworkMod and then remove the SDCARD.
Unless I totally read that wrong.
Sent from my Samsung Galaxy S II w/ CM9
Click to expand...
Click to collapse
Yes, exactly.
And also this is where a class 10 SD card would shine. Standard internal memory is usually around a class 6.

Clean and efficient, I like. Mounts ext part, if not there it mounts traditional data partition. IE: If you want 2 partitions or you don't want it to take up your SD, don't insert it till after the device is on.

Hamdiz said:
How to compile a script?
Click to expand...
Click to collapse
You'll need to edit from the kernel source and then compile the whole kernel to zImage.
---------- Post added at 12:14 AM ---------- Previous post was at 12:11 AM ----------
arunmcops said:
Galaxy 3 Devs , please take a look on this.
http://forum.xda-developers.com/showthread.php?t=1398797
Kernel needs to be patched for this. I am not having access to my PC so if any kernel dev can pull this off then it would be great.
Instructions:-
1-Add Ext4 kernel Modules
Compile the jbd2.ko and ext4.ko modules for the Kernel and put them into /lib/modules inside the ramdisk:
Code:
gandalf $ ls -l ./ramdisk/lib/modules/
totale 1304
-rw-r--r-- 1 root root 236116 11 dic 08.24 ext4.ko
-rw-r--r-- 1 root root 363932 11 dic 08.24 fsr.ko
-rw-r--r-- 1 root root 211200 11 dic 08.24 fsr_stl.ko
-rw-r--r-- 1 root root 58176 11 dic 08.24 jbd2.ko
-rw-r--r-- 1 root root 260568 11 dic 08.24 rfs_fat.ko
-rw-r--r-- 1 root root 90968 11 dic 08.24 rfs_glue.ko
-rw-r--r-- 1 root root 99532 11 dic 08.24 sec_param.ko
gandalf $
2- Patch init.rc file
Patch the init.rc file into the ramdisk to load these modules into the kernel immediately after the first boot stage of the firmware:
Code:
# insmod fsr/rfs modules
insmod /lib/modules/fsr.ko
insmod /lib/modules/fsr_stl.ko
insmod /lib/modules/rfs_glue.ko
insmod /lib/modules/rfs_fat.ko
insmod /lib/modules/sec_param.ko
insmod /lib/modules/jbd2.ko
insmod /lib/modules/ext4.ko
3- Add busybox
Add a copy of busybox into /sbin.
We need it to mount ext4 filesystems on microSD later on.
Code:
gandalf $ ls -l ./ramdisk/sbin/
totale 2088
-rwxr-x--- 1 root root 117948 11 dic 08.18 adbd
-rwsr-xr-x 1 root root 2016700 11 dic 08.21 busybox
lrwxrwxrwx 1 root root 7 11 dic 08.18 ueventd -> ../init
(i686) gandalf ~ (i686) $
4- Patch init.rc again
Change the mount command for /data!
Original code:
Code:
# Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
# We chown/chmod /data again so because mount is run as root + defaults
[COLOR="Red"]mount rfs /dev/stl6 /data nosuid nodev check=no[/COLOR]
chown system system /data
chmod 0771 /data
Patched code:
Code:
# Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
# We chown/chmod /data again so because mount is run as root + defaults
[COLOR="red"]exec /sbin/busybox sh /init.data.sh[/COLOR]
chown system system /data
chmod 0771 /data
5- Add init.data.sh file
Add an external shell file, used to mount microsd /data avoiding the Android Init Language used by init.rc.
Code:
gandalf $ cat ./ramdisk/init.data.sh
#!/sbin/busybox sh
/sbin/busybox mount -o nosuid,nodev -t ext4 /dev/block/mmcblk0p2 /data || /sbin/busybox mount -o nosuid,nodev -t rfs /dev/stl7 /data
gandalf $
Click to expand...
Click to collapse
Nice guide, I will try to build this kernel mod tomorrow. and btw, do we need any partition to make this work?

Since it's a ramdisk tweak, you could even unpack, tweak and repackage.
My Tab makes phone calls yo! (GT-P6800)

Please tell me when you get success. Waiting for a long time to see it work.

arunmcops said:
Please tell me when you get success. Waiting for a long time to see it work.
Click to expand...
Click to collapse
probably next week, cause I'm going to a trip! I will compile it with the stock kernel.....

Related

[MOD][Share] Best AD2SDX Script (A2SD/EXT) - AMARULLZ DATA TO SD-EXT

What's up guys. So I've been doing some searching on A2SD/EXT scripts and I cam across this thread. So I decided to try it out on our N1. My results: Amazing. This has to be one of the best A2SD - SD-EXT scripts out there and I noticed that many N1 users know little about it. I am deciding to share it. Please note: I take no credit for creating this script, I just wanted to share it directly with N1 users.
What is it?
This is a flash-able zip file that installs an A2SD-EXT script. This is similar to DTAPPS2SD or any other script but much better. It stores apps and data on your SD-EXT partition and mounts the partition as /data. There are no downfalls to this script, such as the "running out of space" error when only half way used and no audio glitches that can be found with Darktremor's script. (More info on OP linked below.)
How to get it running?
Simple; just flash the zip in recovery. You must have an EXT partition already created on your SD card, obviously. No need to enter any commands in Terminal as it already runs by itself upon boot. I tested and it works with CM7, MIUI, and ICS roms. Been using it for a while with NO problems.
Why choose this script?
Again, simple. It allows for more memory to install apps and mounts all data as internal. There will be no "low mem." issues or low volume issues as found in DTAPPS2SD. Even though this mounts data, there is NO performance issues what so ever. You do not even need a fast card as mine is only class 4. I have been using it for over a month with no random reboots or freezes. Games and apps run just as fast with no lag/blackscreen for a couple seconds when launching apps. There is also no decrease in battery life, just in case anyone was questioning, as I am at 71% being off charger for 8hours medium/low use. Again, I am just sharing it because I see NO N1 users mention it. It is much better than any other ****: DTAPPS2SD Miui stock, iA2SD, S2E...
Download? Original Thread?!
Glad you asked. Here is both: http://forum.xda-developers.com/showthread.php?t=1310309
amarullz said:
Introducing....
AD2SDX - AMARULLZ DATA TO SD-EXT
by amarullz [at] yahoo [dot] com
* Oct 20 2011 (ALPHA02) - Update Compatibility
* Oct 19 2011 (ALPHA01)
WHAT IS IT??
This mod will move all Internal Memory (data) into sd-ext, "but not like data2ext", this mod will maintain the performance, because it still place dalvik-cache and system application data in Internal Memory.
HOW IT WORK??
The script will do this in the first boot:
Move Mounting Internal Memory (/data) Into /sd-ext
Mount SDCard-Ext (mmcblk0p2) partition into /data
Create dalvik-cache directory in Internal Memory data (/sd-ext), and symlink it to mmcblk0p2 (/data)
Create data directory in mmcblk0p2 (/data) And symlink it into Internal Memory data (/sd-ext)
Create symlink of app, app-private, app_s and lib_s from mmcblk0p2 (/data) to Internal memory data (/sd-ext)
Create symlink for all non-symllink of Internal Memory data (/sd-ext) into mmcblk0p2 (/data)
After Initializing Setup (First Boot), reboot the system (Just reboot, don't go into recovery), the mod will automatically do this following:
Create data_s in Internal Memory data (/sd-ext)
Move All mmcblk0p2(/data)/data/com.htc* and com.android* into Internal Memory data(/sd-ext)/data_s
Create symlink all files/directory from Internal Memory data (/sd-ext)/data_s/* into mmcblk0p2(/data)/data/ So the System Application Data still read into Internal memory, but rest Application Data will read Into SDCard.
ILLUSTRATION
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
INSTALLATION
For now, use adb shell and Install it manually, I am android newbie , still unfamiliar with recovery zip installer.
Delete Any A2SD Script in /system/etc/init.d ( common name was 40a2sd )
Copy 40ad2sdx into /system/etc/init.d Don't forget to chmod 755/777 it
Reboot ( 2x optional )
INSTALLATION WITH ADB IN RECOVERY MODE
Code:
C:\>adb shell
# mount /system
# exit
C:\>adb push 40ad2sdx /system/etc/init.d/
C:\>adb shell
# cd /system/etc/init.d
# rm 40a2sd
# chmod 755 40ad2sdx
# cd /
# umount /system
# exit
C:\>
NOTE: the "rm 40a2sd" should be the name of app2sd init.d file.
NOTE
If you install it after clean flash you need to reboot your phone at the 1st boot to activate System App Data on Internal Memory.
CAUTION!!!
YOU SHOULD UNZIP AND MANUALY COPY THE FILE INTO /system/etc/init.d/ - THE ZIP FILE WASN'T AUTO INSTALLER THAT CAN BE RUN IN RECOVERY!!!!
WARNING!!!
THIS MOD ONLY IN TEST STAGE, ONLY ADVANCE USER I SUGGEST TO TRY THIS SCRIPT.
I DON'T TAKE ANY RESPONSIBILITY IF YOU BROKE/BOOTLOOPS YOUR SYSTEM/ROM/PHONE.​
TESTED-DEVICE / ROM
HTC Desire (Bravo)
- Cool3D RunnyMede Sense 3.5 v2, v3
- Cool3D AceS Sense 3.0 v3, v4
If You Already Test it and works,.. Please send me a feedback in your comment...
LOGS
Code:
VERSION 1.0 ALPHA02
===================
* Add framework_s into strict mmcblk0p2
* Add Create symlink for rest non-symlink files from mmcblk0p2 to mtdblock5 ( Hope will fix bootloop )
* Change loop method from `ls -d *` to `ls -a` ( may fix error on .systemapp and all file with dot name at first char )
VERSION 1.0 ALPHA01
===================
* Initial Release
* Support for clean flash or already running system
* com.android* and com.htc* set as System App Category
* dalvik-cache on Internal Memory
* add umount /sd-ext in first command
SCRIPT: ALPHA01
Code:
#!/system/bin/sh
#
# AMARULLZ DATA TO SD-EXT MOD FOR ANDROID ( AD2SDX )
# ==================================================
#
# by amarullz [at] yahoo [dot] com
# xda-developers : amarullz
# (c) 2011
# * Oct 19 (ALPHA01)
#
# Info: ~ For Changing Log
##
###
# Initializing
###
#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "8192" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;
#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;
#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict
###
for i in framework_s app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###[ INTERNAL mtdblock5 STRICT ]###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
#
# ~ ALPHA02 - Fix ls to ls -a, it's ok, because we test -h for symlink
###
cd /sd-ext;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
fi;
done;
cd /;
###
# It should also need to create the rest non Symlink Directories and Files on /data to /sd-ext
# ~ ALPHA02 - Some Directory may be missing if we don't use it
###
cd /data;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /data/$i ]
then
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
fi;
fi;
done;
cd /;
###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###
#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;
#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;
#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;
#-- Of Finished.... :D
INSTALL ZIP FROM RECOVERY?
Thanks to tezgomet -- Download Attachment by tezgomet >>
KNOW BUG
Titanium Backup - Restore the Application Data ( com.android*/com.htc* data )
Click to expand...
Click to collapse
If you install Sebastian Runnymede, it's already built-in, as well as amarulz's touch installer.
Sent from my Nexus One
So I entered that thread and then entered another thread where I could download a flashable zip of it. I downloaded the right script, I assume?
Oh, and thanks for sharing.
EDIT: If it mounts my sd-ext as /data, I'd have to wipe my original data partition before flashing this script, right?
Sent from my Nexus One using Tapatalk
Thanks a lot, I was using Link2SD (from market) but I had out of space soon...
Sent from my Galaxy Nexus using xda premium
Theshawty said:
So I entered that thread and then entered another thread where I could download a flashable zip of it. I downloaded the right script, I assume?
Oh, and thanks for sharing.
EDIT: If it mounts my sd-ext as /data, I'd have to wipe my original data partition before flashing this script, right?
Sent from my Nexus One using Tapatalk
Click to expand...
Click to collapse
The download ZIP link is all the way at the bottom of the post. Yes just flash it. As for wiping, no. I flashed this over a ROM that I was previously using and it worked just fine. I was using S2E for CM7, then flashed script, disabled/uninstalled S2E, and worked fine. I also flashed this over another ROM that had no previous A2sd script, just stock internal, and it worked fine as well.
script sounds great. i've a few questions:
1:
will all apps after flashing automatically will be installed on sd-ext? or do i have to flash the script several times when i installed news apps?
2:
is it possible to move the apps back to internal memory? or to uninstall the script?
thanks
heinz gruber said:
script sounds great. i've a few questions:
1:
will all apps after flashing automatically will be installed on sd-ext? or do i have to flash the script several times when i installed news apps?
2:
is it possible to move the apps back to internal memory? or to uninstall the script?
thanks
Click to expand...
Click to collapse
1 - After installing the script, apps will automatically be installed to the EXT partition. I would only recommend flashing the script again if you install an update to your ROM, but I am mostly sure that this is not necessary.
2 - The script itself does not have the ability to let the user choose which apps are installed on internal and which are installed on the EXT. This is because the script mounts the EXT to /data making your device think that /data internal is much larger.
Androidity3000 said:
1 - After installing the script, apps will automatically be installed to the EXT partition. I would only recommend flashing the script again if you install an update to your ROM, but I am mostly sure that this is not necessary.
2 - The script itself does not have the ability to let the user choose which apps are installed on internal and which are installed on the EXT. This is because the script mounts the EXT to /data making your device think that /data internal is much larger.
Click to expand...
Click to collapse
thanks for your answers.
already post some other in the main-thread of the script:
i'm using a nexus one with cm 7.2 and kgp700s kernel.
now i've created a ext part 4 with amon ra. but when i start titanium backup it only shows me the memory of my sd card and not oft the ext sd. is this because the partition isn't mounted correctly?
can i flash it when i already use the rom for a few days? read somewhere that it would be better to flash it right after flashing the rom.
heinz gruber said:
thanks for your answers.
already post some other in the main-thread of the script:
i'm using a nexus one with cm 7.2 and kgp700s kernel.
now i've created a ext part 4 with amon ra. but when i start titanium backup it only shows me the memory of my sd card and not oft the ext sd. is this because the partition isn't mounted correctly?
can i flash it when i already use the rom for a few days? read somewhere that it would be better to flash it right after flashing the rom.
Click to expand...
Click to collapse
It would be better to flash it with a fresh ROM but is NOT necessary. Your issue is not an issue but part of the script, if I understand you correctly. In Titaniumbackup, check how much internal says is available, not A2SD(EXT). It should be increased and should show the size of your ext partition.
Androidity3000 said:
It would be better to flash it with a fresh ROM but is NOT necessary. Your issue is not an issue but part of the script, if I understand you correctly. In Titaniumbackup, check how much internal says is available, not A2SD(EXT). It should be increased and should show the size of your ext partition.
Click to expand...
Click to collapse
thanks. will try it and give feedback.
I was just about to flash darktremor on my CM7.2 n1.
Then I saw the new featured page on "Mounts2SD - An All-in-one to sd-ext script"
Then I saw this thread.
Which option is the best? I am in urgent need of more /data space!
Darktremor is obviously classic. But I have no experience with it. Does it, or any others, have a UI? Can I view and edit the status of the partition easily from my phone?
sarshadd said:
I was just about to flash darktremor on my CM7.2 n1.
Then I saw the new featured page on "Mounts2SD - An All-in-one to sd-ext script"
Then I saw this thread.
Which option is the best? I am in urgent need of more /data space!
Darktremor is obviously classic. But I have no experience with it. Does it, or any others, have a UI? Can I view and edit the status of the partition easily from my phone?
Click to expand...
Click to collapse
I do not know greatly about M2SD, but I understand that the new ICS rom has incorporated it; so cannot give great feedback with that. DarkTremor does have a GUI (sort of) which is an app on the market (free - a2sd gui) which gives options to move either apps, data, dalvik, etc.. on the EXT. This script does not have a gui as far as I am concerned. I think that this script is easier because all you have to do is flash it once (not after install all ROM updates like DTA2SD). There are many problems with DTA2SD (which is why I said this is the best...) like low volume issues and low memory errors when device is only half way filled.
Bottom line: if you want simple, easy, reliable a2sd install this once and you're good. No questions. That's why my title is what it is...
How is it better than IA2SD in MeDroid 1.4.3 rom? IA2SD does a fairly good job with a nice GUI and just has to be run once when installing the rom for the first time.
Sent from my ASUS Transformer TF101
kiari62 said:
How is it better than IA2SD in MeDroid 1.4.3 rom? IA2SD does a fairly good job with a nice GUI and just has to be run once when installing the rom for the first time.
Sent from my ASUS Transformer TF101
Click to expand...
Click to collapse
I've used IA2SD and I liked it.
How does this compare? Screen shots? Is there a thread for this already with more information that you can point me to?
I've only used the version that comes with MeDroid. I attach a couple screenshots taken from my setup as today.
I don't know any other way to install it, sorry.
I just want to vocalize my thanks to the OP for bringing all this to light.
Simply EXACTLY what I have been looking for!
THANK YOU OP!!
How to enable swap after flashing this?
I am in MeDroid CM7.2, when using DT a2sd, the swap is enabled automatically
but with AD2SDX, the swap can not be enable itself
kykyky said:
How to enable swap after flashing this?
Click to expand...
Click to collapse
Why would you want to do this? Swap on SD is a terrible idea and a great way to wear down your card prematurely, possibly even more so than Data2SD.
What about stock ROM?
I am running nexus1 2.3 stock ROM (rooted). Is there any guide or instructions using which I can set up a working sd-ext partition on this stock ROM?
1) install 4ext recovery and make ext4 partition . Backup your sdcard before
2) install terminal emulator
type su
And a2sd
And yes. Yes. And the phone will reboot itself .
Now U have a working a2sd
Envoyé depuis mon Nexus One avec Tapatalk

CIFS and stock ICS on Acer a500

CIFS is one of the must haves for me with my tablet. I use it to mount Windows drives and then access comics, manga and video content on my PC. I was able to piece together items to make it work. Here's what I did:
1) Upgraded to stock ICS
2) Rooted ICS via this post: http://forum.xda-developers.com/showthread.php?t=1546593
3) Download kernel modules (cifs.ko, md4.ko): http://forum.xda-developers.com/showpost.php?p=23713310&postcount=2828
4) Setup a script to install the modules and mount your drives. I use this:
#!/system/bin/sh
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
mount -t cifs -o user=test,password=test1 //192.168.1.100/acer /mnt/sdcard/cifs/acer
Note: I haven't been able to get this version to work with spaces in the user, password or drive names, so I had to setup a new account and revised share names on my Windows PC. In the Honeycomb release, I could just encase the user name in double quotes (example: "first last"). But that doesn't seem to work in ICS for some reason.
Hope this helps someone!
thanks, do you think it's ok on flexreeper rom ?
z-control said:
thanks, do you think it's ok on flexreeper rom ?
Click to expand...
Click to collapse
The thread I took it from was this one: [ROM][ICS4.0.3] Taboonay 3.0.1
I'd think the modules should work on any general rom based on the Acer ICS 4.0.3 build. The key is that when you do insmod to load these modules, there's a check on the version of the kernel vs the version in the module. These are built as:
2.6.39.4+ SMP preempt mod_unload ARMv7
Yes, it's working simply with cifs manager !
Hi, do you think these file will work on a510?, that's because I put the files on:
/system/lib/modules/
but when I run this command:
mount -t cifs -o user=nas,password=nas //192.168.10.1/mnt /mnt/sdcard/cifs/mnt
on terminal my device reboot, my device is rooted, the modules are loaded successful and are displayed on cifsmanager, I have other tablet with the same configuration and not have any problem to mount that path, the kernel on my a510 is 2.6.39.4+ with ICS 4.0.3, the reboot happens when I run the command or whit cifsmanager, can you help me? thanks in advance.
PS: Sorry for my English I'm Latin.
sparkly81 said:
Hi, do you think these file will work on a510?, that's because I put the files on:
/system/lib/modules/
but when I run this command:
mount -t cifs -o user=nas,password=nas //192.168.10.1/mnt /mnt/sdcard/cifs/mnt
on terminal my device reboot, my device is rooted, the modules are loaded successful and are displayed on cifsmanager, I have other tablet with the same configuration and not have any problem to mount that path, the kernel on my a510 is 2.6.39.4+ with ICS 4.0.3, the reboot happens when I run the command or whit cifsmanager, can you help me? thanks in advance.
PS: Sorry for my English I'm Latin.
Click to expand...
Click to collapse
Now that you've issued the mount command, was the /mnt/sdcard/cifs/mnt directory setup on your acer? I believe I had to use cifsmanager to initially do the mount and do the directory setup on the sdcard so I could then later use the mount command.
Thanks for you help, yes the path /mnt/sdcard/cifs/mnt is my dir setup, I have changed the dir to /sdcard/cifs that's because on my root dir I there's a link to a sdcard, but is doesn't work, it's always reboot, I have tried the commands via adb shell and local terminal on the device, but is the same story, one question, the cifs.ko and md4.ko they have this permission 777 and the owner is root, is this correct?
sparkly81 said:
Thanks for you help, yes the path /mnt/sdcard/cifs/mnt is my dir setup, I have changed the dir to /sdcard/cifs that's because on my root dir I there's a link to a sdcard, but is doesn't work, it's always reboot, I have tried the commands via adb shell and local terminal on the device, but is the same story, one question, the cifs.ko and md4.ko they have this permission 777 and the owner is root, is this correct?
Click to expand...
Click to collapse
mine are set as owner system and permissions are: ---rwxr-x
So... you do the insmod and it works and then you do a lsmod and the modules are listed?
In the terminal, if you just enter "mount", does it return and list the mounted devices?
Thanks! I run the commands and that's the results:
Code:
[email protected]:/ # insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/md4.ko
[email protected]:/ # insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/cifs.ko
[email protected]:/ # lsmod
lsmod
cifs 207351 0 - Live 0xbf057000
md4 3019 0 - Live 0xbf051000
ufsd 320396 0 - Live 0xbf000000 (P)
[email protected]:/ # mount
mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,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)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /mnt/usb_storage type tmpfs (rw,relatime,mode=755,gid=1000)
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)
/dev/block/platform/sdhci-tegra.3/by-name/APP on /system type ext4 (ro,relatime,
user_xattr,acl,barrier=1,data=ordered)
/dev/block/platform/sdhci-tegra.3/by-name/UDA on /data type ext4 (rw,nosuid,node
v,noatime,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/platform/sdhci-tegra.3/by-name/CAC on /cache type ext4 (rw,nosuid,nod
ev,noatime,user_xattr,acl,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/platform/sdhci-tegra.3/by-name/FLX on /system/vendor type ext4 (ro,re
latime,user_xattr,acl,barrier=1,data=ordered)
/dev/fuse on /mnt/sdcard type fuse (rw,nosuid,nodev,relatime,user_id=1023,group_
id=1023,default_permissions,allow_other)
/dev/block/vold/179:33 on /mnt/external_sd type vfat (rw,dirsync,nosuid,nodev,no
exec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=
cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
I didn't run the command
mount -t cifs -o user=nas,password=nas //192.168.10.1/mnt /sdcard/cifs
because make the tablet reboot.
Code:
[email protected]:/system/lib/modules # ls -l
ls -l
-rw-r--r-- root root 140644 2008-08-01 06:00 baseband_usb_chr.ko
----rwxr-x system system 3719757 2012-05-07 18:06 cifs.ko
-rw-rw-r-- system system 1079751 2012-05-07 18:06 hfs.ko
-rw-rw-r-- system system 1257749 2012-05-07 18:06 hfsplus.ko
----rwxr-x system system 65991 2012-05-07 18:06 md4.ko
-rw-rw-r-- system system 2155925 2012-05-07 18:06 ntfs.ko
-rw-r--r-- root root 170169 2008-08-01 06:00 raw_ip_net.ko
-rw-r--r-- root root 32779 2008-08-01 06:00 scsi_wait_scan.ko
-rw-r--r-- root root 130574 2008-08-01 06:00 tcrypt.ko
-rw-r--r-- root root 404760 2008-08-01 06:00 ufsd.ko
[email protected]:/system/lib/modules #
Well... I'm out of ideas.
Usually, what happens is that the modules don't load because they don't match the kernel. But the "lsmod" results shows they did load.
And the mount output shows that your mount command is there and working... so I have no other suggestions. Sorry, maybe someone else has a thought?
Thanks!, saeba for your help, I learn many things from you
#!/system/bin/sh
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/cifs.ko
Click to expand...
Click to collapse
I put this script in etc/init.d folder (name the file as you want without extension)
and the kernel in modul folder
and then, i use mount manager wich can auto mount a shared folder from PC when tablette is booting, and when the connexion wifi is ok
Per request, here are the cifs.ko and md4.ko files.
I am not familiar with CIFS
But I know for a fact that ES file explorer can read standard network shares and open any files across the network. Probably not much help
entropy.of.avarice said:
But I know for a fact that ES file explorer can read standard network shares and open any files across the network. Probably not much help
Click to expand...
Click to collapse
CIFS allows you to mount the network drive and use it as if it were a local drive. There are lots of apps that will only work with network files in this manner. I use it to play movies, read manga and comics, etc. that are located on my PC.
saeba said:
CIFS allows you to mount the network drive and use it as if it were a local drive. There are lots of apps that will only work with network files in this manner. I use it to play movies, read manga and comics, etc. that are located on my PC.
Click to expand...
Click to collapse
I knew I was missing something. I play a lot of movies, look at pictures, stuff like that from network shares - but the apps that I use seem to have no issue with that (MX Player, stock gallery photo view app, etc). Again, way out of practice

Debian install on top (with Android as chroot)

Hi everyone
I'm working on a long term project (as in, I'll work on it whenever I have time). I want to get Debian installed on the Nook Color natively with Android as a chroot (on top). Of course, I'm not an Android expert, so I'll be needing your guidance to do it. And, If you want, you can also join in and volunteer your Nook Color to torture experimentation.
I am following this guide by Kuisma (he was a user on these forums, but he told me he doesn't come here anymore, which sucks ):
http://whiteboard.ping.se/Android/Debian
So far, I'm done with:
1. Partition 32GB microSD card. Made a 4GB FAT32 storage partition, 25GB remaining ext3 partition for Debian. CHECK.
and
2. Create Debian root filesystem. Basically, use debootstrap to install to microSD (installed on ext3 partition). Installed openssh-server, tightvncserver, and lxde-core. Easy. CHECK.
and
3. Unpack initramfs. CHECK.
==================================================
All I have to do...is the complicated steps in between, lol.
Edit initramfs and init, unpack boot.img, note down the physical offset address, remake the boot.img..
==================================================
For now, my question is: how do I acquire the initramfs? (I'm on CM7.2 Mirage). Already got it. Unpacked it.
Now, I am in the process of modifying the init.encore.rc and possibly other files. After that's done, I'll repack the new initramfs, replace with the one in /boot, and see how it goes.
sagirfahmid3 said:
Hi everyone
I'm working on a long term project (as in, I'll work on it whenever I have time). I want to get Debian installed on the Nook Color natively with Android as a chroot (on top). Of course, I'm not an Android expert, so I'll be needing your guidance to do it. And, If you want, you can also join in and volunteer your Nook Color to torture experimentation.
I am following this guide by Kuisma (he was a user on these forums, but he told me he doesn't come here anymore, which sucks ):
http://whiteboard.ping.se/Android/Debian
So far, I'm done with:
1. Partition 32GB microSD card. Made a 4GB FAT32 storage partition, 25GB remaining ext3 partition for Debian. CHECK.
and
2. Create Debian root filesystem. Basically, use debootstrap to install to microSD (installed on ext3 partition). Installed openssh-server, tightvncserver, and lxde-core. Easy. CHECK.
==================================================
All I have to do...is the complicated steps in between, lol.
Edit initramfs and init, unpack boot.img, note down the physical offset address, remake the boot.img.
==================================================
For now, my question is: how do I acquire the initramfs? (I'm on CM7.2 Mirage).
Click to expand...
Click to collapse
It is uRamDisk in the boot partition. If you have CM7 on emmc then it mounts /system and /data on emmc. If you have installed CM7 on SD, the SD installer modified the uRamDisk to mount them on SD.
The Nook Color does not use boot.img. It uses a fat32 boot partition with files (of which uRamDisk is one).
Sent from my Nook HD+ running CM10.1 on emmc.
Excellent, thanks for the reply. I am running CM7.2 Mirage installed on emmc. Anyways, I looked inside the /boot folder which contains: MLO, charging.zip, romrestore.zip, u-boot.bin, uImage, uRamdisk, uRamdisk.bak, uRecImg, and uRecRam.
The MLO and u-boot.bin are used for a bootloader (second stage? cyanoboot?), and the uImage contains the kernel according to this. The uRecImg and uRecRam is for the recovery (CWM for example?).
So, I think that means I just need to mess with the uRamdisk and uImage files.
How would I go about from here? Creating/replacing a modified initramfs?
I'll try using the unmkbootimg script on them both and see if it does anything.
sagirfahmid3 said:
Excellent, thanks for the reply. I am running CM7.2 Mirage installed on emmc. Anyways, I looked inside the /boot folder which contains: MLO, charging.zip, romrestore.zip, u-boot.bin, uImage, uRamdisk, uRamdisk.bak, uRecImg, and uRecRam.
The MLO and u-boot.bin are used for a bootloader (second stage? cyanoboot?), and the uImage contains the kernel according to this. The uRecImg and uRecRam is for the recovery (CWM for example?).
So, I think that means I just need to mess with the uRamdisk and uImage files.
How would I go about from here? Creating/replacing a modified initramfs?
I'll try using the unmkbootimg script on them both and see if it does anything.
Click to expand...
Click to collapse
MLO is the x-loader and will not need to be changed. u-boot.bin is the bootloader and has been customized by the NookieDev team to include the cyanoboot menu. Source is available in the NC dev forum. It does not need a second stage bootloader since the first bootloader is unlocked. uImage is the linux kernel that has been all set up to match the hardware in the NC. It probably does not need to be modified. uRamDisk is the ramdisk that includes the initramfs. To edit that you first need to extract everything. Then when modified, recompile. The other files are as you guessed. I use linux to work on the ramdisk. First rename uRamDisk to ramdisk.org. Create a folder below that file and cd to it. Then use these three commands:
Code:
dd if=../ramdisk.org bs=64 skip=1 | gunzip -c | cpio -i
find . -regex "./.*"| cpio -ov -H newc | gzip -9c > ../ramdisk-repacked
mkimage -A ARM -T RAMDisk -n Image -d ../ramdisk-repacked ../ramdisk.modded
The first line extracts the contents of the ramdisk to the folder you are in. Then edit the contents as you see fit. init.encore.rc is the initramfs.
After editing, use the next two lines to recompile the ramdisk. Then rename the ramdisk.modded to uRamDisk and you are done.
Excellent! Thanks, it's extracted.
Now, the real fun begins
(College started so it might take some time to get it done, but yeah, I think it's possible to get Debian installed as the root OS).
If anyone is interested in the boot process of the Nook Color, here is a diagram:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If anyone is interested about the contents of the STOCK init.encore.rc from CM7.2 Mirage ROM, here's what it contains:
Code:
on early-init
start hwprops
on init
# setup global environment
export PHONE_STORAGE /mnt/emmc
export DSP_PATH /system/lib/dsp
export DEFAULT_BASEIMAGE /system/lib/dsp/baseimage.dof
# create mountpoints
mkdir /mnt/emmc 0000 system system
mkdir /mnt/usbdisk 0000 system system
symlink /mnt/emmc /emmc
symlink /mnt/usbdisk /usbdisk
# for encore
mkdir /rom 0777 root root
on fs
# mount partitions
mount vfat /dev/block/mmcblk0p2 /rom sync noatime nodiratime uid=1000,gid=1000,fmask=117,dmask=007
mount ext4 /dev/block/mmcblk0p5 /system wait ro barrier=1
mount ext4 /dev/block/mmcblk0p6 /data wait noatime nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p7 /cache wait noatime nosuid nodev barrier=1
on post-fs
# load kernel modules
#insmod /system/lib/modules/bridgedriver.ko
#insmod /system/lib/modules/dm-mod.ko
#insmod /system/lib/modules/dm-crypt.ko
#insmod /system/lib/modules/tun.ko
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chown audio audio /dev/pcmC0D0c
chown audio audio /dev/pcmC0D0p
chown audio audio /dev/controlC0
chown audio audio /dev/timer
on boot
# wireless
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# bluetooth uart
chown bluetooth bluetooth /dev/ttyS1
setprop wifi.interface tiwlan0
setprop wlan.driver.status "ok"
# Temporary workaround for SOD
# Only needed for 2.6.29
#write /sys/power/wake_lock 1
# Enable Power Management - thanks NookieFroyo for this
# Mount Debug file system
mount debugfs /sys/kernel/debug /sys/kernel/debug
# Enabling sleep in idle path
write /sys/kernel/debug/pm_debug/sleep_while_idle 1
# Enabling Voltage OFF in idle path
write /sys/kernel/debug/pm_debug/voltage_off_while_idle 1
# Enabling OFF mode
write /sys/kernel/debug/pm_debug/enable_off_mode 1
# Enablig DVFS with ondemand governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Enabling SmartReflex for Zoom3 OMAP3630
write /sys/power/sr_vdd1_autocomp 1
write /sys/power/sr_vdd2_autocomp 1
# Permissions for setting the DSP Frequency
chown media root /sys/power/dsp_freq
# Permissions for DSP bridge device
chmod 0777 /dev/DspBridge
# Permissions for Overlay
chmod 0777 /dev/video1
chmod 0777 /dev/video2
chmod 0777 /dev/omap-resizer
chmod 0777 /dev/omap-previewer
# change permissions for overlay managers and display devices
chmod 0777 /sys/devices/platform/omapdss/manager0/name
chmod 0777 /sys/devices/platform/omapdss/manager1/name
chmod 0777 /sys/devices/platform/omapdss/display0/name
chmod 0777 /sys/devices/platform/omapdss/display0/enabled
chmod 0777 /sys/devices/platform/omapdss/display0/timings
chmod 0777 /sys/devices/platform/omapdss/overlay0/manager
chmod 0777 /sys/devices/platform/omapdss/overlay1/manager
chmod 0777 /sys/devices/platform/omapdss/overlay2/manager
chmod 0777 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay2/enabled
# SGX driver
chmod 0666 /dev/pvrsrvkm
#Set read_ahead buffers
write /sys/block/mmcblk0/bdi/read_ahead_kb 1024
write /sys/block/mmcblk1/bdi/read_ahead_kb 1024
# There's no back seek penalty on MMC
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/back_seek_penalty 0
# Allow us to seek up to 1GB back
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/back_seek_max 1048576
# Only pick one request from each queue at each round robin
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/quantum 1
service hwprops /sbin/hwprops
critical
disabled
oneshot
# Initialize the SGX driver
service pvrsrvinit /system/bin/pvrsrvinit
user root
oneshot
# Start of SGX driver
service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
user root
oneshot
# Update the battery data heuristics every hour
service logbatterydata /system/bin/log_battery_data.sh
user root
group root
# OMAP specific services start here
service clearboot /system/bin/clear_bootcnt.sh
user root
group root
oneshot
# OMAP stuff:
# most of this is unused for the moment.
# load DSP firmwarevpl
service baseimage /system/bin/dspexec /system/lib/dsp/baseimage.dof
user root
group audio
oneshot
#service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
# user root
# group radio cache inet misc
# disabled
#service fw3a /system/bin/fw3a_core
# user media
# group system camera
service uim /system/bin/uim-sysfs
user root
group media bluetooth
oneshot
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/firmware.bin \
-i /system/etc/wifi/tiwlan.ini \
-e /rom/DevConf/WiFiBackupCalibration
disabled
oneshot
service ifcfg_ti /system/bin/ifconfig tiwlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_tiwlan0 /system/bin/dhcpcd -ABKL tiwlan0
disabled
oneshot
service iprenew_tiwlan0 /system/bin/dhcpcd -n
disabled
oneshot
I will contact Kuisma with my modified init.encore.rc (not posted here) and see if everything is alright, repack modified initramfs, replace it in the /boot partition, and let you guys know how it goes. If it works, awesomesauce, if it doesn't (and assuming it doesn't brick my Nook Color too hard) I will fix it and retry until I get it right.

Soldering Method: How do I disable SE Linux restrictions?

**UPDATE**
Here is my collection of scripts for rooting, blocking updates, and all kinds of stuff for ALL fire tv:
https://github.com/pwntrik/firetv/
Here's the video (2 parts) on howto root Fire TV 1st gen using soldering:
https://youtu.be/yhwYfudGiM8
https://youtu.be/Kn7zmXf08bk
**/UPDATE**
Greetings, AFTV hackers!
I have successfully soldered an emmc reader to the Fire TV 1st Gen, and I have complete r/w access. However, the tutorial for rooting appears to be a bit dated as the hacker (@maximus64) at the time was able to just copy the su binary to /system/xbin, modify the permissions, and run it.
Since FireOS 5.2.0.0, however, SELinux now prevents the binary from being executed:
(At this point, I have already copied su binary, chmod 6755 it, chown 0:0 it)
Code:
[email protected]:/ $ ls -la /system/xbin/su
ls -la /system/xbin/su
/system/xbin/su: Permission denied
1|[email protected]:/ $ su
su
/system/bin/sh: su: not found
127|[email protected]:/ $ ls -ld /system/xbin
ls -ld /system/xbin
drwxr-xr-x root shell 2017-01-05 01:35 xbin
[email protected]:/ $ ls -l /system/xbin/
ls -l /system/xbin/
-rwxr-xr-x root shell 63880 2016-05-27 17:00 dexdump
-rwxr-xr-x root shell 49816 2016-05-27 17:00 sqlite3
lstat '/system/xbin//su' failed: Permission denied
-rwxr-xr-x root shell 813248 2016-05-27 17:00 tcpdump
-rwxr-xr-x root shell 9384 2016-05-27 17:00 trapz
-rwxr-xr-x root shell 46456 2016-05-27 17:00 vitals_collection_agent
And just to make sure I did everything correctly, I hooked it up again then checked the binary:
Code:
[email protected]:/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b1/xbin# ls -la
total 1092
drwxr-xr-x. 2 root 2000 4096 Jan 5 04:35 .
drwxr-xr-x. 16 root root 4096 Jan 6 17:07 ..
-rwxr-xr-x. 1 root 2000 63880 May 27 2016 dexdump
-rwxr-xr-x. 1 root 2000 49816 May 27 2016 sqlite3
-rwsr-sr-x 1 root root 112576 Jan 5 04:31 su
-rwxr-xr-x. 1 root 2000 813248 May 27 2016 tcpdump
-rwxr-xr-x. 1 root 2000 9384 May 27 2016 trapz
-rwxr-xr-x. 1 root 2000 46456 May 27 2016 vitals_collection_agent
So at this point, I did some research and it seems that SELinux prevents this from being run. Does anyone have a workaround or could tell me how to give this binary permission? I have zero experience with SELinux, and even if anyone can point me to a similar thread for rooting when you have full r/w access, that'd be excellent..
Thanks!
cancelyourcable said:
Greetings, AFTV hackers!
I have successfully soldered an emmc reader to the Fire TV 1st Gen, and I have complete r/w access. However, the tutorial for rooting appears to be a bit dated as the hacker (@maximus64) at the time was able to just copy the su binary to /system/xbin, modify the permissions, and run it.
Since FireOS 5.2.0.0, however, SELinux now prevents the binary from being executed:
(At this point, I have already copied su binary, chmod 6755 it, chown 0:0 it)
Code:
[email protected]:/ $ ls -la /system/xbin/su
ls -la /system/xbin/su
/system/xbin/su: Permission denied
1|[email protected]:/ $ su
su
/system/bin/sh: su: not found
127|[email protected]:/ $ ls -ld /system/xbin
ls -ld /system/xbin
drwxr-xr-x root shell 2017-01-05 01:35 xbin
[email protected]:/ $ ls -l /system/xbin/
ls -l /system/xbin/
-rwxr-xr-x root shell 63880 2016-05-27 17:00 dexdump
-rwxr-xr-x root shell 49816 2016-05-27 17:00 sqlite3
lstat '/system/xbin//su' failed: Permission denied
-rwxr-xr-x root shell 813248 2016-05-27 17:00 tcpdump
-rwxr-xr-x root shell 9384 2016-05-27 17:00 trapz
-rwxr-xr-x root shell 46456 2016-05-27 17:00 vitals_collection_agent
And just to make sure I did everything correctly, I hooked it up again then checked the binary:
Code:
[email protected]:/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b1/xbin# ls -la
total 1092
drwxr-xr-x. 2 root 2000 4096 Jan 5 04:35 .
drwxr-xr-x. 16 root root 4096 Jan 6 17:07 ..
-rwxr-xr-x. 1 root 2000 63880 May 27 2016 dexdump
-rwxr-xr-x. 1 root 2000 49816 May 27 2016 sqlite3
-rwsr-sr-x 1 root root 112576 Jan 5 04:31 su
-rwxr-xr-x. 1 root 2000 813248 May 27 2016 tcpdump
-rwxr-xr-x. 1 root 2000 9384 May 27 2016 trapz
-rwxr-xr-x. 1 root 2000 46456 May 27 2016 vitals_collection_agent
So at this point, I did some research and it seems that SELinux prevents this from being run. Does anyone have a workaround or could tell me how to give this binary permission? I have zero experience with SELinux, and even if anyone can point me to a similar thread for rooting when you have full r/w access, that'd be excellent..
Thanks!
Click to expand...
Click to collapse
bueller_recovery_v2.zip begins with a shell script. If you open it in a text editor, you can see it. mkdir /system/recovery, unzip the contents of that zip to /system/recovery, and do the mv and ln commands. Make sure the selinux contexts of /system/recovery and it's contents match the other contents of /systems.
And also make sure the contents are chmod 755.
rbox said:
bueller_recovery_v2.zip begins with a shell script. If you open it in a text editor, you can see it. mkdir /system/recovery, unzip the contents of that zip to /system/recovery, and do the mv and ln commands. Make sure the selinux contexts of /system/recovery and it's contents match the other contents of /systems.
And also make sure the contents are chmod 755.
Click to expand...
Click to collapse
Thanks, rbox! I've managed to rewrite the script to do all that, but how do I make sure the SELinux contexts match? Sorry, not familiar with SELinux.
Is this the ACTUAL partition table, or is this the way the eMMC reader loads it?
Code:
[email protected]:/media/root# ls 5*
57f8f4bc-abf4-655f-bf67-946fc0f9f25b:
adb backup hostapd property system?
anr bugreports key_provisioning prReset time
app connectivity local radio tombstones
app-asec dalvik-cache logd resource-cache user
app_ext data lost+found securedStorageLocation vitals
app-lib debug_service media securestop webcrypto
app_ms dontpanic mediadrm security wiper
app-private dpm misc shared wpstiles
audio drm playready ssh
autotrace fota proffline system
57f8f4bc-abf4-655f-bf67-946fc0f9f25b1:
data lost+found usf
57f8f4bc-abf4-655f-bf67-946fc0f9f25b2:
com.amazon.avod.apk lost+found
com.amazon.venezia.apk recovery
com.amazon.vizzini-550901810.apk signed_com.amazon.kso.blackbird-1550000810.apk
dalvik-cache signed_CSAppFireTV-fireOs-release_v112.apk
57f8f4bc-abf4-655f-bf67-946fc0f9f25b3:
data lost+found usf
57f8f4bc-abf4-655f-bf67-946fc0f9f25b4:
app etc lib priv-app sqfs vendor
bin fonts lost+found recovery-from-boot.p tts xbin
build.prop framework media security usr
I ask because /system/bin is actually on a completely separate partition using this method. Is it possible to copy the actual init2stub in place of e2fsck instead of symlinking it? (in case the symlink doesn't work)
Here's my modified version of your script:
Code:
# Put your `recovery' folder in here, unzipped
SHARED="/media/sf_Shared"
# This is the directory created by the MMC reader
LABEL="/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"
SYSTEM="${LABEL}/system"
BIN="${LABEL}4/bin"
echo "Copying recovery..."
cp -rf $SHARED/recovery $SYSTEM
echo "Chmodding..."
chmod -R 755 $SYSTEM/recovery
echo "Backup the old e2fsck..."
mv $BIN/e2fsck $BIN/e2fsck.real
echo "Symlink e2fsck to 2ndinitstub..."
# If symlink doesn't work, can I copy 2ndinitstub completely?
ln -sf ../recovery/2ndinitstub $BIN/e2fsck
echo "Done."
Thanks for your help otherwise I'd be so SCREWED! :laugh:
cancelyourcable said:
Thanks, rbox! I've managed to rewrite the script to do all that, but how do I make sure the SELinux contexts match? Sorry, not familiar with SELinux.
Is this the ACTUAL partition table, or is this the way the eMMC reader loads it?
Code:
[email protected]:/media/root# ls 5*
57f8f4bc-abf4-655f-bf67-946fc0f9f25b:
adb backup hostapd property system?
anr bugreports key_provisioning prReset time
app connectivity local radio tombstones
app-asec dalvik-cache logd resource-cache user
app_ext data lost+found securedStorageLocation vitals
app-lib debug_service media securestop webcrypto
app_ms dontpanic mediadrm security wiper
app-private dpm misc shared wpstiles
audio drm playready ssh
autotrace fota proffline system
57f8f4bc-abf4-655f-bf67-946fc0f9f25b1:
data lost+found usf
57f8f4bc-abf4-655f-bf67-946fc0f9f25b2:
com.amazon.avod.apk lost+found
com.amazon.venezia.apk recovery
com.amazon.vizzini-550901810.apk signed_com.amazon.kso.blackbird-1550000810.apk
dalvik-cache signed_CSAppFireTV-fireOs-release_v112.apk
57f8f4bc-abf4-655f-bf67-946fc0f9f25b3:
data lost+found usf
57f8f4bc-abf4-655f-bf67-946fc0f9f25b4:
app etc lib priv-app sqfs vendor
bin fonts lost+found recovery-from-boot.p tts xbin
build.prop framework media security usr
I ask because /system/bin is actually on a completely separate partition using this method. Is it possible to copy the actual init2stub in place of e2fsck instead of symlinking it? (in case the symlink doesn't work)
Here's my modified version of your script:
Code:
# Put your `recovery' folder in here, unzipped
SHARED="/media/sf_Shared"
# This is the directory created by the MMC reader
LABEL="/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"
SYSTEM="${LABEL}/system"
BIN="${LABEL}4/bin"
echo "Copying recovery..."
cp -rf $SHARED/recovery $SYSTEM
echo "Chmodding..."
chmod -R 755 $SYSTEM/recovery
echo "Backup the old e2fsck..."
mv $BIN/e2fsck $BIN/e2fsck.real
echo "Symlink e2fsck to 2ndinitstub..."
# If symlink doesn't work, can I copy 2ndinitstub completely?
ln -sf ../recovery/2ndinitstub $BIN/e2fsck
echo "Done."
Thanks for your help otherwise I'd be so SCREWED! :laugh:
Click to expand...
Click to collapse
That is /data. Not /system. ls -lZ will show you contexts.
rbox said:
That is /data. Not /system. ls -lZ will show you contexts.
Click to expand...
Click to collapse
Well, not sure exactly what happened but I booted it back up and /system/recovery doesn't exist. Even if that's normal behavior, it didn't run TWRP.
The shell script I pasted above, it runs chcon and chmod, but perhaps chcon has no effect since it's being run on a host system (linux), instead of the actual android system (I kinda expected that.)
Code:
[email protected]:/system/bin $ ls -Z e2*
ls -Z e2*
e2fsck: Permission denied
e2fsck.real: Permission denied
Is there an init file I can edit to run chcon or completely disable selinux? Seems like that's probably preventing it. I can't see log files as user, but I feel like that might be part of it.
Thanks
cancelyourcable said:
Well, not sure exactly what happened but I booted it back up and /system/recovery doesn't exist. Even if that's normal behavior, it didn't run TWRP.
The shell script I pasted above, it runs chcon and chmod, but perhaps chcon has no effect since it's being run on a host system (linux), instead of the actual android system (I kinda expected that.)
Code:
[email protected]:/system/bin $ ls -Z e2*
ls -Z e2*
e2fsck: Permission denied
e2fsck.real: Permission denied
Is there an init file I can edit to run chcon or completely disable selinux? Seems like that's probably preventing it. I can't see log files as user, but I feel like that might be part of it.
Thanks
Click to expand...
Click to collapse
Did you properly unmount the filesystem after you were done changing it? That's really the only way the changes wouldn't stick and recovery wouldn't be there. You definitely need to verify all the permissions and contexts manually before booting back in. Don't just assume a script worked. Also, I think chcon isn't going to work, now that I think about it. I remember when I was messing around with this stuff with the Fire TV 2 I wound up having to use extended attributes manually. This page: http://unix.stackexchange.com/quest...on-mounted-ext4-image-from-non-selinux-system explains how to do. As for disabling selinux... that's half the whole point of 2ndinit
rbox said:
Did you properly unmount the filesystem after you were done changing it? That's really the only way the changes wouldn't stick and recovery wouldn't be there. You definitely need to verify all the permissions and contexts manually before booting back in. Don't just assume a script worked. Also, I think chcon isn't going to work, now that I think about it. I remember when I was messing around with this stuff with the Fire TV 2 I wound up having to use extended attributes manually. This page: http://unix.stackexchange.com/quest...on-mounted-ext4-image-from-non-selinux-system explains how to do. As for disabling selinux... that's half the whole point of 2ndinit
Click to expand...
Click to collapse
Ya, definitely unmounted it. I'm like 99% sure it's because of this selinux thing. Ideally if I can get these extended attributes to work and run either `su' or get the recovery to load, that'd be best.
But /system and /recovery are on two separate partitions. When I look at the layout from linux when I mount it using the soldering method, it looks like this:
Code:
# /dev/sdb1 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b3 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb19 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b2 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb2 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b1 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb20 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb18 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
And from the firetv using adb shell, here's all the mounts:
Code:
[email protected]:/ $ mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,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,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,nomblk_io_submit,nobarrier,commit=20,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/loop0 /mnt/sqfs squashfs ro,context=u:object_r:squashfs_file:s0,relatime 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,context=u:object_r:persist_file:s0,nosuid,nodev,noatime,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/shell/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
It looks very different. Like the /bin that appears in /system on the fire tv is actually on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4, yet /system appears on a completely separate partition /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b it's weird. Copying e2fsck did make it appear there, yet adding /system/recovery did nothing:
Code:
[email protected]:/ $ cd /system/recovery
cd /system/recovery
/system/bin/sh: cd: /system/recovery: No such file or directory
Not sure whether this is the firetv or the emmc reader which is displaying it oddly.
I'll wire it back up tomorrow and see if I can get extended permissions as well as try to figure out why the recovery dir is not showing up at all.
Thanks!
cancelyourcable said:
Ya, definitely unmounted it. I'm like 99% sure it's because of this selinux thing. Ideally if I can get these extended attributes to work and run either `su' or get the recovery to load, that'd be best.
But /system and /recovery are on two separate partitions. When I look at the layout from linux when I mount it using the soldering method, it looks like this:
Code:
# /dev/sdb1 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b3 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb19 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b2 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb2 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b1 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb20 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
# /dev/sdb18 on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
And from the firetv using adb shell, here's all the mounts:
Code:
[email protected]:/ $ mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,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,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,nomblk_io_submit,nobarrier,commit=20,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/loop0 /mnt/sqfs squashfs ro,context=u:object_r:squashfs_file:s0,relatime 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,context=u:object_r:persist_file:s0,nosuid,nodev,noatime,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/shell/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
It looks very different. Like the /bin that appears in /system on the fire tv is actually on /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4, yet /system appears on a completely separate partition /media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b it's weird. Copying e2fsck did make it appear there, yet adding /system/recovery did nothing:
Code:
[email protected]:/ $ cd /system/recovery
cd /system/recovery
/system/bin/sh: cd: /system/recovery: No such file or directory
Not sure whether this is the firetv or the emmc reader which is displaying it oddly.
I'll wire it back up tomorrow and see if I can get extended permissions as well as try to figure out why the recovery dir is not showing up at all.
Thanks!
Click to expand...
Click to collapse
You're not looking for a partition with a directory called system in it. The partition IS /system. So the partition with 'bin' and 'xbin' is the /system partition. That other one is /data.
rbox said:
You're not looking for a partition with a directory called system in it. The partition IS /system. So the partition with 'bin' and 'xbin' is the /system partition. That other one is /data.
Click to expand...
Click to collapse
Alright, so I made some big progress
Here's my script which successfully installed your TWRP zip:
Code:
# Put your `recovery' folder in here, unzipped
SHARED="/media/sf_Shared"
# This is the directory created by the MMC reader
LABEL="/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"
# WARNING: this CHANGED from 4 to 3. Always CHECK FIRST
SYSTEM="${LABEL}3"
if [ ! -e "${SYSTEM}/xbin" ]; then
echo "ERROR: couldn't find /system/xbin - is the mount point correct?"
exit 1
fi
echo "Copying recovery..."
cp -rf $SHARED/recovery $SYSTEM
echo "Backup the old e2fsck..."
cp -i $SYSTEM/bin/e2fsck $SHARED/e2fsck.real
mv -i $SYSTEM/bin/e2fsck $SYSTEM/bin/e2fsck.real
echo "Chmodding and chconing RECOVERY..."
chown -R 0:2000 $SYSTEM/recovery
chmod -R 755 $SYSTEM/recovery
chcon -R --reference=$SYSTEM/bin $SYSTEM/recovery
echo "Copying, chmodding and chconing SU (in case recovery doesn't work out)..."
cp $SHARED/su $SYSTEM/xbin/
chown 0:2000 $SYSTEM/xbin/su
chmod 6755 $SYSTEM/xbin/su
chcon --reference=$SYSTEM/xbin/trapz $SYSTEM/xbin/su
echo "Symlink e2fsck to 2ndinitstub..."
ln -sf ../recovery/2ndinitstub $SYSTEM/bin/e2fsck
echo "Done."
Then I booted into TWRP successfully.
However, when I tried to install your bueller-5.2.1.1-rooted_r1 I got this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After a long time it was clearly hung, so I rebooted and now it's bricked. But I did do a `dd if=/dev/sdb123 of=system.img` so i have that.
Would it be possible to just overwrite that partition with your system prerooted image while I have it connected to the emmc reader?
Thanks again for all the help!
cancelyourcable said:
Alright, so I made some big progress
Here's my script which successfully installed your TWRP zip:
Code:
# Put your `recovery' folder in here, unzipped
SHARED="/media/sf_Shared"
# This is the directory created by the MMC reader
LABEL="/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b"
# WARNING: this CHANGED from 4 to 3. Always CHECK FIRST
SYSTEM="${LABEL}3"
if [ ! -e "${SYSTEM}/xbin" ]; then
echo "ERROR: couldn't find /system/xbin - is the mount point correct?"
exit 1
fi
echo "Copying recovery..."
cp -rf $SHARED/recovery $SYSTEM
echo "Backup the old e2fsck..."
cp -i $SYSTEM/bin/e2fsck $SHARED/e2fsck.real
mv -i $SYSTEM/bin/e2fsck $SYSTEM/bin/e2fsck.real
echo "Chmodding and chconing RECOVERY..."
chown -R 0:2000 $SYSTEM/recovery
chmod -R 755 $SYSTEM/recovery
chcon -R --reference=$SYSTEM/bin $SYSTEM/recovery
echo "Copying, chmodding and chconing SU (in case recovery doesn't work out)..."
cp $SHARED/su $SYSTEM/xbin/
chown 0:2000 $SYSTEM/xbin/su
chmod 6755 $SYSTEM/xbin/su
chcon --reference=$SYSTEM/xbin/trapz $SYSTEM/xbin/su
echo "Symlink e2fsck to 2ndinitstub..."
ln -sf ../recovery/2ndinitstub $SYSTEM/bin/e2fsck
echo "Done."
Then I booted into TWRP successfully.
However, when I tried to install your bueller-5.2.1.1-rooted_r1 I got this:
View attachment 3996750
After a long time it was clearly hung, so I rebooted and now it's bricked. But I did do a `dd if=/dev/sdb123 of=system.img` so i have that.
Would it be possible to just overwrite that partition with your system prerooted image while I have it connected to the emmc reader?
Thanks again for all the help!
Click to expand...
Click to collapse
UPDATE...
I flashed my original system.img and brought it back to a working state. After that, I set up recovery again then tried to install bueller-5.2.1.1-rooted_r1.zip. Same as before, it froze, but this time at 80%:
Here's the only "log" I could find:
Code:
[email protected]:/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4/recovery# cat log
Installing new recovery image: failed
So now I have the emmc reader connected again, and I'm *hoping* I can just flash the image in your bueller-5.2.1.1-rooted_r1.zip directly to the mmc using `dd if=system.new.dat of=/dev/sdb19`
But I thought I'd run it by your first before I brick it again :laugh:
Thanks again, @rbox
cancelyourcable said:
UPDATE...
I flashed my original system.img and brought it back to a working state. After that, I set up recovery again then tried to install bueller-5.2.1.1-rooted_r1.zip. Same as before, it froze, but this time at 80%:
View attachment 3997946
Here's the only "log" I could find:
Code:
[email protected]:/media/root/57f8f4bc-abf4-655f-bf67-946fc0f9f25b4/recovery# cat log
Installing new recovery image: failed
So now I have the emmc reader connected again, and I'm *hoping* I can just flash the image in your bueller-5.2.1.1-rooted_r1.zip directly to the mmc using `dd if=system.new.dat of=/dev/sdb19`
But I thought I'd run it by your first before I brick it again :laugh:
Thanks again, @rbox
Click to expand...
Click to collapse
The thread for TWRP talks about what to do if it hangs. You can use adb. You'll need to check the log while it's running. /tmp/recovery.log. The image in the rom is sparse, so you'll have to run sdat2img.py on it. And then you'll have to do all the steps listed in the updater-script. The image itself is 100% pure stock.
rbox said:
The thread for TWRP talks about what to do if it hangs. You can use adb. You'll need to check the log while it's running. /tmp/recovery.log. The image in the rom is sparse, so you'll have to run sdat2img.py on it. And then you'll have to do all the steps listed in the updater-script. The image itself is 100% pure stock.
Click to expand...
Click to collapse
I discovered your "updater-script" so I understand the process a lot better now (wish I had found this earlier)
How do I know which image to use for boot: boot.img or boot_unlocked.img? I'm running from a host system so I can't check the value of ro.boot.unlocked_kernel from within linux.
Thanks!
P.S. Almost finished a bash script others can use to flash your image from an emmc reader - I will post a guide on here!
cancelyourcable said:
I discovered your "updater-script" so I understand the process a lot better now (wish I had found this earlier)
How do I know which image to use for boot: boot.img or boot_unlocked.img? I'm running from a host system so I can't check the value of ro.boot.unlocked_kernel from within linux.
Thanks!
P.S. Almost finished a bash script others can use to flash your image from an emmc reader - I will post a guide on here!
Click to expand...
Click to collapse
Since it's running OS5, you have to use the regular boot.img, since your bootloader isn't unlocked.
cancelyourcable said:
P.S. Almost finished a bash script others can use to flash your image from an emmc reader - I will post a guide on here!
Click to expand...
Click to collapse
I would really appreciate this.
zexma said:
I would really appreciate this.
Click to expand...
Click to collapse
It's almost done! Will post very soon
cancelyourcable said:
It's almost done! Will post very soon
Click to expand...
Click to collapse
Don't want to bother, you
Is there any progress to expect, cause I'm stuck at the very same point, SELinux prevents loading su
(/system/xbin//su' failed: Permission denied)
Thanks in advance.
pwntrik said:
It's almost done! Will post very soon
Click to expand...
Click to collapse
Any progress on this?
zexma said:
Any progress on this?
Click to expand...
Click to collapse
Yes, it works 100%. Literally just ordered an overhead camera tripod for recording a video of the whole process. Sit tight -- I promise it's coming soon!
@pwntrik : any tricks to have your Linux (Ubuntu) box recognizing the FireTV in fastboot mode?
I can get it to connect in fastboot with Win7 on the same machine, but in Ubuntu 16.04 I'm not able to.
I did add ATTR{idVendor}== "1949" and ATTR{idProduct}=="0401" to /etc/udev/51-android.rules and rebooted, but no luck...
My FireTV (1st gen, last firmware was 5.0.5, rooted) is currently , after unsuccessful flash of "rooted-5.0.5_r1" ROM in TWRP stuck at this screen:
.
I know it's a longshot to recover it, but I have patience....
Sent from space
kozmo2k4 said:
@pwntrik : any tricks to have your Linux (Ubuntu) box recognizing the FireTV in fastboot mode?
I can get it to connect in fastboot with Win7 on the same machine, but in Ubuntu 16.04 I'm not able to.
I did add ATTR{idVendor}== "1949" and ATTR{idProduct}=="0401" to /etc/udev/51-android.rules and rebooted, but no luck...
My FireTV (1st gen, last firmware was 5.0.5, rooted) is currently , after unsuccessful flash of "rooted-5.0.5_r1" ROM in TWRP stuck at this screen:
.
I know it's a longshot to recover it, but I have patience....
Sent from space
Click to expand...
Click to collapse
I've been using Win10 for that. I only use Linux for writing the images.

can't find boot partition while trying to install usb host-mode on nook simple touch

Hello,
I am trying to install USB host-mode on my rooted nook simple touch so that I can use a keyboard or a mouse as a page turner. I am running 1.2.1, and rooted the nook using nook manager https://forum.xda-developers.com/showthread.php?t=2040351. This completed successfully. Then I installed a terminal app (can't find the link but it's called jackpal.androidterm.apk, can attach if needed) by putting it on a micro sd card and installing the file using relaunch (a file explorer app that appeared after rooting). Then I followed the instructions on https://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Replacing_boot_files writing
su
mount -o rw,remount rootfs /
mkdir /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
into the terminal app. It asked for permissions after su, which I granted and the other lines produced no errors but also no outputs. Now I am trying to find the /boot partition to replace uImage, as per the instructions, but I can't find /boot. It appears nowhere in the file explorer, and under advanced functions, the nook lists the following disks/partitions: /rom, /system, /data, /cache, /sdcard, /media, but no /boot
Any ideas? Really unsure as to why it's not showing up, because the commands that are supposed to create it seemed to complete without issue.
p.s. I also checked show hidden files in folders in the advanced settings
I dunno. Your "File Explorer" may be leading you astray.
Just do an ls -l in terminal and check.
ls -l produces:
drwxrwx--- system system 1969-12-31 16:00 rom
drwxrwxrwt root root 2018-02-26 11:11 sqlite_stmt_journals
d---rwxr-x system sdcard_rw 1969 -12-31 16:00 sdcard
drwxrwxr-x system sdcard_rw 1969 -12-31 16:00 media
drwxrwx--- system cache 2018-02-15 11:23 cache
drwxrwxrwx root root 2018-02-26 11:11 tmp
lrwxrwxrwx root root 2018-02-26 11:11 etc -> /system/etc
-rw-r--r-- root root 118 2018-02-15 12:03 init.rc.orig
-rw-r--r-- root root 118 2018-02-15 12:19 default.prop.orig
drwxr-xr-x root root 2018-02-05 12:19 system
drwxr-xr-x root root 1969-12-31 16:00 sys
drwxr-x--- root root 2018-02-15 12:03 sbin
dr-xr-xr-x root root 1969-12-31 16:00 proc
-rwxr-x--- root root 1677 2018-02-15 12:03 init.goldfish.rc
-rwxr-x--- root root 128000 2018-02-15 12:03 init
-rwxr-x--- root root 324 2018-02-15 12:03 env.txt
drwxrwx--x system system 2018-02-15 11:24 data
-rw-r--r-- root root 118 2018-02-15 12:03 default.prop
-rwxr-x--- root root 19284 2018-02-15 12:03 init.rc
drwx------ root root 2012-12-07 14:34 root
drwxr-xr-x root root 2018-02-26 11:11 dev
Further, I tried to copy uImage into /boot using the terminal and it acted as if /boot didn't exist, so I'm pretty sure that it isn't there for some reason.
Thanks
Well, something you're doing isn't working.
The commands are correct.
Code:
su
Did this work? Do you get a # prompt? Type "id", does it say you're root?
Code:
mount -o rw,remount rootfs /
Ok, did it remount? Type "mount" and see if rootfs is actually "rw".
Code:
mkdir /boot
Apparently this didn't work because you should see an empty directory at least.
Code:
mount -t vfat /dev/block/mmcblk0p1 /boot
Apparently this didn't work.
Did this work? Do you get a # prompt? Type "id", does it say you're root?
su produces a # prompt, and id produces: uid=0(root) gid=0(root), so i think this part worked.
Ok, did it remount? Type "mount" and see if rootfs is actually "rw".
mount produces: rootfs / rootfs rw 0 0, and then a bunch of other stuff, so i think this worked too.
mkdir /boot
this produces nothing, just another # prompt, so this might be the problem
mount -t vfat /dev/block/mmcblk0p1 /boot
this also produces nothing, just another # prompt.
Any idea why mkdir /boot would fail?
Thanks for being so helpful!
Well, the mkdir should have created an empty directory.
You should be able to "ls -l /" it.
If not, you could mkdir and mount anywhere.
Code:
cd /data/local/tmp
mkdir mybooty
mount -t vfat /dev/block/mmcblk0p1 /data/local/tmp/mybooty
There's nothing special about the name "boot".
Okay,
That solved the problem. Thanks for all your help!

Categories

Resources