[Q] backtrack 5 on android Terminal Problem - Android Q&A, Help & Troubleshooting

Hello when i will install backtrack 5 for android from this topic here: http://forum.xda-developers.com/showthread.php?t=1079898 --> i get this in Terminal Emulator:
sh-4.1$ export PATH=/data/local/bin:$PATH
sh-4.1$ su
sh-4.1# cd sdcard
sh-4.1# cd backtrack
sh-4.1# cd bt5
sh-4.1# sh bt
mkdir: can't create directory '/data/local/mnt': File exists
losetup: /dev/block/loop7: No such file or directory
mount: mounting /dev/block/loop7 on /data/local/mnt failed: No such device
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
bt: line 23: /data/local/mnt/etc/resolv.conf: No such file or directory
bt: line 24: /data/local/mnt/etc/resolv.conf: No such file or directory
bt: line 25: /data/local/mnt/etc/hosts: No such file or directory
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0 Link encap:Ethernet HWaddr A8:269:122:71
inet addr:192.168.2.119 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::aa26:d9ff:fe12:d271/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1242 errors:0 dropped:62 overruns:0 frame:0
TX packets:1254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1130503 (1.0 MiB) TX bytes:135434 (132.2 KiB)
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
umount: can't umount /data/local/mnt/dev/pts: No such file or directory
umount: can't umount /data/local/mnt/proc: No such file or directory
umount: can't umount /data/local/mnt/sys: No such file or directory
umount: can't umount /data/local/mnt: Invalid argument
losetup: /dev/loop7: No such device or address
sh-4.1#
can anyone help me ?

Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Thanks ✟
Moving to Q&A

Related

[Q] X10/MIUI/Built-In OpenVpn

Hi,
I try to configure openvpn on my X10 MiUI: TipNMiUI-1.8.26
The GUI say only "Unable to connect ..."
Here is the logcat output.
Code:
E/VpnService( 4212): onError()
E/VpnService( 4212): java.io.IOException: No such file or directory
E/VpnService( 4212): at android.net.LocalSocketImpl.connectLocal(Native Metho
d)
E/VpnService( 4212): at android.net.LocalSocketImpl.connect(LocalSocketImpl.j
ava:238)
E/VpnService( 4212): at android.net.LocalSocket.connect(LocalSocket.java:98)
E/VpnService( 4212): at com.android.server.vpn.OpenvpnService$OpenvpnThread.o
penSocket(OpenvpnService.java:247)
E/VpnService( 4212): at com.android.server.vpn.OpenvpnService$OpenvpnThread.<
init>(OpenvpnService.java:194)
E/VpnService( 4212): at com.android.server.vpn.OpenvpnService.waitUntilConnec
tedOrTimedout(OpenvpnService.java:149)
E/VpnService( 4212): at com.android.server.vpn.VpnService.onConnect(VpnServic
e.java:148)
E/VpnService( 4212): at com.android.server.vpn.VpnServiceBinder$2.run(VpnServ
iceBinder.java:118)
E/VpnService( 4212): at java.lang.Thread.run(Thread.java:1019)
I/VpnService( 4212): disconnecting VPN...
D/VpnService( 4212): onFinalCleanUp()
I/VpnService( 4212): restore original suffices --> null
D/VpnSettings( 4203): received connectivity: Home: connected? DISCONNECTING er
r=0
D/VpnSettings( 4203): received connectivity: Home: connected? IDLE err=101
Code:
# ls -l /dev/tun
ls -l /dev/tun
crw-r----- 1 1016 1016 10, 200 Nov 14 11:50 /dev/tun
Code:
$ su
su
# busybox insmod /sdcard/tun.ko
busybox insmod /sdcard/tun.ko
# busybox lsmod
busybox lsmod
tun 11116 0 - Live 0xbf000000
ar6000 241048 0 - Live 0xbf03d000
Tun used: tun-x10i-2.3.3 found on this board.
Why this exception is throwed ? "java.io.IOException: No such file or directory"
Which file is missing or cannot be opened ?
I want to make it working !
Wich command result could i post ?
hakna
No clue ??
Up !
hakna

[Help] Gigabyte Aku A1 Problems

