[ROOT][ECLIPSE] Installation failed due to invalid APK file - Galaxy S III General

Hi guys,
Sorry if posting the wrong place, but I figured General would be the safest place to put this..
I just rotted my phone again yesterday, and it worked great (using Samsung Galaxy S3 ToolKit v7.0.0)
I have root access, and it all works as it should on the phone.
However, I do have one problem now.
When I was rooting the phone, I had to choose which model. I Have the I9300XXELL4 version, but I used ELLA (both is JZ054K).
I'm using Eclipse to develop apps to my device, and now I cant test my apps on my phone.
When I do "Run as-> Android Application" to puch it to my device, this is the error I'm getting:
Code:
[2013-01-24 11:44:56 - GameTutorial_001] Installation failed due to invalid APK file!
[2013-01-24 11:44:56 - GameTutorial_001] Please check logcat output for more details.
[2013-01-24 11:44:56 - GameTutorial_001] Launch canceled!
And from LogCat I get this:
Code:
01-24 11:44:51.186: D/AndroidRuntime(8724): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
01-24 11:44:51.186: D/AndroidRuntime(8724): CheckJNI is OFF
01-24 11:44:51.191: D/AndroidRuntime(8724): setted country_code = Nordic
01-24 11:44:51.191: D/AndroidRuntime(8724): setted countryiso_code = SE
01-24 11:44:51.196: D/AndroidRuntime(8724): setted sales_code = NEE
01-24 11:44:51.196: D/AndroidRuntime(8724): readGMSProperty: start
01-24 11:44:51.196: D/AndroidRuntime(8724): readGMSProperty: already setted!!
01-24 11:44:51.201: D/AndroidRuntime(8724): readGMSProperty: end
01-24 11:44:51.216: D/dalvikvm(8724): Trying to load lib libjavacore.so 0x0
01-24 11:44:51.226: D/dalvikvm(8724): Added shared lib libjavacore.so 0x0
01-24 11:44:51.236: D/dalvikvm(8724): Trying to load lib libnativehelper.so 0x0
01-24 11:44:51.236: D/dalvikvm(8724): Added shared lib libnativehelper.so 0x0
01-24 11:44:51.486: D/dalvikvm(8724): Note: class Landroid/app/ActivityManagerNative; has 153 unimplemented (abstract) methods
01-24 11:44:51.541: D/AndroidRuntime(8724): Calling main entry com.android.commands.pm.Pm
01-24 11:44:51.581: W/zipro(8649): Unable to open zip '/data/local/tmp/GameTutorial_001.apk': Permission denied
01-24 11:44:51.581: D/asset(8649): failed to open Zip archive '/data/local/tmp/GameTutorial_001.apk'
01-24 11:44:51.581: I/ApplicationPolicy(2287): isApplicationInstallationEnabled
01-24 11:44:51.581: W/DefContainer(8649): Failed to parse package
01-24 11:44:51.581: W/PackageManager(2287): verifying app can be installed or not
01-24 11:44:51.586: W/zipro(8649): Unable to open zip '/data/local/tmp/GameTutorial_001.apk': Permission denied
01-24 11:44:51.586: D/asset(8649): failed to open Zip archive '/data/local/tmp/GameTutorial_001.apk'
01-24 11:44:51.586: D/dalvikvm(2287): WAIT_FOR_CONCURRENT_GC blocked 0ms
01-24 11:44:51.586: W/DefContainer(8649): Failed to parse package
01-24 11:44:51.696: D/dalvikvm(2287): GC_EXPLICIT freed 319K, 33% free 29002K/43271K, paused 8ms+7ms, total 109ms
01-24 11:44:51.706: D/AndroidRuntime(8724): Shutting down VM
01-24 11:44:51.706: D/dalvikvm(8724): GC_CONCURRENT freed 128K, 87% free 568K/4096K, paused 0ms+1ms, total 2ms
01-24 11:44:51.711: D/dalvikvm(8724): Debugger has detached; object registry had 1 entries
01-24 11:44:51.711: I/AndroidRuntime(8724): NOTE: attach of thread 'Binder_3' failed
Cant seem to get any information on the net (even though I do find lots of results when searching for this). None is helping me.
I'm hoping someone here could help me out, as I want make this work..! =P
(Tried setting permision on data/local/tmp folder too..)
- - -
As a sidenote, I wanted to see if I could root it with my original firmware, but I'm not 100% sure how this all works. (Why the toolkit root file is only 5MB, but downloading firmware for my model is 800MB. I did this before with only Odin, but I cant remember which files I needed...)
- - -
Anyways, please help me out here, as I do need to be able to debug my apps on my device. No other aps (that previously worked) is deploying to the phone either, but I can install it if I manually copy it over.
Thanks guys!

Additional information:
So, I'm not sure what stock on my phone anymore.
I did root it once before, and it worked good (did it through Odin). Then the 4.1.2 update came, and I updated normally through Kies. Root was removed in the process. So, before I rotted it yesterday, I was developing on it, and that worked nicely. But I wanted to root it to connect ps3 controller to play games. So I used the Toolbox (V7.0.0) to root it, but they did not have my exact model, only XXELLA. I used that. And root works nice. But Cant develop to it anymore.
This is my information now:
I9300XXELL4
Kernel:3.0.31-742798
Did the rooting process change my kernel?
EDIT:
Ok, just to help me understand a little here. I do not know the connection between firmware and kernel, but was my kernel altered when I rooted my phone?
I see many others having problem with new kernels, but I only used the Samsung Toolkit v7.0.0 to root my device using XXELLA (my model is XXELL4).
Did this process do anything to my kernel? And how can I get the original kernel to my phone if I need that?

Fail to understand the confusing question .
Flash stock rom via Odin and root via
# http://forum.xda-developers.com/showthread.php?t=1719744
Its a question = Q&A .
jje

Helped me out
Hi Stianbl,
I got exactly the same problem, and this solution fixed it, so i hope it does for you too.
The reason for "permission denied" is that apk files uploaded to /data/local/tmp had to low permissions, and the installer process obviously did not have permissions to read any such file.
I never found a solution, but have a workaround that satisfies me. I have simply moved/symlinked the tmp directory to the SD card. Since SD card is formatted as FAT, it does not have owners/permissions and all files created there are always readable by everyone. So open a terminal emulator on your phone. Get root ("su") and type in:
# cd /data/local
# mv tmp tmp-old # (or simply rm -rf tmp)
# mkdir /mnt/sdcard/tmp
# ln -s /mnt/sdcard/tmp ./tmp
I hope i could help you
greets