Hi.
I tried to root my phone and it worked (with Faramir), after that I tried repartitioning the internal memory with Meteos MTK6589 ROM EDIT (link http://forum.xda-developers.com/showthread.php?t=2611583 ), I rebooted the phone to do step 3 (Press "Reboot into Recovery" and choose "'Wipe data/Factory Reset" on CWM or Wipe internal storage on TWRP) but I did with Android System Recovery e3, after I rebooted again the phone the problems appears. The phone stuck on boot logo. I tried to reinstall stock rom, but I couldn't due error:
"symlink: some symlinks failed
Installation aborted."
Click to expand...
Click to collapse
After these, I installed CWM (v5.5.0.4) and I tried with a custom rom named Pure Xperia Z2. I wiped cache partition and Dalvik Cache, but the installation didn't succeed. Summary log output:
Code:
Wiping System...
format /system /dev/block/mmcblk0p6
Creating filesystem with parameters:
Size: 131072000
Block size: 4096
Blocks per group: 32768
Inodes per group: 8000
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 32000
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/8000 inodes and 1538/32000 blocks
Mounting System...
mount /system /dev/block/mmcblk0p6
Installing Files...
symlink: failed to symlink /system/fonts/DroidSans-Bold.ttf to Roboto-Bold.ttf: No such file or directory
symlink: failed to symlink /system/fonts/DroidSans.ttf to Roboto-Regular.ttf: No such file or directory
symlink: failed to symlink /system/bin/debuggerd to aee_debuggerd: No such file or directory
symlink: failed to symlink /system/bin/sh to mksh: No such file or directory
symlink: failed to symlink /system/bin/cat to toolbox: No such file or directory
symlink: failed to symlink /system/bin/chmod to toolbox: No such file or directory
symlink: failed to symlink /system/bin/chown to toolbox: No such file or directory
symlink: failed to symlink /system/bin/cmp to toolbox: No such file or directory
symlink: failed to symlink /system/bin/date to toolbox: No such file or directory
symlink: failed to symlink /system/bin/dd to toolbox: No such file or directory
symlink: failed to symlink /system/bin/df to toolbox: No such file or directory
symlink: failed to symlink /system/bin/dmesg to toolbox: No such file or directory
symlink: failed to symlink /system/bin/getevent to toolbox: No such file or directory
symlink: failed to symlink /system/bin/getprop to toolbox: No such file or directory
symlink: failed to symlink /system/bin/hd to toolbox: No such file or directory
symlink: failed to symlink /system/bin/id to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ifconfig to toolbox: No such file or directory
symlink: failed to symlink /system/bin/iftop to toolbox: No such file or directory
symlink: failed to symlink /system/bin/insmod to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ioctl to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ionice to toolbox: No such file or directory
symlink: failed to symlink /system/bin/kill to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ln to toolbox: No such file or directory
symlink: failed to symlink /system/bin/log to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ls to toolbox: No such file or directory
symlink: failed to symlink /system/bin/lsmod to toolbox: No such file or directory
symlink: failed to symlink /system/bin/lsof to toolbox: No such file or directory
symlink: failed to symlink /system/bin/md5 to toolbox: No such file or directory
symlink: failed to symlink /system/bin/mkdir to toolbox: No such file or directory
symlink: failed to symlink /system/bin/mount to toolbox: No such file or directory
symlink: failed to symlink /system/bin/mv to toolbox: No such file or directory
symlink: failed to symlink /system/bin/nandread to toolbox: No such file or directory
symlink: failed to symlink /system/bin/netstat to toolbox: No such file or directory
symlink: failed to symlink /system/bin/newfs_msdos to toolbox: No such file or directory
symlink: failed to symlink /system/bin/notify to toolbox: No such file or directory
symlink: failed to symlink /system/bin/printenv to toolbox: No such file or directory
symlink: failed to symlink /system/bin/ps to toolbox: No such file or directory
symlink: failed to symlink /system/bin/reboot to toolbox: No such file or directory
symlink: failed to symlink /system/bin/renice to toolbox: No such file or directory
symlink: failed to symlink /system/bin/rm to toolbox: No such file or directory
symlink: failed to symlink /system/bin/rmdir to toolbox: No such file or directory
symlink: failed to symlink /system/bin/rmmod to toolbox: No such file or directory
symlink: failed to symlink /system/bin/route to toolbox: No such file or directory
symlink: failed to symlink /system/bin/schedtop to toolbox: No such file or directory
symlink: failed to symlink /system/bin/sendevent to toolbox: No such file or directory
symlink: failed to symlink /system/bin/setconsole to toolbox: No such file or directory
symlink: failed to symlink /system/bin/setprop to toolbox: No such file or directory
symlink: failed to symlink /system/bin/sleep to toolbox: No such file or directory
symlink: failed to symlink /system/bin/smd to toolbox: No such file or directory
symlink: failed to symlink /system/bin/start to toolbox: No such file or directory
symlink: failed to symlink /system/bin/stop to toolbox: No such file or directory
symlink: failed to symlink /system/bin/sync to toolbox: No such file or directory
symlink: failed to symlink /system/bin/top to toolbox: No such file or directory
symlink: failed to symlink /system/bin/touch to toolbox: No such file or directory
symlink: failed to symlink /system/bin/umount to toolbox: No such file or directory
symlink: failed to symlink /system/bin/uptime to toolbox: No such file or directory
symlink: failed to symlink /system/bin/vmstat to toolbox: No such file or directory
symlink: failed to symlink /system/bin/watchprops to toolbox: No such file or directory
symlink: failed to symlink /system/bin/wipe to toolbox: No such file or directory
symlink: failed to symlink /system/lib/modules/wlan.ko to wlan_mt6628.ko: No such file or directory
symlink: failed to symlink /system/xbin/libmnlp to /system/xbin/libmnlp_mt6628: No such file or directory
Setting Permissions...
set_perm: chown of /system/framework/android.policy.jar to 0 0 failed: No such file or directory
set_perm: chmod of /system/framework/android.policy.jar to 644 failed: No such file or directory
set_perm: chown of /system/bin/netcfg to 0 3003 failed: No such file or directory
set_perm: chmod of /system/bin/netcfg to 2750 failed: No such file or directory
set_perm: chown of /system/bin/ping to 0 3004 failed: No such file or directory
set_perm: chmod of /system/bin/ping to 2755 failed: No such file or directory
set_perm: chown of /system/bin/run-as to 0 2000 failed: No such file or directory
set_perm: chmod of /system/bin/run-as to 6750 failed: No such file or directory
set_perm: chown of /system/etc/bluetooth to 0 0 failed: No such file or directory
set_perm: chmod of /system/etc/bluetooth to 755 failed: No such file or directory
set_perm: chown of /system/etc/bluetooth/auto_pairing.conf to 1000 1000 failed: No such file or directory
set_perm: chmod of /system/etc/bluetooth/auto_pairing.conf to 640 failed: No such file or directory
set_perm: chown of /system/etc/bluetooth/blacklist.conf to 3002 3002 failed: No such file or directory
set_perm: chmod of /system/etc/bluetooth/blacklist.conf to 444 failed: No such file or directory
set_perm: chown of /system/etc/dbus.conf to 1002 1002 failed: No such file or directory
set_perm: chmod of /system/etc/dbus.conf to 440 failed: No such file or directory
set_perm: chown of /system/etc/dhcpcd/dhcpcd-run-hooks to 1014 2000 failed: No such file or directory
set_perm: chmod of /system/etc/dhcpcd/dhcpcd-run-hooks to 550 failed: No such file or directory
set_perm: chown of /system/etc/init.goldfish.sh to 0 2000 failed: No such file or directory
set_perm: chmod of /system/etc/init.goldfish.sh to 550 failed: No such file or directory
set_perm: chown of /system/etc/wide-dhcpv6/dhcp6c.script to 1014 2000 failed: No such file or directory
set_perm: chmod of /system/etc/wide-dhcpv6/dhcp6c.script to 550 failed: No such file or directory
set_perm: chown of /system/vendor to 0 2000 failed: No such file or directory
set_perm: chmod of /system/vendor to 755 failed: No such file or directory
set_perm: chown of /system/vendor/lib to 0 2000 failed: No such file or directory
set_perm: chmod of /system/vendor/lib to 755 failed: No such file or directory
set_perm: chown of /system/vendor/lib/drm/libdrmwvmplugin.so to 0 0 failed: No such file or directory
set_perm: chmod of /system/vendor/lib/drm/libdrmwvmplugin.so to 644 failed: No such file or directory
set_perm: chown of /system/vendor/lib/egl to 0 2000 failed: No such file or directory
set_perm: chmod of /system/vendor/lib/egl to 755 failed: No such file or directory
set_perm: chown of /system/vendor/lib/hw/gralloc.mt6589.so to 0 0 failed: No such file or directory
set_perm: chmod of /system/vendor/lib/hw/gralloc.mt6589.so to 644 failed: No such file or directory
set_perm: chown of /system/xbin/tcpdump to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/tcpdump to 755 failed: No such file or directory
set_perm: chown of /system/xbin/busybox to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/busybox to 755 failed: No such file or directory
symlink: failed to symlink /system/bin/busybox to /system/xbin/busybox: No such file or directory
about to run program [/system/xbin/busybox] with 4 args
run_program: execv failed: No such file or directory
run_program: child exited with status 1
set_perm: chown of /system/xbin/su to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/su to 6755 failed: No such file or directory
symlink: failed to symlink /system/bin/su to /system/xbin/su: No such file or directory
set_perm: chown of /system/bin/.ext to 0 0 failed: No such file or directory
set_perm: chmod of /system/bin/.ext to 777 failed: No such file or directory
set_perm: chown of /system/bin/.ext/.su to 0 0 failed: No such file or directory
set_perm: chmod of /system/bin/.ext/.su to 6755 failed: No such file or directory
set_perm: chown of /system/app/superuser.apk to 0 0 failed: No such file or directory
set_perm: chmod of /system/app/superuser.apk to 644 failed: No such file or directory
Adding init.d support
set_perm: chown of /system/bin/sysinit to 0 2000 failed: No such file or directory
set_perm: chmod of /system/bin/sysinit to 755 failed: No such file or directory
set_perm: chown of /system/etc/init.d to 0 0 failed: No such file or directory
set_perm: chmod of /system/etc/init.d to 777 failed: No such file or directory
about to run program [/tmp/add_initd.sh] with 1 args
/tmp/add_initd.sh: line 20: can't create /system/etc/install-recovery.sh: nonexistent directory
/tmp/add_initd.sh: line 20: can't create /system/etc/install-recovery.sh: nonexistent directory
/tmp/add_initd.sh: line 20: can't create /system/etc/install-recovery.sh: nonexistent directory
/tmp/add_initd.sh: line 20: can't create /system/etc/install-recovery.sh: nonexistent directory
/tmp/add_initd.sh: line 20: can't create /system/etc/install-recovery.sh: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
/tmp/add_initd.sh: line 40: can't create /system/bin/sysint: nonexistent directory
chmod: /system/etc/install-recovery.sh: No such file or directory
chown: /system/etc/install-recovery.sh: No such file or directory
chmod: /system/bin/sysint: No such file or directory
chown: /system/bin/sysint: No such file or directory
run_program: child exited with status 1
Writing boot...
Writing logo...
=================================================
Finished !
=================================================
script result was []
Installer Sucessfull (Status 0)
End at : Fri Jan 1 01:04:20 2010
I tried 3 version of stock rom, but it gave me the same error. I tried to remove
"assert(getprop("ro.product.device") == "Aku_A1" ||
getprop("ro.build.product") == "Aku_A1");"
Click to expand...
Click to collapse
from "updater-script", but I failed because in stock rom archive there are 4 identical file name in the same folder:
system\lib\libSync.so (289.772 bytes)
system\lib\libsync.so (5.160 bytes)
system\media\audio\ringtones\UrsaMinor.ogg (185.005 bytes)
system\media\audio\ringtones\URSAMINOR.ogg (144.112 bytes)
Click to expand...
Click to collapse
I tried removing one of file from each, but the installation failed again immediately after it started due error "Installation aborted." without any other information.
Other errors that I encountered
1. When I tried to mount/format /emmc: "Error mounting /emmc!"
2. When I tried to mount/format /sd-ext: "Formatting /sd-ext ... No app2sd partition found. Skipping format of /sd-ext. Done."
3. When I tried to mount internal memory or to format emmc on TWRP it didn't work.
Currently I am using CWM.
Any ideas? Thank you in advance and I apologize for my english mistakes and for the long post.