and another way
m134boy90 said:
Hi Stianbl,
I got exactly the same problem, and this solution fixed it, so i hope it does for you too.
The reason for "permission denied" is that apk files uploaded to /data/local/tmp had to low permissions, and the installer process obviously did not have permissions to read any such file.
I never found a solution, but have a workaround that satisfies me. I have simply moved/symlinked the tmp directory to the SD card. Since SD card is formatted as FAT, it does not have owners/permissions and all files created there are always readable by everyone. So open a terminal emulator on your phone. Get root ("su") and type in:
# cd /data/local
# mv tmp tmp-old # (or simply rm -rf tmp)
# mkdir /mnt/sdcard/tmp
# ln -s /mnt/sdcard/tmp ./tmp
I hope i could help you
greets
Click to expand...
Click to collapse
i founded another way i edit /data/local/tmp to /mnt/sdcard/tmp in adb.exe file and working powerfull adb
try this adb file mediafire.com/download/n9u4evl6wj78zp6/adb.exe
if want edit i open exe file in exescripteditor search google:good:

Related

apps on sdcard -- can't install apps anymore

I'm having a strange problem. I'm trying to update a few apps and I keep getting errors. I have a rooted RC33 and I have the apps on /system/sd/app.
It looks like I have space:
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 63.1M 913.9M 6% /system/sd
/dev/block/mtdblock5 74.8M 60.1M 14.7M 80% /data
/dev/block/mtdblock4 67.5M 1.4M 66.1M 2% /cache
/dev/block/mmcblk0p1 6.4G 4.6G 1.8G 73% /sdcard
#
Most apps seem to install OK, but there are a few I've tried to install today (qsearch, mybackup, quickoffice) that give me errors. It will say install unsuccessful and the error is either "insufficient storage available" (which seems odd) or "could not delete old application" (which also seems strange).
Any ideas? I'm stumped.
And yes, I've rebooted several times.
Thanks
P.S. Is it normal that my /data/app-private is empty? I just noticed that...
Oh, also, here's the debug log:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23451.tmp
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
D/dalvikvm( 58): GC freed 15380 objects / 698304 bytes in 442ms
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageInstallObserver.packageInstalled(): Package install from content://downloads/download/336 failed: Could not delete old application.
-- more info --
So I tried chmod 777 app-private and then created an empty file com.qo.android.am.apk since that is what it was complaining about. Then I tried installing again. The debug log shows:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23453.tmp
D/PackageManager( 58): Scanning package com.qo.android.am
I/PackageManager( 58): /data/app/vmdl23453.tmp changed; unpacking
D/installd( 37): DexInv: --- BEGIN '/data/app/vmdl23453.tmp' ---
D/dalvikvm( 1564): DexOpt: load 541ms, verify 2688ms, opt 214ms
D/installd( 37): DexInv: --- END '/data/app/vmdl23453.tmp' (success) ---
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
I/installd( 37): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
E/PackageManager( 58): Couldn't move package file to: /data/app-private/com.qo.android.am.apk
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
D/PackageManager( 58): Removing package com.qo.android.am
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
D/ActivityManager( 58): Uninstalling process com.qo.android.am
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageIns
tallObserver.packageInstalled(): Package install from content://downloads/download/338 failed: Insufficient storage available.
At this point, I am getting the insufficient space message (as shown in the log). Previously, I was getting the could not delete app message (as shown in the log above this one).
I get this error occasionally too... I don't know why it happens, but it's usually for protected apps.
EDIT: Also, I have my /data/app folder on an ext2 partition on my miccroSD card, but the app-private remains on the phone. I don't know what's going on... I want to buy dxTop, but I don't think that it will install...
I got the same error while trying to install parkmark free. I've been contemplating moving everything back to the phone to install and then move them back to the SD. PITA but I would like to nab it before it is no longer available.
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
amgupt01 said:
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
Click to expand...
Click to collapse
Same here -- that's the only symlinking I did (well, aside from the caches).
I wonder if un-symlinking the apps dir (putting it back to "normal"), installing and then re-symlinking (and copying the new stuff) would work. Does that seem risky? So maybe something like:
Temporarily rename the symlink to app.DISABLED
Create a new app directory (a "real" directory)
Install the new app(s)
Copy whatever is in the new ("real") app directory to the symlinked (now named "app.DISABLED") directory
Remove the "real" app directory and rename the symlink back to app
I'm just wondering if it is dangerous to rename the app directory while apps may be running as suddenly they won't be able to find themselves and that could upset things.
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
amgupt01 said:
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
Click to expand...
Click to collapse
I got bold and tried it and it worked (I did get a few errors about some apps force-closing because I moved directories around). Here's what I did:
cd /data
mv app app.SDCARD
mkdir app
chmod 771 app
chown 1000:1000 app
Went to Market and installed the app that wouldn't install earlier
busybox cp -a app/* /system/sd/app
mv app app.ORIGINAL
mv app.SDCARD app
Voila! My newly installed app works. A reboot should resolve any background apps (like the caller-ID app) that were running while I moved the directories.
If you wanna make some scripts out of that, I'm sure it would help others. A quick "run this" then install then "run that" kind of operation.
EDIT: That worked for a new app. To replace an existing app, I had to do this:
Code:
busybox cp -a /system/sd/app/<old-app> /data/app
before updating so that it could delete the old app. That worked for a replacement (update).
mlevin said:
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
Click to expand...
Click to collapse
I'm wondering if they are checking to see if /data/app is a symlink -- or maybe if /data/app and /data/app-private are on the same filesystem (which could be solved by moving both app and app-private over to the card). Hmm...
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
amgupt01 said:
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
Click to expand...
Click to collapse
Wow. That was easy. I'll do that on mine as well. Cool.
EDIT: Yup, after symlinking and a quick reboot, that worked for me as well!
HELP PLEASE:
Cant update or download new apps from market to SD card.
I can only download & update apps on internal storage and then move them to SD... But If I have app on SD I cannot update or install app.. I always get - Installation Unsuccessful
I am using Leedroid NOA2SD 2.4.1. Tried to format SD card, unmount and mount SD.. nothing helps.
Titanium Backup:
Internal: 23 MB free
SD card: 1.29 GB free
SD card (a2sd): 1.90 MB free
Can you help me with any idea?
Tnx
I have a log file but I cant send it :|

[GUIDE] LogStructuredFileSystem SuperThread (nilfs2,f2fs)

Disclaimer, apply the following at your own risk, I plan to test most if not all of what I post but can't guarantee that you will not cause damage or lose data, and if you do I take no responsibility, that being said it is a simple adaption to current installations.
This is in no way (currently) a replacement for ext4 (or NAND), and shouldn't be seen as a replacement for NativeSD (I'm just piggybacking of their installation zips) compatibility across the board just isn't good enough yet.
Mark 1 - Nilfs2
Code:
Nilfs2 should be good as a replacement for lower class cards and may show a speed improvement on class 2/4 cards. If your installing on a fresh card and have the means to use nilfs2 then please try before/after using ext4 and report back your findings. Any requests for things currently using ext4 will be looked at to make them compatible with nilfs2 if possible.
[B]Partition creation[/B]
Currently only via a Linux OS, will try and trick a recovery to create a nilfs2 instead of ext but no promises
[I]Method 1. Terminal[/I][CODE]sudo apt-get install nilfs-tools
sudo mkfs -t nilfs2 /dev/sdc2
Changing sdc2 to the partition thats to be formatted, look in gparted to be sure your formatting the correct one
Method 2. Disk Utility
You can use Disk Utility from within a LinuxOS
Method 3. Gparted live
Partition creation should be possible using a gparted live usb or cd
Method 4. On device
Copy mkfs.nilfs2 binary to /system/xbin
duplicate fstab renaming to mtab
sudo mkfs.nilfs2 /dev/block/mmcblk0p2
ROM Modifications
Currently, starting with a NativeSD zip as a base only need to alter the install.sh and modify a few lines within the init (within /kernel/bootsd/initrd.gz)
INSTALL.SH
Code:
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
change to
mount -t nilfs2 /dev/block/mmcblk0p2 /ext4p
INIT
Code:
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
change to
mkdir -p /NativeSD
mkdir -p /nilfs
mount -t nilfs2 /dev/block/mmcblk0p2 /nilfs
mount -t nilfs2 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
ROM Installation
Installation confirmed working via CWM, and modified 4ext (recoverymod) (will need to test others)
After Install modifications
Download Nilfs2.zip from #2 , using a root browser or adb copy the system folder to / (thus adding the folders /files to /system). Then need to change permissions of /system/xbin/nilfs_cleanerd , /system/etc/nilfs_cleanerd.conf and /system/etc/init.d/04nilfs to 755 (permissions required will probably change at some point)
Backup
Backup of NILFS2 partition can be done by CWM but only if android is also in NAND as it needs to backup the whole system.
REQUEST: Help from any one who has experience with NiLFS2, and ideally people who have gotten the cleaner to run properly, I'm sure it ran correctly several times, but can't as yet recreate how I got it to work. Let me know if you think you can help [/COLOR][/B]
User Experience
Xylograph's user experience and benchmark NAND / EXT4 / NiLFS2
AnTuTu and Androbench benchmarks[/CODE]
F2FS
Code:
[SIZE="2"][B]Partition creation[/B]
[I][B]Linux only[/B][/I]
Download [URL="http://sourceforge.net/projects/f2fs-tools/"]f2fs tools[/URL] and extract,
cd into folder and run the following[CODE]autoreconf --install
sudo chmod +x configure
sudo ./configure
sudo make
sudo make install
Now you can format:
Code:
sudo umount /dev/sdd1
sudo mkfs.f2fs /dev/sdd1
[/SIZE][/CODE]
To do list
Tidy up the Aroma installer to say nilfs2 instead of ext
Modify a recovery (needed still???)
Modify installer to allow NAND/ext4/nilfs2 installation
Optimize init.d script
Optimize init mounts
Possible beneficial references from across the web
NiLFS website
Not sure if ext4 would have the same problem as ext2
Btrfs
Kernel updates??
Credits / Thanks
Unhelpful for the nilfs2 binaries
Xylograph and securecrt for NativeSD Installation method
ROM devs. (Updated as ROM diffs. added)
Xylograph for AOKP, PA, CyanX
Smokin901 for MIUI
Tytung for Nexus-HD2
Rick1995 for BareBones CM7
Kernel devs.
Securert
Tytung
NILFS2 SuperThread
Will fill this out in due course,
New setup, with sdcard partitions being FAT32 / EXT4 / ANY
requirement for different ROMs should be just the initrd and to change rom_name in a few files.
First change build is on post 34
Fyi. it would be relatively simple to change it to FAT32 / ANY / ANY so if you don't want an additional partition using two (fat32/nilfs2) shouldn't be a problem.
Attached is the different installer files, should be self explanitory, really just need the NAND_ANY_ANY one, but there you go.
NAND_ANY_ANY is the only one without included initrd.gz's, will eventually add a readme detailing what you need to change in the zip, for installing other ROMs and attach a list of initrd's for different roms and partition types / locations
ROM diff files attached, edit the files in the relevant NativeSD zips. And install via recovery.
Have modified securecrt's diff file for BBCM7 - although am having some issues wouldn't advise its use (yet) DON'T USE BBCM7
General
The nilfs2 mounts with the general mount script mount and not the mount.nilfs2.
Need reports on any settings that should help the system; for example noop seems to be the best i/o scheduler for me but have no confirmation from others
Attached Files
ROM 7zip files contain the different files from there corresponding NativeSD zip
All bins and .conf that I've found can be found in nilfs.7z
Nilfs2.zip contains the 3 files needed for the cleaner to work, just copy system over using a root browser and give the three file execution permission.
Init.d script
Original - confirmed working - just point to nilfs_cleanerd . If not already present add the following to /system/etc/init.d/ and chmod +x (or chmod 755) it via terminal/root explorer
Code:
#!/system/bin/sh
/system/xbin/nilfs_cleanerd
Currently trying the following - will probably be implemented within ramdisk at some point - adapted from unhelpful's user_init
Code:
#!/system/bin/sh
export PATH=$PATH:/system/xbin
exec >/system/nilfs2_mount.log
exec 2>&1
set -x
umount /nilfs
time mount -t nilfs2 -o noatime /dev/block/mmcblk0p2 /nilfs
nilfs_cleanerd -c /system/etc/nilfs_cleanerd.conf /dev/block/mmcblk0p2 /nilfs
Edit: files attached as ROM_NAME_initrd.gz need to just be renamed as initrd.gz
HypoTurtle said:
Current relevent files can be found here
Click to expand...
Click to collapse
Thx a lot, however would you be so kind to do the same with BareBoneCM7 NativeSD?
You haven't specified in the starting post how exactly lines should be modified in the init (within /kernel/bootsd/initrd.gz) and also install.sh...
Thanks for creating this thread, HypoTurtle!
Let the ideas start to flow
I'm sure nilfs2 will take over ext4 storage as prefered format once all details are ironed out and recoveries are updated to support it.
It's technically superior to other formats for any solid state memory device.
(BTW, I sent you a PM earlier)
I'm now running CyanMobileX with your nilfs2 binaries. It's just runs flawless!, speedy and I feel my data is very safe in case of any abrupt crash or power failure.
can some one make nilfs2 for this rom :victory:
http://forum.xda-developers.com/showthread.php?t=1681906
HypoTurtle said:
After Install modifications (needs clarification in terms of location)
Will tidy this up as they should/can be included in installation/flashable zip; but using adb/root browser copy the bins and .conf file into /system/xbin. And add a script to /system/etc/init.d initiating /system/xbin/nilfs_cleanerd. Then give the files execution permissions.
Click to expand...
Click to collapse
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
ioy said:
*.conf file into /system/xbin but not into /etc ?
Click to expand...
Click to collapse
Yep, the .conf goes under "system/etc"
ioy said:
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
Click to expand...
Click to collapse
Sorry yes, the default install location for the .conf would be in /etc (or /system/etc; same folder).
Integration of the binaries into the ROM is something I did state would be done eventually, but think that would also require digging through the zip to find where permissions are added and change those, and have had a bit of a hit and miss experience with the cleaner at the moment, want to make sure I have the permissions correct and it's working well before integration.
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
HypoTurtle said:
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
Click to expand...
Click to collapse
Already have
http://forum.xda-developers.com/showpost.php?p=31657498&postcount=716
Here's a copy:
Checksums
Immediate recovery after system crash (no fsck needed at all!)
Continuous (tailored) snapshots of the fs.
Those are benefits of nilfs over ext4. Ext4 has none of those!
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
seaman2k said:
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
Click to expand...
Click to collapse
sorry, might need sudo ; so sudo mkfs -t nilfs2 /dev/sdb2 failling that try formatting it to ext4 in gparted then try again.
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
HypoTurtle said:
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Xylograph said:
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Click to expand...
Click to collapse
Thanks just noticed that myself (the app folder in the root of the partition)
HypoTurtle said:
Thanks just noticed that myself (the app folder in the root of the partition)
Click to expand...
Click to collapse
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
HypoTurtle said:
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
In the BB7 the same happened on Ext4, it had been reported many times even before NILFS-NativeSD idea arrived.
Xylograph said:
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
Click to expand...
Click to collapse
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
HypoTurtle said:
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
Click to expand...
Click to collapse
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Xylograph said:
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Click to expand...
Click to collapse
Couldn't see anything relevant there, Could it be something in init.htcleo.rc? Have tried commenting everything at on fs, but still not fixed. There's also some mounts for squashfs files in init.rc (for modules and xbin) that seem redundant.

Modding odex'ed framework files

hi.. ive been having trouble trying to odex a modded andriod.policy.jar .. i keep getting bootloops
so im kind of desperate for help right now
currently im just uploading my modified android.policy.jar and running these commands
dexopt-wrapper <source jar> <target odex> $BOOTCLASSPATH
busybox dd if= <original odex> of=<target odex> bs=1 count=20 skip=52 seek=52 conv=notrunc
what am i doing wrong?
im getting repeating bootloops with something about bad dependencies etc...
i must be doing SOMETHING wrong here.. but i just cant figure it out !
any help would be appreciated...
Here is a thread that helped me re-odex modes deodex files without an issue http://forum.xda-developers.com/showpost.php?p=16447676&postcount=1 very helpful thread.
Tenacius D said:
Here is a thread that helped me re-odex modes deodex files without an issue http://forum.xda-developers.com/showpost.php?p=16447676&postcount=1 very helpful thread.
Click to expand...
Click to collapse
Nice post. Bookmarked
Thank you.
Sent from my Galaxy S3
no joy.. still same issue , this is what logcat is giving me :
D/dalvikvm( 2084): DexOpt: incorrect opt magic number (0xf6 0e 49 19)
E/dalvikvm( 2084): /system/framework/android.policy.jar odex has stale dependencies
I/dalvikvm( 2084): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/dalvikvm( 2084): Unable to process classpath element '/system/framework/android.policy.jar'
I/SurfaceFlinger( 2083): EventThread ready to run.
I/dalvikvm( 2084): DexOpt: Some deps went away
E/dalvikvm( 2084): /system/framework/services.jar odex has stale dependencies
I/dalvikvm( 2084): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/dalvikvm( 2084): Unable to process classpath element '/system/framework/services.jar'
D/WVMDrmPlugIn( 2086): WVMDrmPlugin:nGetSupportInfo : 0
E/Trace ( 2083): error opening trace file: No such file or directory (2)
I/SurfaceFlinger( 2083): id=1(1) createSurf 0x40daff24 (720x1280),4 flag=0, =pid_2441>
I/dalvikvm( 2084): DexOpt: Some deps went away
E/dalvikvm( 2084): /system/framework/apache-xml.jar odex has stale dependencies
I/dalvikvm( 2084): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/dalvikvm( 2084): Unable to process classpath element '/system/framework/apache-xml.jar'
D/ICD ( 2092): icd (1)
I/dalvikvm( 2084): DexOpt: Some deps went away
E/dalvikvm( 2084): /system/framework/sec_edm.jar odex has stale dependencies
I/dalvikvm( 2084): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/dalvikvm( 2084): Unable to process classpath element '/system/framework/sec_edm.jar'
Well not sure what's wrong there do you have any errors during re-odexing.
none.. it reodex'es even to the same size as the original.. i just get this message no matter what i do..
Is the BOOTCLASSPATH correct?
This BOOTCLASSPATH is from s3 init.rc file
Code:
/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:/system/framework/sec_edm.jar:/system/framework/seccamera.jar
this is my current bootclasspath :
Code:
echo $BOOTCLASSPATH
/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bo
uncycastle.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:/system/framework/sec_edm.jar:/sy
stem/framework/seccamera.jar
this is the result from trying to odex android.policy.jar :
Code:
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=28455
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
C:\apk_tools>CALL adb shell busybox dd if=/sdcard/original_framework/android.policy.odex of=
/system/framework/android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.005834 seconds, 3.3KB/s
so far i tried
Code:
dexopt-wrapper <source> <target> /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:/system/framework/sec_edm.jar:/system/framework/seccamera.jar
Code:
dexopt-wrapper <source> <target> $BOOTCLASSPATH
Code:
dexopt-wrapper <source> <target>
same error.. nothing seems to work BUT restoring the original android.policy.odex that came with the rom..
i also tried deodexing the android.policy.odex then reodexing it, same thing... something is missing here and i cant figure out what..
Everything is looking as it should so really dont know where is the issue here.
hey just got on a pc
in this step
Code:
C:\apk_tools>CALL adb shell busybox dd if=/sdcard/original_framework/android.policy.odex [COLOR="Red"]of=
/system/framework/android.policy.odex[/COLOR] bs=1 count=20 skip=52 seek=52 conv=notrunc
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.005834 seconds, 3.3KB/s
is the patched odext file that was created with first command in this command of=
/system/framework/android.policy.odex
if yes did you tray doing this on a phone without renaming anything or transferring from a phone.
yes, also nothing was transferred / renamed..
im going nuts here !
Maybe trying this command
Code:
dexopt-wrapper /system/framework/XXX.jar customjar.odex /system/framework/patched_XXX.odex $BOOTCLASSPATH
insted of this command
Code:
dexopt-wrapper /system/framework/android.policy.jar /system/framework/patched_android.policy.odex /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:/system/framework/sec_edm.jar:/system/framework/seccamera.jar
If that don't work then i don't know what else to tray.
SabrWolf said:
yes, also nothing was transferred / renamed..
im going nuts here !
Click to expand...
Click to collapse
for the last command cud you tray running this
C:\apk_tools>CALL adb shell busybox dd if=/sdcard/original_framework/android.policy.odex of=
/system/framework/patched_android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
and now file named patched_android.policy.odex is your patched file just remove patched_ from file name and it shod work.

[GUIDE] I Rooted my Fire TV via dirtycow

Hi,
i just rooted my Fire TV 1 (version 51.1.4.0) via dirtycow, and I wanted to share my experience. (Unfortunately I cannot post external Links here)
Dirtycow allows you to write to files, even if you have no permission to do so. Unfortunately there is no binary on the system with the suid bit set, so I could not replace this binary. (Other attempts on other Android devices replaced the run-as binary. This is not possible here). Another problem was, that the modification only last for the current boot, so I could not just modify boot scripts. I had to find a binary, that is executed as root while the system is running, preferably on demand. This binary is ip. Every time one modifies the network settings in the Fire TV gui, ip is executed as root. Yay. With that in mind, I replaced ip with a shell script, that deploys the su binary.
This is what I did:
I compiled the dirtycow.c from timwr GitHub Repository CVE-2016-5195
Then I put the resulting binary into /data/local/tmp on my Firetv (via adb)
Now I pushed chainfires su binary to /data/local/tmp
I copied the /system/bin/ip binary to /data/local/tmp
I wrote this shell script, pushed it to /data/local/tmp and marked it executable (755)
Code:
#!/system/bin/sh
mount -o remount,rw /system
cp /data/local/tmp/su /system/xbin
chmod 4755 /system/xbin/su
/data/local/tmp/ip "[email protected]"
After that, I used dirtycow to replace ip with my new ip script (./dirtycow /system/bin/ip ip_script) [This may take a while]
Now I went to my network settings of my Fire TV and changed them to a static ip address.
I reconnected to my amazon Fire tv and typed su
Code:
[email protected]:/ $ su
[email protected]:/ #
Lastly I installed the Supersu.apk from chainfire
Root seems to work with the adb shell and the terminal app. Somehow it does not with amaze file manager. If I start it I get thrown into the amazon fire ui.
This rooting method should also work for other versions of the fireOS, though I have not tested them.
Can you downgrade with being in the root state?
sconnyuk said:
Can you downgrade with being in the root state?
Click to expand...
Click to collapse
Yes. After rooting, I downgraded to 5.1.0.2 and did a full bootloader unlock. I am now running a rooted 5.2.1.1
christofsteel said:
Yes. After rooting, I downgraded to 5.1.0.2 and did a full bootloader unlock. I am now running a rooted 5.2.1.1
Click to expand...
Click to collapse
Will have to try this for fire stick.
Excellent find, ive been watching the dirtycow and this will come in handy if it works for fire stick.
sconnyuk said:
Will have to try this for fire stick.
Excellent find, ive been watching the dirtycow and this will come in handy if it works for fire stick.
Click to expand...
Click to collapse
Please report back
I think it is important to note, that I configured a static ip address to trigger the ip script. Root is permanent btw. as soon as the su binary is deployed, you can reboot all you like.
firetv have selinux? what version linux is it?
christianrodher said:
firetv have selinux? what version linux is it?
Click to expand...
Click to collapse
I thought I read somewhere, that FireOS 5 had SELinux. I could not check, because I still ran FireOS 3. Seems like it does not have SELinux. I will remove the remark from my initial post.
christofsteel said:
I thought I read somewhere, that FireOS 5 had SELinux. I could not check, because I still ran FireOS 3. Seems like it does not have SELinux. I will remove the remark from my initial post.
Click to expand...
Click to collapse
can you double check if sepolicy is present or something similar?
christianrodher said:
can you double check if sepolicy is present or something similar?
Click to expand...
Click to collapse
Ok. In my FireOS version 5.2.1.1 there is SELinux activated and enforcing. In FireOS version 51.1.0.4 there was none. But I do not know if that hinders the rooting process.
christofsteel said:
Ok. In my FireOS version 5.2.1.1 there is SELinux activated and enforcing. In FireOS version 51.1.0.4 there was none. But I do not know if that hinders the rooting process.
Click to expand...
Click to collapse
ok so when you do the exploit u where at selinux enforcing.... ok if is that simple after weve been working our asses here https://github.com/timwr/CVE-2016-5195/issues/9 im going to break the pc and the cell phone lol
@christianrodher No worries, I doubt this is the universal solution! I think it's that the TV runs `ip` with a really lenient SELinux context for some stupidly weird reason.
christianrodher said:
ok so when you do the exploit u where at selinux enforcing.... ok if is that simple after weve been working our asses here https://github.com/timwr/CVE-2016-5195/issues/9 im going to break the pc and the cell phone lol
Click to expand...
Click to collapse
No I did the exploit on my FireOS version 51.1.0.4. Afaik there was no SELinux present. SELinux is present in FireOS version 5.2.1.1. I can test, if this exlploit works on my now updated Fire TV.
Edit: It did not work I could not mount system read write. Seems like it only works for FireOS 3
Really tried to get this to work. I think I'm close. I saw SELinux complain about the file size so I did some padding. Here's where I'm at
187594885]
I/Kernel ( 163): [ 1503.059370] (0)[163:healthd]healthd: battery l=100 v=4200
t=2.2 h=2 st=5 chg=u
W/linker (10431): ./dirtycow: unused DT entry: type 0x6ffffffe arg 0x600
W/linker (10431): ./dirtycow: unused DT entry: type 0x6fffffff arg 0x1
I/exploit (10431): size 223296
I/exploit (10431):
I/exploit (10431): [*] mmap 0xf7546000
I/exploit (10431): [*] exploit (patch)
I/exploit (10431): [*] currently 0xf7546000=464c457f
I/exploit (10431): [*] madvise = 0xf7546000 223296
I/Kernel ( 0): [ 1509.432532]-(2)[0:swapper/2]CPU2: Booted secondary process
or
I/Kernel ( 0): [ 1509.437302]-(3)[0:swapper/3]CPU3: Booted secondary process
or
I/Kernel ( 87): [ 1509.437743] (0)[87:hps_main][HPS] (0004)(1)(0)action end(2
7)(35)(0)(2) (2)(2)(2)(2)(2)(2)(2)(2)(1)(0) (6)(230)(0) (0)(0)(0) (0)(6)(230)(0)
(6)
I/exploit (10431): [*] madvise = 0 1048576
I/Kernel ( 0): [ 1511.439231]-(1)[0:swapper/1]CPU1: Booted secondary process
or
I/Kernel ( 87): [ 1511.440339] (0)[87:hps_main]CPU3: shutdown
I/Kernel ( 87): [ 1511.440873] (0)[87:hps_main][HPS] (0800)(1)(2)action end(1
05)(102)(0)(1) (2)(2)(2)(2)(2)(2)(2)(2)(1)(0) (105)(10)(0) (1666)(10)(0) (0)(102
)(10)(0)(102)
I/exploit (10431): [*] /proc/self/mem -1048576 1048576
I/exploit (10431): [*] exploited 0xf7546000=464c457f
I/art ( 501): Background partial concurrent mark sweep GC freed 256902(12MB
) AllocSpace objects, 15(2MB) LOS objects, 33% free, 20MB/31MB, paused 690us tot
al 136.802ms
E/WifiStateMachine( 501): WifiStateMachine CMD_START_SCAN source -2 txSuccessRa
te=50.64 rxSuccessRate=38.79 targetRoamBSSID=58:6d:8f:09:b7:37 RSSI=-39
E/WifiStateMachine( 501): WifiStateMachine L2Connected CMD_START_SCAN source -2
93, 94 ignore because P2P is connected
I/Kernel ( 87): [ 1513.438566] (0)[87:hps_main]CPU2: shutdown
I/Kernel ( 87): [ 1513.439651] (0)[87:hps_main][HPS] (0400)(2)(1)action end(7
)(4)(0)(0) (2)(2)(2)(2)(2)(2)(2)(2)(1)(0) (7)(10)(0) (288)(10)(0) (0)(4)(10)(0)(
4)
I/Kernel ( 87): [ 1515.438476] (0)[87:hps_main]CPU1: shutdown
I/Kernel ( 87): [ 1515.439146] (0)[87:hps_main][HPS] (0200)(2)(0)action end(4
)(3)(0)(0) (2)(2)(2)(2)(2)(2)(2)(2)(1)(0) (4)(10)(0) (46)(10)(0) (0)(3)(10)(0)(3
)
I/Kernel ( 119): [ 1521.197537] (0)[119:wdtk-0]wdk: [WDK], local_bit:0x1, cpu:
0, check_bit:0x1, RT[1521197519702]
I/Kernel ( 119): [ 1521.197575] (0)[119:wdtk-0]wdk: [WDK]: kick Ex WDT,RT[1521
197568471]
E/WifiStateMachine( 501): WifiStateMachine CMD_START_SCAN source -2 txSuccessRa
te=3.98 rxSuccessRate=3.61 targetRoamBSSID=58:6d:8f:09:b7:37 RSSI=-39
E/WifiStateMachine( 501): WifiStateMachine L2Connected CMD_START_SCAN source -2
94, 95 ignore because P2P is connected
^C
C:\Program Files (x86)\Minimal ADB and Fastboot>
130|[email protected]:/data/local/tmp $ getenforce
Enforcing
130|[email protected]:/data/local/tmp $ getenforce
Enforcing
I have an AFTV2 running latest firmware. I also noticed chainfires su binary i had was 32bit so I grabbed a 64bit one. Still no dice
[email protected]:/data/local/tmp $ ls -la
-rwxrwxrwx shell shell 13776 2016-10-31 17:43 dirtycow
-rwxrwxrwx shell shell 223296 2016-10-31 18:27 ip
-rwxrwxrwx shell shell 223296 2016-10-31 19:48 ip_script
-rwxrwxrwx shell shell 108480 2016-10-31 19:39 su
[email protected]:/data/local/tmp $
Hopes this helps someone
I've reached Step 3, I don't understand what you mean by su binary, as in, the whole flashable zip of supersu? or something else? Could you please explain? Thank you
Edit: Before I carry on, I was attempting this on the fire tv *Stick* instead of the box, running 5.2.1.1 would it still work?
VastVenomm said:
I've reached Step 3, I don't understand what you mean by su binary, as in, the whole flashable zip of supersu? or something else? Could you please explain? Thank you
Edit: Before I carry on, I was attempting this on the fire tv *Stick* instead of the box, running 5.2.1.1 would it still work?
Click to expand...
Click to collapse
you need to extract the SU binary file from Supersu. apk
I ran:
./dirtycow /system/bin/ip ip_script
I marked the scripts as 755 as well.
Error:
/system/bin/sh: ./dirtycow: not executable: 64-bit ELF file.
I also tried compiling dirtycow as 32bit. And got:
/system/bin/sh: ./dirtycow: not executable: 32-bit ELF file.
Help would be appreciated, thank you.
Do you save the shell script as ip_script.sh?
Sent from my SM-G920P using Tapatalk
VastVenomm said:
I've reached Step 3, I don't understand what you mean by su binary, as in, the whole flashable zip of supersu? or something else? Could you please explain? Thank you
Edit: Before I carry on, I was attempting this on the fire tv *Stick* instead of the box, running 5.2.1.1 would it still work?
Click to expand...
Click to collapse
You do not need to extract the binary from the SuperSU.apk, rather download the zip from here: https://download.chainfire.eu/696/supersu/
Then extract the zipfile and copy the su file from the arm folder.
Edit: I think it would not work because FireOS > 5.2.0.0 has SELinux activated. This method does not seem to work with SELinux.
VastVenomm said:
I ran:
./dirtycow /system/bin/ip ip_script
I marked the scripts as 755 as well.
Error:
/system/bin/sh: ./dirtycow: not executable: 64-bit ELF file.
I also tried compiling dirtycow as 32bit. And got:
/system/bin/sh: ./dirtycow: not executable: 32-bit ELF file.
Help would be appreciated, thank you.
Click to expand...
Click to collapse
You compiled the source to x86 code. You need to compile dirtycow with a compiler for arm. I recommend using androids ndk.
I still got 5.0.5.1 on my FTV1. Is there a chance that I might get root using the dirtycow exploit?
christofsteel said:
You do not need to extract the binary from the SuperSU.apk, rather download the zip from here: https://download.chainfire.eu/696/supersu/
Then extract the zipfile and copy the su file from the arm folder.
Edit: I think it would not work because FireOS > 5.2.0.0 has SELinux activated. This method does not seem to work with SELinux.
You compiled the source to x86 code. You need to compile dirtycow with a compiler for arm. I recommend using androids ndk.
Click to expand...
Click to collapse
Rename apk to zip and extract su no diffence from what I posted.

NST Issues after a botched cleaning process

Hi,
I was wondering if anyone can help me figuring out what happened to my NST.
I was checking my NST hidden settings menu (NSTHiddenSettings.apk) when I pressed one the generic settings buttons (they appears at the bottom of the menu and they look all the same). One of these buttons initiated a "cleaning" process + reboot that I could not stop.
The end result of this was:
My NST was hanging after the reboot. I resetted to factory settings using NookManager and upgraded to 1.2.2 US firmware (my Nook has originally a 1.2.0 UK firmware), registered the device and re-rooted again: It all went well.
However NookManager "'informed me" that the NookButtons Mod APK was not installed during the rooting process.
I understood why when I tried install more apps. The system would not allow me to because every time I try to install a new apk I get a "memory full" message (mind you: the Nook is just rooted, so plenty of space, in theory).
Moreover, "back"/menu/notifications buttons on the top toolbar disappear when I access the settings menu
I have the feeling the file system is quite messed up (e.g. .orig files that should not be there), however since I do not have a backup copy (yes, silly me!), I cannot verify it. I have copied my Nook filesystem, and I was wondering if you could gather what happened to it and how I can fix it.
Code:
drwxrwx--- system system 1970-01-01 01:00 rom
drwxrwxrwt root root 2019-02-03 20:34 sqlite_stmt_journals
drwxrwxrwx system system 2019-02-03 20:34 sdcard
drwxrwxr-x system sdcard_rw 1970-01-01 01:00 media
drwxrwx--- system cache 2019-02-03 15:09 cache
drwxrwxrwx root root 2019-02-03 20:34 tmp
lrwxrwxrwx root root 2019-02-03 20:34 etc -> /system/etc
drwxrwx--x system system 2019-02-03 20:34 data
-rw-r--r-- root root 324 2019-02-03 15:44 env.txt
-rwxr-x--- root root 128000 2019-02-03 15:44 init
-rwxr-x--- root root 1677 2019-02-03 15:44 init.goldfish.rc
dr-xr-xr-x root root 1970-01-01 01:00 proc
drwxr-x--- root root 2019-02-03 15:44 sbin
drwxr-xr-x root root 1970-01-01 01:00 sys
drwxr-xr-x root root 2019-02-03 15:44 system
-rw-r--r-- root root 118 2019-02-03 15:44 default.prop.orig
-rw-r--r-- root root 118 2019-02-03 15:44 default.prop
-rw-r--r-- root root 118 2019-02-03 15:44 init.rc.orig
-rwxr-x--- root root 19284 2019-02-03 15:44 init.rc
drwx------ root root 2017-05-17 09:47 root
drwxr-xr-x root root 2019-02-03 20:34 dev
NOTE: I have tried to factory-reset it also using the 8 failed boot ups followed by holding both bottom "page left/right" buttons. Nothing. I always end up with the same messed-up configuration.
Can anyone help me?
Marco
You're going to have to dig deeper than that to find out what's what.
First step:
Code:
# df
That will tell you what you have for disk space.
And this is what I've got:
Code:
/dev: 116520K total, 0K used, 116520K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/rom: 16116K total, 3655K used, 12460K available (block size 512)
/system: 285583K total, 210512K used, 75071K available (block size 1024)
/data: 808292K total, 64200K used, 744092K available (block size 4096)
/cache: 237987K total, 6263K used, 231724K available (block size 1024)
/media: 245484K total, 40K used, 245444K available (block size 4096)
And this is just right after the rooting process. Nothing else installed.
Renate NST said:
You're going to have to dig deeper than that to find out what's what.
First step:
Code:
# df
That will tell you what you have for disk space.
Click to expand...
Click to collapse
Well, you've got the space.
The "memory full" thing might be a red herring.
The package installer copies the file to somewhere temporary before it ends up in /data/app.
It could be a permission problem.
How are you installing the app? With adb install?
Use a second window running adb logcat and look for anything that happens.
In the original NookManager thread similar issues were discussed with early versions starting about here. There are some suggested work-arounds, including adb install (useful, but annoying) and, if I recall correctly, some attempts at patches for the permissions issue.
I have seen questions regarding the "out of space" issue from time to time but it took awhile for them to bubble up to the top in my brain. Why this happens with some installations, I have no idea.
Renate,
this is interesting: [email protected] always installed the apps with PackageManager, and that's what I did this time too, and that's what gave me the "memory full" error.
However, I have now used adb install and things went pretty smooth. I installed NookMods from NM and this is the log:
Code:
D/AndroidRuntime( 2112): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
I/AndroidRuntime( 2112): Heap size: -Xmx64m
D/AndroidRuntime( 2112): CheckJNI is OFF
D/dalvikvm( 2112): creating instr width table
D/AndroidRuntime( 2112): --- registering native functions ---
I/NATIVE-EPD( 2112): framebuffer_handle: 17
D/PackageParser( 788): Scanning package: /data/app/vmdl35313.tmp
I/PackageManager( 788): /data/app/vmdl35313.tmp changed; unpacking
D/installd( 745): DexInv: --- BEGIN '/data/app/vmdl35313.tmp' ---
D/dalvikvm( 2125): creating instr width table
D/dalvikvm( 2125): DexOpt: load 32ms, verify 151ms, opt 7ms
D/installd( 745): DexInv: --- END '/data/app/vmdl35313.tmp' (success) ---
I/installd( 745): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
D/PackageManager( 788): New package installed in /data/app/org.nookmods.ntmm.apk
D/AndroidRuntime( 2112): Shutting down VM
D/dalvikvm( 2112): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 2112): DestroyJavaVM shutting VM down
D/dalvikvm( 2112): HeapWorker thread shutting down
D/dalvikvm( 2112): HeapWorker thread has shut down
D/jdwp ( 2112): JDWP shutting down net...
I/jdwp ( 2112): adbd disconnected
D/dalvikvm( 2112): VM cleaning up
W/ResourceType( 788): Resources don't contain package for resource number 0x7f060001
I/AmazonAppstore.UpdateService( 874): Self-updating enabled: true
D/AmazonAppstore.UpdateService( 874): Adding self-update command to UpdateService
D/AmazonAppstore.UpdateService( 874): Received action: com.amazon.mas.client.framework.UpdateService.APP_WAS_INSTALLED from intent: Intent { act=com.amazon.mas.client.framework.UpdateService.APP_WAS_INSTALLED cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService (has extras) }
D/InstallReceiver( 1444): org.nookmods.ntmm
D/dalvikvm( 2112): LinearAlloc 0x0 used 625764 of 5242880 (11%)
D/dalvikvm( 788): GC freed 15270 objects / 1017944 bytes in 70ms
and the adb install message:
Code:
adb install org.nookmods.ntmm.apk
822 KB/s (170731 bytes in 0.202s)
pkg: /data/local/tmp/org.nookmods.ntmm.apk
Success
rm failed for -f, Read-only file system
May this be the problem encountered by PackageManager (and not adb install):
Code:
rm failed for -f, Read-only file system
------------------------
Incidentally, logcat keeps throwing this connectivity error at me, even though I actually registered the device succcessfully:
Code:
I/BnCloudReqMgr( 837): BnCloudRequest Service: starting now
W/ActivityManager( 788): Unable to start service Intent { act=com.bn.cloud.IRequestHandler }: not found
E/GPBRequestHelper( 837): Cannot get handle on BN Cloud Request Service
E/GPBRequestHelper( 837): com.bn.cloud.ServiceUnavailableException: Cannot bind with service: Context.bindService() failed
E/GPBRequestHelper( 837): at com.bn.cloud.RequestManagerImpl$BnCloudServiceConnection.<init>(RequestManagerImpl.java:255)
E/GPBRequestHelper( 837): at com.bn.cloud.RequestManagerImpl.<init>(RequestManagerImpl.java:217)
E/GPBRequestHelper( 837): at com.bn.cloud.BnCloudRequestManager.getRequestHandler(BnCloudRequestManager.java:29)
E/GPBRequestHelper( 837): at com.bn.cloud.GPBRequestHelper.obtainBnCloudRequestHandler(GPBRequestHelper.java:110)
E/GPBRequestHelper( 837): at com.bn.cloud.GPBRequestHelper.access$300(GPBRequestHelper.java:18)
E/GPBRequestHelper( 837): at com.bn.cloud.GPBRequestHelper$3.handleMessage(GPBRequestHelper.java:148)
E/GPBRequestHelper( 837): at android.os.Handler.dispatchMessage(Handler.java:99)
E/GPBRequestHelper( 837): at android.os.Looper.loop(Looper.java:123)
E/GPBRequestHelper( 837): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/GPBRequestHelper( 837): at java.lang.reflect.Method.invokeNative(Native Method)
E/GPBRequestHelper( 837): at java.lang.reflect.Method.invoke(Method.java:521)
E/GPBRequestHelper( 837): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/GPBRequestHelper( 837): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/GPBRequestHelper( 837): at dalvik.system.NativeStart.main(Native Method)
Renate NST said:
Well, you've got the space.
The "memory full" thing might be a red herring.
The package installer copies the file to somewhere temporary before it ends up in /data/app.
It could be a permission problem.
How are you installing the app? With adb install?
Use a second window running adb logcat and look for anything that happens.
Click to expand...
Click to collapse
We have here a total of three badly worded/misleading errors.
"Memory full"
It isn't.
"rm failed for -f"
They are trying to rm -f on something but the error message is just presuming what is immediately after "rm" must be the file name.
They didn't think that there could be some flags after "rm".
"Resources don't contain package for resource number 0x7f060001"
You're missing a resource that is referenced in some other resource (or AndroidManifest).
It's not a resource that is referenced in the code because that would be a runtime error.
The "7f" tells you that it's a user-supplied resource, the "06" tells you not much because they are issued sequentially.
My bet, probably a string referenced in AndroidManifest.
Link, please, to the apk that gives you this error.
Here it is, attached.
It is the version of nookmods contained in NookManager 0.50. (NookManager/files/data/app/org.nookmods.ntmm.apk)
NM does not install it already when I try to root the Nook. (It throws a "Nook Mods not installed" message)
Renate NST said:
We have here a total of three badly worded/misleading errors.
"Memory full"
It isn't.
"rm failed for -f"
They are trying to rm -f on something but the error message is just presuming what is immediately after "rm" must be the file name.
They didn't think that there could be some flags after "rm".
"Resources don't contain package for resource number 0x7f060001"
You're missing a resource that is referenced in some other resource (or AndroidManifest).
It's not a resource that is referenced in the code because that would be a runtime error.
The "7f" tells you that it's a user-supplied resource, the "06" tells you not much because they are issued sequentially.
My bet, probably a string referenced in AndroidManifest.
Link, please, to the apk that gives you this error.
Click to expand...
Click to collapse

Categories

Resources