[Q] Droidsheep issues

Hey guys I am kind of a noon when it comes to rooting and debugging can some help me fix droidsheep
Here is the debugging code:
DEBUG SESSION START! Mon Jun 08 18:21:13 PDT 2015
Droidsheep path: /data/data/de.trier.infsec.koch.droidsheep/files/droidsheep
ARPSPoof Path: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof
Testing SU
BusyBox v1.23.2 (2015-03-30 10:55:10 ICT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, ash, awk, base64, basename, blkid, bunzip2, bzcat, bzip2, cal,
cat, chat, chattr, chgrp, chmod, chown, chroot, chrt, cksum, comm, cp,
crond, crontab, cut, date, dd, depmod, devmem, df, diff, dirname,
dmesg, dnsd, dnsdomainname, dos2unix, du, echo, egrep, env, ether-wake,
expand, expr, fakeidentd, fatattr, fbset, fdflush, fdformat, fgrep,
find, fold, free, freeramdisk, fsck, fstrim, fsync, ftpd, ftpget,
ftpput, fuser, getopt, grep, groups, gunzip, gzip, hd, head, hexdump,
hostid, hostname, httpd, hwclock, id, ifconfig, ifenslave, inotifyd,
insmod, install, ionice, iostat, ip, ipaddr, ipcalc, iplink, iproute,
iprule, iptunnel, kill, killall, killall5, last, less, ln, logname,
losetup, ls, lsattr, lsmod, lsof, lsusb, lzop, lzopcat, md5sum,
microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.vfat, mknod,
mkswap, modinfo, modprobe, more, mount, mountpoint, mt, mv, nameif,
nanddump, nandwrite, nc, netstat, nice, nmeter, nohup, nslookup, ntpd,
od, patch, pgrep, pidof, ping, pkill, pmap, powertop, printenv, printf,
ps, pscan, pwd, rdate, rdev, readahead, readlink, realpath, renice,
rev, rfkill, rm, rmdir, rmmod, route, run-parts, script, scriptreplay,
sed, seq, setsid, sh, sha1sum, sha256sum, sha3sum, sha512sum, shuf,
sleep, smemcap, sort, split, start-stop-daemon, stat, strings, stty,
sum, swapoff, swapon, sync, sysctl, tac, tail, tar, tee, telnet,
telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute,
tty, ttysize, tunctl, umount, uname, uncompress, unexpand, uniq,
unix2dos, unlink, unlzop, unzip, uptime, users, usleep, uudecode,
uuencode, vconfig, vi, watch, wc, wget, which, who, whoami, whois,
xargs, zcat
-rwxrwxrwx app_89 app_89 116992 2015-06-08 18:21 droidsheep
-rwxrwxrwx app_89 app_89 32256 2015-06-08 18:21 arpspoof
executing command: chmod 777 /data/data/de.trier.infsec.koch.droidsheep/files/droidsheep
executing command: chmod 777 /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof
executing command: killall droidsheep
executing command: chmod 777 /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof
executing command: chmod 777 /data/data/de.trier.infsec.koch.droidsheep/files/droidsheep
Error with command: chmod 777 /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof: killall: droidsheep: no process killed
executing command: echo 1 > /proc/sys/net/ipv4/ip_forward
executing command: iptables -F
executing command: /data/data/de.trier.infsec.koch.droidsheep/files/droidsheep
executing command: iptables -t nat -F
executing command: iptables -t nat -I POSTROUTING -s 0/0 -j MASQUERADE
executing command: iptables -P FORWARD ACCEPT
executing command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1
command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1line: e0:b9:a5:a:82:3e ff:ff:ff:ff:ff:ff 0806 42: arp reply 192.168.1.1 is-at e0:b9:a5:a:82:3e
command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1line: e0:b9:a5:a:82:3e ff:ff:ff:ff:ff:ff 0806 42: arp reply 192.168.1.1 is-at e0:b9:a5:a:82:3e
command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1line: e0:b9:a5:a:82:3e ff:ff:ff:ff:ff:ff 0806 42: arp reply 192.168.1.1 is-at e0:b9:a5:a:82:3e
command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1line: e0:b9:a5:a:82:3e ff:ff:ff:ff:ff:ff 0806 42: arp reply 192.168.1.1 is-at e0:b9:a5:a:82:3e
command: /data/data/de.trier.infsec.koch.droidsheep/files/arpspoof -s 1 -i wlan0 192.168.1.1line: e0:b9:a5:a:82:3e ff:ff:ff:ff:ff:ff 0806 42: arp reply 192.168.1.1 is-at e0:b9:a5:a:82:3e

I want to mount mmcblkp02 instead of mtdblock3 as /data (low internal storage problem

So it's nothing new, but solutions like "Link2SD", "Folder Mount" seems to don't work.
When I install for example AcrobatReader, Link2SD tells me that about 100% is linked, but still internal storage was decreased about 20MB-30MB - so I think that doesn't work.
I make some tryings on my own, broke system on my phone, upload another, make another tryings and got some reboots etc...
I want to move whole data partition to SD. Maybe someone know ready to use ROM which have that? Maybe it's very bad idea, but why?
Here is some details about phone:
Xperia Neo V, cm-10-20131006-NIGHTLY-haida (but I'm not relevant to it), unlocked bootloader.
(I cant post pictures....)
mount
Code:
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock0 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock3 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mmcblk0p2 /data/sdext2 ext2 rw,relatime,errors=continue 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,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 /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
df
Code:
Filesystem Size Used Free Blksize
/dev 179.4M 48K 179.4M 4096
/mnt/asec 179.4M 0K 179.4M 4096
/mnt/obb 179.4M 0K 179.4M 4096
/system 400M 360.6M 39.4M 4096
/data 420M 132.1M 287.9M 4096
/cache 101.5M 73.7M 27.8M 4096
/data/sdext2 1.4G 135.5M 1.3G 4096
/storage/sdcard0 377.2M 93.9M 283.3M 4096
/mnt/secure/asec 377.2M 93.9M 283.3M 4096
mtd
Code:
dev: size erasesize name
mtd0: 19000000 00020000 "system"
mtd1: 00600000 00020000 "appslog"
mtd2: 06580000 00020000 "cache"
mtd3: 1a400000 00020000 "userdata"
vold.fstab
Code:
## Vold 2.0 fstab for Mogami
#
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard /storage/sdcard0 auto /devices/platform/msm_sdcc.4/mmc_host/mmc1
init.rc
Code:
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.${ro.hardware}.rc
import /init.usb.rc
import /init.trace.rc
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_adj -16
start ueventd
# create mountpoints
mkdir /mnt 0775 root system
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0771 system cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/kernel/dmesg_restrict 1
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0660 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
write /dev/cpuctl/cpu.rt_runtime_us 950000
write /dev/cpuctl/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps
chown system system /dev/cpuctl/apps/tasks
chmod 0666 /dev/cpuctl/apps/tasks
write /dev/cpuctl/apps/cpu.shares 1024
write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
write /dev/cpuctl/apps/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps/bg_non_interactive
chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 [email protected] /system
mount yaffs2 [email protected] /system ro remount
mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0771 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create the lost+found directories, so as to enforce our permissions
mkdir /cache/lost+found 0770 root root
on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/systemkeys 0700 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0751 root root
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-asec 0700 root root
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
mkdir /data/ssh 0750 root shell
mkdir /data/ssh/empty 0700 root root
mkdir /data/radio 0770 radio radio
# create dalvik-cache and double-check the perms, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system
chown system system /data/resource-cache
chmod 0771 /data/resource-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770 root root
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# If there is no fs-post-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
# Include extra init file
import /init.cm.rc
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0664 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.lte 4096,87380,1220608,4096,16384,563200
setprop net.tcp.buffersize.umts 4096,87380,563200,4096,16384,110208
setprop net.tcp.buffersize.hspa 4096,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.hsupa 4096,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hsdpa 4096,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hspap 4096,87380,1220608,4096,16384,393216
setprop net.tcp.buffersize.edge 4096,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4096,8760,11680,4096,8760,11680
setprop net.tcp.buffersize.evdo 4096,87380,563200,4096,16384,262144
setprop net.tcp.buffersize.evdo_b 4096,87380,704512,4096,16384,262144
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0
# Run sysinit
exec /system/bin/sysinit
class_start core
class_start main
on nonencrypted
class_start late_start
on charger
class_start charger
on property:vold.decrypt=trigger_reset_main
class_reset main
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
on property:vold.decrypt=trigger_post_fs_data
trigger post-fs-data
on property:vold.decrypt=trigger_restart_min_framework
class_start main
on property:vold.decrypt=trigger_restart_framework
class_start main
class_start late_start
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
class core
critical
service console /system/bin/sh
class core
console
disabled
user shell
group log
on property:ro.debuggable=1
start console
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd
class core
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart zygote
onrestart restart media
onrestart restart surfaceflinger
onrestart restart drm
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
service debuggerd /system/bin/debuggerd
class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_r sdcard_rw qcom_oncrpc qcom_diag log
service surfaceflinger /system/bin/surfaceflinger
class main
user system
group graphics
onrestart restart zygote
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
class main
socket zygote stream 660 root system
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service drm /system/bin/drmserver
class main
user drm
group drm system inet drmrpc sdcard_r
service media /system/bin/mediaserver
class main
user media
group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc qcom_diag
ioprio rt 4
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
class main
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service installd /system/bin/installd
class main
socket installd stream 600 system system
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore drmrpc
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service sshd /system/bin/start-ssh
class main
disabled
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
When I mount mmcblkp02 as /data "overwriting" existing one, there was much more free space in "storage" and in built-in application manager (bar at bottom of the screen), but most of apps crashes, or moment after that phone reboots.
Code:
mount -t ext2 -o rw,nosuid,nodev /dev/block/mmcblk0p2 /data
Also when I cd /data I was only seeing data from sd, and there wasn't data from internal memory. I try to copy internal data to sd cp /data/* /cache/jarek [jarek=mmcblk0p2 mount point]. but it still doesn't work after manual mount.
I read some posts and it's appear that I must change init.rc, which is overwrite on every shutdown, so to do that I need unpack recovery (boot.img), edit and repack, then upload. But than what? Probably there will problem with app's data that was in internal storage... ?
Questions:
1. is there any ready for use ROM with this feature?
2. is someone do something like this? is this work?
3. maybe it can't work and I shouldn't lose few more days on it, so tell me why? (technically only, I know I can just go buy new phone)
4. maybe I can extend existing /data with mmcblk0p2 instead swap this?
Jarek

cannot lookup security context for /system/addon.d while packing system

So I'm trying to write up a simple system image patcher for my lineageOS rom (V20 Nougat).
When trying to pack the img after modification, I get this error:
Re-packing img.
Code:
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 1 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 21 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 37 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 38 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 74 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 76 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 78 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 79 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 80 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 81 is missing fields, skipping
/home/guy/Desktop/ROM_EXTRACT/file_contexts.bin: line 82 is missing fields, skipping
Creating filesystem with parameters:
Size: 2684190720
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 10239
Label:
Blocks: 655320
Block groups: 20
Reserved block group size: 159
error: build_directory_structure: cannot lookup security context for /system/addon.d
Any idea what I'm doing wrong?
Here is a whole copy of my script so far:
Code:
echo "Deleting old folder if it exists."
echo
rm -r ~/Desktop/ROM_EXTRACT
echo "Extracting ROM."
echo
unzip ~/Desktop/NULL_ROM.zip -d ~/Desktop/ROM_EXTRACT
echo "Changing directories"
echo
cd ~/Desktop/ROM_EXTRACT
echo "Copying Tools."
echo
mkdir ~/Desktop/ROM_EXTRACT/TOOLS
cp ~/Desktop/PATCH_TOOLS/* ~/Desktop/ROM_EXTRACT/TOOLS
chmod 0777 ~/Desktop/ROM_EXTRACT/TOOLS/*
echo "Extracting dat."
echo
mkdir ~/Desktop/ROM_EXTRACT/EXTRACT
./TOOLS/sdat2img.py system.transfer.list system.new.dat ./EXTRACT/system.img
echo "Mounting img."
echo
mkdir ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo mount -t ext4 -o loop ./EXTRACT/system.img ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo mount -o remount,rw ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
echo "PATCH IMG"
echo
echo "Re-packing img."
echo
./TOOLS/make_ext4fs -T 0 -S ~/Desktop/ROM_EXTRACT/file_contexts.bin -l 2684190720 -a system ./system_new.img ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
echo "Cleaning up."
echo
sudo umount ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY
sudo rmdir ~/Desktop/ROM_EXTRACT/EXTRACT/MODIFY

Categories

Resources